diff -Nru luminance-hdr-2.5.1+dfsg/AUTHORS luminance-hdr-2.6.0/AUTHORS --- luminance-hdr-2.5.1+dfsg/AUTHORS 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/AUTHORS 2019-06-09 19:18:38.000000000 +0000 @@ -1,32 +1,42 @@ If I forgot to add someone to this list please let me know. Main developers, improvements, bug fixing: -Davide Anastasia (Lead Project Mantainer & Mac OS X support) + +Davide Anastasia (Lead Project Mantainer & Mac OS X support) -Daniel Kaneider (Windows Setup and Optimisation, Head of i18n Support) - +Daniel Kaneider (Windows Setup and Optimisation, Head of i18n Support) + -Franco Comida (Developer, Linux support, Maintainer Fedora Package) +Franco Comida (Developer, Linux support, Maintainer Fedora Package) Bruce Guenter -Contributors: -Nicholas Phillips (MTB alignment code) -Douglas E. Warner (FC6 packager and bug reports) -Ignacy Gawedzki (tiff ldr bugfixes and suggestion) -Bertrand Petit (FreeBSD patch) -Sloan Poe (found and fixed bug regarding legacy actions signal) -Alexandre Prokoudine (gui improvements, desktop integration) -Arne Hagenah (various suggestions) -Frank Boehme (various suggestions) -Erik Ouchterlony + +Contributors, in last name alphabetical order: + +Frank Boehme (various suggestions) +Maciej Dworak +Jean-Christophe Frisch +Ignacy Gawedzki (tiff ldr bugfixes and suggestion) +Arne Hagenah (various suggestions) Antoine Latter -Markus Schmaus (found and fixed bug in Debevec and Robertson02) +Erik Ouchterlony +Bertrand Petit (FreeBSD patch) +Nicholas Phillips (MTB alignment code) +Sloan Poe (found and fixed bug regarding legacy actions signal) +Alexandre Prokoudine (gui improvements, desktop integration) +Markus Schmaus (found and fixed bug in Debevec and Robertson02) +Douglas E. Warner (FC6 packager and bug reports) +Ingo Weyrich (speedups, reduction of memory usage, Windows msys2 build instructions) + Translators: + http://qtpfsgui.sourceforge.net/?page_id=23 + Original author: + Giuseppe Rota diff -Nru luminance-hdr-2.5.1+dfsg/build_files/Modules/CompilerSettings.cmake luminance-hdr-2.6.0/build_files/Modules/CompilerSettings.cmake --- luminance-hdr-2.5.1+dfsg/build_files/Modules/CompilerSettings.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/Modules/CompilerSettings.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -1,6 +1,8 @@ IF(UNIX) ADD_DEFINITIONS(-Wall -Wno-unknown-pragmas) ADD_DEFINITIONS(-ffast-math) +ADD_DEFINITIONS(-Wno-deprecated) +ADD_DEFINITIONS(-Wno-deprecated-declarations) IF(APPLE) # optimize for 64-bit core 2 architecture on Apple @@ -10,12 +12,11 @@ #Activate C++11 support, when available if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - add_definitions(-DBRANCH_PREDICTION) + add_definitions(-DBRANCH_PREDICTION) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) message(STATUS "C++11 activated for GCC ${GCC_VERSION}") set(CMAKE_CXX_STANDARD 11) - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # add_definitions("-std=gnu++11") add_definitions(-DLHDR_CXX11_ENABLED) elseif(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) message(WARNING "C++0x activated for GCC ${GCC_VERSION}. If you get any errors update to a compiler that fully supports C++11") @@ -28,18 +29,21 @@ message(STATUS "C++11 activated for Clang") set(CMAKE_CXX_STANDARD 11) if (APPLE) - set(CMAKE_EXE_LINKER_FLAGS "-lc++abi -stdlib=libc++") + set(CMAKE_EXE_LINKER_FLAGS "-lc++abi -stdlib=libc++ -rpath @loader_path/../Frameworks/") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") add_definitions(-DLHDR_CXX11_ENABLED) add_definitions(-DBRANCH_PREDICTION) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnull-dereference -Wdelete-non-virtual-dtor -Wsign-compare -Wswitch") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type -Wself-assign -Wunused-argument -Wunused-function -Wtautological-compare") - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32 -Wconversion -Wsystem-headers") + #OpenMP support under Linux with clang + if (UNIX) + FIND_PACKAGE(OpenMP REQUIRED) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + endif() elseif(MSVC) message(STATUS "C++11 is active by default on Microsoft Visual Studio") - # add_definitions("-std=c++0x") add_definitions(-DLHDR_CXX11_ENABLED) else() message(WARNING "Your C++ compiler does not support C++11.") diff -Nru luminance-hdr-2.5.1+dfsg/build_files/Modules/Findfftwf.cmake luminance-hdr-2.6.0/build_files/Modules/Findfftwf.cmake --- luminance-hdr-2.5.1+dfsg/build_files/Modules/Findfftwf.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/Modules/Findfftwf.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -13,6 +13,7 @@ /usr/local/include /opt/include /usr/apps/include + /opt/local ) SET(TRIAL_LIBRARY_PATHS @@ -21,6 +22,7 @@ /usr/local/lib /opt/lib /sw/lib + /opt/local ) FIND_PATH(FFTWF_INCLUDE_DIR fftw3.h ${TRIAL_PATHS}) diff -Nru luminance-hdr-2.5.1+dfsg/build_files/Modules/GlobalSettings.cmake luminance-hdr-2.6.0/build_files/Modules/GlobalSettings.cmake --- luminance-hdr-2.5.1+dfsg/build_files/Modules/GlobalSettings.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/Modules/GlobalSettings.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -1,14 +1,2 @@ -IF(NOT CMAKE_BUILD_TYPE) -SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE) -ENDIF() - -# MESSAGE(${CMAKE_BUILD_TYPE}) - -IF(${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel") -ADD_DEFINITIONS("-DQT_NO_DEBUG_OUTPUT") -ENDIF() - -SET(LUMINANCE_MODULES_CLI ) -SET(LUMINANCE_MODULES_GUI ) - - +set(LUMINANCE_MODULES_CLI) +set(LUMINANCE_MODULES_GUI) diff -Nru luminance-hdr-2.5.1+dfsg/build_files/Modules/Version.cmake luminance-hdr-2.6.0/build_files/Modules/Version.cmake --- luminance-hdr-2.5.1+dfsg/build_files/Modules/Version.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/Modules/Version.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -2,13 +2,13 @@ # Numeric version values SET(LHDR_VERSION_MAJOR "2") -SET(LHDR_VERSION_MINOR "5") -SET(LHDR_VERSION_PATCH "1") +SET(LHDR_VERSION_MINOR "6") +SET(LHDR_VERSION_PATCH "0") SET(LHDR_VERSION_STR_SUFFIX "") SET(LHDR_VERSION "${LHDR_VERSION_MAJOR}.${LHDR_VERSION_MINOR}.${LHDR_VERSION_PATCH}${LHDR_VERSION_STR_SUFFIX}") SET(LHDR_VENDOR "Luminance HDR Development Team") -SET(LHDR_COPYRIGHT_YEAR "2006-2017") +SET(LHDR_COPYRIGHT_YEAR "2006-2019") SET(LHDR_OSX_EXECUTABLE_NAME "${LHDR_NAME} ${LHDR_VERSION}") SET(LHDR_OSX_EXECUTABLE_TARGET "Luminance_HDR_${LHDR_VERSION}") diff -Nru luminance-hdr-2.5.1+dfsg/build_files/PackagingApple.cmake luminance-hdr-2.6.0/build_files/PackagingApple.cmake --- luminance-hdr-2.5.1+dfsg/build_files/PackagingApple.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/PackagingApple.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -1,34 +1,17 @@ set(CPACK_PACKAGE_CONTACT "Davide Anastasia ") -# set(CPACK_GENERATOR "DragNDrop") -# set(CPACK_DMG_FORMAT "UDBZ") -# set(CPACK_DMG_VOLUME_NAME "${LHDR_NAME} ${LHDR_VERSION}") -# set(CPACK_SYSTEM_NAME "OSX") -# set(CPACK_PACKAGE_FILE_NAME "${LHDR_NAME}-${LHDR_VERSION}") -# set(CPACK_PACKAGE_ICON "${ICONS_DIR}/DMG.icns") -# set(CPACK_DMG_DS_STORE "${ICONS_DIR}/DMGDSStore") -# set(CPACK_DMG_BACKGROUND_IMAGE "${ICONS_DIR}/DMGBackground.png") SET(plugin_dest_dir ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/PlugIns) SET(qtconf_dest_dir ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) SET(APPS "\${CMAKE_INSTALL_PREFIX}/${LHDR_OSX_EXECUTABLE_NAME}.app") -#-------------------------------------------------------------------------------- -# Install needed Qt plugins by copying directories from the qt installation -# One can cull what gets copied by using 'REGEX "..." EXCLUDE' -#install(DIRECTORY "${QT_PLUGINS_DIR}/sqldrivers" -# DESTINATION ${plugin_dest_dir} COMPONENT Runtime) -#install(FILES ${LIBS} -# DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS) - # install align_image_stack install(FILES ${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/align_image_stack + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE WORLD_EXECUTE DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS) # install help install(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) -#install(DIRECTORY ${CMAKE_SOURCE_DIR}/html -# DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) #install icons theme install(DIRECTORY ${CMAKE_SOURCE_DIR}/icons @@ -48,21 +31,10 @@ ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_SOURCE_DIR}/Changelog -# ${CMAKE_SOURCE_DIR}/BUGS -# ${CMAKE_SOURCE_DIR}/INSTALL -# ${CMAKE_SOURCE_DIR}/TODO DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app) # directories to look for dependencies set(DIRS ${QT_LIBRARY_DIRS}) -#INSTALL(CODE " -# file(GLOB_RECURSE QTPLUGINS -# \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") -# include(BundleUtilities) -# fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\") -# " COMPONENT Runtime) - -# create drag and drop installer -#set(CPACK_BINARY_DRAGNDROP ON) -#include(CPack) +# That's all Folks! +## diff -Nru luminance-hdr-2.5.1+dfsg/build_files/Packaging.cmake luminance-hdr-2.6.0/build_files/Packaging.cmake --- luminance-hdr-2.5.1+dfsg/build_files/Packaging.cmake 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/Packaging.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -1,18 +1,17 @@ MESSAGE(STATUS "Installation of ${LHDR_NAME} ${LHDR_VERSION} in ${CMAKE_INSTALL_PREFIX}") # Shared CPack Variables -set(CPACK_PACKAGE_NAME "${LHDR_NAME}") -set(CPACK_PACKAGE_DESCRIPTION "${LHDR_NAME} ${LHDR_VERSION}") +set(CPACK_PACKAGE_NAME "${LHDR_NAME}") +set(CPACK_PACKAGE_DESCRIPTION "${LHDR_NAME} ${LHDR_VERSION}") set(CPACK_PACKAGE_VERSION_MAJOR "${LHDR_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${LHDR_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${LHDR_VERSION_PATCH}") -set(CPACK_PACKAGE_VERSION "${LHDR_VERSION}") -set(CPACK_PACKAGE_VENDOR "${LHDR_VENDOR}") +set(CPACK_PACKAGE_VERSION "${LHDR_VERSION}") +set(CPACK_PACKAGE_VENDOR "${LHDR_VENDOR}") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") -set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README.md") -if(APPLE) -include(${CMAKE_SOURCE_DIR}/build_files/PackagingApple.cmake) -endif() +# That's all Folks! +## Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/align_image_stack and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/align_image_stack differ diff -Nru luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/create-dmg.sh.in luminance-hdr-2.6.0/build_files/platforms/macosx/create-dmg.sh.in --- luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/create-dmg.sh.in 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/platforms/macosx/create-dmg.sh.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -#!/bin/bash -# - -rm -fr "@CMAKE_INSTALL_PREFIX@/@LHDR_OSX_EXECUTABLE_NAME@.app" -rm -fr "@CMAKE_BINARY_DIR@/@LHDR_OSX_EXECUTABLE_NAME@.dmg" - -make install - -@Qt5Core_DIR@/../../../bin/macdeployqt "@CMAKE_INSTALL_PREFIX@/@LHDR_OSX_EXECUTABLE_NAME@.app" -always-overwrite -executable="@CMAKE_INSTALL_PREFIX@/@LHDR_OSX_EXECUTABLE_NAME@.app/Contents/MacOS/luminance-hdr-cli" - -hdiutil create -format UDBZ -megabytes 300 -verbose -srcfolder "@CMAKE_INSTALL_PREFIX@/@LHDR_OSX_EXECUTABLE_NAME@.app" "@CMAKE_BINARY_DIR@/@LHDR_OSX_EXECUTABLE_NAME@.dmg" diff -Nru luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Info.plist.in luminance-hdr-2.6.0/build_files/platforms/macosx/Info.plist.in --- luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Info.plist.in 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/platforms/macosx/Info.plist.in 2019-06-09 19:18:38.000000000 +0000 @@ -1,20 +1,28 @@ - - CFBundleIconFile - luminance.icns - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by Davide Anastasia <davideanastasia@users.sourceforge.net> - CFBundleSignature - ???? - CFBundleExecutable - @LHDR_OSX_EXECUTABLE_NAME@ - CFBundleIdentifier + + CFBundleIconFile + luminance.icns + CFBundlePackageType + APPL + CFBundleGetInfoString + Created by Davide Anastasia <davideanastasia@users.sourceforge.net> + CFBundleSignature + ???? + CFBundleExecutable + luminance-hdr + CFBundleIdentifier @LHDR_DOMAIN_SECOND@.@LHDR_DOMAIN_FIRST@ - NOTE - Created by Davide Anastasia <davideanastasia@users.sourceforge.net> - + CFBundleDisplayName + @LHDR_NAME@ + CFBundleName + @LHDR_NAME@ + LSMinimumSystemVersion + @CMAKE_OSX_DEPLOYMENT_TARGET@ + NSHighResolutionCapable + True + NOTE + Created by Davide Anastasia <davideanastasia@users.sourceforge.net> + Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libboost_filesystem.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libboost_filesystem.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libboost_system.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libboost_system.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libexiv2.0.27.0.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libexiv2.0.27.0.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libGLEW.2.1.0.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libGLEW.2.1.0.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libHalf.24.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libHalf.24.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libhuginbase.0.0.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libhuginbase.0.0.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libIex-2_3.24.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libIex-2_3.24.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libIexMath-2_3.24.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libIexMath-2_3.24.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libIlmImf-2_3.24.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libIlmImf-2_3.24.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libIlmThread-2_3.24.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libIlmThread-2_3.24.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libImath-2_3.24 2.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libImath-2_3.24 2.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libintl.8.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libintl.8.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libiomp5.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libiomp5.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libjpeg.9.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libjpeg.9.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/liblcms2.2.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/liblcms2.2.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libpano13.3.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libpano13.3.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libpng16.16.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libpng16.16.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libtiff.5.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libtiff.5.dylib differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/build_files/platforms/macosx/Libraries/libvigraimpex.11.1.11.1.dylib and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/build_files/platforms/macosx/Libraries/libvigraimpex.11.1.11.1.dylib differ diff -Nru luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/README.txt luminance-hdr-2.6.0/build_files/platforms/msys2/README.txt --- luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/platforms/msys2/README.txt 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,28 @@ +Begin by installing and updating MSYS2 using the instructions from the MSYS2 website http://www.msys2.org/ + +After installing MSYS2 execute the following commands in msys2 shell: + +pacman -S tar gzip nano make diffutils intltool git +pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake +pacman -S mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-qtwebkit mingw-w64-x86_64-libraw mingw-w64-x86_64-boost mingw-w64-x86_64-exiv2 mingw-w64-x86_64-openexr mingw-w64-x86_64-gsl mingw-w64-x86_64-cfitsio + +git clone https://github.com/LuminanceHDR/LuminanceHDR.git /c/code/lhdr +cd /c/code/lhdr +mkdir build +cd build + +Currently there is a version conflict in msys2 version of Qt5WebKit. +To fix (hack) it, open the file msys64\mingw64\lib\cmake\Qt5WebKit\Qt5WebKitConfig.cmake +Search for +find_dependency(Qt5Network 5.11.2 EXACT) +and change to +find_dependency(Qt5Network 5.12.0 EXACT) + +run the following commands in msys2 shell + +cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE="Release" .. +make install + +Now you should have a luminance-hdr.exe. +try running it using +Release-build/luminance-hdr diff -Nru luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/UpdateInfo.cmake luminance-hdr-2.6.0/build_files/platforms/msys2/UpdateInfo.cmake --- luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/UpdateInfo.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/platforms/msys2/UpdateInfo.cmake 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,86 @@ +# cmakefile executed within a makefile target + +# we look for the git command in this paths by order of preference +find_program(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) + +# 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}") + +# Numeric version only. Use it only if you have no choice, because it doesn't tell the branch or commit since tag +#execute_process(COMMAND ${GIT_CMD} describe --tags --always --abbrev=0 OUTPUT_VARIABLE GIT_DESCRIBE_NUMERIC OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") +#string(REGEX REPLACE "-.*" "" GIT_DESCRIBE_NUMERIC ${GIT_DESCRIBE_NUMERIC}) +set(GIT_NUMERIC_VERSION_ONLY "${LHDR_VERSION_MAJOR}.${LHDR_VERSION_MINOR}.${LHDR_VERSION_PATCH}") + +# 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: ${GIT_NUMERIC_VERSION_BS} (unreliable)") +message(STATUS " Numeric Version: ${GIT_NUMERIC_VERSION_ONLY} (unreliable)") + +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}/build_files/platforms/msys2/WindowsInnoSetup.iss.in" "${CMAKE_INSTALL_PREFIX}/WindowsInnoSetup.iss") diff -Nru luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/WindowsInnoSetup.iss.in luminance-hdr-2.6.0/build_files/platforms/msys2/WindowsInnoSetup.iss.in --- luminance-hdr-2.5.1+dfsg/build_files/platforms/msys2/WindowsInnoSetup.iss.in 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/build_files/platforms/msys2/WindowsInnoSetup.iss.in 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,190 @@ +; Script initially generated by the Inno Setup Script Wizard. +; Documentation: http://www.jrsoftware.org/ishelp/ +; +; 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. +; +; This script searches for and bundles all "luminance-hdr*.exe" files, allowing +; you to bundle GUI and CLI versions, a "release" as well as a "debug" version at the same time. +; At least one "luminance-hdr.exe" file is required. +; +; 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 "${LHDR_NAME}" +#define MyAppVersion "${GIT_DESCRIBE}" +#define MyAppVersionNumeric "${GIT_NUMERIC_VERSION_ONLY}" +#define MyAppPublisher "${LHDR_VENDOR}" +#define MyAppURL "http://qtpfsgui.sourceforge.net/" +#define MyAppExeName "luminance-hdr.exe" +#define MySourceBasePath "${PROJECT_SOURCE_DIR}" +#define MyBitDepth "${BUILD_BIT_DEPTH}" +#define MyTargetArchitecture "${ARCHITECTURE_ALLOWED}" +#define MyInstallMode "${INSTALL_MODE}" +#define MySystemName "${SYSTEM_NAME}" +#define MySourceLibsDir "${LIBSSRCDIR}" +#define MyBranch "${GIT_BRANCH}" +#define MyHuginBinPath "${HUGIN_BIN_DIR}" + +[Setup] +; 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={#MyAppName}{#MyAppVersion} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +VersionInfoVersion={#MyAppVersionNumeric} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={pf}\{#MyAppName}\{#MyAppVersion} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +LicenseFile=LICENSE +OutputDir=..\ +OutputBaseFilename=Luminance-HDR_{#MyBranch}_{#MyAppVersion}_{#MySystemName}_{#MyBitDepth} +SetupIconFile={#MySourceBasePath}\program-icons\luminance.ico +;WizardImageFile={#MySourceBasePath}\build_files\platforms\msys2\installerStrip.bmp +WizardImageBackColor=$2A2A2A +Compression=lzma +SolidCompression=yes +ArchitecturesAllowed={#MyTargetArchitecture} +ArchitecturesInstallIn64BitMode={#MyInstallMode} +PrivilegesRequired=none + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" +Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" +Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl" +Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl" +Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" +Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" +Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" +Name: "german"; MessagesFile: "compiler:Languages\German.isl" +Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl" +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: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" +Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" +Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" +Name: "serbiancyrillic"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl" +Name: "serbianlatin"; MessagesFile: "compiler:Languages\SerbianLatin.isl" +Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl" +Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" +Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +;Name: "desktopicon\common"; Description: "For all users"; GroupDescription: "Additional icons:"; Flags: exclusive +;Name: "desktopicon\user"; Description: "For the current user only"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 +;Name: regBrowseFolder; Description: "Add ""Browse with RawTherapee"" option to context menu when right-clicking on a folder."; GroupDescription: File extensions: + +[Files] +Source: "luminance-hdr*.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "hdrhtml\*"; DestDir: "{app}\hdrhtml\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "help\*"; DestDir: "{app}\help\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "i18n\*"; DestDir: "{app}\i18n\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "icons\*"; DestDir: "{app}\icons\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "sqldrivers\*"; DestDir: "{app}\sqldrivers\"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "AUTHORS"; DestDir: "{app}"; Flags: ignoreversion +Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion +Source: "Changelog"; DestDir: "{app}"; Flags: ignoreversion +Source: "README.md"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyHuginBinPath}/align_image_stack.exe"; DestDir: "{app}/hugin"; Flags: ignoreversion +Source: "{#MyHuginBinPath}/*.dll"; Excludes: "wx*.dll"; DestDir: "{app}/hugin"; Flags: ignoreversion + +;---- DLLs ! (the Qt5 plugins dll are already copied in the base path +Source: "{#MySourceLibsDir}\qt5concurrent.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5core.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5gui.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5network.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5printsupport.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5sql.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5webkitwidgets.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5widgets.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5winextras.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5xml.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5webkit.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5multimedia.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5multimediawidgets.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5xml.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5positioning.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5qml.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5quick.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5sensors.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5webchannel.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\qt5opengl.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libexiv2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libgsl-23.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libiex-2_*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libilmimf-2_*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\liblcms2-2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libpng16-16.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libraw-*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libwinpthread-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libgcc_s_seh-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libgomp-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libstdc++-6.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libiconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libgslcblas-0.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libhalf-2_*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libilmthread-2_*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libimath-2_*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libjasper-4.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\liblzma-5.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libicuin*.dll"; Excludes: "libicuind*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libicuuc*.dll"; Excludes: "libicuucd*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libpcre2-16-0.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libharfbuzz-0.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libicudt*.dll"; Excludes: "libicudtd*.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libgraphite2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libsqlite3-0.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libwebp-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libxslt-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libzstd.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libbz2-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libpcre-1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MySourceLibsDir}\libcfitsio-3.dll"; DestDir: "{app}"; Flags: ignoreversion + +;Source: "gdb.exe"; DestDir: "{app}"; Flags: skipifsourcedoesntexist ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName} {#MyAppVersion}}"; Filename: "{uninstallexe}" +;Name: "{commondesktop}\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\bin\{#MyAppExeName}"; Tasks: desktopicon +Name: "{commondesktop}\{#MyAppName} {#MyBranch} {#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 + +;[Registry] +;Root: HKCU; Subkey: "SOFTWARE\Classes\Directory\shell\Browse with RawTherapee"; ValueType: string; ValueData: "Browse with RawTherapee"; Flags: uninsdeletekey; Tasks: regBrowseFolder +;Root: HKCU; Subkey: "SOFTWARE\Classes\Directory\shell\Browse with RawTherapee\command"; ValueType: string; ValueData: "{app}\{#MyAppExeName} -w ""%1"""; Flags: uninsdeletekey; Tasks: regBrowseFolder diff -Nru luminance-hdr-2.5.1+dfsg/Changelog luminance-hdr-2.6.0/Changelog --- luminance-hdr-2.5.1+dfsg/Changelog 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/Changelog 2019-06-09 19:18:38.000000000 +0000 @@ -1,3 +1,14 @@ +Changes 2.6.0 +NEW: New tonemapping operator kimkautz08 +NEW: New tonemapping operator lischinski06 +NEW: New tonemapping operator vanhateren06 +NEW: New tonemapping operator ferwerda96 +NEW: Preview of created HDR in HDR Wizard +NEW: Post processing gamma and saturation +* great speedup and better memory usage for all tonemapping operators +* speedup for hdr creation +* usual bug fixing + Changes 2.5.1 NEW: Selectable threshold for adjusting levels NEW: Optional Lanczos interpolation @@ -32,7 +43,7 @@ NEW: switch to Transifex translation platform for current and future translations NEW: Windows: integration into the operating system (jumplist, progress bar) * HDR Creation with small UX improvements -* changed EXIF detection for the HDR creation +* changed EXIF detection for the HDR creation * switch to Qt5 * refactored code base for a future libHDR library * improved Debevec radiance map construction @@ -42,8 +53,8 @@ * Update libraries (in particular, LibRAW) * Support for TIFF 32 bit floating point (compatible with Adobe Lightroom 4) * Improved EXR, TIFF, JPEG and PNG I/O -* Improved color conversion routines -* NEW: Hugin's alignment: Autocrop feature (thanks to David Polk) +* Improved color conversion routines +* NEW: Hugin's alignment: Autocrop feature (thanks to David Polák) * NEW: Support additional demosaicing algorithms, AMaZE as default * NEW: Save HDR creation profiles * NEW: Copy EXIF tags to tonemapped images automatically @@ -80,14 +91,14 @@ * Corrected detection of exif rotation * Windows: TIFF support now works correctly (at all) * Windows: fixed some align_image_stack and temp dir problems -* Development: new module system -* Development: fixed help install and i18n path under Linux +* Development: new module system +* Development: fixed help install and i18n path under Linux Changes 2.2.0 * NEW: BatchHDR tool * NEW: LDRs can be saved as 16 bit Tiffs * NEW: Samsung(s) RAW file support -* NEW: Speed improvement due to OpenMP +* NEW: Speed improvement due to OpenMP * More speed improvements: tone-mapping (Mantiuk 06/08, Fattal, Reinhard) * NEW: image viewers with improved crop/selection tool * Improvement and optimised level and gamma control (new histogram) @@ -176,18 +187,18 @@ all: Fixes and optimization - see pfstmo ChangeLog for more information * Renamed reinhard04 to reinhard05 (src directory and references) * Improved linux packaging system: docs and html target directories can be specified - separately. + separately. Changes 1.9.2: * Fixed other bugs with non-ascii characters in paths/filenames. * Integrated pfstmo 1.2 changes: - fixed some serious bugs in the solver and subsampling procedure the artifacts found in - some odd-sized images should be gone (this was actually the mantiuk change in qtpfsgui - 1.9.0, thanks to Rafal). - Faster up-/down-sampling functions make the algorithm 25% faster. Thanks to Ed Brambley. - Performance improvements from Ed Brambley: lower memory consumption, faster solver, - Better convergence, additional scale parameter for the contrast equalization method. - (change in mantiuk parameters => new tmo file version + small changes in Fattal by Ed Brambley) + fixed some serious bugs in the solver and subsampling procedure the artifacts found in + some odd-sized images should be gone (this was actually the mantiuk change in qtpfsgui + 1.9.0, thanks to Rafal). + Faster up-/down-sampling functions make the algorithm 25% faster. Thanks to Ed Brambley. + Performance improvements from Ed Brambley: lower memory consumption, faster solver, + Better convergence, additional scale parameter for the contrast equalization method. + (change in mantiuk parameters => new tmo file version + small changes in Fattal by Ed Brambley) * Added support for align_image_stack commandline parameters and user language selection. * Global: added 2 new fields in the singleton qtpfsgui class: QStringList for align_image_stack options and a 2-chars ISO 639 language code for Qtpfsgui's user @@ -364,9 +375,9 @@ * updated icip06 exponent: 24->12 (it still seems to not work) :( 13-02-2007 Giuseppe Rota -* added initial raw image format input support in "Open Hdr..." - and in the "New Hdr..." wizard. - the raw import functionality is obtained via dcraw's code. +* added initial raw image format input support in "Open Hdr..." + and in the "New Hdr..." wizard. + the raw import functionality is obtained via dcraw's code. * added settings panel. * added KDE/GNOME desktop integration @@ -399,9 +410,9 @@ * fixed save ldr dialog (if no extension specified it uses the one belonging to the current ``filter'') * zoom in/out/original and fit to window enabled * the application now remembers the last used directory for - open/save hdr - load/save settings - load input exposures + open/save hdr + load/save settings + load input exposures 22-12-2006 Giuseppe Rota v1.4 @@ -413,9 +424,9 @@ * implemented loadsettings, savesettings, fromGui2Txt, fromTxt2Gui 20-12-2006 Giuseppe Rota -* Changed behaviour in the TMO dialog: - Combobox moved to the top of the preview image. - Clicking save you'll get the full (100%) input hdr tonemapped with current settings. +* Changed behaviour in the TMO dialog: + Combobox moved to the top of the preview image. + Clicking save you'll get the full (100%) input hdr tonemapped with current settings. * Cleared some pfs buffers when the TMO dialog gets closed. * Added a "Done!" label that shows up when the input ldr exposures have finished loading. diff -Nru luminance-hdr-2.5.1+dfsg/CMakeLists.txt luminance-hdr-2.6.0/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -1,6 +1,33 @@ -PROJECT("Luminance HDR") # luminance-hdr) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) -CMAKE_POLICY(SET CMP0043 OLD) +CMAKE_MINIMUM_REQUIRED(VERSION 3.3) +CMAKE_POLICY(SET CMP0025 NEW) +CMAKE_POLICY(SET CMP0043 NEW) +CMAKE_POLICY(SET CMP0054 NEW) +CMAKE_POLICY(SET CMP0053 NEW) +PROJECT("Luminance HDR") + +string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE) +if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(debug|release|relwithdebinfo|minsizerel)$") + message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +else() + message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n" + "CMAKE_BUILD_TYPE should be one of:\nDebug, Release, RelWithDebInfo, MinSizeRel") +endif() + +if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(release|minsizerel)$") + message(STATUS "Adding definitions: -DQT_NO_DEBUG_OUTPUT") + add_definitions("-DQT_NO_DEBUG_OUTPUT") +endif() + +# assume built-in pthreads on MacOS +IF(APPLE) + enable_language(CXX) + enable_language(C) + set(CMAKE_THREAD_LIBS_INIT "-lpthread") + set(CMAKE_HAVE_THREADS_LIBRARY 1) + set(CMAKE_USE_WIN32_THREADS_INIT 0) + set(CMAKE_USE_PTHREADS_INIT 1) + set(THREADS_PREFER_PTHREAD_FLAG ON) +ENDIF() # set include path for FindXXX.cmake files set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build_files/Modules") @@ -15,37 +42,46 @@ ADD_DEFINITIONS(-DTIMER_PROFILING) ENDIF() +# ======== Enable GNU gsl inline code ======= +IF(UNIX OR APPLE OR MINGW) # Visual Studio doesn't like this + ADD_DEFINITIONS(-DHAVE_INLINE ) +ENDIF() + # ======== Has branch prediction ======= include( CheckCXXSourceCompiles ) check_cxx_source_compiles( "int main() { int x = 0; if( __builtin_expect((x),0) ) x = 1; return 0; }" HAS_BRANCH_PREDICTION ) if( HAS_BRANCH_PREDICTION ) - set( BRANCH_PREDICTION 1 ) + set( BRANCH_PREDICTION 1 ) else( HAS_BRANCH_PREDICTION ) - set( BRANCH_PREDICTION 0 ) + set( BRANCH_PREDICTION 0 ) endif( HAS_BRANCH_PREDICTION ) # find and setup Qt5 for this project -# Tell CMake to run moc when necessary: - #set(CMAKE_AUTOMOC ON) - # As moc files are generated in the binary dir, tell CMake - # to always look for includes there: - #set(CMAKE_INCLUDE_CURRENT_DIR ON) - -find_package(Qt5Core REQUIRED) -find_package(Qt5Concurrent REQUIRED) -find_package(Qt5Widgets REQUIRED) -find_package(Qt5Gui REQUIRED) -find_package(Qt5WebEngineCore REQUIRED) -find_package(Qt5WebEngineWidgets REQUIRED) -find_package(Qt5Xml REQUIRED) -find_package(Qt5Sql REQUIRED) -find_package(Qt5Svg REQUIRED) -find_package(Qt5Network REQUIRED) -find_package(Qt5LinguistTools REQUIRED) -find_package(Qt5PrintSupport REQUIRED) +find_package(Qt5Core REQUIRED) +find_package(Qt5Concurrent REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5Gui REQUIRED) +# QtWebEngine is preferred web engine because QtWebKit is deprecated since Qt 5.5: +# https://wiki.qt.io/New-Features-in-Qt-5.5#Deprecated_Functionality. Unfortunately, +# some Qt distributions still provide QtWebKit instead of QtWebEngine. So first we +# try to find QtWebEngine and if not found, we fall back to QtWebKit. +find_package(Qt5WebEngineCore QUIET) +if(Qt5WebEngineCore_FOUND) + find_package(Qt5WebEngineWidgets REQUIRED) +else() + find_package(Qt5WebKit REQUIRED) + find_package(Qt5WebKitWidgets REQUIRED) + add_definitions(-DUSE_DEPRECATED_QTWEBKIT) +endif() +find_package(Qt5Xml REQUIRED) +find_package(Qt5Sql REQUIRED) +find_package(Qt5Svg REQUIRED) +find_package(Qt5Network REQUIRED) +find_package(Qt5LinguistTools REQUIRED) +find_package(Qt5PrintSupport REQUIRED) IF(WIN32) find_package(Qt5WinExtras) ENDIF() @@ -56,8 +92,16 @@ ENDIF(WIN32) set(LIBS ${LIBS} - ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} - ${QT_QTWEBENGINE_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) + ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} + ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) + +if(Qt5WebEngineCore_FOUND) + message(STATUS "Building with QtWebEngine") + set(LIBS ${LIBS} ${QT_QTWEBENGINE_LIBRARIES}) +else() + message(STATUS "Building with QtWebKit") + set(LIBS ${LIBS} ${QT_QTWEBKIT_LIBRARIES}) +endif() FIND_PACKAGE(Git) IF(GIT_FOUND) @@ -66,39 +110,54 @@ ENDIF() IF(WIN32) + # Windows Section # to not define min/max macros, which cause troubles with STL and boost ADD_DEFINITIONS(-DNOMINMAX) - - SET(LIBRAW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libraw") - SET(FFTWF_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/fftw3") - SET(LCMS2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/lcms2") - - # Enable multi processor compilation - ADD_DEFINITIONS(/MP) - - # Enable SSE2 - IF(CMAKE_SIZEOF_VOID_P EQUAL 4) - # SSE2 is on by default, on x64 platforms - ADD_DEFINITIONS(/arch:SSE2) + IF(MINGW) + find_package(PkgConfig) + pkg_check_modules(FFTW3F REQUIRED fftw3f) + SET(FFTWF_LIBRARIES "libfftw3f.a") + pkg_check_modules(LCMS REQUIRED lcms2>=2.6) + pkg_check_modules(LIBRAW REQUIRED libraw) + ADD_DEFINITIONS("-DDEMOSAICING_GPL2") + ADD_DEFINITIONS("-DDEMOSAICING_GPL3") + find_package(OpenMP) + IF(OPENMP_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas") + ENDIF() + FIND_PACKAGE(Eigen3 REQUIRED) + INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR}) + ELSE() + SET(LIBRAW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libraw") + SET(FFTWF_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/fftw3") + SET(LCMS2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/lcms2") + + # Enable multi processor compilation + ADD_DEFINITIONS(/MP) + + # Enable SSE2 + IF(CMAKE_SIZEOF_VOID_P EQUAL 4) + # SSE2 is on by default, on x64 platforms + ADD_DEFINITIONS(/arch:SSE2) + ENDIF() + + ADD_DEFINITIONS(-DUNICODE ) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_REENTRANT) + + SET(LIBRAW_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libraw/libraw.lib") + ADD_DEFINITIONS("-DDEMOSAICING_GPL2") + ADD_DEFINITIONS("-DDEMOSAICING_GPL3") + + SET(LCMS2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms2.lib") + ADD_DEFINITIONS(-DCMS_DLL) + ADD_DEFINITIONS(-DUSE_LCMS2) + + INCLUDE_DIRECTORIES(${LIBRAW_INCLUDE_DIR} "${LIBRAW_INCLUDE_DIR}/libraw") + INCLUDE_DIRECTORIES(${FFTWF_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) ENDIF() - - ADD_DEFINITIONS(-DUNICODE ) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_REENTRANT) - SET(FFTWF_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/fftw3/libfftw3f-3.lib") - - SET(LIBRAW_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libraw/libraw.lib") - ADD_DEFINITIONS("-DDEMOSAICING_GPL2") - ADD_DEFINITIONS("-DDEMOSAICING_GPL3") - - SET(LCMS2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms2.lib") - ADD_DEFINITIONS(-DCMS_DLL) - ADD_DEFINITIONS(-DUSE_LCMS2) - - INCLUDE_DIRECTORIES(${LIBRAW_INCLUDE_DIR} "${LIBRAW_INCLUDE_DIR}/libraw") - INCLUDE_DIRECTORIES(${FFTWF_INCLUDE_DIR}) - INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) ELSE() # Unix & Apple part FIND_PACKAGE(LibRAW REQUIRED) @@ -109,8 +168,10 @@ FIND_PACKAGE(lcms2 REQUIRED) INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) -ENDIF() + FIND_PACKAGE(Eigen3 REQUIRED) + INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR}) +ENDIF() IF(WIN32) SET(Boost_USE_STATIC_LIBS ON) @@ -210,58 +271,123 @@ ${LUMINANCE_HDR_RCCS_SRCS} ${LUMINANCE_QM}) -# Apple Mac OS X +# MacOSX IF(APPLE) - SET(CMAKE_INSTALL_PREFIX "/Applications") + SET(CMAKE_INSTALL_PREFIX ".") # Set Bundle settings - set(MACOSX_BUNDLE_INFO_STRING "${LHDR_NAME} ${LHDR_VERSION}") - set(MACOSX_BUNDLE_BUNDLE_VERSION "${LHDR_NAME} ${LHDR_VERSION}") - set(MACOSX_BUNDLE_LONG_VERSION_STRING "${LHDR_NAME} ${LHDR_VERSION}") + set(MACOSX_BUNDLE_INFO_STRING "${LHDR_NAME} ${LHDR_VERSION}") + set(MACOSX_BUNDLE_BUNDLE_VERSION "${LHDR_NAME} ${LHDR_VERSION}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "${LHDR_NAME} ${LHDR_VERSION}") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${LHDR_VERSION}") - set(MACOSX_BUNDLE_VERSION "${LHDR_VERSION}") - set(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/program-icons/luminance.icns") - set(MACOSX_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/program-icons/luminance.icns") - set(MACOSX_BUNDLE_RESOURCES "${CMAKE_CURRENT_BINARY_DIR}/${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources") - set(MACOSX_BUNDLE_GUI_IDENTIFIER "${LHDR_DOMAIN_SECOND}.${LHDR_DOMAIN_FIRST}") - set(MACOSX_BUNDLE_BUNDLE_NAME "${LHDR_NAME}") + set(MACOSX_BUNDLE_VERSION "${LHDR_VERSION}") + set(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/program-icons/luminance.icns") + set(MACOSX_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/program-icons/luminance.icns") + set(MACOSX_BUNDLE_RESOURCES "${CMAKE_CURRENT_BINARY_DIR}/${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "${LHDR_DOMAIN_SECOND}.${LHDR_DOMAIN_FIRST}") + set(MACOSX_BUNDLE_BUNDLE_NAME "${LHDR_NAME}") configure_file( ${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/Info.plist.in ${CMAKE_BINARY_DIR}/Info.plist ) - configure_file( ${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/create-dmg.sh.in - ${CMAKE_BINARY_DIR}/create-dmg.sh ) # icon files to copy in the bundle SET(OSX_ICON_FILES "${CMAKE_SOURCE_DIR}/program-icons/luminance.icns") # include the icns files in the target SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${OSX_ICON_FILES}) - # Build project - # SET( CMAKE_OSX_ARCHITECTURES x86_64;i386 ) # Universal build - ADD_EXECUTABLE(${LHDR_OSX_EXECUTABLE_TARGET} MACOSX_BUNDLE ${LUMINANCE_FILES}) # luminance-hdr + # Build project (bundle and luminance-hdr-cli) + SET( CMAKE_OSX_ARCHITECTURES x86_64 ) # Universal/Generic x86_64 build + ADD_EXECUTABLE(${LHDR_OSX_EXECUTABLE_TARGET} MACOSX_BUNDLE ${LUMINANCE_FILES}) + ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES} ) set_property(TARGET ${LHDR_OSX_EXECUTABLE_TARGET} PROPERTY OUTPUT_NAME ${LHDR_OSX_EXECUTABLE_NAME}) - ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) + set_property(TARGET luminance-hdr-cli PROPERTY RUNTIME_OUTPUT_DIRECTORY ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS) + # Mac bundle magic SET_TARGET_PROPERTIES( ${LHDR_OSX_EXECUTABLE_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist" ) # set where in the bundle to put the icns files - SET_SOURCE_FILES_PROPERTIES(${OSX_ICON_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + SET_SOURCE_FILES_PROPERTIES(${OSX_ICON_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) # set where in the bundle to put the translation files - SET_SOURCE_FILES_PROPERTIES(${LUMINANCE_QM} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/i18n) + SET_SOURCE_FILES_PROPERTIES(${LUMINANCE_QM} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/i18n) SET_SOURCE_FILES_PROPERTIES(${LUMINANCE_QT_QM} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/i18n) - INSTALL(TARGETS ${LHDR_OSX_EXECUTABLE_TARGET} luminance-hdr-cli - BUNDLE DESTINATION . COMPONENT Runtime - RUNTIME DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS COMPONENT Runtime) - - qt5_use_modules(${LHDR_OSX_EXECUTABLE_TARGET} Core Gui Widgets) - qt5_use_modules(luminance-hdr-cli Core Gui Widgets) - + # QT magic + TARGET_LINK_LIBRARIES(${LHDR_OSX_EXECUTABLE_TARGET} Qt5::Core Qt5::Gui Qt5::Widgets) + TARGET_LINK_LIBRARIES(luminance-hdr-cli Qt5::Core Qt5::Gui Qt5::Widgets) # Link libraries TARGET_LINK_LIBRARIES(${LHDR_OSX_EXECUTABLE_TARGET} ${LUMINANCE_MODULES_GUI} ${LIBS}) - TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) + TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) + + # Rename generated executable binary to luminance-hdr + add_custom_command( + TARGET ${LHDR_OSX_EXECUTABLE_TARGET} + POST_BUILD + COMMAND mv ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS/${LHDR_OSX_EXECUTABLE_NAME} ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS/luminance-hdr + ) + + # Copy align_image_stack into bundle/Contents/MacOS + FILE(COPY + ${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/align_image_stack + DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/MacOS + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE WORLD_EXECUTE + ) + + # Copy help/icons/hdrhtml and qt.conf to bundle resources + FILE(COPY "${CMAKE_SOURCE_DIR}/help" DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) + FILE(COPY "${CMAKE_SOURCE_DIR}/icons" DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) + FILE(COPY "${CMAKE_SOURCE_DIR}/hdrhtml" DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) + FILE(COPY "${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/qt.conf" + DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) + + # Copy Licence/README/Authors/Changelog to top of bundle + FILE(COPY + ${CMAKE_SOURCE_DIR}/AUTHORS + ${CMAKE_SOURCE_DIR}/README.md + ${CMAKE_SOURCE_DIR}/LICENSE + ${CMAKE_SOURCE_DIR}/Changelog + DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents + ) + + # Copy align_image_stack dependencies to bundle + FILE(COPY + ${CMAKE_SOURCE_DIR}/build_files/platforms/macosx/Libraries + DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents + ) + + # Install Boost libs + file(MAKE_DIRECTORY ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_SYSTEM_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_THREAD_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_CHRONO_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_DATE_TIME_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + file(COPY + ${Boost_ATOMIC_LIBRARY_RELEASE} DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Frameworks) + add_custom_command( + TARGET ${LHDR_OSX_EXECUTABLE_TARGET} + POST_BUILD + COMMAND install_name_tool -change libboost_system.dylib @rpath/libboost_system.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_thread.dylib @rpath/libboost_thread.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_program_options.dylib @rpath/libboost_program_options.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_chrono.dylib @rpath/libboost_chrono.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_date_time.dylib @rpath/libboost_date_time.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_atomic.dylib @rpath/libboost_atomic.dylib *.app/Contents/MacOS/luminance-hdr && + install_name_tool -change libboost_system.dylib @rpath/libboost_system.dylib *.app/Contents/Frameworks/libboost_chrono.dylib && + install_name_tool -change libboost_system.dylib @rpath/libboost_system.dylib *.app/Contents/Frameworks/libboost_thread.dylib && + install_name_tool -change libboost_system.dylib @rpath/libboost_system.dylib *.app/Contents/MacOS/luminance-hdr-cli && + install_name_tool -change libboost_thread.dylib @rpath/libboost_thread.dylib *.app/Contents/MacOS/luminance-hdr-cli && + install_name_tool -change libboost_program_options.dylib @rpath/libboost_program_options.dylib *.app/Contents/MacOS/luminance-hdr-cli && + install_name_tool -change libboost_chrono.dylib @rpath/libboost_chrono.dylib *.app/Contents/MacOS/luminance-hdr-cli && + install_name_tool -change libboost_date_time.dylib @rpath/libboost_date_time.dylib *.app/Contents/MacOS/luminance-hdr-cli && + install_name_tool -change libboost_atomic.dylib @rpath/libboost_atomic.dylib *.app/Contents/MacOS/luminance-hdr-cli) + # Unix ELSEIF(UNIX) SET(LUMINANCE_FILES ${LUMINANCE_FILES}) @@ -269,8 +395,8 @@ ADD_EXECUTABLE(luminance-hdr ${LUMINANCE_FILES}) ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) - qt5_use_modules(luminance-hdr Core Gui Widgets) - qt5_use_modules(luminance-hdr-cli Core Gui Widgets) + TARGET_LINK_LIBRARIES(luminance-hdr Qt5::Core Qt5::Gui Qt5::Widgets) + TARGET_LINK_LIBRARIES(luminance-hdr-cli Qt5::Core Qt5::Gui Qt5::Widgets) # link libraries TARGET_LINK_LIBRARIES(luminance-hdr -Xlinker --start-group ${LUMINANCE_MODULES_GUI} -Xlinker --end-group) @@ -285,32 +411,114 @@ #INSTALL(FILES ${LUMINANCE_QT_QM} DESTINATION share/luminance-hdr/i18n) # i18n INSTALL(FILES ${CMAKE_SOURCE_DIR}/program-icons/luminance-hdr.png DESTINATION share/icons/hicolor/48x48/apps) # icon - INSTALL(FILES ${CMAKE_SOURCE_DIR}/luminance-hdr.desktop DESTINATION share/applications) #desktop entry - INSTALL(FILES ${CMAKE_SOURCE_DIR}/luminance-hdr.appdata.xml DESTINATION share/appdata) #appstream + INSTALL(FILES ${CMAKE_SOURCE_DIR}/net.sourceforge.qtpfsgui.LuminanceHDR.desktop DESTINATION share/applications) #desktop entry + INSTALL(FILES ${CMAKE_SOURCE_DIR}/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml DESTINATION share/appdata) #appstream INSTALL(FILES ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_SOURCE_DIR}/Changelog - DESTINATION share/luminance-hdr) #info files + DESTINATION share/luminance-hdr/doc) #info files INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION share/luminance-hdr) # help directory INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/hdrhtml DESTINATION share/luminance-hdr) # hdrhtml directory # Microsoft Windows ELSEIF(WIN32) - # icon files to copy in the bundle - SET(LUMINANCE_FILES ${LUMINANCE_FILES} "${CMAKE_SOURCE_DIR}/program-icons/luminance_ico.rc") - - # Subsystem console: - ADD_EXECUTABLE(luminance-hdr WIN32 ${LUMINANCE_FILES}) - ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) - - qt5_use_modules(luminance-hdr Core Gui Widgets WinExtras Svg) - qt5_use_modules(luminance-hdr-cli Core Gui Widgets) - - # Link libraries - TARGET_LINK_LIBRARIES(luminance-hdr ${LUMINANCE_MODULES_GUI} ${LIBS}) - TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) - + IF(MINGW) + set (PROJECT_VERSION_MAJOR ${LHDR_VERSION_MAJOR}) + set (PROJECT_VERSION_MINOR ${LHDR_VERSION_MINOR}) + set (PROJECT_VERSION_PATCH ${LHDR_VERSION_PATCH}) + + find_program(ALIGN_IMAGE_STACK align_image_stack.exe HINTS "${HUGIN_BASE_PATH}" ENV Path ENV ProgramFiles ENV ProgramFiles(x86) PATH_SUFFIXES Hugin/bin bin) + # Fail if align_image_stack.exe can't be found + if (ALIGN_IMAGE_STACK STREQUAL ALIGN_IMAGE_STACK-NOTFOUND) + message(FATAL_ERROR "align_image_stack.exe command not found! Please install Hugin from https://sourceforge.net/projects/hugin/. For non standard base install directory, please define -DHUGIN_BASE_PATH:PATH=xxx in the cmake command line") + else () + message(STATUS "align_image_stack.exe command from Hugin install found: ${ALIGN_IMAGE_STACK}") + endif () + get_filename_component(HUGIN_BIN_DIR "${ALIGN_IMAGE_STACK}" DIRECTORY ABSOLUTE) + + # ------------------ 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() + + # ------------------------------------------------------------------------------------ + + get_target_property(QT_LOCATION Qt5::Core LOCATION) + get_filename_component(LIBS_SRC_DIR "${QT_LOCATION}" DIRECTORY) + message(STATUS "> Base libs dir: ${LIBS_SRC_DIR}") + get_filename_component(QT5_PLUGINS_SRC_DIR "${LIBS_SRC_DIR}/../share/qt5/plugins" ABSOLUTE) + message(STATUS "> Qt5 plugins libs: ${QT5_PLUGINS_SRC_DIR}") + + get_filename_component(PRGFILES_DIR "$ENV{ProgramFiles}" ABSOLUTE) + get_filename_component(PRGFILESX86_DIR "$ENV{ProgramFiles\(x86\)}" ABSOLUTE) + if((CMAKE_INSTALL_PREFIX STREQUAL "${PRGFILES_DIR}/Luminance HDR") OR (CMAKE_INSTALL_PREFIX STREQUAL "${PRGFILESX86_DIR}/Luminance HDR")) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}-build") + endif() + + set(RELINFO_WITH_ARGS ${CMAKE_COMMAND} + -DLHDR_NAME:STRING="${LHDR_NAME}" + -DLHDR_VERSION_MAJOR:STRING=${LHDR_VERSION_MAJOR} + -DLHDR_VERSION_MINOR:STRING=${LHDR_VERSION_MINOR} + -DLHDR_VERSION_PATCH:STRING=${LHDR_VERSION_PATCH} + -DLHDR_VENDOR:STRING=${LHDR_VENDOR} + -DPROJECT_SOURCE_DIR:STRING="${PROJECT_SOURCE_DIR}" + -DSYSTEM:STRING=Windows + -DLIBSSRCDIR:STRING="${LIBS_SRC_DIR}" + -DCMAKE_INSTALL_PREFIX:STRING="${CMAKE_INSTALL_PREFIX}" + -DBIT_DEPTH:STRING="${CMAKE_SIZEOF_VOID_P}" + -DHUGIN_BIN_DIR:STRING="${HUGIN_BIN_DIR}" + -P "${PROJECT_SOURCE_DIR}/build_files/platforms/msys2/UpdateInfo.cmake") + + add_custom_target(prepare_setup + COMMAND ${RELINFO_WITH_ARGS} + COMMENT "Creating ReleaseInfo and InnoSetup file") + + # icon files to copy in the bundle + SET(LUMINANCE_FILES ${LUMINANCE_FILES} "${CMAKE_SOURCE_DIR}/program-icons/luminance_ico.rc") + + # Subsystem console: + ADD_EXECUTABLE(luminance-hdr WIN32 ${LUMINANCE_FILES}) + ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) + + TARGET_LINK_LIBRARIES(luminance-hdr Qt5::Core Qt5::Gui Qt5::Widgets Qt5::WinExtras Qt5::Svg) + TARGET_LINK_LIBRARIES(luminance-hdr-cli Qt5::Core Qt5::Gui Qt5::Widgets) + + # link libraries + TARGET_LINK_LIBRARIES(luminance-hdr -Xlinker --start-group ${LUMINANCE_MODULES_GUI} -Xlinker --end-group) + TARGET_LINK_LIBRARIES(luminance-hdr-cli -Xlinker --start-group ${LUMINANCE_MODULES_CLI} -Xlinker --end-group) + TARGET_LINK_LIBRARIES(luminance-hdr ${LIBS}) + TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LIBS}) + + INSTALL(TARGETS luminance-hdr RUNTIME DESTINATION ./) # main GUI exec + INSTALL(TARGETS luminance-hdr-cli RUNTIME DESTINATION ./) # main CLI exec + INSTALL(FILES ${LUMINANCE_QM} DESTINATION ./i18n) # i18n + #INSTALL(FILES ${LUMINANCE_QT_QM} DESTINATION ./i18n) # i18n + + INSTALL(FILES ${QT5_PLUGINS_SRC_DIR}/imageformats/qjpeg.dll DESTINATION ./imageformats/) + INSTALL(FILES ${QT5_PLUGINS_SRC_DIR}/imageformats/qsvg.dll DESTINATION ./imageformats/) + INSTALL(FILES ${QT5_PLUGINS_SRC_DIR}/platforms/qwindows.dll DESTINATION ./platforms/) + INSTALL(FILES ${QT5_PLUGINS_SRC_DIR}/sqldrivers/qsqlite.dll DESTINATION ./sqldrivers/) + + INSTALL(FILES ${CMAKE_SOURCE_DIR}/program-icons/luminance-hdr.png DESTINATION ./icons/hicolor/48x48/apps) # icon + INSTALL(FILES ${CMAKE_SOURCE_DIR}/AUTHORS + ${CMAKE_SOURCE_DIR}/README.md + ${CMAKE_SOURCE_DIR}/LICENSE + ${CMAKE_SOURCE_DIR}/Changelog + DESTINATION ./) #info files + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/icons DESTINATION ./) # icons directory + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION ./) # help directory + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/hdrhtml DESTINATION ./) # hdrhtml directory + ELSE() + # Link libraries + TARGET_LINK_LIBRARIES(luminance-hdr ${LUMINANCE_MODULES_GUI} ${LIBS}) + TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) + ENDIF() ENDIF() # Packaging must go at the bottom diff -Nru luminance-hdr-2.5.1+dfsg/debian/changelog luminance-hdr-2.6.0/debian/changelog --- luminance-hdr-2.5.1+dfsg/debian/changelog 2018-07-17 13:00:40.000000000 +0000 +++ luminance-hdr-2.6.0/debian/changelog 2019-06-06 15:52:41.000000000 +0000 @@ -1,339 +1,164 @@ -luminance-hdr (2.5.1+dfsg-3build2) cosmic; urgency=medium +luminance-hdr (2.6.0-1dhor~cosmic) cosmic; urgency=medium - * No-change rebuild for boost soname change. + * NEW: New tonemapping operator kimkautz08 + * NEW: New tonemapping operator lischinski06 + * NEW: New tonemapping operator vanhateren06 + * NEW: New tonemapping operator ferwerda96 + * NEW: Preview of created HDR in HDR Wizard + * NEW: Post processing gamma and saturation + * great speedup and better memory usage for all tonemapping operators + * speedup for hdr creation + * usual bug fixing + + -- Dariusz Duma Thu, 06 Jun 2019 17:52:41 +0200 + +luminance-hdr (2.5.1-1dhor~xenial) xenial; urgency=medium + + * NEW: Selectable threshold for adjusting levels + * NEW: Optional Lanczos interpolation + * NEW: Antialiased display of images + * NEW: Navigation of images in fullscreen + * NEW: Online documentation + * many fixes in HDR creation for all profiles + * minor cosmetic fixes to the UI + + -- Dariusz Duma Wed, 10 May 2017 18:00:49 +0200 + +luminance-hdr (2.5.0-1dhor~xenial) xenial; urgency=medium + + * NEW: New tonemapping operator ferradans11 + * NEW: New tonemapping operator mai11 + * NEW: Export to HTML (Create a webpage with embedded HDR viewer) + * NEW: Optional automatic adjustment of LDRs levels + * NEW: New UI "Dark Theme" + * NEW: Switch UI Full Screen (F11), show LDRs and HDRs Full Screen (F10) + * NEW: Portuguese (Brazil) translation + * Fix various crashes + * greater EV values range in HdrWizard + * better printing support and print preview in HelpBrowser + * restore load/save curves in HdrWizard + + -- Dariusz Duma Mon, 10 Apr 2017 00:18:36 +0200 + +luminance-hdr (2.4.1-1dhor~xenial) xenial; urgency=medium + + * 2.4.1 + + -- Dariusz Duma Thu, 09 Mar 2017 07:30:48 +0100 + +luminance-hdr (2.4.0-2dhor~trusty) trusty; urgency=low + + * NEW: Automatic anti-ghosting and improved manual anti-ghosting + * NEW: FITS Importer to merge and tonemap astronomic images + * NEW: Automatic white-balance for both HDRs and LDRs + * NEW: switch to Transifex translation platform for current and future translations + * HDR Creation with small UX improvements + * changed EXIF detection for the HDR creation + * switch to Qt5 + * refactored code base for a future libHDR library + * improved Debevec radiance map construction + + + -- Dariusz Duma Tue, 28 Jan 2014 06:31:28 +0100 + +luminance-hdr (2.3.1-1dhor~trusty) trusty; urgency=low + + * Automatically Update Checker + * Update libraries (in particular, LibRAW) + * Support for TIFF 32 bit floating point (compatible with Adobe Lightroom 4) + * Improved EXR, TIFF, JPEG and PNG I/O + * Improved color conversion routines + * NEW: Hugin's alignment: Autocrop feature (thanks to David Polak) + * NEW: Support additional demosaicing algorithms, AMaZE as default + * NEW: Save HDR creation profiles + * NEW: Copy EXIF tags to tonemapped images automatically + * NEW: Portable mode + * NEW: Testing realtime previews (beta functionality) + * Anti-ghosting working again + * Speed improvements to various TMO algorithms + * Speed improvements to merge algorithms + * New Danish translation + + -- Dariusz Duma Mon, 08 Apr 2013 11:08:47 +0200 + +luminance-hdr (2.3.0-1dhor~trusty) trusty; urgency=low + + * New Fattal02 solver based on FFT (thanks to Tino Kluge) + * Port of color management system to LCMS2 + * Improved fit between saved files and preview + * UI improvements (tonemapping warning dialog) + * Update translations + * Bug fixes + * NEW: colour management system - the new colour management system allows to + load colour profile for screen and printer so that users can double-check + the final quality of their HDR images before being saved to JPEG or PNG + * Windows: new task bar progress report + * Improved load/save of calculated profile for the merge operator + * Improved JPG, PNG and TIFF reader and writer + + -- Dariusz Duma Fri, 06 Jul 2012 20:21:27 +0200 + +luminance-hdr (2.2.1-1dhor~trusty) trusty; urgency=low + + * NEW: splitted executable luminance-hdr-cli for commandline mode + * Aborting Batch HDR creation and batch tonemapping is now possible + * Speed improvements in Reinhard05 + * Language change without restarting application + * Corrected detection of exif rotation + * Development: new module system + * Development: fixed help install and i18n path under Linux + + + -- Dariusz Duma Sun, 25 Mar 2012 11:14:27 +0200 + +luminance-hdr (2.2.0-1dhor~trusty) trusty; urgency=low + + * NEW: BatchHDR tool + * NEW: LDRs can be saved as 16 bit Tiffs + * NEW: Samsung(s) RAW file support + * NEW: Speed improvement due to OpenMP + * More speed improvements: tone-mapping (Mantiuk 06/08, Fattal, Reinhard) + * NEW: image viewers with improved crop/selection tool + * Improvement and optimized level and gamma control (new histogram) + * Improved UI: Tonemapping Panel, Preference Dialog and Mainwindow + * Revert HDR merge algorithms to Qtpfsgui 1.8.12 + * Supporting better portrait HDRs + * Better support for filesystem character encoding + * Library updates: Qt, LibRaw 0.14.5, exiv2 + * Updated translations (Italian, German, Romanian) + * Development: changing build system from qmake to cmake + * Development: update Windows building scripts + * Development: migration from SVN to Git + * Development: support for FreeBSD9 + + -- Dariusz Duma Sat, 04 Feb 2012 10:09:39 +0100 + +luminance-hdr (2.1.0-9dhor~trusty) trusty; urgency=low + + * Removed LIBRAW_FILTERING_AUTOMATIC for compability with libraw 0.14 + + -- Dariusz Duma Mon, 17 Oct 2011 07:02:38 +0200 + +luminance-hdr (2.1.0-7dhor~trusty) trusty; urgency=low + + * Merge MainWindow and TonemappingWindow + * MainWindow works using the SDI concept, instead then MDI (multiple MainWindow can be open at the same time and work in parallel) + * Tabbed images (HDR or LDR) inside the MainWindow + * New preview widget (PreviewPanel) + * Improved HDR creation Wizard (images can be removed and added) + * Improved Batch Tonemapping: the final size of the tonemapping is read from file, allowing custom output size + * New I/O engine (runs in a separated thread and shows the status during the operation) + * Improved RAW conversion + * Improved Help + + -- Dariusz Duma Thu, 25 Aug 2011 11:40:16 +0200 + +luminance-hdr (2.0.2-1dhor~trusty) trusty; urgency=low + + * Smaller memory footprint during the TM process + * libRaw is now in charge to convert RAW files, removing the dependency from dcraw as an external tool + * Huge memory leak during the HDR creation process has been sorted out. + * Huge clean of compilation errors and wrong memory allocation/release (Thanks to Elizabeth Oldham) + * Multithread support is active again and improved - -- Matthias Klose Tue, 17 Jul 2018 13:00:40 +0000 - -luminance-hdr (2.5.1+dfsg-3build1) cosmic; urgency=medium - - * No-change rebuild against latest openexr - - -- Jeremy Bicha Fri, 11 May 2018 14:11:20 -0400 - -luminance-hdr (2.5.1+dfsg-3) unstable; urgency=low - - * Upload to unstable. - * [lintian] Drop trailing whitespace in changelog. - - -- Andreas Metzler Sat, 10 Feb 2018 14:19:41 +0100 - -luminance-hdr (2.5.1+dfsg-2) experimental; urgency=medium - - [ Andreas Metzler ] - * Sync priorities with override file (extra -> optional). - - [ Leonardo Montecchi ] - * Apply upstream patch to use QtWebKit instead of QtWebEngine - - -- Andreas Metzler Sun, 07 Jan 2018 15:08:54 +0100 - -luminance-hdr (2.5.1+dfsg-1) experimental; urgency=low - - [ Leonardo Montecchi ] - * New upstream release - * Repack sources to remove unused folder 'hdrhtml/hdrhtml_hdrlabs_templ/' - containing compiled .js without source - * Add get-orig-source target to debian/rules - * 60_hdrhtml_locale.diff: Fix locale issue in export to HTML feature - * Update 20_usrsharedoc.diff: Revert putting the hdrhtml folder under - /usr/doc as it is not part of the documentation - - [ Andreas Metzler ] - * Drop unused b-d on libqt5webkit5-dev. - * Repacked source -> use +dfsg version and set dvervsionmangle in watchfile. - * Handle +dfsg suffix in get-orig-source target. - * Use xz compression for repacked source. - * Drop qtpfsgui transition package. Closes: #878689 - - -- Andreas Metzler Thu, 19 Oct 2017 19:34:05 +0200 - -luminance-hdr (2.4.0-9) unstable; urgency=medium - - * Pass non-empty argument to pod2man's --release option as required by perl - 5.24. Closes: #839372 - * Drop debian/menu. - * Build with hardening=+all. - - -- Andreas Metzler Sat, 01 Oct 2016 19:43:05 +0200 - -luminance-hdr (2.4.0-8) unstable; urgency=medium - - * Move Vcs-* from git/http to https. - * 52_drop_Qt5Declarative_dep.diff / debian/control: Drop unused - build-dependency on qtquick1-5-dev. Closes: #810627 - - -- Andreas Metzler Sat, 16 Jan 2016 12:03:49 +0100 - -luminance-hdr (2.4.0-7) unstable; urgency=medium - - [ Bas Couwenberg ] - * Update build dependencies for GSL 2, change libgsl0-dev to libgsl-dev. - Closes: #807209 - - [ Andreas Metzler ] - * [lintian] Fix typo in debian/copyright. - - -- Andreas Metzler Mon, 07 Dec 2015 08:11:55 +0100 - -luminance-hdr (2.4.0-6) unstable; urgency=medium - - * 51_qt5_printsupport.diff: Fix build error with newer QT. Closes: #763224 - - -- Andreas Metzler Tue, 30 Sep 2014 18:32:29 +0200 - -luminance-hdr (2.4.0-5) unstable; urgency=medium - - * Add build-dependency on pkg-config. (Thanks, Pino Toscano) - Closes: #759115 - * Enable parallel build. (Thanks, Pino Toscano) - Closes: #759119 - - -- Andreas Metzler Sat, 06 Sep 2014 15:05:38 +0200 - -luminance-hdr (2.4.0-4) unstable; urgency=medium - - * Upload to unstable. - - -- Andreas Metzler Tue, 15 Apr 2014 19:09:29 +0200 - -luminance-hdr (2.4.0-3) experimental; urgency=medium - - [ Leonardo Montecchi ] - * Requires cmake 2.8.11, bump build-depends. - * 50_fix_build_kfreebsd-amd64.diff: Workaround for FTBFS on kfreebsd-amd64. - - -- Andreas Metzler Sat, 12 Apr 2014 12:56:18 +0200 - -luminance-hdr (2.4.0-2) experimental; urgency=medium - - * 40_donotforce_sse.diff: Stop setting -msse2 -msse to fix build error on - non-x86 archs. - - -- Andreas Metzler Sun, 06 Apr 2014 18:39:33 +0200 - -luminance-hdr (2.4.0-1) experimental; urgency=low - - [ Andreas Metzler ] - * New upstream version (2.4.0). - + add build-depends on libboost-dev. - * Version build dep on qttools5-dev >= 5.2.1-7 because of #738196. - * Point Vcs-* to anonscm.d.o. - - [ Leonardo Montecchi ] - * New upstream version (2.4.0) - * Updated build-dependencies and dependencies to Qt5. - * Add build-dependency on libboost-program-options-dev - * Add build-dependency on libccfits-dev - * Refresh patch 20_usrsharedoc.diff - * Updated manpage for luminance-hdr-cli - * Added patch 30_fixiconpath.diff, fixes installation path of icon - according to its size. - - [ Lisandro Damián Nica ] - * Build-Depend on specific qt submodules instead of libqt5-dev. - * Select QT5 by adding export QT_SELECT := qt5 to debian/rules. - - -- Andreas Metzler Sat, 05 Apr 2014 13:31:56 +0200 - -luminance-hdr (2.3.0-3) unstable; urgency=low - - [ Leonardo Montecchi ] - * Added dependency on hugin-tools, needed for align_image_stack. - (LP: #420157) - * Added manpage for luminance-hdr-cli (created from the output of - 'luminance-hdr-cli -h') - - -- Andreas Metzler Sat, 12 Jan 2013 11:07:05 +0100 - -luminance-hdr (2.3.0-2) unstable; urgency=low - - * Upload to unstable. - - -- Andreas Metzler Sat, 03 Nov 2012 09:09:25 +0100 - -luminance-hdr (2.3.0-1) experimental; urgency=low - - [ Leonardo Montecchi ] - * New upstream release - * Dropped patch 30_fix_build_non_x86 which is now in upstream code - * Modified patch 20_usrsharedoc.diff which did not apply - * Add build-dependency on libpng-dev. - * Build-depend on libtiff-dev instead of libtiff4-dev. - - [ Andreas Metzler ] - * Add build-dependencies on liblcms2-dev and libjpeg-dev. (These are - already pulled in by libraw-dev and libtiff(4)-dev respectively but are - directly required by luminance-hdr, too.) - * Update debian/copyright. - - -- Andreas Metzler Sat, 14 Jul 2012 10:59:32 +0200 - -luminance-hdr (2.2.1-3) unstable; urgency=low - - * Upload to unstable. - - -- Andreas Metzler Sat, 02 Jun 2012 08:22:02 +0200 - -luminance-hdr (2.2.1-2) experimental; urgency=low - - [ Leonardo Montecchi ] - * Added patch from upstream code, fixes compilation on non-x86 - architectures: - - 30_fix_build_non_x86 - - -- Andreas Metzler Fri, 25 May 2012 20:13:41 +0200 - -luminance-hdr (2.2.1-1) experimental; urgency=low - - * Team upload. - * Switch to new upstream name luminance-hdr. Closes: #622240,#563401 - (LP: #649647) - * Use 3.0 (quilt) format. - * Drop patches which do not apply (20_gcc4.3_includes - 30_fix_documentation_search_path 40_fix_desktop_file_icon 50_disable_opts - 60_fix_segfault_536666), update 10_remove_encoding_from_desktop_file. - * Update build-depends, adding cmake (>= 2.6.0), libqtwebkit-dev, - libraw-dev, libgsl0-dev. - * [20_usrsharedoc.diff] install to and search for docs in - /usr/share/doc/luminance-hdr instead if /usr/share/luminance-hdr. Strip - down debian/rules, this is now basically vanilla cmake. - * Provide empty qtpfsgui transitional package to faciliate automatic - upgrades. - * Use dh v9 level. - * Enable building with bindnow and -Wl,--as-needed. - * Add dependency on libqt4-sql-sqlite. - * Do not ship unused jquery copy. - * Register manual with doc-base. - * Adopt package. Closes: #646315 - - -- Andreas Metzler Mon, 14 May 2012 20:23:46 +0200 - -qtpfsgui (1.9.3-1.1) unstable; urgency=low - - * Non-maintainer upload. - * Fixing segmentation fault when saving a HDR image (closes: #536666). - - -- Giovanni Mascellani Mon, 30 Aug 2010 23:08:43 +0200 - -qtpfsgui (1.9.3-1) unstable; urgency=low - - [ Cyril Brulebois ] - * New upstream release (Closes: #530766). - * debian/copyright: - - Update accordingly. - * debian/patches: - - Get rid of timestamps. - * Merge changes from experimental. - * Update my address in the manpage too. - * ACK the following patches by fabo, thanks! - * Add dcraw to Depends, since this tool is needed, although not - mentioned as a dependency in the upstream docs. Thanks to fabo - again. - * Add patch to disable some (new) default optimisations: openmp and - sse2, because I'm not sure they are available on all platforms: - - 50_disable_opts - * debian/control: - - Update Standards-Version from 3.8.0 to 3.8.1 (no changes needed). - * Switch from cdbs to plain debhelper: - - Update compat from 5 to 7. - - B-D to debhelper (>= 7.0.50) to be able to use overrides. - - Use debian/docs and debian/manpages to control dh_* accordingly. - - Rework debian/rules. - - Drop cdbs from B-D. - - [ Fathi Boudra ] - * Add patch to fix documentation search path on Debian system: - - 30_fix_documentation_search_path - * Add patch to fix desktop file icon (Closes: #509305): - - 40_fix_desktop_file_icon - - -- Cyril Brulebois Sun, 07 Jun 2009 13:35:47 +0200 - -qtpfsgui (1.9.2-1) experimental; urgency=low - - * New upstream release. - * debian/copyright: - - Update accordingly. - - Update my mail address, copyright years. - * debian/control: - - Update my mail address. - - Bump Standards-Version from 3.7.3 to 3.8.0 (no changes needed). - - -- Cyril Brulebois Mon, 01 Dec 2008 04:32:14 +0100 - -qtpfsgui (1.9.1-1) unstable; urgency=low - - * New upstream release. - * Drop merged-upstream (or cherrypicked-from-upstream) patches: - - 30_align_image_stack_prefix. - - 40_fix_exiv2_encoding_support. - - -- Cyril Brulebois Fri, 07 Mar 2008 23:23:55 +0100 - -qtpfsgui (1.9.0-3) unstable; urgency=low - - * Add patch to fix encoding troubles with operations on exiv2 data, - cherry-picked from upstream, revision 262 (Closes: #460718): - - 40_fix_exiv2_encoding_support. - - -- Cyril Brulebois Tue, 05 Feb 2008 22:01:58 +0100 - -qtpfsgui (1.9.0-2) unstable; urgency=low - - * Special thanks to Julien Valroff, who reported the following bugs, - along with some patches. - * Added patch to allow the use of Hugin's align_image_stack again; its - inclusion is pending upstream (Closes: #460716): - - 30_align_image_stack_prefix. - * Fix the link to embedded documentation: qtpfsgui/doc -> doc/qtpfsgui - (Closes: #460944). - - -- Cyril Brulebois Sat, 26 Jan 2008 14:27:52 +0100 - -qtpfsgui (1.9.0-1) unstable; urgency=low - - * New upstream release. - * Replace “COPYING” with “LICENSE” in the NOT_NEEDED variable of - debian/rules, following upstream's renaming. - * Update debian/links accordingly. - * Delete the matching TODO item since there's no longer needed to have a - patched (with HTML tags) license file to get a correct display in the - “License agreement” tab. - * Update the gcc4.3 patch (drop the hunk touching src/Libpfs/pfs.cpp): - - 20_gcc4.3_includes. - * Add a link from /usr/share/qtpfsgui/html to the HTML documentation - under /usr/share/doc/qtpfsgui/html since the former is used at runtime - to display the manual. - - -- Cyril Brulebois Sun, 06 Jan 2008 04:39:36 +0100 - -qtpfsgui (1.8.12-2) unstable; urgency=low - - * Move maintenance to pkg-phototools now that the team has been created - on alioth: Maintainer set to the team, put myself in Uploaders. - * Update Vcs-* accordingly. - * Add a “lrelease-qt4” call in the “makebuilddir” target, so that - localization files get built, and then later installed. Delete the - generated files in the “clean” target. Use a stamp file to avoid - double-run. - * No longer “rmdir” the /usr/share/qtpfsgui directory since it is no - longer empty. - * Add a link (through debian/links) from /usr/share/qtpfsgui/COPYING to - GPL-2 in common-licenses, since it is used in the “License agreement” - tab. Add a TODO item accordingly (upstream uses HTML
 tags to
-    format it).
-  * Add patch to fix FTBFS with gcc 4.3 snapshots:
-     - 20_gcc4.3_includes.
-  * Add a minimal manpage generated from debian/qtpfsgui.pod using
-    pod2man.
-
- -- Cyril Brulebois   Sat, 22 Dec 2007 18:12:19 +0100
-
-qtpfsgui (1.8.12-1) unstable; urgency=low
-
-  * Initial release (Closes: #410655).
-  * The following patch removes the unneeded “Encoding” key from the
-    upstream desktop file:
-     - 10_remove_encoding_from_desktop_file.
-
- -- Cyril Brulebois   Fri, 14 Dec 2007 02:46:03 +0100
+ -- Dariusz Duma   Tue, 27 Apr 2011 07:45:36 +0100
diff -Nru luminance-hdr-2.5.1+dfsg/debian/compat luminance-hdr-2.6.0/debian/compat
--- luminance-hdr-2.5.1+dfsg/debian/compat	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/compat	2019-06-06 15:52:41.000000000 +0000
@@ -1 +1 @@
-9
+10
\ No newline at end of file
diff -Nru luminance-hdr-2.5.1+dfsg/debian/control luminance-hdr-2.6.0/debian/control
--- luminance-hdr-2.5.1+dfsg/debian/control	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/control	2019-06-06 15:52:41.000000000 +0000
@@ -1,40 +1,33 @@
 Source: luminance-hdr
 Section: graphics
-Priority: optional
-Maintainer: Debian PhotoTools Maintainers 
-Uploaders: Andreas Metzler ,
- Leonardo Montecchi 
-Build-Depends: cmake (>= 2.8.11), debhelper (>= 9), libboost-dev,
- libboost-program-options-dev, libccfits-dev, libexiv2-dev, libfftw3-dev,
- libgsl-dev, libjpeg-dev, liblcms2-dev, libopenexr-dev, libpng-dev,
- libraw-dev, libtiff-dev, pkg-config, qtbase5-dev,
- qtdeclarative5-dev, qtscript5-dev,
- qttools5-dev (>= 5.2.1-7), qttools5-dev-tools,
- libqt5webkit5-dev, libboost-thread-dev, libboost-chrono-dev,
- libboost-system-dev, libboost-date-time-dev, libqt5svg5-dev
-Standards-Version: 4.1.1
+Priority: extra
+Maintainer: Dariusz Duma 
+Build-Depends: debhelper (>= 7.0.50~), 
+	qttools5-dev, 
+	qttools5-dev-tools, 
+	cmake, 
+	qtdeclarative5-dev, 
+	libqt5webkit5-dev, 
+	libexiv2-dev, 
+	libopenexr-dev, 
+	libfftw3-dev, 
+	libtiff5-dev | libtiff-dev, 
+	libraw-dev,
+	libqt5svg5-dev, 
+	libgsl0-dev, 
+	libpng12-dev | libpng-dev, 
+	libboost-all-dev, 
+	libccfits-dev,
+	libeigen3-dev
+Standards-Version: 4.1.2
 Homepage: http://qtpfsgui.sourceforge.net/
-Vcs-Browser: https://anonscm.debian.org/git/pkg-phototools/luminance-hdr.git
-Vcs-Git: https://anonscm.debian.org/git/pkg-phototools/luminance-hdr.git
+#Vcs-Git: git://git.debian.org/collab-maint/luminance.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/luminance.git;a=summary
 
 Package: luminance-hdr
 Architecture: any
-Depends: dcraw, hugin-tools, libqt5sql5-sqlite,
- ${shlibs:Depends}, ${misc:Depends}
-Description: graphical user interface providing a workflow for HDR imaging
- Features:
-  * Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
-    16bit, RAW) of the same scene taken at different exposure setting.
-  * Save and load HDR images.
-  * Rotate and resize HDR images.
-  * Tonemap HDR images.
-  * Copy exif data between sets of images.
- .
- Supported HDR formats:
-  * OpenEXR (extension: exr).
-  * Radiance RGBE (extension: hdr).
-  * Tiff formats: 16bit, 32bit (float) and LogLuv (extension: tiff).
-  * Raw image formats (extension: various).
-  * PFS native format (extension: pfs).
- .
- Supported LDR formats: JPEG, PNG, PPM, PBM, TIFF (8 bit).
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: HDR image creator
+ Luminance HDR is a graphical user interface (qt5) that
+ provides a workflow for HDR imaging.
+
diff -Nru luminance-hdr-2.5.1+dfsg/debian/copyright luminance-hdr-2.6.0/debian/copyright
--- luminance-hdr-2.5.1+dfsg/debian/copyright	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/copyright	2011-03-22 06:45:39.000000000 +0000
@@ -1,1052 +1,37 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: Luminance HDR
-Upstream-Contact: Davide Anastasia 
-                  Franco Comida 
-                  Daniel Kaneider 
-Source: https://github.com/LuminanceHDR/LuminanceHDR
-  Original source has been repacked to remove unused folder 'hdrhtml/hdrhtml_hdrlabs_templ/' containing
-  compiled .js without source
-Comment: Formerly qtpfsgui. Qtpfsgui was debianized by Cyril Brulebois 
-  on Wed, 12 Dec 2007 23:45:44 +0100. After the rename to luminance-hdr it was taken over by Andreas
-  Metzler and Leonardo Montecchi.
+This work was packaged for Debian by:
 
-Files: *
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
+    Dariusz Duma  on Tue, 22 Mar 2011 07:45:36 +0100
 
-Files: INSTALL
-Copyright: 2006-2010, Giuseppe Rota 
-License: GPL-2+
+It was downloaded from:
 
-Files: build_files/Modules/FindOpenEXR.cmake
-Copyright: 2011, Blender Foundation.
-License: GPL-2+
+    
 
-Files: build_files/Modules/Findexiv2.cmake
-Copyright: 2010, Alexander Neundorf, 
-  2008, Gilles Caulier, 
-License: GPL-2+
+Upstream Author(s):
 
-Files: build_files/Modules/GetGitRevisionDescription.cmake
-  build_files/Modules/GetGitRevisionDescription.cmake.in
-Copyright: Iowa State University 2009-2010.
-License: BSL-1.0
+    
+    
 
-Files: src/Alignment/*
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
+Copyright:
 
-Files: src/Alignment/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
+    
+    
 
-Files: src/BatchHDR/BatchHDRDialog.cpp
-  src/BatchHDR/BatchHDRDialog.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
+License:
 
-Files: src/BatchTM/BatchTMDialog.cpp
-  src/BatchTM/BatchTMDialog.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
+    
 
-Files: src/BatchTM/BatchTMJob.cpp
-  src/BatchTM/BatchTMJob.h
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
+The Debian packaging is:
 
-Files: src/Common/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
+    Copyright (C) 2011 Dariusz Duma 
 
-Files: src/Common/CMakeLists.txt
-  src/Common/SavedParametersDialog.ui
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
+# Please chose a license for your packaging work. If the program you package
+# uses a mainstream license, using the same license is the safest choice.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
+# If you just want it to be GPL version 3, leave the following lines in.
 
-Files: src/Common/CommonFunctions.cpp
-  src/Common/CommonFunctions.h
-  src/Common/ProgressHelper.cpp
-  src/Common/SavedParametersDialog.cpp
-  src/Common/SavedParametersDialog.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
+and is licensed under the GPL version 3,
+see "/usr/share/common-licenses/GPL-3".
 
-Files: src/Common/LuminanceOptions.cpp
-  src/Common/LuminanceOptions.h
-  src/Common/config.h.in
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Common/ProgressHelper.h
-Copyright: 2012, 2013, Davide Anastasia
-  2009, 2012, Franco Comida
-License: GPL-2+
-
-Files: src/Common/global.cpp
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Common/global.h
-Copyright: 2010-2012, Davide Anastasia, Franco Comida, Daniel Kaneider
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Core/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/Core/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Exif/ExifOperations.cpp
-Copyright: 2013, Davide Anastasia
-  2010-2012, Franco Comida
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Exif/ExifOperations.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Fileformat/pfsoutldrimage.cpp
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Fileformat/pfsoutldrimage.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HdrCreation/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/HdrCreation/CMakeLists.txt
-  src/HdrCreation/weights.cpp
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/HdrCreation/createhdr.h
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HdrCreation/debevec.cpp
-  src/HdrCreation/debevec.h
-Copyright: 2017, Franco Comida
-  2013, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HdrCreation/fusionoperator.cpp
-  src/HdrCreation/fusionoperator.h
-  src/HdrCreation/weights.h
-Copyright: 2010-2013, Davide Anastasia
-License: LGPL-2.1+
-
-Files: src/HdrCreation/mtb_alignment.cpp
-  src/HdrCreation/mtb_alignment.h
-Copyright: 2013, Davide Anastasia
-  2007, Nicholas Phillips
-License: GPL-2+
-
-Files: src/HdrHTML/*
-Copyright: 2009, Rafal Mantiuk
-License: GPL-2+
-
-Files: src/HdrHTML/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/HdrHTML/hdrhtml-path.hxx.in
-Copyright: Franco Comida
-License: GPL-2+
-
-Files: src/HdrWizard/AutoAntighosting.cpp
-  src/HdrWizard/AutoAntighosting.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/HdrWizard/EditingTools.cpp
-  src/HdrWizard/EditingTools.h
-  src/HdrWizard/HdrCreationManager.h
-  src/HdrWizard/PreviewWidget.cpp
-  src/HdrWizard/PreviewWidget.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HdrWizard/HdrCreationItem.cpp
-  src/HdrWizard/HdrCreationItem.h
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/HdrWizard/HdrCreationManager.cpp
-Copyright: 2010-2012, Franco Comida
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HdrWizard/HdrWizard.cpp
-  src/HdrWizard/HdrWizard.h
-Copyright: 2013, Davide Anastasia
-  2010-2012, Franco Comida
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/HelpBrowser/*
-Copyright: 2009-2016, Davide Anastasia, Franco Comida, Daniel Kaneider
-  2005-2007, Trolltech ASA.
-License: GPL-2+
-Comment: File taken from the example classes of the Qt Toolkit.
-
-Files: src/HelpBrowser/CMakeLists.txt
-  src/HelpBrowser/HelpBrowser.ui
-  src/HelpBrowser/HelpSideBar.ui
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/HelpBrowser/HelpSideBar.cpp
-  src/HelpBrowser/HelpSideBar.h
-  src/HelpBrowser/help-path.hxx.in
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/HelpBrowser/LuminancePaths.cpp
-Copyright: 2009, Franco Comida
-  2008, Pierre Marchand 
-License: GPL-2+
-
-Files: src/HelpBrowser/LuminancePaths.h
-Copyright: 2009-2013, Davide Anastasia, Franco Comida, Daniel Kaneider
-  2008, Pierre Marchand 
-License: GPL-2+
-
-Files: src/HelpBrowser/helpbrowser.cpp
-  src/HelpBrowser/helpbrowser.h
-Copyright: 2009-2016, Davide Anastasia, Franco Comida, Daniel Kaneider
-License: GPL-2+
-Comment: Copied from fontmatrix. Adapted to Luminance HDR.
-
-Files: src/HelpBrowser/sctextbrowser.cpp
-Copyright: 2001, –2013, Franz Schmid and rest of the members of the
-License: GPL-2+
-
-Files: src/HelpBrowser/sctextbrowser.h
-Copyright: 2001-2013, Franz Schmid and rest of the members of the
-License: GPL-2+
-
-Files: src/Libpfs/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/Libpfs/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/array2d.h
-  src/Libpfs/array2d.hxx
-  src/Libpfs/fixedstrideiterator.h
-  src/Libpfs/strideiterator.h
-Copyright: 2010-2013, Davide Anastasia
-License: LGPL-2.1+
-
-Files: src/Libpfs/channel.cpp
-  src/Libpfs/channel.h
-  src/Libpfs/frame.cpp
-  src/Libpfs/frame.h
-  src/Libpfs/tag.cpp
-  src/Libpfs/tag.h
-Copyright: 2010-2013, Davide Anastasia
-  2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: LGPL-2.1+
-
-Files: src/Libpfs/channel.hxx
-Copyright: Davide Anastasia
-License: GPL-2+
-
-Files: src/Libpfs/colorspace/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/colorspace/colorspace.cpp
-Copyright: 2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: LGPL-2.1+
-
-Files: src/Libpfs/colorspace/colorspace.h
-Copyright: 2010-2013, Davide Anastasia
-  2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: LGPL-2.1+
-
-Files: src/Libpfs/colorspace/yuv.cpp
-  src/Libpfs/colorspace/yuv.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/Libpfs/exif/*
-Copyright: 2010-2013, Davide Anastasia
-License: LGPL-2.1+
-
-Files: src/Libpfs/exif/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/io/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/io/exrreader.cpp
-Copyright: 2012, 2013, Davide Anastasia
-  2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/io/exrwriter.cpp
-  src/Libpfs/io/exrwriter.h
-  src/Libpfs/io/rgbecommon.h
-  src/Libpfs/io/rgbereader.cpp
-  src/Libpfs/io/rgbereader.h
-  src/Libpfs/io/rgbewriter.cpp
-  src/Libpfs/io/rgbewriter.h
-  src/Libpfs/io/tiffwriter.cpp
-  src/Libpfs/io/tiffwriter.h
-Copyright: 2012, 2013, Davide Anastasia
-  2006-2008, Giuseppe Rota
-  2003-2007, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/io/fitsreader.cpp
-  src/Libpfs/io/fitsreader.h
-  src/Libpfs/io/rawreader.cpp
-  src/Libpfs/io/rawreader.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/Libpfs/io/jpegreader.cpp
-  src/Libpfs/io/jpegreader.h
-  src/Libpfs/io/jpegwriter.cpp
-  src/Libpfs/io/jpegwriter.h
-Copyright: 2012, Franco Comida
-  2012, 2013, Davide Anastasia
-License: GPL-2+
-
-Files: src/Libpfs/io/pngwriter.cpp
-  src/Libpfs/io/pngwriter.h
-Copyright: 2012, 2013, Davide Anastasia
-  2009, 2012, Franco Comida
-License: GPL-2+
-
-Files: src/Libpfs/manip/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/manip/cut.cpp
-Copyright: 2012, Davide Anastasia
-  2009, Franco Comida
-  2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/manip/cut.h
-Copyright: 2012, 2013, Davide Anastasia
-  2009, 2012, Franco Comida
-License: GPL-2+
-
-Files: src/Libpfs/manip/gamma.cpp
-  src/Libpfs/manip/gamma.h
-  src/Libpfs/manip/resize.cpp
-  src/Libpfs/manip/resize.h
-Copyright: 2012, 2013, Davide Anastasia
-  2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/manip/projection.cpp
-  src/Libpfs/manip/projection.h
-Copyright: 2012, 2013, Davide Anastasia
-  2006-2008, Giuseppe Rota
-  2003-2007, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/manip/rotate.cpp
-  src/Libpfs/manip/rotate.h
-Copyright: 2003-2007, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/Libpfs/manip/shift.cpp
-  src/Libpfs/manip/shift.h
-  src/Libpfs/manip/shift.hxx
-Copyright: 2010-2013, Davide Anastasia
-License: LGPL-2.1+
-
-Files: src/Libpfs/pfs.h
-Copyright: 2003, 2004, Rafal Mantiuk and Grzegorz Krawczyk
-License: LGPL-2.1+
-
-Files: src/Libpfs/tm/*
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Libpfs/tm/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/utils/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Libpfs/utils/dotproduct.h
-  src/Libpfs/utils/dotproduct.hxx
-  src/Libpfs/utils/minmax.h
-  src/Libpfs/utils/minmax.hxx
-  src/Libpfs/utils/numeric.h
-  src/Libpfs/utils/numeric.hxx
-Copyright: 2010-2013, Davide Anastasia
-License: LGPL-2.1+
-
-Files: src/Libpfs/utils/msec_timer.cpp
-  src/Libpfs/utils/msec_timer.h
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/LibpfsAdditions/*
-Copyright: 2013, 2015, Daniel Kaneider
-License: GPL-2+
-
-Files: src/LibpfsAdditions/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/MainCli/*
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/MainCli/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/MainCli/ezETAProgressBar.hpp
-Copyright: 2011, Remik Ziemlinski
-License: LGPL-3+
-Comment: File from ezProgressBar
- File from ezProgressBar
-
-Files: src/MainCli/main.cpp
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/MainGui/main.cpp
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/MainWindow/DnDOption.cpp
-  src/MainWindow/DnDOption.h
-  src/MainWindow/UpdateChecker.cpp
-  src/MainWindow/UpdateChecker.h
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/MainWindow/DonationDialog.cpp
-  src/MainWindow/DonationDialog.h
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/MainWindow/MainWindow.cpp
-  src/MainWindow/MainWindow.h
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/OsIntegration/*
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/OsIntegration/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/OsIntegration/ecwin7.cpp
-  src/OsIntegration/ecwin7.h
-Copyright: 2010, Emanuele Colombo
-License: GPL-2+
-Comment: EcWin7 - Support library for integrating Windows 7 taskbar features
-
-Files: src/Preferences/PreferencesDialog.cpp
-  src/Preferences/PreferencesDialog.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/PreviewPanel/*
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/PreviewPanel/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/PreviewSettings/*
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/PreviewSettings/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Projection/ProjectionsDialog.cpp
-  src/Projection/ProjectionsDialog.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Resize/ResizeDialog.cpp
-  src/Resize/ResizeDialog.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/TonemappingOperators/*
-Copyright: 2003, 2004, 2007, Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/TonemappingOperators/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/ashikhmin02/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/drago03/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/durand02/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/fattal02/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/fattal02/pde_fft.cpp
-Copyright: 2012, Tino Kluge
-License: GPL-2+
-
-Files: src/TonemappingOperators/ferradans11/*
-Copyright: 2013, This file is a part of LuminanceHDR package, based on pfstmo.
-License: GPL-2+
-
-Files: src/TonemappingOperators/ferradans11/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/ferradans11/pfstmo_ferradans11.cpp
-Copyright: 2013, Sira Ferradans
-License: GPL-2+
-
-Files: src/TonemappingOperators/mai11/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/mai11/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk06/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk06/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk06/contrast_domain.cpp
-Copyright: 2010-2012, Davide Anastasia
-  2007, Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk06/contrast_domain.h
-  src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp
-Copyright: 2003, 2004, 2007, Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk08/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk08/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/mantiuk08/cqp/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/pattanaik00/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/pfstmdefaultparams.h
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/TonemappingOperators/pfstmo.h
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingOperators/reinhard05/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingPanel/*
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/TonemappingPanel/CMakeLists.txt
-  src/TonemappingPanel/SavingParametersDialog.ui
-  src/TonemappingPanel/ThresholdWidget.ui
-  src/TonemappingPanel/TonemappingPanel.ui
-  src/TonemappingPanel/TonemappingSettings.ui
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/TonemappingPanel/TonemappingPanel.cpp
-  src/TonemappingPanel/TonemappingPanel.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/TransplantExif/TransplantExifDialog.cpp
-  src/TransplantExif/TransplantExifDialog.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/UI/*
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/UI/CMakeLists.txt
-  src/UI/ExportToHtmlDialog.ui
-  src/UI/ExtWizardPage.cpp
-  src/UI/ExtWizardPage.h
-  src/UI/FitsImporter.ui
-  src/UI/GammaAndLevels.ui
-  src/UI/ImageQualityDialog.ui
-  src/UI/SupportedCamerasDialog.ui
-  src/UI/TiffModeDialog.ui
-  src/UI/about.ui
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/UI/FlowLayout.cpp
-  src/UI/FlowLayout.h
-Copyright: 2011, Nokia Corporation and/or its subsidiary(-ies).
-License: BSD-3-clause
-
-Files: src/UI/GammaAndLevels.cpp
-  src/UI/GammaAndLevels.h
-  src/UI/Gang.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/UI/Gang.cpp
-Copyright: 2006, 2007, Giuseppe Rota
-  2002-2005, Nicholas Phillips
-License: GPL-2+
-
-Files: src/UI/TiffModeDialog.cpp
-  src/UI/TiffModeDialog.h
-  src/UI/UMessageBox.cpp
-  src/UI/UMessageBox.h
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/Viewers/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: src/Viewers/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/Viewers/GenericViewer.cpp
-Copyright: 2009-2012, Franco Comida, Davide Anastasia
-License: GPL-2+
-
-Files: src/Viewers/GenericViewer.h
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: src/Viewers/HdrViewer.cpp
-  src/Viewers/LdrViewer.cpp
-  src/Viewers/LdrViewer.h
-  src/Viewers/PanIconWidget.cpp
-  src/Viewers/PanIconWidget.h
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Viewers/HdrViewer.h
-Copyright: 2010-2014, Davide Anastasia
-  2006, 2007, Giuseppe Rota
-License: GPL-2+
-
-Files: src/Viewers/Histogram.cpp
-  src/Viewers/Histogram.h
-  src/Viewers/LuminanceRangeWidget.cpp
-  src/Viewers/LuminanceRangeWidget.h
-Copyright: 2003-2007, Rafal Mantiuk and Grzegorz Krawczyk
-License: GPL-2+
-
-Files: src/arch/*
-Copyright: 2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/arch/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: src/arch/math.h
-Copyright: 2010-2012, Daniel Kaneider, Davide Anastasia
-  2006-2008, Giuseppe Rota
-License: GPL-2+
-
-Files: src/contrib/qtwaitingspinner/*
-Copyright: 2012-2014, Alexander Turkin
-License: Expat
-
-Files: src/contrib/qtwaitingspinner/CMakeLists.txt
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/*
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: test/CMakeLists.txt
-  test/TestConvertSample.cpp
-  test/TestFusionOperator.cpp
-  test/TestHdrCreationWizard.cpp
-  test/TestMTB.cpp
-  test/TestMinMax.cpp
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/FusionAlgorithms/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/ImageInspector/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/ImageInspector/ImageInspectorMain.cpp
-Copyright: 2010-2014, Davide Anastasia
-License: GPL-2+
-
-Files: test/InputOutputTest/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/TestPoissonSolver.cpp
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: test/WhiteBalance/*
-Copyright: 2010-2017, Davide Anastasia 
-  2010-2017, Franco Comida 
-  2010-2017, Daniel Kaneider 
-  and many contributors and translators
-  2006-2010, Giuseppe Rota 
-License: GPL-2+
-
-Files: test/WhiteBalance/WhiteBalanceMain.cpp
-Copyright: 2009-2016, Franco Comida
-License: GPL-2+
-
-Files: test/mantiuk06/*
-Copyright: 2003, 2004, 2007, Grzegorz Krawczyk
-License: GPL-2+
-
-License: BSD-3-clause
- You may use this file under the terms of the BSD license as follows:
- .
- "Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-   * Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-     the names of its contributors may be used to endorse or promote
-     products derived from this software without specific prior written
-     permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-
-License: Expat
- The MIT License
- .
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated
- documentation files (the "Software"), to deal in the Software
- without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to
- whom the Software is furnished to do so, subject to the
- following conditions:
- .
- The above copyright notice and this permission notice shall
- be included in all copies or substantial portions of the
- Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
- WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-
-License: GPL-2+
- 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; version 2 dated June, 1991, or (at
- your option) any later version.
- .
- On Debian systems, the complete text of version 2 of the GNU General
- Public License can be found in '/usr/share/common-licenses/GPL-2'.
-
-License: LGPL-2.1+
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by the
- Free Software Foundation; version 2.1 of the License, or (at
- your option) any later version.
- .
- On Debian systems, the complete text of version 2.1 of the GNU Lesser
- General Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
-
-License: LGPL-3+
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by the
- Free Software Foundation; version 3 of the License, or (at
- your option) any later version.
- .
- On Debian systems, the complete text of version 3 of the GNU Lesser
- General Public License can be found in `/usr/share/common-licenses/LGPL-3'.
-
-License: BSL-1.0
- Permission is hereby granted, free of charge, to any person or organization
- obtaining a copy of the software and accompanying documentation covered by
- this license (the "Software") to use, reproduce, display, distribute, execute,
- and transmit the Software, and to prepare derivative works of the Software,
- and to permit third-parties to whom the Software is furnished to do so, all
- subject to the following:
- .
- The copyright notices in the Software and this entire statement, including the
- above license grant, this restriction and the following disclaimer, must be
- included in all copies of the Software, in whole or in  part, and all
- derivative works of the Software, unless such copies or derivative works are
- solely in the form of machine-executable object code generated by a source
- language processor.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY
- DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff -Nru luminance-hdr-2.5.1+dfsg/debian/doc-base luminance-hdr-2.6.0/debian/doc-base
--- luminance-hdr-2.5.1+dfsg/debian/doc-base	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/doc-base	1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
-Document: luminance-hdr
-Title: Luminance HDR User Manual
-Abstract: Luminance HDR Online Help
-Section: Graphics
-
-Format: HTML
-Index: /usr/share/doc/luminance-hdr/help/en/index.html
-Files: /usr/share/doc/luminance-hdr/help/en/*.html
diff -Nru luminance-hdr-2.5.1+dfsg/debian/docs luminance-hdr-2.6.0/debian/docs
--- luminance-hdr-2.5.1+dfsg/debian/docs	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/docs	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-AUTHORS
-README.md
-TODO
diff -Nru luminance-hdr-2.5.1+dfsg/debian/links luminance-hdr-2.6.0/debian/links
--- luminance-hdr-2.5.1+dfsg/debian/links	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/links	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-/usr/share/common-licenses/GPL-2 /usr/share/luminance-hdr/LICENSE
diff -Nru luminance-hdr-2.5.1+dfsg/debian/luminance-hdr-cli.1 luminance-hdr-2.6.0/debian/luminance-hdr-cli.1
--- luminance-hdr-2.5.1+dfsg/debian/luminance-hdr-cli.1	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/luminance-hdr-cli.1	1970-01-01 00:00:00.000000000 +0000
@@ -1,84 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.41.2.
-.TH LUMINANCE-HDR-CLI "1" "January 2014" "luminance-hdr-cli 2.3.1+git20140113" "User Commands"
-.SH NAME
-luminance-hdr-cli \- Luminance HDR command line version
-.SH SYNOPSIS
-.B luminance-hdr-cli
-[\fIOPTIONS\fR]... [\fIINPUTFILES\fR]...
-.SH DESCRIPTION
-.IP
-Commandline interface to luminance\-hdr\-cli.
-.TP
-\fB\-h\fR \fB\-\-help\fR
-Display this help.
-.TP
-\fB\-v\fR \fB\-\-verbose\fR
-Print more messages during execution.
-.TP
-\fB\-a\fR \fB\-\-align\fR AIS|MTB
-Align Engine to use during HDR creation (default: no alignment).
-.HP
-\fB\-d\fR \fB\-\-savealigned\fR prefix Save aligned images to files which names start with prefix
-.TP
-\fB\-e\fR \fB\-\-ev\fR EV1,EV2,...
-Specify numerical EV values (as many as INPUTFILES).
-.TP
-\fB\-c\fR \fB\-\-config\fR
-HDR creation config. Possible values:
-.IP
-weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m
-.br
-(Default is weight=triangular:response_curve=linear:model=debevec)
-.TP
-\fB\-l\fR \fB\-\-load\fR HDR_FILE
-Load an HDR instead of creating a new one.
-.TP
-\fB\-s\fR \fB\-\-save\fR HDR_FILE
-Save to a HDR file format. (default: don't save)
-.TP
-\fB\-g\fR \fB\-\-gamma\fR VALUE
-Gamma value to use during tone mapping. (default: 1)
-.TP
-\fB\-r\fR \fB\-\-resize\fR VALUE
-Width you want to resize your HDR to (resized before gamma and tone mapping)
-.TP
-\fB\-t\fR \fB\-\-tmo\fR
-Tone mapping operator. Legal values are:
-.IP
-ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08
-(Default is mantiuk06)
-.TP
-\fB\-p\fR \fB\-\-tmoptions\fR
-Tone mapping operator options. Legal values are:
-.IP
-alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal)
-.br
-contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06)
-.br
-colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08)
-.br
-localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin)
-.br
-sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand)
-.br
-bias=VALUE (for drago)
-.br
-local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik)
-.br
-scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02)
-.br
-brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05)
-.TP
-\fB\-o\fR \fB\-\-output\fR LDR_FILE
-File name you want to save your tone mapped LDR to.
-.TP
-\fB\-q\fR \fB\-\-quality\fR VALUE
-Quality of the saved tone mapped file (0\-100).
-.TP
-\fB\-b\fR \fB\-\-autoag\fR THRESHOLD
-Enable auto anti\-ghosting with given threshold.
-(No tonemapping is performed unless \fB\-o\fR is specified).
-.PP
-You must either load an existing HDR file (via the \fB\-l\fR option) or specify INPUTFILES to create a new HDR.
-.SH "SEE ALSO"
-.BR luminance-hdr (1)
diff -Nru luminance-hdr-2.5.1+dfsg/debian/luminance-hdr.pod luminance-hdr-2.6.0/debian/luminance-hdr.pod
--- luminance-hdr-2.5.1+dfsg/debian/luminance-hdr.pod	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/luminance-hdr.pod	1970-01-01 00:00:00.000000000 +0000
@@ -1,80 +0,0 @@
-=head1 NAME
-
-luminance-hdr - GUI offering a workflow for HDR imaging
-
-
-=head1 SYNOPSIS
-
-B
-
-
-=head1 DESCRIPTION
-
-luminance-hdr is an open source graphical user interface application that
-aims to provide a workflow for HDR imaging.
-
-Supported HDR formats:
-
-=over
-
-=item *
-OpenEXR (extension: exr)
-
-=item *
-Radiance RGBE (extension: hdr)
-
-=item *
-Tiff formats: 16bit, 32bit (float) and LogLuv (extension: tiff)
-
-=item *
-Raw image formats (extension: various)
-
-=item *
-PFS native format (extension: pfs)
-
-=back
-
-
-Supported LDR formats:
-
-=over
-
-=item *
-JPEG, PNG, PPM, PBM, TIFF(8 bit)
-
-=back
-
-
-Supported features:
-
-=over
-
-=item *
-Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and 16bit, RAW) of the same scene taken at different exposure setting.
-
-=item *
-Save and load HDR images.
-
-=item *
-Rotate and resize HDR images.
-
-=item *
-Tonemap HDR images.
-
-=item *
-Copy exif data between sets of images.
-
-=item *
-Supports internationalization.
-
-=back
-
-
-=head1 AUTHOR
-
-luminance-hdr was written by Giuseppe Rota and several contributors (see
-also the L file).
-
-This manual page was written by Cyril Brulebois
- and is licensed under the same term
-as the package itself.
diff -Nru luminance-hdr-2.5.1+dfsg/debian/manpages luminance-hdr-2.6.0/debian/manpages
--- luminance-hdr-2.5.1+dfsg/debian/manpages	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/manpages	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-debian/luminance-hdr.1
-debian/luminance-hdr-cli.1
diff -Nru luminance-hdr-2.5.1+dfsg/debian/patches/05_upstream_qtwebkit.patch luminance-hdr-2.6.0/debian/patches/05_upstream_qtwebkit.patch
--- luminance-hdr-2.5.1+dfsg/debian/patches/05_upstream_qtwebkit.patch	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/patches/05_upstream_qtwebkit.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,177 +0,0 @@
-Description: Upstream patch to use QtWebKit instead of QtWebEngine
- This is an official patch from upstream, to use QtWebKit instead of QtWebEngine.
- We apply this because QtWebKit is available on more Debian architectures.
-Origin: https://sourceforge.net/projects/qtpfsgui/files/luminance/2.5.1/
-Reviewed-by: Leonardo Montecchi 
-Last-Update: 2018-01-07
-
-diff -rupN luminance-hdr-2.5.1/CMakeLists.txt luminance-hdr-2.5.1-new/CMakeLists.txt
---- luminance-hdr-2.5.1/CMakeLists.txt	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/CMakeLists.txt	2017-05-11 00:30:33.387938670 +0200
-@@ -38,8 +38,8 @@ find_package(Qt5Core REQUIRED)
- find_package(Qt5Concurrent REQUIRED)
- find_package(Qt5Widgets REQUIRED)
- find_package(Qt5Gui REQUIRED)
--find_package(Qt5WebEngineCore REQUIRED)
--find_package(Qt5WebEngineWidgets REQUIRED)
-+find_package(Qt5WebKit REQUIRED)
-+find_package(Qt5WebKitWidgets REQUIRED)
- find_package(Qt5Xml REQUIRED)
- find_package(Qt5Sql REQUIRED)
- find_package(Qt5Svg REQUIRED)
-@@ -57,7 +57,7 @@ ENDIF(WIN32)
- 
- set(LIBS ${LIBS}
-     ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES}
--    ${QT_QTWEBENGINE_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
-+    ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
- 
- FIND_PACKAGE(Git)
- IF(GIT_FOUND)
-diff -rupN luminance-hdr-2.5.1/src/HelpBrowser/CMakeLists.txt luminance-hdr-2.5.1-new/src/HelpBrowser/CMakeLists.txt
---- luminance-hdr-2.5.1/src/HelpBrowser/CMakeLists.txt	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/HelpBrowser/CMakeLists.txt	2017-05-11 00:30:33.387938670 +0200
-@@ -28,7 +28,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
- QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
- 
- ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX})
--qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebEngineCore WebEngineWidgets PrintSupport)
-+qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets PrintSupport)
- 
- SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE)
- SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE)
-diff -rupN luminance-hdr-2.5.1/src/HelpBrowser/helpbrowser.cpp luminance-hdr-2.5.1-new/src/HelpBrowser/helpbrowser.cpp
---- luminance-hdr-2.5.1/src/HelpBrowser/helpbrowser.cpp	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/HelpBrowser/helpbrowser.cpp	2017-05-11 00:32:39.449108102 +0200
-@@ -166,8 +166,6 @@ HelpBrowser::HelpBrowser(QWidget* parent
- HelpBrowser::HelpBrowser( QWidget* parent, const QString& /*caption*/, const QString& guiLanguage, const QString& jumpToSection, const QString& jumpToFile):
-     QMainWindow( parent ),
-     zoomFactor(1.0),
--    //m_textBrowser(new QTextDocument),
--    m_textBrowser(new QTextBrowser),
-     m_Ui(new Ui::HelpBrowser)
- {
-     m_Ui->setupUi(this);
-@@ -347,13 +345,6 @@ void HelpBrowser::languageChange()
- 
- void HelpBrowser::print()
- {
--    /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser
--    m_Ui->htmlPage->page()->toHtml([this](const QString &result){
--            this->m_textBrowser->setHtml(result);
--            this->printAvailable();
--            });
--    */
--    m_textBrowser->setSource(m_Ui->htmlPage->page()->url());
-     this->printAvailable();
- }
- 
-@@ -365,19 +356,12 @@ void HelpBrowser::printAvailable()
-     if (dialog.exec())
-     {
- 
--        m_textBrowser->print(&printer);
-+        m_Ui->htmlPage->print(&printer);
-     }
- }
- 
- void HelpBrowser::printPreview()
- {
--    /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser
--    m_Ui->htmlPage->page()->toHtml([this](const QString &result){
--            this->m_textBrowser->setHtml(result);
--            this->printPreviewAvailable();
--            });
--    */
--    m_textBrowser->setSource(m_Ui->htmlPage->page()->url());
-     this->printPreviewAvailable();
- }
- 
-@@ -392,7 +376,7 @@ void HelpBrowser::printPreviewAvailable(
- 
- void HelpBrowser::paintRequested(QPrinter *printer)
- {
--    m_textBrowser->print(printer);
-+    m_Ui->htmlPage->print(printer);
- }
- 
- void HelpBrowser::searchingButton_clicked()
-@@ -789,6 +773,6 @@ void HelpBrowser::loadFinished(bool) {
-     statusBar()->showMessage("");
- }
- 
--void HelpBrowser::linkHovered (const QString &url) {
-+void HelpBrowser::linkHovered (const QString &url, const QString &, const QString &) {
-     statusBar()->showMessage(url);
- }
-diff -rupN luminance-hdr-2.5.1/src/HelpBrowser/helpbrowser.h luminance-hdr-2.5.1-new/src/HelpBrowser/helpbrowser.h
---- luminance-hdr-2.5.1/src/HelpBrowser/helpbrowser.h	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/HelpBrowser/helpbrowser.h	2017-05-11 00:40:22.531057038 +0200
-@@ -64,8 +64,6 @@
- #include 
- #include 
- #include 
--//#include 
--#include 
- 
- class ScHelpTreeModel;
- class QPrinter;
-@@ -132,10 +130,6 @@ protected:
-     QMap quickHelpIndex;
-     QMap > bookmarkIndex;
- 
--    // I need to keep this around because page()->toHtml(  ) is asynchronous
--    //QSharedPointer m_textDocument;
--    QSharedPointer m_textBrowser;
--
- protected slots:
-     virtual void languageChange();
-     void histChosen(QAction* i);
-@@ -215,7 +209,7 @@ protected slots:
- 
-     /*! \brief Restore Default Cursor */
-     void loadFinished(bool);
--    void linkHovered (const QString &);
-+	void linkHovered (const QString &, const QString &, const QString &);
- signals:
-     void closed();
- 
-diff -rupN luminance-hdr-2.5.1/src/HelpBrowser/sctextbrowser.cpp luminance-hdr-2.5.1-new/src/HelpBrowser/sctextbrowser.cpp
---- luminance-hdr-2.5.1/src/HelpBrowser/sctextbrowser.cpp	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/HelpBrowser/sctextbrowser.cpp	2017-05-11 00:33:42.085695414 +0200
-@@ -57,7 +57,7 @@ for which a new license (GPL+exception)
- #include "sctextbrowser.h"
- 
- ScTextBrowser::ScTextBrowser( QWidget * parent )
--    : QWebEngineView(parent)
-+    : QWebView(parent)
- {
- }
- 
-diff -rupN luminance-hdr-2.5.1/src/HelpBrowser/sctextbrowser.h luminance-hdr-2.5.1-new/src/HelpBrowser/sctextbrowser.h
---- luminance-hdr-2.5.1/src/HelpBrowser/sctextbrowser.h	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/HelpBrowser/sctextbrowser.h	2017-05-11 00:30:33.390938650 +0200
-@@ -45,9 +45,9 @@ for which a new license (GPL+exception)
- #define SCTEXTBROWSER_H
- 
- #include 
--#include  
-+#include  
- 
--class ScTextBrowser : public QWebEngineView
-+class ScTextBrowser : public QWebView
- {
-     Q_OBJECT
-     QUrl m_home;
-diff -rupN luminance-hdr-2.5.1/src/UI/CMakeLists.txt luminance-hdr-2.5.1-new/src/UI/CMakeLists.txt
---- luminance-hdr-2.5.1/src/UI/CMakeLists.txt	2017-05-10 21:14:06.000000000 +0200
-+++ luminance-hdr-2.5.1-new/src/UI/CMakeLists.txt	2017-05-11 00:30:33.391938643 +0200
-@@ -47,7 +47,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
- QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
- 
- ADD_LIBRARY(ui ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H})
--qt5_use_modules(ui Core Concurrent Gui Widgets WebEngineWidgets)
-+qt5_use_modules(ui Core Concurrent Gui Widgets WebKitWidgets)
- 
- SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE)
- SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} ui PARENT_SCOPE)
diff -Nru luminance-hdr-2.5.1+dfsg/debian/patches/20_usrsharedoc.diff luminance-hdr-2.6.0/debian/patches/20_usrsharedoc.diff
--- luminance-hdr-2.5.1+dfsg/debian/patches/20_usrsharedoc.diff	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/patches/20_usrsharedoc.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,31 +0,0 @@
-Description: Install documentation to /usr/share/doc
- Install docs to /usr/share/doc/luminance-hdr instead of
- /usr/share/luminance-hdr
-Author: Andreas Metzler 
-Reviewed-by: Leonardo Monteccchi 
-Last-Update: 2017-07-27
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -292,8 +292,8 @@
-     ${CMAKE_SOURCE_DIR}/README.md
-     ${CMAKE_SOURCE_DIR}/LICENSE
-     ${CMAKE_SOURCE_DIR}/Changelog
--    DESTINATION share/luminance-hdr) #info files
--    INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION share/luminance-hdr) # help directory
-+    DESTINATION share/doc/luminance-hdr) #info files
-+    INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION share/doc/luminance-hdr) # help directory
-     INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/hdrhtml DESTINATION share/luminance-hdr) # hdrhtml directory
- # Microsoft Windows
- ELSEIF(WIN32)
---- a/build_files/Modules/Internationalization.cmake
-+++ b/build_files/Modules/Internationalization.cmake
-@@ -8,7 +8,7 @@
- # ADD_DEFINITIONS(-DI18NDIR="${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n")
- SET(BASEDIR "\"${CMAKE_INSTALL_PREFIX}\"")
- SET(I18NDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n\"")
--SET(HELPDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/help\"")
-+SET(HELPDIR "\"${CMAKE_INSTALL_PREFIX}/share/doc/luminance-hdr/help\"")
- SET(HDRHTMLDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/hdrhtml\"")
- ELSEIF(WIN32)
- # ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/i18n")
diff -Nru luminance-hdr-2.5.1+dfsg/debian/patches/50_fix_build_kfreebsd-amd64.diff luminance-hdr-2.6.0/debian/patches/50_fix_build_kfreebsd-amd64.diff
--- luminance-hdr-2.5.1+dfsg/debian/patches/50_fix_build_kfreebsd-amd64.diff	2018-02-04 15:23:48.000000000 +0000
+++ luminance-hdr-2.6.0/debian/patches/50_fix_build_kfreebsd-amd64.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,19 +0,0 @@
-Description: Workaround to fix compilation under kfreebsd-amd64
-  This patch is workaround to fix a compilation error under kfreebsd-amd64
-  Includes  on top in order to avoid the inclusion of .
-Author: Leonardo Montecchi 
-Last-Update: <2014-04-08>
-
---- luminance-hdr-2.4.0.orig/src/TonemappingOperators/mantiuk08/display_function.h
-+++ luminance-hdr-2.4.0/src/TonemappingOperators/mantiuk08/display_function.h
-@@ -32,6 +32,10 @@
- #ifndef DISPLAY_FUNCTION_H
- #define DISPLAY_FUNCTION_H
- 
-+#if defined(__FreeBSD_kernel__) && __x86_64__
-+#include        // Fixes compilation on kfreebsd-amd64 on Debian
-+#endif
-+
- #include 
- 
- #include "arch/math.h"
diff -Nru luminance-hdr-2.5.1+dfsg/debian/patches/60_hdrhtml_locale.diff luminance-hdr-2.6.0/debian/patches/60_hdrhtml_locale.diff
--- luminance-hdr-2.5.1+dfsg/debian/patches/60_hdrhtml_locale.diff	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/patches/60_hdrhtml_locale.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-Description: Fixes locale problems in export to HTML feature
-  This patch fixes a problem caused by certain locales in the export to HTML
-  feature. In particular, in the wrong calculation of image size and other 
-  numerical values, in locales that use the dot as separator of thousands.
-Author: Leonardo Montecchi 
-Last-Update: 2017-07-27
-
---- a/src/HdrHTML/hdrhtml.cpp
-+++ b/src/HdrHTML/hdrhtml.cpp
-@@ -850,6 +850,9 @@
-   if( image_list.empty() )
-     return;
- 
-+  string user_locale = locale("").name();
-+  locale::global(locale::classic());
-+
-   ostringstream out_file_name;
-   if (out_dir != NULL)
-       out_file_name << out_dir << "/";
-@@ -915,6 +918,7 @@
-     }
-   }
- 
-+  locale::global(locale(user_locale.c_str()));
- }
- 
- void print_image_objects( ostream &out, void *user_data, const char *parameter )
diff -Nru luminance-hdr-2.5.1+dfsg/debian/patches/series luminance-hdr-2.6.0/debian/patches/series
--- luminance-hdr-2.5.1+dfsg/debian/patches/series	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-05_upstream_qtwebkit.patch
-20_usrsharedoc.diff
-50_fix_build_kfreebsd-amd64.diff
-60_hdrhtml_locale.diff
diff -Nru luminance-hdr-2.5.1+dfsg/debian/README.Debian luminance-hdr-2.6.0/debian/README.Debian
--- luminance-hdr-2.5.1+dfsg/debian/README.Debian	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.6.0/debian/README.Debian	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,6 @@
+luminance for Debian
+--------------------
+
+
+
+ -- Dariusz Duma   Tue, 22 Mar 2011 07:45:36 +0100
diff -Nru luminance-hdr-2.5.1+dfsg/debian/README.source luminance-hdr-2.6.0/debian/README.source
--- luminance-hdr-2.5.1+dfsg/debian/README.source	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.6.0/debian/README.source	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,9 @@
+luminance for Debian
+--------------------
+
+
+
+
+
+
diff -Nru luminance-hdr-2.5.1+dfsg/debian/rules luminance-hdr-2.6.0/debian/rules
--- luminance-hdr-2.5.1+dfsg/debian/rules	2018-02-10 13:16:50.000000000 +0000
+++ luminance-hdr-2.6.0/debian/rules	2012-03-25 09:31:27.000000000 +0000
@@ -1,65 +1,29 @@
 #!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
+ifeq (${DEB_BUILD_GNU_CPU}, x86_64)
+        OPTFLAGS=-march=x86-64
+else
+        OPTFLAGS=-march=i686
+endif
 
-# Various variables used later on:
-NOT_NEEDED  = AUTHORS LICENSE README.md Changelog
-DEB_DESTDIR = $(CURDIR)/debian/luminance-hdr
-MANPAGE     = debian/luminance-hdr.1
-
-export DEB_BUILD_MAINT_OPTIONS=hardening=+all
-export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
-export QT_SELECT := qt5
-
-include /usr/share/dpkg/pkg-info.mk
-
-# To enable test-suite build-depend on libgtest-dev and uncomment these lines
-###override_dh_auto_configure:
-###	cp -a /usr/src/gtest local-gtest && \
-###		mkdir local-gtest/debian local-gtest/include && \
-###		cp -a debian/compat debian/control local-gtest/debian && \
-###		cd local-gtest && \
-###		dh_auto_configure --verbose && \
-###		dh_auto_build --verbose && \
-###		ln -s /usr/include/gtest include/ && \
-###		ln -s obj-* lib
-###
-###	dh_auto_configure --verbose -- -DGTEST_ROOT=$(CURDIR)/local-gtest
-
-PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
-PKG  = $(shell dpkg-parsechangelog -S source --file $(PKD)/changelog)
-VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
-UVER = $(subst +dfsg,,$(VER))
-
-.PHONY: get-orig-source
-## http://wiki.debian.org/onlyjob/get-orig-source
-get-orig-source:
-	$(info I: $(PKG)_$(VER))
-	@echo "# Downloading..."
-	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(UVER) $(PKD)
-	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
-	@echo "# Extracting..."
-	mkdir $(PKG)-$(VER)
-	tar -xf $(PKG)_$(UVER).orig.tar.* --directory $(PKG)-$(VER)
-	@echo "# Cleaning-up..."
-	cd $(PKG)-$(VER) && \
-	$(RM) -r -v LuminanceHDR-v.$(UVER)/hdrhtml/hdrhtml_hdrlabs_templ/
-	@echo "# Repacking..."
-	tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" --directory $(PKG)-$(VER) LuminanceHDR-v.$(UVER)
-	rm -r -v $(PKG)-$(VER)
-
-override_dh_auto_build:
-	# Normal auto_build:
-	dh_auto_build --verbose --parallel
-	# Build the minimal manpage:
-	pod2man --center='Minimal luminance-hdr manpage' \
-		--release=$(shell dpkg-parsechangelog -S Version | sed -e 's/.*://' -e 's/-[^-][^-]*//') \
-		debian/luminance-hdr.pod > $(MANPAGE)
-
-override_dh_auto_install:
-	dh_auto_install --verbose --destdir=$(DEB_DESTDIR)
-	# Remove unneeded files
-	for i in $(NOT_NEEDED); do \
-		rm -v $(DEB_DESTDIR)/usr/share/doc/luminance-hdr/$$i ; \
-	done
 
 %:
-	dh $@ --parallel
+	dh $@ 
+
+
+override_dh_auto_configure:
+	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="" -DCMAKE_C_FLAGS="-O3" -DCMAKE_CXX_FLAGS="-O3 -ffast-math -DNDEBUG ${OPTFLAGS}"
diff -Nru luminance-hdr-2.5.1+dfsg/debian/source/include-binaries luminance-hdr-2.6.0/debian/source/include-binaries
--- luminance-hdr-2.5.1+dfsg/debian/source/include-binaries	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.6.0/debian/source/include-binaries	2017-04-18 16:06:22.000000000 +0000
@@ -0,0 +1 @@
+program-icons/edit-clear-list.png
diff -Nru luminance-hdr-2.5.1+dfsg/debian/watch luminance-hdr-2.6.0/debian/watch
--- luminance-hdr-2.5.1+dfsg/debian/watch	2018-02-10 13:11:53.000000000 +0000
+++ luminance-hdr-2.6.0/debian/watch	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-version=3
-
-opts="filenamemangle=s/.+\/v?\.?(\d\S+)\.tar\.gz/LuminanceHDR-$1\.tar\.gz/,dversionmangle=s/\+dfsg//" \
-  https://github.com/LuminanceHDR/LuminanceHDR/tags .*/v?\.?(\d\S+)\.tar\.gz
diff -Nru luminance-hdr-2.5.1+dfsg/.gitignore luminance-hdr-2.6.0/.gitignore
--- luminance-hdr-2.5.1+dfsg/.gitignore	2017-05-10 19:14:06.000000000 +0000
+++ luminance-hdr-2.6.0/.gitignore	2019-06-09 19:18:38.000000000 +0000
@@ -2,7 +2,6 @@
 CMakeLists.txt.user
 /.settings
 **.rule
-CMakeLists.txt.user.2.6pre1
 /.cproject
 .idea
 .swo
@@ -10,3 +9,4 @@
 *.kdev4
 tags
 Build
+build
diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css
--- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css	2019-06-09 19:18:38.000000000 +0000
@@ -0,0 +1,95 @@
+/*     optional:  full page styling with dark background       */
+
+	body { background-color: #1A1C1F; font-family: sans-serif, Helvetica Narrow; color: CDCDCD; }
+	
+	a { color: #FF5020; text-decoration: none; }
+	a:hover { color: #FF5020; text-decoration: underline; }
+	
+/*     required:   HDR-Viewer styling, adjust as needed    */
+	
+	.hdr_viewer {
+			background-color: #000;
+			-moz-border-radius: 8px;
+			-webkit-border-radius: 8px;
+			padding: 4px 6px 4px 6px;
+			margin: 10px;
+			font-family: sans-serif;
+	}
+	
+	.hdr_viewport {
+		    position: relative; 
+		    margin: 3px 0px 3px 0px;
+	}
+	
+	.hdr_controller {
+			position: relative; 
+			height: 36px;
+			margin: 2px 0px 2px 0px; 
+			overflow: hidden; 
+	}
+	
+	.knob { position: absolute; 
+			height: 36px; 
+	    	opacity: 0.3;
+	    	filter: alpha(opacity = 30);
+	    	background: #FFFFFF center center url('slider-black.png') no-repeat;
+	    	cursor: pointer;
+	    	-moz-border-radius: 3px;
+			-webkit-border-radius: 3px;
+	}
+	
+	div.knob:hover {
+	    	background-color: #FF5020;
+		    opacity: 0.7;
+		    filter: alpha(opacity = 70);
+	}
+	
+	.label {
+			color: white; 
+			font-family: Florence, cursive; 
+			width: 110px;
+			padding: 5px 10px 5px 10px;
+	}
+	
+	.labelnumber {
+			text-align: right;					
+			display: inline-block;
+			width: 50px;
+	}
+	
+	.hdr_help {
+			position: absolute; 
+			right: 6px; 
+			top: 8px;
+			opacity: 0.5;
+			filter: alpha(opacity = 50);
+			width: 22px;
+			height: 22px;
+			background: top left url('information.png') no-repeat;
+			cursor: pointer;
+	}
+	
+	div.hdr_help:hover {
+			background: top left url('information-red.png') no-repeat;
+			opacity: 1;
+	}
+	
+	.hdr_instructions {
+		    color: #FFF;
+		    background-color: #000;
+	}
+	
+	.spinner {
+		position: absolute;
+		opacity: 0.9;
+		filter: alpha(opacity=90);
+		z-index: 999;
+		background: #000;
+	}
+	
+	.spinner-img {
+		background: url('loading-spinner.gif') no-repeat;
+		width: 31px;
+		height: 31px;
+		margin: 0 auto;
+	}
diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.js luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.js
--- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.js	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.js	2019-06-09 19:18:38.000000000 +0000
@@ -0,0 +1,229 @@
+/*
+-----------------------------------------------
+HDR HTML Viewer ver. 1.7
+Author: v1.0 Rafal Mantiuk
+URL:    http://www.cs.ubc.ca/~mantiuk/hdrhtml.html
+
+Template v1.7 by Christian Bloch, www.hdrlabs.com
+Requires: mootools javascript library from www.mootools.net or linked in from google's server:
+               http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js
+	      Slider and Asset extensions from the mootools (More) section
+----------------------------------------------- */
+
+		// For suppressing the text-selection cursor when dragging or interacting with the viewer
+		
+		var noselect = false;
+		
+		window.addEvent('selectstart', function(e) {
+		  if (noselect) {
+		  	e.stop();
+		    return false;
+		  }
+		});
+	
+	  //  for updating the EV label
+	
+      function update_exp_text( hdr_image, new_exp ) {
+      			ev_label = "EV:"+ Math.round( (hdr_image.best_exp-new_exp)*10 )/10 + " f";
+      
+   				//  delete the next two lines if you prefer plain decimal display for fractional EV values
+      			ev_label = ev_label.replace(/\.3/, " 1/3");
+      			ev_label = ev_label.replace(/\.7/, " 2/3");
+
+                $(hdr_image.base_name + "_exp_text").innerHTML =  ev_label;
+      }            
+            
+      function change_exp( hdr_image, exp_change ) {
+            
+            hdr_active_image = hdr_image;
+            hdr_image.exposure = hdr_image.exposure + exp_change;
+            
+      //  clamp to exposure limits      
+      
+            if( hdr_image.exposure > hdr_image.f8_stops*8 ) {
+              hdr_image.exposure = hdr_image.f8_stops*8;  
+            } 
+            else if( hdr_image.exposure < 0 ) {
+              hdr_image.exposure = 0;
+            }
+            
+            exp_cur = Math.floor(hdr_image.exposure / 8);
+            exp_shar = exp_cur + 1;
+                        
+            exp_blend = Math.round((hdr_image.exposure - exp_cur*8)*hdr_image.f_step_res);
+       
+      // blend each image accordingly 
+            
+            var i;
+            for( i = 0; i < hdr_image.basis; i++ ) {
+            	var img_obj = $(hdr_image.base_name+"_"+i);
+            	img_obj.set('src', hdr_image.image_dir + hdr_image.base_name + "_"+exp_cur+"_" + (i+1) + ".jpg");
+            	img_obj.setStyle('opacity', cf[exp_blend][i]);
+            }
+            
+            for( i = 0; i < hdr_image.shared_basis; i++ ) {
+            	var img_obj = $(hdr_image.base_name+"_"+(i+hdr_image.basis));  
+            	img_obj.set('src',hdr_image.image_dir + hdr_image.base_name + "_"+exp_shar+"_" + (i+1) + ".jpg");
+            	img_obj.setStyle( 'opacity', cf[exp_blend][i+hdr_image.basis] );
+            }
+                              
+            update_exp_text( hdr_image, hdr_image.exposure );
+      }    
+
+      
+      //   keyboartd events    
+	    function hdr_onkeydown(e) { 
+              var hdr_image = hdr_active_image;
+
+              var keynum;
+              if( hdr_image == null )
+                  return;
+              
+              var hdrnum = hdr_names.indexOf(hdr_image.base_name);
+                
+              if(window.event) { // IE
+                keynum = window.event.keyCode;
+                if( keynum == 189 )  
+                	hdr_slider[hdrnum].set(hdr_image.exposure*10 - 10);
+                if( keynum == 187 )  
+                	hdr_slider[hdrnum].set(hdr_image.exposure*10 + 10);                                
+              } else if(e.which) { // Netscape/Firefox/Opera                
+                keynum = e.which;
+                if( keynum == 109 )
+                	hdr_slider[hdrnum].set(hdr_image.exposure*10 - 10);
+                if( keynum == 61 )
+                	hdr_slider[hdrnum].set(hdr_image.exposure*10 + 10);                                
+              }
+
+       }
+
+
+      // ----------------------------------------    
+      // This must be called from within the HTML    
+      // ----------------------------------------    
+      //      - injects images into viewport
+      //      - binds slider to EV
+      //      - binds mousewheel to slider
+      // Called once from each "hdr_viewer" div
+
+      
+      // inject images into HTML                    
+            
+      function insert_hdr_image( hdr_image ) {
+            
+            hdr_viewport = $(hdr_image.base_name+'_viewport');
+            hdr_viewer = hdr_viewport.getParent('div.hdr_viewer');
+
+            //  preload images
+            
+            var preloading = new Array(); 
+            var k = 0;
+            for( i = 0; i < hdr_image.f8_stops; i++ ) {
+            	for( j = 0; j < hdr_image.basis; j++ ) {
+        			preloading[k] = ""+hdr_image.image_dir + hdr_image.base_name + "_"+i+"_" + (j+1) + ".jpg";
+        			k = k + 1;
+        		}
+            }
+            preloading[k] = ""+hdr_image.image_dir + hdr_image.base_name + "_"+hdr_image.f8_stops+"_1.jpg";
+            
+            //  for showing the AJAX spinning circle swap the next line with the block below
+            new Asset.images(preloading);
+            
+        //    var loadspinner = new Spinner(hdr_viewer).show('noFX');
+        //    var myImages = new Asset.images(preloading, {
+    	//		onComplete: function(){
+        //			loadspinner.destroy();
+    	//		}
+	    //	});
+           
+            //  enumerate all instances to remember the name
+            hdrcount = hdrcount + 1;
+            hdr_names[hdrcount] = ""+hdr_image.base_name;
+            
+            var injection = "";
+            for( i = 0; i < hdr_image.basis + hdr_image.shared_basis; i++ ) {
+            injection += "\n";
+            }
+            
+            // also inject a hidden help viewer
+                        
+            injection += "
" + + "

HDR HTML Viewer

" + + "v1.0 (C) 2008 Rafal Mantiuk | pfsTools
" + + "v1.7 mod 2010 Christian Bloch | HDR Labs
" + + "
  • Change exposure by sliding the dynamic range window left and right. Or just use the scroll wheel.
  • " + + "
  • Press \"-\" and \"=\" keys to change exposure by 1 f-stop.
  • " + + "
  • The green plot represents the HDR histogram. EV value is given in f-stops (log2 units) " + + "relative to the inital exposure.
  • " + + "
  • The exposure window / slider encompasses 8 f-stops.
  • " + + "
"; + + + hdr_viewport.set('html',injection); + + + // link help viewer to help buttom + + var help_view = $(hdr_image.base_name+'_help_view').fade('hide');; + + $(hdr_image.base_name+'_help').addEvent('click', function() { + if(help_view.getStyle('opacity') == 0) help_view.fade(0.85); + else help_view.fade('out'); + }); + + help_view.addEvent('click', function() { + help_view.fade('out'); + }); + + + // initialize mootools slider + + hist_left = Math.round((-hdr_image.hist_start)*hdr_image.pix_per_fstop); + + var el = $(hdr_image.base_name+'_dr_ctrl'); + + el.style.left = Math.round(hist_left) + "px"; + el.style.width = Math.round(hdr_image.hist_width-hist_left) + "px"; + el.getElement('.knob').style.width = hdr_image.pix_per_fstop*8 + "px"; + + var EVrange = (hdr_image.hist_width-hist_left)/hdr_image.pix_per_fstop-7.7; + + var slider = new Slider(el, el.getElement('.knob'), { + steps: EVrange*hdr_image.f_step_res, + range: [0,EVrange*10], + onChange: function(value) { + change_exp( hdr_image, value/10 - hdr_image.exposure); + } + }).set(hdr_image.exposure*10); + + + // clone this slider into an array for keyboard access + hdr_slider[hdrcount] = slider; + + // link active hdr image to rollover on the current image + hdr_viewer.addEvent('mouseenter', function() { + hdr_active_image = hdr_image; + // suppress accidental selection of individual images or text + noselect = true; + }); + + // link the mousewheel to the slider + hdr_viewer.addEvent('mousewheel', function(e) { + e.stop(); // prevent the mousewheel from scrolling the page. + noselect = true; + slider.set((hdr_image.exposure + e.wheel/2)*10); + }); + + // restore outside text to be selectable + hdr_viewer.addEvent('mouseleave', function() { + noselect = false; + }); + + } Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/information.png and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/information.png differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/information-red.png and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/information-red.png differ Binary files /tmp/tmpwJEUbK/VJPnnAb2B_/luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/loading-spinner.gif and /tmp/tmpwJEUbK/IH8MqhPuhw/luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/loading-spinner.gif differ diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/mootools-1.2.4.js luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/mootools-1.2.4.js --- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/mootools-1.2.4.js 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_assets/mootools-1.2.4.js 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,480 @@ +//MooTools, , My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, , MIT Style License. + +var MooTools={version:"1.2.4",build:"0d9113241a90b9cd5643b926795852a2026710d4"};var Native=function(k){k=k||{};var a=k.name;var i=k.legacy;var b=k.protect; +var c=k.implement;var h=k.generics;var f=k.initialize;var g=k.afterImplement||function(){};var d=f||i;h=h!==false;d.constructor=Native;d.$family={name:"native"}; +if(i&&f){d.prototype=i.prototype;}d.prototype.constructor=d;if(a){var e=a.toLowerCase();d.prototype.$family={name:e};Native.typize(d,e);}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o; +}if(h){Native.genericize(n,l,b);}g.call(n,l,o);return n;};d.alias=function(n,l,p){if(typeof n=="string"){var o=this.prototype[n];if((n=o)){return j(this,l,n,p); +}}for(var m in n){this.alias(m,n[m],l);}return this;};d.implement=function(m,l,o){if(typeof m=="string"){return j(this,m,l,o);}for(var n in m){j(this,n,m[n],l); +}return this;};if(c){d.implement(c);}return d;};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments); +return b.prototype[c].apply(d.shift(),d);};}};Native.implement=function(d,c){for(var b=0,a=d.length;b-1:this.indexOf(a)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim(); +},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase()); +});},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1"); +},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); +return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null;},stripScripts:function(b){var a=""; +var c=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return"";});if(b===true){$exec(a);}else{if($type(b)=="function"){b(a,c); +}}return c;},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);}return(a[c]!=undefined)?a[c]:""; +});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a;}}return null; +},hasValue:function(a){return(Hash.keyOf(this,a)!==null);},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c);},this);return this;},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c); +},this);return this;},erase:function(a){if(this.hasOwnProperty(a)){delete this[a];}return this;},get:function(a){return(this.hasOwnProperty(a))?this[a]:null; +},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b;}return this;},empty:function(){Hash.each(this,function(b,a){delete this[a];},this); +return this;},include:function(a,b){if(this[a]==undefined){this[a]=b;}return this;},map:function(b,c){var a=new Hash;Hash.each(this,function(e,d){a.set(d,b.call(c,e,d,this)); +},this);return a;},filter:function(b,c){var a=new Hash;Hash.each(this,function(e,d){if(b.call(c,e,d,this)){a.set(d,e);}},this);return a;},every:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&!b.call(c,this[a],a)){return false; +}}return true;},some:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&b.call(c,this[a],a)){return true;}}return false;},getKeys:function(){var a=[]; +Hash.each(this,function(c,b){a.push(b);});return a;},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b);});return a;},toQueryString:function(a){var b=[]; +Hash.each(this,function(f,e){if(a){e=a+"["+e+"]";}var d;switch($type(f)){case"object":d=Hash.toQueryString(f,e);break;case"array":var c={};f.each(function(h,g){c[g]=h; +});d=Hash.toQueryString(c,e);break;default:d=e+"="+encodeURIComponent(f);}if(f!=undefined){b.push(d);}});return b.join("&");}});Hash.alias({keyOf:"indexOf",hasValue:"contains"}); +var Event=new Native({name:"Event",initialize:function(a,f){f=f||window;var k=f.document;a=a||f.event;if(a.$extended){return a;}this.$extended=true;var j=a.type; +var g=a.target||a.srcElement;while(g&&g.nodeType==3){g=g.parentNode;}if(j.test(/key/)){var b=a.which||a.keyCode;var m=Event.Keys.keyOf(b);if(j=="keydown"){var d=b-111; +if(d>0&&d<13){m="f"+d;}}m=m||String.fromCharCode(b).toLowerCase();}else{if(j.match(/(click|mouse|menu)/i)){k=(!k.compatMode||k.compatMode=="CSS1Compat")?k.html:k.body; +var i={x:a.pageX||a.clientX+k.scrollLeft,y:a.pageY||a.clientY+k.scrollTop};var c={x:(a.pageX)?a.pageX-f.pageXOffset:a.clientX,y:(a.pageY)?a.pageY-f.pageYOffset:a.clientY}; +if(j.match(/DOMMouseScroll|mousewheel/)){var h=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3;}var e=(a.which==3)||(a.button==2);var l=null;if(j.match(/over|out/)){switch(j){case"mouseover":l=a.relatedTarget||a.fromElement; +break;case"mouseout":l=a.relatedTarget||a.toElement;}if(!(function(){while(l&&l.nodeType==3){l=l.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){l=false; +}}}}return $extend(this,{event:a,type:j,page:i,client:c,rightClick:e,wheel:h,relatedTarget:l,target:g,code:b,key:m,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey}); +}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault(); +},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault(); +}else{this.event.returnValue=false;}return this;}});function Class(b){if(b instanceof Function){b={initialize:b};}var a=function(){Object.reset(this);if(a._prototyping){return this; +}this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c;}.extend(this); +a.implement(b);a.constructor=Class;a.prototype.constructor=a;return a;}Function.prototype.protect=function(){this._protected=true;return this;};Object.reset=function(a,c){if(c==null){for(var e in a){Object.reset(a,e); +}return a;}delete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=Object.reset(b);break;case"array":a[c]=$unlink(a[c]); +break;}return a;};new Native({name:"Class",initialize:Class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a; +},wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new Error('The method "'+b+'" cannot be called.'); +}var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); +}});Class.implement({implement:function(a,d){if($type(a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=Class.Mutators[a];if(f){d=f.call(this,d); +if(d==null){return this;}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this;}c[a]=Class.wrap(this,a,d);break;case"object":var b=c[a]; +if($type(b)=="object"){$mixin(b,d);}else{c[a]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});Class.Mutators={Extends:function(a){this.parent=a; +this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new Error('The method "'+b+'" has no parent.'); +}return c.apply(this,arguments);}.protect());},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function){b=Class.instantiate(b);}this.implement(b); +},this);}};var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false; +},clearChain:function(){this.$chain.empty();return this;}});var Events=new Class({$events:{},addEvent:function(c,b,a){c=Events.removeOn(c);if(b!=$empty){this.$events[c]=this.$events[c]||[]; +this.$events[c].include(b);if(a){b.internal=true;}}return this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this;},fireEvent:function(c,b,a){c=Events.removeOn(c); +if(!this.$events||!this.$events[c]){return this;}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})();},this);return this;},removeEvent:function(b,a){b=Events.removeOn(b); +if(!this.$events[b]){return this;}if(!a.internal){this.$events[b].erase(a);}return this;},removeEvents:function(c){var d;if($type(c)=="object"){for(d in c){this.removeEvent(d,c[d]); +}return this;}if(c){c=Events.removeOn(c);}for(d in this.$events){if(c&&c!=d){continue;}var b=this.$events[d];for(var a=b.length;a--;a){this.removeEvent(d,b[a]); +}}return this;}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments)); +if(!this.addEvent){return this;}for(var a in this.options){if($type(this.options[a])!="function"||!(/^on[A-Z]/).test(a)){continue;}this.addEvent(a,this.options[a]); +delete this.options[a];}return this;}});var Element=new Native({name:"Element",legacy:window.Element,initialize:function(a,b){var c=Element.Constructors.get(a); +if(c){return c(b);}if(typeof a=="string"){return document.newElement(a,b);}return document.id(a).set(b);},afterImplement:function(a,b){Element.Prototype[a]=b; +if(Array[a]){return;}Elements.implement(a,function(){var c=[],g=true;for(var e=0,d=this.length;e";}return document.id(this.createElement(a)).set(b);},newTextNode:function(a){return this.createTextNode(a); +},getDocument:function(){return this;},getWindow:function(){return this.window;},id:(function(){var a={string:function(d,c,b){d=b.getElementById(d);return(d)?a.element(d,c):null; +},element:function(b,e){$uid(b);if(!e&&!b.$family&&!(/^object|embed$/i).test(b.tagName)){var c=Element.Prototype;for(var d in c){b[d]=c[d];}}return b;},object:function(c,d,b){if(c.toElement){return a.element(c.toElement(b),d); +}return null;}};a.textnode=a.whitespace=a.window=a.document=$arguments(0);return function(c,e,d){if(c&&c.$family&&c.uid){return c;}var b=$type(c);return(a[b])?a[b](c,e,d||document):null; +};})()});if(window.$==null){Window.implement({$:function(a,b){return document.id(a,b,this.document);}});}Window.implement({$$:function(a){if(arguments.length==1&&typeof a=="string"){return this.document.getElements(a); +}var f=[];var c=Array.flatten(arguments);for(var d=0,b=c.length;d1);a.each(function(e){var f=this.getElementsByTagName(e.trim());(b)?c.extend(f):c=f; +},this);return new Elements(c,{ddup:b,cash:!d});}});(function(){var h={},f={};var i={input:"checked",option:"selected",textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerHTML":"value"}; +var c=function(l){return(f[l]||(f[l]={}));};var g=function(n,l){if(!n){return;}var m=n.uid;if(Browser.Engine.trident){if(n.clearAttributes){var q=l&&n.cloneNode(false); +n.clearAttributes();if(q){n.mergeAttributes(q);}}else{if(n.removeEvents){n.removeEvents();}}if((/object/i).test(n.tagName)){for(var o in n){if(typeof n[o]=="function"){n[o]=$empty; +}}Element.dispose(n);}}if(!m){return;}h[m]=f[m]=null;};var d=function(){Hash.each(h,g);if(Browser.Engine.trident){$A(document.getElementsByTagName("object")).each(g); +}if(window.CollectGarbage){CollectGarbage();}h=f=null;};var j=function(n,l,s,m,p,r){var o=n[s||l];var q=[];while(o){if(o.nodeType==1&&(!m||Element.match(o,m))){if(!p){return document.id(o,r); +}q.push(o);}o=o[l];}return(p)?new Elements(q,{ddup:false,cash:!r}):null;};var e={html:"innerHTML","class":"className","for":"htmlFor",defaultValue:"defaultValue",text:(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?"innerText":"textContent"}; +var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var k=["value","type","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"]; +b=b.associate(b);Hash.extend(e,b);Hash.extend(e,k.associate(k.map(String.toLowerCase)));var a={before:function(m,l){if(l.parentNode){l.parentNode.insertBefore(m,l); +}},after:function(m,l){if(!l.parentNode){return;}var n=l.nextSibling;(n)?l.parentNode.insertBefore(m,n):l.parentNode.appendChild(m);},bottom:function(m,l){l.appendChild(m); +},top:function(m,l){var n=l.firstChild;(n)?l.insertBefore(m,n):l.appendChild(m);}};a.inside=a.bottom;Hash.each(a,function(l,m){m=m.capitalize();Element.implement("inject"+m,function(n){l(this,document.id(n,true)); +return this;});Element.implement("grab"+m,function(n){l(document.id(n,true),this);return this;});});Element.implement({set:function(o,m){switch($type(o)){case"object":for(var n in o){this.set(n,o[n]); +}break;case"string":var l=Element.Properties.get(o);(l&&l.set)?l.set.apply(this,Array.slice(arguments,1)):this.setProperty(o,m);}return this;},get:function(m){var l=Element.Properties.get(m); +return(l&&l.get)?l.get.apply(this,Array.slice(arguments,1)):this.getProperty(m);},erase:function(m){var l=Element.Properties.get(m);(l&&l.erase)?l.erase.apply(this):this.removeProperty(m); +return this;},setProperty:function(m,n){var l=e[m];if(n==undefined){return this.removeProperty(m);}if(l&&b[m]){n=!!n;}(l)?this[l]=n:this.setAttribute(m,""+n); +return this;},setProperties:function(l){for(var m in l){this.setProperty(m,l[m]);}return this;},getProperty:function(m){var l=e[m];var n=(l)?this[l]:this.getAttribute(m,2); +return(b[m])?!!n:(l)?n:n||null;},getProperties:function(){var l=$A(arguments);return l.map(this.getProperty,this).associate(l);},removeProperty:function(m){var l=e[m]; +(l)?this[l]=(l&&b[m])?false:"":this.removeAttribute(m);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this; +},hasClass:function(l){return this.className.contains(l," ");},addClass:function(l){if(!this.hasClass(l)){this.className=(this.className+" "+l).clean(); +}return this;},removeClass:function(l){this.className=this.className.replace(new RegExp("(^|\\s)"+l+"(?:\\s|$)"),"$1");return this;},toggleClass:function(l){return this.hasClass(l)?this.removeClass(l):this.addClass(l); +},adopt:function(){Array.flatten(arguments).each(function(l){l=document.id(l,true);if(l){this.appendChild(l);}},this);return this;},appendText:function(m,l){return this.grab(this.getDocument().newTextNode(m),l); +},grab:function(m,l){a[l||"bottom"](document.id(m,true),this);return this;},inject:function(m,l){a[l||"bottom"](this,document.id(m,true));return this;},replaces:function(l){l=document.id(l,true); +l.parentNode.replaceChild(this,l);return this;},wraps:function(m,l){m=document.id(m,true);return this.replaces(m).grab(m,l);},getPrevious:function(l,m){return j(this,"previousSibling",null,l,false,m); +},getAllPrevious:function(l,m){return j(this,"previousSibling",null,l,true,m);},getNext:function(l,m){return j(this,"nextSibling",null,l,false,m);},getAllNext:function(l,m){return j(this,"nextSibling",null,l,true,m); +},getFirst:function(l,m){return j(this,"nextSibling","firstChild",l,false,m);},getLast:function(l,m){return j(this,"previousSibling","lastChild",l,false,m); +},getParent:function(l,m){return j(this,"parentNode",null,l,false,m);},getParents:function(l,m){return j(this,"parentNode",null,l,true,m);},getSiblings:function(l,m){return this.getParent().getChildren(l,m).erase(this); +},getChildren:function(l,m){return j(this,"nextSibling","firstChild",l,true,m);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument; +},getElementById:function(o,n){var m=this.ownerDocument.getElementById(o);if(!m){return null;}for(var l=m.parentNode;l!=this;l=l.parentNode){if(!l){return null; +}}return document.id(m,n);},getSelected:function(){return new Elements($A(this.options).filter(function(l){return l.selected;}));},getComputedStyle:function(m){if(this.currentStyle){return this.currentStyle[m.camelCase()]; +}var l=this.getDocument().defaultView.getComputedStyle(this,null);return(l)?l.getPropertyValue([m.hyphenate()]):null;},toQueryString:function(){var l=[]; +this.getElements("input, select, textarea",true).each(function(m){if(!m.name||m.disabled||m.type=="submit"||m.type=="reset"||m.type=="file"){return;}var n=(m.tagName.toLowerCase()=="select")?Element.getSelected(m).map(function(o){return o.value; +}):((m.type=="radio"||m.type=="checkbox")&&!m.checked)?null:m.value;$splat(n).each(function(o){if(typeof o!="undefined"){l.push(m.name+"="+encodeURIComponent(o)); +}});});return l.join("&");},clone:function(o,l){o=o!==false;var r=this.cloneNode(o);var n=function(v,u){if(!l){v.removeAttribute("id");}if(Browser.Engine.trident){v.clearAttributes(); +v.mergeAttributes(u);v.removeAttribute("uid");if(v.options){var w=v.options,s=u.options;for(var t=w.length;t--;){w[t].selected=s[t].selected;}}}var x=i[u.tagName.toLowerCase()]; +if(x&&u[x]){v[x]=u[x];}};if(o){var p=r.getElementsByTagName("*"),q=this.getElementsByTagName("*");for(var m=p.length;m--;){n(p[m],q[m]);}}n(r,this);return document.id(r); +},destroy:function(){Element.empty(this);Element.dispose(this);g(this,true);return null;},empty:function(){$A(this.childNodes).each(function(l){Element.destroy(l); +});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},hasChild:function(l){l=document.id(l,true);if(!l){return false; +}if(Browser.Engine.webkit&&Browser.Engine.version<420){return $A(this.getElementsByTagName(l.tagName)).contains(l);}return(this.contains)?(this!=l&&this.contains(l)):!!(this.compareDocumentPosition(l)&16); +},match:function(l){return(!l||(l==this)||(Element.get(this,"tag")==l));}});Native.implement([Element,Window,Document],{addListener:function(o,n){if(o=="unload"){var l=n,m=this; +n=function(){m.removeListener("unload",n);l();};}else{h[this.uid]=this;}if(this.addEventListener){this.addEventListener(o,n,false);}else{this.attachEvent("on"+o,n); +}return this;},removeListener:function(m,l){if(this.removeEventListener){this.removeEventListener(m,l,false);}else{this.detachEvent("on"+m,l);}return this; +},retrieve:function(m,l){var o=c(this.uid),n=o[m];if(l!=undefined&&n==undefined){n=o[m]=l;}return $pick(n);},store:function(m,l){var n=c(this.uid);n[m]=l; +return this;},eliminate:function(l){var m=c(this.uid);delete m[l];return this;}});window.addListener("unload",d);})();Element.Properties=new Hash;Element.Properties.style={set:function(a){this.style.cssText=a; +},get:function(){return this.style.cssText;},erase:function(){this.style.cssText="";}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase(); +}};Element.Properties.html=(function(){var c=document.createElement("div");var a={table:[1,"","
"],select:[1,""],tbody:[2,"","
"],tr:[3,"","
"]}; +a.thead=a.tfoot=a.tbody;var b={set:function(){var e=Array.flatten(arguments).join("");var f=Browser.Engine.trident&&a[this.get("tag")];if(f){var g=c;g.innerHTML=f[1]+e+f[2]; +for(var d=f[0];d--;){g=g.firstChild;}this.empty().adopt(g.childNodes);}else{this.innerHTML=e;}}};b.erase=b.set;return b;})();if(Browser.Engine.webkit&&Browser.Engine.version<420){Element.Properties.text={get:function(){if(this.innerText){return this.innerText; +}var a=this.ownerDocument.newElement("div",{html:this.innerHTML}).inject(this.ownerDocument.body);var b=a.innerText;a.destroy();return b;}};}Element.Properties.events={set:function(a){this.addEvents(a); +}};Native.implement([Element,Window,Document],{addEvent:function(e,g){var h=this.retrieve("events",{});h[e]=h[e]||{keys:[],values:[]};if(h[e].keys.contains(g)){return this; +}h[e].keys.push(g);var f=e,a=Element.Events.get(e),c=g,i=this;if(a){if(a.onAdd){a.onAdd.call(this,g);}if(a.condition){c=function(j){if(a.condition.call(this,j)){return g.call(this,j); +}return true;};}f=a.base||f;}var d=function(){return g.call(i);};var b=Element.NativeEvents[f];if(b){if(b==2){d=function(j){j=new Event(j,i.getWindow()); +if(c.call(i,j)===false){j.stop();}};}this.addListener(f,d);}h[e].values.push(d);return this;},removeEvent:function(c,b){var a=this.retrieve("events");if(!a||!a[c]){return this; +}var f=a[c].keys.indexOf(b);if(f==-1){return this;}a[c].keys.splice(f,1);var e=a[c].values.splice(f,1)[0];var d=Element.Events.get(c);if(d){if(d.onRemove){d.onRemove.call(this,b); +}c=d.base||c;}return(Element.NativeEvents[c])?this.removeListener(c,e):this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this; +},removeEvents:function(a){var c;if($type(a)=="object"){for(c in a){this.removeEvent(c,a[c]);}return this;}var b=this.retrieve("events");if(!b){return this; +}if(!a){for(c in b){this.removeEvents(c);}this.eliminate("events");}else{if(b[a]){while(b[a].keys[0]){this.removeEvent(a,b[a].keys[0]);}b[a]=null;}}return this; +},fireEvent:function(d,b,a){var c=this.retrieve("events");if(!c||!c[d]){return this;}c[d].keys.each(function(e){e.create({bind:this,delay:a,"arguments":b})(); +},this);return this;},cloneEvents:function(d,a){d=document.id(d);var c=d.retrieve("events");if(!c){return this;}if(!a){for(var b in c){this.cloneEvents(d,b); +}}else{if(c[a]){c[a].keys.each(function(e){this.addEvent(a,e);},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1}; +(function(){var a=function(b){var c=b.relatedTarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.hasChild(c)); +};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}}); +})();Element.Properties.styles={set:function(a){this.setStyles(a);}};Element.Properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"; +}}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(Browser.Engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")"; +}this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};Element.implement({setOpacity:function(a){return this.set("opacity",a,true); +},getOpacity:function(){return this.get("opacity");},setStyle:function(b,a){switch(b){case"opacity":return this.set("opacity",parseFloat(a));case"float":b=(Browser.Engine.trident)?"styleFloat":"cssFloat"; +}b=b.camelCase();if($type(a)!="string"){var c=(Element.Styles.get(b)||"@").split(" ");a=$splat(a).map(function(e,d){if(!c[d]){return"";}return($type(e)=="number")?c[d].replace("@",Math.round(e)):e; +}).join(" ");}else{if(a==String(Number(a))){a=Math.round(a);}}this.style[b]=a;return this;},getStyle:function(g){switch(g){case"opacity":return this.get("opacity"); +case"float":g=(Browser.Engine.trident)?"styleFloat":"cssFloat";}g=g.camelCase();var a=this.style[g];if(!$chk(a)){a=[];for(var f in Element.ShortStyles){if(g!=f){continue; +}for(var e in Element.ShortStyles[f]){a.push(this.getStyle(e));}return a.join(" ");}a=this.getComputedStyle(g);}if(a){a=String(a);var c=a.match(/rgba?\([\d\s,]+\)/); +if(c){a=a.replace(c[0],c[0].rgbToHex());}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(a,10)))){if(g.test(/^(height|width)$/)){var b=(g=="width")?["left","right"]:["top","bottom"],d=0; +b.each(function(h){d+=this.getStyle("border-"+h+"-width").toInt()+this.getStyle("padding-"+h).toInt();},this);return this["offset"+g.capitalize()]-d+"px"; +}if((Browser.Engine.presto)&&String(a).test("px")){return a;}if(g.test(/(border(.+)Width|margin|padding)/)){return"0px";}}return a;},setStyles:function(b){for(var a in b){this.setStyle(a,b[a]); +}return this;},getStyles:function(){var a={};Array.flatten(arguments).each(function(b){a[b]=this.getStyle(b);},this);return a;}});Element.Styles=new Hash({left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"}); +Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(g){var f=Element.ShortStyles; +var b=Element.Styles;["margin","padding"].each(function(h){var i=h+g;f[h][i]=b[i]="@px";});var e="border"+g;f.border[e]=b[e]="@px @ rgb(@, @, @)";var d=e+"Width",a=e+"Style",c=e+"Color"; +f[e]={};f.borderWidth[d]=f[e][d]=b[d]="@px";f.borderStyle[a]=f[e][a]=b[a]="@";f.borderColor[c]=f[e][c]=b[c]="rgb(@, @, @)";});(function(){Element.implement({scrollTo:function(h,i){if(b(this)){this.getWindow().scrollTo(h,i); +}else{this.scrollLeft=h;this.scrollTop=i;}return this;},getSize:function(){if(b(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight}; +},getScrollSize:function(){if(b(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(b(this)){return this.getWindow().getScroll(); +}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var i=this,h={x:0,y:0};while(i&&!b(i)){h.x+=i.scrollLeft;h.y+=i.scrollTop;i=i.parentNode; +}return h;},getOffsetParent:function(){var h=this;if(b(h)){return null;}if(!Browser.Engine.trident){return h.offsetParent;}while((h=h.parentNode)&&!b(h)){if(d(h,"position")!="static"){return h; +}}return null;},getOffsets:function(){if(this.getBoundingClientRect){var j=this.getBoundingClientRect(),m=document.id(this.getDocument().documentElement),p=m.getScroll(),k=this.getScrolls(),i=this.getScroll(),h=(d(this,"position")=="fixed"); +return{x:j.left.toInt()+k.x-i.x+((h)?0:p.x)-m.clientLeft,y:j.top.toInt()+k.y-i.y+((h)?0:p.y)-m.clientTop};}var l=this,n={x:0,y:0};if(b(this)){return n; +}while(l&&!b(l)){n.x+=l.offsetLeft;n.y+=l.offsetTop;if(Browser.Engine.gecko){if(!f(l)){n.x+=c(l);n.y+=g(l);}var o=l.parentNode;if(o&&d(o,"overflow")!="visible"){n.x+=c(o); +n.y+=g(o);}}else{if(l!=this&&Browser.Engine.webkit){n.x+=c(l);n.y+=g(l);}}l=l.offsetParent;}if(Browser.Engine.gecko&&!f(this)){n.x-=c(this);n.y-=g(this); +}return n;},getPosition:function(k){if(b(this)){return{x:0,y:0};}var l=this.getOffsets(),i=this.getScrolls();var h={x:l.x-i.x,y:l.y-i.y};var j=(k&&(k=document.id(k)))?k.getPosition():{x:0,y:0}; +return{x:h.x-j.x,y:h.y-j.y};},getCoordinates:function(j){if(b(this)){return this.getWindow().getCoordinates();}var h=this.getPosition(j),i=this.getSize(); +var k={left:h.x,top:h.y,width:i.x,height:i.y};k.right=k.left+k.width;k.bottom=k.top+k.height;return k;},computePosition:function(h){return{left:h.x-e(this,"margin-left"),top:h.y-e(this,"margin-top")}; +},setPosition:function(h){return this.setStyles(this.computePosition(h));}});Native.implement([Document,Window],{getSize:function(){if(Browser.Engine.presto||Browser.Engine.webkit){var i=this.getWindow(); +return{x:i.innerWidth,y:i.innerHeight};}var h=a(this);return{x:h.clientWidth,y:h.clientHeight};},getScroll:function(){var i=this.getWindow(),h=a(this); +return{x:i.pageXOffset||h.scrollLeft,y:i.pageYOffset||h.scrollTop};},getScrollSize:function(){var i=a(this),h=this.getSize();return{x:Math.max(i.scrollWidth,h.x),y:Math.max(i.scrollHeight,h.y)}; +},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var h=this.getSize();return{top:0,left:0,bottom:h.y,right:h.x,height:h.y,width:h.x}; +}});var d=Element.getComputedStyle;function e(h,i){return d(h,i).toInt()||0;}function f(h){return d(h,"-moz-box-sizing")=="border-box";}function g(h){return e(h,"border-top-width"); +}function c(h){return e(h,"border-left-width");}function b(h){return(/^(?:body|html)$/i).test(h.tagName);}function a(h){var i=h.getDocument();return(!i.compatMode||i.compatMode=="CSS1Compat")?i.html:i.body; +}})();Element.alias("setPosition","position");Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x; +},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y; +},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x; +}});Native.implement([Document,Element],{getElements:function(h,g){h=h.split(",");var c,e={};for(var d=0,b=h.length;d1),cash:!g});}});Element.implement({match:function(b){if(!b||(b==this)){return true; +}var d=Selectors.Utils.parseTagAndID(b);var a=d[0],e=d[1];if(!Selectors.Filters.byID(this,e)||!Selectors.Filters.byTag(this,a)){return false;}var c=Selectors.Utils.parseSelector(b); +return(c)?Selectors.Utils.filter(this,c,{}):true;}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)}; +Selectors.Utils={chk:function(b,c){if(!c){return true;}var a=$uid(b);if(!c[a]){return c[a]=true;}return false;},parseNthArgument:function(h){if(Selectors.Cache.nth[h]){return Selectors.Cache.nth[h]; +}var e=h.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!e){return false;}var g=parseInt(e[1],10);var d=(g||g===0)?g:1;var f=e[2]||false;var c=parseInt(e[3],10)||0; +if(d!=0){c--;while(c<1){c+=d;}while(c>=d){c-=d;}}else{d=c;f="index";}switch(f){case"n":e={a:d,b:c,special:"n"};break;case"odd":e={a:2,b:0,special:"n"}; +break;case"even":e={a:2,b:1,special:"n"};break;case"first":e={a:0,special:"index"};break;case"last":e={special:"last-child"};break;case"only":e={special:"only-child"}; +break;default:e={a:(d-1),special:"index"};}return Selectors.Cache.nth[h]=e;},parseSelector:function(e){if(Selectors.Cache.parsed[e]){return Selectors.Cache.parsed[e]; +}var d,h={classes:[],pseudos:[],attributes:[]};while((d=Selectors.RegExps.combined.exec(e))){var i=d[1],g=d[2],f=d[3],b=d[5],c=d[6],j=d[7];if(i){h.classes.push(i); +}else{if(c){var a=Selectors.Pseudo.get(c);if(a){h.pseudos.push({parser:a,argument:j});}else{h.attributes.push({name:c,operator:"=",value:j});}}else{if(g){h.attributes.push({name:g,operator:f,value:b}); +}}}}if(!h.classes.length){delete h.classes;}if(!h.attributes.length){delete h.attributes;}if(!h.pseudos.length){delete h.pseudos;}if(!h.classes&&!h.attributes&&!h.pseudos){h=null; +}return Selectors.Cache.parsed[e]=h;},parseTagAndID:function(b){var a=b.match(Selectors.RegExps.tag);var c=b.match(Selectors.RegExps.id);return[(a)?a[1]:"*",(c)?c[1]:false]; +},filter:function(f,c,e){var d;if(c.classes){for(d=c.classes.length;d--;d){var g=c.classes[d];if(!Selectors.Filters.byClass(f,g)){return false;}}}if(c.attributes){for(d=c.attributes.length; +d--;d){var b=c.attributes[d];if(!Selectors.Filters.byAttribute(f,b.name,b.operator,b.value)){return false;}}}if(c.pseudos){for(d=c.pseudos.length;d--;d){var a=c.pseudos[d]; +if(!Selectors.Filters.byPseudo(f,a.parser,a.argument,e)){return false;}}}return true;},getByTagAndID:function(b,a,d){if(d){var c=(b.getElementById)?b.getElementById(d,true):Element.getElementById(b,d,true); +return(c&&Selectors.Filters.byTag(c,a))?[c]:[];}else{return b.getElementsByTagName(a);}},search:function(o,h,t){var b=[];var c=h.trim().replace(Selectors.RegExps.splitter,function(k,j,i){b.push(j); +return":)"+i;}).split(":)");var p,e,A;for(var z=0,v=c.length;z":function(h,g,j,a,f){var c=Selectors.Utils.getByTagAndID(g,j,a);for(var e=0,d=c.length;ea){return false;}}return(c==a);},even:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n+1",a); +},odd:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n",a);},selected:function(){return this.selected;},enabled:function(){return(this.disabled===false); +}});Element.Events.domready={onAdd:function(a){if(Browser.loaded){a.call(this);}}};(function(){var b=function(){if(Browser.loaded){return;}Browser.loaded=true; +window.fireEvent("domready");document.fireEvent("domready");};window.addEvent("load",b);if(Browser.Engine.trident){var a=document.createElement("div"); +(function(){($try(function(){a.doScroll();return document.id(a).inject(document.body).set("html","temp").dispose();}))?b():arguments.callee.delay(50);})(); +}else{if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(["loaded","complete"].contains(document.readyState))?b():arguments.callee.delay(50); +})();}else{document.addEvent("DOMContentLoaded",b);}}})();var JSON=new Hash(this.JSON&&{stringify:JSON.stringify,parse:JSON.parse}).extend({$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(a){return JSON.$specialChars[a]||"\\u00"+Math.floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16); +},encode:function(b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).clean())+"]"; +case"object":case"hash":var a=[];Hash.each(b,function(e,d){var c=JSON.encode(e);if(c){a.push(JSON.encode(d)+":"+c);}});return"{"+a+"}";case"number":case"boolean":return String(b); +case false:return"null";}return null;},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null; +}return eval("("+string+")");}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(b,a){this.key=b; +this.setOptions(a);},write:function(b){b=encodeURIComponent(b);if(this.options.domain){b+="; domain="+this.options.domain;}if(this.options.path){b+="; path="+this.options.path; +}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString();}if(this.options.secure){b+="; secure"; +}this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)"); +return(a)?decodeURIComponent(a[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(b,c,a){return new Cookie(b,a).write(c); +};Cookie.read=function(a){return new Cookie(a).read();};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose();};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object; +},initialize:function(l,m){this.instance="Swiff_"+$time();this.setOptions(m);m=this.options;var b=this.id=m.id||this.instance;var a=document.id(m.container); +Swiff.CallBacks[this.instance]={};var e=m.params,g=m.vars,f=m.callBacks;var h=$extend({height:m.height,width:m.width},m.properties);var k=this;for(var d in f){Swiff.CallBacks[this.instance][d]=(function(n){return function(){return n.apply(k.object,arguments); +};})(f[d]);g[d]="Swiff.CallBacks."+this.instance+"."+d;}e.flashVars=Hash.toQueryString(g);if(Browser.Engine.trident){h.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; +e.movie=l;}else{h.type="application/x-shockwave-flash";h.data=l;}var j=''; +}}j+="";this.object=((a)?a.empty():new Element("div")).set("html",j).firstChild;},replaces:function(a){a=document.id(a,true);a.parentNode.replaceChild(this.toElement(),a); +return this;},inject:function(a){document.id(a,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments)); +}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction(''+__flash__argumentsToXML(arguments,2)+""); +return eval(rs);};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore"},initialize:function(a){this.subject=this.subject||this; +this.setOptions(a);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var b=this.options.wait;if(b===false){this.options.link="cancel"; +}},getTransition:function(){return function(a){return -(Math.cos(Math.PI*a)-1)/2;};},step:function(){var a=$time();if(a=(7-4*d)/11){e=c*c-Math.pow((11-6*d-11*f)/4,2); +break;}}return e;},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,[a+2]); +});});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,noCache:false},initialize:function(a){this.xhr=new Browser.Request(); +this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return; +}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML}; +this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}},isSuccess:function(){return((this.status>=200)&&(this.status<300)); +},processScripts:function(a){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(a);}return a.stripScripts(this.options.evalScripts); +},success:function(b,a){this.onSuccess(this.processScripts(b),a);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain(); +},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},setHeader:function(a,b){this.headers.set(a,b); +return this;},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a);}.bind(this));},check:function(){if(!this.running){return true; +}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},send:function(k){if(!this.check(k)){return this; +}this.running=true;var i=$type(k);if(i=="string"||i=="element"){k={data:k};}var d=this.options;k=$extend({data:d.data,url:d.url,method:d.method},k);var g=k.data,b=String(k.url),a=k.method.toLowerCase(); +switch($type(g)){case"element":g=document.id(g).toQueryString();break;case"object":case"hash":g=Hash.toQueryString(g);}if(this.options.format){var j="format="+this.options.format; +g=(g)?j+"&"+g:j;}if(this.options.emulation&&!["get","post"].contains(a)){var h="_method="+a;g=(g)?h+"&"+g:h;a="post";}if(this.options.urlEncoded&&a=="post"){var c=(this.options.encoding)?"; charset="+this.options.encoding:""; +this.headers.set("Content-type","application/x-www-form-urlencoded"+c);}if(this.options.noCache){var f="noCache="+new Date().getTime();g=(g)?f+"&"+g:f; +}var e=b.lastIndexOf("/");if(e>-1&&(e=b.indexOf("#"))>-1){b=b.substr(0,e);}if(g&&a=="get"){b=b+(b.contains("?")?"&":"?")+g;g=null;}this.xhr.open(a.toUpperCase(),b,this.options.async); +this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(m,l){try{this.xhr.setRequestHeader(l,m);}catch(n){this.fireEvent("exception",[l,m]); +}},this);this.fireEvent("request");this.xhr.send(g);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this; +}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});(function(){var a={}; +["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined}); +return this.send($extend(c,{method:b}));};});Request.implement(a);})();Element.Properties.send={set:function(a){var b=this.retrieve("send");if(b){b.cancel(); +}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},a));},get:function(a){if(a||!this.retrieve("send")){if(a||!this.retrieve("send:options")){this.set("send",a); +}this.store("send",new Request(this.retrieve("send:options")));}return this.retrieve("send");}};Element.implement({send:function(a){var b=this.get("send"); +b.send({data:this,url:a||b.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false},processHTML:function(c){var b=c.match(/]*>([\s\S]*?)<\/body>/i); +c=(b)?b[1]:c;var a=new Element("div");return $try(function(){var d=""+c+"",g;if(Browser.Engine.trident){g=new ActiveXObject("Microsoft.XMLDOM"); +g.async=false;g.loadXML(d);}else{g=new DOMParser().parseFromString(d,"text/xml");}d=g.getElementsByTagName("root")[0];if(!d){return null;}for(var f=0,e=d.childNodes.length; +f. Copyright (c) 2006-2009 Aaron Newton , Valerio Proietti & the MooTools team , MIT Style License. + +MooTools.More={version:"1.2.4.4",build:"6f6057dc645fdb7547689183b2311063bd653ddf"};Class.refactor=function(b,a){$each(a,function(e,d){var c=b.prototype[d]; +if(c&&(c=c._origin)&&typeof e=="function"){b.implement(d,function(){var f=this.previous;this.previous=c;var g=e.apply(this,arguments);this.previous=f;return g; +});}else{b.implement(d,e);}});return b;};Class.Mutators.Binds=function(a){return a;};Class.Mutators.initialize=function(a){return function(){$splat(this.Binds).each(function(b){var c=this[b]; +if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);};};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property); +if(a&&!$defined(this.occluded)){return this.occluded=a;}this.occluded=false;b.store(c||this.property,this);return this.occluded;}});Element.implement({measure:function(e){var g=function(h){return !!(!h||h.offsetHeight||h.offsetWidth); +};if(g(this)){return e.apply(this);}var d=this.getParent(),f=[],b=[];while(!g(d)&&d!=document.body){b.push(d.expose());d=d.getParent();}var c=this.expose(); +var a=e.apply(this);c();b.each(function(h){h();});return a;},expose:function(){if(this.getStyle("display")!="none"){return $empty;}var a=this.style.cssText; +this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=a;}.bind(this);},getDimensions:function(a){a=$merge({computeSize:false},a); +var f={};var d=function(g,e){return(e.computeSize)?g.getComputedSize(e):g.getSize();};var b=this.getParent("body");if(b&&this.getStyle("display")=="none"){f=this.measure(function(){return d(this,a); +});}else{if(b){try{f=d(this,a);}catch(c){}}else{f={x:0,y:0};}}return $chk(f.x)?$extend(f,{width:f.x,height:f.y}):$extend(f,{x:f.width,y:f.height});},getComputedSize:function(a){a=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},a); +var c={width:0,height:0};switch(a.mode){case"vertical":delete c.width;delete a.plains.width;break;case"horizontal":delete c.height;delete a.plains.height; +break;}var b=[];$each(a.plains,function(g,f){g.each(function(h){a.styles.each(function(i){b.push((i=="border")?i+"-"+h+"-width":i+"-"+h);});});});var e={}; +b.each(function(f){e[f]=this.getComputedStyle(f);},this);var d=[];$each(a.plains,function(g,f){var h=f.capitalize();c["total"+h]=c["computed"+h]=0;g.each(function(i){c["computed"+i.capitalize()]=0; +b.each(function(k,j){if(k.test(i)){e[k]=e[k].toInt()||0;c["total"+h]=c["total"+h]+e[k];c["computed"+i.capitalize()]=c["computed"+i.capitalize()]+e[k];}if(k.test(i)&&f!=k&&(k.test("border")||k.test("padding"))&&!d.contains(k)){d.push(k); +c["computed"+h]=c["computed"+h]-e[k];}});});});["Width","Height"].each(function(g){var f=g.toLowerCase();if(!$chk(c[f])){return;}c[f]=c[f]+this["offset"+g]+c["computed"+g]; +c["total"+g]=c[f]+c["total"+g];delete c["computed"+g];},this);return $extend(e,c);}});(function(){var a=Element.prototype.position;Element.implement({position:function(g){if(g&&($defined(g.x)||$defined(g.y))){return a?a.apply(this,arguments):this; +}$each(g||{},function(u,t){if(!$defined(u)){delete g[t];}});g=$merge({relativeTo:document.body,position:{x:"center",y:"center"},edge:false,offset:{x:0,y:0},returnPos:false,relFixedPosition:false,ignoreMargins:false,ignoreScroll:false,allowNegative:false},g); +var r={x:0,y:0},e=false;var c=this.measure(function(){return document.id(this.getOffsetParent());});if(c&&c!=this.getDocument().body){r=c.measure(function(){return this.getPosition(); +});e=c!=document.id(g.relativeTo);g.offset.x=g.offset.x-r.x;g.offset.y=g.offset.y-r.y;}var s=function(t){if($type(t)!="string"){return t;}t=t.toLowerCase(); +var u={};if(t.test("left")){u.x="left";}else{if(t.test("right")){u.x="right";}else{u.x="center";}}if(t.test("upper")||t.test("top")){u.y="top";}else{if(t.test("bottom")){u.y="bottom"; +}else{u.y="center";}}return u;};g.edge=s(g.edge);g.position=s(g.position);if(!g.edge){if(g.position.x=="center"&&g.position.y=="center"){g.edge={x:"center",y:"center"}; +}else{g.edge={x:"left",y:"top"};}}this.setStyle("position","absolute");var f=document.id(g.relativeTo)||document.body,d=f==document.body?window.getScroll():f.getPosition(),l=d.y,h=d.x; +var n=this.getDimensions({computeSize:true,styles:["padding","border","margin"]});var j={},o=g.offset.y,q=g.offset.x,k=window.getSize();switch(g.position.x){case"left":j.x=h+q; +break;case"right":j.x=h+q+f.offsetWidth;break;default:j.x=h+((f==document.body?k.x:f.offsetWidth)/2)+q;break;}switch(g.position.y){case"top":j.y=l+o;break; +case"bottom":j.y=l+o+f.offsetHeight;break;default:j.y=l+((f==document.body?k.y:f.offsetHeight)/2)+o;break;}if(g.edge){var b={};switch(g.edge.x){case"left":b.x=0; +break;case"right":b.x=-n.x-n.computedRight-n.computedLeft;break;default:b.x=-(n.totalWidth/2);break;}switch(g.edge.y){case"top":b.y=0;break;case"bottom":b.y=-n.y-n.computedTop-n.computedBottom; +break;default:b.y=-(n.totalHeight/2);break;}j.x+=b.x;j.y+=b.y;}j={left:((j.x>=0||e||g.allowNegative)?j.x:0).toInt(),top:((j.y>=0||e||g.allowNegative)?j.y:0).toInt()}; +var i={left:"x",top:"y"};["minimum","maximum"].each(function(t){["left","top"].each(function(u){var v=g[t]?g[t][i[u]]:null;if(v!=null&&j[u]this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("start",[this.element,a]).fireEvent("snap",this.element); +}},drag:function(a){if(this.options.preventDefault){a.preventDefault();}this.mouse.now=a.page;for(var b in this.options.modifiers){if(!this.options.modifiers[b]){continue; +}this.value.now[b]=this.mouse.now[b]-this.mouse.pos[b];if(this.options.invert){this.value.now[b]*=-1;}if(this.options.limit&&this.limit[b]){if($chk(this.limit[b][1])&&(this.value.now[b]>this.limit[b][1])){this.value.now[b]=this.limit[b][1]; +}else{if($chk(this.limit[b][0])&&(this.value.now[b]0)^(a0)^(a>this.max))){a=this.max;}this.step=Math.round(a);this.checkStep();this.fireEvent("tick",this.toPosition(this.step));this.end();return this; +},clickedElement:function(c){if(this.isDragging||c.target==this.knob){return;}var b=this.range<0?-1:1;var a=c.page[this.axis]-this.element.getPosition()[this.axis]-this.half; +a=a.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+b*this.toStep(a));this.checkStep();this.fireEvent("tick",a); +this.end();},scrolledElement:function(a){var b=(this.options.mode=="horizontal")?(a.wheel<0):(a.wheel>0);this.set(b?this.step-this.stepSize:this.step+this.stepSize); +a.stop();},draggedKnob:function(){var b=this.range<0?-1:1;var a=this.drag.value.now[this.axis];a=a.limit(-this.options.offset,this.full-this.options.offset); +this.step=Math.round(this.min+b*this.toStep(a));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step; +this.fireEvent("change",this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("complete",this.step+""); +}},toStep:function(a){var b=(a+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(b-=b%this.stepSize):b;},toPosition:function(a){return(this.full*Math.abs(this.min-a))/(this.steps*this.stepSize)-this.options.offset; +}});var Asset={javascript:function(f,d){d=$extend({onload:$empty,document:document,check:$lambda(true)},d);if(d.onLoad){d.onload=d.onLoad;}var b=new Element("script",{src:f,type:"text/javascript"}); +var e=d.onload.bind(b),a=d.check,g=d.document;delete d.onload;delete d.check;delete d.document;b.addEvents({load:e,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){e(); +}}}).set(d);if(Browser.Engine.webkit419){var c=(function(){if(!$try(a)){return;}$clear(c);e();}).periodical(50);}return b.inject(g.head);},css:function(b,a){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:b},a)).inject(document.head); +},image:function(c,b){b=$merge({onload:$empty,onabort:$empty,onerror:$empty},b);var d=new Image();var a=document.id(d)||new Element("img");["load","abort","error"].each(function(e){var g="on"+e; +var f=e.capitalize();if(b["on"+f]){b[g]=b["on"+f];}var h=b[g];delete b[g];d[g]=function(){if(!d){return;}if(!a.parentNode){a.width=d.width;a.height=d.height; +}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);}return a.set(b);},images:function(d,c){c=$merge({onComplete:$empty,onProgress:$empty,onError:$empty,properties:{}},c); +d=$splat(d);var a=[];var b=0;return new Elements(d.map(function(e){return Asset.image(e,$extend(c.properties,{onload:function(){c.onProgress.call(this,b,d.indexOf(e)); +b++;if(b==d.length){c.onComplete();}},onerror:function(){c.onError.call(this,b,d.indexOf(e));b++;if(b==d.length){c.onComplete();}}}));}));}};var IframeShim=new Class({Implements:[Options,Events,Class.Occlude],options:{className:"iframeShim",src:'javascript:false;document.write("");',display:false,zIndex:null,margin:0,offset:{x:0,y:0},browsers:(Browser.Engine.trident4||(Browser.Engine.gecko&&!Browser.Engine.gecko19&&Browser.Platform.mac))},property:"IframeShim",initialize:function(b,a){this.element=document.id(b); +if(this.occlude()){return this.occluded;}this.setOptions(a);this.makeShim();return this;},makeShim:function(){if(this.options.browsers){var c=this.element.getStyle("zIndex").toInt(); +if(!c){c=1;var b=this.element.getStyle("position");if(b=="static"||!b){this.element.setStyle("position","relative");}this.element.setStyle("zIndex",c); +}c=($chk(this.options.zIndex)&&c>this.options.zIndex)?this.options.zIndex:c-1;if(c<0){c=1;}this.shim=new Element("iframe",{src:this.options.src,scrolling:"no",frameborder:0,styles:{zIndex:c,position:"absolute",border:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"},"class":this.options.className}).store("IframeShim",this); +var a=(function(){this.shim.inject(this.element,"after");this[this.options.display?"show":"hide"]();this.fireEvent("inject");}).bind(this);if(!IframeShim.ready){window.addEvent("load",a); +}else{a();}}else{this.position=this.hide=this.show=this.dispose=$lambda(this);}},position:function(){if(!IframeShim.ready||!this.shim){return this;}var a=this.element.measure(function(){return this.getSize(); +});if(this.options.margin!=undefined){a.x=a.x-(this.options.margin*2);a.y=a.y-(this.options.margin*2);this.options.offset.x+=this.options.margin;this.options.offset.y+=this.options.margin; +}this.shim.set({width:a.x,height:a.y}).position({relativeTo:this.element,offset:this.options.offset});return this;},hide:function(){if(this.shim){this.shim.setStyle("display","none"); +}return this;},show:function(){if(this.shim){this.shim.setStyle("display","block");}return this.position();},dispose:function(){if(this.shim){this.shim.dispose(); +}return this;},destroy:function(){if(this.shim){this.shim.destroy();}return this;}});window.addEvent("load",function(){IframeShim.ready=true;});var Mask=new Class({Implements:[Options,Events],Binds:["position"],options:{style:{},"class":"mask",maskMargins:false,useIframeShim:true,iframeShimOptions:{}},initialize:function(b,a){this.target=document.id(b)||document.id(document.body); +this.target.store("Mask",this);this.setOptions(a);this.render();this.inject();},render:function(){this.element=new Element("div",{"class":this.options["class"],id:this.options.id||"mask-"+$time(),styles:$merge(this.options.style,{display:"none"}),events:{click:function(){this.fireEvent("click"); +if(this.options.hideOnClick){this.hide();}}.bind(this)}});this.hidden=true;},toElement:function(){return this.element;},inject:function(b,a){a=a||this.options.inject?this.options.inject.where:""||this.target==document.body?"inside":"after"; +b=b||this.options.inject?this.options.inject.target:""||this.target;this.element.inject(b,a);if(this.options.useIframeShim){this.shim=new IframeShim(this.element,this.options.iframeShimOptions); +this.addEvents({show:this.shim.show.bind(this.shim),hide:this.shim.hide.bind(this.shim),destroy:this.shim.destroy.bind(this.shim)});}},position:function(){this.resize(this.options.width,this.options.height); +this.element.position({relativeTo:this.target,position:"topLeft",ignoreMargins:!this.options.maskMargins,ignoreScroll:this.target==document.body});return this; +},resize:function(a,e){var b={styles:["padding","border"]};if(this.options.maskMargins){b.styles.push("margin");}var d=this.target.getComputedSize(b);if(this.target==document.body){var c=window.getSize(); +if(d.totalHeight +
+
 
+
+
 
+
+
 
+
+ + +
+ + diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html --- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,15 @@ + + +
+
+
 
+
+
 
+
+
 
+ + +
+ + diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html --- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,274 @@ + + + + + @title@ + + + + + + + + + + + + + + + + + + + + + + + + + +@image_htmlcode@ + + + + diff -Nru luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ_short.html luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ_short.html --- luminance-hdr-2.5.1+dfsg/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ_short.html 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/hdrhtml/hdrhtml_hdrlabs_templ/hdrhtml_page_templ_short.html 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,44 @@ + + + + + @title@ + + + + + + + + + + + + + + + + + + + + + + + + + +@image_htmlcode@ + + + + diff -Nru luminance-hdr-2.5.1+dfsg/help/en/creating_hdr_cli.html luminance-hdr-2.6.0/help/en/creating_hdr_cli.html --- luminance-hdr-2.5.1+dfsg/help/en/creating_hdr_cli.html 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/help/en/creating_hdr_cli.html 2019-06-09 19:18:38.000000000 +0000 @@ -25,4 +25,4 @@ { } -

 

Usage: ./luminance-hdr-cli [OPTIONS]... [INPUTFILES]...:

  -h [ --help ]                 Display this help.

  -V [ --version ]              Display program version.

  -v [ --verbose ]              Print more messages during execution.

  -c [ --cameras ]              Print a list of all supported cameras.

  -a [ --align ] arg            [AIS|MTB]   Align Engine to use during HDR

                                creation (default: no alignment).

  -e [ --ev ] arg               EV1,EV2,... Specify numerical EV values (as

                                many as INPUTFILES).

  -d [ --savealigned ] arg      prefix Save aligned images to files which names

                                start with prefix

  -l [ --load ] arg             HDR_FILE Load an HDR instead of creating a new

                                one.

  -s [ --save ] arg             HDR_FILE Save to a HDR file format. (default:

                                don't save)

  -g [ --gamma ] arg            VALUE        Gamma value to use during tone

                                mapping. (default: 1)

  -r [ --resize ] arg           VALUE       Width you want to resize your HDR

                                to (resized before gamma and tone mapping)

  -o [ --output ] arg           LDR_FILE    File name you want to save your

                                tone mapped LDR to.

  -t [ --autoag ] arg           THRESHOLD   Enable auto anti-ghosting with

                                given threshold. (0.0-1.0)

  -b [ --autolevels ]           Apply autolevels correction after tonemapping.

  -w [ --createwebpage ]        Enable generation of a webpage with embedded

                                HDR viewer.

 

HDR creation parameters  - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR:

  --hdrWeight arg               weight = triangular|gaussian|plateau|flat

                                (Default is triangular)

  --hdrResponseCurve arg        response curve = from_file|linear|gamma|log|srg

                                b (Default is linear)

  --hdrModel arg                model: robertson|robertsonauto|debevec (Default

                                is debevec)

  --hdrCurveFilename arg        curve filename = your_file_here.m

 

LDR output parameters:

  -q [ --ldrQuality ] arg       VALUE      Quality of the saved tone mapped

                                file (1-100).

  --ldrTiff arg                 Tiff format. Legal values are

                                [8b|16b|32b|logluv] (Default is 8b)

  --ldrTiffDeflate arg          Tiff deflate compression. true|false (Default

                                is true)

 

HTML output parameters:

  -k [ --htmlQuality ] arg      VALUE      Quality of the interpolated

                                exposures, from the worst (1) to the best(4).

                                Higher quality will introduce less distortions

                                in the brightest and the darkest tones, but

                                will also generate more images. More images

                                means that there is more data that needs to be

                                transferred to the web-browser, making HDR

                                viewer less responsive. (Default is 2, which is

                                sufficient for most applications)

  --pageName arg                Specifies the file name, of the web page to be

                                generated. If <page_name> is missing, the file

                                name of the first image with .html extension

                                will be used. (Default is first image name)

  --imagesDir arg               Specify where to store the resulting image

                                files. Links to images in HTML will be updated

                                accordingly. This must be a relative path and

                                the directory must exist.  Useful to avoid

                                clutter in the current directory. (Default is

                                current working directory)

 

Tone mapping parameters  - no tonemapping is performed unless -o is specified:

  --tmo arg                     Tone mapping operator. Legal values are:

                                [ashikhmin|drago|durand|fattal|ferradans|pattan

                                aik|reinhard02|reinhard05|mai|mantiuk06|mantiuk

                                08] (Default is mantiuk06)

  --tmofile arg                 SETTING_FILE Load an existing setting file

                                containing pre-gamma and all TMO settings

 

 Fattal:

  --tmoFatAlpha arg             alpha FLOAT

  --tmoFatBeta arg              beta FLOAT

  --tmoFatColor arg             color FLOAT

  --tmoFatNoise arg             noise FLOAT

  --tmoFatNew arg               new true|false

 

 Ferradans:

  --tmoFerRho arg               rho FLOAT

  --tmoFerInvAlpha arg          inv_alpha FLOAT

 

 Mantiuk 06:

  --tmoM06Contrast arg          contrast FLOAT

  --tmoM06Saturation arg        saturation FLOAT

  --tmoM06Detail arg            detail FLOAT

  --tmoM06ContrastEqual arg     equalization true|false

 

 Mantiuk 08:

  --tmoM08ColorSaturation arg   color saturation FLOAT

  --tmoM08ConstrastEnh arg      contrast enhancement FLOAT

  --tmoM08LuminanceLvl arg      luminance level FLOAT

  --tmoM08SetLuminance arg      enable luminance level true|false

 

 Durand:

  --tmoDurSigmaS arg            spatial kernel sigma FLOAT

  --tmoDurSigmaR arg            range kernel sigma FLOAT

  --tmoDurBase arg              base contrast FLOAT

 

 Drago:

  --tmoDrgBias arg              bias FLOAT

 

 Reinhard 02:

  --tmoR02Key arg               key value FLOAT

  --tmoR02Phi arg               phi FLOAT

  --tmoR02Scales arg            use scales true|false

  --tmoR02Num arg               range FLOAT

  --tmoR02Low arg               lower scale FLOAT

  --tmoR02High arg              upper scale FLOAT

 

 Reinhard 05:

  --tmoR05Brightness arg        Brightness FLOAT

  --tmoR05Chroma arg            Chroma adaption FLOAT

  --tmoR05Lightness arg         Light adaption FLOAT

 

 Ashikmin:

  --tmoAshEq2 arg               Equation number 2 true|false

  --tmoAshSimple arg            Simple true|false

  --tmoAshLocal arg             Local threshold FLOAT

 

 Pattanaik:

  --tmoPatMultiplier arg        multiplier FLOAT

  --tmoPatLocal arg             Local tone mapping true|false

  --tmoPatAutoLum arg           Auto luminance true|false

  --tmoPatCone arg              cone level FLOAT

  --tmoPatRod arg               rod level FLOAT

 

+

 

Usage: ./luminance-hdr-cli [OPTIONS]... [INPUTFILES]...:

  -h [ --help ]                 Display this help.

  -V [ --version ]              Display program version.

  -v [ --verbose ]              Print more messages during execution.

  -c [ --cameras ]              Print a list of all supported cameras.

  -a [ --align ] arg            [AIS|MTB]   Align Engine to use during HDR

                                creation (default: no alignment).

  -e [ --ev ] arg               EV1,EV2,... Specify numerical EV values (as

                                many as INPUTFILES).

  -d [ --savealigned ] arg      prefix Save aligned images to files which names

                                start with prefix

  -l [ --load ] arg             HDR_FILE Load an HDR instead of creating a new

                                one.

  -s [ --save ] arg             HDR_FILE Save to a HDR file format. (default:

                                don't save)

  -g [ --gamma ] arg            VALUE        Gamma value to use during tone

                                mapping. (default: 1)

  -r [ --resize ] arg           VALUE       Width you want to resize your HDR

                                to (resized before gamma and tone mapping)

  -o [ --output ] arg           LDR_FILE    File name you want to save your

                                tone mapped LDR to.

  -t [ --autoag ] arg           THRESHOLD   Enable auto anti-ghosting with

                                given threshold. (0.0-1.0)

  -b [ --autolevels ]           Apply autolevels correction after tonemapping.

  -w [ --createwebpage ]        Enable generation of a webpage with embedded

                                HDR viewer.

 

HDR creation parameters  - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR:

  --hdrWeight arg               weight = triangular|gaussian|plateau|flat

                                (Default is triangular)

  --hdrResponseCurve arg        response curve = from_file|linear|gamma|log|srg

                                b (Default is linear)

  --hdrModel arg                model: robertson|robertsonauto|debevec (Default

                                is debevec)

  --hdrCurveFilename arg        curve filename = your_file_here.m

 

LDR output parameters:

  -q [ --ldrQuality ] arg       VALUE      Quality of the saved tone mapped

                                file (1-100).

  --ldrTiff arg                 Tiff format. Legal values are

                                [8b|16b|32b|logluv] (Default is 8b)

  --ldrTiffDeflate arg          Tiff deflate compression. true|false (Default

                                is true)

 

HTML output parameters:

  -k [ --htmlQuality ] arg      VALUE      Quality of the interpolated

                                exposures, from the worst (1) to the best(4).

                                Higher quality will introduce less distortions

                                in the brightest and the darkest tones, but

                                will also generate more images. More images

                                means that there is more data that needs to be

                                transferred to the web-browser, making HDR

                                viewer less responsive. (Default is 2, which is

                                sufficient for most applications)

  --pageName arg                Specifies the file name, of the web page to be

                                generated. If <page_name> is missing, the file

                                name of the first image with .html extension

                                will be used. (Default is first image name)

  --imagesDir arg               Specify where to store the resulting image

                                files. Links to images in HTML will be updated

                                accordingly. This must be a relative path and

                                the directory must exist.  Useful to avoid

                                clutter in the current directory. (Default is

                                current working directory)

 

Tone mapping parameters  - no tonemapping is performed unless -o is specified:

  --tmo arg                     Tone mapping operator. Legal values are:

                                [ashikhmin|drago|durand|fattal|ferradans|pattan

                                aik|reinhard02|reinhard05|mai|mantiuk06|mantiuk

                                08] (Default is mantiuk06)

  --tmofile arg                 SETTING_FILE Load an existing setting file

                                containing pre-gamma and all TMO settings

 

 Fattal:

  --tmoFatAlpha arg             alpha FLOAT

  --tmoFatBeta arg              beta FLOAT

  --tmoFatColor arg             color FLOAT

  --tmoFatNoise arg             noise FLOAT

  --tmoFatNew arg               new true|false

 

 Ferradans:

  --tmoFerRho arg               rho FLOAT

  --tmoFerInvAlpha arg          inv_alpha FLOAT

 

 Mantiuk 06:

  --tmoM06Contrast arg          contrast FLOAT

  --tmoM06Saturation arg        saturation FLOAT

  --tmoM06Detail arg            detail FLOAT

  --tmoM06ContrastEqual arg     equalization true|false

 

 Mantiuk 08:

  --tmoM08ColorSaturation arg   color saturation FLOAT

  --tmoM08ContrastEnh arg      contrast enhancement FLOAT

  --tmoM08LuminanceLvl arg      luminance level FLOAT

  --tmoM08SetLuminance arg      enable luminance level true|false

 

 Durand:

  --tmoDurSigmaS arg            spatial kernel sigma FLOAT

  --tmoDurSigmaR arg            range kernel sigma FLOAT

  --tmoDurBase arg              base contrast FLOAT

 

 Drago:

  --tmoDrgBias arg              bias FLOAT

 

 Reinhard 02:

  --tmoR02Key arg               key value FLOAT

  --tmoR02Phi arg               phi FLOAT

  --tmoR02Scales arg            use scales true|false

  --tmoR02Num arg               range FLOAT

  --tmoR02Low arg               lower scale FLOAT

  --tmoR02High arg              upper scale FLOAT

 

 Reinhard 05:

  --tmoR05Brightness arg        Brightness FLOAT

  --tmoR05Chroma arg            Chroma adaption FLOAT

  --tmoR05Lightness arg         Light adaption FLOAT

 

 Ashikmin:

  --tmoAshEq2 arg               Equation number 2 true|false

  --tmoAshSimple arg            Simple true|false

  --tmoAshLocal arg             Local threshold FLOAT

 

 Pattanaik:

  --tmoPatMultiplier arg        multiplier FLOAT

  --tmoPatLocal arg             Local tone mapping true|false

  --tmoPatAutoLum arg           Auto luminance true|false

  --tmoPatCone arg              cone level FLOAT

  --tmoPatRod arg               rod level FLOAT

 

diff -Nru luminance-hdr-2.5.1+dfsg/help/en/tonemapping_cli.html luminance-hdr-2.6.0/help/en/tonemapping_cli.html --- luminance-hdr-2.5.1+dfsg/help/en/tonemapping_cli.html 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/help/en/tonemapping_cli.html 2019-06-09 19:18:38.000000000 +0000 @@ -25,4 +25,4 @@ { } -

 

Usage: ./luminance-hdr-cli [OPTIONS]... [INPUTFILES]...:

  -h [ --help ]                 Display this help.

  -V [ --version ]              Display program version.

  -v [ --verbose ]              Print more messages during execution.

  -c [ --cameras ]              Print a list of all supported cameras.

  -a [ --align ] arg            [AIS|MTB]   Align Engine to use during HDR

                                creation (default: no alignment).

  -e [ --ev ] arg               EV1,EV2,... Specify numerical EV values (as

                                many as INPUTFILES).

  -d [ --savealigned ] arg      prefix Save aligned images to files which names

                                start with prefix

  -l [ --load ] arg             HDR_FILE Load an HDR instead of creating a new

                                one.

  -s [ --save ] arg             HDR_FILE Save to a HDR file format. (default:

                                don't save)

  -g [ --gamma ] arg            VALUE        Gamma value to use during tone

                                mapping. (default: 1)

  -r [ --resize ] arg           VALUE       Width you want to resize your HDR

                                to (resized before gamma and tone mapping)

  -o [ --output ] arg           LDR_FILE    File name you want to save your

                                tone mapped LDR to.

  -t [ --autoag ] arg           THRESHOLD   Enable auto anti-ghosting with

                                given threshold. (0.0-1.0)

  -b [ --autolevels ]           Apply autolevels correction after tonemapping.

  -w [ --createwebpage ]        Enable generation of a webpage with embedded

                                HDR viewer.

 

HDR creation parameters  - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR:

  --hdrWeight arg               weight = triangular|gaussian|plateau|flat

                                (Default is triangular)

  --hdrResponseCurve arg        response curve = from_file|linear|gamma|log|srg

                                b (Default is linear)

  --hdrModel arg                model: robertson|robertsonauto|debevec (Default

                                is debevec)

  --hdrCurveFilename arg        curve filename = your_file_here.m

 

LDR output parameters:

  -q [ --ldrQuality ] arg       VALUE      Quality of the saved tone mapped

                                file (1-100).

  --ldrTiff arg                 Tiff format. Legal values are

                                [8b|16b|32b|logluv] (Default is 8b)

  --ldrTiffDeflate arg          Tiff deflate compression. true|false (Default

                                is true)

 

HTML output parameters:

  -k [ --htmlQuality ] arg      VALUE      Quality of the interpolated

                                exposures, from the worst (1) to the best(4).

                                Higher quality will introduce less distortions

                                in the brightest and the darkest tones, but

                                will also generate more images. More images

                                means that there is more data that needs to be

                                transferred to the web-browser, making HDR

                                viewer less responsive. (Default is 2, which is

                                sufficient for most applications)

  --pageName arg                Specifies the file name, of the web page to be

                                generated. If <page_name> is missing, the file

                                name of the first image with .html extension

                                will be used. (Default is first image name)

  --imagesDir arg               Specify where to store the resulting image

                                files. Links to images in HTML will be updated

                                accordingly. This must be a relative path and

                                the directory must exist.  Useful to avoid

                                clutter in the current directory. (Default is

                                current working directory)

 

Tone mapping parameters  - no tonemapping is performed unless -o is specified:

  --tmo arg                     Tone mapping operator. Legal values are:

                                [ashikhmin|drago|durand|fattal|ferradans|pattan

                                aik|reinhard02|reinhard05|mai|mantiuk06|mantiuk

                                08] (Default is mantiuk06)

  --tmofile arg                 SETTING_FILE Load an existing setting file

                                containing pre-gamma and all TMO settings

 

 Fattal:

  --tmoFatAlpha arg             alpha FLOAT

  --tmoFatBeta arg              beta FLOAT

  --tmoFatColor arg             color FLOAT

  --tmoFatNoise arg             noise FLOAT

  --tmoFatNew arg               new true|false

 

 Ferradans:

  --tmoFerRho arg               rho FLOAT

  --tmoFerInvAlpha arg          inv_alpha FLOAT

 

 Mantiuk 06:

  --tmoM06Contrast arg          contrast FLOAT

  --tmoM06Saturation arg        saturation FLOAT

  --tmoM06Detail arg            detail FLOAT

  --tmoM06ContrastEqual arg     equalization true|false

 

 Mantiuk 08:

  --tmoM08ColorSaturation arg   color saturation FLOAT

  --tmoM08ConstrastEnh arg      contrast enhancement FLOAT

  --tmoM08LuminanceLvl arg      luminance level FLOAT

  --tmoM08SetLuminance arg      enable luminance level true|false

 

 Durand:

  --tmoDurSigmaS arg            spatial kernel sigma FLOAT

  --tmoDurSigmaR arg            range kernel sigma FLOAT

  --tmoDurBase arg              base contrast FLOAT

 

 Drago:

  --tmoDrgBias arg              bias FLOAT

 

 Reinhard 02:

  --tmoR02Key arg               key value FLOAT

  --tmoR02Phi arg               phi FLOAT

  --tmoR02Scales arg            use scales true|false

  --tmoR02Num arg               range FLOAT

  --tmoR02Low arg               lower scale FLOAT

  --tmoR02High arg              upper scale FLOAT

 

 Reinhard 05:

  --tmoR05Brightness arg        Brightness FLOAT

  --tmoR05Chroma arg            Chroma adaption FLOAT

  --tmoR05Lightness arg         Light adaption FLOAT

 

 Ashikmin:

  --tmoAshEq2 arg               Equation number 2 true|false

  --tmoAshSimple arg            Simple true|false

  --tmoAshLocal arg             Local threshold FLOAT

 

 Pattanaik:

  --tmoPatMultiplier arg        multiplier FLOAT

  --tmoPatLocal arg             Local tone mapping true|false

  --tmoPatAutoLum arg           Auto luminance true|false

  --tmoPatCone arg              cone level FLOAT

  --tmoPatRod arg               rod level FLOAT

 

+

 

Usage: ./luminance-hdr-cli [OPTIONS]... [INPUTFILES]...:

  -h [ --help ]                 Display this help.

  -V [ --version ]              Display program version.

  -v [ --verbose ]              Print more messages during execution.

  -c [ --cameras ]              Print a list of all supported cameras.

  -a [ --align ] arg            [AIS|MTB]   Align Engine to use during HDR

                                creation (default: no alignment).

  -e [ --ev ] arg               EV1,EV2,... Specify numerical EV values (as

                                many as INPUTFILES).

  -d [ --savealigned ] arg      prefix Save aligned images to files which names

                                start with prefix

  -l [ --load ] arg             HDR_FILE Load an HDR instead of creating a new

                                one.

  -s [ --save ] arg             HDR_FILE Save to a HDR file format. (default:

                                don't save)

  -g [ --gamma ] arg            VALUE        Gamma value to use during tone

                                mapping. (default: 1)

  -r [ --resize ] arg           VALUE       Width you want to resize your HDR

                                to (resized before gamma and tone mapping)

  -o [ --output ] arg           LDR_FILE    File name you want to save your

                                tone mapped LDR to.

  -t [ --autoag ] arg           THRESHOLD   Enable auto anti-ghosting with

                                given threshold. (0.0-1.0)

  -b [ --autolevels ]           Apply autolevels correction after tonemapping.

  -w [ --createwebpage ]        Enable generation of a webpage with embedded

                                HDR viewer.

 

HDR creation parameters  - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR:

  --hdrWeight arg               weight = triangular|gaussian|plateau|flat

                                (Default is triangular)

  --hdrResponseCurve arg        response curve = from_file|linear|gamma|log|srg

                                b (Default is linear)

  --hdrModel arg                model: robertson|robertsonauto|debevec (Default

                                is debevec)

  --hdrCurveFilename arg        curve filename = your_file_here.m

 

LDR output parameters:

  -q [ --ldrQuality ] arg       VALUE      Quality of the saved tone mapped

                                file (1-100).

  --ldrTiff arg                 Tiff format. Legal values are

                                [8b|16b|32b|logluv] (Default is 8b)

  --ldrTiffDeflate arg          Tiff deflate compression. true|false (Default

                                is true)

 

HTML output parameters:

  -k [ --htmlQuality ] arg      VALUE      Quality of the interpolated

                                exposures, from the worst (1) to the best(4).

                                Higher quality will introduce less distortions

                                in the brightest and the darkest tones, but

                                will also generate more images. More images

                                means that there is more data that needs to be

                                transferred to the web-browser, making HDR

                                viewer less responsive. (Default is 2, which is

                                sufficient for most applications)

  --pageName arg                Specifies the file name, of the web page to be

                                generated. If <page_name> is missing, the file

                                name of the first image with .html extension

                                will be used. (Default is first image name)

  --imagesDir arg               Specify where to store the resulting image

                                files. Links to images in HTML will be updated

                                accordingly. This must be a relative path and

                                the directory must exist.  Useful to avoid

                                clutter in the current directory. (Default is

                                current working directory)

 

Tone mapping parameters  - no tonemapping is performed unless -o is specified:

  --tmo arg                     Tone mapping operator. Legal values are:

                                [ashikhmin|drago|durand|fattal|ferradans|pattan

                                aik|reinhard02|reinhard05|mai|mantiuk06|mantiuk

                                08] (Default is mantiuk06)

  --tmofile arg                 SETTING_FILE Load an existing setting file

                                containing pre-gamma and all TMO settings

 

 Fattal:

  --tmoFatAlpha arg             alpha FLOAT

  --tmoFatBeta arg              beta FLOAT

  --tmoFatColor arg             color FLOAT

  --tmoFatNoise arg             noise FLOAT

  --tmoFatNew arg               new true|false

 

 Ferradans:

  --tmoFerRho arg               rho FLOAT

  --tmoFerInvAlpha arg          inv_alpha FLOAT

 

 Mantiuk 06:

  --tmoM06Contrast arg          contrast FLOAT

  --tmoM06Saturation arg        saturation FLOAT

  --tmoM06Detail arg            detail FLOAT

  --tmoM06ContrastEqual arg     equalization true|false

 

 Mantiuk 08:

  --tmoM08ColorSaturation arg   color saturation FLOAT

  --tmoM08ContrastEnh arg      contrast enhancement FLOAT

  --tmoM08LuminanceLvl arg      luminance level FLOAT

  --tmoM08SetLuminance arg      enable luminance level true|false

 

 Durand:

  --tmoDurSigmaS arg            spatial kernel sigma FLOAT

  --tmoDurSigmaR arg            range kernel sigma FLOAT

  --tmoDurBase arg              base contrast FLOAT

 

 Drago:

  --tmoDrgBias arg              bias FLOAT

 

 Reinhard 02:

  --tmoR02Key arg               key value FLOAT

  --tmoR02Phi arg               phi FLOAT

  --tmoR02Scales arg            use scales true|false

  --tmoR02Num arg               range FLOAT

  --tmoR02Low arg               lower scale FLOAT

  --tmoR02High arg              upper scale FLOAT

 

 Reinhard 05:

  --tmoR05Brightness arg        Brightness FLOAT

  --tmoR05Chroma arg            Chroma adaption FLOAT

  --tmoR05Lightness arg         Light adaption FLOAT

 

 Ashikmin:

  --tmoAshEq2 arg               Equation number 2 true|false

  --tmoAshSimple arg            Simple true|false

  --tmoAshLocal arg             Local threshold FLOAT

 

 Pattanaik:

  --tmoPatMultiplier arg        multiplier FLOAT

  --tmoPatLocal arg             Local tone mapping true|false

  --tmoPatAutoLum arg           Auto luminance true|false

  --tmoPatCone arg              cone level FLOAT

  --tmoPatRod arg               rod level FLOAT

 

diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_cs.ts luminance-hdr-2.6.0/i18n/lang_cs.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_cs.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_cs.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&utoři - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Poděkování - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &Licenční ujednání - + &OK &OK @@ -123,270 +174,320 @@ Výstup - + Choose an HDR output file format - - Predefined profile: - - - - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Váha: + + + + Predefined profile: + + + + + Model: + + + + + Debevec + + + + + Triangular + Trojúhelníková + + + + Linear + Lineárně + + + Alignment Zarovnání - - Auto align the bracketed pictures + + Use Hugin's align_image_stack engine - - Auto-align images + + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine - + &MTB - - Use Hugin's align_image_stack engine + + Auto align the bracketed pictures - - Hugin's align_&image_stack + + Auto-align images - + Auto-crop - + &Cancel &Storno - + &Start - + &Close &Zavřít - + Progress - + Input/Output - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... - + Loading files... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... Zarovnávám... - + Creating HDR... - + Doing auto anti-ghosting... - + Written - + Error: - + Aborting... Přerušuji... @@ -409,261 +510,302 @@ Seznam HDR, které budou přemapovány - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R - - Add Files (Alt+F) + + Remove All Files (Alt+X) - - Alt+F + + + ... - - Remove Files (Alt+R) + + Alt+X - - Alt+R + + Add Files (Alt+F) - - Tone Mapping Settings + + Alt+F - Add Directory (Alt+I) + Add Directory (Alt+D) - Alt+I + Alt+D + + + + + Tone Mapping Settings - + Add Files (Alt+L) - + Alt+L - + + Add Directory (Alt+I) + + + + + Alt+I + + + + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Seznam souborů nastavení pro použití k přemapování každého HDR - + Output Výstup - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files Vybrat výstupní adresář pro přemapované soubory - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log - + Batch operations report Zpráva hromadného zpracování - + Show onl&y: - + Filter messages based on severity Filtrovat zprávy podle vážnosti - + All messages Všechny zprávy - + Errors only Jen chyby - + Success messages Zprávy o úspěchu - + Filter &log messages: - + Clear filter text Smazat text filtru - + Overall completion progress Celkové zpracování dokončeno - + &Cancel &Storno - + Start batch tone mapping Začít hromadné přemapování - + &Start - + Using %n thread(s) - + - - - + + + Choose a directory Vybrat adresář - + All HDR images - + Select input images - + Load tone mapping settings text files... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Zpracovávám... - + Start processing... - + Close - + &Done &Hotovo - + + Conversion aborted by user request. + + + + All tasks completed. Všechny úkoly hotovy. - + Aborting... Přerušuji... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -699,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. CHYBA: Nástroj zarovnání nerozpoznán. - + Error: Unknown weight function specified. Chyba: Určena neznámá váhová funkce. - + Error: Unknown response curve specified. CHYBA: Určena neznámá křivka odezvy. - + Error: Unknown HDR creation model specified. CHYBA: Určen neznámý model tvorby HDR. - + Error: Unknown tone mapping operator specified. CHYBA: Určen neznámý operátor přemapování. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. CHYBA: Počet zadaných hodnot kroků EV se neshoduje s počtem vstupních souborů. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Chyba: V obrázcích chybí exif data a ani v příkazové řádce nejsou určeny hodnoty EV. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable Edi&tovatelný - + R&eference R&eferenční - + Select the previous image in both lists Vyberte předchozí obrázek z obou seznamů - + Select the next image in both lists Vyberte následující obrázek z obou seznamech - + Choose a directory and a prefix Vyverte adresář a prefix @@ -1418,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Pomocí ovladačů níže lze právě vybraným obrázkem ze seznamu pohybovat nahoru, dolů, vlevo i vpravo. -Histogram tohoto obrázku je zobrazen výše. +This image's histogram is displayed in the widget above. + @@ -1913,18 +2152,18 @@ - + Choose a directory Vybrat adresář - - + + Error: - + must be a directory. @@ -2084,28 +2323,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2113,7 +2352,7 @@ GenericViewer - + Pan the image to a region @@ -2126,45 +2365,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + + + + HdrViewer - + &Mapping: - + Histogram: Histogram: - + Linear Lineárně - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2188,7 +2440,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2228,7 +2480,7 @@ - &MTB + M&TB @@ -2238,7 +2490,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2301,12 +2553,12 @@ - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2315,47 +2567,47 @@ - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results - + Use Custom Configuration - + HDR Creation Model @@ -2405,237 +2657,266 @@ - + Linear Lineárně - + Gamma Gamma - + Log Log - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... Uložit jako... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Vpřed > - + &Cancel &Storno - + Image Filename Jméno souboru - + Exposure Expozice - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Vyber vstupní obrázky - + Unknown - + Loading... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found EXIF data nenalezena - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Obrázky načteny.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Pro pokračování musíte manuálně vyplnit hodnoty expozice.<br><font color="#FF0000">%1</font> hodnoty jsou stále požadovány.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: - + Start loading a set of images with different exposure - - - + + + Error... Chyba... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... Externí aplikace "<em>align_image_stack</em>" havarovala... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Při spouštění aplikace"<em>align_image_stack</em>" se vyskytla neznámá chyba... - + Now click on next button - + + Compute + + + + + Finish + + + + Aligning... Zarovnávám... - - - &Finish - &Proveď + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - Váha: - - - - - Response curve: - - Křivka odezvy: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + - - - Model: - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Pro pokračování musíte manuálně vyplnit hodnoty expozice.<br><font color="#FF0000">%1</font> hodnoty jsou stále požadovány.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + + Hide Log @@ -2648,7 +2929,7 @@ - + &File &Soubor @@ -2674,7 +2955,7 @@ - + &Print... @@ -2690,7 +2971,7 @@ - + &Find... @@ -2721,7 +3002,7 @@ - + &Add Bookmark @@ -2737,7 +3018,7 @@ - + D&elete All @@ -2807,96 +3088,96 @@ - + Help SideBar - + LuminanceHDR Online Help - + &Edit - + &View &Pohled - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Delete - + Find - + Search Term: - + New Bookmark - + New Bookmark's Title: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show - + LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? @@ -2954,22 +3235,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2977,7 +3263,7 @@ ImageQualityDialog - + Unknown @@ -3028,9 +3314,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3110,7 +3396,7 @@ MainWindow - + Luminance HDR @@ -3955,18 +4241,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3980,6 +4261,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3995,91 +4281,90 @@ - + All HDR formats - + Load one or more HDR images... - + Save files in - - + + Failed to save %1 - + Done! - + Aborting... Přerušuji... - - - Untitled - - - - + Cropped Image - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Neuložené změny... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + + + + Untitled %1 - + Error: %1 - + Untitled HDR - + FITS Image @@ -4380,13 +4665,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4626,28 +4911,28 @@ &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Vybrat adresář - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4763,17 +5048,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: CHYBA: nemohu otevřít soubor nastavení přemapování: - + ERROR: File too old, cannot parse Tone Mapping Setting file: CHYBA: Příliš starý soubor, nemohu použít soubor nastavení přemapování: - + ERROR: cannot parse Tone Mapping Setting file: CHYBA: nemohu použít soubor nastavení přemapování: @@ -4781,370 +5066,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Trojúhelníková - - - - Plateau - Rovina - - - - Gaussian - Gausovská - - - - Flat - - - - - Linear - Lineárně - - - - Gamma - Gamma - - - - Logarithmic - Logaritmicky - - - - sRGB - - - - - From Calibration/Input File - - - - - Debevec + + + + Weights= - - Robertson + + + + - Response curve= - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Varovnání kontrastu (Contrast Equalization) - + Contrast - - + + Saturation - + Detail - + Luminance Level - + Luminance Level=Auto - + Color Saturation Saturace barev<br>(Color Saturation) - + Contrast Enhancement - + + Alpha - + Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias Síla<br>(Bias) - + Spatial - - + + Range Rozsah<br>(Range) - + Base - + Multiplier Násobitel<br>(Multiplier) - + AutoLuminance - + Cone - + Rod - + Key - + Phi - + Scales: - + Lower - + Upper - + Brightness Jas<br>(Brightness) - + Chromatic Adaptation Adaptace barev<br>(Chromatic Adaptation) - + Light Adaptation Adaptace světel<br>(Light Adaptation) - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + + + + + Robertson + + + + + Robertson Response Calculation + + + + + Triangular + Trojúhelníková + + + + Plateau + Rovina + + + + Gaussian + Gausovská + + + + Flat + + + + + Linear + Lineárně + + + + Gamma + Gamma + + + + Logarithmic + Logaritmicky + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float Nemohu konvertovat %1 do plovoucí rádové čárky - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. - + + Using %n thread(s). + - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats - + Save the LDR image as... + All HDR formats + + + + Save the HDR image as... - + Save as... Uložit jako... @@ -5215,810 +5581,702 @@ SavedParametersDialog - + Saved Parameters - - + Comment - + TM Operator + + + SavingParameters - - Simple - Jednoduchý + + Saving Parameters + - - Equation 2 + + Enter a short comment for the saved parameters: + + + SupportedCamerasDialog - - Local Contrast Threshold - Práh lokálního kontrastu<br>(Local Contrast Threshold) + + List of supported cameras + - - Bias - Síla<br>(Bias) + + TextLabel + - - Spatial Kernel Sigma - Prostorové zrno<br>(Spatial Kernel Sigma) + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + - - Range Kernel Sigma - Rádius<br>(Range Kernel Sigma) + + With LibRaw version + - - Base Contrast - Základní kontrast<br>(Base Contrast) + + models listed + - - Alpha + + search... - - Beta + + OK + + + TMOProgressIndicator - - - Color Saturation - Saturace barev<br>(Color Saturation) - - - - Noise Reduction - Redukce šumu<br>(Noise Reduction) - - - - Old Fattal + + Abort computation + + + ThresholdWidget - - Rho + + Frame - - InvAlpha + + Threshold + + + TiffModeDialog - - Contrast Equalization - Varovnání kontrastu (Contrast Equalization) - - - - Contrast Factor - Koeficient kontrastu<br>(Contrast Factor) + + Save as ...TIFF + + + + TonemappingPanel - - Saturation Factor - Koeficient saturace<br>(Saturation Factor) + + Tonemap + - - Detail Factor + + Mantiuk '06 - - Contrast Enhancement + + Mantiuk '08 - - Luminance Level + + Fattal - - Manual Luminance Level + + Ferradans - - Cone and Rod based on Luminance - Cone a Rod podle jasu (Cone and Rod based on Luminance) + + Drago + - - Local Tonemapping + + Durand - - Cone Level - Úroveň Cone<br>(Cone Level) + + Reinhard '02 + Reinhard '02 - - Rod Level - Úroveň Rod<br>(Rod Level) + + Reinhard '05 + Reinhard '05 - - Multiplier - Násobitel<br>(Multiplier) + + Ashikhmin + - - Use Scales - Použít stupnice (Use Scales) + + Pattanaik + - - Key Value - Klíčová hodnota<br>(Key Value) + + Mai + - - Phi Value + + Ferwerda - - Range - Rozsah<br>(Range) + + KimKautz + - - Lower Scale - Nižší stupnice<br>(Lower Scale) + + VanHateren + - - Upper Scale - Vyšší stupnice<br>(Upper Scale) + + Lischinski + - - Brightness - Jas<br>(Brightness) + + Operator + - - Chromatic Adaptation - Adaptace barev<br>(Chromatic Adaptation) + + &Contrast Factor + - - Light Adaptation - Adaptace světel<br>(Light Adaptation) + + Contrast Equalization + Varovnání kontrastu (Contrast Equalization) - - Pre-gamma + + &Detail Factor - - - SavingParameters - - Saving Parameters + + Saturat&ion Factor - - Enter a short comment for the saved parameters: + + Lcd Office - - - SupportedCamerasDialog - - List of supported cameras + + Lcd - - TextLabel + + Lcd Bright - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + + CRT - - With LibRaw version + + Co&lor Saturation - - models listed + + Co&ntrast Enhancement - - search... + + Enable +Luminace Level - - OK + + Lum&inance Level - - - TMOProgressIndicator - - Abort computation + + Predefined &Display - - - ThresholdWidget - - Frame + + A&lpha - - Threshold + + Bet&a - - - TiffModeDialog - - Save as ...TIFF + + Color Saturat&ion - - - TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Zde můžete nahrát a uložit soubor nastavení přemapování.<br>Taky můžete použít obsah právě nahraného souboru nastavení. - - - - Tone Mapping Settings + + &Noise Reduction - - Save current parameters to a text file - Uložit parametry do souboru - - - - Save current parameters (pregamma and TMO) to a text file. - Uložit parametry (pregamma a TMO) do souboru. - - - - Load an existing text file containing pregamma and TMO settings - Nahrát soubor s parametry pregamma a TMO - - - - Load an existing text file containing pregamma and TMO settings. - Nahrát soubor s parametry pregamma a TMO. - - - - Save current parameters + + Version 2.3.0 - - Load saved parameters + + &Inverse Alpha - - Export + + Rho - - Fast export + + B&ias - - Opens the current export direcotory. This can be changed in the preferences! + + Spatial &Kernel Sigma - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Base Co&ntrast - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Zde můžete opravit hodnotu gamma pro HDR.<br>Korekce gamma bude použita před přemapováním HDR. - - - - Process + + Range Kerne&l Sigma - - Result Si&ze + + Ph&i - - - Gamma applied before tonemapping + + &Key Value - - Pre-&gamma + + &Lower Scale - - Restore pregamma's default value (1) - Obnovit původní hodnotu pregamma (1) - - - - Size of the resulting LDR image + + Upper S&cale - - Here you can choose the size of the resulting LDR image. - Zde můžete vybrat velikost výsledného LDR obrázku. + + Use Scales + Použít stupnice (Use Scales) - - Set Custom Output Size + + Ra&nge - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Kliknutím na toto tlačítko můžete vložit novou hodnotu <i>šířky</i> výsledného LDR obrázku. Enter dopočítá hodnotu výšky a uloží nový rozměr do seznamu. + + &Light Adaptation + - - Start tonemapping (CTRL+T) + + Chromatic A&daptation - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + Br&ightness - - &Update preview + + Local Contrast Threshol&d - - Ctrl+T - Ctrl+M + + Simple + Jednoduchý - - Update current LDR + + Equation &Number - - Auto Levels + + Eqn &2 - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Eqn &4 - - Tonemap - + + Local Tone Mapping + Lokální přemapování (Local Tone Mapping) - - Mantiuk '06 + + Mu&ltiplier - - Mantiuk '08 + + Auto Cone/Rod - - Fattal + + Co&ne Level - - Ferradans + + Ro&d Level - - Drago + + This operator has no options - - Durand + + &Multiplier - - Reinhard '02 - Reinhard '02 - - - - Reinhard '05 - Reinhard '05 - - - - Ashikhmin + + A&daptation Luminance - - Pattanaik + + &C1 - - Mai + + C&2 - - Operator + + Pup&il Area - - Contrast Factor - Koeficient kontrastu<br>(Contrast Factor) - - - - Saturation Factor - Koeficient saturace<br>(Saturation Factor) - - - - Detail Factor + + a&lpha mul - - Contrast Equalization - Varovnání kontrastu (Contrast Equalization) + + Restore operator's default values + Obnovit původní hodnoty operátoru - - Predefined Display + + Restore - - Lcd Office + + Previous applied settings - - Lcd + + Previous - - Lcd Bright + + Next applied settings - - CRT + + Next - - - Color Saturation - Saturace barev<br>(Color Saturation) - - - - Contrast Enhancement + + Start tonemapping (CTRL+T) - - Enable -Luminace Level + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - Luminance Level + + &Update preview - - Alpha - + + Ctrl+T + Ctrl+M - - Beta + + Update current LDR - - Noise Reduction - Redukce šumu<br>(Noise Reduction) - - - - Version 2.3.0 + + Auto Levels - - Inverse Alpha + + <html><head/><body><p>set auto levels threshold</p></body></html> - - Rho + + Processing - - Bias - Síla<br>(Bias) - - - - Spatial Kernel Sigma - Prostorové zrno<br>(Spatial Kernel Sigma) - - - - Range Kernel Sigma - Rádius<br>(Range Kernel Sigma) - - - - Base Contrast - Základní kontrast<br>(Base Contrast) - - - - Key Value - Klíčová hodnota<br>(Key Value) + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Zde můžete opravit hodnotu gamma pro HDR.<br>Korekce gamma bude použita před přemapováním HDR. - - Phi + + Res&ult Size - - Use Scales - Použít stupnice (Use Scales) - - - - Range - Rozsah<br>(Range) + + Set Custom Output Size + - - Lower Scale - Nižší stupnice<br>(Lower Scale) + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Kliknutím na toto tlačítko můžete vložit novou hodnotu <i>šířky</i> výsledného LDR obrázku. Enter dopočítá hodnotu výšky a uloží nový rozměr do seznamu. - - Upper Scale - Vyšší stupnice<br>(Upper Scale) + + + Gamma applied before tonemapping + - - Brightness - Jas<br>(Brightness) + + Pre-&gamma + - - Chromatic Adaptation - Adaptace barev<br>(Chromatic Adaptation) + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Light Adaptation - Adaptace světel<br>(Light Adaptation) + + Pos&t-saturation + - - Local Contrast Threshold - Práh lokálního kontrastu<br>(Local Contrast Threshold) + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Simple - Jednoduchý + + Post-gamma + - - Equation Number - Číslo rovnice (Equation Number) + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - Eqn &2 + + ... - - Eqn &4 + + Settings - - Multiplier - Násobitel<br>(Multiplier) + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Zde můžete nahrát a uložit soubor nastavení přemapování.<br>Taky můžete použít obsah právě nahraného souboru nastavení. - - Local Tone Mapping - Lokální přemapování (Local Tone Mapping) + + Tone Mapping Settings + - - Auto Cone/Rod - + + Save current parameters to a text file + Uložit parametry do souboru - - Cone Level - Úroveň Cone<br>(Cone Level) + + Save current parameters (pregamma and TMO) to a text file. + Uložit parametry (pregamma a TMO) do souboru. - - Rod Level - Úroveň Rod<br>(Rod Level) + + Load an existing text file containing pregamma and TMO settings + Nahrát soubor s parametry pregamma a TMO - - This operator has no options - + + Load an existing text file containing pregamma and TMO settings. + Nahrát soubor s parametry pregamma a TMO. - - Restore operator's default values - Obnovit původní hodnoty operátoru + + Load saved parameters + - - Restore + + Save current parameters - - Previous applied settings + + Export - - Previous + + Fast export - - Next applied settings + + Opens the current export directory. This can be changed in the preferences! - - Next + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... Nahrát soubor nastavení přemapování... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... Přerušuji... - + File is not readable (check existence, permissions,...) Soubor není čitelný (zkontrolujte zda existuje, práva,...) - + Save tonemapping settings text file to... Uložit soubor nastavení přemapování jako... - + File is not writable (check permissions, path...) Soubor nelze zapsat (zkontrolujte práva, cestu...) - + File is not readable (check permissions, path...) Soubor není čitelný (zkontrolujte práva, cestu...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Volitelná velikost LDR - + Enter the width of the new size: @@ -6168,19 +6426,19 @@ - - + + All Supported formats - - + + Select the input images Vyber vstupní obrázky - + &Done &Hotovo @@ -6188,39 +6446,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1Dokument licence nenaezen, můžete jej najít: %2zde%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation - + Would you like to donate? - + Yes, I'd love to! - + Stop Bothering Me - + Remind me later @@ -6228,18 +6486,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_da.ts luminance-hdr-2.6.0/i18n/lang_da.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_da.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_da.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors &Forfattere - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Tak til - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Ændringer - + &License Agreement &Licensaftale - + &OK &OK @@ -123,273 +174,320 @@ Output - + Choose an HDR output file format Vælg et HDR-output-filformat - - Predefined profile: - Prædefineret profil: - - - - Output format: - Outputformat: + + Filename prefix: + - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Vælg en af de prædefinerede profiler. -Se dokunmentationen for mere information. + - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + Outputformat: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Vægte: + + + + Predefined profile: + Prædefineret profil: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangulær + + + + Linear + Lineær + + + Alignment Justering - - Auto align the bracketed pictures - Autojustér de grupperede billeder + + Use Hugin's align_image_stack engine + Brug Hugins align_image_stack program - - Auto-align images - Autojustér billeder + + Hugin's align_&image_stack + - + Use MTB (Median Threshold Bitmap) engine Brug MTB (Median Threshold Bitmap) programmet - + &MTB - - Use Hugin's align_image_stack engine - Brug Hugins align_image_stack program + + Auto align the bracketed pictures + Autojustér de grupperede billeder - - Hugin's align_&image_stack - + + Auto-align images + Autojustér billeder - + Auto-crop Autobeskær - + &Cancel &Annuller - + &Start &Start - + &Close &Luk - + Progress Fremgang - + Input/Output Input/Output - + Folder where created HDRs are saved Mappe, hvor oprettede HDR'er gemmes - - + + Select... Vælg… - + Folder where bracketed pictures are located (in alphabetical order) Mappe, hvor grupperede billeder befinder sig (i alfabetisk rækkefælge) - + Input folder: Inputmappe: - + Output folder: Outputmappe: - + Anti-ghosting Anti-ghosting - + Artifact-free High Dynamic Range Imaging High Dynamic Range billedbehandling uden artifakter - + Threshold Grænseværdi - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Grænseværdi, der bruges af algoritmen til auto-anti-ghosting. En lavere grænseværdi betyder mere aggressive beregninger, men det kan gøre den endelige dynamic range lavere. Brug &quot;Genberegn&quot;-knappen for at se dækningen og justér grænseværdien tilsvarende</p></body></html> - + O. Gallo and others O. Gallo og andre - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Slå auto-anti-ghosting-algoritmen til</p></body></html> - + Auto anti-ghosting Auto-anti-ghosting - + Custom config %1 Brugerdefineret konfiguration %1 - + Choose a source directory Vælg en kildemappe - + Choose a output directory Vælg en outputmappe - - - + + + Warning Advarsel - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - Den valgte outputmappe indeholder HDR-filer. Disse filer kan blive overskrevet. - -Fortsæt? + - - + + Total number of pictures must be a multiple of number of bracketed images. Total antal billeder skal være et multiplum af antallet af grupperede billeder. - + Started processing... Beregning startet… - + Loading files... Indlæser filer… - + Completed with errors Gennemført med fejl - + Completed without errors Gennemført uden fejl - + Error: missing EXIF data Fejl: Manglende EXIF-data - + Aligning... Justerer… - + Creating HDR... Opretter HDR… - + Doing auto anti-ghosting... Udfører auto-anti-ghosting… - + Written Skrevet - + Error: Fejl: - + Aborting... Afbryder… @@ -412,261 +510,302 @@ Liste over alle HDR'er, som skal tone mappes - - Add Directory (Alt+D) - Tilføj mappe (Alt+D) + + Remove Files (Alt+R) + Fjern filer (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Tilføj filer (Alt+F) + + Remove All Files (Alt+X) + - - Alt+F - Alt+F + + + ... + - - Remove Files (Alt+R) - Fjern filer (Alt+R) + + Alt+X + - - Alt+R - Alt+R + + Add Files (Alt+F) + Tilføj filer (Alt+F) - - Tone Mapping Settings - Tone mapping-indstillinger + + Alt+F + Alt+F - Add Directory (Alt+I) - Tilføj mappe (Alt+I) + Add Directory (Alt+D) + Tilføj mappe (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Tone mapping-indstillinger - + Add Files (Alt+L) Tilføj filer (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Tilføj mappe (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Tilføj fra database (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Fjern indstillinger (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Liste over tone mapping-indstillingsfiler, som skal bruges til at tone mappe hvert HDR - + Output Output - + Output Image Width: Bredde på outputbillede: - + Output Folder: Outputmappe: - - + + Specify output folder for the tone mapped files Specificér outputmappe til de tone mappede filer - + Selec&t... &Vælg… - - + + Width of tonemapped image in percent of original image - + % % - + Output Format: Outputformat: - + Image format of tonemapped images - + Image format options - + Conversion Log Konverteringslog - + Batch operations report Jobliste-udførselslog - + Show onl&y: - + Filter messages based on severity Filtrér beskeder baseret på alvorlighed - + All messages Alle beskeder - + Errors only Kun fejl - + Success messages Succesbeskeder - + Filter &log messages: - + Clear filter text Nulstil filtertekst - + Overall completion progress Overordnet fremgang - + &Cancel &Annuller - + Start batch tone mapping Start jobliste-tone mapping - + &Start &Start - + Using %n thread(s) - - - + + + Choose a directory Vælg en mappe - + All HDR images Alle HDR-billeder - + Select input images Vælg inputbilleder - + Load tone mapping settings text files... Indlæs tone mapping-indstillingstekstfiler… - + Luminance HDR tone mapping settings text file (*.txt) Luminance HDR tone mapping-indstillingstekstfil (*.txt) - + + Warning + Advarsel + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Beregner… - + Start processing... Start beregning… - + Close Luk - + &Done &Færdig - + + Conversion aborted by user request. + + + + All tasks completed. Alle jobs gennemført. - + Aborting... Afbryder… @@ -674,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Start beregning %2 - + [T%1] Successfully load %2 [T%1] Indlæst succesfuldt %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] Gemte succesfuldt LDR-fil: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] FEJL: Kan ikke gemme til fil: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] FEJL: Indlæsning af %2 fejlede @@ -702,575 +846,668 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Anvendelse: %1 [OPTIONS]… [INPUTFILER]… - + Display this help. Vis denne hjælp. - + Display program version. - + Print more messages during execution. Udskriv flere beskeder under udførelse. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AISIMTB] Justeringsprogram der bruges under HDR-oprettelse (standard: ingen justering). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,… Specificér numeriske EV-værdier (så mange som INPUTFILES). - + prefix Save aligned images to files which names start with prefix prefix Gem justerede billeder til filer hvor navnene starter med præfiks - + HDR_FILE Load an HDR instead of creating a new one. HDR_FILE Indlæs et HDR i stedet for at oprette et nyt. - + HDR_FILE Save to a HDR file format. (default: don't save) HDR_FILE Gem til et HDR-filformat. (standard: gem ikke) - + VALUE Gamma value to use during tone mapping. (default: 1) VALUE Gamma-værdi der skal bruges under tone mapping. (standard: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALUE Bredde som dit HDR skal ændres til (størrelsen ændres før gamma og tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. LDR_FILE Filnavn som dit tone mappede LDR skal gemmes til. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) THRESHOLD Aktivér automatisk anti-ghosting med given grænseværdi. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR HDR-oprettelsesparametre - du skal enten indlæse en eksisterende HDR-fil (via -l-tilvalget) eller angive INPUTFILES for at oprette et nyt HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) weight = triangular|gaussian|plateau|flat (Standard er triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) response curve = from_file|linear|gamma|log|srgb (Standard er linear) - + model: robertson|robertsonauto|debevec (Default is debevec) model: robertson|robertsonauto|debevec (Standard er debevec) - + curve filename = your_file_here.m curve filename = din_fil_her.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Tone mapping parametre - ingen tone mapping udføres med mindre -o angives - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago Drago - + bias FLOAT - + Reinhard 02 Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik Pattanaik - + multiplier FLOAT - + Local tone mapping true|false Lokal tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Fejl: Positionerings-applikation ikke genkendt. - + Error: Unknown weight function specified. Fejl: Ukendt vægtfunktion specificeret. - + Error: Unknown response curve specified. Fejl: Ukendt responskurve specificeret. - + Error: Unknown HDR creation model specified. Fejl: Ukendt HDR-oprettelsesmodel specificeret. - + Error: Unknown tone mapping operator specified. Fejl: Ukendt tone mapping-operator specificeret. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Fejl: Antallet af specificerede EV-værdier er forskelligt fra antallet af inputfiler. - + Load file %1 failed Indlæsning af fil %1 mislykkedes - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Fejl: EXIF-data mangler i billeder, og EV-værdier er ikke specificeret på kommandolinien, bakker ud. - + EV values have been assigned. EV-værdier er tildelt. - - + + Starting aligning... - + Failed executing align_image_stack Kørsel af align_image_stack mislykkedes - + Failed aligning images. Positionering af billeder mislykkedes. - + Creating (in memory) the HDR. Opretter HDR-billedet (i hukommelsen). - + Saving to file %1. Gemmer til fil %1. - + Image %1 saved successfully Billede %1 gemt succesfuldt - + Could not save %1 Kunne ikke gemme %1 - + NOT Saving HDR image to file. %1 Gemmer IKKE HDR-billede til fil. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. Tone mapping efterspurgt, gemmer til fil %1. - + Resizing to width %1. - + Applying gamma %1. - + -Image %1 successfully saved +Applying saturation enhancement %1. - + -ERROR: Cannot save to file: %1 +Applying post-gamma %1. - - Tonemapping NOT requested. + + +Image %1 successfully saved - - Failed loading images - Indlæsning af billeder mislykkedes - - + + +ERROR: Cannot save to file: %1 + + + + + Tonemapping NOT requested. + + + + + Failed loading images: %1 + + + DnDOption @@ -1345,47 +1582,47 @@ EditingTools - + Maskable Maskérbart - + Good image Godt billede - + Add good image Tilføj godt billede - + Remove good image Fjern godt billede - + Ed&itable Red&igerbart - + R&eference R&eference - + Select the previous image in both lists Vælg det forrige billede i begge lister - + Select the next image in both lists Vælg det næste billede i begge lister - + Choose a directory and a prefix Vælg en mappe og et præfiks @@ -1421,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Det valgte billede i denne liste kan translateres op, ned, til venstre og højre ved at bruger kontrollerne herunder. -Dette billedes histogram vises herover. +This image's histogram is displayed in the widget above. + @@ -1916,18 +2152,18 @@ - + Choose a directory Vælg en mappe - - + + Error: Fejl: - + must be a directory. @@ -2087,28 +2323,28 @@ Rød - + Load one FITS image... Indlæs ét FITS-billede… - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size FITS-billeder har forskellige størrelser - + align_image_stack exited with exit code %1 align_image_stack afsluttede med kode %1 - + align_image_stack failed with error align_image_stack afsluttede med fejl @@ -2116,7 +2352,7 @@ GenericViewer - + Pan the image to a region Panorér billedet to en region @@ -2129,45 +2365,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. HdrCreationManager::loadFilesDone(): Billederne har forskellige størrelser. + HdrPreview + + + HDR Preview + + + + + Close + Luk + + + HdrViewer - + &Mapping: &Mapping: - + Histogram: Histogram: - + Linear Lineært - + Gamma 1.4 Gamma 1,4 - + Gamma 1.8 Gamma 1,8 - + Gamma 2.2 Gamma 2,2 - + Gamma 2.6 Gamma 2,6 @@ -2191,7 +2440,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2232,7 +2481,7 @@ - &MTB + M&TB @@ -2242,7 +2491,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2309,12 +2558,12 @@ [2/2] Vælg indstillinger for HDR-oprettelse - + Profile Profil - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2327,47 +2576,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Den første prædefinerede profil i listen leder for det meste til de bedste resultater. Ændr den kun, hvis det resulterende HDR-billede ikke er godt nok.</span></p></body></html> - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Brug kun dette, hvis standardprofilerne herover ikke giver gode resultater - + Use Custom Configuration Brug tilpasset opsætning - + HDR Creation Model HDR-oprettelsesmodel @@ -2417,238 +2666,267 @@ Responskurve - + Linear Lineær - + Gamma Gamma - + Log Log - + sRGB sRGB - - Custom - Tilpasset + + Custom (From File) + - + Response Curve Input File Inputfil for responskurve - + + Load Response + + + + Response Curve Output File Outputfil for responskurve - + Save As... Gem som… - + Save Settings Gem indstillinger - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Næste > - + &Cancel &Annuller - + Image Filename Billedfilnavn - + Exposure Eksponering - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Alle formater (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF-billeder (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw RAW-billeder (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Vælg inputbillederne - + Unknown Ukendt - + Loading... Indlæser… - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>ADVARSEL:</b></h3></font> Luminance HDR kunne ikke finde de relevante <b>EXIF</b>-mærker for følgende billeder:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul><hr>Du kan stadig fortsætte med at oprette en HDR. For at gøre dette skal du <b>manuelt</b> indsætte EV (eksponeringsværdier) eller værdier for stop-forskel.<hr>Hvis du vil have Luminance HDR til at gøre dette <b>automatisk</b>, skal du indlæse billeder, som har mindst følgende exif-data: <ul><li>Eksponeringsbias</li></ul><hr><b>TIP:</b> At miste EXIF-data sker ofte når du forbehandler dine billeder.<br>Du kan udføre en <b>én-til-én-kopiering af exif-data</b> mellem to mængder billeder via menupunktet <b>Værktøjer->Kopiér exif-data…</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again + - + EXIF data not found EXIF-data ikke fundet - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Billeder idlæst.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>For at fortsætte skal du manuelt angive eksponeringsværdierne.<br><font color="#FF0000">%1</font> værdier stadig påkrævet.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: Indlæsningsfejl: - + Start loading a set of images with different exposure Start indlæsning af en mængde billeder med forskellig eksponering - - - + + + Error... Fejl… - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Fejl under opstart af ekstern applikation "<em>align_image_stack</em>".<br>Læs venligst "Hjælp -> Indhold… -> Opsætning -> Eksterne værktøjer" for mere information. - + The external application "<em>align_image_stack</em>" crashed... Den eksterne applikation "<em>align_image_stack</em>" fejlede… - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... En ukendt fejl opstod under kørsel af "<em>align_image_stack</em>"-applikationen... - + Now click on next button Klik nu på næste-knappen - + + Compute + + + + + Finish + + + + Aligning... Positionerer... - - - &Finish - &Færdig + + &Compute + - + Load camera response curve file Indlæs responskurvefil for kamera - + Camera response curve (*.m);;All Files (*) Kameraresponskurve (*.m);;Alle filer (*) - + Invalid Response Curve File Ugyldig responskurvefil - + Invalid Response Curve File: please try a different file Ugyldig responskurvefil: Prøv venligst en anden fil - + Save a camera response curve file Gem en responskurvefil for kamera - + Camera response curve (*.m) Kameraresponskurve (*.m) - - Weights: - Vægte: - - - - - Response curve: - - Responskurve: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Alle EV-værdierne er angivet.<br>Klik nu på næste-knappen.</b></h3></font></center> - - - Model: - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>For at fortsætte skal du manuelt angive eksponeringsværdierne.<br><font color="#FF0000">%1</font> værdier stadig påkrævet.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Alle EV-værdierne er angivet.<br>Klik nu på næste-knappen.</b></h3></font></center> + + Hide Log + @@ -2660,7 +2938,7 @@ - + &File &Fil @@ -2686,7 +2964,7 @@ - + &Print... &Udskriv… @@ -2702,7 +2980,7 @@ - + &Find... &Find… @@ -2733,7 +3011,7 @@ - + &Add Bookmark &Tilføj bogmærke @@ -2749,7 +3027,7 @@ - + D&elete All S&let alle @@ -2819,100 +3097,98 @@ - + Help SideBar Hjælp sidebar - + LuminanceHDR Online Help Luminance HDR online hjælp - + &Edit &Redigér - + &View &Vis - - + + &Bookmarks &Bogmærker - + &Quit &Afslut - + Find &Next Find &næste - + Find &Previous Find &forrige - + &Contents &Indhold - + &Search &Søg - + &Delete &Slet - + Find Find - + Search Term: Søgeord: - + New Bookmark Nyt bogmærke - + New Bookmark's Title: Nyt bogmærkes titel: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Desværre, ingen manual er installeret!</p><p>Kontakt venligst din pakkeudbyder eller Luminance HDR-teamet, hvis du har bygget applikationen selv</p></h2> - + LuminanceHDR - Help Browser Luminance HDR - hjælpebrowser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Denne protokol kan ikke håndteres af hjælpebrowseren. -Vil du åbne linket med standardapplikationen, -der er associeret med protokollen? + @@ -2968,22 +3244,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: Følgende fil er ikke læsbar: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: fil %1 har en endelse, der ikke understøttes: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: opfangede undtagelse under læsning af %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 IOWorker: indlæsning af fil mislykkedes: %1 @@ -2991,7 +3272,7 @@ ImageQualityDialog - + Unknown Ukendt @@ -3042,9 +3323,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3124,7 +3405,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3969,18 +4250,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3994,6 +4270,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -4009,93 +4290,90 @@ Klar. Åbn nu et eksisterende HDR-billede for at oprette et nyt! - + All HDR formats Alle HDR-formater - + Load one or more HDR images... Indlæs et eller flere HDR-billeder… - + Save files in Gem filer i - - + + Failed to save %1 - + Done! Færdig! - + Aborting... Afbryder… - - - Untitled - Ikke-navngivet - - - + Cropped Image Beskåret billede - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Det ser ud til, at du kører 32-bit-versionen af <strong>Luminance HDR</strong> på et 64-bit-system. <br>Hent venligst <strong>64-bit</strong>-versionen fra <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> for at få den bedste oplevelse med Luminance HDR! - + Unsaved changes... Ikke-gemte ændringer… - + This HDR image has unsaved changes.<br>Do you want to save it? Dette HDR-billede har ikke-gemte ændringer.<br>Vil du gemme det? - + Fattal Warning Fattal advarsel - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - Denne tone mapping operator afhænger af inputbilledets størrelse. Anvendelse af operatoren på billedet i fuld størrelse vil sansynligvis resultere i et anderledes billede. - -Vil du fortsætte? + + + + + Untitled + Ikke-navngivet - + Untitled %1 Ikke-navngivet %1 - + Error: %1 Fejl: %1 - + Untitled HDR - + FITS Image FITS-billede @@ -4435,23 +4713,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Højlys</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vælg her metode for højlysbeskæring:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid hvid</span>: beskær al højlys til solid hvid</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Ubeskåret</span>: efterlad højlys ubeskåret i forskellige niveauer af pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Bland</span>: Bland beskårede og ubeskårede værdier sammen for en graduerende overgang til hvid</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Genopbyg</span>: Rekonstruér højlys ved hjælp af niveauværdi</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4739,28 +5008,28 @@ &Ok - + Restart Genstart - + For the settings to take effect, please restart the application! Genstart applikationen for at ændringerne træder i kraft! - - + + Choose a directory Vælg en mappe - + Open ICC Profile Indlæs ICC-profil - + Color profile (*.icc *.ICC *.icm *.ICM) Farveprofil (*.icc *.ICC *.icm *.ICM) @@ -4876,17 +5145,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: FEJL: Kunne ikke indlæse tone mapping-indstillingsfil: - + ERROR: File too old, cannot parse Tone Mapping Setting file: FEJL: Filen er for gammel; kan ikke parse tone mapping-indstillingsfil: - + ERROR: cannot parse Tone Mapping Setting file: FEJL: Kan ikke parse tone mapping-indstillingsfil: @@ -4894,370 +5163,452 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning Advarsel - + I cannot open monitor profile. Please select a different one. Kan ikke indlæse skærmprofil. Vælg venligst en anden. - + I cannot open printer profile. Please select a different one. Kan ikke åbne printerprofil. Vælg venligst en anden. - + Please select a printer profile . Vælg venligst en printerprofil. - + I cannot perform the color transform. Please select a different monitor profile. Kan ikke udføre farvetransformeringen. Vælg venligst en anden skærmprofil. - - Triangular - Triangulær - - - - Plateau - Plateau - - - - Gaussian - Gaussian - - - - Flat - Flad - - - - Linear - Lineær - - - - Gamma - Gamma - - - - Logarithmic - Logaritmisk - - - - sRGB - sRGB - - - - From Calibration/Input File - Fra kalibrerings-/inputfil - - - - Debevec - Debevec + + + + Weights= + - - Robertson - Robertson + + + + - Response curve= + - - Robertson Response Calculation - Robertson responsberegning + + + + - Model= + - + PreGamma=%1 PræGamma=%1 - + Contrast Equalization Kontrast-equalisering - + Contrast Kontrast - - + + Saturation Farvemætning - + Detail Detaljer - + Luminance Level Luminansniveau - + Luminance Level=Auto Luminansniveau=Auto - + Color Saturation Farvemætning - + Contrast Enhancement Kontrastforbedring - + + Alpha Alfa - + Beta Beta - + NoiseRedux StøjRedux - + FFTSolver FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple simpel - + Equation 2 Ligning 2 - + Equation 4 Ligning 4 - - + + Local Lokal - + Bias Bias - + Spatial Rumlig - - + + Range Interval - + Base Base - + Multiplier Multiplikator - + AutoLuminance AutoLuminans - + Cone Kegle - + Rod Rod - + Key Nøgle - + Phi Phi - + Scales: Skalaer: - + Lower Lav - + Upper Høj - + Brightness Lysstyrke - + Chromatic Adaptation Kromatisk adaptering - + Light Adaptation Lysadaptering - - Option -v -a... - Option -v -a… + + Pupil Area + - - LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - LuminanceHDR kræver, at align_image_stack køres med tilvalget "-v" og uden tilvalget "-a". Kommandolinjetilvalg er rettet til. + + PostSaturation=%1 + - - Cannot convert %1 to a float - Kan ikke konvertere %1 til en float + + PostGamma=%1 + - - Loading TMO settings from file: %1 + + + HDR Preview - - Input file %1 - Inputfil %1 + + Debevec + Debevec - - Running in HDR-creation mode. - Kører i HDR-oprettelsestilstand. + + Robertson + Robertson - - Running in Load-HDR mode. - Kører i indlæs-HDR-tilstand. + + Robertson Response Calculation + Robertson responsberegning - - Temporary directory: %1 - Midlertidig mappe: %1 + + Triangular + Triangulær - - - Using %n threads. - + + + Plateau + Plateau - - Loading file %1 - Indlæser til %1 + + Gaussian + Gaussian - - Successfully loaded file %1. - Indlæste succesfult fil %1. + + Flat + Flad - - All LDR formats - Alle LDR-formater + + Linear + Lineær - - Save the LDR image as... - Gem LDR-billedet som… + + Gamma + Gamma - - Save the HDR image as... + + Logarithmic + Logaritmisk + + + + sRGB + sRGB + + + + From Calibration or Input File + + + + + Option -v -a... + Option -v -a… + + + + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. + LuminanceHDR kræver, at align_image_stack køres med tilvalget "-v" og uden tilvalget "-a". Kommandolinjetilvalg er rettet til. + + + + Cannot convert %1 to a float + Kan ikke konvertere %1 til en float + + + + Loading TMO settings from file: %1 + + + + + Input file %1 + Inputfil %1 + + + + Running in HDR-creation mode. + Kører i HDR-oprettelsestilstand. + + + + Running in Load-HDR mode. + Kører i indlæs-HDR-tilstand. + + + + Temporary directory: %1 + Midlertidig mappe: %1 + + + + Using %n thread(s). + + + + + Loading file %1 + Indlæser til %1 + + + + Successfully loaded file %1. + Indlæste succesfult fil %1. + + + + The database used for saving TM parameters cannot be opened. +Error: %1 + Databasen, der bruges til at gemme TM-parametre, kan ikke indlæses. +Fejl: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + + + All LDR formats + Alle LDR-formater + + + + Save the LDR image as... + Gem LDR-billedet som… + + + + All HDR formats + + + + + Save the HDR image as... Gem HDR-billedet som… - + Save as... Gem som... @@ -5328,202 +5679,20 @@ SavedParametersDialog - + Saved Parameters Gemte parametre - - + Comment Kommentar - + TM Operator TM-operator - - - Simple - Simpel - - - - Equation 2 - Ligning 2 - - - - Local Contrast Threshold - Lokal kontrast-grænseværdi - - - - Bias - Bias - - - - Spatial Kernel Sigma - Spatial kernel sigma - - - - Range Kernel Sigma - Range kernel sigma - - - - Base Contrast - Base kontrast - - - - Alpha - Alfa - - - - Beta - Beta - - - - - Color Saturation - Farvemætning - - - - Noise Reduction - Støjreduktion - - - - Old Fattal - Gammel Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Kontrast-equalisering - - - - Contrast Factor - Kontrastfaktor - - - - Saturation Factor - Farvemætningsfaktor - - - - Detail Factor - Detaljefaktor - - - - Contrast Enhancement - Kontrastforbedring - - - - Luminance Level - Luminansniveu - - - - Manual Luminance Level - Manuel luminansniveau - - - - Cone and Rod based on Luminance - Cone og Rod baseret på luminans - - - - Local Tonemapping - Lokal tone mapping - - - - Cone Level - Cone-niveau - - - - Rod Level - Rod-niveau - - - - Multiplier - Multiplikator - - - - Use Scales - Brug skalaer - - - - Key Value - Nøgleværdi - - - - Phi Value - Phi-værdi - - - - Range - Interval - - - - Lower Scale - Lav skala - - - - Upper Scale - Høj skala - - - - Brightness - Lysstyrke - - - - Chromatic Adaptation - Kromatisk adaptering - - - - Light Adaptation - Lysadaptering - - - - Pre-gamma - Præ-gamma - SavingParameters @@ -5579,7 +5748,7 @@ TMOProgressIndicator - + Abort computation Afbryd beregning @@ -5608,531 +5777,605 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Her kan du indlæse og gemme en tone mapping-indstillingsfil.<br>Du kan også anvende indholdet af den aktuelt indlæste indstillingsfil. + + Tonemap + Tone map - - Tone Mapping Settings - Tone mapping-indstillinger + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - Gem aktuelle parametre til en tekstfil + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - Gem aktuelle parametre (præ-gamma og TMO) til en tekstfil. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger + + Ferradans + - - Load an existing text file containing pregamma and TMO settings. - Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger. + + Drago + Drago - - Save current parameters - Gem aktuelle parametre + + Durand + Durand - - Load saved parameters - Indlæs gemte parametre + + Reinhard '02 + Reinhard '02 - - Export + + Reinhard '05 + Reinhard '05 + + + + Ashikhmin + Ashikhmin + + + + Pattanaik + Pattanaik + + + + Mai - - Fast export + + Ferwerda - - Opens the current export direcotory. This can be changed in the preferences! + + KimKautz - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + VanHateren - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Her kan du anvende gamma-rettelse på HDR'et.<br>Gamma-rettelse vil anvendes før tone mapping. + + Lischinski + - - Process - Fremgang + + Operator + Operator - - Result Si&ze + + &Contrast Factor - - - Gamma applied before tonemapping - Gamma anvendt før tone mapping + + Contrast Equalization + Kontrast-equalisering - - Pre-&gamma + + &Detail Factor + + + + + Saturat&ion Factor - - Restore pregamma's default value (1) - Genopret standardværdi for præ-gamma (1) + + Lcd Office + LCD kontor - - Size of the resulting LDR image - Størrelse af den resulterende LDR-fil + + Lcd + LCD - - Here you can choose the size of the resulting LDR image. - Her kan du vælge størrelsen af den resulterende LDR-billede. + + Lcd Bright + LCD lys - - Set Custom Output Size - Sæt brugerdefineret outputstørrelse + + CRT + CRT - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Ved at klikke på denne knap kan du indsætte en <i>bredde</i>værdi for størrelsen på det resulterende LDR-billede.<br>Efter du har tastet Enter (eller Return) vil en højdeværdi automatisk blive beregnet, og den nye størrelse tilføjet til listen. + + Co&lor Saturation + - - Start tonemapping (CTRL+T) - Start tone mapping (Ctrl+T) + + Co&ntrast Enhancement + - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Brug aktuelle parametre herover (præ-gamma og tone mapping operator) for at beregne et LDR-billede + + Enable +Luminace Level + Slå luminansniveau til - - &Update preview + + Lum&inance Level - - Ctrl+T - Ctrl+T + + Predefined &Display + - - Update current LDR - Opdatér aktuel LDR + + A&lpha + - - Auto Levels + + Bet&a - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Color Saturat&ion - - Tonemap - Tone map + + &Noise Reduction + - - Mantiuk '06 - Mantiuk '06 + + Version 2.3.0 + Version 2.3.0 - - Mantiuk '08 - Mantiuk '08 + + &Inverse Alpha + - - Fattal - Fattal + + Rho + - - Ferradans + + B&ias - - Drago - Drago + + Spatial &Kernel Sigma + - - Durand - Durand + + Base Co&ntrast + - - Reinhard '02 - Reinhard '02 + + Range Kerne&l Sigma + - - Reinhard '05 - Reinhard '05 + + Ph&i + - - Ashikhmin - Ashikhmin + + &Key Value + - - Pattanaik - Pattanaik + + &Lower Scale + - - Mai + + Upper S&cale - - Operator - Operator + + Use Scales + Brug skalaer - - Contrast Factor - Kontrastfaktor + + Ra&nge + - - Saturation Factor - Farvemærningsfaktor + + &Light Adaptation + - - Detail Factor - Detaljefaktor + + Chromatic A&daptation + - - Contrast Equalization - Kontrast-equalisering + + Br&ightness + - - Predefined Display - Prædefineret skærm + + Local Contrast Threshol&d + - - Lcd Office - LCD kontor + + Simple + Simpel - - Lcd - LCD + + Equation &Number + - - Lcd Bright - LCD lys + + Eqn &2 + - - CRT - CRT + + Eqn &4 + - - - Color Saturation - Farvemætning + + Local Tone Mapping + Lokal tone mapping - - Contrast Enhancement - Kontrastforbedring + + Mu&ltiplier + - - Enable -Luminace Level - Slå luminansniveau til + + Auto Cone/Rod + Auto Cone/Rod - - Luminance Level - Luminansniveau + + Co&ne Level + - - Alpha - Alfa + + Ro&d Level + - - Beta - Beta + + This operator has no options + - - Noise Reduction - Støjreduktion + + &Multiplier + - - Version 2.3.0 - Version 2.3.0 + + A&daptation Luminance + - - Inverse Alpha + + &C1 - - Rho + + C&2 - - Bias - Bias + + Pup&il Area + - - Spatial Kernel Sigma - Spatial kernel sigma + + a&lpha mul + - - Range Kernel Sigma - Range kernel sigma + + Restore operator's default values + Genopret operators standardværdier - - Base Contrast - Base kontrast + + Restore + Genopret - - Key Value - Nøgleværdi + + Previous applied settings + Forrige anvendte indstillinger - - Phi - Phi + + Previous + Forrige - - Use Scales - Brug skalaer + + Next applied settings + Næste anvendte indstillinger - - Range - Interval + + Next + Næste - - Lower Scale - Lav skala + + Start tonemapping (CTRL+T) + Start tone mapping (Ctrl+T) - - Upper Scale - Høj skala + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Brug aktuelle parametre herover (præ-gamma og tone mapping operator) for at beregne et LDR-billede - - Brightness - Lysstyrke + + &Update preview + - - Chromatic Adaptation - Kromatisk adaptering + + Ctrl+T + Ctrl+T - - Light Adaptation - Lysadaptering + + Update current LDR + Opdatér aktuel LDR - - Local Contrast Threshold - Lokal kontrast-grænseværdi + + Auto Levels + - - Simple - Simpel + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Equation Number - Ligning nummer + + Processing + - - Eqn &2 + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Her kan du anvende gamma-rettelse på HDR'et.<br>Gamma-rettelse vil anvendes før tone mapping. + + + + Res&ult Size - - Eqn &4 + + Set Custom Output Size + Sæt brugerdefineret outputstørrelse + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Ved at klikke på denne knap kan du indsætte en <i>bredde</i>værdi for størrelsen på det resulterende LDR-billede.<br>Efter du har tastet Enter (eller Return) vil en højdeværdi automatisk blive beregnet, og den nye størrelse tilføjet til listen. + + + + + Gamma applied before tonemapping + Gamma anvendt før tone mapping + + + + Pre-&gamma - - Multiplier - Multiplikator + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Local Tone Mapping - Lokal tone mapping + + Pos&t-saturation + - - Auto Cone/Rod - Auto Cone/Rod + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Cone Level - Cone-niveau + + Post-gamma + - - Rod Level - Rod-niveau + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - This operator has no options + + ... + + + + + Settings - - Restore operator's default values - Genopret operators standardværdier + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Her kan du indlæse og gemme en tone mapping-indstillingsfil.<br>Du kan også anvende indholdet af den aktuelt indlæste indstillingsfil. - - Restore - Genopret + + Tone Mapping Settings + Tone mapping-indstillinger - - Previous applied settings - Forrige anvendte indstillinger + + Save current parameters to a text file + Gem aktuelle parametre til en tekstfil - - Previous - Forrige + + Save current parameters (pregamma and TMO) to a text file. + Gem aktuelle parametre (præ-gamma og TMO) til en tekstfil. - - Next applied settings - Næste anvendte indstillinger + + Load an existing text file containing pregamma and TMO settings + Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger - - Next - Næste + + Load an existing text file containing pregamma and TMO settings. + Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger. + + + + Load saved parameters + Indlæs gemte parametre + + + + Save current parameters + Gem aktuelle parametre + + + + Export + - + + Fast export + + + + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + + + Queue size: %1 - + TM Database Problem TM databaseproblem - + The database used for saving TM parameters cannot be opened. Error: %1 Databasen, der bruges til at gemme TM-parametre, kan ikke indlæses. Fejl: %1 - + Load a tonemapping settings text file... Indlæs en tone mapping indstillingstekstfil… - - + + LuminanceHDR tonemapping settings text file (*.txt) Luminance HDR tone mapping indstillingstekstfil (*.txt) - - - - + + + + Aborting... Afbryder... - + File is not readable (check existence, permissions,...) Fil er ikke læsbar (check eksistens, rettigheder, ...) - + Save tonemapping settings text file to... Gem tone mapping indstillingstekstfil til... - + File is not writable (check permissions, path...) Fil er ikke skrivbar (check rettigheder, sti, ...) - + File is not readable (check permissions, path...) Fil er ikke læsbar (check rettigheder, sti, ...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Fejl: Formatet for tone mapping indstillingsfil er ændret. Denne (gamle) fil kan ikke bruges med denne version af Luminance HDR. Opret en ny. - + Custom LDR size Brugerdefineret LDR-størrelse - + Enter the width of the new size: Indtast bredden for den nye størrelse: @@ -6282,19 +6525,19 @@ &Start - - + + All Supported formats Alle understøttede formater - - + + Select the input images Vælg inputbilleder - + &Done &Færdig @@ -6302,39 +6545,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Licensdokument ikke fundet - du kan finde det online: %2her%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation Donering - + Would you like to donate? Kunne du tænke dig at donere? - + Yes, I'd love to! Ja, det vil jeg gerne! - + Stop Bothering Me Stop med at genere mig - + Remind me later Påmind mig senere @@ -6342,18 +6585,18 @@ UpdateChecker - + A new release is ready for download! En ny udgivelse er klar til download! - - + + Do you want to open the webpage for download now? Vil du åbne websiden for download nu? - + Click to download, or select Help->Update! Klik for at downloade, eller vælg Hjælp->Opdatér! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_de.ts luminance-hdr-2.6.0/i18n/lang_de.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_de.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_de.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + Über Luminance HDR @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,75 +30,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors &Autoren - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Dank an - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Änderungshistorie - + &License Agreement &Lizenzvereinbarung - + &OK &OK @@ -104,7 +159,7 @@ Batch HDR - + HDR-Stapelverarbeitung @@ -123,273 +178,320 @@ Ausgabe - + Choose an HDR output file format Format der HDR-Ausgabedatei wählen - - Predefined profile: - Vordefiniertes Profil: - - - - Output format: - Ausgabeformat: + + Filename prefix: + Dateinamen-Präfix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Eines der vordefinierten Profile wählen. -In der Dokumentation findest du weitere Informationen. + - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + Ausgabeformat: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Gewichte: + + + + Predefined profile: + Vordefiniertes Profil: + + + + Model: + Modell: + + + + Debevec + Debevec + + + + Triangular + Dreieckig + + + + Linear + Linear + + + Alignment Ausrichtung - - Auto align the bracketed pictures - Aufnahmen der Belichtungsreihe automatisch ausrichten + + Use Hugin's align_image_stack engine + Hugins align_image_stack-Methode verwenden - - Auto-align images - Bilder automatisch ausrichten + + Hugin's align_&image_stack + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine MTB-Methode (Median Threshold Bitmap) verwenden - + &MTB - + &MTB - - Use Hugin's align_image_stack engine - Hugins align_image_stack-Methode verwenden + + Auto align the bracketed pictures + Aufnahmen der Belichtungsreihe automatisch ausrichten - - Hugin's align_&image_stack - + + Auto-align images + Bilder automatisch ausrichten - + Auto-crop Bilder automatisch zuschneiden - + &Cancel &Abbrechen - + &Start &Starten - + &Close &Schließen - + Progress Fortschritt - + Input/Output Quelle/Ausgabe - + Folder where created HDRs are saved Ordner zum Speichern der erzeugten HDR-Bilder - - + + Select... Wählen ... - + Folder where bracketed pictures are located (in alphabetical order) Ordner mit Aufnahmen der Belichtungsreihe (alphabetisch sortiert) - + Input folder: Quellordner: - + Output folder: Ausgabeordner: - + Anti-ghosting Anti-Ghosting - + Artifact-free High Dynamic Range Imaging Artefaktfreie HDR-Bilderzeugung - + Threshold Schwellenwert - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Vom automatischen Anti-Ghosting-Algorithmus verwendeter Schwellenwert. Ein niedrigerer Schwellenwert sorgt für eine aggressivere Verarbeitung, kann aber den erzielten Dynamikumfang verringern. Verwende die &quot;Recompute&quot;-Schaltfläche, um die tatsächliche Fleckenbildung zu sehen und den Schwellenwert entsprechend anzupassen.</p></body></html> - + O. Gallo and others O. Gallo und andere - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Automatischen Anti-Ghosting-Algorithmus aktivieren</p></body></html> - + Auto anti-ghosting Autom. Anti-Ghosting - + Custom config %1 Eigene Konfiguration %1 - + Choose a source directory Quellverzeichnis auswählen - + Choose a output directory Ausgabeverzeichnis auswählen - - - + + + Warning Warnung - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - Das gewählte Ausgabeverzeichnis enthält HDR-Dateien. Diese Dateien könnten überschrieben werden. - -Fortfahren? + - - + + Total number of pictures must be a multiple of number of bracketed images. Die Anzahl der Bilder muss einem Vielfachen der Anzahl der Aufnahmen der Belichtungsreihe entsprechen. - + Started processing... Beginne mit Verarbeitung ... - + Loading files... Lade Dateien ... - + Completed with errors Mit Fehlern beendet - + Completed without errors Ohne Fehler abgeschlossen - + Error: missing EXIF data Fehler: fehlende EXIF-Daten - + Aligning... Ausrichten ... - + Creating HDR... Erzeuge HDR ... - + Doing auto anti-ghosting... Führe autom. Anti-Ghosting durch ... - + Written Geschrieben - + Error: Fehler: - + Aborting... Abbrechen ... @@ -412,261 +514,302 @@ Liste von HDR-Bildern, die dynamikkomprimiert werden - - Add Directory (Alt+D) - Verzeichnis hinzufügen (Alt+D) + + Remove Files (Alt+R) + Dateien entfernen (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Dateien hinzufügen (Alt+F) + + Remove All Files (Alt+X) + Alle Dateien entfernen (Alt+X) - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Dateien entfernen (Alt+R) + + Alt+X + Alt+X - - Alt+R - Alt+R + + Add Files (Alt+F) + Dateien hinzufügen (Alt+F) - - Tone Mapping Settings - Dynamikkompressionsvorgaben + + Alt+F + Alt+F - Add Directory (Alt+I) - Verzeichnis hinzufügen (Alt+I) + Add Directory (Alt+D) + Verzeichnis hinzufügen (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Dynamikkompressionsvorgaben - + Add Files (Alt+L) Dateien hinzufügen (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Verzeichnis hinzufügen (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Aus Datenbank hinzufügen (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Einstellungen entfernen (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + Alle Einstellungen entfernen (Alt+W) + + + + Alt+W + Alt+W + + + List of Tone Mapping Setting files that will be used to tone map each HDR Liste von Dateien mit Dynamikkompressionsvorgaben, die auf jedes HDR-Bild angewendet werden - + Output Ausgabe - + Output Image Width: Breite des Ausgabebildes: - + Output Folder: Ausgabeordner: - - + + Specify output folder for the tone mapped files Ausgabeordner für dynamikkomprimierte Dateien angeben - + Selec&t... &Wählen ... - - + + Width of tonemapped image in percent of original image - + Breite des erstellten Bildes relativ zur Originalbildgröße - + % % - + Output Format: Ausgabeformat: - + Image format of tonemapped images - + Bildformat für erstelle Bilder - + Image format options - + Bildformat-Optionen - + Conversion Log Konvertierungsprotokoll - + Batch operations report Bericht zur Stapelverarbeitung - + Show onl&y: - + Nu&r anzeigen - + Filter messages based on severity Meldungen abhängig vom Typ filtern - + All messages Alle Meldungen - + Errors only Nur Fehler - + Success messages Nur Erfolgsmeldungen - + Filter &log messages: - + &Log-Nachrichten filtern - + Clear filter text Filter löschen - + Overall completion progress Gesamter Fortschritt - + &Cancel Abbre&chen - + Start batch tone mapping Stapel-Farbabbildung starten - + &Start &Starten - + Using %n thread(s) - - - + + + Choose a directory Verzeichnis auswählen - + All HDR images Alle HDR-Bilder - + Select input images Quellbilder wählen - + Load tone mapping settings text files... Lade Dateien mit Dynamikkompressionsvorgaben ... - + Luminance HDR tone mapping settings text file (*.txt) Datei mit Dynamikkompressionsvorgaben für Luminance HDR (*.txt) - + + Warning + Warnung + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Verarbeite ... - + Start processing... Beginne Verarbeitung ... - + Close Schließen - + &Done F&ertig - + + Conversion aborted by user request. + + + + All tasks completed. Alle Aufgaben abgeschlossen. - + Aborting... Abbrechen ... @@ -674,27 +817,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Beginne mit Verarbeitung von %2 - + [T%1] Successfully load %2 [T%1] Erfolgreich geladen: %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] LDR-Datei wurde erfolgreich gespeichert: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] FEHLER: Datei kann nicht gespeichert werden: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] FEHLER: Laden von %2 fehlgeschlagen @@ -702,573 +850,668 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Verwendung: %1 [OPTIONEN]... [QUELLDATEIEN]... - + Display this help. Diese Hilfe anzeigen. - + Display program version. - + Programmversion anzeigen - + Print more messages during execution. Während der Ausführung mehr Meldungen anzeigen. - + Print a list of all supported cameras. - + Eine Liste aller unterstützter Kameras ausgeben. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AIS|MTB] Die für die HDR-Erzeugung zu verwendende Ausrichtungsmethode (Standard: keine Ausrichtung). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,... Gibt die numerischen Belichtungswerte/EV-Werte an (so viele wie QUELLDATEIEN). - + prefix Save aligned images to files which names start with prefix prefix Speichert ausgerichtete Bilder in Dateien, deren Namen mit prefix beginnen - + HDR_FILE Load an HDR instead of creating a new one. HDR_FILE Lädt eine HDR-Datei, anstatt eine neue zu erzeugen. - + HDR_FILE Save to a HDR file format. (default: don't save) HDR_FILE Speichert eine HDR-Datei. (Standard: nicht speichern) - + VALUE Gamma value to use during tone mapping. (default: 1) VALUE Gamma-Wert für die Dynamikkompression. (Standard: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALUE Breite, auf die das HDR-Bild skaliert wird (geschieht vor Gammakorrektur und Dynamikkompression) - + LDR_FILE File name you want to save your tone mapped LDR to. LDR_FILE Dateiname, unter dem das dynamikkomprimierte LDR-Bild gespeichert wird. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) THRESHOLD Autom. Anti-Ghosting mit angegebenem Schwellenwert aktivieren (0.0-1.0). - + Apply autolevels correction after tonemapping. - + Autolevel-Anpassung nach dem Tonemapping anwenden. - + Enable generation of a webpage with embedded HDR viewer. + Erstellung einer Webseite mit eingebettetem HDR-Viewer aktivieren. + + + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. - + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR HDR-Erzeugungs-Parameter - Es muss entweder eine existierende HDR-Datei geladen (mittels Option -l) oder QUELLDATEIEN angegeben werden, um ein neues HDR-Bild zu erzeugen. - + weight = triangular|gaussian|plateau|flat (Default is triangular) Gewichtung = dreieckig|Gauss|Plataeu|flach (Standard ist dreieckig) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) Verstärkerkennlinie = aus Datei|linear|Gamma|Log|sRGB (Standard ist linear) - + model: robertson|robertsonauto|debevec (Default is debevec) Model: robertson|robertsonauto|debevec (Voreinstellung ist debevec) - + curve filename = your_file_here.m curve filename = deine_datei.m - + LDR output parameters LDR Ausgabeparameter - + VALUE Quality of the saved tone mapped file (1-100). VALUE Qualität der gespeicherten dynamikkomprimierten Datei (0-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) Tiff-Format. Erlaubte Werte sind [8b|16b|32b|log|uv] (Voreinstellung ist 8b) - + Tiff deflate compression. true|false (Default is true) Tiff-Komprimierung. true|false (Voreinstellung ist true) - + HTML output parameters - + HTML-Ausgabeparameter - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Tone Mapping Parameter - Es wird kein Tone Mapping angewandt wenn -o nicht angegeben wird - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings SETTING_FILE Lade eine existierende Einstellungsdatei mit Pre-Gamma- und allen TMO-Einstellungen - + Fattal Fattal - + + alpha FLOAT Alpha-Verlauf - + beta FLOAT Beta-Verlauf - + color FLOAT Farbverlauf - + noise FLOAT Rauschverlauf - + new true|false Neu ja|nein - + Ferradans Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + KimKautz + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 Mantiuk 06 - + contrast FLOAT Kontrastverlauf - + saturation FLOAT Sättigungsverlauf - + detail FLOAT Detailverlauf - + equalization true|false Äqualisation ja|nein - + Mantiuk 08 Mantiuk 08 - + color saturation FLOAT Farbsättigungsverlauf - + contrast enhancement FLOAT Kontrasterhöhungsverlauf - + luminance level FLOAT Helligkeitsverlauf - + enable luminance level true|false Helligkeit manuell festlegen ja|nein - + Durand Durand - + spatial kernel sigma FLOAT Spatial-Kernel-Sigma-Verlauf - + range kernel sigma FLOAT Range-Kernel-Sigma-Verlauf - + base contrast FLOAT Basiskontrastverlauf - + Drago Drago - + bias FLOAT Bias-Verlauf - + Reinhard 02 Reinhard 02 - + key value FLOAT Schlüsselwert-Verlauf - + phi FLOAT Phi-Verlauf - + use scales true|false - + range FLOAT Bereichsverlauf - + lower scale FLOAT Verlauf der unteren Skala - + upper scale FLOAT Verlauf der oberen Skala - + Reinhard 05 Reinhard 05 - + Brightness FLOAT Helligkeitsverlauf - + Chroma adaption FLOAT Chromatischer Anpassungsverlauf - + Light adaption FLOAT Lichtanpassungsverlauf - + Ashikmin Ashikmin - + Equation number 2 true|false Ausgleichszahl 2 ja|nein - + Simple true|false Einfach ja|nein - + Local threshold FLOAT Lokaler Schwellenwertverlauf - + Pattanaik Pattanaik - + multiplier FLOAT Multiplikator-Verlauf - + Local tone mapping true|false Lokale Dynamikkompression ja|nein - + Auto luminance true|false Automatische Helligkeit ja|nein - + cone level FLOAT Zapfen-Level-Verlauf - + rod level FLOAT - - Luminance HDR version + + VanHateren + VanHateren + + + + pupil_area FLOAT - + + Lischinski + Lischinski + + + + Luminance HDR version + Luminance HDR Version + + + With LibRaw version - + Mit LibRaw Version - + models listed - - Error: htmlQuality must be in the range [1..4]. + + + Error: Unsupported LDR file type. - + + + Error: Unsupported HDR file type. + + + + + Error: htmlQuality must be in the range [1..4]. + Fehler: htmlQuality muss sich im Bereich [1..4] befinden. + + + Error: Alignment engine not recognized. Fehler: Ausrichtungsmethode wurde nicht erkannt. - + Error: Unknown weight function specified. Fehler: Unbekannte Gewichtung angegeben. - + Error: Unknown response curve specified. Fehler: Unbekannte Verlaufskurve angegeben. - + Error: Unknown HDR creation model specified. Fehler: Unbekanntes Modell zur HDR-Erzeugung angegeben. - + Error: Unknown tone mapping operator specified. Fehler: Unbekannter Dynamikkompressionsoperator angegeben. - - + + Error: The specified file with TMO settings could not be parsed! Fehler: Die angegebene Datei mit TMO-Einstellungen konnte nicht analysiert werden! - + Error: The specified file with TMO settings could not be parsed!: %1 Fehler: Die angegebene Datei mit TMO-Einstellungen konnte nicht analysiert werden!: %1 - + Error: Quality must be in the range [1..100]. - + Fehler: Qualität muss sich im Bereich [1..100] befinden. - + Error: Unknown tiff format. Fehler: Unbekanntes tiff-Format. - + Error: Threshold must be in the range [0..1]. - + Fehler: Schwellenwert muss sich im Bereich [0..1] befinden. - + Error: The number of EV values specified is different from the number of input files. Fehler: Die Anzahl der angegebenen EV-Werte unterscheidet sich von der Anzahl der Quelldateien. - + Load file %1 failed Laden der Datei %1 fehlgeschlagen - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Fehler: In den Bildern sind keine EXIF-Daten vorhanden und in der Kommandozeile wurden keine EV-Werte angegeben. Breche ab. - + EV values have been assigned. EV-Werte wurden zugewiesen. - - + + Starting aligning... Richte aus ... - + Failed executing align_image_stack Ausführung von align_image_stack fehlgeschlagen - + Failed aligning images. Bilder konnten nicht ausgerichtet werden. - + Creating (in memory) the HDR. Erzeuge HDR (im Speicher). - + Saving to file %1. Speichere in Datei %1. - + Image %1 saved successfully Bild %1 erfolgreich gespeichert - + Could not save %1 Konnte %1 nicht speichern - + NOT Saving HDR image to file. %1 Speichere HDR-Bild NICHT in Datei. %1 - + Exporting to HTML - + Exportiere zu HTML - + ERROR: directory %1 must exist - + FEHLER: Verzeichnis %1 muss existieren - + Tonemapping requested, saving to file %1. Dynamikkompression angefordert, speichere in Datei %1. - + Resizing to width %1. - + Skaliere auf Breite %1. - + Applying gamma %1. + Wende Gamma %1 an. + + + + +Applying saturation enhancement %1. - + -Image %1 successfully saved +Applying post-gamma %1. - + + +Image %1 successfully saved + +Bild %1 erfolgreich gespeichert + + + ERROR: Cannot save to file: %1 - + +FEHLER: Datei kann nicht gespeichert werden: %1 - + Tonemapping NOT requested. - + Tonemapping NICHT angefragt. - - Failed loading images - Bilder konnten nicht geladen werden + + Failed loading images: %1 + @@ -1276,7 +1519,7 @@ Choose action - + Aktion auswählen @@ -1324,7 +1567,7 @@ <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> is open-source software and its development required hundreds of hours of work.</p><p>If you like it, you are using it in your HDR workflow and you would like to see it gradually improved, please support its authors by making a donation.</p><p>Would you like to make a donation for Luminance HDR now?</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span>ist Open Source-Software und die Entwicklung benötigte hunderte Arbeitsstunden.</p><p>Wenn Ihnen die Software gefällt, sie in Ihrem HDR-Workflow benutzen und an einer schrittweisen Verbesserung interessiert sind, würden sich die Autoren über eine Spende freuen.</p><p>Möchten Sie jetzt eine Spende für Luminance HDR tätigen?</p></body></html> @@ -1345,47 +1588,47 @@ EditingTools - + Maskable Maskierbar - + Good image Gutes Bild - + Add good image Gutes Bild hinzufügen - + Remove good image Gutes Bild entfernen - + Ed&itable Ed&itierbar - + R&eference R&eferenz - + Select the previous image in both lists Vorheriges Bild in beiden Listen wählen - + Select the next image in both lists Nächstes Bild in beiden Listen wählen - + Choose a directory and a prefix Verzeichnis und Präfix wählen @@ -1421,9 +1664,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Das derzeit in der Liste ausgewählte Bild kann nach oben, unten, links und rechts mit den Pfeiltasten verschoben werden. -Das Histogramm des Bildes wird im oberen Feld angezeigt. +This image's histogram is displayed in the widget above. + @@ -1448,7 +1690,7 @@ Referen&ce - + Referen&z @@ -1659,7 +1901,7 @@ R&emove - + &Entfernen @@ -1688,7 +1930,7 @@ S&trength: - + S&tärke: @@ -1775,12 +2017,12 @@ Hori&zontal: - + Hori&zontal: Vertica&l: - + Vertika&l: @@ -1858,17 +2100,17 @@ Export HDR to HTML - + HDR nach HTML exportieren Export to HTML - + Nach HTML exportieren Web page: - + Webseite: @@ -1878,7 +2120,7 @@ Open web browser - + Im Webbrowser öffnen @@ -1888,7 +2130,7 @@ % - + % @@ -1898,7 +2140,7 @@ Images folder: - + Bildordner: @@ -1913,23 +2155,23 @@ Export - + Export - + Choose a directory Verzeichnis auswählen - - + + Error: Fehler: - + must be a directory. - + muss ein Verzeichnis sein. @@ -2039,12 +2281,12 @@ &MTB - + &MTB Hugin's align_&image_stack - + Hugin's align_&image_stack @@ -2087,28 +2329,28 @@ Rot - + Load one FITS image... Ein FITS-Bild laden ... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size FITS-Bilder sind unterschiedlich groß - + align_image_stack exited with exit code %1 align_image_stack wurde mit Code %1 beendet - + align_image_stack failed with error align_image_stack schlug fehl @@ -2116,7 +2358,7 @@ GenericViewer - + Pan the image to a region Bild auf einen Ausschnitt ausrichten @@ -2126,48 +2368,61 @@ HdrCreationManager::loadFilesDone(): Error loading a file. - + HdrCreationManager::loadFilesDone(): Fehler beim Laden einer Datei. - + HdrCreationManager::loadFilesDone(): The images have different size. HdrCreationManager::loadFilesDone(): Die Bilder sind unterschiedlich groß. + HdrPreview + + + HDR Preview + HDR-Vorschau + + + + Close + Schließen + + + HdrViewer - + &Mapping: Da&rstellung: - + Histogram: Histogramm: - + Linear Linear - + Gamma 1.4 Gamma 1,4 - + Gamma 1.8 Gamma 1,8 - + Gamma 2.2 Gamma 2,2 - + Gamma 2.6 Gamma 2,6 @@ -2191,8 +2446,8 @@ - &Currently Loaded Files - + Currently &Loaded Files + Derzeit ge&ladene Dateien @@ -2231,7 +2486,7 @@ - &MTB + M&TB @@ -2241,7 +2496,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2308,12 +2563,12 @@ [2/2] Einstellungen für HDR-Erzeugung wählen - + Profile Profil - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2326,47 +2581,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Das erste vordefinierte Profil in der Liste liefert normalerweise das beste Ergebnis. Es sollte nur dann ein anderes gewählt werden, wenn das resultierende HDR-Bild nicht gut genug ist.</span></p></body></html> - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Sollte nur verwendet werden, falls die vordefinierten Profile keine guten Ergebnisse liefern - + Use Custom Configuration Eigene Einstellungen nutzen - + HDR Creation Model Modell zur HDR-Erzeugung @@ -2416,238 +2671,267 @@ Verlaufskurve - + Linear Linear - + Gamma Gamma - + Log Protokoll - + sRGB sRGB - - Custom - Benutzerdefiniert + + Custom (From File) + - + Response Curve Input File Eingabedatei für Verlaufskurve - + + Load Response + + + + Response Curve Output File Ausgabedatei für Verlaufskurve - + Save As... Speichern als ... - + Save Settings Einstellungen speichern - + + Show HDR + HDR anzeigen + + + + Show HDR Preview + HDR-Vorschau anzeigen + + + + + Show Log + Protokoll anzeigen + + + &Next > &Weiter > - + &Cancel Abbre&chen - + Image Filename Dateiname des Bildes - + Exposure Belichtung - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Alle Formate (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF-Bilder (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw RAW-Bilder (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Quellbilder wählen - + Unknown Unbekannt - + Loading... Lade ... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>WARNUNG:</b></h3></font> Luminance HDR konnte die relevanten <b>EXIF</b>-Tags in den folgenden Bildern nicht finden<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul><hr>Es kann dennoch ein HDR-Bild erzeugt werden. Dazu müssen die Belichtungswerte (EV) oder die Blendenstufenabstände <b>manuell</b> festgelegt werden<hr>Falls dies <b>automatisch</b> geschehen soll, müssen in den Bilddateien zumindest die folgenden EXIF-Daten vorhanden sein: <ul><li>Belichtungskorrektur</li></ul><hr><b>HINWEIS:</b> EXIF-Daten gehen meist bei der Vorverarbeitung der Bilder verloren.<br>Zum <b>Kopieren der EXIF-Daten</b> zwischen zwei Gruppen von Dateien steht der Menüpunkt <b>"Extras -> EXIF-Daten kopieren ..."</b> zur Verfügung. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again + Diese Meldung nicht mehr anzeigen - + EXIF data not found EXIF-Daten nicht gefunden - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Bilder geladen.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Um fortzufahren, müssen die Belichtungswerte manuell festgelegt werden.<br><font color="#FF0000">%1</font> Werte sind noch erforderlich.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: Fehler beim Laden: - + Start loading a set of images with different exposure Zuerst muss eine Reihe von Bildern mit unterschiedlicher Belichtung geladen werden - - - + + + Error... Fehler ... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Konnte externes Programm "<em>align_image_stack</em>" nicht starten.<br>Bitte lies unter "Hilfe -> Inhalt ..." den Abschnitt "Setting up -> External Tools" für weitere Informationen. - + The external application "<em>align_image_stack</em>" crashed... Das externe Programm "<em>align_image_stack</em>" ist abgestürzt ... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Ein unbekannter Fehler trat während der Ausführung des Programms "<em>align_image_stack</em>" auf ... - + Now click on next button Jetzt auf "Weiter" klicken - + + Compute + Berechnen + + + + Finish + Fertigstellen + + + Aligning... Richte aus ... - - - &Finish - &Fertigstellen + + &Compute + Bere&chnen - + Load camera response curve file Verlaufskurve der Kamera laden - + Camera response curve (*.m);;All Files (*) Verlaufskurve der Kamera (*.m);;alle Dateien (*) - + Invalid Response Curve File Ungültige Verlaufskurvendatei - + Invalid Response Curve File: please try a different file Ungültige Datei mit Verlaufskurve: bitte eine andere Datei probieren - + Save a camera response curve file Verlaufskurve der Kamera in Datei speichern - + Camera response curve (*.m) Verlaufskurve der Kamera (*.m) - - Weights: - Gewichte: - - - - - Response curve: - - Verlaufskurve: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Alle Belichtungswerte (EV) wurden festgelegt.<br>Jetzt auf "Weiter" klicken.</b></h3></font></center> - - - Model: - - Modell: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Um fortzufahren, müssen die Belichtungswerte manuell festgelegt werden.<br><font color="#FF0000">%1</font> Werte sind noch erforderlich.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Alle Belichtungswerte (EV) wurden festgelegt.<br>Jetzt auf "Weiter" klicken.</b></h3></font></center> + + Hide Log + Protokoll ausblenden @@ -2659,24 +2943,24 @@ - + &File &Datei E&dit - + Bear&beiten V&iew - + Anze&igen Boo&kmarks - + Lese&zeichen @@ -2685,7 +2969,7 @@ - + &Print... Dr&ucken ... @@ -2701,7 +2985,7 @@ - + &Find... &Suchen ... @@ -2718,7 +3002,7 @@ F3 - + F3 @@ -2728,11 +3012,11 @@ Shift+F3 - + Umschalt+F3 - + &Add Bookmark Lesezeichen hinzuf&ügen @@ -2744,58 +3028,58 @@ &Delete Bookmark - + Lesezeichen &löschen - + D&elete All Alle l&öschen goHome - + Zur Startseite goBack - + Zurück goFwd - + Weiter zoomIn - + Hereinzoomen zoomOut - + Herauszoomen zoomOriginal - + Standardzoom &View Contents - + Inhalte &anzeigen Ctrl+C - + Strg+C View &Search - + &Suche anzeigen @@ -2805,7 +3089,7 @@ View &Bookmarks - + &Lesezeichen anzeigen @@ -2815,103 +3099,101 @@ P&rint Preview - + D&ruck-Vorschau - + Help SideBar Hilfe-Seitenleiste - + LuminanceHDR Online Help Online-Hilfe zu Luminance HDR - + &Edit Bearbei&ten - + &View &Ansicht - - + + &Bookmarks &Lesezeichen - + &Quit &Beenden - + Find &Next &Weitersuchen - + Find &Previous &Rückwärts suchen - + &Contents &Inhalt - + &Search &Suchen - + &Delete Lösche&n - + Find Suchen - + Search Term: Suchbegriff: - + New Bookmark Neues Lesezeichen - + New Bookmark's Title: Titel des neuen Lesezeichens: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Entschuldige, es ist kein Handbuch installiert!</p><p>Bitte kontaktier deinen Paket-Anbieter oder, falls du die Anwendung selbst kompiliert hast, das Luminance-HDR-Team.</p></h2> - + LuminanceHDR - Help Browser Luminance HDR - Hilfe-Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Dieses Protokoll wird vom Hilfe-Browser nicht unterstützt. -Soll die Verknüpfung mit der Standard-Anwendung, -die für dieses Protokoll festgelegt ist, geöffnet werden? + @@ -2967,22 +3249,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: Die folgende Datei ist nicht lesbar: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: Datei %1 hat eine nicht unterstützte Erweiterung: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: Ausnahme beim Lesen von %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 IOWorker: Datei konnte nicht geladen werden: %1 @@ -2990,7 +3277,7 @@ ImageQualityDialog - + Unknown Unbekannt @@ -3041,11 +3328,11 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 - + LDR-Bild [%1 x %2]: %3 @@ -3123,7 +3410,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3140,7 +3427,7 @@ Luminance &HDR Online - + Luminance &HDR Online @@ -3165,7 +3452,7 @@ &Preview Panel - + &Vorschau-Panel @@ -3298,7 +3585,7 @@ Rotat&e clockwise - + Im Uhrzeigersinn dreh&en @@ -3320,7 +3607,7 @@ &Low Dynamic Range - + &Niedriger Dynamikumfang @@ -3330,7 +3617,7 @@ &Fit to Dynamic Range - + &Auf Dynamikumfang anpassen @@ -3345,7 +3632,7 @@ &Shrink Dynamic Range - + Dynamikumfang ein&schränken @@ -3355,7 +3642,7 @@ &Extend Dynamic Range - + Dynamikumfang &erweitern @@ -3365,7 +3652,7 @@ &Decrease Exposure - + Belichtung &verringern @@ -3640,7 +3927,7 @@ Ctrl+I - + Strg+I @@ -3669,7 +3956,7 @@ Ctrl+J - + Strg+J @@ -3716,7 +4003,7 @@ Ctrl+Z - + Strg+Z @@ -3731,7 +4018,7 @@ &Lock Viewers - + Anzeigen &sperren @@ -3746,27 +4033,27 @@ S - + S &Minimize - + &Minimieren Ma&ximize - + Ma&ximieren &Bring All to Front - + Alle nach oben &bringen &Show Preview Panel - + Vorschau-Panel &anzeigen @@ -3815,7 +4102,7 @@ &Remove Tab - + Tab &entfernen @@ -3835,12 +4122,12 @@ F - + F Batch &HDR... - + &HDR-Stapelverarbeitung... @@ -3860,12 +4147,12 @@ &Show on the right - + Auf der rechten Seite &anzeigen Show &on the bottom - + &Unten anzeigen @@ -3875,12 +4162,12 @@ &Update - + &Aktualisieren &FITS Importer... - + &FITS-Import... @@ -3905,17 +4192,17 @@ E&xport to HTML - + Nach HTML e&xportieren Export to web page with embedded HDR viewer - + Export zu Webseite mit eingebettetem HDR-Viewer &Show Full Screen - + Vollbild&ansicht @@ -3925,7 +4212,7 @@ Show &Image Full Screen - + &Bild im Vollbild anzeigen @@ -3935,72 +4222,72 @@ &Supported RAW Cameras - + &Unterstützte RAW-Kameras Lists all cameras supported by the program - + Liste aller vom Programm unterstützten Kameras Ctrl+M - + Strg+M &Lanczos/Bilinear interpolation - + &Lanczos/Bilineare Interpolation <html><head/><body><p>Switch between Lanczos and Bilinear interpolation</p></body></html> - + <html><head/><body><p>Zwischen Lanczos und Bilinearer Interpolation wechseln</p></body></html> Ctrl+K - + Strg+K &Online Documentation - - - - - &Developers Web Site - - - - - &Luminance HDR Web Site - + &Online-Dokumentation Open Online Documentation Web Site with the System Browser - + Online-Dokumentation mit dem Standard-Webbrowser öffnen + + + + &Developers Web Site + &Entwickler-Webseite Developers Web Site - + Entwickler-Webseite Open Developers Web Site with the System Browser - + Entwickler-Webseite mit dem Standard-Webbrowser öffnen + + + + &Luminance HDR Web Site + &Luminance HDR-Webseite Luminance HDR Web Site - + Luminance HDR-Webseite Open Main Web Site with the System Browser - + Hauptseite mit dem Standard-Webbrowser öffnen @@ -4008,93 +4295,90 @@ Fertig. Öffne jetzt ein bestehendes HDR-Bild oder erstell ein neues! - + All HDR formats Alle HDR-Formate - + Load one or more HDR images... Ein oder mehrere HDR-Bilder laden ... - + Save files in Dateien speichern in - - + + Failed to save %1 - + Fehler beim Speichern von %1 - + Done! Fertig! - + Aborting... Abbrechen ... - - - Untitled - Unbenannt - - - + Cropped Image Zugeschnittenes Bild - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Anscheinend verwendest du die 32-Bit-Version von <strong>Luminance HDR</strong> auf einem 64-Bit-System. <br>Für das beste Luminance-HDR-Erlebnis lad bitte die<strong>64-Bit</strong>-Version von <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> herunter! - + Unsaved changes... Nicht gespeicherte Änderungen ... - + This HDR image has unsaved changes.<br>Do you want to save it? Für dieses Bild gibt es nicht gespeicherte Änderungen.<br>Sollen sie gespeichert werden? - + Fattal Warning Fattal-Warnung - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - Dieser Dynamikkompressionsoperator hängt von der Größe des Quellbildes ab. Diesen Operator auf ein Bild in Originalgröße anzuwenden, wird höchstwahrscheinlich ein anderes Ergebnis zur Folge haben. - -Möchten Sie ihn dennoch anwenden? + + + + + Untitled + Unbenannt - + Untitled %1 Unbenannt %1 - + Error: %1 Fehler: %1 - + Untitled HDR Unbenanntes HDR - + FITS Image FITS-Bild @@ -4134,7 +4418,7 @@ Fast export - + Schneller Export @@ -4434,23 +4718,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Glanzlichter</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Glanzlicht-Begrenzungsverfahren wählen:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Klares weiß</span>: Alle Glanzlichter auf klares Weiß begrenzen</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Nicht transformieren</span>: Glanzlichter in verschiedenen unbegrenzten Pink-Schattierungen belassen</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Vermischen</span>: Begrenzte und unbegrenzte Werte miteinander vermischen für einen Verlauf zu Weiß</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rekonstruieren</span>: Glanzlichter mit einem Stärkewert rekonstruieren</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4565,7 +4840,12 @@ </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">When highlights appear pink, you need to lower the saturation level. The default saturation is usually correct.</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Sättigung</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Wenn Glanzlichter pink erscheinen, müssen Sie die Sättigung verringern. Die Standardsättigung ist normalerweise korrekt.</span></p></body></html> @@ -4580,7 +4860,12 @@ </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation value</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Specify the specific saturation level. When highlights appear pink, you need to lower the saturation level.</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Sättigungswert</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Die Sättigung spezifizieren. Wenn Glanzlichter pink erscheinen, müssen Sie die Sättigung verringern.</span></p></body></html> @@ -4738,28 +5023,28 @@ &OK - + Restart Neu starten - + For the settings to take effect, please restart the application! Um die Änderungen zu übernehmen, muss die Anwendung neu gestartet werden! - - + + Choose a directory Verzeichnis auswählen - + Open ICC Profile ICC-Profil öffnen - + Color profile (*.icc *.ICC *.icm *.ICM) Farbprofil (*.icc *.ICC *.icm *.ICM) @@ -4875,17 +5160,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: FEHLER: Datei mit Dynamikkompressionsvorgaben kann nicht geladen werden: - + ERROR: File too old, cannot parse Tone Mapping Setting file: FEHLER: Datei mit Dynamikkompressionsvorgaben ist zu alt und kann nicht verarbeitet werden: - + ERROR: cannot parse Tone Mapping Setting file: FEHLER: Datei mit Dynamikkompressionsvorgaben kann nicht verarbeitet werden: @@ -4893,370 +5178,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + Die Qualität muss zwischen 1 (schlechteste) und 5 (beste) liegen. - + NULL frame passed. - + NULL-Frame übersprungen. - + Adding image - + Bild wird hinzugefügt - + to the web page - + zur Webseite - - - + + + Writing: - + Schreibe: - - - - + + + + Warning Warnung - + I cannot open monitor profile. Please select a different one. Bildschirmprofil konnte nicht geöffnet werden. Bitte anderes wählen. - + I cannot open printer profile. Please select a different one. Druckerprofil konnte nicht geöffnet werden. Bitte anderes wählen. - + Please select a printer profile . Bitte ein Druckerprofil wählen. - + I cannot perform the color transform. Please select a different monitor profile. Farbraumkonvertierung konnte nicht durchgeführt werden. Bitte anderes Bildschirmprofil wählen. - - Triangular - Dreieckig + + + + Weights= + - - Plateau - Plateau + + + + - Response curve= + - - Gaussian - Gauß + + + + - Model= + - Modell= - - Flat - Kontrastarm + + PreGamma=%1 + Pre-Gamma=%1 - - Linear - Linear + + Contrast Equalization + Kontrastausgleich - - Gamma - Gamma + + Contrast + Kontrast - - Logarithmic - Logarithmisch + + + Saturation + Sättigung - - sRGB - sRGB + + Detail + Detail - - From Calibration/Input File - Von der Kalibrierung/Eingabedatei + + Luminance Level + Helligkeit - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation - Robertson Response Berechnung - - - - PreGamma=%1 - Pre-Gamma=%1 - - - - Contrast Equalization - Kontrastausgleich - - - - Contrast - Kontrast - - - - - Saturation - Sättigung - - - - Detail - Detail - - - - Luminance Level - Helligkeit - - - + Luminance Level=Auto Helligkeit=Auto - + Color Saturation Farbsättigung - + Contrast Enhancement Kontrasterhöhung - + + Alpha Alpha - + Beta Beta - + NoiseRedux Rauschunterdrückung - + FFTSolver FFT-Funktion - + Rho - + Rho - + InvAlpha + InvAlpha + + + + MaxLuminance + MaxLuminanz + + + + AdaptationLuminance - + + C1 + + + + + C2 + + + + simple einfach - + Equation 2 Eqn 2 - + Equation 4 Eqn 4 - - + + Local Schwellenwert - + Bias Bias - + Spatial Spatial - - + + Range Bereich - + Base Basis - + Multiplier Multiplikator - + AutoLuminance Auto-Helligkeit - + Cone Zapfen - + Rod Stäbchen - + Key Hauptwert - + Phi Phi - + Scales: Skalen: - + Lower Untere - + Upper Obere - + Brightness Helligkeit - + Chromatic Adaptation Chromatische Anpassung - + Light Adaptation Lichtanpassung - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + HDR-Vorschau + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + Robertson Response Berechnung + + + + Triangular + Dreieckig + + + + Plateau + Plateau + + + + Gaussian + Gauß + + + + Flat + Kontrastarm + + + + Linear + Linear + + + + Gamma + Gamma + + + + Logarithmic + Logarithmisch + + + + sRGB + sRGB + + + + From Calibration or Input File + + + + Option -v -a... Option -v -a ... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. Luminance HDR erfordert, dass align_image_stack mit der Option "-v" und ohne "-a" ausgeführt wird. Die Kommandozeilenoptionen wurden angepasst. - + Cannot convert %1 to a float Kann %1 nicht in eine Gleitkommazahl konvertieren - + Loading TMO settings from file: %1 TMO-Einstellungen werden aus Datei geladen: %1 - + Input file %1 Quelldatei %1 - + Running in HDR-creation mode. Läuft im HDR-erzeugen-Modus. - + Running in Load-HDR mode. Läuft im HDR-laden-Modus. - + Temporary directory: %1 Temporäres Verzeichnis: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 Lade Datei %1 - + Successfully loaded file %1. Datei %1 erfolgreich geladen. + + The database used for saving TM parameters cannot be opened. +Error: %1 + Die Datenbank zum Speichern von Dynamikkompressionsparametern konnte nicht geöffnet werden. Fehler: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Alle LDR-Formate - + Save the LDR image as... LDR-Bild speichern als ... + All HDR formats + Alle HDR-Formate + + + Save the HDR image as... HDR-Bild speichern als ... - + Save as... Speichern als ... @@ -5327,202 +5693,20 @@ SavedParametersDialog - + Saved Parameters Gespeicherte Parameter - - + Comment Kommentar - + TM Operator Dynamikkompressionsoperator - - - Simple - Einfach - - - - Equation 2 - Eqn 2 - - - - Local Contrast Threshold - Schwellenwert für lokalen Kontrast - - - - Bias - Bias - - - - Spatial Kernel Sigma - Spatial Kernel Sigma - - - - Range Kernel Sigma - Range Kernel Sigma - - - - Base Contrast - Basiskontrast - - - - Alpha - Alpha - - - - Beta - Beta - - - - - Color Saturation - Farbsättigung - - - - Noise Reduction - Rauschunterdrückung - - - - Old Fattal - Altes Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Kontrastausgleich - - - - Contrast Factor - Kontrastfaktor - - - - Saturation Factor - Sättigungsfaktor - - - - Detail Factor - Detailfaktor - - - - Contrast Enhancement - Kontrasterhöhung - - - - Luminance Level - Helligkeit - - - - Manual Luminance Level - Manuelle Helligkeit - - - - Cone and Rod based on Luminance - Zapfen und Stäbchen basierend auf Helligkeit - - - - Local Tonemapping - Lokale Dynamikkompression - - - - Cone Level - Zapfen-Level - - - - Rod Level - Stäbchen-Level - - - - Multiplier - Multiplikator - - - - Use Scales - Skalen verwenden - - - - Key Value - Hauptwert - - - - Phi Value - Phi-Wert - - - - Range - Bereich - - - - Lower Scale - Untere Skala - - - - Upper Scale - Obere Skala - - - - Brightness - Helligkeit - - - - Chromatic Adaptation - Chromatische Anpassung - - - - Light Adaptation - Lichtanpassung - - - - Pre-gamma - Pre-Gamma - SavingParameters @@ -5542,595 +5726,669 @@ List of supported cameras - + Liste unterstützter Kameras TextLabel - - - - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - - - - With LibRaw version - - - - - models listed - - - - - search... - + TextLabel - - OK - - - - - TMOProgressIndicator - - - Abort computation - Berechnung abbrechen - - - - ThresholdWidget - - - Frame - - - - - Threshold - Schwellenwert - - - - TiffModeDialog - - - Save as ...TIFF - Speichern als TIFF ... - - - - TonemappingPanel - - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Hier kann eine Datei mit Dynamikkompressionsvorgaben geladen bzw. gespeichert werden.<br>Es kann auch der Inhalt der derzeit geladenen Vorgabendatei angewendet werden. - - - - Tone Mapping Settings - Dynamikkompressionsvorgaben - - - - Save current parameters to a text file - Speichert die derzeitigen Parameter in eine Textdatei - - - - Save current parameters (pregamma and TMO) to a text file. - Speichert die derzeitigen Parameter (zu Pre-Gamma und Dynamikkompression) in eine Textdatei. - - - - Load an existing text file containing pregamma and TMO settings - Eine vorhandene Textdatei mit Vorgaben zu Pre-Gamma und Dynamikkompression laden - - - - Load an existing text file containing pregamma and TMO settings. - Eine vorhandene Textdatei mit Vorgaben zu Pre-Gamma und Dynamikkompression laden. - - - - Save current parameters - Derzeitige Parameter speichern - - - - Load saved parameters - Gespeicherte Parameter laden - - - - Export - - - - - Fast export - - - - - Opens the current export direcotory. This can be changed in the preferences! - Öffnet das aktuelle Exportverzeichnis. Dies kann in den Einstellungen geändert werden! - - - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Öffnen</span></a></p></body></html> - - - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Hier kann eine Gammakorrektur auf das HDR-Bild angewendet werden.<br>Die Gammakorrektur wird vor der Dynamikkompression durchgeführt. - - - - Process - Vorgang - - - - Result Si&ze - Ausgabeg&röße - - - - - Gamma applied before tonemapping - Vor Dynamikkompression angewandte Gammakorrektur - - - - Pre-&gamma - Pre-&Gamma - - - - Restore pregamma's default value (1) - Standardwert für Pre-Gamma setzen (1) - - - - Size of the resulting LDR image - Größe des resultierenden LDR-Bildes - - - - Here you can choose the size of the resulting LDR image. - Hier kann die Größe des resultierenden LDR-Bildes ausgewählt werden. - - - - Set Custom Output Size - Benutzerdefinierte Ausgabegröße festlegen + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Durch Klick kann die <i>Breite</i> des resultierenden LDR-Bildes manuell festgelegt werden.<br>Nach Bestätigung durch Enter (oder Return) wird die Höhe automatisch berechnet und die neue Größe der Liste hinzugefügt. + + With LibRaw version + Mit LibRaw Version - - Start tonemapping (CTRL+T) - Dynamikkompression starten (Strg+T) + + models listed + gelistete Modelle - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - LDR-Bild mithilfe der festgelegten Parameter (Pre-Gamma und Operator) berechnen + + search... + suchen... - - &Update preview - Vorschau akt&ualisieren + + OK + OK + + + TMOProgressIndicator - - Ctrl+T - Strg+T + + Abort computation + Berechnung abbrechen + + + ThresholdWidget - - Update current LDR - Aktuelles LDR-Bild aktualisieren + + Frame + Frame - - Auto Levels - + + Threshold + Schwellenwert + + + TiffModeDialog - - <html><head/><body><p>set auto levels threshold</p></body></html> - + + Save as ...TIFF + Speichern als TIFF ... + + + TonemappingPanel - + Tonemap Dynamikkompression - + Mantiuk '06 Mantiuk '06 - + Mantiuk '08 Mantiuk '08 - + Fattal Fattal - + Ferradans - + Ferradans - + Drago Drago - + Durand Durand - + Reinhard '02 Reinhard '02 - + Reinhard '05 Reinhard '05 - + Ashikhmin Ashikhmin - + Pattanaik Pattanaik - + Mai - + Mai - - Operator - Operator + + Ferwerda + Ferwerda + + + + KimKautz + KimKautz + + + + VanHateren + VanHateren - - Contrast Factor - Kontrastfaktor + + Lischinski + Lischinski - - Saturation Factor - Sättigungsfaktor + + Operator + Operator - - Detail Factor - Detailfaktor + + &Contrast Factor + &Kontrastfaktor - + Contrast Equalization Kontrastausgleich - - Predefined Display - Vordefinierte Anzeige + + &Detail Factor + &Detailfaktor - + + Saturat&ion Factor + Sätt&igungsfaktor + + + Lcd Office LCD Büro - + Lcd LCD - + Lcd Bright LCD hell - + CRT CRT - - - Color Saturation - Farbsättigung + + Co&lor Saturation + Fa&rbsättigung - - Contrast Enhancement - Kontrasterhöhung + + Co&ntrast Enhancement + Ko&ntrasterhöhung - + Enable Luminace Level Helligkeit manuell festlegen - - Luminance Level - Helligkeit + + Lum&inance Level + Lum&inanzstufe - - Alpha - Alpha + + Predefined &Display + Vordefinierte &Anzeige - - Beta - Beta + + A&lpha + A&lpha - - Noise Reduction - Rauschunterdrückung + + Bet&a + Bet&a + + + + Color Saturat&ion + Farbsätt&igung - + + &Noise Reduction + + + + Version 2.3.0 Version 2.3.0 - - Inverse Alpha + + &Inverse Alpha - + Rho - + Rho - - Bias - Bias + + B&ias + - - Spatial Kernel Sigma - Spatial Kernel Sigma + + Spatial &Kernel Sigma + - - Range Kernel Sigma - Range Kernel Sigma + + Base Co&ntrast + Basisko&ntrast - - Base Contrast - Basiskontrast + + Range Kerne&l Sigma + - - Key Value - Hauptwert + + Ph&i + Ph&i - - Phi - Phi + + &Key Value + - - Use Scales - Skalen verwenden + + &Lower Scale + - - Range - Bereich + + Upper S&cale + Obere S&kala - - Lower Scale - Untere Skala + + Use Scales + Skalen verwenden - - Upper Scale - Obere Skala + + Ra&nge + &Bereich - - Brightness - Helligkeit + + &Light Adaptation + &Lichtanpassung - - Chromatic Adaptation - Chromatische Anpassung + + Chromatic A&daptation + Chromatische A&npassung - - Light Adaptation - Lichtanpassung + + Br&ightness + Hell&igkeit - - Local Contrast Threshold - Schwellenwert für lokalen Kontrast + + Local Contrast Threshol&d + - + Simple Einfach - - Equation Number - Ausgleichszahl + + Equation &Number + Ausgleichs&zahl - + Eqn &2 - + Eqn &4 - - Multiplier - Multiplikator - - - + Local Tone Mapping Lokale Dynamikkompression - + + Mu&ltiplier + Mu&ltiplikator + + + Auto Cone/Rod Zapfen/Stäbchen-Automatik - - Cone Level - Zapfen-Level + + Co&ne Level + - - Rod Level - Stäbchen-Level + + Ro&d Level + - + This operator has no options + Dieser Operator hat keine Optionen + + + + &Multiplier + &Multiplikator + + + + A&daptation Luminance + + + + + &C1 + + + + + C&2 + + + + + Pup&il Area + + + + + a&lpha mul - + Restore operator's default values Setzt die Parameter des Operators auf Standardwerte zurück - + Restore Zurücksetzen - + Previous applied settings Zuvor angewandte Werte - + Previous Vorherige - + Next applied settings Nächste angewandte Werte - + Next Nächste - + + Start tonemapping (CTRL+T) + Dynamikkompression starten (Strg+T) + + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + LDR-Bild mithilfe der festgelegten Parameter (Pre-Gamma und Operator) berechnen + + + + &Update preview + Vorschau akt&ualisieren + + + + Ctrl+T + Strg+T + + + + Update current LDR + Aktuelles LDR-Bild aktualisieren + + + + Auto Levels + Automatische Level + + + + <html><head/><body><p>set auto levels threshold</p></body></html> + + + + + Processing + + + + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Hier kann eine Gammakorrektur auf das HDR-Bild angewendet werden.<br>Die Gammakorrektur wird vor der Dynamikkompression durchgeführt. + + + + Res&ult Size + + + + + Set Custom Output Size + Benutzerdefinierte Ausgabegröße festlegen + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Durch Klick kann die <i>Breite</i> des resultierenden LDR-Bildes manuell festgelegt werden.<br>Nach Bestätigung durch Enter (oder Return) wird die Höhe automatisch berechnet und die neue Größe der Liste hinzugefügt. + + + + + Gamma applied before tonemapping + Vor Dynamikkompression angewandte Gammakorrektur + + + + Pre-&gamma + Pre-&Gamma + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + + + + + Pos&t-saturation + + + + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + + + + + Post-gamma + + + + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + + + + + ... + ... + + + + Settings + Einstellungen + + + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Hier kann eine Datei mit Dynamikkompressionsvorgaben geladen bzw. gespeichert werden.<br>Es kann auch der Inhalt der derzeit geladenen Vorgabendatei angewendet werden. + + + + Tone Mapping Settings + Dynamikkompressionsvorgaben + + + + Save current parameters to a text file + Speichert die derzeitigen Parameter in eine Textdatei + + + + Save current parameters (pregamma and TMO) to a text file. + Speichert die derzeitigen Parameter (zu Pre-Gamma und Dynamikkompression) in eine Textdatei. + + + + Load an existing text file containing pregamma and TMO settings + Eine vorhandene Textdatei mit Vorgaben zu Pre-Gamma und Dynamikkompression laden + + + + Load an existing text file containing pregamma and TMO settings. + Eine vorhandene Textdatei mit Vorgaben zu Pre-Gamma und Dynamikkompression laden. + + + + Load saved parameters + Gespeicherte Parameter laden + + + + Save current parameters + Derzeitige Parameter speichern + + + + Export + Export + + + + Fast export + Schneller Export + + + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Öffnen</span></a></p></body></html> + + + Queue size: %1 Warteschlangengröße: %1 - + TM Database Problem Datenbank-Problem - + The database used for saving TM parameters cannot be opened. Error: %1 Die Datenbank zum Speichern von Dynamikkompressionsparametern konnte nicht geöffnet werden. Fehler: %1 - + Load a tonemapping settings text file... Lade Datei mit Dynamikkompressionsvorgaben ... - - + + LuminanceHDR tonemapping settings text file (*.txt) Datei mit Dynamikkompressionsvorgaben für Luminance HDR (*.txt) - - - - + + + + Aborting... Abbrechen ... - + File is not readable (check existence, permissions,...) Datei ist nicht lesbar (prüf deren Existenz, Zugriffsrechte, ...) - + Save tonemapping settings text file to... Datei mit Dynamikkompressionsvorgaben speichern als ... - + File is not writable (check permissions, path...) Datei ist nicht beschreibbar (prüf deren Zugriffsrechte, Pfad, ...) - + File is not readable (check permissions, path...) Datei ist nicht lesbar (prüf deren Zugriffsrechte, Pfad, ...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Fehler: Das Dateiformat für Dynamikkompressionsvorgaben hat sich geändert. Diese (alte) Datei kann mit dieser Version von Luminance HDR nicht verwendet werden. Erstell eine neue. - + Custom LDR size Benutzerdefinierte LDR-Größe - + Enter the width of the new size: Die Breite der neuen Größe eingeben: @@ -6237,7 +6495,7 @@ Show onl&y: - + Nu&r anzeigen @@ -6257,7 +6515,7 @@ Filter &log messages: - + &Log-Nachrichten filtern @@ -6280,19 +6538,19 @@ &Starten - - + + All Supported formats Alle unterstützten Formate - - + + Select the input images Eingabebilder auswählen - + &Done &Fertig @@ -6300,39 +6558,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Der Lizenztext wurde nicht gefunden. Du kannst ihn online lesen: %2hier%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Versionshistorie nicht gefunden, es kann online abgerufen werden: %2hier%3 - + Donation Spende - + Would you like to donate? Möchtest du spenden? - + Yes, I'd love to! Ja, mache ich gern! - + Stop Bothering Me Nicht erneut fragen - + Remind me later Später erinnern @@ -6340,18 +6598,18 @@ UpdateChecker - + A new release is ready for download! Eine neue Version kann heruntergeladen werden! - - + + Do you want to open the webpage for download now? Möchtest du jetzt die Webseite für den Download öffnen? - + Click to download, or select Help->Update! Klicken zum Herunterladen oder Hilfe -> Aktualisierung wählen! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_es.ts luminance-hdr-2.6.0/i18n/lang_es.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_es.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_es.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + Acerca de Luminance HDR @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,75 +30,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&utores - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Gracias a - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Registro de cambios - + &License Agreement &Licencia de conformidad - + &OK &OK @@ -104,7 +159,7 @@ Batch HDR - + HDR por lotes @@ -123,272 +178,320 @@ Salida - + Choose an HDR output file format Elija un formato de fichero HDR de salida - - Predefined profile: - Perfil predefinido - - - - Output format: - Formato de salida + + Filename prefix: + Prefijo de nombre de archivo: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Elija uno de los perfiles predefinidos -Consulte la documentación para más información + - + Profile 1 Perfil 1 - + Profile 2 Perfil 2 - + Profile 3 Perfil 3 - + Profile 4 Perfil 4 - + Profile 5 Perfil 5 - + Profile 6 Perfil 6 - + + Output format: + Formato de salida + + + + hdr_ + hdr_ + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + Usar esquema de nombre de archivos propuesto + + + + Response: + + + + + Weights: + Peso: + + + + Predefined profile: + Perfil predefinido + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangular + + + + Linear + Lineal + + + Alignment Alinear - - Auto align the bracketed pictures - Auto-alinear las imagenes horquilladas + + Use Hugin's align_image_stack engine + Usar el motot de alineado de pilas de imágenes Hugin - - Auto-align images - Auto-alinear las imágenes + + Hugin's align_&image_stack + Pila de &imágenes para alineación Hugin - + Use MTB (Median Threshold Bitmap) engine Emplear el motor MTB (Bitmap de umbral medio) - + &MTB &MTB - - Use Hugin's align_image_stack engine - Usar el motot de alineado de pilas de imágenes Hugin + + Auto align the bracketed pictures + Auto-alinear las imagenes horquilladas - - Hugin's align_&image_stack - Pila de &imágenes para alineación Hugin + + Auto-align images + Auto-alinear las imágenes - + Auto-crop Auto-recortar - + &Cancel &Cancelar - + &Start &Inicio - + &Close &Cerrar - + Progress Progreso - + Input/Output Entrada/Salida - + Folder where created HDRs are saved Carpeta donde se guardan los HDRs creados - - + + Select... Seleccione... - + Folder where bracketed pictures are located (in alphabetical order) Carpeta donde se localzan las imagenes horquilladas (en orden alfabético) - + Input folder: Carpeta de entrada: - + Output folder: Carpeta de salida: - + Anti-ghosting Eliminar imagenes fantasma - + Artifact-free High Dynamic Range Imaging Alto Rango Dinámico libre de artefactos - + Threshold Umbral - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Umbral usado por el algoritmo de reduccion de imágenes fantasma. Un umbral mas bajo implica un procesado más agresivo pero puede reducir el Rango Dinámico final . Utilice el botón &quot;Recalcular&quot;para ver el resultado y ajustar el umbral </p></body></html> - + O. Gallo and others O. Gallo y otros - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Activar el algoritmo de eliminación de imágenes fantasma</p></body></html> - + Auto anti-ghosting Auto-eliminar imágenes fantasma - + Custom config %1 Configuración personalizada %1 - + Choose a source directory Elija un directorio de origen - + Choose a output directory Elija un directorio de salida - - - + + + Warning Precaución - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - El directorio de salida contiene ficheros HDR. Estos ficheros serán sobreescritos. -Continuamos? + - - + + Total number of pictures must be a multiple of number of bracketed images. El número total de imágenes debe ser un múltiplo del número de las imágenes horquilladas. - + Started processing... Iniciando el procesado... - + Loading files... Cargando ficheros... - + Completed with errors Completado con errores - + Completed without errors Completado sin errores - + Error: missing EXIF data Error: se perderán los datos EXIF - + Aligning... Alineando... - + Creating HDR... Creando HDR... - + Doing auto anti-ghosting... Realizando la eliminación automática de imágenes fantasma... - + Written Escribiendo - + Error: Error: - + Aborting... Cancelando... @@ -411,261 +514,302 @@ Lista de HDR que serán toneados - - Add Directory (Alt+D) - Añadir Directorio (Alt+D) + + Remove Files (Alt+R) + Eliminar Archivos (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Añadir Archivos (Alt+F) + + Remove All Files (Alt+X) + Eliminar todos los archivos (Alt+X) - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Eliminar Archivos (Alt+R) + + Alt+X + Alt+X - - Alt+R - Alt+R + + Add Files (Alt+F) + Añadir Archivos (Alt+F) - - Tone Mapping Settings - Opciones de Ajuste Tonal + + Alt+F + Alt+F - Add Directory (Alt+I) - Añadir Directorio (Alt+I) + Add Directory (Alt+D) + Añadir Directorio (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Opciones de Ajuste Tonal - + Add Files (Alt+L) Añadir Archivos (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Añadir Directorio (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Añadir desde la base de datos (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Eliminar ajustes previos (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + Eliminar todos los ajustes (Alt+W) + + + + Alt+W + Alt+W + + + List of Tone Mapping Setting files that will be used to tone map each HDR Lista de opciones de ajuste tonal que serán utilizados para tonear cada HDR - + Output Salida - + Output Image Width: Anchura de la Imagen de Salida - + Output Folder: Carpeta de Salida - - + + Specify output folder for the tone mapped files Indica la carpeta de destino para los archivos de toneado - + Selec&t... Seleccionar - - + + Width of tonemapped image in percent of original image - + Anchura de la imagen con mapeo de tonos en porcentaje sobre la imagen original - + % % - + Output Format: Formato de Salida - + Image format of tonemapped images - + Formato de las imágenes con mapeo de tonos - + Image format options - + Opciones de formato de imagen - + Conversion Log Log de la conversión - + Batch operations report Informe de operaciones en serie - + Show onl&y: - + Mos&trar solo: - + Filter messages based on severity Filtrar mensajes basados en su importancia - + All messages Todos los mensajes - + Errors only Solo errores - + Success messages Mensaje emitido - + Filter &log messages: - + Filtrar mensajes de tra&za: - + Clear filter text Limpiar filtrado de texto - + Overall completion progress Progreso global de realización - + &Cancel &Cancelar - + Start batch tone mapping Iniciar toneado en serie - + &Start &Inicio - + Using %n thread(s) - - - + + + Choose a directory Seleccione un directorio - + All HDR images Todas las imágenes HDR - + Select input images Seleccionar imágenes de entrada - + Load tone mapping settings text files... Cargar archivos de configuración de ajuste tonal en formato texto... - + Luminance HDR tone mapping settings text file (*.txt) Archivos de configuración de ajuste tonal en formato texto para Luminance HDR (*.txt) - + + Warning + Precaución + + + + An error occurred reading one or more tonemapping options files. + Se ha producido un error al leer uno o más archivos de opciones de mapeo de tonos. + + + Processing... Procesando... - + Start processing... Iniciando procesado... - + Close Cerrar - + &Done &Hecho - + + Conversion aborted by user request. + Conversión abortada a petición del usuario. + + + All tasks completed. Todas las tareas finalizadas. - + Aborting... Cancelando... @@ -673,27 +817,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Iniciando procesado %2 - + [T%1] Successfully load %2 [T%1] Cargado correctamente %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] Fichero LDR guardado correctamente: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] ERROR: No se ha podido gurdar al archivo: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] ERROR: Falló la carga de %2 @@ -701,573 +850,668 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Uso: %1 [OPTIONS]... [INPUTFILES]... - + Display this help. Mostrar esta ayuda. - + Display program version. - + Mostrar versión del programa. - + Print more messages during execution. Muestra mas mensajes durante la ejecución. - + Print a list of all supported cameras. - + Mostrar una lista de todas las cámaras soportadas. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AIS|MTB] Motor de alineación a utilizar durante la creación del HDR (Valor por defecto: No alineación) - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,... Especifica valores numéricos de EV (tantos como INPUTFILES). - + prefix Save aligned images to files which names start with prefix prefix Guarda las imágenes alineadas a ficheros con nombres que empiezan con prefijo - + HDR_FILE Load an HDR instead of creating a new one. HDR_FILE Carga un HDR en lugar de crear uno nuevo. - + HDR_FILE Save to a HDR file format. (default: don't save) HDR_FILE Guarda un fichero en formato HDR. (Valor por defecto: No guardar) - + VALUE Gamma value to use during tone mapping. (default: 1) VALUE Valor de Gamma a utilizar durante el ajuste tonal. (Valor por defecto: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALUE Anchura a la que quieres generar el HDR (Se ajusta el tamaño antes del gamma y el ajuste tonal) - + LDR_FILE File name you want to save your tone mapped LDR to. LDR_FILE Nombre del archivo de ajuste tonal LDR. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) THRESHOLD Activar la eliminación de imágenes fantasma con un umbral dado.(0.0-1.0) - + Apply autolevels correction after tonemapping. - + Aplicar corrección de autoniveles tras el mapeo de tonos. - + Enable generation of a webpage with embedded HDR viewer. + Activar la generación de una página web con un visor HDR incrustado. + + + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. - + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR Parámetros de creación de HDR - Usted puede cargar un fichero HDR existente (opción -l) o especificar INPUTFILES para crear un nuevo HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) peso = triangular|gaussian|plateau|flat (Valor por defecto: triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) Curva de respuesta = desde_archivo|lineal|gamma|log|srgb (valor por defecto: lineal) - + model: robertson|robertsonauto|debevec (Default is debevec) modelo = robertson|robertsonauto|debevec (Valor por defecto: debevec) - + curve filename = your_file_here.m fichero de curva = your_file_here.m - + LDR output parameters Parámetros de salida LDR - + VALUE Quality of the saved tone mapped file (1-100). VALUE Calidad del archivo de ajuste tonal (0-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) Formato TIFF. Valores válidos son [8b|16b|32b|logluv] (Por defecto: 8b) - + Tiff deflate compression. true|false (Default is true) Compresión deflate en TIFF (Valor por defecto: activado) - + HTML output parameters - + Parámetros de salida de HTML - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Parámetros de ajuste tonal - No se realizará un ajuste tonal si no se especifica un parámetro -o - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal Fattal - + + alpha FLOAT alpha FLOAT - + beta FLOAT beta FLOAT - + color FLOAT color FLOAT - + noise FLOAT ruido FLOAT - + new true|false nuevo verdadero|falso - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 Mantiuk 06 - + contrast FLOAT contraste FLOAT - + saturation FLOAT saturación FLOAT - + detail FLOAT detalle FLOAT - + equalization true|false equalización verdadero|falso - + Mantiuk 08 Mantiuk 08 - + color saturation FLOAT saturación de color FLOAT - + contrast enhancement FLOAT mejora del contraste FLOAT - + luminance level FLOAT Nivel de luminancia FLOAT - + enable luminance level true|false activar nivel de luminancia verdadero|falso - + Durand Durand - + spatial kernel sigma FLOAT spatial kernel sigma FLOAT - + range kernel sigma FLOAT range kernel sigma FLOAT - + base contrast FLOAT contraste de base FLOAT - + Drago Drago - + bias FLOAT bias FLOAT - + Reinhard 02 Reinhard 02 - + key value FLOAT Valor clave FLOAT - + phi FLOAT phi FLOAT - + use scales true|false usar escalas verdadero|falso - + range FLOAT rango FLOAT - + lower scale FLOAT Escala inferior FLOAT - + upper scale FLOAT Escala superior FLOAT - + Reinhard 05 Reinhard 05 - + Brightness FLOAT Brillo FLOAT - + Chroma adaption FLOAT Adaptación de Chroma FLOAT - + Light adaption FLOAT Adaptación de luz FLOAT - + Ashikmin Ashikmin - + Equation number 2 true|false Ecuación número 2 Verdadero/Falso - + Simple true|false Simple Verdadero/Falso - + Local threshold FLOAT Umbral local FLOAT - + Pattanaik Pattanaik - + multiplier FLOAT Multiplicador FLOAT - + Local tone mapping true|false Mapeado tonal local Verdadero/Falso - + Auto luminance true|false Auto luminancia Verdadero/Falso - + cone level FLOAT Nivel de cono FLOAT - + rod level FLOAT - - Luminance HDR version + + VanHateren - - With LibRaw version + + pupil_area FLOAT - - models listed + + Lischinski - + + Luminance HDR version + Versión de Luminance HDR + + + + With LibRaw version + Con versión de LibRaw + + + + models listed + modelos mostrados + + + + + Error: Unsupported LDR file type. + Error: tipo de archivo LDR no soportado + + + + + Error: Unsupported HDR file type. + Error: tipo de archivo HDR no soportado + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Error: Motor de alineado no reconocido. - + Error: Unknown weight function specified. Error: Indicada función de altura desconocida. - + Error: Unknown response curve specified. Error: Curva de respuesta desconocida. - + Error: Unknown HDR creation model specified. Error: Modelo de creación de HDR desconocido. - + Error: Unknown tone mapping operator specified. Error: Especificado un operador de toneado desconocido. - - + + Error: The specified file with TMO settings could not be parsed! El archivo especificado con configuración TMO no puede ser analizado. - + Error: The specified file with TMO settings could not be parsed!: %1 El archivo especificado con configuración TMO no puede ser analizado.%1 - + Error: Quality must be in the range [1..100]. - + Error: la calidad debe estar en el rango [1..100]. - + Error: Unknown tiff format. Error: formato TIFF desconocido - + Error: Threshold must be in the range [0..1]. - + Error: el umbral debe estar en el rango [0..1]. - + Error: The number of EV values specified is different from the number of input files. Error: El valor numérico indicado en EV es diferente al número de archivos de entrada. - + Load file %1 failed Falló la carga del archivo %1 - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Error: Datos EXIF no encontrados en la imagen y valor EV no indicado en la linea de comandos. Rescatando. - + EV values have been assigned. Los valores de EV han sido asignados. - - + + Starting aligning... - + Comenzando alineación... - + Failed executing align_image_stack Fallo ejecutando la alineación de la pila de imágenes - + Failed aligning images. Fallo al alinear las imágenes. - + Creating (in memory) the HDR. Creando (en memoria) el HDR - + Saving to file %1. Guardando al fichero %1 - + Image %1 saved successfully Imagen %1 guardada - + Could not save %1 No se pudo guardar %1 - + NOT Saving HDR image to file. %1 NO guardada la imagen HDR al archivo %1 - + Exporting to HTML - + Exportar a HTML - + ERROR: directory %1 must exist - + ERROR: el directorio %1 debe existir - + Tonemapping requested, saving to file %1. Solicitado ajuste tonal, guardado al archivo %1 - + Resizing to width %1. - + Redimensionando a anchura %1. - + Applying gamma %1. - + Aplicando gamma %1. + + + + +Applying saturation enhancement %1. + +Aplicando mejora de saturación %1. - + + +Applying post-gamma %1. + +Aplicando post-gamma %1. + + + Image %1 successfully saved - + Imagen %1 guardada correctamente - + ERROR: Cannot save to file: %1 - + ERROR: no se puede guardar en el archivo: %1 - + Tonemapping NOT requested. - + Mapeo de tonos no solicitado. - - Failed loading images - Fallo al cargar las imágenes + + Failed loading images: %1 + Fallo al cargar las imágenes: %1 @@ -1275,7 +1519,7 @@ Choose action - + Seleccione acción @@ -1323,7 +1567,7 @@ <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> is open-source software and its development required hundreds of hours of work.</p><p>If you like it, you are using it in your HDR workflow and you would like to see it gradually improved, please support its authors by making a donation.</p><p>Would you like to make a donation for Luminance HDR now?</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> es un software de código abierto que ha requerido de cientos de horas para su desarrollo.</p><p>Si le gusta, lo está usando en su flujo HDR y le gustaría ver cómo mejora gradualmente, considere apoyar a los desarrolladores haciendo una donación.</p><p>¿Le gustaría hacer una donación a Luminance HDR now?</p></body></html> @@ -1344,47 +1588,47 @@ EditingTools - + Maskable Enmascarable - + Good image Buena imagen - + Add good image Añadir una buena imagen - + Remove good image Eliminar una buena imagen - + Ed&itable E&ditables - + R&eference R&eferencia - + Select the previous image in both lists Seleccione la imagen previa en ambas listas - + Select the next image in both lists Seleccione la siguiente imagen en ambas listas - + Choose a directory and a prefix Escoja un directorio un un prefijo @@ -1420,9 +1664,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - La imagen actualmente seleccionada in esta lista puede ser desplazada arriba, abajo, izquierda y derecha usando los controles inferiores. -El histiograma de esta imagen es mostrado en el recuadro superior. +This image's histogram is displayed in the widget above. + @@ -1915,18 +2158,18 @@ Exportar - + Choose a directory Seleccione un directorio - - + + Error: Error: - + must be a directory. debe ser un directorio. @@ -2086,28 +2329,28 @@ Rojo - + Load one FITS image... Cargar una imagen FITS... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size Las imagenes FITS tienen diferentes tamaños - + align_image_stack exited with exit code %1 align_image_stack finalizado con codigo %1 - + align_image_stack failed with error align_image_stack ha fallado con error @@ -2115,7 +2358,7 @@ GenericViewer - + Pan the image to a region Mover la imagen a una región @@ -2128,45 +2371,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. HdrCreationManager::loadFilesDone(): Las imágenes tienen diferente tamaño. + HdrPreview + + + HDR Preview + Previsualización de HDR + + + + Close + Cerrar + + + HdrViewer - + &Mapping: &Mapping: - + Histogram: Histograma: - + Linear Lineal - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2190,7 +2446,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2230,8 +2486,8 @@ - &MTB - &MTB + M&TB + M&TB @@ -2240,8 +2496,8 @@ - Hugin's align_&image_stack - Pila de &imágenes para alineación Hugin + Hu&gin's align_image_stack + @@ -2307,12 +2563,12 @@ [2/2] Seleccione los parámetros para la creación del HDR - + Profile Perfil - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2325,47 +2581,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">El primer perfil predefinido en la lista generalmente producirá los mejores resultados. Cámbielo solo si las imágenes HDR resultantes no son suficientemente buenas.</span></p></body></html> - - Profile 1 - Perfil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Perfil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Perfil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Perfil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Perfil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Perfil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Utilice este solo si los perfiles por defecto no proporcionan buenos resultados - + Use Custom Configuration Seleccione una configuración personalizada - + HDR Creation Model Modelo de creción de HDR @@ -2415,238 +2671,267 @@ Curva de respuesta - + Linear Lineal - + Gamma Gamma - + Log Log - + sRGB sRGB - - Custom - Personalizado + + Custom (From File) + - + Response Curve Input File Fichero de entrada de Curva de Respuesta - + + Load Response + + + + Response Curve Output File Fichero de salida de Curva de Respuesta - + Save As... Guardar como... - + Save Settings Guardar ajustes - + + Show HDR + Mostrar HDR + + + + Show HDR Preview + + + + + + Show Log + Mostrar trazas + + + &Next > &Siguiente > - + &Cancel &Cancelar - + Image Filename Nombre del archivo de imagen - + Exposure Exposición - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Todos los formatos (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; Imágenes TIFF (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Imágenes RAW (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Seleccionar las imágenes iniciales - + Unknown Desconocido - + Loading... Cargando... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR no consiguió encontrar las etiquetas <b>EXIF</b> para las siguientes imágenes:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul><hr>Puede proceder a crear un HDR. Para ello debe insertar <b>manually</b>el valor de exposición EV o los valores de paso.<hr>Si quiere que Luminance HDR lo haga <b>automaticamente</b>, tiene que cargar imagenes que tengan al menos el siguiente dato EXIF: <ul><li>Valor de exposición</li></ul><hr><b>Comentario:</b>La perdida de datos EXIF se produce cuando se realiza un preproceso de las imagenes.<br>Puede realizar una copia de los dtos exif</b> entre dos grupos de imagenes con <b>Herramientas->Copiar Datos Exif... + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again + No volver a mostrar este mensaje - + EXIF data not found Datos EXIF no encontrados - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Imágenes cargadas.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Para continuar usted necesita introuducir manualmente los valores de exposición.<br><font color="#FF0000">%1</font> valores son necesarios.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + <center><font color="#ffaa00"><h3><b>Asegúrese de que todos los valores de exposición son correctos antes de continuar.</h3></font></center> - + Loading Error: Error en la carga: - + Start loading a set of images with different exposure Comience cargando un conjunto de imágenes con diferente exposición - - - + + + Error... Error... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Falló al iniciar una aplicación externa "<em>align_image_stack</em>".<br>Por favor, lea "Ayuda -> Contenidos.....-> Ajustes -> Herramientas externas" para obtener mas información. - + The external application "<em>align_image_stack</em>" crashed... La aplicación externa "<em>pila_alineación_imagen</em>" falló... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Ha ocurrido un error desconocido cuando se ejecutaba la aplicación "<em>pila_alineación_imagen</em>"... - + Now click on next button Ahora haga clic en el siguiente botón - + + Compute + Calcular + + + + Finish + Finalizar + + + Aligning... Alineando... - - - &Finish - &Finalizar + + &Compute + - + Load camera response curve file Cargar el fichero de la curva de respuesta de la cámara - + Camera response curve (*.m);;All Files (*) Curva de respuesta de la cámara (*.m);;Todos los ficheros (*) - + Invalid Response Curve File Fichero Inválido de curva de respuesta de la cámara - + Invalid Response Curve File: please try a different file Fichero Inválido de curva de respuesta de la cámara: Por favor, pruebe con uno diferente - + Save a camera response curve file Guardar un fichero de curva de respuesta de la camara - + Camera response curve (*.m) Curva de respuesta de la cámara (*.m) - - Weights: - Peso: - - - - - Response curve: - - Curva de respuesta: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Todos los valores de EV (Exposición) han sido establecidos.<br>Haga clic en el botón Siguiente.</b></h3></font></center> - - - Model: - - Modelo: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Para continuar usted necesita introuducir manualmente los valores de exposición.<br><font color="#FF0000">%1</font> valores son necesarios.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Todos los valores de EV (Exposición) han sido establecidos.<br>Haga clic en el botón Siguiente.</b></h3></font></center> + + Hide Log + Ocultar trazas @@ -2658,24 +2943,24 @@ - + &File &Archivo E&dit - + E&ditar V&iew - + &Ver Boo&kmarks - + &Marcadores @@ -2684,7 +2969,7 @@ - + &Print... im&Primir @@ -2700,7 +2985,7 @@ - + &Find... &Encontrar @@ -2717,7 +3002,7 @@ F3 - + F3 @@ -2727,11 +3012,11 @@ Shift+F3 - + Mays+F3 - + &Add Bookmark &Añadir marcador @@ -2743,11 +3028,11 @@ &Delete Bookmark - + &Eliminar marcador - + D&elete All Borrar &Todo @@ -2784,17 +3069,17 @@ &View Contents - + &Ver contenido Ctrl+C - + Ctrl+C View &Search - + Ver &búsqueda @@ -2804,7 +3089,7 @@ View &Bookmarks - + Ver &marcadores @@ -2814,103 +3099,101 @@ P&rint Preview - + I&mprimir previsualización - + Help SideBar Barra lateral de ayuda - + LuminanceHDR Online Help LuminanceHDR Ayuda en línea - + &Edit &Editar - + &View &Ver - - + + &Bookmarks &Marcadores - + &Quit &Quitar - + Find &Next Encontrar &Siguiente - + Find &Previous Encontrar &Previo - + &Contents &Contenidos - + &Search &Buscar - + &Delete &Borrar - + Find Buscar - + Search Term: Palabra a buscar: - + New Bookmark Nuevo marcador - + New Bookmark's Title: Título del nuevo marcador: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Perdone, no se ha instalado el manua.</p><p>Por favor, contacte con el proveedor de su paquete o con el equipo de Luminance HDR si usted quiere montar la aplicación usted mismo</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Lector de la ayuda - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - La herramienta de ayuda no maneja este protocolo -Quiere abrir el enlace con la aplicación por defecto -asociada a este protocolo. + @@ -2966,22 +3249,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: El siguiente fichero no es legible: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: el fichero %1 tiene una extensión no soportada: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: Se produjo una excepción leyendo %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + IOWorker: fallo al reservar memoria %1: %2 + + + IOWorker: failed loading file: %1 IOWorker: fallo leyendo el fichero: %1 @@ -2989,7 +3277,7 @@ ImageQualityDialog - + Unknown Desconocido @@ -3040,11 +3328,11 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 - + Imagen LDR [%1 x %2]: %3 @@ -3122,7 +3410,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3164,7 +3452,7 @@ &Preview Panel - + &Panel de previsualización @@ -3297,7 +3585,7 @@ Rotat&e clockwise - + Rotar en sentido &horario @@ -3319,7 +3607,7 @@ &Low Dynamic Range - + Rango dinámico &bajo @@ -3329,7 +3617,7 @@ &Fit to Dynamic Range - + A&justar a rango dinámico @@ -3344,7 +3632,7 @@ &Shrink Dynamic Range - + &Reducir rango dinámico @@ -3354,7 +3642,7 @@ &Extend Dynamic Range - + A&mpliar rango dinámico @@ -3364,7 +3652,7 @@ &Decrease Exposure - + &Disminuir exposición @@ -3639,7 +3927,7 @@ Ctrl+I - + Ctrl+I @@ -3668,7 +3956,7 @@ Ctrl+J - + Ctrl+J @@ -3715,7 +4003,7 @@ Ctrl+Z - + Ctrl+Z @@ -3745,27 +4033,27 @@ S - + S &Minimize - + &Minimizar Ma&ximize - + Ma&ximizar &Bring All to Front - + &Traer todo al frente &Show Preview Panel - + &Mostrar panel de previsualización @@ -3814,7 +4102,7 @@ &Remove Tab - + Eliminar &pestaña @@ -3824,7 +4112,7 @@ Fill &Window - + Llenar &ventana @@ -3834,12 +4122,12 @@ F - + F Batch &HDR... - + HDR por &lotes... @@ -3859,27 +4147,27 @@ &Show on the right - + Mostrar a la &derecha Show &on the bottom - + Mostrar en la parte &inferior &Realtime Previews - + Previsualización en tiempo &real &Update - + A&ctualizar &FITS Importer... - + Importador &FITS... @@ -3904,52 +4192,52 @@ E&xport to HTML - + E&xportar a HTML Export to web page with embedded HDR viewer - + Exportar a una página web con vistor HDR incrustado. &Show Full Screen - + &Mostrar a pantalla completa F11 - + F11 Show &Image Full Screen - + Mostrar &imagen a pantalla completa F10 - + F10 &Supported RAW Cameras - + Cámaras RAW &soportadas Lists all cameras supported by the program - + Mostrar todas las cámaras soportadas por el programa Ctrl+M - + Ctrl+M &Lanczos/Bilinear interpolation - + Interpolación &Lanczos/Bilinear @@ -3959,47 +4247,47 @@ Ctrl+K - + Ctrl+K &Online Documentation - - - - - &Developers Web Site - - - - - &Luminance HDR Web Site - + Documentación &en línea Open Online Documentation Web Site with the System Browser - + Abrir sitio web de documentación en línea con el navegador del sistema + + + + &Developers Web Site + Sitio web de los &desarrolladores Developers Web Site - + Sitio web de los desarrolladores Open Developers Web Site with the System Browser - + Abrir sitio web de los desarrolladores con el navegador del sistema + + + + &Luminance HDR Web Site + Sitio web de &Luminance HDR Luminance HDR Web Site - + Sitio web de Luminance HDR Open Main Web Site with the System Browser - + Abrir sitio web principal con el navegador del sistema @@ -4007,93 +4295,90 @@ ¡Listo!. Ahora abra una imagen HDR existente o cree una nueva. - + All HDR formats Todos los formatos HDR - + Load one or more HDR images... Cargar una o mas imágenes HDR - + Save files in Guardar archivos en - - + + Failed to save %1 - + No se pudo guardar %1 - + Done! Hecho! - + Aborting... Cancelando tarea... - - - Untitled - Sin título - - - + Cropped Image Imagen recortada - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Parece que está ejecutando una versión de 32 bit de <strong>Luminance HDR</strong> en un sistema de 64 bit. <br>Por favor, descargue la versión de <strong>64 bit</strong> de <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> para conseguir la mejor experiencia con Luminance HDR. - + Unsaved changes... Modificaciones no guardadas... - + This HDR image has unsaved changes.<br>Do you want to save it? Esta imagen HDR tiene modificaciones sin guardar.<br> Quiere guardarlas? - + Fattal Warning Error fatal - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - Este operador de ajuste tonal depende del tamaño de la imagen de entrada. Aplicar este operador en la imagen completa generará un resultado diferente. - -¿Quiere continuar? + + + + + Untitled + Sin título - + Untitled %1 Sin titulo %1 - + Error: %1 Error: %1 - + Untitled HDR HDR sin título - + FITS Image Imagen FITS @@ -4133,7 +4418,7 @@ Fast export - + Exportación rápida @@ -4183,7 +4468,7 @@ Export directory - + Exportar directorio @@ -4403,13 +4688,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4445,7 +4730,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Level</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specify the reconstruct highlight level. Low values favor whites and high values favor colors.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Nivel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Especifique el nivel de reconstrucción de las luces. Valores pequeños favorecen a los blancos y valores altos favorecen a los colores.</p></body></html> @@ -4485,7 +4775,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Black point</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use a specific black point value to decode RAW pictures. If you set this option to off, the Black Point value will be automatically computed.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Punto negro</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Usar un valor de punto negro específico para decodificar imágenes RAW. Si desactiva esta opción, se calculará el valor del punto negro de forma automática.</body></html> @@ -4500,7 +4795,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Black point value</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specify specific black point value of the output image.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Valor del punto negro</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indique el valor del punto negro de la imagen de salida.</p></body></html> @@ -4540,7 +4840,7 @@ NR and CA Correction - + Correcciónes NR y CA @@ -4550,7 +4850,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Enable Noise Reduction</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use wavelets to erase noise while preserving real detail.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Activar reducción de ruido</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Usar ondas para eliminar el reunido manteniendo el detalle real.</p></body></html> @@ -4565,7 +4870,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Threshold</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set here the noise reduction threshold value to use.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Umbral</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indique aquí el umbral de reducción de ruido a usar.</p></body></html> @@ -4600,7 +4910,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Red multiplier</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set here the magnification factor of the red layer</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Multiplicador rojo</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indique aquí el factor de aumento de la capa roja</body></html> @@ -4610,7 +4925,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blue multiplier</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set here the magnification factor of the blue layer</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Multiplicador azul</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indique aquí el factor de aumento de la capa azul</body></html> @@ -4673,28 +4993,28 @@ &OK - + Restart Reiniciar - + For the settings to take effect, please restart the application! ¡Para que los ajusten tengán efecto, por favor reinicie la aplicación! - - + + Choose a directory Seleccione un directorio - + Open ICC Profile Abrir perfil ICC - + Color profile (*.icc *.ICC *.icm *.ICM) Perfil de color (*.icc *.ICC *.icm *.ICM) @@ -4810,17 +5130,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ERROR: no puedo cargar archivo de configuración de toneado: - + ERROR: File too old, cannot parse Tone Mapping Setting file: ERROR: Archivo demasiado antiguo, no puedo interpretar los datos de configuración para tonear: - + ERROR: cannot parse Tone Mapping Setting file: ERROR: no se puede interpretar archivo de configuración de toneado: @@ -4828,370 +5148,452 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + La calidad de estar comprendida entre 1 (la peor) y 5 (la mejor). - + NULL frame passed. - + Adding image - + Añadiendo imagen - + to the web page - + a la página web - - - + + + Writing: - + Escribiendo: - - - - + + + + Warning Precaución - + I cannot open monitor profile. Please select a different one. No se ha podido abrir el perfil del monitor. Por favor, seleccione uno diferente. - + I cannot open printer profile. Please select a different one. No se ha podido abrir el perfil de la impresora. Por favor, seleccione uno diferente. - + Please select a printer profile . Por favor, seleccione un perfil de impresora. - + I cannot perform the color transform. Please select a different monitor profile. No se ha podido realizar la transformación de color. Por favor, seleccione un perfil de monitor diferente. - - Triangular - Triangular + + + + Weights= + - - Plateau - Plateau + + + + - Response curve= + - - Gaussian - Gaussian + + + + - Model= + - - Flat - Plano + + PreGamma=%1 + PreGamma=%1 - - Linear - Lineal + + Contrast Equalization + Equalización de Contraste - - Gamma - Gamma + + Contrast + Contraste - - Logarithmic - Logaritmica + + + Saturation + Saturación - - sRGB - sRGB - - - - From Calibration/Input File - Desde el fichero de calibración/entrada - - - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation - Calculo de la respuesta Robertson - - - - PreGamma=%1 - PreGamma=%1 - - - - Contrast Equalization - Equalización de Contraste - - - - Contrast - Contraste - - - - - Saturation - Saturación - - - + Detail Detalle - + Luminance Level Nivel de luminancia - + Luminance Level=Auto Nivel de luminancia=Auto - + Color Saturation Saturación de color - + Contrast Enhancement Realce del contraste - + + Alpha Alpha - + Beta Beta - + NoiseRedux Reducción de ruido - + FFTSolver FFTSolver - + Rho - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple simple - + Equation 2 Ecuación 2 - + Equation 4 Ecuación 4 - - + + Local Local - + Bias Bias - + Spatial Espacial - - + + Range Rango - + Base Base - + Multiplier Multiplicador - + AutoLuminance AutoLuminacia - + Cone Cono - + Rod - + Key Llave - + Phi Phi - + Scales: Escalas: - + Lower Más bajo - + Upper Más alto - + Brightness Brillo - + Chromatic Adaptation Adaptación cromática - + Light Adaptation Adaptación lumínicia - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + Previsualización de HDR + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + Calculo de la respuesta Robertson + + + + Triangular + Triangular + + + + Plateau + Plateau + + + + Gaussian + Gaussian + + + + Flat + Plano + + + + Linear + Lineal + + + + Gamma + Gamma + + + + Logarithmic + Logaritmica + + + + sRGB + sRGB + + + + From Calibration or Input File + + + + Option -v -a... Opción -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. LuminanceHDR requiere ejecutar una alineación de la pila de imágenes con el parámetro "-v" y sin el parámetro "-a". Las opciones de la linea de comendos han sido corregidas. - + Cannot convert %1 to a float No puedo convertir %1 a flotante - + Loading TMO settings from file: %1 Cargar función de respuesta desde archivo - + Input file %1 Fichero de entrada %1 - + Running in HDR-creation mode. Ejecutando en modo Creación de HDR - + Running in Load-HDR mode. Ejecutando en modo Cargar HDR - + Temporary directory: %1 Directorio temporal: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 Cargando el fichero %1 - + Successfully loaded file %1. Cargado el fichero %1 + + The database used for saving TM parameters cannot be opened. +Error: %1 + La base de datos usada para grabar los parámetros TM no se puede abrir. +Error: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Todos los formatos HDR - + Save the LDR image as... Guardar imagen LDR como... + All HDR formats + + + + Save the HDR image as... Guardar imagen HDR como... - + Save as... Guardar como... @@ -5262,202 +5664,20 @@ SavedParametersDialog - + Saved Parameters Parámetros guardados - - + Comment Comentario - + TM Operator Opreador TM - - - Simple - Simple - - - - Equation 2 - Ecuación 2 - - - - Local Contrast Threshold - Umbral de contraste local - - - - Bias - Bias - - - - Spatial Kernel Sigma - Spatial Kernel Sigma - - - - Range Kernel Sigma - Range Kernel Sigma - - - - Base Contrast - Contraste - - - - Alpha - Alpha - - - - Beta - Beta - - - - - Color Saturation - Saturación de color - - - - Noise Reduction - Reducción de ruido - - - - Old Fattal - Old Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Equalización de Contraste - - - - Contrast Factor - Facto de Constraste - - - - Saturation Factor - Factor de Saturacion - - - - Detail Factor - Factor de detalle - - - - Contrast Enhancement - Realce del contraste - - - - Luminance Level - Nivel de luminancia - - - - Manual Luminance Level - Nivel manual de Luminancia - - - - Cone and Rod based on Luminance - Cono y barra basado en luminancia - - - - Local Tonemapping - Ajuste tonal local - - - - Cone Level - Nivel de cono - - - - Rod Level - Nivel de cono - - - - Multiplier - Multiplicador - - - - Use Scales - Usar escalas - - - - Key Value - Valor clave - - - - Phi Value - Valor Phi - - - - Range - Rango - - - - Lower Scale - Escala baja - - - - Upper Scale - Escala alta - - - - Brightness - Brillo - - - - Chromatic Adaptation - Adaptación cromática - - - - Light Adaptation - Adaptación lumínicia - - - - Pre-gamma - Pre-gamma - SavingParameters @@ -5477,7 +5697,7 @@ List of supported cameras - + Lista de cámaras soportadas @@ -5487,587 +5707,661 @@ <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - - - - With LibRaw version - - - - - models listed - - - - - search... - - - - - OK - - - - - TMOProgressIndicator - - - Abort computation - Detener el procesado - - - - ThresholdWidget - - - Frame - - - - - Threshold - Umbral - - - - TiffModeDialog - - - Save as ...TIFF - Guardar como...TIFF - - - - TonemappingPanel - - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Aqui usted puede cargar y guardar archivos de configuración de toneado.<br>Usted puede aplicar los parámetros actualmente cargados en el archivo de configuración. - - - - Tone Mapping Settings - Opciones de Ajuste Tonal - - - - Save current parameters to a text file - Guardar parámetros actuales a un archivo de texto - - - - Save current parameters (pregamma and TMO) to a text file. - Guardar parámetros actuales (pregamma y TMO) a un archivo de texto. - - - - Load an existing text file containing pregamma and TMO settings - Cargar un archivo de texto conteniendo configuración de pregamma y TMO - - - - Load an existing text file containing pregamma and TMO settings. - Carga un archivo existente conteniendo configuración de pregamma y TMO. - - - - Save current parameters - Guardar parámetros activos - - - - Load saved parameters - Cargar parámetros guardados - - - - Export - Exportar - - - - Fast export - - - - - Opens the current export direcotory. This can be changed in the preferences! - Abre el directorio de exportación actual. Este puede ser cambiado en preferencias. - - - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - - - - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Aqui usted puede aplicar una correción de gamma al archivo HDR.<br>La correción de gamma será aplicada antes del toneado. - - - - Process - Procesar - - - - Result Si&ze - Tamaño del &Resultado - - - - - Gamma applied before tonemapping - Gamma aplicada antes del mapeo tonal - - - - Pre-&gamma - - - - - Restore pregamma's default value (1) - Restaurar valores gamma por defecto (1) - - - - Size of the resulting LDR image - Tamaño de la imagen LDR resultante - - - - Here you can choose the size of the resulting LDR image. - Aquí usted puede escoger el tamaño de la imagen LDR de salida. - - - - Set Custom Output Size - Ajustar tamaño de salida personalizado - - - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Pulsando este botón usted dispone de la posibilidad de insertar un valor de <i>ancho</i> para la imagen LDR de salida.<br>Despues de pulsar ENTER (o RETURN) se calculará automáticamente la altura y los nuevos valores serán añadidos a la lista. + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - Start tonemapping (CTRL+T) - Iniciar ajuste tonal (CTRL+T) + + With LibRaw version + Con versión de LibRaw - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Utilizar los parámetros activos indicados arriba (pregamma y operador de ajuste tonal) para generar la imagen LDR + + models listed + modelos mostrados - - &Update preview - Actualizar vista previa + + search... + buscar... - - Ctrl+T - Ctrl+T + + OK + Aceptar + + + TMOProgressIndicator - - Update current LDR - Actualizar LDR activo + + Abort computation + Detener el procesado + + + ThresholdWidget - - Auto Levels + + Frame - - <html><head/><body><p>set auto levels threshold</p></body></html> - + + Threshold + Umbral + + + + TiffModeDialog + + + Save as ...TIFF + Guardar como...TIFF + + + TonemappingPanel - + Tonemap Ajuste tonal - + Mantiuk '06 Mantiuk '06 - + Mantiuk '08 Mantiuk '08 - + Fattal Fattal - + Ferradans - + Ferradans - + Drago Drago - + Durand Durand - + Reinhard '02 Reinhard '02 - + Reinhard '05 Reinhard '05 - + Ashikhmin Ashikhmin - + Pattanaik Pattanaik - + Mai + Mai + + + + Ferwerda - - Operator - Operador + + KimKautz + - - Contrast Factor - Facto de Constraste + + VanHateren + + + + + Lischinski + - - Saturation Factor - Factor de Saturacion + + Operator + Operador - - Detail Factor - Factor de detalle + + &Contrast Factor + - + Contrast Equalization Equalización de Contraste - - Predefined Display - Visor predeterminado + + &Detail Factor + Factor de &detalle - + + Saturat&ion Factor + Factor de saturac&ión + + + Lcd Office Lcd Office - + Lcd Lcd - + Lcd Bright Brillo del Lcd - + CRT CRT - - - Color Saturation - Saturación de color + + Co&lor Saturation + Saturación de co&lor - - Contrast Enhancement - Realce del contraste + + Co&ntrast Enhancement + Mejora del co&ntraste - + Enable Luminace Level Activar Nivel de Luminancia - - Luminance Level - Nivel de luminancia + + Lum&inance Level + Nivel de lum&inancia - - Alpha - Alpha + + Predefined &Display + &Pantalla predefinida - - Beta - Beta + + A&lpha + A&lfa - - Noise Reduction - Reducción de ruido + + Bet&a + + + + + Color Saturat&ion + Saturac&ión de color + + + + &Noise Reduction + &Reducción de ruido - + Version 2.3.0 Versión 2.3.0 - - Inverse Alpha + + &Inverse Alpha - + Rho - + Rho - - Bias - Bias + + B&ias + - - Spatial Kernel Sigma - Spatial Kernel Sigma + + Spatial &Kernel Sigma + - - Range Kernel Sigma - Range Kernel Sigma + + Base Co&ntrast + - - Base Contrast - Contraste + + Range Kerne&l Sigma + - - Key Value - Valor clave + + Ph&i + - - Phi - Phi + + &Key Value + - - Use Scales - Usar escalas + + &Lower Scale + Escala &inferior - - Range - Rango + + Upper S&cale + - - Lower Scale - Escala baja + + Use Scales + Usar escalas - - Upper Scale - Escala alta + + Ra&nge + Ra&ngo - - Brightness - Brillo + + &Light Adaptation + Adaptación de &luz - - Chromatic Adaptation - Adaptación cromática + + Chromatic A&daptation + A&daptación cromática - - Light Adaptation - Adaptación lumínicia + + Br&ightness + Br&illo - - Local Contrast Threshold - Umbral de contraste local + + Local Contrast Threshol&d + Umbral de &contraste local - + Simple Simple - - Equation Number - Número de ecuación + + Equation &Number + &Número de ecuación - + Eqn &2 - + Ec. &2 - + Eqn &4 - - - - - Multiplier - Multiplicador + Ec. &4 - + Local Tone Mapping Toneado local - + + Mu&ltiplier + Mu&ltiplicador + + + Auto Cone/Rod - - Cone Level - Nivel de cono + + Co&ne Level + - - Rod Level - Nivel de cono + + Ro&d Level + - + This operator has no options + Este operador no tiene opciones + + + + &Multiplier + + + + + A&daptation Luminance + + + + + &C1 + + + + + C&2 + + + + + Pup&il Area + + + + + a&lpha mul - + Restore operator's default values Restaurar valores por defecto del operador - + Restore Restaurar - + Previous applied settings Ajustes aplicados previamente - + Previous Previo - + Next applied settings Ajustes aplicados a continuación - + Next Siguiente - - Queue size: %1 + + Start tonemapping (CTRL+T) + Iniciar ajuste tonal (CTRL+T) + + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Utilizar los parámetros activos indicados arriba (pregamma y operador de ajuste tonal) para generar la imagen LDR + + + + &Update preview + Actualizar vista previa + + + + Ctrl+T + Ctrl+T + + + + Update current LDR + Actualizar LDR activo + + + + Auto Levels + Auto niveles + + + + <html><head/><body><p>set auto levels threshold</p></body></html> + + + + + Processing + Procesando + + + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Aqui usted puede aplicar una correción de gamma al archivo HDR.<br>La correción de gamma será aplicada antes del toneado. + + + + Res&ult Size + + + + + Set Custom Output Size + Ajustar tamaño de salida personalizado + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Pulsando este botón usted dispone de la posibilidad de insertar un valor de <i>ancho</i> para la imagen LDR de salida.<br>Despues de pulsar ENTER (o RETURN) se calculará automáticamente la altura y los nuevos valores serán añadidos a la lista. + + + + + Gamma applied before tonemapping + Gamma aplicada antes del mapeo tonal + + + + Pre-&gamma + + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + + + + + Pos&t-saturation + Pos&t-saturación + + + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + + + + + Post-gamma + Post-gamma + + + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + + + + + ... + ... + + + + Settings + Ajustes + + + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Aqui usted puede cargar y guardar archivos de configuración de toneado.<br>Usted puede aplicar los parámetros actualmente cargados en el archivo de configuración. + + + + Tone Mapping Settings + Opciones de Ajuste Tonal + + + + Save current parameters to a text file + Guardar parámetros actuales a un archivo de texto + + + + Save current parameters (pregamma and TMO) to a text file. + Guardar parámetros actuales (pregamma y TMO) a un archivo de texto. + + + + Load an existing text file containing pregamma and TMO settings + Cargar un archivo de texto conteniendo configuración de pregamma y TMO + + + + Load an existing text file containing pregamma and TMO settings. + Carga un archivo existente conteniendo configuración de pregamma y TMO. + + + + Load saved parameters + Cargar parámetros guardados + + + + Save current parameters + Guardar parámetros activos + + + + Export + Exportar + + + + Fast export + Exportación rápida + + + + Opens the current export directory. This can be changed in the preferences! - + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Abrir</span></a></p></body></html> + + + + Queue size: %1 + Tamaño de la cola: %1 + + + TM Database Problem Problema de base de datos TM - + The database used for saving TM parameters cannot be opened. Error: %1 La base de datos usada para grabar los parámetros TM no se puede abrir. Error: %1 - + Load a tonemapping settings text file... Cargar configuración de mapa de Tonos desde archivo... - - + + LuminanceHDR tonemapping settings text file (*.txt) Archivos de configuración de ajuste tonal en formato texto para Luminance HDR (*.txt) - - - - + + + + Aborting... Cancelando... - + File is not readable (check existence, permissions,...) El archivo no es legible (compruebe su existencia, permisos,...) - + Save tonemapping settings text file to... Guardar configuración de toneado a un archivo... - + File is not writable (check permissions, path...) El archivo no es escribible (compruebe sus permisos, ruta....) - + File is not readable (check permissions, path...) El archivo no es legible (compruebe sus permisos, ruta...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Error: El formato del archivo de configuración de ajuste tonal ha cambiado. Este (viejo) fichero no puede ser utilizado con esta versión de LuminanceHDR. Crear uno nuevo. - + Custom LDR size Personalizar tamaño LDR - + Enter the width of the new size: Introduzca la anchura del nuevo tamaño: @@ -6174,7 +6468,7 @@ Show onl&y: - + Mos&trar solo: @@ -6194,7 +6488,7 @@ Filter &log messages: - + Filtrar mensajes de tra&za: @@ -6217,19 +6511,19 @@ &Inicio - - + + All Supported formats Todos los formatos soportados - - + + Select the input images Seleccionar las imágenes iniciales - + &Done &Hecho @@ -6237,39 +6531,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Licencia del documento no encontrada, puede encontrarla on-line: %2aqui%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation Donación - + Would you like to donate? ¿Querrias hacer una donación? - + Yes, I'd love to! Si, ¡Me gusta¡ - + Stop Bothering Me Deje de molestarme - + Remind me later Recuérdemelo despés @@ -6277,18 +6571,18 @@ UpdateChecker - + A new release is ready for download! ¡Una nueva versión está lista para la descarga! - - + + Do you want to open the webpage for download now? Quiere abrir la página web para descargarla ahora? - + Click to download, or select Help->Update! Hacer Click para descargar, o seleccione Ayuda->Actualizar! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_fi.ts luminance-hdr-2.6.0/i18n/lang_fi.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_fi.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_fi.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors T&ekijät - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Kiitokset - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &Lisenssisopimus - + &OK &OK @@ -123,272 +174,320 @@ Lopputulos - + Choose an HDR output file format - - Predefined profile: - - - - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profiili 1 - + Profile 2 Profiili 2 - + Profile 3 Profiili 3 - + Profile 4 Profiili 4 - + Profile 5 Profiili 5 - + Profile 6 Profiili 6 - + + Output format: + + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Painokertoimet: + + + + Predefined profile: + + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangulaarinen + + + + Linear + Lineaarinen + + + Alignment Kohdistus - - Auto align the bracketed pictures + + Use Hugin's align_image_stack engine - - Auto-align images + + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine - + &MTB - - Use Hugin's align_image_stack engine + + Auto align the bracketed pictures - - Hugin's align_&image_stack + + Auto-align images - + Auto-crop - + &Cancel &Peruuta - + &Start &Aloita - + &Close &Sulje - + Progress - + Input/Output - + Folder where created HDRs are saved - - + + Select... Valitse... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: Syötekansio: - + Output folder: Tulostekansio: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold Kynnysarvo - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory Valitse lähdekoodihakemisto - + Choose a output directory Valitse tulostushakemisto - - - + + + Warning Varoitus - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - Valittu tulostushakemisto sisältää HDR-tiedostoja. Niiden tiedostojen päälle saatetaan kirjoittaa. - -Jatketaanko? + - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... - + Loading files... Ladataan tiedostoja... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... Kohdistetaan... - + Creating HDR... Luodaan HDR... - + Doing auto anti-ghosting... - + Written - + Error: Virhe: - + Aborting... Keskeytetään... @@ -412,261 +511,302 @@ Lista tonemapattavista HDR-kuvista - - Add Directory (Alt+D) - Lisää hakemisto (Alt+D) + + Remove Files (Alt+R) + Poista tiedostoja (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Lisää tiedostoja (Alt+F) + + Remove All Files (Alt+X) + - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Poista tiedostoja (Alt+R) + + Alt+X + - - Alt+R - Alt+R + + Add Files (Alt+F) + Lisää tiedostoja (Alt+F) - - Tone Mapping Settings - Tonemappauksen asetukset + + Alt+F + Alt+F - Add Directory (Alt+I) - Lisää hakemisto (Alt+I) + Add Directory (Alt+D) + Lisää hakemisto (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Tonemappauksen asetukset - + Add Files (Alt+L) Lisää tiedostoja (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Lisää hakemisto (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Lisää tietokannasta (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Poista asetukset (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Lista HDR-kuvien tonemappaukseen käytettävistä asetustiedostoista - + Output Lopputulos - + Output Image Width: - + Output Folder: Tulostekansio: - - + + Specify output folder for the tone mapped files Määritä kohdekansio tonemapatuille tiedostoille - + Selec&t... Vali&tse... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log Muuntoloki - + Batch operations report Kuvaerän toimintojen raportti - + Show onl&y: - + Filter messages based on severity Suodata viestit vakavuuden mukaan - + All messages Kaikki viestit - + Errors only Vain virheet - + Success messages Onnistunut-viestit - + Filter &log messages: - + Clear filter text Tyhjennä suodatinteksti - + Overall completion progress Valmistumisen eteneminen - + &Cancel &Peruuta - + Start batch tone mapping Aloita kuvaerän tonemappaus - + &Start &Aloita - + Using %n thread(s) - - - + + + Choose a directory Valitse hakemisto - + All HDR images Kaikki HDR-kuvat - + Select input images Valitse syötettävät kuvat - + Load tone mapping settings text files... Lataa tonemappauksen asetusten tekstitiedostot... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + Varoitus + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Prosessoidaan... - + Start processing... Aloita prosessointi... - + Close Sulje - + &Done &Valmis - + + Conversion aborted by user request. + + + + All tasks completed. Kaikki tehtävät suoritettu. - + Aborting... Keskeytetään... @@ -674,27 +814,32 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -702,572 +847,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Käyttö: %1 [OPTIONS]... [INPUTFILES]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Virhe: Kohdistusmoottoria ei tunnistettu. - + Error: Unknown weight function specified. Virhe: Tuntematon painofunktio määritetty. - + Error: Unknown response curve specified. Virhe: Tuntematon vastekäyrä määritetty. - + Error: Unknown HDR creation model specified. Virhe: Tuntematon HDR-luontimalla määritetty. - + Error: Unknown tone mapping operator specified. Virhe: Tuntematon tonemappausoperaattori määritetty. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Virhe: EV-arvojen annettu määrä poikkeaa syötettyjen tiedostojen määrästä. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Virhe: Exif-tiedot puuttuvat kuvista ja EV-arvoja ei ole määrittety komentorivillä, poistutaan. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack Align_image_stack käynnistäminen epäonnistui - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1345,47 +1583,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable &Muokattava - + R&eference Ve&rtaus - + Select the previous image in both lists Valitse edellinen kuva molemmista listoista - + Select the next image in both lists Valitse seuraava kuva molemmissa listoissa - + Choose a directory and a prefix Valitse hakemisto ja etuliite @@ -1421,9 +1659,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Listassa nyt valittua kuvaa voi siirtää ylös, alas, vasemmalle ja oikealle käyttäen alapuolella olevia nappeja. -Kuvan histogrammi näytetään yllä olevassa widgetissä. +This image's histogram is displayed in the widget above. + @@ -1916,18 +2153,18 @@ - + Choose a directory Valitse hakemisto - - + + Error: Virhe: - + must be a directory. @@ -2087,28 +2324,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2116,7 +2353,7 @@ GenericViewer - + Pan the image to a region Panoroi kuva alueelle @@ -2129,45 +2366,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + Sulje + + + HdrViewer - + &Mapping: &Mappaus: - + Histogram: Histogrammi: - + Linear Lineaarinen - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2191,7 +2441,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2231,7 +2481,7 @@ - &MTB + M&TB @@ -2241,7 +2491,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2308,12 +2558,12 @@ [2/2] Valitse asetukset HDR:n luomiselle - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2326,47 +2576,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Ensimmäinen ennalta määritetty profiili johtaa usein parhaaseen tulokseen. Vaihda sitä ainoastaan, jos HDR-kuva ei ole hyvä.</span></p></body></html> - - Profile 1 - Profiili 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profiili 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profiili 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profiili 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profiili 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profiili 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Käytä tätä ainoastaan kun oletusarvo yllä ei johda hyviin tuloksiin - + Use Custom Configuration - + HDR Creation Model @@ -2416,238 +2666,267 @@ - + Linear Lineaarinen - + Gamma Gamma - + Log Loki - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... Tallenna nimellä... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Seuraava > - + &Cancel &Peruuta - + Image Filename Kuvan tiedostonimi - + Exposure Valotus - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Valitse kuvat - + Unknown Tuntematon - + Loading... Ladataan... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found EXIF-tietoja ei löytynyt - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Kuvat ladattu.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Jatkaaksesi sinun täytyy asetaa valotusarvot manuaalisesti<br><font color="#FF0000">%1</font> arvoa puuttuu.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: - + Start loading a set of images with different exposure Aloita eri valotuksella olevien kuvien sarjan lataaminen - - - + + + Error... Virhe... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... Ulkonen sovellusi "<em>align_image_stack</em>" kaatui... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Tuntematon virhe suoritettaessa "<em>align_image_stack</em>" -sovellusta... - + Now click on next button Klikkaa nyt seuraava-nappia - + + Compute + + + + + Finish + + + + Aligning... Kohdistetaan... - - - &Finish - &Viimeistele + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - Painoarvot: - - - - - Response curve: - - Vastekäyrä: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Kaikki EV-arvot on asetettu.<br>Klikkaa seuraava-nappia.</b></h3></font></center> - - - Model: - - Malli: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Jatkaaksesi sinun täytyy asetaa valotusarvot manuaalisesti<br><font color="#FF0000">%1</font> arvoa puuttuu.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Kaikki EV-arvot on asetettu.<br>Klikkaa seuraava-nappia.</b></h3></font></center> + + Hide Log + @@ -2659,7 +2938,7 @@ - + &File Tie&dosto @@ -2685,7 +2964,7 @@ - + &Print... &Tulosta... @@ -2701,7 +2980,7 @@ - + &Find... &Etsi... @@ -2732,7 +3011,7 @@ - + &Add Bookmark L&isää kirjanmerkki @@ -2748,7 +3027,7 @@ - + D&elete All Po&ista kaikki @@ -2818,100 +3097,98 @@ - + Help SideBar Ohjeen sivupalkki - + LuminanceHDR Online Help LuminanceHDR Online-ohje - + &Edit &Muokkaa - + &View &Näytä - - + + &Bookmarks &Kirjanmerkit - + &Quit &Lopeta - + Find &Next Etsi seur&aava - + Find &Previous Etsi e&dellinen - + &Contents &Sisältö - + &Search &Etsi - + &Delete P&oista - + Find Etsi - + Search Term: Hakusana: - + New Bookmark Uusi kirjanmerkki - + New Bookmark's Title: Uuden kirjanmerkin otsikko: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Anteeksi, mutta ohjetta ei ole asennettu!</p><p>Ole hyvä ja ota yhteyttä paketin tarjoajaan tai LuminanceHDR:n tiimiin jos teit sovelluksen itse</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Ohjeen selain - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Ohjeselaimet eivät hallitse tätä protokollaa. -Haluatko avata linkin oletussovelluksella, -joka on liitetty protokollaan? + @@ -2967,22 +3244,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2990,7 +3272,7 @@ ImageQualityDialog - + Unknown Tuntematon @@ -3041,9 +3323,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3123,7 +3405,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3968,18 +4250,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3993,6 +4270,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -4008,91 +4290,90 @@ Valmis. Avaa nyt olemassa oleva HDR-kuva tai luo uusi! - + All HDR formats Kaikki HDR-formaatit - + Load one or more HDR images... Lataa yksi tai useampi HDR-kuva... - + Save files in Tallenna tiedostot - - + + Failed to save %1 - + Done! Valmis! - + Aborting... Keskeytetään... - - - Untitled - Nimetön - - - + Cropped Image Rajattu kuva - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Tallentamattomia muutoksia... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + Nimetön + + + Untitled %1 - + Error: %1 Virhe: %1 - + Untitled HDR - + FITS Image FITS-kuva @@ -4432,23 +4713,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Huippukohdat</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Valitse huippukohtien leikkaustapa:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Yhtenäinen valkoinen</span>: Leikkaa kaikki huippukohdat valkoisiksi</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Älä leikkaa</span>: Jättää huippukohdat leikkaamatta vaalenapunaisen eri sävyillä</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Sekoita</span>: Sekoittaa leikatut ja ei-leikatut arvot yhteen, jotta saadaan astettainen häivytys valkoiseen</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Uudelleenrakenna</span>: Uudelleenrakentaa huippukohdat käyttäen tasoarvoa</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4736,28 +5008,28 @@ &OK - + Restart Käynnistä uudelleen - + For the settings to take effect, please restart the application! - - + + Choose a directory Valitse hakemisto - + Open ICC Profile Avaa ICC-profiili - + Color profile (*.icc *.ICC *.icm *.ICM) Väriprofiili (*.icc *.ICC *.icm *.ICM) @@ -4873,17 +5145,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: VIRHE: ei voida ladata tonemappauksen asetustiedostoa: - + ERROR: File too old, cannot parse Tone Mapping Setting file: VIRHE Tiedosto liian vanha, ei voida jäsentää tonemappauksen asetustiedostoa: - + ERROR: cannot parse Tone Mapping Setting file: VIRHE: ei voida jäsentää tonemappauksen asetustiedostoa: @@ -4891,370 +5163,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning Varoitus - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Triangulaarinen - - - - Plateau - Plateau - - - - Gaussian - Gaussian - - - - Flat - - - - - Linear - Lineaarinen - - - - Gamma - Gamma - - - - Logarithmic - Logaritminen - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Kontrastin tasoitus - + Contrast - - + + Saturation - + Detail - + Luminance Level Luminanssin taso - + Luminance Level=Auto - + Color Saturation Värin saturaatio - + Contrast Enhancement Kontrastin parannus - + + Alpha Alpha - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias Bias - + Spatial - - + + Range Range - + Base - + Multiplier Kerroin - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness Kirkkaus - + Chromatic Adaptation Kromaattinen adaptaatio - + Light Adaptation Valon adaptaatio - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Triangulaarinen + + + + Plateau + Plateau + + + + Gaussian + Gaussian + + + + Flat + + + + + Linear + Lineaarinen + + + + Gamma + Gamma + + + + Logarithmic + Logaritminen + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float Ei voida muuntaa %1 liukuluvuksi - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 Tilapäinen hakemisto: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 Ladataan tiedosto %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Kaikki LDR-formaatit - + Save the LDR image as... Tallenna LDR-kuva nimellä... + All HDR formats + + + + Save the HDR image as... Tallenna HDR-kuva nimellä... - + Save as... Tallenna nimellä... @@ -5325,209 +5678,27 @@ SavedParametersDialog - + Saved Parameters Tallennetut parametrit - - + Comment Kommentti - + TM Operator + + + SavingParameters - - Simple - Yksinkertainen - - - - Equation 2 - - - - - Local Contrast Threshold - Paikallisen kontrastin kynnysarvo - - - - Bias - Bias - - - - Spatial Kernel Sigma - Spatial Kernel Sigma - - - - Range Kernel Sigma - Range Kernel Sigma - - - - Base Contrast - Base Contrast - - - - Alpha - Alpha - - - - Beta - Beta - - - - - Color Saturation - Värin saturaatio - - - - Noise Reduction - Kohinanpoisto - - - - Old Fattal - - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Kontrastin tasoitus - - - - Contrast Factor - Kontrastin kerroin - - - - Saturation Factor - Värikylläisyyden kerroin - - - - Detail Factor - Yksityiskohtien kerroin - - - - Contrast Enhancement - Kontrastin parannus - - - - Luminance Level - Luminanssin taso - - - - Manual Luminance Level - - - - - Cone and Rod based on Luminance - Cone and Rod based on Luminance - - - - Local Tonemapping - - - - - Cone Level - Cone Level - - - - Rod Level - Rod Level - - - - Multiplier - Kerroin - - - - Use Scales - Use Sclaes - - - - Key Value - Key Value - - - - Phi Value - - - - - Range - Range - - - - Lower Scale - Lower Scale - - - - Upper Scale - Upper Scale - - - - Brightness - Kirkkaus - - - - Chromatic Adaptation - Kromaattinen adaptaatio - - - - Light Adaptation - Valon adaptaatio - - - - Pre-gamma - - - - - SavingParameters - - - Saving Parameters - Tallennetaan parametreja + + Saving Parameters + Tallennetaan parametreja @@ -5576,7 +5747,7 @@ TMOProgressIndicator - + Abort computation Keskeytä laskenta @@ -5605,530 +5776,604 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Voit ladata ja tallentaa tässä tonemappauksen asetustiedoston.<br>Voit myös hyväksyä tällä hetkellä ladatun asetustiedoston sisällön. + + Tonemap + - - Tone Mapping Settings - Tonemappauksen asetukset + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - Tallenna nykyiset parametrit tekstitiedostoon + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - Tallenna nykyiset parametrit (pregamma ja TMO) tekstitiedostoon. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - Lataa pregamma- ja TMO-asetukset sisältävä tekstitiedosto + + Ferradans + - - Load an existing text file containing pregamma and TMO settings. - Lataa pregamma- ja TMO-asetukset sisältävä tekstitiedosto. + + Drago + Drago - - Save current parameters - + + Durand + Durand - - Load saved parameters + + Reinhard '02 + Reinhard '02 + + + + Reinhard '05 + Reinhard '05 + + + + Ashikhmin + Ashikhmin + + + + Pattanaik + Pattanaik + + + + Mai - - Export + + Ferwerda - - Fast export + + KimKautz - - Opens the current export direcotory. This can be changed in the preferences! + + VanHateren - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Lischinski - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Voit lisätä tässä HDr-kuvaan gammakorjauksen.<br>Gammakorjaus tehdään ennen tonemappausta. + + Operator + Operaattori - - Process - Käsittele + + &Contrast Factor + - - Result Si&ze + + Contrast Equalization + Kontrastin tasoitus + + + + &Detail Factor - - Gamma applied before tonemapping - Gamma lisätään ennen tonemappausta + Saturat&ion Factor + - - Pre-&gamma - + + Lcd Office + Lcd toimisto - - Restore pregamma's default value (1) - Palauta pregamman oletusarvo (1) + + Lcd + Lcd - - Size of the resulting LDR image - LDR-kuvan koko + + Lcd Bright + Lcd kirkas - - Here you can choose the size of the resulting LDR image. - Voit valita tässä LDR-kuvan lopullisen koon. + + CRT + CRT - - Set Custom Output Size + + Co&lor Saturation - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Tätä nappia klikkaamalla voit asettaa <i>leveyden</i>lopulliselle LDR-kuvalle.<br>Kun olet painanut Enteriä (eli Palaa (Return)-nappia) korkeuden arvo lasketaan automaattisesti ja uusi koko listätään listaan. + + Co&ntrast Enhancement + - - Start tonemapping (CTRL+T) - Aloita tonemappaus (CTRL+T) + + Enable +Luminace Level + - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Käytä nykyisiä yllä olevia parametrejä (pregamma ja tonemappausoperaattori) LDR-kuvan luomiseen + + Lum&inance Level + - - &Update preview + + Predefined &Display - - Ctrl+T - Ctrl+T + + A&lpha + - - Update current LDR + + Bet&a - - Auto Levels + + Color Saturat&ion - - <html><head/><body><p>set auto levels threshold</p></body></html> + + &Noise Reduction - - Tonemap + + Version 2.3.0 - - Mantiuk '06 - Mantiuk '06 + + &Inverse Alpha + - - Mantiuk '08 - Mantiuk '08 + + Rho + - - Fattal - Fattal + + B&ias + - - Ferradans + + Spatial &Kernel Sigma - - Drago - Drago + + Base Co&ntrast + - - Durand - Durand + + Range Kerne&l Sigma + - - Reinhard '02 - Reinhard '02 + + Ph&i + - - Reinhard '05 - Reinhard '05 + + &Key Value + - - Ashikhmin - Ashikhmin + + &Lower Scale + - - Pattanaik - Pattanaik + + Upper S&cale + - - Mai + + Use Scales + Use Sclaes + + + + Ra&nge - - Operator - Operaattori + + &Light Adaptation + - - Contrast Factor - Kontrastin kerroin + + Chromatic A&daptation + - - Saturation Factor - Värikylläisyyden kerroin + + Br&ightness + - - Detail Factor - Yksityiskohtien kerroin + + Local Contrast Threshol&d + - - Contrast Equalization - Kontrastin tasoitus + + Simple + Yksinkertainen - - Predefined Display - Ennalta määritelty näyttö + + Equation &Number + - - Lcd Office - Lcd toimisto + + Eqn &2 + - - Lcd - Lcd + + Eqn &4 + - - Lcd Bright - Lcd kirkas + + Local Tone Mapping + Local Tone Mapping - - CRT - CRT + + Mu&ltiplier + - - - Color Saturation - Värin saturaatio + + Auto Cone/Rod + - - Contrast Enhancement - Kontrastin parannus + + Co&ne Level + - - Enable -Luminace Level + + Ro&d Level - - Luminance Level - Luminanssin taso + + This operator has no options + - - Alpha - Alpha + + &Multiplier + - - Beta - Beta + + A&daptation Luminance + - - Noise Reduction - Kohinanpoisto + + &C1 + - - Version 2.3.0 + + C&2 - - Inverse Alpha + + Pup&il Area - - Rho + + a&lpha mul - - Bias - Bias + + Restore operator's default values + Palauta operaattorin oletusarvot - - Spatial Kernel Sigma - Spatial Kernel Sigma + + Restore + Palauta - - Range Kernel Sigma - Range Kernel Sigma + + Previous applied settings + Aikaisemmat hyväksytyt asetukset - - Base Contrast - Base Contrast + + Previous + - - Key Value - Key Value + + Next applied settings + Seuraavat hyväksytyt asetukset - - Phi - Phi + + Next + - - Use Scales - Use Sclaes + + Start tonemapping (CTRL+T) + Aloita tonemappaus (CTRL+T) - - Range - Range + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Käytä nykyisiä yllä olevia parametrejä (pregamma ja tonemappausoperaattori) LDR-kuvan luomiseen - - Lower Scale - Lower Scale + + &Update preview + - - Upper Scale - Upper Scale + + Ctrl+T + Ctrl+T - - Brightness - Kirkkaus + + Update current LDR + - - Chromatic Adaptation - Kromaattinen adaptaatio + + Auto Levels + - - Light Adaptation - Valon adaptaatio + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Local Contrast Threshold - Paikallisen kontrastin kynnysarvo + + Processing + - - Simple - Yksinkertainen + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Voit lisätä tässä HDr-kuvaan gammakorjauksen.<br>Gammakorjaus tehdään ennen tonemappausta. - - Equation Number - Equation Number + + Res&ult Size + - - Eqn &2 + + Set Custom Output Size - - Eqn &4 + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Tätä nappia klikkaamalla voit asettaa <i>leveyden</i>lopulliselle LDR-kuvalle.<br>Kun olet painanut Enteriä (eli Palaa (Return)-nappia) korkeuden arvo lasketaan automaattisesti ja uusi koko listätään listaan. + + + + + Gamma applied before tonemapping + Gamma lisätään ennen tonemappausta + + + + Pre-&gamma - - Multiplier - Kerroin + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Local Tone Mapping - Local Tone Mapping + + Pos&t-saturation + - - Auto Cone/Rod + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> - - Cone Level - Kartiotaso + + Post-gamma + - - Rod Level - Rod Level + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - This operator has no options + + ... + ... + + + + Settings - - Restore operator's default values - Palauta operaattorin oletusarvot + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Voit ladata ja tallentaa tässä tonemappauksen asetustiedoston.<br>Voit myös hyväksyä tällä hetkellä ladatun asetustiedoston sisällön. - - Restore - Palauta + + Tone Mapping Settings + Tonemappauksen asetukset - - Previous applied settings - Aikaisemmat hyväksytyt asetukset + + Save current parameters to a text file + Tallenna nykyiset parametrit tekstitiedostoon - - Previous + + Save current parameters (pregamma and TMO) to a text file. + Tallenna nykyiset parametrit (pregamma ja TMO) tekstitiedostoon. + + + + Load an existing text file containing pregamma and TMO settings + Lataa pregamma- ja TMO-asetukset sisältävä tekstitiedosto + + + + Load an existing text file containing pregamma and TMO settings. + Lataa pregamma- ja TMO-asetukset sisältävä tekstitiedosto. + + + + Load saved parameters - - Next applied settings - Seuraavat hyväksytyt asetukset + + Save current parameters + - - Next + + Export - + + Fast export + + + + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + + + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... Lataa tonemappauksen asetusten tekstitiedosto... - - + + LuminanceHDR tonemapping settings text file (*.txt) LuminanceHDR tonemappauksen asetusten tekstitiedosto (*.txt) - - - - + + + + Aborting... Keskeytetään... - + File is not readable (check existence, permissions,...) Tiedosto ei ole luettavissa (tarkasta olemassaolo, oikeudet,...) - + Save tonemapping settings text file to... Tallenna tonemappauksen asetusten tekstitiedosto... - + File is not writable (check permissions, path...) Tiedosto ei ole kirjoitettava (tarkista oikeudet, polku...) - + File is not readable (check permissions, path...) Tiedostoa ei voida lukea (tarkista oikeudet, polku...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Kustomoitu LDR koko - + Enter the width of the new size: Sytö uuden koon leveys: @@ -6278,19 +6523,19 @@ &Käynnistä - - + + All Supported formats Kaikki tuetut formaatit - - + + Select the input images Valitse syötettävät kuvat - + &Done &Valmis @@ -6298,39 +6543,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Lisenssidokumenttia ei löydy, löydät sen online: %2täältä%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation Lahjoitus - + Would you like to donate? Haluaisitko lahjoittaa? - + Yes, I'd love to! Kyllä! - + Stop Bothering Me Älä häiritse minua enää - + Remind me later Muistuta minua myöhemmin @@ -6338,18 +6583,18 @@ UpdateChecker - + A new release is ready for download! Uusi versio on valmis ladattavaksi! - - + + Do you want to open the webpage for download now? Haluatko avata nyt webbisivun latausta varten? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_fr.ts luminance-hdr-2.6.0/i18n/lang_fr.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_fr.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_fr.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + À propos de Luminance HDR @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd" + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> + <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,75 +30,215 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> - +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Création d'images HDR.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&uteurs - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CODEURS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Principal codeur de QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">MPrincipaux codeurs de Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Améliorations et corrections</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTEURS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">GESTIONNAIRES DE PACKAGES</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRADUCTEURS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Eéquip de traduction de Luminance HDR</span></a><span style=" font-size:10pt;"> sur Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinois</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Tchèque</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Français</span><span style=" font-size:10pt;">: François Edelin</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Allemand</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norvégien</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polonais</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Roumain</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russe</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Espagnol</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turc</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Remerciements - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Communauté sur </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Communauté sur </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">align_image_stack d'Ungin et plus</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Et aussi</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + Journal - + &License Agreement Termes de &Licence - + &OK &OK @@ -104,7 +248,7 @@ Batch HDR - + HDR par lot @@ -123,272 +267,323 @@ Sortie - + Choose an HDR output file format Choisir un format pour le fichier HDR - - Predefined profile: - Profil prédéfini: - - - - Output format: - Format de sortie: + + Filename prefix: + Préfixe du fichier: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Choisir un des profils de création prédéfinis. Voir la documentation pour plus d'information. + Choisir un des profils de création prédéfinis. +Lire la documentation pour plus d'informations. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + Format de sortie: + + + + hdr_ + hdr_ + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + <html><head/><body><p>En laissant coché, le format du nom des fichiers HDRs créés sera le suivant: <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>où "first" est le nom de la 1ere image de la série, "last" le nom de la dernière image de la série et l'extension pour le format de fichier HDR choisi.</p></body></html> + + + + Use Proposed Filename Scheme + Utiliser une proposition de nommage + + + + Response: + + + + + Weights: + Poids : + + + + Predefined profile: + Profil prédéfini: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangulaire + + + + Linear + Linéaire + + + Alignment Alignement - - Auto align the bracketed pictures - Alignement automatique des images en fourchette + + Use Hugin's align_image_stack engine + Utiliser le moteur align_image_stack de Hugin - - Auto-align images - Alignement automatique des images + + Hugin's align_&image_stack + align_&image_stack de Hugin - + Use MTB (Median Threshold Bitmap) engine Utiliser MTB (Median Threshold Bitmap) - + &MTB - + &MTB - - Use Hugin's align_image_stack engine - Utiliser align_image_stack de Hugin + + Auto align the bracketed pictures + Alignement automatique des images bracketées - - Hugin's align_&image_stack - + + Auto-align images + Alignement automatique des images - + Auto-crop Rognage automatique - + &Cancel &Annuler - + &Start &Lancer - + &Close &Fermer - + Progress Avancement - + Input/Output - + Entreé/Sortie - + Folder where created HDRs are saved - Dossier où les images HDR sont sauvergardées + Dossier où les images HDR sont sauvegardées - - + + Select... Sélectionner... - + Folder where bracketed pictures are located (in alphabetical order) - Dossier où les images prises en fourchette sont situées (par ordre alphabétique) + Dossier où les images bracketées sont situées (par ordre alphabétique) - + Input folder: Dossier source: - + Output folder: - Dossier de sortie: + Dossier destination: - + Anti-ghosting - + Anti-fantôme - + Artifact-free High Dynamic Range Imaging - + Image HDR sans artefact - + Threshold Seuil - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Seuil utilisé par l'algorithme auto d'anti-fantôme. Un seuil bas provoque un traitement aggressif mais qui peut limiter la plage dynamique finale. Utilier te bouton &quot;Recompute&quot; pour visualiser la couverture des corrections en cours et ajuster le seuil en fonction.</p></body></html> - + O. Gallo and others - + O. Gallo et autres - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + <html><head/><body><p>Activation de l'algorithme auto anti-fantôme</p></body></html> - + Auto anti-ghosting - + Anti-fantôme auto - + Custom config %1 - + Config personnalisée %1 - + Choose a source directory Choisir un dossier source - + Choose a output directory - Choisir un dossier de sortie + Choisir un dossier destination - - - + + + Warning Attention - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - Le dossier de sortie contient des fichiers HDR qui pourraient être réécrits. + Le répertoire cible choisi contient déjà des fichiers HDR qui pourraient donc être écrasés. -Continuer? +Continuer ? - - + + Total number of pictures must be a multiple of number of bracketed images. - Le nombre total d'images doit être un multiple du nombre d'images prises en fourchette. + Le nombre total d'images doit être un multiple du nombre d'images bracketées. - + Started processing... - Processus initié... + Traitement en cours... - + Loading files... - + Chargement des fichiers... - + Completed with errors Achevé avec des erreurs - + Completed without errors - Achevé sans erreurs + Achevé sans erreur - + Error: missing EXIF data - + Error: données EXIF manquantes - + Aligning... Alignement en cours... - + Creating HDR... Création du HDR... - + Doing auto anti-ghosting... - + Suppression auto des fantômes... - + Written Écrit - + Error: Erreur: - + Aborting... Abandon... @@ -408,264 +603,305 @@ List of HDRs that will be tone mapped - Liste des HDRs qui seront tone mappés + Liste des HDRs qui seront "tone mapped" - - Add Directory (Alt+D) - Ajouter Dossier (Alt+D) + + Remove Files (Alt+R) + Retirer Fichiers (Alt+R) - - Alt+D - + + Alt+R + Alt+R - - Add Files (Alt+F) - Ajouter Fichiers (Alt+F) + + Remove All Files (Alt+X) + Effacer les fichiers (Alt+X) - - Alt+F - + + + ... + ... - - Remove Files (Alt+R) - Retirer Fichiers (Alt+R) + + Alt+X + Alt+X - - Alt+R - + + Add Files (Alt+F) + Ajouter Fichiers (Alt+F) - - Tone Mapping Settings - Paramètres de tone mapping + + Alt+F + Atl+F - Add Directory (Alt+I) - Ajouter Dossier (Alt+I) + Add Directory (Alt+D) + Ajouter Dossier (Alt+D) - Alt+I - + Alt+D + Alt+D + + + + Tone Mapping Settings + Paramètres de tone mapping - + Add Files (Alt+L) Ajouter Fichiers (Alt+L) - + Alt+L - + Alt+L + + + + Add Directory (Alt+I) + Ajouter Dossier (Alt+I) + + + + Alt+I + Alt+l - + Add from Database (Alt+B) Ajouter à partir d'une base de donnée (Alt+B) - + Alt+B - + Alt+B - + Remove Settings (Alt+M) Retirer les réglages (Alt+M) - + Alt+M - + Alt+M + + + + Remove All Settings (Alt+W) + Effacer les réglages (Alt+W) + + + + Alt+W + Alt+W - + List of Tone Mapping Setting files that will be used to tone map each HDR Liste des fichiers de paramètres tone mapping qui seront utilisés pour tone mapper chaque HDR - + Output Sortie - + Output Image Width: - + Résolution des images destination: - + Output Folder: - Dossier de sortie: + Dossier destination: - - + + Specify output folder for the tone mapped files - Indiquer le répertoire de sortie pour les fichiers tone mappés + Indiquer le répertoire destination pour les fichiers tone mappés - + Selec&t... Sélec&tionner... - - + + Width of tonemapped image in percent of original image - + Résolution image tonemapped en pourcentage de l'original - + % - + % - + Output Format: - + Format destination: - + Image format of tonemapped images - + format des images tone mappées - + Image format options - + Option format image - + Conversion Log Journal de Conversion - + Batch operations report - Rapport du traitement groupée + Rapport des opérations par lot - + Show onl&y: - + Ne voir &que: - + Filter messages based on severity Trier les messages en fonction de la gravité - + All messages Tous les messages - + Errors only Seulement les erreurs - + Success messages Messages de réussite - + Filter &log messages: - + Fi&ltrer le journal: - + Clear filter text Effacer le filtre - + Overall completion progress Achèvement global - + &Cancel &Annuler - + Start batch tone mapping Lancer le tone mapping groupé - + &Start &Lancer - + Using %n thread(s) - + Utilise %n tâche(s).Utilise %n tâche(s). - - - + + + Choose a directory Choisir un dossier - + All HDR images Toutes les images HDR - + Select input images - Sélection des images à traiter + Sélection images à traiter - + Load tone mapping settings text files... Charger les fichiers de configuation pour le tone mapping... - + Luminance HDR tone mapping settings text file (*.txt) - + Réglage fichier texte (*.txt) pour tone mapping de Lum. HDR - + + Warning + Attention + + + + An error occurred reading one or more tonemapping options files. + Erreur dans la lecture d'un ou plusieurs fichiers d'options de tonemapping. + + + Processing... - En cours... + Traitement... - + Start processing... - Initier le processus... + Démarrage... - + Close Fermer - + &Done - &Fini + &Fermer - + + Conversion aborted by user request. + Conversion annulée par l'utilisateur. + + + All tasks completed. Toutes les tâches sont accomplies. - + Aborting... Abandon... @@ -673,27 +909,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Initie le processus %2 - + [T%1] Successfully load %2 [T%1] Chargé avec succès %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + [T%1] ERROR: Échec de tonemap sur fichier: %2 + + + [T%1] Successfully saved LDR file: %2 [T%1] Sauvegarde du LDR accomplie: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] ERREUR: Sauvegarde du fichier impossible: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] ERREUR: Le chargement de %2 a échoué @@ -701,573 +942,672 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Utilisation: %1 [OPTIONS]... [IMAGES D'ENTRÉE]... - + Display this help. - + Afficher l'aide. - + Display program version. - + Version du logiciel - + Print more messages during execution. - + Afficher plus de messages durant l'exécution. - + Print a list of all supported cameras. - + Afficher la liste des APN supportés - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + [AIS|MTB] Alignement utilisé lors de la création HDR (défaut= aucun). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + EV1,EV2,... Spécifie les valeurs d'EV (autant que d'INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + prefix Save à aligné les images des fichiers dont le nom débute avec un préfixe - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE charge un HDR au lieu d'en créer un nouveau. - + HDR_FILE Save to a HDR file format. (default: don't save) - + HDR_FILE Sauvegarde au format HDR (défaut= aucune) - + VALUE Gamma value to use during tone mapping. (default: 1) - + VALUE Gamma est la valeur à utiliser pour le tone mapping (défaut= 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + VALUE Valeur de saturation post tone mapping à utiliser. (défaut= 1) + + + + VALUE Gamma value to use after tone mapping. (default: 1) + VALUE Valeur de gamma post tone mapping à utiliser. (défaut= 1) + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + VALUE de résolution pour ajustement du HDR (fait avant le gamma et le tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + LDR_FILE est le nom de fichier pour sauver les tons mappés au LDR. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + THRESHOLD active l'anti-fantôme auto au seuil précisé (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Correction auto des niveaux après tone mapping - + Enable generation of a webpage with embedded HDR viewer. - + Génération d'une page web avec visu du HDR intégré - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + FILE_EXTENSION Sauve le fichier LDR sous la forme first-last_tmparameters.extension. + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + FILE_EXTENSION Sauve le fichier HDR sous la forme first-last_HdrCreationModel.extension. + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + Paramètres de création HDR - vous devez ouvrir un fichier HDR existant (via l'option -l) ou spécifier un INPUTFILE pour en créer un nouveau - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + Résolution = triangulaire|gaussien|seuil|plat (défaut= triangulaire) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + courbe de réponse = fichier|linéaire|gamma|log|sRVB (défaut= linéaire) - + model: robertson|robertsonauto|debevec (Default is debevec) - + modèle: robertson|robertsonauto|debevec (défaut= debevec) - + curve filename = your_file_here.m - + fichier courbe = votre_fichier_ici.m - + LDR output parameters - + Paramètres de sortie LDR - + VALUE Quality of the saved tone mapped file (1-100). - + VALUE qualité du fichier tone mapped sauvé (1-100) - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Format tiff. Valeurs possibles = [8b|16b|32b|logluv] (le défaut= 8b) - + Tiff deflate compression. true|false (Default is true) - + Compression tiff déflatée. vrai|faux (défaut= vrai) - + HTML output parameters - + Paramètres de sortie HTML - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + VALUE Qualité des exposition interpolées, de médiocre (1) à excellent (4). Une meilleure qualité limite la distorsions des tons clairs et sombre, mais génère plus d'images et donc plus de données à passer au navigateur web, donc un temps d'affichage rallongé. (défaut= 2, suffisant pour la plupart des applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Indique le nom de fichier de la page web à générer. Si <page_name> manque, le nom de fichier de la première image sera utilisée avec l'extension .html (fait par défaut). - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Indique où stocker les fichiers images. Les liens HTML aux images sont mis à jour en fonction. Le chemin d'accès doit être relatif et le répertoire exister. Utile pour éviter le bazar dans le répertoire courant (défaut=répertoire courant). - + Tone mapping parameters - no tonemapping is performed unless -o is specified - + Paramètres tonemapping - pas de tonemapping sauf si -o est spécifié - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) - + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) + Operateurs de tone mapping. Valeurs possibles: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (mantiuk06 par défaut) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + SETTING_FILE Charge un fichier du réglage pre-gamma et de tous les réglages TMO - + Fattal - + Fattal - + + alpha FLOAT - + alpha FLOAT - + beta FLOAT - + beta FLOAT - + color FLOAT - + couleur FLOAT - + noise FLOAT - + bruit FLOAT - + new true|false - + nouveau vrai|faux - + Ferradans - + Ferradans - + rho FLOAT - + FLOAT rho - + inv_alpha FLOAT - + FLOAT - - Mantiuk 06 - + + Ferwerda + Ferwerda - - contrast FLOAT - + + mul FLOAT + mul FLOAT - - saturation FLOAT - + + adapt_lum FLOAT + adapt_lum FLOAT - + + KimKautz + KimKautz + + + + c1 FLOAT + c1 FLOAT + + + + c2 FLOAT + c2 FLOAT + + + + Mantiuk 06 + Mantiuk 06 + + + + contrast FLOAT + contraste FLOAT + + + + saturation FLOAT + saturation FLOAT + + + detail FLOAT - + détail FLOAT - + equalization true|false - + égalisation vrai|faux - + Mantiuk 08 - + Mantiuk 08 - + color saturation FLOAT - + saturation des couleurs FLOAT - + contrast enhancement FLOAT - + amélioration contraste FLOAT - + luminance level FLOAT - + niveau luminance FLOAT - + enable luminance level true|false - + activation niveau luminance vrai|faux - + Durand - + Durand - + spatial kernel sigma FLOAT - + sigma kernel spatial FLOAT - + range kernel sigma FLOAT - + plage sigma kernel FLOAT - + base contrast FLOAT - + contraste de base FLOAT - + Drago - + Drago - + bias FLOAT - + biais FLOAT - + Reinhard 02 - + Reinhard 02 - + key value FLOAT - + valeur clé FLOAT - + phi FLOAT - + phi FLOAT - + use scales true|false - + Utiliser les échelles vrai|faux - + range FLOAT - + plage FLOAT - + lower scale FLOAT - + Échelle basse FLOAT - + upper scale FLOAT - + Échelle haute FLOAT - + Reinhard 05 - + Reinhard 05 - + Brightness FLOAT - + Luminosité FLOAT - + Chroma adaption FLOAT - + adapt. chromatique FLOAT - + Light adaption FLOAT - + adapt. lumière FLOAT - + Ashikmin - + Ashikmin - + Equation number 2 true|false - + Équation numéro 2 vrai|faux - + Simple true|false - + Simple vrai|faux - + Local threshold FLOAT - + Seuil local FLOAT - + Pattanaik - + Pattanaik - + multiplier FLOAT - + facteur FLOAT - + Local tone mapping true|false - + Tone mapping local vrai|faux - + Auto luminance true|false - + Luminance auto vrai|faux - + cone level FLOAT - + niveau cônes FLOAT - + rod level FLOAT - + niveau bâtonnets FLOAT - + + VanHateren + VanHateren + + + + pupil_area FLOAT + zone_pupillaire FLOAT + + + + Lischinski + Lischinski + + + Luminance HDR version - + Version Luminance HDR - + With LibRaw version - + version LibRaw - + models listed - + modèles listés + + + + + Error: Unsupported LDR file type. + Erreur: format LDR non supporté. - + + + Error: Unsupported HDR file type. + Erreur: format HDR non supporté. + + + Error: htmlQuality must be in the range [1..4]. - + ERROR: La qualité HTML doit être entre [1..4]. - + Error: Alignment engine not recognized. Erreur : Opérateur d'alignement non reconnu. - + Error: Unknown weight function specified. Erreur : la fonction de poids spécifiée est inconnue. - + Error: Unknown response curve specified. Erreur : la courbe de réponse spécifiée est inconnue. - + Error: Unknown HDR creation model specified. Erreur : le modèle de création HDR spécifié est inconnu. - + Error: Unknown tone mapping operator specified. Erreur : l'opérateur de tone mapping spécifié est inconnu. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: Le fichier spécifié avec réglages TMO est introuvable! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Le fichier spécifié avec réglages TMO est introuvable: %1 - + Error: Quality must be in the range [1..100]. - + Erreur: La qualité doit être entre [1..100]. - + Error: Unknown tiff format. - + Erreur: Format tiff inconnu. - + Error: Threshold must be in the range [0..1]. - + Erreur: Le seuil doit être entre [0..1]. - + Error: The number of EV values specified is different from the number of input files. - Erreur : le nombre de valeurs d'exposition est différent du nombre de fichiers en entrée. + Erreur : le nombre d'EV est différent du nombre de fichiers en entrée. - + Load file %1 failed Échec du chargement du fichier %1 - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Erreur: données Exif manquantes dans les images et valeurs EV non spécifiées en argument. - + EV values have been assigned. Les valeurs EV ont été renseignées. - - + + Starting aligning... - + Alignement... - + Failed executing align_image_stack Échec de l'opération align_image_stack - + Failed aligning images. Échec de l'alignement des images. - + Creating (in memory) the HDR. Création (en mémoire) du HDR. - + Saving to file %1. Enregistrer dans le fichier %1. - + Image %1 saved successfully Image %1 enregistrée avec succès - + Could not save %1 Échec de l'enregistrement de %1 - + NOT Saving HDR image to file. %1 NE PAS enregistrer l'image HDR dans le fichier %1 - + Exporting to HTML - + Export en HTML. - + ERROR: directory %1 must exist - + ERROR: répertoire %1 inexistant - + Tonemapping requested, saving to file %1. Tonemapping requis, enregistrement dans %1. - + Resizing to width %1. - + Ajuste la résolution à %1. - + Applying gamma %1. - + Application du gamma %1. + + + + +Applying saturation enhancement %1. + +Amélioration de la saturation %1. + + + + +Applying post-gamma %1. + +Appliquer le post-gamma %1. - + Image %1 successfully saved - + Image %1 sauvegardée avec succès - + ERROR: Cannot save to file: %1 - + +ERROR: Ne peut sauver sur fichier %1 - + Tonemapping NOT requested. - + Tonemapping NON requis. - - Failed loading images - Échec du chargement des images + + Failed loading images: %1 + Échec du chargement des images: %1 @@ -1275,7 +1615,7 @@ Choose action - + Choisir une action @@ -1310,7 +1650,7 @@ Cancel the drag and drop process and return to the main window - Annuler le Glisser/Déposer et retourner à la fenêtre principale + Annuler le Glisser/Déposer et revenir à la fenêtre principale @@ -1323,7 +1663,7 @@ <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> is open-source software and its development required hundreds of hours of work.</p><p>If you like it, you are using it in your HDR workflow and you would like to see it gradually improved, please support its authors by making a donation.</p><p>Would you like to make a donation for Luminance HDR now?</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> est un logiciel open source et son développement à demandé des centaines d'heures de travail.</p><p>Si vous l'aimez, si vous l'utilisez pour vos traitements HDR et vous souhaiteriez le voir régulièrement amélioré, merci de supporter les auteurs financièrement.</p><p>Voulez-vous dès maintenant faire une donation pour Luminance HDR?</p></body></html> @@ -1344,47 +1684,47 @@ EditingTools - + Maskable - + Masquable - + Good image - + Image correcte - + Add good image - + Ajout d'une image correcte - + Remove good image - + Ôter une image correcte - + Ed&itable Mod&ifiable - + R&eference Référ&ence - + Select the previous image in both lists Sélectionner l'image précédente dans chaque liste - + Select the next image in both lists - Sélectionner l'image suivante dans chaque liste + Sélection image suivante dans les deux listes - + Choose a directory and a prefix Choisir un dossier et un préfixe @@ -1420,8 +1760,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - L'image actuellement sélectionnée dans cette liste peut être bougée en utilisant les contrôles ci-dessous. +This image's histogram is displayed in the widget above. + L'image actuellement sélectionnée dans cette liste peut être déplacée avec les contrôles ci-dessous. L'histogramme de l'image est affiché dans le widget ci-dessus. @@ -1437,7 +1777,7 @@ Select the next image in both lists - Sélectionner l'image suivante dans chaque liste + Sélection image suivante dans les deux listes @@ -1447,7 +1787,7 @@ Referen&ce - + Référen&ce @@ -1468,7 +1808,7 @@ Crop the stack of images after a selection with the left mouse button has been made - Modifier la pile d'image après une sélection avec le bouton gauche de la souris + Recadre la pile d'images à la sélection faite par le bouton gauche de la souris @@ -1478,7 +1818,7 @@ &Crop All Images - &Couper toutes les images + &Recadrer images @@ -1488,12 +1828,12 @@ &Anti-Ghosting - + &Anti-fantôme &Save Images - Enregi&strer les images + &Sauver images @@ -1508,22 +1848,22 @@ Fit to window - Adapter à la Fenêtre + Ajuster à la Fenêtre &Fit to Window - Adapter à la &Fenêtre + &Ajuster à la fenêtre Fill the window - + Pleine fenêtre Fill &window - + Pleine &fenêtre @@ -1538,7 +1878,7 @@ &Mode: - + &Mode: @@ -1553,12 +1893,12 @@ Editable Only (E) - Modifiable Uniquement (E) + Édition uniquement (E) Pivot Only (P) - Pivoter uniquement (P) + Rotation uniquement (P) @@ -1568,47 +1908,47 @@ Brush - + Brosse Lasso - + Lasso Anti Ghosting - + Anti-fantôme O. Gallo and others - + O. Gallo et autres <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + <html><head/><body><p>Activation de l'algorithme auto anti-fantôme</p></body></html> Auto anti-ghosting - + Anti-fantôme auto Artifact-free HDR Imaging - + Imagerie HDR sans artefact Total Patches: - + Total rustines: <html><head/><body><p>Shows the amount of patches in percentage computed by the auto anti-ghosting algorithm</p></body></html> - + <html><head/><body><p>Affiche en pourcent le nombre de rustines calculées par l'algorithme anti-fantôme auto</p></body></html> @@ -1618,32 +1958,32 @@ <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly.</p></body></html> - + <html><head/><body><p>Seuil utilisé par l'algorithme anti-fantôme auto. Un seuil bas signifie un traitement plus aggressif mais peut diminuer la plage dynamique finale. Presser le bouton &quot;Recompute&quot; pour voir la couverture actuelle des rustines et ajuster le seuil en conséquence.</p></body></html> <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Seuil utilisé par l'algorithme auto d'anti-fantôme. Un seuil bas provoque un traitement aggressif mais qui peut limiter la plage dynamique finale. Utilier te bouton &quot;Recompute&quot; pour visualiser la couverture des corrections en cours et ajuster le seuil en fonction. <html><head/><body><p>Click here to recompute patches based on selected threshold</p></body></html> - + <html><head/><body><p>Cliquer ici pour recalculer les rustines sur la base du seuil choisi</p></body></html> Recompute - + Recalcul Mask - + Masque <html><head/><body><p>Add a mask using lasso or brush</p></body></html> - + <html><head/><body><p>Ajout d'un masque avec le lasso ou la brosse</p></body></html> @@ -1653,24 +1993,24 @@ <html><head/><body><p>Remove mask using lasso or brush</p></body></html> - + <html><head/><body><p>Suppression d'un masque avec le lasso ou la brosse</p></body></html> R&emove - + R&etirer <html><head/><body><p>Size of the brush</p></body></html> - + <html><head/><body><p>Taille de brosse</p></body></html> <html><head/><body><p>Strength of the mask (semi transparent)</p></body></html> - + <html><head/><body><p>Force du masque (semi transparent)</p></body></html> @@ -1687,17 +2027,17 @@ S&trength: - + F&orce: Lasso - Draw a free hand selection area - + Lasso - sélection d'une zone à main levée Brush - Paint the mask using the brush - + Brosse - Peindre le masque avec la brosse @@ -1749,47 +2089,47 @@ Shift values for editable image - Valeurs de déplacement pour l'image modifiable + Valeurs de décalage pour l'image à modifier Reset the shift values for the currently selected movable image - Réinitialiser les valeurs de déplacement pour l'image sélectionnée + RAZ des valeurs de décalage pour l'image à modifier &Reset - &Réinitialiser + &RAZ Reset the shift values for all the images - Réinitialiser les valeurs de déplacement pour toutes les images + RAZ des valeurs de décalage pour toutes les images Reset &All - Tout réiniti&aliser + R&AZ complet Hori&zontal: - + Hori&zontal: Vertica&l: - + Vertica&l: Insert an horizontal shift value for the currently selected movable image - Insérer une valeur de déplacement horizontal pour l'image sélectionnée + Insérer une valeur de décalage horizontal pour l'image sélectionnée Insert a vertical shift value for the currently selected movable image - Insérer une valeur de déplacement vertical pour l'image sélectionnée + Insérer une valeur de décalage vertical pour l'image sélectionnée @@ -1829,7 +2169,7 @@ Get information about the graphical elements - Avoir de l'information à propos des éléments graphiques + Plus d'informations sur les éléments graphiques @@ -1857,27 +2197,27 @@ Export HDR to HTML - + Export du HDR en HTML Export to HTML - + Export en HTML Web page: - + Page web: Output folder: - Dossier de sortie: + Dossier destination: Open web browser - + Ouvrir le navigateur @@ -1887,7 +2227,7 @@ % - + % @@ -1897,7 +2237,7 @@ Images folder: - + Dossier images: @@ -1912,23 +2252,23 @@ Export - + Export - + Choose a directory Choisir un dossier - - + + Error: Erreur: - + must be a directory. - + Doit être un répertoire. @@ -1936,22 +2276,22 @@ Import FITS files - + Import des fichiers FITS Setup files - + Réglage fichiers Select the different files for the channels. Optionally, they can be aligned. - + Choisir les différents fichier de canaux. Une option permet leur alignement. H-alpha (optional) - + H-alpha (option) @@ -1965,42 +2305,42 @@ Channel 1 (Red) - + Canal 1 (Rouge) Luminosity (optional) - + Luminosité (option) Channel 2 (Green) - + Canal 2 (Vert) Channel 3 (Blue) - + Canal 3 (Bleu) <html><head/><body><p>Rotate selected image 180°</p></body></html> - + <html><head/><body><p>Rotation de l'image choisie à 180°</p></body></html> Rotate - + Rotation Reset - + RAZ Load Previews - Charger les aperçus + Charger aperçus @@ -2017,7 +2357,7 @@ Preview - Prévisualisation + Aperçu @@ -2038,12 +2378,12 @@ &MTB - + &MTB Hugin's align_&image_stack - + align_image_stack de Hugin @@ -2053,7 +2393,7 @@ The alignment of the input files is in progress. Please be patient! - + Alignement des fichiers d'entrée en cours. Merci de patienter! @@ -2068,12 +2408,12 @@ Please fine-tune the color part of the channels. - + Régler finement la partie couleur des canaux svp. Blue - + Bleu @@ -2083,41 +2423,42 @@ Red - + Rouge - + Load one FITS image... - + Charger image FITS... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + Échec du chargement image FITS %1 +ERREUR: %2 - + FITS images have different size - + Les FITS sont de taille différente - + align_image_stack exited with exit code %1 - + align_image_stack fini avec code de sortie %1 - + align_image_stack failed with error - + échec d'align_image_stack avec erreurs GenericViewer - + Pan the image to a region - + Bouger l'image vers une région @@ -2125,48 +2466,61 @@ HdrCreationManager::loadFilesDone(): Error loading a file. - + HdrCreationManager::loadFilesDone(): Erreur de chargement de fichier. - + HdrCreationManager::loadFilesDone(): The images have different size. - + HdrCreationManager::loadFilesDone(): Images de tailles différentes. + + + + HdrPreview + + + HDR Preview + Aperçu HDR + + + + Close + Fermer HdrViewer - + &Mapping: &Mapping: - + Histogram: Histogramme : - + Linear Linéaire - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2190,8 +2544,8 @@ - &Currently Loaded Files - + Currently &Loaded Files + Fichiers Actue&llement chargés @@ -2211,7 +2565,7 @@ Preview - Prévisualisation + Aperçu @@ -2221,7 +2575,7 @@ EV: - + EV: @@ -2230,8 +2584,8 @@ - &MTB - + M&TB + M&TB @@ -2240,8 +2594,8 @@ - Hugin's align_&image_stack - + Hu&gin's align_image_stack + align_image_stack d'Hu&gin @@ -2251,7 +2605,7 @@ Anti-ghosting - + Anti-fantôme @@ -2261,32 +2615,32 @@ <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range.</p></body></html> - + <html><head/><body><p>Seuil utilisé par l'algorithme auto d'anti-fantôme. Un seuil bas provoque un traitement aggressif mais qui peut limiter la plage dynamique finale.</p></body></html> <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Seuil utilisé par l'algorithme auto d'anti-fantôme. Un seuil bas provoque un traitement aggressif mais qui peut limiter la plage dynamique finale. Utilier te bouton &quot;Recompute&quot; pour visualiser la couverture des corrections en cours et ajuster le seuil en fonction. Enable the auto anti-ghosting algorithm (by O. Gallo and others) - + Active l'algorithme anti-fantôme auto (par O. Gallo et autres) Auto anti-ghosting - + Anti-fantôme auto Enable this option for manual alignment or manual Anti-Ghosting. It's intended for users which a strong knowledge of the different HDR creation steps! - + Pour un alignement ou un anti-fantôme manuels, activez cette option. Cette dernière est destinée aux utilisateurs qui maîtrisent bien les étapes de création d'un HDR! Advanced Editing Tools - Outils d'édition avancés + Outils d'édition avancée @@ -2307,12 +2661,12 @@ [2/2] Choisir les paramètres pour la création du HDR - + Profile - + Profil - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2325,49 +2679,49 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Le premier profil de la liste produit généralement les meilleurs résultats. Changez donc seulement de profil si le HDR produit n'est pas satisfaisant.</span></p></body></html> - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results À utiliser uniquement si les résultats par défaut sont insatisfaisants - + Use Custom Configuration - + Utiliser une configuration personnalisée - + HDR Creation Model - + Modèle de création du HDR @@ -2377,17 +2731,17 @@ Robertson (Simple) - + Robertson (simple) Robertson (Response Recovery) - + Robertson (Response Recovery) Weighting Function - + Pondération @@ -2402,251 +2756,280 @@ Plateau - Plateau + Par palier Flat - + Plat Response Curve - + Courbe de réponse - + Linear Linéaire - + Gamma Gamma - + Log - Log + Journal - + sRGB - + sRVB - - Custom + + Custom (From File) - + Response Curve Input File + Fichier courbe de réponse en entrée + + + + Load Response - + Response Curve Output File - + Fichier courbe de réponse en sortie - + Save As... Enregistrer sous... - + Save Settings Enregistrer les paramètres - + + Show HDR + Voir le HDR + + + + Show HDR Preview + + + + + + Show Log + Voir le journal + + + &Next > &Suivant > - + &Cancel &Annuler - + Image Filename Nom du fichier Image - + Exposure Exposition - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Tous les formats(*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; Images TIFF (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Images RAW (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Selectionnez les images d'entrée - + Unknown Inconnu - + Loading... Chargement... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - + <font color="#FF0000"><h3><b>ATTENTION:</b></h3></font> Luminance HDR n'a pu trouver les bons<b>EXIF</b> tags pour les images suivantes:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + </ul><hr>Luminance HDR a placé ces valeurs pour vous, deux stops d'écart.<br> Si la supposition est correcte, vous pouvez créer le HDR, autrement vous devez <b>corriger</b> manuellement les valeurs différentielles d'exposition (stops). <hr>Pour ne plus avoir ce message, vous devez charger des images ayant au moins les données exif suivantes: <ul><li>Vitesse (en secondes)</li></ul><ul><li>Ouverturere (Nombre F)</li></ul><ul><li>Exposition Bias</li></ul><hr><b>NOTE:</b> La perte des EXIF survient souvent lors du pré-traitement des images.<br>Vous pouvez recopier les valeurs exif <b>d'une image vers l'autre</b> via le menu <b>Outils->Copie des données Exif...</b> - + + Do not show this message again + Ne plus montrer ce message + + + EXIF data not found - Données EXIF introuvables + Données Exif introuvables - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Images Chargées.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Pour continuer, vous devez renseigner les valeurs d'exposition.<br><font color="#FF0000">%1</font> valeurs toujours requises.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + <center><font color="#ffaa00"><h3><b>Vérifier l'exactitude des valeurs d'exposition avant validation.</h3></font></center> - + Loading Error: Erreur de chargement: - + Start loading a set of images with different exposure Initier le chargement d'un ensemble d'images à différentes expositions - - - + + + Error... Erreur... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Le lancement de l'application externe "<em>align_image_stack</em>" a échoué.<br>Veuillez lire "Aide -> Contenu... -> Outils Externes" pour plus d'informations. - + The external application "<em>align_image_stack</em>" crashed... L'application externe "<em>align_image_stack</em>" est tombée en panne... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Une erreur iconnue est survenue pendant l'exécution de "<em>align_image_stack</em>"... - + Now click on next button Appuyez sur Suivant - - Aligning... - Alignement en cours... + + Compute + Calcul - - - &Finish - &Terminer + + Finish + Finir - - Load camera response curve file + + Aligning... + Alignement en cours... + + + + &Compute - + + Load camera response curve file + Charger courbe de réponse de l'APN + + + Camera response curve (*.m);;All Files (*) - + Courbe de réponse APN (*.m);;Tous fichiers (*) - + Invalid Response Curve File - + Fichier de courbe de réponse invalide - + Invalid Response Curve File: please try a different file - + Fichier de courbe de réponse invalide : essayez un autre fichier - + Save a camera response curve file - + Sauver une courbe de réponse d'APN - + Camera response curve (*.m) - - - - - Weights: - Poids: + Courbe de réponse de l'APN (*.m) - - - Response curve: - - Courbe de réponse : + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Toutes les valeurs EV sont déterminées.<br>Appuyez sur Suivant.</b></h3></font></center> - - - Model: - - Modèle : + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Pour continuer, vous devez renseigner les valeurs d'exposition.<br><font color="#FF0000">%1</font> valeurs toujours requises.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Toutes les valeurs EV sont déterminées.<br>Appuyez sur Suivant.</b></h3></font></center> + + Hide Log + Masquer le journal @@ -2658,24 +3041,24 @@ - + &File &Fichier E&dit - + É&dition V&iew - + V&oir Boo&kmarks - + Si&gnets @@ -2684,7 +3067,7 @@ - + &Print... &Imprimer... @@ -2700,7 +3083,7 @@ - + &Find... &Chercher... @@ -2717,7 +3100,7 @@ F3 - + F3 @@ -2727,11 +3110,11 @@ Shift+F3 - + Shift+F3 - + &Add Bookmark &Ajouter Signet @@ -2743,58 +3126,58 @@ &Delete Bookmark - + &Supprime le signet - + D&elete All Effacer &Tout goHome - + MenuPal goBack - + Retour goFwd - + Avance zoomIn - + zoomAvant zoomOut - + Rapetisser zoomOriginal - + zoomOriginal &View Contents - + &Voir contenus Ctrl+C - + Ctrl+C View &Search - + Voir re&chercher @@ -2804,7 +3187,7 @@ View &Bookmarks - + Voir &signets @@ -2814,103 +3197,103 @@ P&rint Preview - + &Afficher aperçu - + Help SideBar Panneau d'Aide - + LuminanceHDR Online Help - Aide de Luminance HDR en ligne + Aide en ligne de Lumin. HDR - + &Edit &Modifier - + &View &Affichage - - + + &Bookmarks Si&gnets - + &Quit &Quitter - + Find &Next Chercher &Suivant - + Find &Previous Chercher &Précédent - + &Contents &Contenus - + &Search &Chercher - + &Delete &Effacer - + Find Chercher - + Search Term: Chercher: - + New Bookmark Nouveau Signet - + New Bookmark's Title: Titre du Nouveau Signet: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Désolé, le manuel n'est pas installé</p><p>Contactez le packager ou l'équipe de LuminanceHDR si vous compilez l'application vous-mêmes</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Documentation d'Aide - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Ce protocole n'est pas géré par le navigateur d'aide. -Désirez-vous ouvrir le lien avec l'application par défaut -associée à ce protocole? + Ce protocole n'est pas géré par l'aide du navigateur +Voulez-vous ouvrir le lien avec l'application associée +par défaut au protocole? @@ -2940,7 +3323,7 @@ 1 - + 1 @@ -2966,30 +3349,35 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: le fichier: %1 est illisible - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: l'extension %2 du fichier %1 non supportée - + IOWorker: caught exception reading %1: %2 - + IOWorker: lecture des exceptions capturées %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + IOWorker: échec de l'allocation mémoire %1: %2 + + + IOWorker: failed loading file: %1 - + IOWorker: impossible de charger: %1 ImageQualityDialog - + Unknown Inconnu @@ -3014,7 +3402,7 @@ File size: - + Taille du fichier: @@ -3040,11 +3428,11 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 - + image LDR [%1 x %2]: %3 @@ -3105,7 +3493,7 @@ &Reset - &Réinitialiser + &RAZ @@ -3122,7 +3510,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3139,12 +3527,12 @@ Luminance &HDR Online - + Luminance &HDR en ligne &Windows - &Fenêtres + Fenê&tres @@ -3164,7 +3552,7 @@ &Preview Panel - + &Ruban des aperçus @@ -3195,7 +3583,7 @@ Create a new HDR image from a set of LDR or Raw images - Générer un nouvel HDR à partir d'un ensemble d'images LDR ou RAW + Générer un nouvel HDR à partir d'un jeu d'images LDR ou RAW @@ -3275,19 +3663,19 @@ Rotate c&ounter-clockwise - Tourner dans le sens &anti-horaire + Rotation &anti-horaire Rotate counter-clockwise - Tourner dans le sens anti-horaire + Rotation anti-horaire Rotate counter-clockwise the HDR image - Tourner le HDR dans le sens anti-horaire + Rotation anti-horaire du HDR @@ -3297,19 +3685,19 @@ Rotat&e clockwise - + Rotati&on horaire Rotate clockwise - Tourner dans le sens horaire + Rotation horaire Rotate clockwise the HDR image - Tourner le HDR dans le sens horaire + Rotation horaire du HDR @@ -3319,7 +3707,7 @@ &Low Dynamic Range - + &Low Dynamic Range @@ -3329,12 +3717,12 @@ &Fit to Dynamic Range - + &Ajuste à la plage dynamique Fit to dynamic range - Adapter à la gamme dynamique + Ajuster à la gamme dynamique @@ -3344,7 +3732,7 @@ &Shrink Dynamic Range - + &Compresse la plage dynamique @@ -3354,7 +3742,7 @@ &Extend Dynamic Range - + &Etends la plage dynamique @@ -3364,7 +3752,7 @@ &Decrease Exposure - + &Diminue l'exposition @@ -3406,19 +3794,19 @@ &Normal Size - Taille &normale + &Taille réelle Normal size - Échelle normale + Taille réelle View HDR image at its normal size - Afficher le HDR à l'échelle normale + Afficher le HDR à 100% @@ -3445,14 +3833,14 @@ Zoom &Out - Zoom &- + &Rapetisser Zoom out - Rétrécir + Rapetisser @@ -3462,19 +3850,19 @@ &Fit in Window - Adapter à la &fenêtre + &Ajuster à la fenêtre Fit in Window - Adapter à la fenêtre + Ajuster à la fenêtre Make the HDR image fit its window - Adapter les dimensions du HDR à sa fenêtre + Ajuster l'image HDR à la fenêtre @@ -3528,19 +3916,19 @@ Copy &Exif Data... - Copier données &Exif... + Copie des données &Exif... Copy Exif Data - Copier données Exif + Copie des données Exif Copy Exif data between two sets of files - Copie des données Exif entre deux ensembles de fichiers + Copie des données Exif entre deux séries de fichiers @@ -3571,17 +3959,17 @@ &Icons Only - &Icônes Uniquement + &Icônes uniquement &Text Only - &Texte Uniquement + &Texte uniquement Text &Alongside Icons - Texte &à côté des Icones + Texte &à côté des icônes @@ -3639,19 +4027,19 @@ Ctrl+I - + Ctrl+I Save HDR image &preview... - Enregistrer la &prévisualisation du HDR... + Enregistrer l'a&perçu du HDR... Save the current HDR Preview to an LDR file - Enregistrer le HDR actuel en image LDR + Sauver l'aperçu HDR courant en image LDR @@ -3668,7 +4056,7 @@ Ctrl+J - + Ctrl+J @@ -3715,7 +4103,7 @@ Ctrl+Z - + Ctrl+Z @@ -3730,7 +4118,7 @@ &Lock Viewers - + Bloca&ge des aperçus @@ -3745,32 +4133,32 @@ S - + S &Minimize - + &Minimiser Ma&ximize - + Ma&ximiser &Bring All to Front - + &Tout mettre devant &Show Preview Panel - + &Afficher le ruban des aperçus Show/Hide Preview Panel - Montrer/Cacher le panneau de prévisualisation + Afficher/Cacher le ruban des aperçus @@ -3780,7 +4168,7 @@ Adjust &Levels - Ajuster les &Niveaux + Ajustement &Niveaux @@ -3792,7 +4180,7 @@ Tune the histogram for the current LDR - Accorder l'histogramme pour le LDR courant + Régler l'histogramme pour le LDR en cours @@ -3814,7 +4202,7 @@ &Remove Tab - + &Fermer l'onglet @@ -3824,22 +4212,22 @@ Fill &Window - + Pleine &fenêtre Fill window with the current viewer - Remplir fenêtre avec la visualisation courante + Visualisation courante en pleine fenêtre F - + F Batch &HDR... - + &HDR par lot... @@ -3849,7 +4237,7 @@ Soft Proofing - Épreuve sur écran + Épreuvage écran @@ -3859,32 +4247,32 @@ &Show on the right - + Afficher à &droite Show &on the bottom - + Afficher en &bas &Realtime Previews - + &Affichage en temps réel &Update - + &Actualise &FITS Importer... - + Importation &FITS Import four FITS files representing luminosity, red, green and blue channels - + Import fichiers FITS des canaux rouge, vert, bleu et de la luminosité @@ -3904,102 +4292,102 @@ E&xport to HTML - + E&xport en HTML Export to web page with embedded HDR viewer - + Export web avec visualiseur HDR intégré &Show Full Screen - + &Voir en plein écran F11 - + F11 Show &Image Full Screen - + Affiche l'&Image en plein écran F10 - + F10 &Supported RAW Cameras - + &Format APN RAW supportés Lists all cameras supported by the program - + Liste tous les APN supportés par le programme Ctrl+M - + Ctrl+M &Lanczos/Bilinear interpolation - + Interpolation &Lanczos/Bilinéaire <html><head/><body><p>Switch between Lanczos and Bilinear interpolation</p></body></html> - + <html><head/><body><p>Bascule entre Lanczos et l'interpolation Bilinéaire</p></body></html> Ctrl+K - + Ctrl+K &Online Documentation - - - - - &Developers Web Site - - - - - &Luminance HDR Web Site - + Documentation en &ligne Open Online Documentation Web Site with the System Browser - + Site web de la documentation libre et en ligne avec navigateur + + + + &Developers Web Site + &Développeurs et site web Developers Web Site - + Site web des développeurs Open Developers Web Site with the System Browser - + Site web libre des développeurs avec navigateur + + + + &Luminance HDR Web Site + Site web de &Luminance HDR Luminance HDR Web Site - + Site web de Luminance HDR Open Main Web Site with the System Browser - + Site web libre principal avec navigateur @@ -4007,93 +4395,94 @@ Prêt. Ouvrez un HDR existant ou créez-en un nouveau! - + All HDR formats Tous les formats HDR - + Load one or more HDR images... Charger un ou plusieurs HDR... - + Save files in Enregistrer les fichiers sous - - + + Failed to save %1 - + Échec à sauver %1 - + Done! - Fait! + Fini! - + Aborting... Abandon... - - - Untitled - Sans Titre - - - + Cropped Image Image Rognée - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Il semble que vous utilisez une version 32-bits de <strong>Luminance HDR</strong> sur un sytème 64 bits. <br>Téléchargez la version<strong>64-bit</strong> svp ici <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> pour profiter du meilleur de Luminance HDR! - + Unsaved changes... Changements non sauvegardés... - + This HDR image has unsaved changes.<br>Do you want to save it? Cette image HDR a subi des modifications.<br>Voulez-vous les sauvegarder? - + Fattal Warning - + Alerte Fattal - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + Cet opérateur tonemapping est fonction de la taille initiale de l'image. Son application sur l'image en pleine résolution produira certainement un résultat différent. + +Souhaitez-vous continuer? + + + + Untitled + Sans Titre - + Untitled %1 Sans Titre %1 - + Error: %1 Erreur: %1 - + Untitled HDR - + HDR sans titre - + FITS Image - + Image FITS @@ -4131,7 +4520,7 @@ Fast export - + Export rapide @@ -4141,7 +4530,7 @@ Default Previews Width - Largeur par défautpour la prévisualisation + Résolution par défaut des aperçus @@ -4151,7 +4540,7 @@ Always show Preview Panel - Toujours montrer un panneau de prévisualisation + Toujours afficher le ruban des aperçus @@ -4166,22 +4555,22 @@ Dark mode (beta) - + Mode dark (beta) Theme - + Thème Format - + Format Export directory - + Dossier d'export @@ -4341,7 +4730,7 @@ Color correction - + Colorimétrie @@ -4419,7 +4808,7 @@ Set here the green component to set magenta color cast removal level - Indiquer ici la composante de vert + Ajuster ici la composante verte pour régler le niveau de diminution du magenta @@ -4431,23 +4820,23 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Hautes lumières</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choisir ici la méthode d'écrêtage des hautes lumières:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blanc</span>: écrêter les hautes lumières en leur attribuant la couleur blanche</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Ne pas transformer</span>: transformer les hautes lumières en tons de rose</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Assemblage</span>: assembler les valeurs, écrêtées ou non, pour produire une progression graduelle vers le blanc</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Reconstruction</span>: reconstruire les hautes lumières à partir d'un seuil</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Hautes lumières</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Sélectionnez ici la méthode d'écrêtage des hautes lumières:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blanc</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: écrêter les hautes lumières en blanc</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Pas de transformation</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: ne pas écrêter les hautes lumières (tons de rose varié)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Assembler</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: assembler les valeurs, écrêtées ou non, en une progression graduelle vers le blanc</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruction</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruire les hautes lumières depuis un seuil</span></p></body></html> @@ -4562,7 +4951,17 @@ </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">When highlights appear pink, you need to lower the saturation level. The default saturation is usually correct.</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> + +p, li { white-space: pre-wrap; } + +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> + +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation</span></p> + +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Si les hautes lumières sont roses, il faut diminuer le niveau de saturation. En général la valeur par défaut est correcte.</span></p></body></html> @@ -4577,12 +4976,22 @@ </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation value</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Specify the specific saturation level. When highlights appear pink, you need to lower the saturation level.</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> + +p, li { white-space: pre-wrap; } + +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> + +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Saturation value</span></p> + +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Indiquez le niveau spécifique de saturation. Si les hautes lumières sont roses, il faut diminuer le niveau.</span></p></body></html> NR and CA Correction - Correction NR et CA + Bruit et Aberrations @@ -4735,28 +5144,28 @@ &OK - + Restart Redémarrer - + For the settings to take effect, please restart the application! Redémarrer l'application pour appliquer les paramètres! - - + + Choose a directory Choisir un dossier - + Open ICC Profile Ouvrir profil ICC - + Color profile (*.icc *.ICC *.icm *.ICM) Profil de couleur (*.icc *.ICC *.icm *.ICM) @@ -4826,7 +5235,7 @@ ° - + ° @@ -4836,7 +5245,7 @@ Oversample factor: - Facteur de sur-échantillonnage: + Sur-échantillonnage: @@ -4872,17 +5281,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ERREUR : Impossible de charger le fichier de configuration Tone Mapping : - + ERROR: File too old, cannot parse Tone Mapping Setting file: ERREUR : Fichier trop ancien, impossible d'analyser le fichier de configuration Tone Mapping : - + ERROR: cannot parse Tone Mapping Setting file: ERREUR : Impossible d'analyser le fichier de configuration Tone Mapping : @@ -4890,370 +5299,454 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + Qualité entre 1 (médiocre) et 5 (excellent). - + NULL frame passed. - + NULL trame passée. - + Adding image - + Ajout image - + to the web page - + vers la page web - - - + + + Writing: - + Ecriture: - - - - + + + + Warning Attention - + I cannot open monitor profile. Please select a different one. Impossible d'accéder au profil du moniteur. Veuillez en sélectionner un autre. - + I cannot open printer profile. Please select a different one. Ouverture du profil d'imprimante impossible. Sélectionner-en un autre. - + Please select a printer profile . SVP, sélectionner un profil d'imprimante. - + I cannot perform the color transform. Please select a different monitor profile. Transformation couleur impossible. Veuillez sélectionner un autre profil de moniteur. - - Triangular - Triangulaire - - - - Plateau - Plateau - - - - Gaussian - Gaussien - - - - Flat - - - - - Linear - Linéaire - - - - Gamma - Gamma - - - - Logarithmic - Logarithmique - - - - sRGB - - - - - From Calibration/Input File - - - - - Debevec - Debevec + + + + Weights= + Poids= - - Robertson - Robertson + + + + - Response curve= + - Courbe de réponse= - - Robertson Response Calculation - + + + + - Model= + - Modèle= - + PreGamma=%1 - + PreGamma=%1 - + Contrast Equalization Égalisation du contraste - + Contrast Contraste - - + + Saturation Saturation - + Detail Détail - + Luminance Level Niveau de luminance - + Luminance Level=Auto - + Niveau de Luminance=Auto - + Color Saturation - Saturation de couleur + Saturation des couleurs - + Contrast Enhancement - Amélioration de contraste + Contraste - + + Alpha Alpha - + Beta Bêta - + NoiseRedux - + RéducBruit - + FFTSolver - + SolveurFFT - + Rho - + Rho - + InvAlpha - + InvAlpha + + + + MaxLuminance + LuminanceMax + + + + AdaptationLuminance + AdaptationLuminance + + + + C1 + C1 - + + C2 + C2 + + + simple simple - + Equation 2 Équation 2 - + Equation 4 Eq. 4 - - + + Local - + Local - + Bias - Bais + Biais - + Spatial - + Spatial - - + + Range Étendue - + Base - + Base - + Multiplier Facteur - + AutoLuminance - + LuminanceAuto - + Cone - + Cône - + Rod - + Bâtonnets - + Key - + Touche - + Phi Phi - + Scales: - + Échelles: - + Lower - + Plus bas - + Upper - + Plus haut - + Brightness Luminosité - + Chromatic Adaptation Adaptation Chromatique - + Light Adaptation Adaptation de lumière - - Option -v -a... - Option -v -a... + + Pupil Area + Zone pupillaire - - LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + + PostSaturation=%1 + PostSaturation=%1 - - Cannot convert %1 to a float - Impossible de convertir %1 en nombre à virgule flottante + + PostGamma=%1 + PostGamma=%1 - - Loading TMO settings from file: %1 - + + + HDR Preview + Aperçu HDR - - Input file %1 - Fichier source %1 + + Debevec + Debevec - + + Robertson + Robertson + + + + Robertson Response Calculation + Robertson Response Calculation + + + + Triangular + Triangulaire + + + + Plateau + Par palier + + + + Gaussian + Gaussien + + + + Flat + Plat + + + + Linear + Linéaire + + + + Gamma + Gamma + + + + Logarithmic + Logarithmique + + + + sRGB + sRVB + + + + From Calibration or Input File + + + + + Option -v -a... + Option -v -a... + + + + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. + Luminance HDR requiert que aling_image_stack soit exécuté avec option "-v" et sans option "-a". La ligne de commande a été corrigée + + + + Cannot convert %1 to a float + Impossible de convertir %1 en nombre à virgule flottante + + + + Loading TMO settings from file: %1 + Chargement réglages TMO depuis: %1 + + + + Input file %1 + Fichier source %1 + + + Running in HDR-creation mode. Fonctionnement en mode création-HDR. - + Running in Load-HDR mode. Fonctionnement en mode chargement-HDR. - + Temporary directory: %1 Dossier temporaire: %1 - - Using %n threads. - + + Using %n thread(s). + Utilise %n tâche(s).Utilise %n tâche(s). - + Loading file %1 Chargement du fichier %1 - + Successfully loaded file %1. Fichier %1 chargé avec succès. + + The database used for saving TM parameters cannot be opened. +Error: %1 + La base de données des paramètres TM ne peut être ouverte. +Erreur: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + Cette version de Luminance HDR a été compilée sans inclure tous les algorithmes de dématriçage. +Les préférences pointent sur l'un de ces algorithmes manquants et doivent être changées vers une méthode AHD supportée. +Pour changer, aller dans Outils->Préférences->Conversion Raw->Qualité + + All LDR formats Tous les formats LDR - + Save the LDR image as... Enregistrer l'image LDR sous... + All HDR formats + Formats HDR + + + Save the HDR image as... Enregistrer le HDR sous... - + Save as... Enregistrer sous... @@ -5278,7 +5771,7 @@ &Reset - &Remise à zéro + &RAZ @@ -5298,7 +5791,7 @@ Result size - Dimensions finales + Taille cible @@ -5308,7 +5801,7 @@ Width: - Largeur : + Résolution: @@ -5324,202 +5817,20 @@ SavedParametersDialog - + Saved Parameters Paramètres sauvegardés - - + Comment Commentaire - + TM Operator Opérateur de TM - - - Simple - Simple - - - - Equation 2 - Équation 2 - - - - Local Contrast Threshold - Seuil de contraste local - - - - Bias - Bais - - - - Spatial Kernel Sigma - Sigma du Noyau Spatial - - - - Range Kernel Sigma - Sigma du Noyau d'étendue - - - - Base Contrast - Contraste de base - - - - Alpha - Alpha - - - - Beta - Bêta - - - - - Color Saturation - Saturation de couleur - - - - Noise Reduction - Réduction du bruit - - - - Old Fattal - Ancien Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Égalisation du contraste - - - - Contrast Factor - Facteur de contraste - - - - Saturation Factor - Facteur de saturation - - - - Detail Factor - Facteur de détail - - - - Contrast Enhancement - Amélioration de contraste - - - - Luminance Level - Niveau de luminance - - - - Manual Luminance Level - Niveau de luminance manuel - - - - Cone and Rod based on Luminance - Cône et bâtonnets basés sur la luminance - - - - Local Tonemapping - Tonemapping local - - - - Cone Level - Quantité de cônes - - - - Rod Level - Quantité de bâtonnets - - - - Multiplier - Facteur - - - - Use Scales - Utiliser des échelles - - - - Key Value - Valeur clé - - - - Phi Value - Valeur Phi - - - - Range - Étendue - - - - Lower Scale - Échelle la plus basse - - - - Upper Scale - Échelle la plus haute - - - - Brightness - Luminosité - - - - Chromatic Adaptation - Adaptation Chromatique - - - - Light Adaptation - Adaptation de lumière - - - - Pre-gamma - Précorrection gamma - SavingParameters @@ -5539,43 +5850,43 @@ List of supported cameras - + Listes des APN supportés TextLabel - + Étiquette <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> With LibRaw version - + Version avec LibRaw models listed - + modèles listés search... - + recherche... OK - + OK TMOProgressIndicator - + Abort computation Interrompre les calculs @@ -5585,7 +5896,7 @@ Frame - + Cadre @@ -5598,540 +5909,614 @@ Save as ...TIFF - Enregistrer en ... TIF + Enregistrer en ...TIF TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Ici vous pouvez charger et enregistrer un fichier de paramètres tone mapping.<br>Vous pouvez aussi appliquer le contenu du fichier chargé. + + Tonemap + Tonemapper - - Tone Mapping Settings - Paramètres de tone mapping + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - Enregistrer les paramètres actuels dans un fichier texte + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - Enregistrer les paramètres actuels (gamma et opérateur) dans un fichier texte. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - Charger un fichier texte contenant les paramètres pregamma et tonemapping + + Ferradans + Ferradans - - Load an existing text file containing pregamma and TMO settings. - Charger un fichier texte contenant les paramètres gamma et opérateur. + + Drago + Drago - - Save current parameters - Enregistrer les paramètres courants + + Durand + Durand - - Load saved parameters - Charger des paramètres enregistrés + + Reinhard '02 + Reinhard '02 - - Export - + + Reinhard '05 + Reinhard '05 - - Fast export - + + Ashikhmin + Ashikhmin - - Opens the current export direcotory. This can be changed in the preferences! - + + Pattanaik + Pattanaik - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + + Mai + Mai - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Ici vous pouvez appliquer une correction gamma sur le HDR.<br>La correction sera appliquée avant le tone mapping. + + Ferwerda + Ferwerda - - Process - Traiter + + KimKautz + KimKautz - - Result Si&ze - + + VanHateren + VanHateren + + + + Lischinski + Lischinski + + + + Operator + Opérateur + + + + &Contrast Factor + &Contraste + + + + Contrast Equalization + Égalisation du contraste + + + + &Detail Factor + Niveau de &Détail - - Gamma applied before tonemapping - Correction gamma appliquée avant le tonemapping + Saturat&ion Factor + &Saturation - - Pre-&gamma - + + Lcd Office + LCD pour Bureau - - Restore pregamma's default value (1) - Restaurer le gamma par défaut (1) + + Lcd + LCD - - Size of the resulting LDR image - Dimensions du HDR final + + Lcd Bright + LCD Lumineux - - Here you can choose the size of the resulting LDR image. - Ici vous pouvez choisir la taille du LDR final. + + CRT + Cathodique - - Set Custom Output Size - Fixer dimensions de sortie personnalisées + + Co&lor Saturation + Saturation des Cou&leurs - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - En cliquant sur ce bouton, vous pourrez insérer une valeur de <i>largeur</i> pour l'image LDR finale.<br>Après avoir pressé la touche Entrée, la hauteur sera calculée et la nouvelle taille ajoutée à la liste. + + Co&ntrast Enhancement + Amélioration du Co&ntraste - - Start tonemapping (CTRL+T) - Initier le tonemapping (CTRL+T) + + Enable +Luminace Level + Activer le +Niveau de luminance - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Utiliser les paramètres ci-dessus (gamma et opérateur de tonemapping) pour générer l'image LDR + + Lum&inance Level + Niveau de Lum&inance - - &Update preview - + + Predefined &Display + Affichage pré&défini - - Ctrl+T - Ctrl+T + + A&lpha + A&lpha - - Update current LDR - Mettre à jour le LDR courant + + Bet&a + Bet&a - - Auto Levels - + + Color Saturat&ion + Saturat&ion des couleurs - - <html><head/><body><p>set auto levels threshold</p></body></html> - + + &Noise Reduction + Réductio&n du bruit - - Tonemap - Tonemapper + + Version 2.3.0 + Version 2.3.0 - - Mantiuk '06 - Mantiuk '06 + + &Inverse Alpha + Alpha &Inverse - - Mantiuk '08 - Mantiuk '08 + + Rho + Rho - - Fattal - Fattal + + B&ias + B&ias - - Ferradans - + + Spatial &Kernel Sigma + Espace &Noyau Sigma - - Drago - Drago + + Base Co&ntrast + Co&ntraste de base - - Durand - Durand + + Range Kerne&l Sigma + Plage No&yau Sigma - - Reinhard '02 - Reinhard '02 + + Ph&i + Ph&i - - Reinhard '05 - Reinhard '05 + + &Key Value + Valeur &Clé - - Ashikhmin - Ashikhmin + + &Lower Scale + Éche&lle basse - - Pattanaik - Pattanaik + + Upper S&cale + É&chelle haute - - Mai - + + Use Scales + Utiliser des échelles - - Operator - Opérateur + + Ra&nge + &Plage - - Contrast Factor - Facteur de contraste + + &Light Adaptation + Adapter la &Lumière - - Saturation Factor - Facteur de saturation + + Chromatic A&daptation + Adaptation Chromatique - - Detail Factor - Facteur de détail + + Br&ightness + Lum&inosité - - Contrast Equalization - Égalisation du contraste + + Local Contrast Threshol&d + Seuil &de contraste local - - Predefined Display - Écran prédéfini + + Simple + Simple - - Lcd Office - Cristaux liq. de bureau + + Equation &Number + &Numéro d'équation - - Lcd - Cristaux liquides + + Eqn &2 + Eqn &2 - - Lcd Bright - Cristaux liq. lumineux + + Eqn &4 + Eqn &4 - - CRT - Cathodique + + Local Tone Mapping + Tone Mapping local - - - Color Saturation - Saturation de couleur + + Mu&ltiplier + Mu&ltiplicateur - - Contrast Enhancement - Amélioration de contraste + + Auto Cone/Rod + Auto cône/Bâtonnets - - Enable -Luminace Level - Activer -Niveau de luminance + + Co&ne Level + Niveau de Cô&ne - - Luminance Level - Niveau de luminance + + Ro&d Level + Niveau de Ro&d - - Alpha - Alpha + + This operator has no options + Pas d'option pour cet opérateur - - Beta - Bêta + + &Multiplier + &Multiplicateur - - Noise Reduction - Réduction du bruit + + A&daptation Luminance + A&dapter la Luminance - - Version 2.3.0 - Version 2.3.0 + + &C1 + &C1 - - Inverse Alpha - + + C&2 + C&2 - - Rho - + + Pup&il Area + Zone pupillaire - - Bias - Bais + + a&lpha mul + Mul a&lpha - - Spatial Kernel Sigma - Spatial Kernel Sigma + + Restore operator's default values + Restaurer les valeurs défaut de l'opérateur - - Range Kernel Sigma - Range Kernel Sigma + + Restore + Restaurer - - Base Contrast - Contraste de base + + Previous applied settings + Paramètres utilisés précédemment - - Key Value - Valeur clé + + Previous + Précédent - - Phi - Phi + + Next applied settings + Derniers paramètres utilisés - - Use Scales - Utiliser des échelles + + Next + Suivant - - Range - Étendue + + Start tonemapping (CTRL+T) + Initier le tonemapping (CTRL+T) - - Lower Scale - Échelle la plus basse + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Utiliser les paramètres ci-dessus (gamma et opérateur tonemapping) pour générer l'image LDR - - Upper Scale - Échelle la plus haute + + &Update preview + &Actualiser l'aperçu - - Brightness - Luminosité + + Ctrl+T + Ctrl+T - - Chromatic Adaptation - Adaptation Chromatique + + Update current LDR + Actualise le LDR courant - - Light Adaptation - Adaptation de lumière + + Auto Levels + Niveaux auto - - Local Contrast Threshold - Seuil de contraste local + + <html><head/><body><p>set auto levels threshold</p></body></html> + <html><head/><body><p>réglage seuil des niveaux auto</p></body></html> - - Simple - Simple + + Processing + Traitement - - Equation Number - Numéro d'équation + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Ici vous pouvez appliquer une correction gamma sur le HDR.<br>La correction sera appliquée avant le tone mapping. - - Eqn &2 - + + Res&ult Size + Taille Rés&ultante - - Eqn &4 - + + Set Custom Output Size + Personnaliser les dimensions de sortie - - Multiplier - Facteur + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + En cliquant sur ce bouton, vous pourrez insérer une <i>résolution</i> pour l'image LDR finale.<br>Après avoir validé, la hauteur sera automatiquement calculée et la nouvelle taille ajoutée à la liste. - - Local Tone Mapping - Tone Mapping local + + + Gamma applied before tonemapping + Correction gamma appliquée avant le tonemapping - - Auto Cone/Rod - Auto Cône/Bâtonnets + + Pre-&gamma + Pre-&gamma - - Cone Level - Quantité de cônes + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + <html><head/><body><p>Rétablit les valeurs défaut du postgamma (1)</p></body></html> - - Rod Level - Quantité de bâtonnets + + Pos&t-saturation + Pos&t-saturation - - This operator has no options - + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + <html><head/><body><p>Rétablit les valeurs défaut de la post-saturation (1)</p></body></html> - - Restore operator's default values - Restaurer les valeurs par défaut de l'opérateur + + Post-gamma + Post-gamma - - Restore - Restaurer + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + <html><head/><body><p>Rétablit les valeurs défaut du postgamma (1)</p></body></html> - - Previous applied settings - Paramètres utilisés précédemment + + ... + ... - - Previous - Précédent + + Settings + Réglages - - Next applied settings - Derniers paramètres utilisés + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Ici vous pouvez charger et enregistrer un fichier de paramètres tone mapping.<br>Vous pouvez aussi appliquer le contenu du fichier chargé. - - Next - Suivant + + Tone Mapping Settings + Paramètres de tone mapping + + + + Save current parameters to a text file + Enregistrer les paramètres actuels dans un fichier texte + + + + Save current parameters (pregamma and TMO) to a text file. + Enregistrer les paramètres actuels (gamma et opérateur) dans un fichier texte. + + + + Load an existing text file containing pregamma and TMO settings + Charger un fichier texte contenant les paramètres pregamma et tonemapping + + + + Load an existing text file containing pregamma and TMO settings. + Charger un fichier texte contenant les paramètres gamma et opérateur. + + + + Load saved parameters + Charger des paramètres enregistrés + + + + Save current parameters + Enregistrer les paramètres courants + + + + Export + Export + + + + Fast export + Export rapide + + + + Opens the current export directory. This can be changed in the preferences! + Ouvre le répertoire d'export courant. Destination modifiable dans les préférences ! + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Ouvrir</span></a></p></body></html> - + Queue size: %1 - + Queue(s): %1 - + TM Database Problem - Problème de base de données de TM + Problème base de données TM - + The database used for saving TM parameters cannot be opened. Error: %1 - La base de données de paramètres de TM ne peut être ouverte. + La base de données des paramètres TM ne peut être ouverte. Erreur: %1 - + Load a tonemapping settings text file... - Charger un fichier texte de paramètres tonemapping... + Charger fichier texte de paramètres tonemapping... - - + + LuminanceHDR tonemapping settings text file (*.txt) - Fichier texte de paramètre tonemapping de LuminanceHDR + Fichier texte paramètres tonemapping de Lum. HDR - - - - + + + + Aborting... Abandon... - + File is not readable (check existence, permissions,...) - Fichier illisible (vérifier son existance, permissions,...) + Fichier illisible (vérifier son existence, permissions,...) - + Save tonemapping settings text file to... Enregistrer le fichier texte des paramètres tonemapping vers... - + File is not writable (check permissions, path...) Fichier non inscriptible (vérifier les permissions, le chemin...) - + File is not readable (check permissions, path...) Fichier illisible (vérifier les permissions, le chemin...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Erreur: le format du fichier de paramètres de tonemapping a changé. Cet (ancien) format ne peut être utilisé avec les versions récentes de LuminanceHDR. Créez-en un nouveau. - + Custom LDR size - Nouvelle taille du LDR + Taille personnalisée du LDR - + Enter the width of the new size: - Indiquer la nouvelle largeur: + Saisir la nouvelle résolution: @@ -6187,7 +6572,7 @@ Copy Exif data - Copier données Exif + Copie des données Exif @@ -6216,7 +6601,7 @@ Move down selected file(s) - Abaisser le(s) fichier(s) sélectionné(s) + Descendre le(s) fichier(s) sélectionné(s) @@ -6236,7 +6621,7 @@ Show onl&y: - + Ne voir &que: @@ -6256,7 +6641,7 @@ Filter &log messages: - + Fi&ltrer le journal: @@ -6279,59 +6664,59 @@ &Lancer - - + + All Supported formats Tous les formats supportés - - + + Select the input images Selectionnez les images d'entrée - + &Done - &Fait + &Fini UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags Document de licence %1 introuvable, vous pouvez le trouver en ligne : %2ici%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Journal %1 des changements non trouvé, disponible en ligne: %2ici%3 - + Donation Don - + Would you like to donate? Voulez-vous effectuer un don? - + Yes, I'd love to! Oui, avec plaisir! - + Stop Bothering Me Ne m'embêtez plus avec ça - + Remind me later Rappeler-le moi plus tard @@ -6339,20 +6724,20 @@ UpdateChecker - + A new release is ready for download! Une nouvelle version est disponible au téléchargement! - - + + Do you want to open the webpage for download now? - + Ouvrir la page web et commencer le téléchargement ? - + Click to download, or select Help->Update! - Appuyez pour télécharger, ou sélectionnez Aide->Mettre à jour! + Cliquer pour télécharger, ou choisir Aide->Mettre à jour! \ No newline at end of file diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_hu.ts luminance-hdr-2.6.0/i18n/lang_hu.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_hu.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_hu.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors &Szerzők - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Köszönet - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &Engedély - + &OK &OK @@ -123,270 +174,320 @@ Eredmény - + Choose an HDR output file format - - Predefined profile: - - - - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Súlyok: + + + + Predefined profile: + + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Háromszögelő + + + + Linear + Egyenes arányú + + + Alignment Igazítás - - Auto align the bracketed pictures + + Use Hugin's align_image_stack engine - - Auto-align images + + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine - + &MTB - - Use Hugin's align_image_stack engine + + Auto align the bracketed pictures - - Hugin's align_&image_stack + + Auto-align images - + Auto-crop - + &Cancel Mé&gsem - + &Start - + &Close Ki&lépés - + Progress - + Input/Output - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... - + Loading files... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... Igazítás... - + Creating HDR... - + Doing auto anti-ghosting... - + Written - + Error: - + Aborting... Megszakítás... @@ -409,261 +510,302 @@ Feldolgozandó HDR képek listája - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R - - Add Files (Alt+F) + + Remove All Files (Alt+X) - - Alt+F + + + ... - - Remove Files (Alt+R) + + Alt+X - - Alt+R + + Add Files (Alt+F) - - Tone Mapping Settings + + Alt+F - Add Directory (Alt+I) + Add Directory (Alt+D) - Alt+I + Alt+D + + + + + Tone Mapping Settings - + Add Files (Alt+L) - + Alt+L - + + Add Directory (Alt+I) + + + + + Alt+I + + + + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR A felhasználandó árnyalatnövelési jellemző fájlok listája - + Output Eredmény - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files Adja meg az eredmények mappáját - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log - + Batch operations report A köteges árnyalatnövelés jelentése - + Show onl&y: - + Filter messages based on severity Üzeneteket fontosság szerint szűrni - + All messages minden üzenet - + Errors only csak hibaüzenetek - + Success messages sikerüzenetek - + Filter &log messages: - + Clear filter text Meghatározót törölni - + Overall completion progress Haladás - + &Cancel Mé&gsem - + Start batch tone mapping Köteges árnyalatnövelést elindítani - + &Start - + Using %n thread(s) - - - + + + Choose a directory Válasszon egy mappát - + All HDR images - + Select input images - + Load tone mapping settings text files... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Feldolgozás... - + Start processing... - + Close - + &Done &Kész - + + Conversion aborted by user request. + + + + All tasks completed. Minden feladat elvágezve. - + Aborting... Megszakítás... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -699,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Használat: %1 [lehetőségek]... [bemeneti fájl]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Hiba: Ismeretlen igazítómű. - + Error: Unknown weight function specified. Hiba: Ismeretlen súlyfüggvény. - + Error: Unknown response curve specified. Hiba: Ismeretlen válaszgörbe. - + Error: Unknown HDR creation model specified. Hiba: Ismeretlen HDR előállítási típus. - + Error: Unknown tone mapping operator specified. Hiba: Ismeretlen árnyalatnövelési művelet. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Hiba: A megvilágítási értékek száma különbözik a feldolgozandó képek számától. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Hiba: Az EXIF adatok hiányoznak a képekből és nincs megadva megvilágítási érték a parancssorban, ezért megszakítva. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack Nem sikerült elvégezni hugin align_image_stack-jét - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable &Szerkeszthető - + R&eference Mo&zdulatlan - + Select the previous image in both lists Válassza ki az előző képet mind a két listán - + Select the next image in both lists Válassza ki a következő képet mind a két listán - + Choose a directory and a prefix Válasszon egy mappát és egy kezdetet @@ -1418,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - A itt kijelölt képet a lenti gombokkal el lehet mozdítani felfelé, lefelé, balra és jobbra. -Ennek a képnek a fenti ablakocskában lehet látni a hisztogrammját. +This image's histogram is displayed in the widget above. + @@ -1913,18 +2152,18 @@ - + Choose a directory Válasszon egy mappát - - + + Error: - + must be a directory. @@ -2084,28 +2323,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2113,7 +2352,7 @@ GenericViewer - + Pan the image to a region @@ -2126,45 +2365,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + + + + HdrViewer - + &Mapping: - + Histogram: Hisztogramm: - + Linear Egyenes arányú - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2188,7 +2440,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2228,7 +2480,7 @@ - &MTB + M&TB @@ -2238,7 +2490,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2301,12 +2553,12 @@ - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2315,47 +2567,47 @@ - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results - + Use Custom Configuration - + HDR Creation Model @@ -2405,237 +2657,266 @@ - + Linear Egyenes arányú - + Gamma Gammabeállítás - + Log Logaritmikus - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... Mentés másként... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Előre > - + &Cancel Mé&gsem - + Image Filename Képfájl neve - + Exposure Megvilágítás - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Feldolgozandó képek kiválasztása - + Unknown - + Loading... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found Nincsenek EXIF adatok - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Betöltött képek.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>A továbbiakhoz kézzel meg kell adni a megvilágítási értékeket.<br>Ebből kell még <font color="#FF0000">%1</font> darab.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: - + Start loading a set of images with different exposure - - - + + + Error... Hiba... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... Az "align_image_stack" külső folyamat bedöglött... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Ismeretlen hiba történt a "<em>align_image_stack</em>" folyamatban... - + Now click on next button - + + Compute + + + + + Finish + + + + Aligning... Igazítás... - - - &Finish - &Befejezés + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - Súlyok: - - - - - Response curve: - - Válaszgörbe: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + - - - Model: - - Típus: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>A továbbiakhoz kézzel meg kell adni a megvilágítási értékeket.<br>Ebből kell még <font color="#FF0000">%1</font> darab.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + + Hide Log @@ -2648,7 +2929,7 @@ - + &File &Fájl @@ -2674,7 +2955,7 @@ - + &Print... @@ -2690,7 +2971,7 @@ - + &Find... @@ -2721,7 +3002,7 @@ - + &Add Bookmark @@ -2737,7 +3018,7 @@ - + D&elete All @@ -2807,96 +3088,96 @@ - + Help SideBar - + LuminanceHDR Online Help - + &Edit - + &View &Nézet - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Delete - + Find - + Search Term: - + New Bookmark - + New Bookmark's Title: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show - + LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? @@ -2954,22 +3235,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2977,7 +3263,7 @@ ImageQualityDialog - + Unknown @@ -3028,9 +3314,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3110,7 +3396,7 @@ MainWindow - + Luminance HDR @@ -3955,18 +4241,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3980,6 +4261,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3995,91 +4281,90 @@ - + All HDR formats - + Load one or more HDR images... - + Save files in Képeket menteni itt - - + + Failed to save %1 - + Done! - + Aborting... Megszakítás... - - - Untitled - Névtelen - - - + Cropped Image - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Fennálló változtatások... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + Névtelen + + + Untitled %1 - + Error: %1 - + Untitled HDR - + FITS Image @@ -4380,13 +4665,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4626,28 +4911,28 @@ &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Válasszon egy mappát - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4763,17 +5048,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: HIBA: Árnyalatnövelési beállításokat tartalmazó fájl nem tölthető: - + ERROR: File too old, cannot parse Tone Mapping Setting file: HIBA: Túl régi fájl; árnyalatnövelési beállítások nem értelmezhetőek: - + ERROR: cannot parse Tone Mapping Setting file: HIBA: Árnyalatnövelési beállítások nem értelmezhetőek: @@ -4781,370 +5066,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Háromszögelő - - - - Plateau - Fennsík - - - - Gaussian - Gauß - - - - Flat - - - - - Linear - Egyenes arányú - - - - Gamma - Gammabeállítás - - - - Logarithmic - Logaritmikus - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Kontraszt kiegyenlítés - + Contrast - - + + Saturation - + Detail - + Luminance Level - + Luminance Level=Auto - + Color Saturation Színtelítettség - + Contrast Enhancement - + + Alpha Alfa - + Beta Béta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias Eltolás (bias) - + Spatial - - + + Range Tartomány - + Base - + Multiplier Szorzó - + AutoLuminance - + Cone - + Rod - + Key - + Phi Fi - + Scales: - + Lower - + Upper - + Brightness Fényesség - + Chromatic Adaptation Színmódosítás - + Light Adaptation Fénymódosítás - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Háromszögelő + + + + Plateau + Fennsík + + + + Gaussian + Gauß + + + + Flat + + + + + Linear + Egyenes arányú + + + + Gamma + Gammabeállítás + + + + Logarithmic + Logaritmikus + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float Nem lehet %1-t floattá változtatni - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats - + Save the LDR image as... + All HDR formats + + + + Save the HDR image as... - + Save as... Mentés másként... @@ -5215,810 +5581,702 @@ SavedParametersDialog - + Saved Parameters - - + Comment - + TM Operator + + + SavingParameters - - Simple - Egyszerű + + Saving Parameters + - - Equation 2 + + Enter a short comment for the saved parameters: + + + SupportedCamerasDialog - - Local Contrast Threshold - Heli kontraszt küszöb + + List of supported cameras + - - Bias - Eltolás (bias) + + TextLabel + - - Spatial Kernel Sigma - Térbeli szigma mag + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + - - Range Kernel Sigma - Tartományi szigma mag + + With LibRaw version + - - Base Contrast - Alapkontraszt + + models listed + - - Alpha - Alfa + + search... + - - Beta - Béta - - - - - Color Saturation - Színtelítettség - - - - Noise Reduction - Zajcsökkentés - - - - Old Fattal + + OK + + + TMOProgressIndicator - - Rho + + Abort computation + + + ThresholdWidget - - InvAlpha + + Frame - - Contrast Equalization - Kontraszt kiegyenlítés - - - - Contrast Factor - Kontraszt tényező - - - - Saturation Factor - Telítettségi tényező - - - - Detail Factor - Részlettényező - - - - Contrast Enhancement + + Threshold + + + TiffModeDialog - - Luminance Level + + Save as ...TIFF + + + TonemappingPanel - - Manual Luminance Level + + Tonemap - - Cone and Rod based on Luminance - Fényességen alapuló kúp és rúd - - - - Local Tonemapping + + Mantiuk '06 - - Cone Level - Kúp szintje - - - - Rod Level - Rúd szintje - - - - Multiplier - Szorzó - - - - Use Scales - Fokozatokat használni + + Mantiuk '08 + - - Key Value - Kulcsérték + + Fattal + Fattal - - Phi Value + + Ferradans - - Range - Tartomány + + Drago + Drago - - Lower Scale - Alsó fokozat + + Durand + Durand - - Upper Scale - Felső fokozat + + Reinhard '02 + Reinhard '02 - - Brightness - Fényesség + + Reinhard '05 + Reinhard '05 - - Chromatic Adaptation - Színmódosítás + + Ashikhmin + Ashikhmin - - Light Adaptation - Fénymódosítás + + Pattanaik + Pattanaik - - Pre-gamma + + Mai - - - SavingParameters - - Saving Parameters + + Ferwerda - - Enter a short comment for the saved parameters: + + KimKautz - - - SupportedCamerasDialog - - List of supported cameras + + VanHateren - - TextLabel + + Lischinski - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + + Operator - - With LibRaw version + + &Contrast Factor - - models listed - + + Contrast Equalization + Kontraszt kiegyenlítés - - search... + + &Detail Factor - - OK + + Saturat&ion Factor - - - TMOProgressIndicator - - Abort computation + + Lcd Office - - - ThresholdWidget - - Frame + + Lcd - - Threshold + + Lcd Bright - - - TiffModeDialog - - Save as ...TIFF + + CRT - - - TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Itt lehet az árnyalatnövelési jellemzőket megnyitni vagy menteni.<br>A jelenlegi beállításokat is itt lehet alkalmazni. - - - - Tone Mapping Settings + + Co&lor Saturation - - Save current parameters to a text file - Beállításokat szövegfájlba menteni - - - - Save current parameters (pregamma and TMO) to a text file. - Jelenlegi beállításokat (gamma előtti és átnyalatnövelési műveletek) szövegfájlba menteni. - - - - Load an existing text file containing pregamma and TMO settings - Meglévő gammakorrektúra előtti és árnyalatnövelési beállitások megnyitása - - - - Load an existing text file containing pregamma and TMO settings. - Gamma előtti és átnyalatnövelési műveletek beállítását tartalmazó fájlt megnyitni. - - - - Save current parameters + + Co&ntrast Enhancement - - Load saved parameters + + Enable +Luminace Level - - Export + + Lum&inance Level - - Fast export + + Predefined &Display - - Opens the current export direcotory. This can be changed in the preferences! + + A&lpha - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Bet&a - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Itt lehet elvégezni a HDR kép gammakorrektúráját.<br>A gammakorrektúra az árnyalatnövelés előtt lesz alkalmazva. - - - - Process - Feldolgozás - - - - Result Si&ze + + Color Saturat&ion - - - Gamma applied before tonemapping + + &Noise Reduction - - Pre-&gamma + + Version 2.3.0 - - Restore pregamma's default value (1) - Visszaállítani a gammakorektúra előtti alapértelmezést (1) - - - - Size of the resulting LDR image + + &Inverse Alpha - - Here you can choose the size of the resulting LDR image. - Itt lehet beállítani az LDR kép méretét. - - - - Set Custom Output Size + + Rho - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Ezzel a gombbal meg lehet adni egy <i>szélességi</i> értéket az LDR eredmény részére.<br>Az "enter" gomb megnyomásával a magasság értékét a program magától kiszámítja és az új méretet megjeleníti a listán. + + B&ias + - - Start tonemapping (CTRL+T) + + Spatial &Kernel Sigma - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + Base Co&ntrast - - &Update preview + + Range Kerne&l Sigma - - Ctrl+T - Ctrl+T + + Ph&i + - - Update current LDR + + &Key Value - - Auto Levels + + &Lower Scale - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Upper S&cale - - Tonemap - + + Use Scales + Fokozatokat használni - - Mantiuk '06 + + Ra&nge - - Mantiuk '08 + + &Light Adaptation - - Fattal - Fattal + + Chromatic A&daptation + - - Ferradans + + Br&ightness - - Drago - Drago + + Local Contrast Threshol&d + - - Durand - Durand + + Simple + Egyszerű - - Reinhard '02 - Reinhard '02 + + Equation &Number + - - Reinhard '05 - Reinhard '05 + + Eqn &2 + - - Ashikhmin - Ashikhmin + + Eqn &4 + - - Pattanaik - Pattanaik + + Local Tone Mapping + Helyi árnyalatnövelés - - Mai + + Mu&ltiplier - - Operator + + Auto Cone/Rod - - Contrast Factor - Kontraszt tényező + + Co&ne Level + - - Saturation Factor - Telítettségi tényező + + Ro&d Level + - - Detail Factor - Részlettényező + + This operator has no options + - - Contrast Equalization - Kontraszt kiegyenlítés + + &Multiplier + - - Predefined Display + + A&daptation Luminance - - Lcd Office + + &C1 - - Lcd + + C&2 - - Lcd Bright + + Pup&il Area - - CRT + + a&lpha mul - - - Color Saturation - Színtelítettség + + Restore operator's default values + Visszaállítani a művelet alapértelmezését - - Contrast Enhancement + + Restore - - Enable -Luminace Level + + Previous applied settings - - Luminance Level + + Previous - - Alpha - Alfa - - - - Beta - Béta + + Next applied settings + - - Noise Reduction - Zajcsökkentés + + Next + - - Version 2.3.0 + + Start tonemapping (CTRL+T) - - Inverse Alpha + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - Rho + + &Update preview - - Bias - Eltolás (bias) + + Ctrl+T + Ctrl+T - - Spatial Kernel Sigma - Térbeli szigma mag + + Update current LDR + - - Range Kernel Sigma - Tartományi szigma mag + + Auto Levels + - - Base Contrast - Alapkontraszt + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Key Value - Kulcsérték + + Processing + - - Phi - Fi + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Itt lehet elvégezni a HDR kép gammakorrektúráját.<br>A gammakorrektúra az árnyalatnövelés előtt lesz alkalmazva. - - Use Scales - Fokozatokat használni + + Res&ult Size + - - Range - Tartomány + + Set Custom Output Size + - - Lower Scale - Alsó fokozat + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Ezzel a gombbal meg lehet adni egy <i>szélességi</i> értéket az LDR eredmény részére.<br>Az "enter" gomb megnyomásával a magasság értékét a program magától kiszámítja és az új méretet megjeleníti a listán. - - Upper Scale - Felső fokozat + + + Gamma applied before tonemapping + - - Brightness - Fényesség + + Pre-&gamma + - - Chromatic Adaptation - Színmódosítás + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Light Adaptation - Fénymódosítás + + Pos&t-saturation + - - Local Contrast Threshold - Heli kontraszt küszöb + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Simple - Egyszerű + + Post-gamma + - - Equation Number - Egyenlet száma + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - Eqn &2 + + ... - - Eqn &4 + + Settings - - Multiplier - Szorzó + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Itt lehet az árnyalatnövelési jellemzőket megnyitni vagy menteni.<br>A jelenlegi beállításokat is itt lehet alkalmazni. - - Local Tone Mapping - Helyi árnyalatnövelés + + Tone Mapping Settings + - - Auto Cone/Rod - + + Save current parameters to a text file + Beállításokat szövegfájlba menteni - - Cone Level - Kúp szintje + + Save current parameters (pregamma and TMO) to a text file. + Jelenlegi beállításokat (gamma előtti és átnyalatnövelési műveletek) szövegfájlba menteni. - - Rod Level - Rúd szintje + + Load an existing text file containing pregamma and TMO settings + Meglévő gammakorrektúra előtti és árnyalatnövelési beállitások megnyitása - - This operator has no options - + + Load an existing text file containing pregamma and TMO settings. + Gamma előtti és átnyalatnövelési műveletek beállítását tartalmazó fájlt megnyitni. - - Restore operator's default values - Visszaállítani a művelet alapértelmezését + + Load saved parameters + - - Restore + + Save current parameters - - Previous applied settings + + Export - - Previous + + Fast export - - Next applied settings + + Opens the current export directory. This can be changed in the preferences! - - Next + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... Árnyalatnövelési jellemzők betöltése... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... Megszakítás... - + File is not readable (check existence, permissions,...) A fájl olvashatatlan (ellenőrizze, hogy van-e ilyen fájl, ill. hogy a jogai engedélyezik-e) - + Save tonemapping settings text file to... Árnyalatnövelési jellemzők mentése... - + File is not writable (check permissions, path...) A fájl nem írható (ellenőrizze a jogait, az útvonalat, stb.) - + File is not readable (check permissions, path...) A fájl olvashatatlan (ellenőrizze a jogait, az útvonalat, stb.) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Egyéni LDR méret - + Enter the width of the new size: Adja meg az új méret szélességét: @@ -6168,19 +6426,19 @@ - - + + All Supported formats Minden felismert fájltípus - - + + Select the input images Feldolgozandó képek kiválasztása - + &Done &Kész @@ -6188,39 +6446,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Az engedély dokumentuma nincs meg. Itt található a weben: %2here%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation - + Would you like to donate? - + Yes, I'd love to! - + Stop Bothering Me - + Remind me later @@ -6228,18 +6486,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_id.ts luminance-hdr-2.6.0/i18n/lang_id.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_id.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_id.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors Peng&arang - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Terimakasih Kepada - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &License Agreement - + &OK &OK @@ -123,270 +174,320 @@ Output - + Choose an HDR output file format - - Predefined profile: - - - - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Weights: + + + + Predefined profile: + + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangular + + + + Linear + Linear + + + Alignment Alignment - - Auto align the bracketed pictures + + Use Hugin's align_image_stack engine - - Auto-align images + + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine - + &MTB - - Use Hugin's align_image_stack engine + + Auto align the bracketed pictures - - Hugin's align_&image_stack + + Auto-align images - + Auto-crop - + &Cancel &Batal - + &Start - + &Close &Tutup - + Progress - + Input/Output - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... - + Loading files... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... Aligning... - + Creating HDR... - + Doing auto anti-ghosting... - + Written - + Error: - + Aborting... Membatalkan... @@ -409,261 +510,302 @@ Daftar HDR yang akan di tone mapped - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R - - Add Files (Alt+F) + + Remove All Files (Alt+X) - - Alt+F + + + ... - - Remove Files (Alt+R) + + Alt+X - - Alt+R + + Add Files (Alt+F) - - Tone Mapping Settings + + Alt+F - Add Directory (Alt+I) + Add Directory (Alt+D) - Alt+I + Alt+D + + + + + Tone Mapping Settings - + Add Files (Alt+L) - + Alt+L - + + Add Directory (Alt+I) + + + + + Alt+I + + + + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Daftar file Tone Mapping Setting yang akan digunakan untuk tone map setiap HDR - + Output Output - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files Tentukan output folder untuk file tone mapped - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log - + Batch operations report Laporan operasi Batch - + Show onl&y: - + Filter messages based on severity Filter messages based on severity - + All messages Semua pesan - + Errors only Hanya error-error - + Success messages Pesan Sukses - + Filter &log messages: - + Clear filter text Bersihkan text penyaring - + Overall completion progress Keseluruhan progress yang telah selesai - + &Cancel &Batal - + Start batch tone mapping Mulai batch tone mapping - + &Start - + Using %n thread(s) - - - + + + Choose a directory Pilih direktori - + All HDR images - + Select input images - + Load tone mapping settings text files... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Memroses... - + Start processing... - + Close - + &Done &Selesai - + + Conversion aborted by user request. + + + + All tasks completed. Seluruh task telah komplet. - + Aborting... Membatalkan... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -699,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Error: Alignment engine not recognized. - + Error: Unknown weight function specified. Error: Tidak diketahui spesifik weight function. - + Error: Unknown response curve specified. Error: Tidak diketahui spesifik response curve. - + Error: Unknown HDR creation model specified. Error: Tidak diketahui spesifik HDR creation model. - + Error: Unknown tone mapping operator specified. Error: Tidak diketahui spesifik operator tone mapping. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Error: Jumlah spesifik nilai EV berbeda dengan file masukan. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Error: kehilangan Exif data pada image dan nilai EV tidak spesifik pada commandline, bailing out. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable Ed&itable - + R&eference R&eferensi - + Select the previous image in both lists Select image sebelumnya dalam kedua daftar - + Select the next image in both lists Select image berikutnya dalam kedua daftar - + Choose a directory and a prefix Pilih sebuah direktori dan sebuah prefix @@ -1418,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. +This image's histogram is displayed in the widget above. + @@ -1908,18 +2147,18 @@ - + Choose a directory Pilih direktori - - + + Error: - + must be a directory. @@ -2079,28 +2318,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2108,7 +2347,7 @@ GenericViewer - + Pan the image to a region @@ -2121,45 +2360,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + + + + HdrViewer - + &Mapping: - + Histogram: Histogram: - + Linear Linear - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2183,7 +2435,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2223,7 +2475,7 @@ - &MTB + M&TB @@ -2233,7 +2485,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2296,12 +2548,12 @@ - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2310,47 +2562,47 @@ - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results - + Use Custom Configuration - + HDR Creation Model @@ -2400,237 +2652,266 @@ - + Linear Linear - + Gamma Gamma - + Log Log - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... Simpan sebagai... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Berikutnya > - + &Cancel &Batal - + Image Filename Image Filename - + Exposure Exposure - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Pilih gambar inputan - + Unknown - + Loading... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found Data EXIF tidak ditemukan - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Untuk memprosesnya anda membutuhkan set secara manual nilai exposure.<br><font color="#FF0000">%1</font> Nilai masih dibutuhkan.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: - + Start loading a set of images with different exposure - - - + + + Error... Error... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... Aplikasi external "<em>align_image_stack</em>" crash... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Terjadi error yang tidak diketahui ketika mengeksekusi aplikasi "<em>align_image_stack</em>"... - + Now click on next button - + + Compute + + + + + Finish + + + + Aligning... Aligning... - - - &Finish - &Selesai + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - - - Response curve: - - Response curve: - - - - - Model: - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Untuk memprosesnya anda membutuhkan set secara manual nilai exposure.<br><font color="#FF0000">%1</font> Nilai masih dibutuhkan.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + + Hide Log @@ -2643,7 +2924,7 @@ - + &File &File @@ -2669,7 +2950,7 @@ - + &Print... @@ -2685,7 +2966,7 @@ - + &Find... @@ -2716,7 +2997,7 @@ - + &Add Bookmark @@ -2732,7 +3013,7 @@ - + D&elete All @@ -2802,96 +3083,96 @@ - + Help SideBar - + LuminanceHDR Online Help - + &Edit - + &View &Melihat - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Delete - + Find - + Search Term: - + New Bookmark - + New Bookmark's Title: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show - + LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? @@ -2949,22 +3230,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2972,7 +3258,7 @@ ImageQualityDialog - + Unknown @@ -3023,9 +3309,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3105,7 +3391,7 @@ MainWindow - + Luminance HDR @@ -3950,18 +4236,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3975,6 +4256,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3990,91 +4276,90 @@ - + All HDR formats - + Load one or more HDR images... - + Save files in - - + + Failed to save %1 - + Done! - + Aborting... Membatalkan... - - - Untitled - - - - + Cropped Image - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Perubahan tidak dapat disimpan... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + + + + Untitled %1 - + Error: %1 - + Untitled HDR - + FITS Image @@ -4375,13 +4660,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4621,28 +4906,28 @@ &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Pilih direktori - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4758,17 +5043,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ERROR: Tidak dapat memuat file Setting Tone Mapping: - + ERROR: File too old, cannot parse Tone Mapping Setting file: ERROR: File terlalu lama, cannot parse Tone Mapping Setting file: - + ERROR: cannot parse Tone Mapping Setting file: ERROR: cannot parse Tone Mapping Setting file: @@ -4776,370 +5061,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Triangular - - - - Plateau - Plateau - - - - Gaussian - Gaussian - - - - Flat - - - - - Linear - Linear - - - - Gamma - Gamma - - - - Logarithmic - Logarithmic - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Contrast Equalization - + Contrast - - + + Saturation - + Detail - + Luminance Level - + Luminance Level=Auto - + Color Saturation Color Saturation - + Contrast Enhancement - + + Alpha - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias Bias - + Spatial - - + + Range Range - + Base - + Multiplier Multiplier - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness Brightness - + Chromatic Adaptation Chromatic Adaptation - + Light Adaptation Light Adaptation - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Triangular + + + + Plateau + Plateau + + + + Gaussian + Gaussian + + + + Flat + + + + + Linear + Linear + + + + Gamma + Gamma + + + + Logarithmic + Logarithmic + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float Tidak dapat mengkonversi %1 ke float - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats - + Save the LDR image as... + All HDR formats + + + + Save the HDR image as... - + Save as... Simpan sebagai... @@ -5210,810 +5576,702 @@ SavedParametersDialog - + Saved Parameters - - + Comment - + TM Operator + + + SavingParameters - - Simple - Simple + + Saving Parameters + - - Equation 2 + + Enter a short comment for the saved parameters: + + + SupportedCamerasDialog - - Local Contrast Threshold + + List of supported cameras - - Bias - Bias + + TextLabel + - - Spatial Kernel Sigma - Spatial Kernel Sigma + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + - - Range Kernel Sigma - Range Kernel Sigma + + With LibRaw version + - - Base Contrast - Base Contrast + + models listed + - - Alpha + + search... - - Beta - Beta - - - - - Color Saturation - Color Saturation - - - - Noise Reduction - Noise Reduction + + OK + + + + TMOProgressIndicator - - Old Fattal + + Abort computation + + + ThresholdWidget - - Rho + + Frame - - InvAlpha + + Threshold + + + TiffModeDialog - - Contrast Equalization - Contrast Equalization - - - - Contrast Factor - Contrast Factor + + Save as ...TIFF + + + + TonemappingPanel - - Saturation Factor - Saturation Factor + + Tonemap + - - Detail Factor + + Mantiuk '06 - - Contrast Enhancement + + Mantiuk '08 - - Luminance Level + + Fattal - - Manual Luminance Level + + Ferradans - - Cone and Rod based on Luminance - Cone and Rod based on Luminance + + Drago + - - Local Tonemapping + + Durand - - Cone Level - Cone Level + + Reinhard '02 + Reinhard '02 - - Rod Level - Rod Level + + Reinhard '05 + Reinhard '05 - - Multiplier - Multiplier + + Ashikhmin + - - Use Scales - Gunakan Skala + + Pattanaik + - - Key Value - Niai Kunci + + Mai + - - Phi Value + + Ferwerda - - Range - Range + + KimKautz + - - Lower Scale - Lower Scale + + VanHateren + - - Upper Scale - Upper Scale + + Lischinski + - - Brightness - Brightness + + Operator + - - Chromatic Adaptation - Chromatic Adaptation + + &Contrast Factor + - - Light Adaptation - Light Adaptation + + Contrast Equalization + Contrast Equalization - - Pre-gamma + + &Detail Factor - - - SavingParameters - - Saving Parameters + + Saturat&ion Factor - - Enter a short comment for the saved parameters: + + Lcd Office - - - SupportedCamerasDialog - - List of supported cameras + + Lcd - - TextLabel + + Lcd Bright - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + + CRT - - With LibRaw version + + Co&lor Saturation - - models listed + + Co&ntrast Enhancement - - search... + + Enable +Luminace Level - - OK + + Lum&inance Level - - - TMOProgressIndicator - - Abort computation + + Predefined &Display - - - ThresholdWidget - - Frame + + A&lpha - - Threshold + + Bet&a - - - TiffModeDialog - - Save as ...TIFF + + Color Saturat&ion - - - TonemappingPanel - - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Sekarang anda dapat memuat dan menyimpan sebuah file tone mapping setting.<br>Anda dapat juga menerapkan content dari file yang telah dimuat. - - - Tone Mapping Settings + + &Noise Reduction - - Save current parameters to a text file - Simpan parameter ke sebuah file text - - - - Save current parameters (pregamma and TMO) to a text file. - Simpan parameter (pregamma dan TMO) ke sebuah file text. - - - - Load an existing text file containing pregamma and TMO settings - Muat file text pregamma dan TMO setting yang ada - - - - Load an existing text file containing pregamma and TMO settings. - Muat file text pregamma dan TMO setting yang ada. - - - - Save current parameters + + Version 2.3.0 - - Load saved parameters + + &Inverse Alpha - - Export + + Rho - - Fast export + + B&ias - - Opens the current export direcotory. This can be changed in the preferences! + + Spatial &Kernel Sigma - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Base Co&ntrast - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Anda dapan menerapkan sebuah gamma correction ke HDR.<br>Gamma correction akan diterapkan sebelum tone mapping. - - - - Process + + Range Kerne&l Sigma - - Result Si&ze + + Ph&i - - - Gamma applied before tonemapping + + &Key Value - - Pre-&gamma + + &Lower Scale - - Restore pregamma's default value (1) - Kembalikan nilai default pregamma's (1) - - - - Size of the resulting LDR image + + Upper S&cale - - Here you can choose the size of the resulting LDR image. - Anda dapat memilih ukuran dari hasil image LDR. + + Use Scales + Gunakan Skala - - Set Custom Output Size + + Ra&nge - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Clik tombol ini, anda akan dapat menyisipkan nilai <i>lebar</i> untuk ukuran hasil image LDR.<br>Setelah menekan Enter (atau Return) nilai tinggi akan otomatis dicomputasi dan ukuran baru akan ditambahkan ke dalam daftar. + + &Light Adaptation + - - Start tonemapping (CTRL+T) + + Chromatic A&daptation - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + Br&ightness - - &Update preview + + Local Contrast Threshol&d - - Ctrl+T - Ctrl+T + + Simple + Simple - - Update current LDR + + Equation &Number - - Auto Levels + + Eqn &2 - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Eqn &4 - - Tonemap - + + Local Tone Mapping + Local Tone Mapping - - Mantiuk '06 + + Mu&ltiplier - - Mantiuk '08 + + Auto Cone/Rod - - Fattal + + Co&ne Level - - Ferradans + + Ro&d Level - - Drago + + This operator has no options - - Durand + + &Multiplier - - Reinhard '02 - Reinhard '02 - - - - Reinhard '05 - Reinhard '05 - - - - Ashikhmin + + A&daptation Luminance - - Pattanaik + + &C1 - - Mai + + C&2 - - Operator + + Pup&il Area - - Contrast Factor - Contrast Factor - - - - Saturation Factor - Saturation Factor - - - - Detail Factor + + a&lpha mul - - Contrast Equalization - Contrast Equalization - - - - Predefined Display - + + Restore operator's default values + Kembalikan ke nilai default operator - - Lcd Office + + Restore - - Lcd + + Previous applied settings - - Lcd Bright + + Previous - - CRT + + Next applied settings - - - Color Saturation - Color Saturation - - - - Contrast Enhancement + + Next - - Enable -Luminace Level + + Start tonemapping (CTRL+T) - - Luminance Level + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - Alpha + + &Update preview - - Beta - Beta - - - - Noise Reduction - Noise Reduction + + Ctrl+T + Ctrl+T - - Version 2.3.0 + + Update current LDR - - Inverse Alpha + + Auto Levels - - Rho + + <html><head/><body><p>set auto levels threshold</p></body></html> - - Bias - Bias - - - - Spatial Kernel Sigma - Spatial Kernel Sigma - - - - Range Kernel Sigma - Range Kernel Sigma - - - - Base Contrast - Base Contrast - - - - Key Value - Niai Kunci + + Processing + - - Phi - Phi + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Anda dapan menerapkan sebuah gamma correction ke HDR.<br>Gamma correction akan diterapkan sebelum tone mapping. - - Use Scales - Gunakan Skala + + Res&ult Size + - - Range - Range + + Set Custom Output Size + - - Lower Scale - Lower Scale + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Clik tombol ini, anda akan dapat menyisipkan nilai <i>lebar</i> untuk ukuran hasil image LDR.<br>Setelah menekan Enter (atau Return) nilai tinggi akan otomatis dicomputasi dan ukuran baru akan ditambahkan ke dalam daftar. - - Upper Scale - Upper Scale + + + Gamma applied before tonemapping + - - Brightness - Brightness + + Pre-&gamma + - - Chromatic Adaptation - Chromatic Adaptation + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Light Adaptation - Light Adaptation + + Pos&t-saturation + - - Local Contrast Threshold + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> - - Simple - Simple + + Post-gamma + - - Equation Number - Equation Number + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - Eqn &2 + + ... - - Eqn &4 + + Settings - - Multiplier - Multiplier + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Sekarang anda dapat memuat dan menyimpan sebuah file tone mapping setting.<br>Anda dapat juga menerapkan content dari file yang telah dimuat. - - Local Tone Mapping - Local Tone Mapping + + Tone Mapping Settings + - - Auto Cone/Rod - + + Save current parameters to a text file + Simpan parameter ke sebuah file text - - Cone Level - Cone Level + + Save current parameters (pregamma and TMO) to a text file. + Simpan parameter (pregamma dan TMO) ke sebuah file text. - - Rod Level - Rod Level + + Load an existing text file containing pregamma and TMO settings + Muat file text pregamma dan TMO setting yang ada - - This operator has no options - + + Load an existing text file containing pregamma and TMO settings. + Muat file text pregamma dan TMO setting yang ada. - - Restore operator's default values - Kembalikan ke nilai default operator + + Load saved parameters + - - Restore + + Save current parameters - - Previous applied settings + + Export - - Previous + + Fast export - - Next applied settings + + Opens the current export directory. This can be changed in the preferences! - - Next + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... Memuat sebuah file text setting tonemapping... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... Membatalkan... - + File is not readable (check existence, permissions,...) File tidak terbaca (silahkan cek keberadaannya, permissions,...) - + Save tonemapping settings text file to... Simpan text setting tonemapping file ke... - + File is not writable (check permissions, path...) File tidak dapat ditulisi (silahkan cek permission, path...) - + File is not readable (check permissions, path...) File tidak terbaca (silahkan cek permissions, path...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Custom LDR size - + Enter the width of the new size: @@ -6163,19 +6421,19 @@ - - + + All Supported formats - - + + Select the input images Pilih gambar inputan - + &Done &Selesai @@ -6183,39 +6441,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Lisensi document tidak ditemukan, anda dapat mencarinya secara online: %2disini%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation - + Would you like to donate? - + Yes, I'd love to! - + Stop Bothering Me - + Remind me later @@ -6223,18 +6481,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_it.ts luminance-hdr-2.6.0/i18n/lang_it.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_it.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_it.ts 2019-06-09 19:18:38.000000000 +0000 @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,103 +30,215 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> - p, li { white-space: pre-wrap; } - </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> - <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — Applicazione per la creazione di immagini HDR<br />(c) 2006-2009, Giuseppe Rota</span></p> - <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Crea immagini HDR.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&utori - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Per favore </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fateci sapere</span></a><span style=" font-family:'Sans Serif';"> se abbiamo dimenticato qualcuno da aggiungere alla lista.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Sviluppatore principale QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Sviluppatori principali Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Migliorie, correzione bugs</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Codice di pfs{tools|calibration|tmo}</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Algoritmo di G.Ward Mean Threshold Bitmap (MTB) </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in russo, usabilità, manuale utente, file .desktop</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in norvegese</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in turco</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in francese</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in spagnolo</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in tedesco</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in ceco</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in polacco</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in rumeno</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Traduzione in cinese</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Responsabili FreeBSD</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit e Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">SVILUPPATORI</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Principale sviluppatore di QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Principali sviluppatori di Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Miglioramenti e correzioni</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">codice di pfs{tools|calibration|tmo}</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Implementazione algoritmo Mean Threshold Bitmap (MTB) di G.Ward</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">COLLABORATORI</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRADUTTORI</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> su Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Cinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Ceco</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Francese</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Tedesco</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norvegese</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polacco</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Rumeno</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russo</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spagnolo</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turco</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Ringraziamenti - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">La comunità di </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">La comunità di </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack e altro</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">E inoltre</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Lista dei cambiamenti - + &License Agreement &Licenza - + &OK &OK @@ -151,209 +267,259 @@ Destinazione - + Choose an HDR output file format Scegli un formato di output per gli HDR - - Predefined profile: - Profilo predefinito: - - - - Output format: - Formato output: + + Filename prefix: + Prefisso nome file: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. Scegli uno dei profili predefiniti per la creazione degli HDR. Vedi la documentazione per maggiori informazioni. - + Profile 1 Profilo 1 - + Profile 2 Profilo 2 - + Profile 3 Profilo 3 - + Profile 4 Profilo 4 - + Profile 5 Profilo 5 - + Profile 6 Profilo 6 - + + Output format: + Formato output: + + + + hdr_ + hdr_ + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + <html><head/><body><p>Se si lascia selezionato, i nomi dei files per le HDR generate saranno della forma <span style=" font-style:italic;">primo-ultimo_ModelloCreazioneHdr.ext </span>dove primo è il nome di file della prima immagine nell'insieme, ultimo è il nome di file dell'ultima immagine nell'insieme ed ext è l'estensione per il formato HDR selezionato.</p></body></html> + + + + Use Proposed Filename Scheme + Utilizza per i nomi dei files lo schema predefinito + + + + Response: + Risposta: + + + + Weights: + Pesi: + + + + Predefined profile: + Profilo predefinito: + + + + Model: + Modello: + + + + Debevec + Debevec + + + + Triangular + Triangolare + + + + Linear + Lineare + + + Alignment Allineamento - - Auto align the bracketed pictures - Auto allinea le immagini con diversa esposizione + + Use Hugin's align_image_stack engine + Usa align_image_stack da Hugin - - Auto-align images - Auto-allineamento immagini + + Hugin's align_&image_stack + align_&image_stack da Hugin - + Use MTB (Median Threshold Bitmap) engine Usa MTB (Median Threshold Bitmap) - + &MTB &MTB - - Use Hugin's align_image_stack engine - Usa align_image_stack da Hugin + + Auto align the bracketed pictures + Auto allinea le immagini con diversa esposizione - - Hugin's align_&image_stack - align_&image_stack da Hugin + + Auto-align images + Auto-allineamento immagini - + Auto-crop Auto-ritaglio - + &Cancel A&nnulla - + &Start &Avvia - + &Close &Chiudi - + Progress Messaggi - + Input/Output Input/Output - + Folder where created HDRs are saved Cartella dove gli HDR verranno salvati - - + + Select... Seleziona... - + Folder where bracketed pictures are located (in alphabetical order) Cartella che contiene le immagini con diversa esposizione (in ordine alfabetico) - + Input folder: Cartella di input: - + Output folder: Cartella di output: - + Anti-ghosting Anti-ghosting - + Artifact-free High Dynamic Range Imaging High Dynamic Range Imaging senza artifatti - + Threshold Soglia - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Soglia utilizzata dall'algoritmo di anti-ghosting. Un basso valore di soglia implica un'elaborazione più aggressiva ma può risultare in una diminuzione dell'intervallo dinamico finale. Si usi il pulsante &quot;Ricalcola&quot; per visualizzare la copertura delle patches e si cambi il valore di soglia fino a raggiungere la copertura desiderata</p></body></html> - + O. Gallo and others O. Gallo e altri - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Abilita algoritmo di anti-ghosting automatico</p></body></html> - + Auto anti-ghosting Anti-ghosting automatico - + Custom config %1 Configurazione personalizzata %1 - + Choose a source directory Scegli cartella sorgente - + Choose a output directory Scegli cartella destinazione - - - + + + Warning Attenzione - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? La cartella di uscita selezionata contiene dei files HDR. Questi file potrebbero essere sovrascritti. @@ -361,63 +527,63 @@ Continuare? - - + + Total number of pictures must be a multiple of number of bracketed images. Il numero totale di immagini deve essere un multiplo delle differenti esposizioni. - + Started processing... Elaborazione in corso... - + Loading files... Caricando i files... - + Completed with errors Completato con errori - + Completed without errors Completato senza errori - + Error: missing EXIF data Errore: dati EXIF mancanti - + Aligning... Allineando... - + Creating HDR... Creando un HDR... - + Doing auto anti-ghosting... - Anti-ghosting automatico in esecuzione + Anti-ghosting automatico in esecuzione... - + Written Scritto - + Error: Errore: - + Aborting... Operazione interrotta... @@ -440,261 +606,302 @@ Lista di Hdr su cui verra' eseguito il tonemapping - - Add Directory (Alt+D) - Aggiungi una directory (Alt+D) + + Remove Files (Alt+R) + Rimuovi dei files (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Aggiungi dei files (Alt+F) + + Remove All Files (Alt+X) + Rimuovi tutti i files (Alt-X) - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Rimuovi dei files (Alt+R) + + Alt+X + Alt+X - - Alt+R - Alt+R + + Add Files (Alt+F) + Aggiungi dei files (Alt+F) - - Tone Mapping Settings - Impostazioni tonemapping + + Alt+F + Alt+F - Add Directory (Alt+I) - Aggiungi una directory (Alt+I) + Add Directory (Alt+D) + Aggiungi una directory (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Impostazioni tonemapping - + Add Files (Alt+L) Aggiungi dei files (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Aggiungi una directory (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Aggiungi dal database (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Rimuovi impostazioni (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + Rimuovi tutte le impostazioni (Alt+W) + + + + Alt+W + Alt+W + + + List of Tone Mapping Setting files that will be used to tone map each HDR Lista di file di impostazioni di tonemapping che saranno usati per eseguire il tonemapping su ciascuna HDR - + Output Uscita - + Output Image Width: Larghezza Immagine: - + Output Folder: Cartella di destinazione: - - + + Specify output folder for the tone mapped files Specifica la cartella di uscita per il file di uscita - + Selec&t... Sele&ziona... - - + + Width of tonemapped image in percent of original image Largezza dell'immagine elaborata in percentuale dell'immagine originale - + % % - + Output Format: Formato di uscita: - + Image format of tonemapped images Formato immagine per le immagini elaborate - + Image format options Opzioni formato immagine - + Conversion Log Log conversione - + Batch operations report Log per le operazioni batch - + Show onl&y: Mostra so&lo: - + Filter messages based on severity Filtra i messaggi in base alla severità - + All messages Tutti i messaggi - + Errors only Solo errori - + Success messages Messaggi di successo - + Filter &log messages: Filtra i messaggi di &log: - + Clear filter text Resetta il filtro - + Overall completion progress Percentuale di completamento globale - + &Cancel A&nnulla - + Start batch tone mapping Inizia il batch tonemapping - + &Start &Avvia - + Using %n thread(s) Utilizzo %n threadUtilizzo %n threads - - - + + + Choose a directory Seleziona una directory - + All HDR images - Tutte le immagini HDR + Tutte le immagini HDR - + Select input images Seleziona immagini di input - + Load tone mapping settings text files... Carica il file di testo impostazioni tonemapping... - + Luminance HDR tone mapping settings text file (*.txt) File configurazione tonemapping di Luminance HDR (*.txt) - + + Warning + Attenzione + + + + An error occurred reading one or more tonemapping options files. + Si è verificato un errore leggendo uno o più file di impostazioni di tonemapping. + + + Processing... Sto processando... - + Start processing... Inizio elaborazione... - + Close Chiudi - + &Done &Fatto - + + Conversion aborted by user request. + Conversione annullata su richiesta dell'utente. + + + All tasks completed. Tutti i task sono stati completati. - + Aborting... Operazione interrotta... @@ -702,27 +909,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Inizio elaborazione %2 - + [T%1] Successfully load %2 [T%1] %2 correttamente caricato - + + [T%1] ERROR: Failed to tonemap file: %2 + [T%1] ERRORE: Mancato tonemapping del file: %2 + + + [T%1] Successfully saved LDR file: %2 [T%1] File %2 correttamente salvato - + [T%1] ERROR: Cannot save to file: %2 [T%1] ERRORE: Il file %2 non può essere salvato - + [T%1] ERROR: Loading of %2 failed [T%1] ERRORE: Caricatamento di %2 fallito @@ -730,575 +942,673 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Utilizzo: %1 [OPZIONI]... [FILES_DI_INPUT]... - + Display this help. Visualizza questo messaggio di aiuto. - + Display program version. Mostra la versione del programma. - + Print more messages during execution. Stampa più messaggi durante l'esecuzione. - + Print a list of all supported cameras. Stampa una lista delle macchine fotografiche supportate. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AIS|MTB] Motore di allineamento utilizzato durante la creazione dell'HDR (default: nessun allineamento). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,... Specifa i valori EV (tanti quanti FILES_DI_INPUT). - + prefix Save aligned images to files which names start with prefix prefisso Salva le immagini allineate in files il cui nome inizia con prefisso - + HDR_FILE Load an HDR instead of creating a new one. FILE_HDR Carica un HDR invece di crearne uno nuovo. - + HDR_FILE Save to a HDR file format. (default: don't save) FILE_HDR Salva in un formato di file HDR (default: non salvare) - + VALUE Gamma value to use during tone mapping. (default: 1) VALORE Valore gamma da utilizzare durante il tonemapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + VALORE Valore di saturazione da utilizzare dopo il tone mapping. (default: 1) + + + + VALUE Gamma value to use after tone mapping. (default: 1) + VALORE Valore gamma da utilizzare dopo il tone mapping. (default: 1) + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALORE Larghezza dell'immagine HDR ridimensionata (prima di applicare il gamma e il tonemapping) - + LDR_FILE File name you want to save your tone mapped LDR to. FILE_LDR Nome del file su cui salvare l'immagine LDR dovo aver effettuato il tonemapping. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) SOGLIA Abilita l'auto anti-ghosting con il dato valore di soglia (0.0-1.0) - + Apply autolevels correction after tonemapping. Applica la correzione automatica dei livelli dopo il tonemapping. - + Enable generation of a webpage with embedded HDR viewer. Abilita la generazione di una pagina web con visore HDR incorporato. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + ESTENSIONE_FILE Salva il file LDR con nome della forma primo-ultimo_parametri-tonemapping.estensione. + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + ESTENSIONE_FILE Salva il file HDR con nome della forma primo-ultimo_modello-creazione-Hdr.estensione. + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR Parametri creazione HDR - si deve caricare un file HDR esistente (tramite l'opzione -l) oppure specificare FILES_DI_INPUT per creare un nuovo HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) pesi = triangular|gaussian|plateau|flat (di default è triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) curva di risposta = from_file|linear|gamma|log|srgb (di default è linear) - + model: robertson|robertsonauto|debevec (Default is debevec) modello: robertson|robertsonauto|debevec (di default è debevec) - + curve filename = your_file_here.m nome file curva di risposta = nome_file.m - + LDR output parameters Parametri salvataggio LDR - + VALUE Quality of the saved tone mapped file (1-100). VALORE Qualità del file salvato (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) Formato Tiff. Valori validi sono [8b|16b|32b|logluv] (di default è 8b) - + Tiff deflate compression. true|false (Default is true) Compressione dei Tiff. true|false (di default è true) - + HTML output parameters Parametri esportazione HTML - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) VALORE Qualità delle eposizioni interpolate, dalla peggiore (1) alla migliore (4). Un valore più alto introduce meno distorsioni tra i toni più scuri e i più luminosi, ma genererà un numero maggiore di immagini. Più immagini significa maggior quantità di dati da trasferire al browser web rendendo il visore HDR meno responsivo. (di default è 2, valore sufficiente per molte applicazioni) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) Specifica il nome di file della pagina web da generare. Se manca <nome_pagina>, verrà usato il nome di file della prima immagine, con estensione html (di default viene usato il nome di file della prima immagine) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) Specifica dove salvare le immagini risultanti. Deve essere un percorso relativo e la cartella deve esistere. Utile per evitare disordine nella cartella corrente (di default è usata la cartella corrente) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Parametri di tonemapping - nessun tonemapping verrà effettuato se non si specifica l'opzione -o - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) - Operatori di tonemapping. Valori consentiti: [ashikhmin|drago|durand|fattal|ferradans|mai|mantiuk06|mantiuk08|pattanaik|reinhard02|reinhard05] (di default mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) + Operatore di tone mapping. Valori consentiti: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Il default è mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings FILE_IMPOSTAZIONI Carica un file contenente le impostazioni per il tonemapping e pre-gamma - + Fattal Fattal - + + alpha FLOAT alpha FLOAT - + beta FLOAT beta FLOAT - + color FLOAT colore FLOAT - + noise FLOAT rumore FLOAT - + new true|false nuovo true|false - + Ferradans - Ferradans + Ferradans - + rho FLOAT rho FLOAT - + inv_alpha FLOAT inv_alpha FLOAT - + + Ferwerda + Ferwerda + + + + mul FLOAT + mul FLOAT + + + + adapt_lum FLOAT + adapt_lum FLOAT + + + + KimKautz + KimKautz + + + + c1 FLOAT + c1 FLOAT + + + + c2 FLOAT + c2 FLOAT + + + Mantiuk 06 - Mantiuk 06 + Mantiuk 06 - + contrast FLOAT contrasto FLOAT - + saturation FLOAT saturazione FLOAT - + detail FLOAT dettaglio FLOAT - + equalization true|false equalizzazione true|false - + Mantiuk 08 - Mantiuk 08 + Mantiuk 08 - + color saturation FLOAT saturazione colore FLOAT - + contrast enhancement FLOAT miglioramento contrasto FLOAT - + luminance level FLOAT livello luminanza FLOAT - + enable luminance level true|false - abilita livello luminanze true|false + abilita livello luminanza true|false - + Durand - Durand + Durand - + spatial kernel sigma FLOAT spatial kernel sigma FLOAT - + range kernel sigma FLOAT range kernel sigma FLOAT - + base contrast FLOAT - base contrast FLOAT + contrasto base FLOAT - + Drago - Drago + Drago - + bias FLOAT bias FLOAT - + Reinhard 02 - Reinhard 02 + Reinhard 02 - + key value FLOAT - key value FLOAT + parametro key FLOAT - + phi FLOAT - phi value FLOAT + parametro phi FLOAT - + use scales true|false usa scale true|false - + range FLOAT range FLOAT - + lower scale FLOAT scala inferiore FLOAT - + upper scale FLOAT scala superiore FLOAT - + Reinhard 05 - Reinhard 05 + Reinhard 05 - + Brightness FLOAT luminosità FLOAT - + Chroma adaption FLOAT - chroma adaption FLOAT + addattamento cromatico FLOAT - + Light adaption FLOAT - light adaption FLOAT + adattamento luci FLOAT - + Ashikmin - Ashikmin + Ashikmin - + Equation number 2 true|false equazione numero 2 true|false - + Simple true|false semplice true|false - + Local threshold FLOAT soglia locale FLOAT - + Pattanaik - Pattanaik + Pattanaik - + multiplier FLOAT moltiplicatore FLOAT - + Local tone mapping true|false tonemapping locale true|false - + Auto luminance true|false - auto luminance true|false + luminanza automatica true|false - + cone level FLOAT livello coni FLOAT - + rod level FLOAT livello bastoncelli FLOAT - + + VanHateren + VanHateren + + + + pupil_area FLOAT + pupil_area FLOAT + + + + Lischinski + Lischinski + + + Luminance HDR version Luminance HDR versione - + With LibRaw version Con versione di LibRaw - + models listed modelli elencati - + + + Error: Unsupported LDR file type. + Errore: Formato LDR non supportato. + + + + + Error: Unsupported HDR file type. + Errore: Formato HDR non supportato. + + + Error: htmlQuality must be in the range [1..4]. Errore: htmlQuality deve essere nell'intervallo [1..4]. - + Error: Alignment engine not recognized. Errore: opzione di allineamento non riconosciuta. - + Error: Unknown weight function specified. Errore: Funzione peso specificata sconosciuta. - + Error: Unknown response curve specified. Errore: curva di risposta specificata non riconosciuta. - + Error: Unknown HDR creation model specified. Errore: modello per la creazione dell'HDR sconosciuto. - + Error: Unknown tone mapping operator specified. Errore: L'operatore di tonemapping specificato non e' stato riconosciuto. - - + + Error: The specified file with TMO settings could not be parsed! Errore: Il file con le impostazioni per il tonemapping non può essere analizzato! - + Error: The specified file with TMO settings could not be parsed!: %1 Errore: Il file con le impostazioni per il tonemapping non può essere analizzato! %1 - + Error: Quality must be in the range [1..100]. Errore: La qualità deve essere nell'intervallo [1..100]. - + Error: Unknown tiff format. Errore: Formato tiff sconosciuto. - + Error: Threshold must be in the range [0..1]. Errore: La soglia deve essere nell'intervallo [0..1]. - + Error: The number of EV values specified is different from the number of input files. Errore: Il numero di valori EV specificati e' differente dal numero di file di input. - + Load file %1 failed Caricamento del file %1 fallito - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Errore: Dati Exif mancanti nelle immagini e valori EV non specificati manualmente. - + EV values have been assigned. I valori EV sono stati assegnati. - - + + Starting aligning... Allineando le immagini... - + Failed executing align_image_stack align_image_stack ha terminato in modo incorretto - + Failed aligning images. Allineamento immagini fallito. - + Creating (in memory) the HDR. Creazione (in memoria) dell'HDR. - + Saving to file %1. Salvando sul file %1. - + Image %1 saved successfully - Immagine %1 salvata con successo. + Immagine %1 salvata con successo - + Could not save %1 Non posso salvare %1 - + NOT Saving HDR image to file. %1 NON sto salvando l'immagine HDR su file. %1 - + Exporting to HTML Esportando su HTML - + ERROR: directory %1 must exist ERRORE: la cartella %1 deve esistere - + Tonemapping requested, saving to file %1. Richiesto tonemapping, salvando sul file %1. - + Resizing to width %1. Riscala alla larghezza %1. - + Applying gamma %1. Applica gamma %1. - + + +Applying saturation enhancement %1. + +Applica miglioramento saturazione %1. + + + + +Applying post-gamma %1. + +Applica post-gamma %1. + + + Image %1 successfully saved -Immagine %1 salvata con successo. +Immagine %1 salvata con successo - + ERROR: Cannot save to file: %1 ERRORE: Impossibile salvare il file: %1 - + Tonemapping NOT requested. Tonemapping NON richiesto. - - Failed loading images - Caricamento immagini fallito + + Failed loading images: %1 + Caricamento immagini fallito: %1 @@ -1375,47 +1685,47 @@ EditingTools - + Maskable Mascherabile - + Good image Immagine di riferimento - + Add good image Aggiungi l'immagine buona - + Remove good image Rimuovi l'immagine buona - + Ed&itable Mod&ificabile - + R&eference &Riferimento - + Select the previous image in both lists Seleziona in entrambe le liste l'immagine precedente - + Select the next image in both lists Seleziona in entrambe le liste l'immagine successiva - + Choose a directory and a prefix Seleziona una directory e un prefisso @@ -1451,9 +1761,9 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - L'immagine correntemente selezionata in questa lista puo' venire spostata in su, giu' a destra e a sinistra utilizzando i controlli qua sotto. -L'istogramma dell'immagine e' visualizzato sopra. +This image's histogram is displayed in the widget above. + L'immagine correntemente selezionata in questa lista può venire spostata in su, in giù a destra e a sinistra utilizzando i controlli qua sotto. +L'istogramma dell'immagine è visualizzato sopra. @@ -1718,7 +2028,7 @@ S&trength: - &Forza + &Forza: @@ -1946,18 +2256,18 @@ Esporta - + Choose a directory Seleziona una directory - - + + Error: Errore: - + must be a directory. dev'essere una cartella. @@ -1977,7 +2287,7 @@ Select the different files for the channels. Optionally, they can be aligned. - Seleziona i file associati ai canali. Opzionalmente, i file possono essere allineati + Seleziona i file associati ai canali. Opzionalmente, i file possono essere allineati. @@ -2041,7 +2351,7 @@ Shows a larger preview of selected image - Mostra una più grande anteprima dell'immagine selezionata + Mostra una più grande anteprima dell'immagine selezionata @@ -2089,7 +2399,7 @@ Progress: - Progresso: + Progresso: @@ -2117,29 +2427,29 @@ Rosso - + Load one FITS image... Carica un'immagine FITS... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 Impossibile caricare l'immagine FITS %1. ERRORE: %2 - + FITS images have different size Le immagini FITS hanno dimensioni differentii - + align_image_stack exited with exit code %1 align_image_stack è uscito con codice %1 - + align_image_stack failed with error align_image_stack ha terminato con errori @@ -2147,7 +2457,7 @@ GenericViewer - + Pan the image to a region Inquadra una regione differente dell'immagine @@ -2160,45 +2470,58 @@ Errore nel caricare un file. - + HdrCreationManager::loadFilesDone(): The images have different size. Le immagini differiscono nella dimensione. + HdrPreview + + + HDR Preview + Anteprima HDR + + + + Close + Chiudi + + + HdrViewer - + &Mapping: &Mapping: - + Histogram: Istogramma: - + Linear Lineare - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2222,7 +2545,7 @@ - &Currently Loaded Files + Currently &Loaded Files &Files attualmente caricati @@ -2262,8 +2585,8 @@ - &MTB - &MTB + M&TB + M&TB @@ -2272,8 +2595,8 @@ - Hugin's align_&image_stack - align_&image_stack da Hugins + Hu&gin's align_image_stack + align_&image_stack da Hugin @@ -2293,7 +2616,7 @@ <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range.</p></body></html> - <html><head/><body><p>Soglia usata dall'algoritmo di anti-ghosting. Una sogna bassa significa una elaborazione più aggressiva che può diminuire la gamma dinamica finale.</p></body></html? + <html><head/><body><p>Soglia usata dall'algoritmo di anti-ghosting. Una sogna bassa significa una elaborazione più aggressiva che può diminuire la gamma dinamica finale.</p></body></html> @@ -2313,7 +2636,7 @@ Enable this option for manual alignment or manual Anti-Ghosting. It's intended for users which a strong knowledge of the different HDR creation steps! - Abilita questa opzione per l'allineamento e l'anti-ghosting manuale. È mirata ad utenti con una buona conoscenza dei vari passi di creazione di un HDR + Abilita questa opzione per l'allineamento e l'anti-ghosting manuale. È mirata ad utenti con una buona conoscenza dei vari passi di creazione di un HDR! @@ -2339,12 +2662,12 @@ [2/2] Scegli le impostazioni per la creazione di HDR - + Profile Profilo - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2357,47 +2680,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Il primo profilo della lista dà generalmente buoni risultati. Cambialo solo se il risultato non è buono abbastanza.</span></p></body></html> - - Profile 1 - Profilo 1 + + Profile 1 - Debevec, Triangular, Linear + Profilo 1 - Debevec, Triangolare, Lineare - - Profile 2 - Profilo 2 + + Profile 2 - Debevec, Triangular, Gamma + Profilo 2 - Debevec, Triangolare, Gamma - - Profile 3 - Profilo 3 + + Profile 3 - Debevec, Plateau, Linear + Profilo 3 - Debevec, Plateau, Lineare - - Profile 4 - Profilo 4 + + Profile 4 - Debevec, Plateau, Gamma + Profilo 4 - Debevec, Plateau, Gamma - - Profile 5 - Profilo 5 + + Profile 5 - Debevec, Gaussian, Linear + Profilo 5 - Debevec, Gaussiana, Lineare - - Profile 6 - Profilo 6 + + Profile 6 - Debevec, Gaussian, Gamma + Profilo 6 - Debevec, Gaussiana, Gamma - + Use this only if the default profiles above do not yield good results Scegli questo solo se i profili predefiniti non danno un buon risultato - + Use Custom Configuration Usa configurazione personalizzata - + HDR Creation Model Modello di creazione dell'HDR @@ -2447,238 +2770,267 @@ Curva di risposta - + Linear Lineare - + Gamma Gamma - + Log Log - + sRGB sRGB - - Custom - Personalizzata + + Custom (From File) + Personalizzato (da file) - + Response Curve Input File File contenente la curva di risposta - + + Load Response + Carica risposta + + + Response Curve Output File File dove salvare la curva di risposta - + Save As... Salva come... - + Save Settings Salva parametri - + + Show HDR + Mostra HDR + + + + Show HDR Preview + Mostra anteprima HDR + + + + + Show Log + Mostra log + + + &Next > &Avanti > - + &Cancel A&nnulla - + Image Filename Immagine - + Exposure Esposizione - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Tutti i formati (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; Immagini TIFF (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Immagini RAW (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Carica le immagini iniziali - + Unknown Sconosciuto - + Loading... Caricando... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>ATTENZIONE:</b></h3></font> Luminance HDR non è stato capace di trovare i dati <i>EXIF</i> per le seguenti immagini:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul> <hr>Puoi ancora procedere alla creazione di un HDR, definendo <b>manualmente </b> il valore EV (exposure values) o la differenza in F/Stops. <hr>Se vuoi che Luminance HDR faccia questo <b>automaticamente</b>, devi caricare immagini che abbiano almeno i seguenti dati EXIF:: <ul><li>Shutter Speed (seconds)</li> <li>Aperture (f-number)</li></ul> <hr><b>NOTA:</b> Generalmente i dati EXIF vengono persi durante la postproduzione delle immagini.<br> Puoi effettuare una copia <b>uno-a-uno dei dati exif</b> tra due set di immagini utilizzando l'opzione:<i><b>"Strumenti->Copia Dati Exif..."</b></i>. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + </ul><hr>Luminance HDR ha inserito questi valori per te, separati di due stops.<br> Se la congettura è corretta puoi procedere alla creazione dell'HDR, altrimenti devi correggere <b>manualmente</b> i valori EV (exposure values). <hr>Nel futuro, per evitare la visualizzazione di questo avvertimento, dovresti caricare immagini che contengano perlomeno i seguenti dati exif: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>SUGGERIMENTO:</b> Generalmente la perdita dei dati EXIF avviene quando si pre processano le immagini con vari software grafici.<br>Puoi eseguire una <b>copia uno a uno dei dati exif</b> tra due insiemi di immagini dal menu <b>Strumenti->Copia i dati Exif...</b>. + + + + Do not show this message again + Non mostrare più questo messaggio - + EXIF data not found Dati EXIF non trovati - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Immagini Caricate.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><font color="#FF9500"><h3><b>Per procedere devi impostare manualmente i valori di esposizione.<br>Mancano ancora %1 valori.</b></h3></font></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + <center><font color="#ffaa00"><h3><b>Controllare che tutti i valori siano corretti prima di continuare.</h3></font></center> - + Loading Error: - Errore caricamento: + Errore caricamento: - + Start loading a set of images with different exposure Inizia col caricare un insieme di immagini con differente esposizione - - - + + + Error... Errore... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Impossibile eseguire l'applicazione "<em>align_image_stack</em>".<br>Leggere "Aiuto -> Sommario... -> Setting up ->External Tools" per maggiori informazioni. - + The external application "<em>align_image_stack</em>" crashed... L'applicazione "<em>align_image_stack</em>" e' andata in crash... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Un errore sconosciuto e' stato rilevato nell'esecuzione di "<em>align_image_stack</em>"... - + Now click on next button Fai ora click sul pulsante Avanti - + + Compute + Calcola + + + + Finish + Termina + + + Aligning... Sto allineando... - - - &Finish - &Termina + + &Compute + &Calcola - + Load camera response curve file Carica il file con la curva di risposta - + Camera response curve (*.m);;All Files (*) Curva di risposta della macchina fotografica (*.m);;Tutti i files (*) - + Invalid Response Curve File Curva di risposta non valida - + Invalid Response Curve File: please try a different file Curva di risposta non valida: si carichi un file differente - + Save a camera response curve file Salva un file con la curva di risposta - + Camera response curve (*.m) Curva di risposta della macchina fotografica (*.m) - - Weights: - Pesi: - - - - - Response curve: - - Curva di risposta: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Tutti i valori EV sono stati impostati.<br>Fai ora click sul pulsante Avanti.</b></h3></font></center> - - - Model: - - Modello: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><font color="#FF9500"><h3><b>Per procedere devi impostare manualmente i valori di esposizione.<br>Mancano ancora %1 valori.</b></h3></font></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Tutti i valori EV sono stati impostati.<br>Fai ora click sul pulsante Avanti.</b></h3></font></center> + + Hide Log + Nascondi log @@ -2690,7 +3042,7 @@ - + &File &File @@ -2716,7 +3068,7 @@ - + &Print... &Stampa... @@ -2732,7 +3084,7 @@ - + &Find... &Trova... @@ -2763,7 +3115,7 @@ - + &Add Bookmark &Aggiungi Segnalibro @@ -2779,7 +3131,7 @@ - + D&elete All Cancella &tutto @@ -2849,96 +3201,96 @@ &Anteprima di Stampa - + Help SideBar Barra laterale di aiuto - + LuminanceHDR Online Help Aiuto online di Luminance - + &Edit &Modifica - + &View &Visualizza - - + + &Bookmarks &Segnalibri - + &Quit &Esci - + Find &Next Trova &Successivo - + Find &Previous trova &Precedente - + &Contents &Sommario - + &Search &Cerca - + &Delete &Rimuovi - + Find Trova - + Search Term: Ricerca Parola: - + New Bookmark Nuovo Segnalibro - + New Bookmark's Title: Titolo del Nuovo Segnalibro: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Spiacente, il manuale non è installato!</p><p>Per favore contatta il fornitore del programma o il team di Luminancence HDR se hai compilato l'applicazione da te</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? Questo protocollo non è gestito dall' help browser. Vuoi aprire il link con l' applicazione predefinita associata con il protocollo? @@ -2997,22 +3349,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: Il seguente file non può essere letto: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: il file %1 ha un'estensione non supportata: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: eccezione mentre si legge %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + IOWorker: allocazione memoria non riuscita %1: %2 + + + IOWorker: failed loading file: %1 IOWorker: errore nel caricamento del file: %1 @@ -3020,7 +3377,7 @@ ImageQualityDialog - + Unknown Sconosciuta @@ -3071,9 +3428,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 Immagine LDR [%1 x %2]: %3 @@ -3153,7 +3510,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3670,7 +4027,7 @@ Ctrl+I - + Ctrl+I @@ -3699,7 +4056,7 @@ Ctrl+J - + Ctrl+J @@ -3746,7 +4103,7 @@ Ctrl+Z - + Ctrl+Z @@ -3975,7 +4332,7 @@ Ctrl+M - + Ctrl+M @@ -3990,7 +4347,7 @@ Ctrl+K - + Ctrl+K @@ -3998,21 +4355,16 @@ Documentazione &Online - - &Developers Web Site - Sito Web degli &sviluppatori - - - - &Luminance HDR Web Site - Sito Web di &Luminance HDR - - Open Online Documentation Web Site with the System Browser Apri il sito web della documentazione online con il browser di sistema + + &Developers Web Site + Sito Web degli &sviluppatori + + Developers Web Site Sito Web degli sviluppatori @@ -4023,6 +4375,11 @@ Apri il sito web degli sviluppatori con il browser di sistema + + &Luminance HDR Web Site + Sito Web di &Luminance HDR + + Luminance HDR Web Site Sito Web di Luminance HDR @@ -4038,70 +4395,64 @@ Pronto. Ora apri un'immagine HDR esistente o creane una nuova! - + All HDR formats - Tutti i formati HDR + Tutti i formati HDR - + Load one or more HDR images... Carica una o più immagini HDR... - + Save files in Salva i file in - - + + Failed to save %1 Errore nel salvare %1 - + Done! Fatto! - + Aborting... Operazione interrotta... - - - Untitled - Senza nome 1 - - - + Cropped Image Immagine ritagliata - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Sembra che si stia eseguendo la versione a 32-bit di <strong>Luminance HDR</strong> su un sistema a 64-bit. <br>Si consiglia di scaricare la versione a <strong>64-bit</strong> da <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> per una migliore esperienza nell'uso di Luminance HDR! - + Unsaved changes... Modifiche non salvate... - + This HDR image has unsaved changes.<br>Do you want to save it? Questa immagine HDR ha modifiche non salvate.<br>Vuoi salvarla? - + Fattal Warning Avvertimento per Fattal - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? Questo operatore di tomemapping dipende dalle dimensioni delle immagini in input. Applicando l'operatore all'immagine intera produrrà probabilmente un risultato differente. @@ -4109,22 +4460,27 @@ Vuoi continuare? - + + Untitled + Senza nome 1 + + + Untitled %1 Senza nome %1 - + Error: %1 Errore: %1 - + Untitled HDR HDR senza titolo - + FITS Image Immagine FITS @@ -4464,23 +4820,23 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Zone luminose</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Seleziona qui il metodo di clipping:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Bianco solido</span>: trasforma le zone luminose in bianco solido</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Non trasformare</span>: lascia le zone luminose come vari livelli di rosa</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Miscela</span>: Miscela i valori per un graduale passaggio verso il bianco</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Ricostruisci</span>: ricostruisce le zone luminose usando un livello soglia</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Zone luminose</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Seleziona qui il metodo di clipping:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Bianco solido</span><span style=" font-family:'Sans Serif'; font-size:10pt;">:: trasforma le zone luminose in bianco solido</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Non trasformare</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: lascia le zone luminose come vari livelli di rosa</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Miscela</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: miscela i valori per un graduale passaggio verso il bianco</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Ricostruisci</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: ricostruisce le zone luminose usando un livello soglia</span></p></body></html> @@ -4778,28 +5134,28 @@ &OK - + Restart Riavvia - + For the settings to take effect, please restart the application! Affinchè i nuovi settaggi abbiano effetto, per favore riavvia l'applicazione! - - + + Choose a directory Seleziona una directory - + Open ICC Profile Apri profilo ICC - + Color profile (*.icc *.ICC *.icm *.ICM) Profilo di colore (*.icc *.ICC *.icm *.ICM) @@ -4915,17 +5271,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ERRORE: Non riesco a caricare il file di impostazioni di tonemapping: - + ERROR: File too old, cannot parse Tone Mapping Setting file: ERRORE: FIle troppo vecchio, non riesco a caricare il file di impostazioni di tonemapping: - + ERROR: cannot parse Tone Mapping Setting file: ERRORE: Non riesco a caricare il file di impostazioni di tonemapping: @@ -4933,370 +5289,454 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - La qualità dev'essere compresa tra 1 (peggiore) e 5 (migliore) + La qualità dev'essere compresa tra 1 (peggiore) e 5 (migliore). - + NULL frame passed. puntatore al frame NULLO. - + Adding image Aggiungendo l'immagine - + to the web page alla pagina web - - - + + + Writing: Scrivendo: - - - - + + + + Warning Attenzione - + I cannot open monitor profile. Please select a different one. Non posso aprire il profilo del monitor. Selezionarne uno differente. - + I cannot open printer profile. Please select a different one. Non posso aprire il profilo della stampante. Selezionarne uno differente. - + Please select a printer profile . Selezionare un profilo della stampante. - + I cannot perform the color transform. Please select a different monitor profile. Non posso eseguire la trasformazione di colore. Selezionare un profilo del monitor differente. - - Triangular - Triangolare - - - - Plateau - Plateau - - - - Gaussian - Gaussiana - - - - Flat - Piatto - - - - Linear - Lineare - - - - Gamma - Gamma - - - - Logarithmic - Logaritmica - - - - sRGB - sRGB - - - - From Calibration/Input File - Da file di calibrazione - - - - Debevec - Debevec + + + + Weights= + Pesi= - - Robertson - Robertson + + + + - Response curve= + - Curva di risposta= - - Robertson Response Calculation - Calcolo risposta con Robertson + + + + - Model= + - Modello= - + PreGamma=%1 PreGamma=%1 - + Contrast Equalization Equalizza contrasto - + Contrast Contrasto - - + + Saturation Saturazione - + Detail Dettaglio - + Luminance Level Livello luminanza - + Luminance Level=Auto Livello luminanza=auto - + Color Saturation Saturazione colore - + Contrast Enhancement Miglioramento contrasto - + + Alpha Alpha - + Beta Beta - + NoiseRedux Riduzione rumore - + FFTSolver Solutore FFT - + Rho Rho - + InvAlpha InvAlpha - + + MaxLuminance + MaxLuminance + + + + AdaptationLuminance + AdaptationLuminance + + + + C1 + C1 + + + + C2 + C2 + + + simple semplice - + Equation 2 Equazione 2 - + Equation 4 Equazione 4 - - + + Local Locale - + Bias Bias - + Spatial Spaziale - - + + Range Intervallo - + Base Base - + Multiplier Moltiplicatore - + AutoLuminance AutoLuminance - + Cone Coni - + Rod Bastoncelli - + Key Key - + Phi Phi - + Scales: Scale: - + Lower Inferiore - + Upper Superiore - + Brightness Luminosità - + Chromatic Adaptation Adattamento cromatico - + Light Adaptation Adattamento luce - + + Pupil Area + Area pupilla + + + + PostSaturation=%1 + PostSaturazione=%1 + + + + PostGamma=%1 + PostGamma=%1 + + + + + HDR Preview + Anteprima HDR + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + Calcolo risposta con Robertson + + + + Triangular + Triangolare + + + + Plateau + Plateau + + + + Gaussian + Gaussiana + + + + Flat + Piatto + + + + Linear + Lineare + + + + Gamma + Gamma + + + + Logarithmic + Logaritmica + + + + sRGB + sRGB + + + + From Calibration or Input File + Da calibrazione o file di risposta + + + Option -v -a... Opzione -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. Luminance HDR richiede che il comando align_image_stack sia eseguito con l'opzione "-v" ma senza l'opzione "-a". Si sono corrette le opzioni fornite. - + Cannot convert %1 to a float Impossibile convertire %1 in un valore floating point - + Loading TMO settings from file: %1 Caricando le opzioni di tonemapping dal file: %1 - + Input file %1 File di input %1 - + Running in HDR-creation mode. Eseguendo in modalità creazione HDR. - + Running in Load-HDR mode. Eseguendo in modalità carica HDR. - + Temporary directory: %1 Cartella temporanea: %1 - - Using %n threads. - Si utilizza %n thread.Si utilizzano %n threads. + + Using %n thread(s). + Utilizzo %n thread.Utilizzo %n threads. - + Loading file %1 Caricando il file %1 - + Successfully loaded file %1. File %1 caricato con successo. + + The database used for saving TM parameters cannot be opened. +Error: %1 + Il database utilizzato per salvare i parametri di TM non può essere aperto: +Errore: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + Questa versione di Luminance HDR è stata compilata senza il supporto per alcuni algoritmi di demosaicing. +Le tue preferenze erano impostate per utilizzare uno degli algoritmi mancanti e ora sono state modificate per utilizzare il metodo AHD. +Per cambiare impostazione vai su Strumenti->Opzioni->Conversione RAW->Qualità + + All LDR formats Tutti i formati LDR - + Save the LDR image as... Salva le immagini LDR come... + All HDR formats + Tutti i formati HDR + + + Save the HDR image as... Salva l'immagine HDR come... - + Save as... Salva come... @@ -5367,247 +5807,65 @@ SavedParametersDialog - + Saved Parameters Parametri salvati - - + Comment Commento - + TM Operator Operatore TM + + + SavingParameters - - Simple - Semplice - - - - Equation 2 - Equazione 2 + + Saving Parameters + Salvataggio parametri - - Local Contrast Threshold - Soglia contrasto locale + + Enter a short comment for the saved parameters: + Immetti un breve commento per i parametri salvati: + + + SupportedCamerasDialog - - Bias - Bias + + List of supported cameras + Lista delle macchine fotografiche supportate - - Spatial Kernel Sigma - Spatial Kernel Sigma + + TextLabel + TextLabel - - Range Kernel Sigma - Range Kernel Sigma + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - Base Contrast - Contrasto base + + With LibRaw version + Con versione di LibRaw - - Alpha - Alpha + + models listed + modelli elencati - - Beta - Beta - - - - - Color Saturation - Saturazione colore - - - - Noise Reduction - Riduzione rumore - - - - Old Fattal - Vecchio Fattal - - - - Rho - Rho - - - - InvAlpha - InvAlpha - - - - Contrast Equalization - Equalizzazione contrasto - - - - Contrast Factor - Fattore di contrasto - - - - Saturation Factor - Fattore di saturazione - - - - Detail Factor - Fattore di dettaglio - - - - Contrast Enhancement - Miglioramento contrasto - - - - Luminance Level - Livello luminanza - - - - Manual Luminance Level - Livello luminanza manuale - - - - Cone and Rod based on Luminance - Coni e bastoncelli basati sulla luminanza - - - - Local Tonemapping - Tonemapping locale - - - - Cone Level - Livello coni - - - - Rod Level - Livello bastoncelli - - - - Multiplier - Moltiplicatore - - - - Use Scales - Usa scale - - - - Key Value - Parametro Key - - - - Phi Value - Parametro Phi - - - - Range - Intervallo - - - - Lower Scale - Scala inferiore - - - - Upper Scale - Scala superiore - - - - Brightness - Luminosità - - - - Chromatic Adaptation - Adattamento cromatico - - - - Light Adaptation - Adattamento luce - - - - Pre-gamma - Pre-gamma - - - - SavingParameters - - - Saving Parameters - Salvataggio parametri - - - - Enter a short comment for the saved parameters: - Immetti un breve commento per i parametri salvati: - - - - SupportedCamerasDialog - - - List of supported cameras - Lista delle macchine fotografiche supportate - - - - TextLabel - TextLabel - - - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - - - - With LibRaw version - Con versione di LibRaw - - - - models listed - modelli elencati - - - - search... - cerca... + + search... + cerca... @@ -5618,7 +5876,7 @@ TMOProgressIndicator - + Abort computation Ferma elaborazione @@ -5628,7 +5886,7 @@ Frame - + Frame @@ -5647,533 +5905,607 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Qui è possibile caricare e salvare un file di impostazioni di tonemapping.<br>E' anche possibile applicare i contenuti del file di impostazioni di tonemapping correntemente caricato. - - - - Tone Mapping Settings - Impostazioni tonemapping - - - - Save current parameters to a text file - Salva i parametri correnti in un file di testo - - - - Save current parameters (pregamma and TMO) to a text file. - Salva i parametri correnti (pregamma and TMO) in un file di testo. - - - - Load an existing text file containing pregamma and TMO settings - Carica un file di testo contenente i parametri pregamma e di tonemapping - - - - Load an existing text file containing pregamma and TMO settings. - Carica un file di testo contenente i parametri di pregamma e tonemapping. - - - - Save current parameters - Salva i parametri correnti - - - - Load saved parameters - Carica i parametri salvati - - - - Export - Esporta - - - - Fast export - Esportazione veloce - - - - Opens the current export direcotory. This can be changed in the preferences! - Apre la cartella di esportazione veloce. Si può cambiare nelle preferenze! - - - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Apri</span></a></p></body></html> - - - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Qui puoi applicare un valore di correzione gamma all'HDR.<br>La correzione gamma verrà applicata prima del tonemapping. - - - - Process - Processa - - - - Result Si&ze - &Dimensione risultato - - - - - Gamma applied before tonemapping - Gamma applicata prima del tonemapping - - - - Pre-&gamma - Pre-&gamma - - - - Restore pregamma's default value (1) - Ripristina il valore predefinito del pregamma (1) - - - - Size of the resulting LDR image - Dimensione dell'immagine LDR finale - - - - Here you can choose the size of the resulting LDR image. - Qui è possibile scegliere la dimensione dell'immagine finale. - - - - Set Custom Output Size - Definisci dimensione finale personalizzata - - - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Con questo bottone è possibile inserire un valore di <i>larghezza</i> per la dimensione dell'immagine LDR finale.<br>Dopo aver premuto Invio (Enter o Return) un valore di altezza verrà calcolato automaticamente e la nuova dimensione aggiunta alla lista. - - - - Start tonemapping (CTRL+T) - Inizia il tonemapping (CTRL+T) - - - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Usa i parametri correnti come sopra (pregamma e operatore di tonemapping) per calcolare l'immagine LDR - - - - &Update preview - &Aggiorna anteprima - - - - Ctrl+T - Ctrl+T - - - - Update current LDR - Aggiorna LDR corrente - - - - Auto Levels - Livelli automatici - - - - <html><head/><body><p>set auto levels threshold</p></body></html> - <html><head/><body><p>setta la soglia per l'aggiustamento automatico dei livelli</p></body></html> - - - + Tonemap Tonemap - + Mantiuk '06 Mantiuk '06 - + Mantiuk '08 Mantiuk '08 - + Fattal Fattal - + Ferradans Ferradans - + Drago Drago - + Durand Durand - + Reinhard '02 Reinhard '02 - + Reinhard '05 Reinhard '05 - + Ashikhmin Ashikhmin - + Pattanaik Pattanaik - + Mai Mai - - Operator - Operatore + + Ferwerda + Ferwerda - - Contrast Factor - Fattore di contrasto + + KimKautz + KimKautz - - Saturation Factor - Fattore di saturazione + + VanHateren + VanHateren - - Detail Factor - Fattore di dettaglio + + Lischinski + Lischinski - + + Operator + Operatore + + + + &Contrast Factor + Fattore di &contrasto + + + Contrast Equalization Equalizzazione del contrasto - - Predefined Display - Display predefinito + + &Detail Factor + Fattore di &dettaglio + + + + Saturat&ion Factor + Fattore di &saturazione - + Lcd Office LCD ufficio - + Lcd LCD - + Lcd Bright LCD luminoso - + CRT CRT - - - Color Saturation - Saturazione colore + + Co&lor Saturation + Saturazione co&lore - - Contrast Enhancement - Miglioramento contrasto + + Co&ntrast Enhancement + Miglioramento co&ntrasto - + Enable Luminace Level Abilita livello luminanza - - Luminance Level - Livello luminanza + + Lum&inance Level + L&ivello luminanza - - Alpha - Alpha + + Predefined &Display + &Display predefinito - - Beta - Beta + + A&lpha + A&lpha - - Noise Reduction - Riduzione rumore + + Bet&a + Bet&a + + + + Color Saturat&ion + Saturaz&ione colore + + + + &Noise Reduction + &Riduzione rumore - + Version 2.3.0 Versione 2.3.0 - - Inverse Alpha - Alpha Inverso + + &Inverse Alpha + Alpha &Inverso - + Rho Rho - - Bias - Bias + + B&ias + B&ias - - Spatial Kernel Sigma - Spatial kernel sigma + + Spatial &Kernel Sigma + Spatial &Kernel Sigma - - Range Kernel Sigma - Range kernel sigma + + Base Co&ntrast + Co&ntrasto base - - Base Contrast - Contrasto base + + Range Kerne&l Sigma + Range Kerne&l Sigma - - Key Value - Parametro Key + + Ph&i + Parametro P&hi - - Phi - Parametro Phi + + &Key Value + Parametro &Key - - Use Scales - Usa scale + + &Lower Scale + Scala &inferiore - - Range - Intervallo + + Upper S&cale + S&cala superiore - - Lower Scale - Scala inferiore + + Use Scales + Usa scale - - Upper Scale - Scala superiore + + Ra&nge + Ra&nge - - Brightness - Luminosità + + &Light Adaptation + Adattamento &luce - - Chromatic Adaptation - Adattamento cromatico + + Chromatic A&daptation + A&dattamento cromatico - - Light Adaptation - Adattamento luce + + Br&ightness + L&uminosità - - Local Contrast Threshold - Soglia contrasto locale + + Local Contrast Threshol&d + So&glia contrasto locale - + Simple Semplice - - Equation Number - Numero equazione + + Equation &Number + &Numero equazione - + Eqn &2 Eqn &2 - + Eqn &4 Eqn &4 - - Multiplier - Moltiplicatore - - - + Local Tone Mapping Tonemapping locale - + + Mu&ltiplier + Molt&iplicatore + + + Auto Cone/Rod Coni/bastoncelli automatici - - Cone Level - Livello coni + + Co&ne Level + Livello co&ni - - Rod Level - Livello bastoncelli + + Ro&d Level + Livello &bastoncelli - + This operator has no options Questo operatore non ha opzioni - + + &Multiplier + &Moltiplicatore + + + + A&daptation Luminance + Luminanza di a&dattamento + + + + &C1 + &C1 + + + + C&2 + C&2 + + + + Pup&il Area + Area pup&illa + + + + a&lpha mul + a&lpha mul + + + Restore operator's default values Ripristina i valori predefiniti dell'operatore - + Restore Ripristina - + Previous applied settings Impostazioni precedenti - + Previous Precedente - + Next applied settings Impostazioni successive - + Next Successivo - + + Start tonemapping (CTRL+T) + Inizia il tonemapping (CTRL+T) + + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Usa i parametri correnti come sopra (pregamma e operatore di tonemapping) per calcolare l'immagine LDR + + + + &Update preview + &Aggiorna anteprima + + + + Ctrl+T + Ctrl+T + + + + Update current LDR + Aggiorna LDR corrente + + + + Auto Levels + Livelli automatici + + + + <html><head/><body><p>set auto levels threshold</p></body></html> + <html><head/><body><p>setta la soglia per l'aggiustamento automatico dei livelli</p></body></html> + + + + Processing + Processa + + + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Qui puoi applicare un valore di correzione gamma all'HDR.<br>La correzione gamma verrà applicata prima del tonemapping. + + + + Res&ult Size + &Dimensione risultato + + + + Set Custom Output Size + Definisci dimensione finale personalizzata + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Con questo bottone è possibile inserire un valore di <i>larghezza</i> per la dimensione dell'immagine LDR finale.<br>Dopo aver premuto Invio (Enter o Return) un valore di altezza verrà calcolato automaticamente e la nuova dimensione aggiunta alla lista. + + + + + Gamma applied before tonemapping + Gamma applicata prima del tonemapping + + + + Pre-&gamma + Pre-&gamma + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + <html><head/><body><p>Ripristina pre-gamma al suo valore di default (1)</p></body></html> + + + + Pos&t-saturation + Post-sa&turazione + + + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + <html><head/><body><p>Ripristina post-saturazione al suo valore di default (1)</p></body></html> + + + + Post-gamma + Post-gamma + + + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + <html><head/><body><p>Ripristina post-gamma al suo valore di default (1)</p></body></html> + + + + ... + ... + + + + Settings + Impostazioni + + + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Qui è possibile caricare e salvare un file di impostazioni di tonemapping.<br>E' anche possibile applicare i contenuti del file di impostazioni di tonemapping correntemente caricato. + + + + Tone Mapping Settings + Impostazioni tonemapping + + + + Save current parameters to a text file + Salva i parametri correnti in un file di testo + + + + Save current parameters (pregamma and TMO) to a text file. + Salva i parametri correnti (pregamma and TMO) in un file di testo. + + + + Load an existing text file containing pregamma and TMO settings + Carica un file di testo contenente i parametri pregamma e di tonemapping + + + + Load an existing text file containing pregamma and TMO settings. + Carica un file di testo contenente i parametri di pregamma e tonemapping. + + + + Load saved parameters + Carica i parametri salvati + + + + Save current parameters + Salva i parametri correnti + + + + Export + Esporta + + + + Fast export + Esportazione veloce + + + + Opens the current export directory. This can be changed in the preferences! + Apri la cartella corrente di esportazione. Puoi cambiarla dalle opzioni! + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Apri</span></a></p></body></html> + + + Queue size: %1 Dimensione coda %1 - + TM Database Problem Problema al database TM - + The database used for saving TM parameters cannot be opened. Error: %1 Il database utilizzato per salvare i parametri di TM non può essere aperto: Errore: %1 - + Load a tonemapping settings text file... Carica un file di impostazioni di tonemapping... - - + + LuminanceHDR tonemapping settings text file (*.txt) File di impostazione per tonemapping (*.txt) - - - - + + + + Aborting... Operazione interrotta... - + File is not readable (check existence, permissions,...) Il File non è accessibile (controllarne l'esistenza, i permessi,...) - + Save tonemapping settings text file to... Salve il file di impostazioni di tonemapping in... - + File is not writable (check permissions, path...) Errore di accesso in scrittura al file (controllarne i permessi, il percorso,...) - + File is not readable (check permissions, path...) Errore di accesso in lettura al file (controllarne i permessi, il percorso,...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Errore: Il formato delle opzioni di tonemapping è cambiato. Questo (vecchio) file non può essere usato dalla versione corrente di Luminance HDR. Creane uno nuovo. - + Custom LDR size Dimensione LDR personalizzata - + Enter the width of the new size: Specifica la larghezza della nuova immagine: @@ -6323,19 +6655,19 @@ &Avvia - - + + All Supported formats Tutti i formati supportati - - + + Select the input images Carica le immagini iniziali - + &Done &Fatto @@ -6343,39 +6675,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Il documento della licenza non e' stato trovato, lo si puo' trovare online seguendo %2questo link%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 La lista dei cambiamenti non è stata trovata, la si può trovare online: %2quì%3 - + Donation Donazione - + Would you like to donate? Vuoi fare una donazione? - + Yes, I'd love to! Si, mi piacerebbe! - + Stop Bothering Me No, non voglio - + Remind me later Richiedimelo più tardi @@ -6383,18 +6715,18 @@ UpdateChecker - + A new release is ready for download! Una nuova versione è pronta per il download! - - + + Do you want to open the webpage for download now? Vuoi aprire una pagina web per il download adesso? - + Click to download, or select Help->Update! Clicca per scaricare, o seleziona Aiuto->Aggiorna! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_nl.ts luminance-hdr-2.6.0/i18n/lang_nl.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_nl.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_nl.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + Over Luminance HDR @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,77 +30,128 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&teurs - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To - + &Dank aan - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + Wijzigingen - + &License Agreement - + &Licentieovereenkomst - + &OK - + &OK @@ -104,291 +159,341 @@ Batch HDR - + Batch HDR Number of bracketed images: - + Aantal verschillende afbeeldingen: Select the number of bracketed pictures used to create the HDRs - + Kies het aantal afbeeldingen met verschillende belichting die gebruikt zijn om de HDRs te maken. Output - + Uitvoer - + Choose an HDR output file format - - - - - Predefined profile: - + Kies een HDR uitvoerbestandstype - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profiel 1 - + Profile 2 Profiel 2 - + Profile 3 Profiel 3 - + Profile 4 Profiel 4 - + Profile 5 Profiel 5 - + Profile 6 Profiel 6 - - Alignment + + Output format: + Uitvoer type: + + + + hdr_ - - Auto align the bracketed pictures + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> - - Auto-align images + + Use Proposed Filename Scheme - - Use MTB (Median Threshold Bitmap) engine + + Response: - - &MTB + + Weights: - - Use Hugin's align_image_stack engine + + Predefined profile: + Voorgedefinieerd profiel: + + + + Model: - - Hugin's align_&image_stack + + Debevec - - Auto-crop + + Triangular - - &Cancel + + Linear - + + Alignment + Uitlijning + + + + Use Hugin's align_image_stack engine + Hugin's align_image_stack engine gebruiken + + + + Hugin's align_&image_stack + Hugin's align_&image_stack + + + + Use MTB (Median Threshold Bitmap) engine + MTB (Median Threshold Bitmap) engine gebruiken + + + + &MTB + &MTB + + + + Auto align the bracketed pictures + Verschillend belichte foto's automatisch uitlijnen + + + + Auto-align images + Afbeeldingen automatisch uitlijnen + + + + Auto-crop + Auto-bijsnijden + + + + &Cancel + &Annuleren + + + &Start - + &Start - + &Close - + &Afsluiten - + Progress - + Voortgang - + Input/Output - + Invoer/Uitvoer - + Folder where created HDRs are saved - + Map voor opslag van gemaakte HDRs - - + + Select... - + Selecteer... - + Folder where bracketed pictures are located (in alphabetical order) - + Map met foto's met verschillende belichting (in alfabetische volgorde) - + Input folder: - + Invoermap: - + Output folder: - + Uitvoermap: - + Anti-ghosting - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + High Dynamic Range Afbeeldingen zonder artifacten - + Threshold - + Drempelwaarde - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Drempelwaarde die gebruikt wordt door het anti-ghosting algoritme. Een lagere waarde betekent een agressievere bewerking. Dat kan leiden tot een lager dynamisch bereik in het resultaat. Gebruik de &quot;Herbereken&quot; knop om de feitelijk gebruikte bedekking te bekijken en pas de drempelwaarde overeenkomstig aan.</p></body></html> - + O. Gallo and others - + O. Gallo en anderen - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + <html><head/><body><p>Anti-ghosting algoritme inschakelen</p></body></html> - + Auto anti-ghosting - + Auto anti-ghosting - + Custom config %1 - + Eigen config %1 - + Choose a source directory - + Kies een brondirectory - + Choose a output directory - + Kies een uitvoerdirectory - - - + + + Warning Waarschuwing - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Totaal aantal foto's moet veelvoud van het aantal afbeeldingen met verschillende belichting zijn. - + Started processing... - + Bewerken gestart... - + Loading files... - + Bestanden laden... - + Completed with errors - + Gereed met fouten - + Completed without errors - + Gereed zonder fouten - + Error: missing EXIF data - + Fout: EXIF data ontbreekt - + Aligning... - + Uitlijnen... - + Creating HDR... - + HDR maken... - + Doing auto anti-ghosting... - + Auto anti-ghosting uitvoeren... - + Written - + Geschreven - + Error: - + Fout: - + Aborting... - + Afbreken... @@ -396,875 +501,1014 @@ Batch Tone Mapping - + Batch Tone Mapping HDR Images to Convert - + Te converteren HDR afbeeldingen List of HDRs that will be tone mapped - + Lijst van HDRs die getonemapped worden - - Add Directory (Alt+D) - + + Remove Files (Alt+R) + Bestanden verwijderen (Alt+V) - - Alt+D - + + Alt+R + Alt+V - - Add Files (Alt+F) + + Remove All Files (Alt+X) - - Alt+F + + + ... - - Remove Files (Alt+R) + + Alt+X - - Alt+R - + + Add Files (Alt+F) + Bestanden toevoegen (Alt+B) - - Tone Mapping Settings - + + Alt+F + Alt+B - Add Directory (Alt+I) - + Add Directory (Alt+D) + Directory toevoegen (Alt+D) - Alt+I - + Alt+D + Alt+D + + + + Tone Mapping Settings + Tone Mapping Instellingen - + Add Files (Alt+L) - + Bestanden toevoegen (Alt+L) - + Alt+L - + Alt+L + + + + Add Directory (Alt+I) + Directory Toevoegen (Alt+I) + + + + Alt+I + Alt+I - + Add from Database (Alt+B) - + Toevoegen uit Database (Alt+B) - + Alt+B - + Alt+B - + Remove Settings (Alt+M) - + Instellingen verwijderen (Alt+M) - + Alt+M + Alt+M + + + + Remove All Settings (Alt+W) - - List of Tone Mapping Setting files that will be used to tone map each HDR + + Alt+W - + + List of Tone Mapping Setting files that will be used to tone map each HDR + Lijst met Tone Mapping instellingsbestanden die gebruikt worden om elke HDR te tone mappen + + + Output - + Uitvoer - + Output Image Width: - + Breedte uitvoerbestand: - + Output Folder: - + Uitvoermap: - - + + Specify output folder for the tone mapped files - + Geef de uitvoermap voor de tone mapped bestanden op - + Selec&t... - + Selec&teer... - - + + Width of tonemapped image in percent of original image - + Breedte van getonemapte afbeelding in procenten van het origineel - + % - + % - + Output Format: - + Uitvoertype: - + Image format of tonemapped images - + Afbeeldingstype van getonemapte afbeeldingen - + Image format options - + Afbeeldingstype opties - + Conversion Log - + Conversie Log - + Batch operations report - + Batchverwerkingsrapport - + Show onl&y: - + Toon all&een: - + Filter messages based on severity - + Filter berichten op zwaarte - + All messages - + Alle berichten - + Errors only - + Alleen foutmeldingen - + Success messages - + Succesmeldingen - + Filter &log messages: - + Filter &logberichten: - + Clear filter text - + Filtertekst wissen - + Overall completion progress - + Voortgang van het proces - + &Cancel - + &Annuleren - + Start batch tone mapping - + Start batch tone mapping - + &Start - + &Start - + Using %n thread(s) - - - + + + Choose a directory - + Kies een directory - + All HDR images - + Alle HDR afbeeldingen - + Select input images - + Selecteer invoerafbeeldingen - + Load tone mapping settings text files... - + Tone mapping instellingen tekstbestanden laden... - + Luminance HDR tone mapping settings text file (*.txt) + Luminance HDR tone mapping instellingen tekstbestand (*.txt) + + + + Warning + Waarschuwing + + + + An error occurred reading one or more tonemapping options files. - + Processing... - + Verwerken ... - + Start processing... - + Start verwerking... - + Close - + Sluiten - + &Done + &Gereed + + + + Conversion aborted by user request. - + All tasks completed. - + Alle taken gereed. - + Aborting... - + Afbreken... BatchTMJob - + [T%1] Start processing %2 - + [T%1] Start verwerking %2 - + [T%1] Successfully load %2 + [T%1] Succesvol laden %2 + + + + [T%1] ERROR: Failed to tonemap file: %2 - + [T%1] Successfully saved LDR file: %2 - + [T%1] LDR bestand succesvol opgeslagen: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] FOUT: Kan niet opslaan in bestand: %2 - + [T%1] ERROR: Loading of %2 failed - + [T%1] FOUT: Laden van %2 mislukt CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Gebruik: %1 [OPTIES]... [INVOERBESTANDEN]... - + Display this help. - + Toon deze hulp. - + Display program version. - + Toon programmaversie. - + Print more messages during execution. - + Laat meer berichten zien tijdens uitvoering. - + Print a list of all supported cameras. - + Print een lijst van alle ondersteunde camera's. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + [AIS|MTB] Uitlijnmechanisme voor gebruik tijdens aanmaak van HDR (default: geen uitlijning). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + EV1,EV2,... Specificeer numerieke EV waarden (evenveel als INVOERBESTANDEN). - + prefix Save aligned images to files which names start with prefix - + prefix uitgelijnde afbeeldingen opslaan als bestanden waarvan de namen met de prefix beginnen - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Laad een HDR in plaats van een nieuwe aanmaken. - + HDR_FILE Save to a HDR file format. (default: don't save) - + HDR_FILE Opslaan in een HDR bestandsformaat. (default: niet opslaan) - + VALUE Gamma value to use during tone mapping. (default: 1) + WAARDE Gamma waarde voor gebruik tijdens tonemappen. (default: 1) + + + + VALUE Saturation value to use after tone mapping. (default: 1) - - VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + VALUE Gamma value to use after tone mapping. (default: 1) - + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + WAARDE Aangepaste breedte voor de HDR (schalen voor uitvoeren van gamma en tonemappen) + + + LDR_FILE File name you want to save your tone mapped LDR to. - + LDR_FILE Bestandsnaam voor het opslaan van de getonemapte LDR. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + DREMPEL Anti-ghosting aanzetten met deze drempelwaarde. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Niveaus automatisch corrigeren na tonemappen. - + Enable generation of a webpage with embedded HDR viewer. + Aanmaken van webpagina met ingesloten HDR viewer inschakelen. + + + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. - - HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. - + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR + HDR aanmaakparameters - u moet ofwel een bestaand HDR bestand laden (via de -l optie) of INVOERBESTANDEN opgeven om een nieuwe HDR te maken. + + + weight = triangular|gaussian|plateau|flat (Default is triangular) - + gewicht = driehoekig|gaussisch|plateau|plat (Default: driehoekig) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + responskromme = uit_bestand|lineair|gamma|log|srgb (Default: lineair) - + model: robertson|robertsonauto|debevec (Default is debevec) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + bestandsnaam voor kromme = uw_bestand_hier.m - + LDR output parameters - + LDR uitvoerparameters - + VALUE Quality of the saved tone mapped file (1-100). - + WAARDE Kwaliteit van het opgeslagen getonemapte bestand (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff format. geldige waardes zijn [8b|16b|32b|logluv] (Default: 8b) - + Tiff deflate compression. true|false (Default is true) - + Tiff deflatie compressie. waar|onwaar (Default: waar) - + HTML output parameters - + HTML uitvoerparameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + WAARDE Kwaliteit van de geïnterpoleerde belichtingen, van slechtst (1) tot best (4). Een hogere kwaliteit zorgt voor minder vervorming in de lichtste en donkerste kleurtonen, maar genereert ook meer afbeeldingen. Dat betekent dat er meer data overgezet moet worden naar de webbrowser, waardoor de HDR viewer trager reageert. (Default: 2, voldoende voor de meeste toepassingen) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specificeert de bestandsnaamvoor de aan te maken webpagina. Als <page_name> ontbreekt wordt de naam van de eerste afbeelding met .html extension. (Default: naam van de eerste afbeelding) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Specificeer waar de aangemaakte afbeeldingen moeten worden opgeslagen. Dit moet een relatief pad zijn en de directory moet bestaan. Nuttig om vervuiling in de huidige directory tegen te gaan. (Default: de huidige werkdirectory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - + Tonemapping parameters - er wordt geen tonemapping uitgevoerd tenzij -o is meegegeven - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + INSTELLING_BESTAND Laad een bestaand instellingenbestand met daarin pre-gamma en alle TMO instellingen - + Fattal - + Fattal - + + alpha FLOAT - + alpha FLOAT - + beta FLOAT - + beta FLOAT - + color FLOAT - + kleur FLOAT - + noise FLOAT - + ruis FLOAT - + new true|false - + nieuw waar|onwaar - + Ferradans - + Ferradans - + rho FLOAT - + rho FLOAT - + inv_alpha FLOAT + inv_alpha FLOAT + + + + Ferwerda - - Mantiuk 06 + + mul FLOAT - - contrast FLOAT + + adapt_lum FLOAT - - saturation FLOAT + + KimKautz - - detail FLOAT + + c1 FLOAT - - equalization true|false + + c2 FLOAT - + + Mantiuk 06 + Mantiuk 06 + + + + contrast FLOAT + contrast FLOAT + + + + saturation FLOAT + verzadiging FLOAT + + + + detail FLOAT + detail FLOAT + + + + equalization true|false + equalisatie waar|onwaar + + + Mantiuk 08 - + Mantiuk 08 - + color saturation FLOAT - + kleurverzadiging FLOAT - + contrast enhancement FLOAT - + contrastverbetering FLOAT - + luminance level FLOAT - + luminantieniveau FLOAT - + enable luminance level true|false - + luminantieniveau inschakelen waar|onwaar - + Durand - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + basis contrast FLOAT - + Drago - + Drago - + bias FLOAT - + bias FLOAT - + Reinhard 02 - + Reinhard 02 - + key value FLOAT - + sleutelwaarde FLOAT - + phi FLOAT - + phi FLOAT - + use scales true|false - + schalen gebruiken waar|onwaar - + range FLOAT - + bereik FLOAT - + lower scale FLOAT - + onderste schaal FLOAT - + upper scale FLOAT - + bovenste schaal FLOAT - + Reinhard 05 - + Reinhard 05 - + Brightness FLOAT - + Helderheid FLOAT - + Chroma adaption FLOAT - + Chroma aanpassing FLOAT - + Light adaption FLOAT - + Licht aanpassing FLOAT - + Ashikmin - + Ashikmin - + Equation number 2 true|false - + Vergelijking nummer 2 waar|onwaar - + Simple true|false - + Eenvoudig waar|onwaar - + Local threshold FLOAT - + Lokale drempel FLOAT - + Pattanaik - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Lokale tonemapping waar|onwaar - + Auto luminance true|false - + Automatische luminantie waar|onwaar - + cone level FLOAT - + kegelniveau FLOAT - + rod level FLOAT + staafniveau FLOAT + + + + VanHateren - - Luminance HDR version + + pupil_area FLOAT - - With LibRaw version + + Lischinski - + + Luminance HDR version + Luminance HDR versie + + + + With LibRaw version + Met LibRaw versie + + + models listed + lijst modellen + + + + + Error: Unsupported LDR file type. - - Error: htmlQuality must be in the range [1..4]. + + + Error: Unsupported HDR file type. - + + Error: htmlQuality must be in the range [1..4]. + Fout: htmlKwaliteit moet in bereik [1..4] liggen. + + + Error: Alignment engine not recognized. - + Fout: Uitlijnengine niet herkend. - + Error: Unknown weight function specified. - + Fout: Onbekende gewichtsfunctie opgegeven. - + Error: Unknown response curve specified. - + Fout: Onbekende responscurce opgegeven. - + Error: Unknown HDR creation model specified. - + Fout: Onbekend HDR creatiemodel opgegeven. - + Error: Unknown tone mapping operator specified. - + Fout: Onbekende tonemappingbewerker opgegeven. - - + + Error: The specified file with TMO settings could not be parsed! - + Fout: Het opgegeven bestand met TMO instellingen kon niet ingelezen worden! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Fout: Het opgegeven bestand met TMO instellingen kon niet ingelezen worden! %1 - + Error: Quality must be in the range [1..100]. - + Fout: Kwaliteit moet in bereik [1..100] liggen. - + Error: Unknown tiff format. - + Fout: Onbekend tiff formaat. - + Error: Threshold must be in the range [0..1]. - + Fout: Drempelwaarde moet in bereik [0..1] liggen. - + Error: The number of EV values specified is different from the number of input files. - + Fout: Het aantal opgegeven EV waarden is anders dan het aantal invoerbestanden. - + Load file %1 failed - + Laden van bestand %1 mislukt - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - + Fout: Exifdata ontbreekt in de afbeeldingen en EV waarden zijn niet opgegeven op de commandline, verwerking afgebroken. - + EV values have been assigned. - + EV waarden zijn toegewezen. - - + + Starting aligning... - + Starten met uitlijnen... - + Failed executing align_image_stack - + Uitvoeren align_image_stack mislukt - + Failed aligning images. - + Uitlijnen van afbeeldingen mislukt. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1303,7 +1547,7 @@ &Cancel - + &Annuleren @@ -1342,47 +1586,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable - + R&eference - + Select the previous image in both lists - + Select the next image in both lists - + Choose a directory and a prefix @@ -1415,7 +1659,7 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. +This image's histogram is displayed in the widget above. @@ -1574,17 +1818,17 @@ O. Gallo and others - + O. Gallo en anderen <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + <html><head/><body><p>Anti-ghosting algorithme inschakelen</p></body></html> Auto anti-ghosting - + Auto anti-ghosting @@ -1604,7 +1848,7 @@ Threshold - + Drempelwaarde @@ -1614,7 +1858,7 @@ <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Drempelwaarde die gebruikt wordt door het anti-ghosting algorithme. Een lagere waarde betekent een agressievere bewerking. Dat kan leiden tot een lager dynamisch bereik in het resultaat. Gebruik de &quot;Herbereken&quot; knop om de feitelijk gebruikte bedekking te bekijken en pas de drempelwaarde overeenkomstig aan.</p></body></html> @@ -1829,7 +2073,7 @@ &Cancel - + &Annuleren @@ -1852,7 +2096,7 @@ Output folder: - + Uitvoermap: @@ -1882,7 +2126,7 @@ Select... - + Selecteer... @@ -1895,18 +2139,18 @@ - + Choose a directory - + Kies een directory - - + + Error: - + Fout: - + must be a directory. @@ -1940,7 +2184,7 @@ Select... - + Selecteer... @@ -2008,22 +2252,22 @@ Alignment - + Uitlijning Auto-crop - + Auto-bijsnijden &MTB - + &MTB Hugin's align_&image_stack - + Hugin's align_&image_stack @@ -2066,28 +2310,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2095,7 +2339,7 @@ GenericViewer - + Pan the image to a region @@ -2108,45 +2352,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + Sluiten + + + HdrViewer - + &Mapping: - + Histogram: - + Linear - + Gamma 1.4 - + Gamma 1.8 - + Gamma 2.2 - + Gamma 2.6 @@ -2170,7 +2427,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2206,11 +2463,11 @@ Alignment - + Uitlijning - &MTB + M&TB @@ -2220,23 +2477,23 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack Auto-crop - + Auto-bijsnijden Anti-ghosting - + Anti-ghosting Threshold - + Drempelwaarde @@ -2246,7 +2503,7 @@ <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + <html><head/><body><p>Drempelwaarde die gebruikt wordt door het anti-ghosting algorithme. Een lagere waarde betekent een agressievere bewerking. Dat kan leiden tot een lager dynamisch bereik in het resultaat. Gebruik de &quot;Herbereken&quot; knop om de feitelijk gebruikte bedekking te bekijken en pas de drempelwaarde overeenkomstig aan.</p></body></html> @@ -2256,7 +2513,7 @@ Auto anti-ghosting - + Auto anti-ghosting @@ -2283,12 +2540,12 @@ - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2297,47 +2554,47 @@ - - Profile 1 - Profiel 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profiel 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profiel 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profiel 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profiel 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profiel 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results - + Use Custom Configuration - + HDR Creation Model @@ -2387,237 +2644,266 @@ - + Linear - + Gamma - + Log - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > - + &Cancel - + &Annuleren - + Image Filename - + Exposure - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images - + Unknown - + Loading... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - + + Do not show this message again + + + + EXIF data not found - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> - + Loading Error: - + Start loading a set of images with different exposure - - - + + + Error... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... - + Now click on next button - - Aligning... + + Compute - - - &Finish + + Finish + + + + + Aligning... + Uitlijnen... + + + + &Compute - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - - - - - - Response curve: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + + Hide Log @@ -2630,7 +2916,7 @@ - + &File @@ -2656,7 +2942,7 @@ - + &Print... @@ -2672,7 +2958,7 @@ - + &Find... @@ -2703,7 +2989,7 @@ - + &Add Bookmark @@ -2719,7 +3005,7 @@ - + D&elete All @@ -2789,96 +3075,96 @@ - + Help SideBar - + LuminanceHDR Online Help - + &Edit - + &View - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Delete - + Find - + Search Term: - + New Bookmark - + New Bookmark's Title: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show - + LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? @@ -2936,22 +3222,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2959,7 +3250,7 @@ ImageQualityDialog - + Unknown @@ -2999,7 +3290,7 @@ &Cancel - + &Annuleren @@ -3010,9 +3301,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3071,19 +3362,19 @@ &Cancel - + &Annuleren &OK - + &OK MainWindow - + Luminance HDR @@ -3928,18 +4219,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3953,6 +4239,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3968,91 +4259,90 @@ - + All HDR formats - + Load one or more HDR images... - + Save files in - - + + Failed to save %1 - + Done! - + Aborting... - - - - - - Untitled - + Afbreken... - + Cropped Image - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + + + + Untitled %1 - + Error: %1 - + Untitled HDR - + FITS Image @@ -4353,13 +4643,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4591,36 +4881,36 @@ &Cancel - + &Annuleren &OK - + &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory - + Kies een directory - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4725,28 +5015,28 @@ &Cancel - + &Annuleren &OK - + &OK QApplication - + ERROR: cannot load Tone Mapping Setting file: - + ERROR: File too old, cannot parse Tone Mapping Setting file: - + ERROR: cannot parse Tone Mapping Setting file: @@ -4754,634 +5044,533 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning Waarschuwing - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - - - - - Plateau - - - - - Gaussian - - - - - Flat - - - - - Linear - - - - - Gamma - - - - - Logarithmic - - - - - sRGB - - - - - From Calibration/Input File - - - - - Debevec + + + + Weights= - - Robertson + + + + - Response curve= - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization - + Contrast - - + + Saturation - + Detail - + Luminance Level - + Luminance Level=Auto - + Color Saturation - + Contrast Enhancement - + + Alpha - + Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias - + Spatial - - + + Range - + Base - + Multiplier - + AutoLuminance - + Cone - + Rod - + Key - + Phi - + Scales: - + Lower - + Upper - + Brightness - + Chromatic Adaptation - + Light Adaptation - - Option -v -a... - - - - - LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - - - - - Cannot convert %1 to a float - - - - - Loading TMO settings from file: %1 - - - - - Input file %1 - - - - - Running in HDR-creation mode. - - - - - Running in Load-HDR mode. - - - - - Temporary directory: %1 - - - - - Using %n threads. - - - - - Loading file %1 - - - - - Successfully loaded file %1. - - - - - All LDR formats - - - - - Save the LDR image as... - - - - - Save the HDR image as... - - - - - Save as... - - - - - ResizeDialog - - - Scale Image - - - - - Hdr Image Size - - - - - Restore original size + + Pupil Area - - &Reset + + PostSaturation=%1 - - Switch between pixels or percentage + + PostGamma=%1 - - Pixels + + + HDR Preview - - Percent + + Debevec - - Result size + + Robertson - - Height: + + Robertson Response Calculation - - Width: + + Triangular - - &Cancel + + Plateau - - &Scale + + Gaussian - - - SavedParametersDialog - - Saved Parameters + + Flat - - - Comment + + Linear - - TM Operator + + Gamma - - Simple + + Logarithmic - - Equation 2 + + sRGB - - Local Contrast Threshold + + From Calibration or Input File - - Bias + + Option -v -a... - - Spatial Kernel Sigma + + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - - Range Kernel Sigma + + Cannot convert %1 to a float - - Base Contrast + + Loading TMO settings from file: %1 - - Alpha + + Input file %1 - - Beta + + Running in HDR-creation mode. - - - Color Saturation + + Running in Load-HDR mode. - - Noise Reduction + + Temporary directory: %1 - - - Old Fattal - + + + Using %n thread(s). + - - Rho + + Loading file %1 - - InvAlpha + + Successfully loaded file %1. - - Contrast Equalization + + The database used for saving TM parameters cannot be opened. +Error: %1 - - Contrast Factor + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality - - Saturation Factor + + All LDR formats - - Detail Factor + + Save the LDR image as... - - Contrast Enhancement + + All HDR formats - - Luminance Level + + Save the HDR image as... - - Manual Luminance Level + + Save as... + + + ResizeDialog - - Cone and Rod based on Luminance + + Scale Image - - Local Tonemapping + + Hdr Image Size - - Cone Level + + Restore original size - - Rod Level + + &Reset - - Multiplier + + Switch between pixels or percentage - - Use Scales + + Pixels - - Key Value + + Percent - - Phi Value + + Result size - - Range + + Height: - - Lower Scale + + Width: - - Upper Scale - + + &Cancel + &Annuleren - - Brightness + + &Scale + + + SavedParametersDialog - - Chromatic Adaptation + + Saved Parameters - - Light Adaptation + + Comment - - Pre-gamma + + TM Operator @@ -5439,7 +5628,7 @@ TMOProgressIndicator - + Abort computation @@ -5454,7 +5643,7 @@ Threshold - + Drempelwaarde @@ -5468,530 +5657,604 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + + Tonemap - - Tone Mapping Settings + + Mantiuk '06 - - Save current parameters to a text file + + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. + + Fattal - - Load an existing text file containing pregamma and TMO settings + + Ferradans - - Load an existing text file containing pregamma and TMO settings. + + Drago - - Save current parameters + + Durand - - Load saved parameters + + Reinhard '02 - - Export + + Reinhard '05 - - Fast export + + Ashikhmin - - Opens the current export direcotory. This can be changed in the preferences! + + Pattanaik - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Mai - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + + Ferwerda + + + + + KimKautz + + + + + VanHateren - - Process + + Lischinski - - Result Si&ze + + Operator + + + + + &Contrast Factor + + + + + Contrast Equalization + + + + + &Detail Factor - - Gamma applied before tonemapping + Saturat&ion Factor - - Pre-&gamma + + Lcd Office - - Restore pregamma's default value (1) + + Lcd - - Size of the resulting LDR image + + Lcd Bright - - Here you can choose the size of the resulting LDR image. + + CRT - - Set Custom Output Size + + Co&lor Saturation - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + + Co&ntrast Enhancement - - Start tonemapping (CTRL+T) + + Enable +Luminace Level - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + Lum&inance Level - - &Update preview + + Predefined &Display - - Ctrl+T + + A&lpha - - Update current LDR + + Bet&a - - Auto Levels + + Color Saturat&ion - - <html><head/><body><p>set auto levels threshold</p></body></html> + + &Noise Reduction - - Tonemap + + Version 2.3.0 - - Mantiuk '06 + + &Inverse Alpha - - Mantiuk '08 + + Rho - - Fattal + + B&ias - - Ferradans + + Spatial &Kernel Sigma - - Drago + + Base Co&ntrast - - Durand + + Range Kerne&l Sigma - - Reinhard '02 + + Ph&i - - Reinhard '05 + + &Key Value - - Ashikhmin + + &Lower Scale - - Pattanaik + + Upper S&cale - - Mai + + Use Scales - - Operator + + Ra&nge - - Contrast Factor + + &Light Adaptation - - Saturation Factor + + Chromatic A&daptation - - Detail Factor + + Br&ightness - - Contrast Equalization + + Local Contrast Threshol&d - - Predefined Display + + Simple - - Lcd Office + + Equation &Number - - Lcd + + Eqn &2 - - Lcd Bright + + Eqn &4 - - CRT + + Local Tone Mapping - - - Color Saturation + + Mu&ltiplier - - Contrast Enhancement + + Auto Cone/Rod - - Enable -Luminace Level + + Co&ne Level - - Luminance Level + + Ro&d Level - - Alpha + + This operator has no options - - Beta + + &Multiplier - - Noise Reduction + + A&daptation Luminance - - Version 2.3.0 + + &C1 - - Inverse Alpha + + C&2 - - Rho + + Pup&il Area - - Bias + + a&lpha mul - - Spatial Kernel Sigma + + Restore operator's default values - - Range Kernel Sigma + + Restore - - Base Contrast + + Previous applied settings - - Key Value + + Previous - - Phi + + Next applied settings - - Use Scales + + Next - - Range + + Start tonemapping (CTRL+T) - - Lower Scale + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - Upper Scale + + &Update preview - - Brightness + + Ctrl+T - - Chromatic Adaptation + + Update current LDR - - Light Adaptation + + Auto Levels - - Local Contrast Threshold + + <html><head/><body><p>set auto levels threshold</p></body></html> - - Simple + + Processing - - Equation Number + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - - Eqn &2 + + Res&ult Size - - Eqn &4 + + Set Custom Output Size - - Multiplier + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - - Local Tone Mapping + + + Gamma applied before tonemapping - - Auto Cone/Rod + + Pre-&gamma - - Cone Level + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> - - Rod Level + + Pos&t-saturation - - This operator has no options + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> - - Restore operator's default values + + Post-gamma - - Restore + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> - - Previous applied settings + + ... - - Previous + + Settings - - Next applied settings + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - - Next + + Tone Mapping Settings + Tone Mapping Instellingen + + + + Save current parameters to a text file + + + + + Save current parameters (pregamma and TMO) to a text file. + + + + + Load an existing text file containing pregamma and TMO settings + + + + + Load an existing text file containing pregamma and TMO settings. + + + + + Load saved parameters + + + + + Save current parameters + + + + + Export + + + + + Fast export + + + + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... - + Afbreken... - + File is not readable (check existence, permissions,...) - + Save tonemapping settings text file to... - + File is not writable (check permissions, path...) - + File is not readable (check permissions, path...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size - + Enter the width of the new size: @@ -6098,32 +6361,32 @@ Show onl&y: - + Toon all&een: Filter messages based on severity - + Filter boodschappen op zwaarte All messages - + Alle berichten Errors only - + Alleen foutmeldingen Filter &log messages: - + Filter &logberichten: Clear filter text - + Filtertekst wissen @@ -6133,67 +6396,67 @@ &Cancel - + &Annuleren &Start - + &Start - - + + All Supported formats - - + + Select the input images - + &Done - + &Gereed UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation - + Would you like to donate? - + Yes, I'd love to! - + Stop Bothering Me - + Remind me later @@ -6201,18 +6464,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_pl.ts luminance-hdr-2.6.0/i18n/lang_pl.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_pl.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_pl.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&utorzy - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement - + &OK &OK @@ -123,270 +174,320 @@ - + Choose an HDR output file format - - Predefined profile: - - - - - Output format: + + Filename prefix: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Wagi: + + + + Predefined profile: + + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Trójkątna + + + + Linear + Liniowe + + + Alignment - - Auto align the bracketed pictures + + Use Hugin's align_image_stack engine - - Auto-align images + + Hugin's align_&image_stack - + Use MTB (Median Threshold Bitmap) engine - + &MTB - - Use Hugin's align_image_stack engine + + Auto align the bracketed pictures - - Hugin's align_&image_stack + + Auto-align images - + Auto-crop - + &Cancel &Anuluj - + &Start - + &Close &Zamknij - + Progress - + Input/Output - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... - + Loading files... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... - + Creating HDR... - + Doing auto anti-ghosting... - + Written - + Error: - + Aborting... Przerywam... @@ -409,261 +510,302 @@ - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R - - Add Files (Alt+F) + + Remove All Files (Alt+X) - - Alt+F + + + ... - - Remove Files (Alt+R) + + Alt+X - - Alt+R + + Add Files (Alt+F) - - Tone Mapping Settings + + Alt+F - Add Directory (Alt+I) + Add Directory (Alt+D) - Alt+I + Alt+D + + + + + Tone Mapping Settings - + Add Files (Alt+L) - + Alt+L - + + Add Directory (Alt+I) + + + + + Alt+I + + + + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR - + Output - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log - + Batch operations report - + Show onl&y: - + Filter messages based on severity - + All messages - + Errors only - + Success messages - + Filter &log messages: - + Clear filter text - + Overall completion progress - + &Cancel &Anuluj - + Start batch tone mapping - + &Start - + Using %n thread(s) - - - + + + Choose a directory Wybierz katalog - + All HDR images - + Select input images - + Load tone mapping settings text files... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... - + Start processing... - + Close - + &Done - + + Conversion aborted by user request. + + + + All tasks completed. - + Aborting... Przerywam... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -699,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. - + Error: Unknown weight function specified. - + Error: Unknown response curve specified. - + Error: Unknown HDR creation model specified. - + Error: Unknown tone mapping operator specified. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable - + R&eference - + Select the previous image in both lists - + Select the next image in both lists - + Choose a directory and a prefix @@ -1415,7 +1655,7 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. +This image's histogram is displayed in the widget above. @@ -1895,18 +2135,18 @@ - + Choose a directory Wybierz katalog - - + + Error: - + must be a directory. @@ -2066,28 +2306,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2095,7 +2335,7 @@ GenericViewer - + Pan the image to a region @@ -2108,45 +2348,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + + + + HdrViewer - + &Mapping: - + Histogram: Histogram: - + Linear Liniowe - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2170,7 +2423,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2210,7 +2463,7 @@ - &MTB + M&TB @@ -2220,7 +2473,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2283,12 +2536,12 @@ - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2297,47 +2550,47 @@ - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results - + Use Custom Configuration - + HDR Creation Model @@ -2387,237 +2640,266 @@ - + Linear Liniowe - + Gamma Gamma - + Log Logarytmiczna - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Dalej - + &Cancel &Anuluj - + Image Filename - + Exposure - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Wybierz obrazy wejściowe - + Unknown - + Loading... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found Nie znaleziono danych EXIF - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> - + Loading Error: - + Start loading a set of images with different exposure - - - + + + Error... Błąd... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + The external application "<em>align_image_stack</em>" crashed... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... - + Now click on next button - + + Compute + + + + + Finish + + + + Aligning... - - - &Finish - &Zakończ + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - Wagi: - - - - - Response curve: - - Krzywa odpowiedzi: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + - - - Model: - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + + Hide Log @@ -2630,7 +2912,7 @@ - + &File &Plik @@ -2656,7 +2938,7 @@ - + &Print... @@ -2672,7 +2954,7 @@ - + &Find... @@ -2703,7 +2985,7 @@ - + &Add Bookmark @@ -2719,7 +3001,7 @@ - + D&elete All @@ -2789,96 +3071,96 @@ - + Help SideBar - + LuminanceHDR Online Help - + &Edit - + &View &Widok - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Delete - + Find - + Search Term: - + New Bookmark - + New Bookmark's Title: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show - + LuminanceHDR - Help Browser - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? @@ -2936,22 +3218,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2959,7 +3246,7 @@ ImageQualityDialog - + Unknown @@ -3010,9 +3297,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3092,7 +3379,7 @@ MainWindow - + Luminance HDR @@ -3937,18 +4224,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3962,6 +4244,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3977,91 +4264,90 @@ - + All HDR formats - + Load one or more HDR images... - + Save files in - - + + Failed to save %1 - + Done! - + Aborting... Przerywam... - - - Untitled - - - - + Cropped Image - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Niezachowane zmiany... - + This HDR image has unsaved changes.<br>Do you want to save it? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + + + + Untitled %1 - + Error: %1 - + Untitled HDR - + FITS Image @@ -4362,13 +4648,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4608,28 +4894,28 @@ &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Wybierz katalog - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4745,17 +5031,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: - + ERROR: File too old, cannot parse Tone Mapping Setting file: - + ERROR: cannot parse Tone Mapping Setting file: @@ -4763,370 +5049,451 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Trójkątna - - - - Plateau - Plateau - - - - Gaussian - Gauss - - - - Flat - - - - - Linear - Liniowe - - - - Gamma - Gamma - - - - Logarithmic - Logarytmiczne - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization - + Contrast - - + + Saturation - + Detail - + Luminance Level - + Luminance Level=Auto - + Color Saturation Saturacja - + Contrast Enhancement - + + Alpha Alfa - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 - + Equation 4 - - + + Local - + Bias Bias - + Spatial - - + + Range Zakres - + Base - + Multiplier Mnożnik - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness Jasność - + Chromatic Adaptation - + Light Adaptation - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Trójkątna + + + + Plateau + Plateau + + + + Gaussian + Gauss + + + + Flat + + + + + Linear + Liniowe + + + + Gamma + Gamma + + + + Logarithmic + Logarytmiczne + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats - + Save the LDR image as... + All HDR formats + + + + Save the HDR image as... - + Save as... @@ -5197,810 +5564,702 @@ SavedParametersDialog - + Saved Parameters - - + Comment - + TM Operator + + + SavingParameters - - Simple - Prosty + + Saving Parameters + - - Equation 2 + + Enter a short comment for the saved parameters: + + + SupportedCamerasDialog - - Local Contrast Threshold - Próg lokalnego kontrastu + + List of supported cameras + - - Bias - Bias + + TextLabel + - - Spatial Kernel Sigma - Suma przestrzeni jądra + + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + - - Range Kernel Sigma - Suma zakresu jądra + + With LibRaw version + - - Base Contrast - Kontrast bazowy + + models listed + - - Alpha - Alfa + + search... + - - Beta - Beta - - - - - Color Saturation - Saturacja - - - - Noise Reduction - + + OK + + + + TMOProgressIndicator - - Old Fattal + + Abort computation + + + ThresholdWidget - - Rho + + Frame - - InvAlpha + + Threshold + + + TiffModeDialog - - Contrast Equalization + + Save as ...TIFF + + + TonemappingPanel - - Contrast Factor + + Tonemap - - Saturation Factor + + Mantiuk '06 - - Detail Factor + + Mantiuk '08 - - Contrast Enhancement + + Fattal - - Luminance Level + + Ferradans - - Manual Luminance Level + + Drago - - Cone and Rod based on Luminance - Cone and Rod based on Luminance - - - - Local Tonemapping + + Durand - - Cone Level - Cone Level - - - - Rod Level - Rod Level - - - - Multiplier - Mnożnik - - - - Use Scales - Użyj skali + + Reinhard '02 + Reinhard '02 - - Key Value - Wartość kluczowa + + Reinhard '05 + Reinhard '05 - - Phi Value + + Ashikhmin - - Range - Zakres - - - - Lower Scale - Skala niższa - - - - Upper Scale - Skala wyższa - - - - Brightness - Jasność - - - - Chromatic Adaptation + + Pattanaik - - Light Adaptation + + Mai - - Pre-gamma + + Ferwerda - - - SavingParameters - - Saving Parameters + + KimKautz - - Enter a short comment for the saved parameters: + + VanHateren - - - SupportedCamerasDialog - - List of supported cameras + + Lischinski - - TextLabel + + Operator - - <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> + + &Contrast Factor - - With LibRaw version + + Contrast Equalization - - models listed + + &Detail Factor - - search... + + Saturat&ion Factor - - OK + + Lcd Office - - - TMOProgressIndicator - - Abort computation + + Lcd - - - ThresholdWidget - - Frame + + Lcd Bright - - Threshold + + CRT - - - TiffModeDialog - - Save as ...TIFF + + Co&lor Saturation - - - TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + + Co&ntrast Enhancement - - Tone Mapping Settings + + Enable +Luminace Level - - Save current parameters to a text file + + Lum&inance Level - - Save current parameters (pregamma and TMO) to a text file. + + Predefined &Display - - Load an existing text file containing pregamma and TMO settings - Wczytaj plik tekstowy zawierający ustawienia pregamma oraz TMO + + A&lpha + - - Load an existing text file containing pregamma and TMO settings. + + Bet&a - - Save current parameters + + Color Saturat&ion - - Load saved parameters + + &Noise Reduction - - Export + + Version 2.3.0 - - Fast export + + &Inverse Alpha - - Opens the current export direcotory. This can be changed in the preferences! + + Rho - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + B&ias - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + + Spatial &Kernel Sigma - - Process + + Base Co&ntrast - - Result Si&ze + + Range Kerne&l Sigma - - - Gamma applied before tonemapping + + Ph&i - - Pre-&gamma + + &Key Value - - Restore pregamma's default value (1) - Przywróć wstępne domyślne wartości gamma (1) + + &Lower Scale + - - Size of the resulting LDR image + + Upper S&cale - - Here you can choose the size of the resulting LDR image. - + + Use Scales + Użyj skali - - Set Custom Output Size + + Ra&nge - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + + &Light Adaptation - - Start tonemapping (CTRL+T) + + Chromatic A&daptation - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + Br&ightness - - &Update preview + + Local Contrast Threshol&d - - Ctrl+T - Ctrl+T + + Simple + Prosty - - Update current LDR + + Equation &Number - - Auto Levels + + Eqn &2 - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Eqn &4 - - Tonemap - + + Local Tone Mapping + Lokalne mapowanie tonów - - Mantiuk '06 + + Mu&ltiplier - - Mantiuk '08 + + Auto Cone/Rod - - Fattal + + Co&ne Level - - Ferradans + + Ro&d Level - - Drago + + This operator has no options - - Durand + + &Multiplier - - Reinhard '02 - Reinhard '02 - - - - Reinhard '05 - Reinhard '05 + + A&daptation Luminance + - - Ashikhmin + + &C1 - - Pattanaik + + C&2 - - Mai + + Pup&il Area - - Operator + + a&lpha mul - - Contrast Factor + + Restore operator's default values - - Saturation Factor + + Restore - - Detail Factor + + Previous applied settings - - Contrast Equalization + + Previous - - Predefined Display + + Next applied settings - - Lcd Office + + Next - - Lcd + + Start tonemapping (CTRL+T) - - Lcd Bright + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - CRT + + &Update preview - - - Color Saturation - Saturacja + + Ctrl+T + Ctrl+T - - Contrast Enhancement + + Update current LDR - - Enable -Luminace Level + + Auto Levels - - Luminance Level + + <html><head/><body><p>set auto levels threshold</p></body></html> - - Alpha - Alfa - - - - Beta - Beta - - - - Noise Reduction + + Processing - - Version 2.3.0 + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - - Inverse Alpha + + Res&ult Size - - Rho + + Set Custom Output Size - - Bias - Bias - - - - Spatial Kernel Sigma - Suma przestrzeni jądra - - - - Range Kernel Sigma - Suma zakresu jądra - - - - Base Contrast - Kontrast bazowy - - - - Key Value - Wartość kluczowa - - - - Phi - Phi - - - - Use Scales - Użyj skali - - - - Range - Zakres - - - - Lower Scale - Skala niższa + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + - - Upper Scale - Skala wyższa + + + Gamma applied before tonemapping + - - Brightness - Jasność + + Pre-&gamma + - - Chromatic Adaptation + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> - - Light Adaptation + + Pos&t-saturation - - Local Contrast Threshold - Próg lokalnego kontrastu + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Simple - Prosty + + Post-gamma + - - Equation Number - Liczba równań + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - Eqn &2 + + ... - - Eqn &4 + + Settings - - Multiplier - Mnożnik + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + - - Local Tone Mapping - Lokalne mapowanie tonów + + Tone Mapping Settings + - - Auto Cone/Rod + + Save current parameters to a text file - - Cone Level - Cone Level + + Save current parameters (pregamma and TMO) to a text file. + - - Rod Level - Rod Level + + Load an existing text file containing pregamma and TMO settings + Wczytaj plik tekstowy zawierający ustawienia pregamma oraz TMO - - This operator has no options + + Load an existing text file containing pregamma and TMO settings. - - Restore operator's default values + + Load saved parameters - - Restore + + Save current parameters - - Previous applied settings + + Export - - Previous + + Fast export - - Next applied settings + + Opens the current export directory. This can be changed in the preferences! - - Next + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - + Queue size: %1 - + TM Database Problem - + The database used for saving TM parameters cannot be opened. Error: %1 - + Load a tonemapping settings text file... Wczytaj ustawienia mapowania tonów... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... Przerywam... - + File is not readable (check existence, permissions,...) Nie można odczytać pliku (spradź czy istnieje, uprawnienia,...) - + Save tonemapping settings text file to... Zapisz plik z ustawieniami mapowania tonów... - + File is not writable (check permissions, path...) Nie można zapisać pliku (sprawdź uprawnienia, ścieżkę,...) - + File is not readable (check permissions, path...) Nie można odczytać pliku (sprawdź czy istnieje, ścieżkę,...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size - + Enter the width of the new size: @@ -6150,19 +6409,19 @@ - - + + All Supported formats - - + + Select the input images Wybierz obrazy wejściowe - + &Done @@ -6170,39 +6429,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation - + Would you like to donate? - + Yes, I'd love to! - + Stop Bothering Me - + Remind me later @@ -6210,18 +6469,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_pt_BR.ts luminance-hdr-2.6.0/i18n/lang_pt_BR.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_pt_BR.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_pt_BR.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + Sobre Luminance HDR @@ -13,7 +13,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { espaço-em-branco: pré-envoltório; } +</style></head><body style=" font-family:'Sans Serif'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> @@ -26,75 +30,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors Á%utores - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To Agradecemos à - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Alterar o Registro - + &License Agreement &Licenciamento - + &OK &OK @@ -104,7 +159,7 @@ Batch HDR - + HDR em lote @@ -123,273 +178,320 @@ Saída - + Choose an HDR output file format Escolha um formato de arquivo de saída HDR - - Predefined profile: - Perfil predefínido: - - - - Output format: - Formato de saída: + + Filename prefix: + - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Escolha um dos perfis predefinidos de criação. -Consulte a documentação para obter mais informações. + - + Profile 1 Perfil 1 - + Profile 2 Perfil 2 - + Profile 3 Perfil 3 - + Profile 4 Perfil 4 - + Profile 5 Perfil 5 - + Profile 6 Perfil 6 - + + Output format: + Formato de saída: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Pesos: + + + + Predefined profile: + Perfil predefínido: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triangular + + + + Linear + Linear + + + Alignment Alinhamento - - Auto align the bracketed pictures - Auto alinhar as imagens enquadradas + + Use Hugin's align_image_stack engine + Use o motor de alinhamento de pilha de imagem Hugin's - - Auto-align images - Auto-alinhar imagens + + Hugin's align_&image_stack + Hugin's alinar_&imagem_pilha - + Use MTB (Median Threshold Bitmap) engine Aplique o motor MTB (Median Threshold Bitmap) - + &MTB &MTB - - Use Hugin's align_image_stack engine - Use o motor de alinhamento de pilha de imagem Hugin's + + Auto align the bracketed pictures + Auto alinhar as imagens enquadradas - - Hugin's align_&image_stack - Hugin's alinar_&imagem_pilha + + Auto-align images + Auto-alinhar imagens - + Auto-crop Auto-corte - + &Cancel &Cancelar - + &Start &Começar - + &Close &Fechar - + Progress Progresso - + Input/Output Entrada/Saída - + Folder where created HDRs are saved Pasta onde HDRs criados são salvos - - + + Select... Escolher... - + Folder where bracketed pictures are located (in alphabetical order) Pasta onde as imagens enquadradas estão localizadas (em ordem alfabética) - + Input folder: Pasta de entrada: - + Output folder: Pasta de saída: - + Anti-ghosting Anti-ghosting - + Artifact-free High Dynamic Range Imaging Artefato-livre Alto Alcance Dinâmico de Imagem - + Threshold Limiar - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Limiar utilizado pelo algoritmo auto anti-ghosting. Um limiar inferior significa um tratamento mais agressivo, mas que pode reduzir a gama dinâmica final. Use o botão &quot;Recompute&quot; para ver a cobertura real de manchas e ajuste o limite de acordo</p></body></html> - + O. Gallo and others O. Gallo e outros - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Habilitar o algorítimo auto anti-ghosting</p></body></html> - + Auto anti-ghosting Auto anti-ghosting - + Custom config %1 Configuração personalizada %1 - + Choose a source directory Escolha um diretório de origem - + Choose a output directory Escolha um diretório de saída - - - + + + Warning Aviso - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - O diretório de saída escolhido contém arquivos HDR. Esses arquivos serão sobrescritos. - -Continuar? + - - + + Total number of pictures must be a multiple of number of bracketed images. Número total de fotos deve ser um múltiplo do número de imagens enquadradas. - + Started processing... Iniciado o processamento ... - + Loading files... Carregando arquivos... - + Completed with errors Concluído com erros - + Completed without errors Concluído sem erros - + Error: missing EXIF data Erro: falta de dados EXIF - + Aligning... Alinhando... - + Creating HDR... Creando HDR... - + Doing auto anti-ghosting... Executando auto anti-ghosting... - + Written Escrito - + Error: Erro: - + Aborting... Abortando... @@ -412,261 +514,302 @@ Lista de HDRs cujo tom será mapeado - - Add Directory (Alt+D) - Adicionar Pasta (Alt+D) + + Remove Files (Alt+R) + Remover Arquivos (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Adicionar Arquivos (Alt+F) + + Remove All Files (Alt+X) + - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Remover Arquivos (Alt+R) + + Alt+X + - - Alt+R - Alt+R + + Add Files (Alt+F) + Adicionar Arquivos (Alt+F) - - Tone Mapping Settings - Configurações para Mapeamento de Tom + + Alt+F + Alt+F - Add Directory (Alt+I) - Adicionar Pasta (Alt+I) + Add Directory (Alt+D) + Adicionar Pasta (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Configurações para Mapeamento de Tom - + Add Files (Alt+L) Adicionar Arquivos (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Adicionar Pasta (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Adicionar a partir de banco de dados (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Remover Configurações (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Lista de arquivos de Configuração de Mapeamanto de Tom que serão usados ​​para mapear cada tom HDR - + Output Saída - + Output Image Width: Largura de Saída da Imagem: - + Output Folder: Pasta de Saída: - - + + Specify output folder for the tone mapped files Especifique a pasta de saída para o tom dos arquivos mapeados - + Selec&t... Selec&ionar... - - + + Width of tonemapped image in percent of original image Largura da imagem mapeada em porcentagem da imagem original - + % % - + Output Format: Formato de Saída: - + Image format of tonemapped images Formato da imagem de imagens mapeadas - + Image format options Opções de formato de imagem - + Conversion Log Registro de Conversão - + Batch operations report Reportar operações em lote - + Show onl&y: - + Apenas mostr&ar: - + Filter messages based on severity Filtra mensagens baseado na gravidade - + All messages Todas as mensagens - + Errors only Somente erros - + Success messages Mensagens bem sucedidas - + Filter &log messages: - + Filtrar &mostrar mensagens: - + Clear filter text Limpar filtro de texto - + Overall completion progress Progresso geral completado - + &Cancel &Cancelar - + Start batch tone mapping Comece o mapeamento em lote de tom - + &Start &Começar - + Using %n thread(s) - - - + + + Choose a directory Escolher Pasta - + All HDR images Todas as imagens HDR - + Select input images Escolher imagens de entrada - + Load tone mapping settings text files... Carregar arquivos de texto de configurações de mapeamento de tom... - + Luminance HDR tone mapping settings text file (*.txt) arquivo texto(*.txt) de configurações de mapeamento de tom Luminance HDR - + + Warning + Aviso + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Processando... - + Start processing... Iniciar o processamento ... - + Close Fechar - + &Done &Feito - + + Conversion aborted by user request. + + + + All tasks completed. Todas as tarefas concluídas. - + Aborting... Abortando... @@ -674,27 +817,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Comece o processamento %2 - + [T%1] Successfully load %2 [T%1] Carregado com sucesso %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] Salvo com sucesso arquivo LDR: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] ERRO: Não é possível salvar no arquivo: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] ERRO: Falhou o carregamento de %2 @@ -702,575 +850,668 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Uso: %1 [OPÇÕES]... [ENTRADA DE ARQUIVOS]... - + Display this help. Mostrar esta ajuda. - + Display program version. Exibir a versão do programa. - + Print more messages during execution. Imprimir mais mensagens durante a execução. - + Print a list of all supported cameras. Imprima uma lista de todas as câmeras suportadas. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AIS|MTB] Alinhe Motor para usar durante a criação do HDR (padrão: no alinhamento). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,... Especifique valores EV numéricos (como muitas Entradas de Arquivos). - + prefix Save aligned images to files which names start with prefix Salvar prefixo para os arquivos de imagens alinhadas cujos nomes começam com o prefixo - + HDR_FILE Load an HDR instead of creating a new one. HDR_FILE Carregar um HDR em vez de criar um novo. - + HDR_FILE Save to a HDR file format. (default: don't save) HDR_FILE Salve em um formato de arquivo HDR. (padrão: não salvar) - + VALUE Gamma value to use during tone mapping. (default: 1) VALUE Gamma valor a ser usado durante o mapeamento de tom. (padrão: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALUE Largura que você deseja redimensionar seu HDR para (redimensionada antes de gama e do mapeamento de tom) - + LDR_FILE File name you want to save your tone mapped LDR to. LDR_FILE Nome do arquivo que você deseja salvar o tom mapeado para LDR. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) THRESHOLD Ativar auto anti-ghosting com determinado limiar. (0.0-1.0) - + Apply autolevels correction after tonemapping. Aplicar níveis de correção após o mapeamento de tom. - + Enable generation of a webpage with embedded HDR viewer. Habilite a geração de uma página Web com visualizador HDR incorporado. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR HDR parâmetros de criação - você deve carregar um arquivo HDR existente (via a opção -l) ou especificar Entrada de Arquivos para criar uma nova HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) peso = triangular | gaussian | plateau | plana (O padrão é triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) curva de resposta = do_arquivo | linear | gamma | login | srgb (O padrão é linear) - + model: robertson|robertsonauto|debevec (Default is debevec) Modelo: robertson | robertsonauto | debevec (O padrão é debevec) - + curve filename = your_file_here.m curva nome do arquivo = seu_arquivo_aqui.m - + LDR output parameters Parâmetros de saída LDR - + VALUE Quality of the saved tone mapped file (1-100). VALUE Qualidade do arquivo salvo de tom mapeado (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) Formato Tiff. Valores permitidos são [8b|16b|32b|logluv] (O padrão é 8b) - + Tiff deflate compression. true|false (Default is true) Compactação deflate Tiff. verdadeiro|falso (Padrão é verdadeiro) - + HTML output parameters Parâmetros de saída HTML - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) VALOR Qualidade das exposições interpoladas, do pior (1) ao melhor (4). Maior qualidade irá introduzir menos distorções nos tons mais brilhantes e mais escuras, mas também gerará mais imagens. Mais imagens significa que há mais dados que precisam ser transferidos para o navegador Web, tornando o visualizador HDR menos responsivo. (O padrão é 2, o que é suficiente para a maioria das aplicações) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) Especifica o nome do arquivo da página Web a ser gerada. Se <page_name> estiver faltando, o nome do arquivo da primeira imagem com extensão .html será usado. (O padrão é o nome da primeira imagem) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) Especifique onde armazenar os arquivos de imagem resultantes. Os links para imagens em HTML serão atualizados em conformidade. Este deve ser um caminho relativo e o diretório deve existir. Útil para evitar confusão no diretório atual. (O padrão é o diretório de trabalho atual) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Parâmetros de mapeamento de tom - nenhum mapeamento de tom é realizado a menos que seja especificado -o - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) - Operador de mapeamento de tons. Os valores legais são os seguintes: [ashikhmin | drago | durand | fattal | ferradans | pattanaik | reinhard02 | reinhard05 | mai | mantiuk06 | mantiuk08] (Padrão é mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) + - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings CONFIGURAÇÃO_ARQUIVO Carregue um arquivo de configuração existente contendo pre-gamma e todas as configurações TMO - + Fattal Fattal - + + alpha FLOAT alpha FLOAT - + beta FLOAT beta FLOAT - + color FLOAT color FLOAT - + noise FLOAT ruído FLOAT - + new true|false novo verdadeiro | falso - + Ferradans Ferradans - + rho FLOAT rho FLOAT - + inv_alpha FLOAT inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 Mantiuk 06 - + contrast FLOAT contraste FLOAT - + saturation FLOAT saturação FLOAT - + detail FLOAT detalhe FLOAT - + equalization true|false equalização verdadeiro|falso - + Mantiuk 08 Mantiuk 08 - + color saturation FLOAT saturação de cor FLOAT - + contrast enhancement FLOAT realce de contraste FLOAT - + luminance level FLOAT nível de luminância FLOAT - + enable luminance level true|false habilitar nível de luminância verdadeiro | falso - + Durand Durand - + spatial kernel sigma FLOAT kernel espacial sigma FLOAT - + range kernel sigma FLOAT série de kernel sigma FLOAT - + base contrast FLOAT contraste de base FLOAT - + Drago Drago - + bias FLOAT viés FLOAT - + Reinhard 02 Reinhard 02 - + key value FLOAT chave de valor FLOAT - + phi FLOAT phi FLOAT - + use scales true|false utilização de escalas verdadeiro|falso - + range FLOAT série FLOAT - + lower scale FLOAT escala inferior FLOAT - + upper scale FLOAT escala superior FLOAT - + Reinhard 05 Reinhard 05 - + Brightness FLOAT Brilho FLOAT - + Chroma adaption FLOAT Adaptação cromática FLOAT - + Light adaption FLOAT Adpatação luminosa FLOAT - + Ashikmin Ashikmin - + Equation number 2 true|false Número da equação 2 verdadeiro|falso - + Simple true|false Simples verdadeiro|falso - + Local threshold FLOAT Limiar local FLOAT - + Pattanaik Pattanaik - + multiplier FLOAT multiplicador FLOAT - + Local tone mapping true|false Mapeamento de tom local verdadeiro|falso - + Auto luminance true|false Auto luminância verdadeiro|falso - + cone level FLOAT nível do cone FLOAT - + rod level FLOAT vareta de nível FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version Luminance HDR versão - + With LibRaw version Com LibRaw versão - + models listed modelos listados - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. Erro: Qualidade html deve estar entre [1..4]. - + Error: Alignment engine not recognized. Erro: Motor de alinhamento não reconhecido. - + Error: Unknown weight function specified. Erro: Desconhecida a Função de peso especificada - + Error: Unknown response curve specified. Erro: Desconhecida a curva de resposta especificada. - + Error: Unknown HDR creation model specified. Erro: Desconhecido o modelo de criação HDR especificado - + Error: Unknown tone mapping operator specified. Erro: Desconhecido o operador de mapeamento de tom especificado. - - + + Error: The specified file with TMO settings could not be parsed! Erro: O arquivo especificado com configurações TMO não pôde ser analisado! - + Error: The specified file with TMO settings could not be parsed!: %1 Erro: O arquivo especificado com configurações TMO não pôde ser analisado!: %1 - + Error: Quality must be in the range [1..100]. Erro: Qualidade deve estar entre [1..100]. - + Error: Unknown tiff format. Erro: Formato tiff desconhecido. - + Error: Threshold must be in the range [0..1]. Erro: Limite deve estar entre [0..1]. - + Error: The number of EV values specified is different from the number of input files. Erro: O número de valores especificados de EV é diferente do número de arquivos de entrada. - + Load file %1 failed Carregamento do arquivo %1 falhou - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Erro: Faltando dados Exif nas imagens e valores não especificados de EV na linha de comando, socorrer. - + EV values have been assigned. Valores EV foram atribuídos. - - + + Starting aligning... Começando a alinhar... - + Failed executing align_image_stack Falha na execução do Alinhamento_de Pilha_ de Imagem - + Failed aligning images. Falha alinhando imagens. - + Creating (in memory) the HDR. Criando no HDR (na memória). - + Saving to file %1. Salvando no arquivo %1. - + Image %1 saved successfully Imagem %1 salva com sucesso - + Could not save %1 Não é possível salvar %1 - + NOT Saving HDR image to file. %1 Não salvou imagem HDR no arquivo. %1 - + Exporting to HTML Exportando para HTML - + ERROR: directory %1 must exist ERRO: diretório %1 deve existir - + Tonemapping requested, saving to file %1. Mapeamento de tom solicitado, salvando no arquivo %1. - + Resizing to width %1. Redimensionando para largura %1. - + Applying gamma %1. Aplicando gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved Imagem %1 foi salva - + ERROR: Cannot save to file: %1 ERRO: Não é possível salvar no arquivo: %1 - + Tonemapping NOT requested. Mapeamento de tom NÃO requerido. - - Failed loading images - Carregando imagens com falha + + Failed loading images: %1 + @@ -1347,47 +1588,47 @@ EditingTools - + Maskable Mascarar - + Good image Imagem boa - + Add good image Adicionar imagem boa - + Remove good image Remover imagem boa - + Ed&itable Ed&itável - + R&eference R&eferência - + Select the previous image in both lists Selecione a imagem anterior em ambas as listas - + Select the next image in both lists Selecione a próxima imagem em ambas as listas - + Choose a directory and a prefix Escolha um diretório e um prefixo @@ -1423,9 +1664,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - A imagem selecionada nessa lista pode ser traduzido para cima, baixo, esquerda e direita usando os controles abaixo. -Histograma desta imagem é exibida no widget acima. +This image's histogram is displayed in the widget above. + @@ -1450,7 +1690,7 @@ Referen&ce - + Referên&cia @@ -1918,18 +2158,18 @@ Exportar - + Choose a directory Escolher Pasta - - + + Error: Erro: - + must be a directory. deve ser um diretório. @@ -2089,29 +2329,28 @@ Vermelho - + Load one FITS image... Carregue uma imagem FITS ... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - Não é possível carregar a imagem FITS %1. -ERRO: %2 + - + FITS images have different size imagens FITS têm tamanho diferente - + align_image_stack exited with exit code %1 align_image_stack saiu com código de saída %1 - + align_image_stack failed with error align_image_stack falhou @@ -2119,7 +2358,7 @@ GenericViewer - + Pan the image to a region Deslocar a imagem para uma região @@ -2132,46 +2371,59 @@ Hdr Gerenciador de Criação::carga Arquivos Concluída(): Erro ao carregar um arquivo. - + HdrCreationManager::loadFilesDone(): The images have different size. Hdr Gerente de Criação :: Arquivos de Carga feito (): As imagens têm tamanho diferente. + HdrPreview + + + HDR Preview + + + + + Close + Fechar + + + HdrViewer - + &Mapping: &Mapeamento: - + Histogram: Histograma: - + Linear Linear - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2195,8 +2447,8 @@ - &Currently Loaded Files - &Arquivos Carregados Atualizados + Currently &Loaded Files + @@ -2235,8 +2487,8 @@ - &MTB - &MTB + M&TB + @@ -2245,8 +2497,8 @@ - Hugin's align_&image_stack - Hugin's alinar_&imagem_pilha + Hu&gin's align_image_stack + @@ -2312,12 +2564,12 @@ [2/2] Escolha Configurações para Criação de HDR - + Profile Perfil - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2330,47 +2582,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">O primeiro perfil pré-definido na lista geralmente leva a resultados melhores. Mude somente se a imagem HDR resultante não for boa o suficiente.</span></p></body></html> - - Profile 1 - Perfil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Perfil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Perfil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Perfil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Perfil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Perfil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Use somente se os perfis padrão acima não produzirem bons resultados - + Use Custom Configuration Use a Configuração Personalizada - + HDR Creation Model Modelo de Criação HDR: @@ -2420,239 +2672,268 @@ Curva de Resposta - + Linear Linear - + Gamma Gamma - + Log Registro - + sRGB sRGB - - Custom - Personalizado + + Custom (From File) + - + Response Curve Input File Arquivo de Entrada da Curva de Resposta - + + Load Response + + + + Response Curve Output File Arquivo de Saída da Curva de Resposta - + Save As... Salvar como... - + Save Settings Salvar Configurações - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &Próximo > - + &Cancel &Cancelar - + Image Filename Nome do Arquivo de Imagem - + Exposure Exposição - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Todos os formatos (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Imagens RAW (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Selecione as imagens de entrada - + Unknown Desconhecido - + Loading... Carregando... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>AVISO:</b></h3></font> Luminance HDR não foi capaz de encontrar o relevante <b>EXIF</b> etiquetas para as imagens seguintes:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul><hr>Você ainda pode continuar criando um HDR. Para fazer isso você tem que inserir<b>manualmente</b> o EV (valor de exposição) ou valores de diferença de interrupção<hr>Se você quiser Luminance HDR para fazer isso <b>automaticamente</b>, você tem que carregar as imagens que tenham, pelo menos, os seguintes dados exif: <ul><li>Viés de Exposição</li></ul><hr><b>HINT:</b>Perder dados EXIF ​​geralmente acontece quando você pré-processa suas imagens.<br>Você pode executar uma <b>cópia de um-para-outro dos dados exif</b>entre dois conjuntos de imagens através da <b>Ferramentas-> Copiar Dados Exif ...</b> item de menu. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again + - + EXIF data not found Dados EXIF ​​não encontrados - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Imagens Carregadas.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Para continuar você precisa configurar manualmente os valores de exposição.<br><font color="#FF0000">%1</font> valores ainda requeridos.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: Erro ao carregar: - + Start loading a set of images with different exposure Inicie o carregamento de um conjunto de imagens com diferentes exposições - - - + + + Error... Erro... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Falha ao iniciar a aplicação externa "<em>align_image_stack</em>".<br>Por favor, leia "Ajuda -> Conteúdo ... -> Configuração -> Ferramentas externas" para obter mais informações. - + The external application "<em>align_image_stack</em>" crashed... A aplicação externa "<em>align_image_stack</em>" caiu... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... Ocorreu um erro desconhecido durante a execução do "<em>align_image_stack</em>" aplicação... - + Now click on next button Agora clique no próximo botão - + + Compute + + + + + Finish + + + + Aligning... Alinhando... - - - &Finish - &Finalizar + + &Compute + - + Load camera response curve file Carga do arquivo curva de resposta da câmara - + Camera response curve (*.m);;All Files (*) Curva de resposta da câmera (* .m);; Todos os arquivos (*) - + Invalid Response Curve File Arquivo Curva de Resposta Inválido - + Invalid Response Curve File: please try a different file Arquivo Curva de Resposta Inválido: tente um arquivo diferente - + Save a camera response curve file Salvar um arquivo curva de resposta da câmera - + Camera response curve (*.m) Curva de resposta da câmera (*.m) - - Weights: - Pesos: - - - - - Response curve: - - Curva de resposta: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b> +Todos os valores de EV foram definidos.<br>Agora clique no botão Avançar.</b></h3></font></center> - - - Model: - - Modelo: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Para continuar você precisa configurar manualmente os valores de exposição.<br><font color="#FF0000">%1</font> valores ainda requeridos.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b> -Todos os valores de EV foram definidos.<br>Agora clique no botão Avançar.</b></h3></font></center> + + Hide Log + @@ -2664,7 +2945,7 @@ - + &File &Arquivo @@ -2690,7 +2971,7 @@ - + &Print... &Imprimir... @@ -2706,7 +2987,7 @@ - + &Find... &Localizar... @@ -2737,7 +3018,7 @@ - + &Add Bookmark &Adicionar Favorito @@ -2753,7 +3034,7 @@ - + D&elete All E&xcluir Tudol @@ -2823,100 +3104,98 @@ I&mprimir Pré-visualização - + Help SideBar Ajuda Barra Lateral - + LuminanceHDR Online Help LuminanceHDR Ajuda Online - + &Edit &Editar - + &View E&xibir - - + + &Bookmarks &Favoritos - + &Quit &Sair - + Find &Next Localizar &Avançar... - + Find &Previous Localizar &Retornar... - + &Contents &Conteúdo - + &Search &Busca - + &Delete &Excluir - + Find Localizar - + Search Term: Termo de Pesquisa: - + New Bookmark Novo Favorito - + New Bookmark's Title: Novo Título do Favorito: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Desculpe, nenhum manual está instalado!</p><p>Entre em contato com seu provedor de pacote ou equipe LuminanceHDR se construiu sua própria aplicação</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Navegador de Ajuda - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Este protocolo não é tratado pelo navegador de ajuda. -Você quer abrir o link com o aplicativo padrão -associado ao protocolo? + @@ -2972,22 +3251,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: O arquivo seguinte não é legível: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: arquivo %1 tem extensão não suportada: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: leitura de exceção capturada %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 IOWorker: arquivo de carregamento falhou: %1 @@ -2995,7 +3279,7 @@ ImageQualityDialog - + Unknown Desconhecido @@ -3046,11 +3330,11 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 - + LDR imagem [%1 x %2]: %3 @@ -3128,7 +3412,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3145,7 +3429,7 @@ Luminance &HDR Online - + Luminance &HDR Online @@ -3645,7 +3929,7 @@ Ctrl+I - + Ctrl+I @@ -3674,7 +3958,7 @@ Ctrl+J - + Ctrl+J @@ -3721,7 +4005,7 @@ Ctrl+Z - + Ctrl+Z @@ -3830,7 +4114,7 @@ Fill &Window - + Preencher &Janela @@ -3865,27 +4149,27 @@ &Show on the right - + &Mostrar à direita Show &on the bottom - + Mostrar &no fundo &Realtime Previews - + &Pré-visualizações em tempo real &Update - + &Atualizar &FITS Importer... - + &FITS Importador... @@ -3910,17 +4194,17 @@ E&xport to HTML - + E&xportar para HTML Export to web page with embedded HDR viewer - + Exportar para página Web com visualizador de HDR incorporado &Show Full Screen - + &Mostrar Tela Cheia @@ -3930,7 +4214,7 @@ Show &Image Full Screen - + Mostrar &Imagem Tela Cheia @@ -3940,72 +4224,72 @@ &Supported RAW Cameras - + &Câmeras RAW Suportadas Lists all cameras supported by the program - + Lista todas as câmeras suportadas pelo programa Ctrl+M - + Ctrl+M &Lanczos/Bilinear interpolation - + &Lanczos/Interpolação bilinear <html><head/><body><p>Switch between Lanczos and Bilinear interpolation</p></body></html> - + <html><head/><body><p>Alternar entre Lanczos e Interpolação bilinear</p></body></html> Ctrl+K - + Ctrl+K &Online Documentation - - - - - &Developers Web Site - - - - - &Luminance HDR Web Site - + &Documentação on-line Open Online Documentation Web Site with the System Browser - + Abra o Site da Documentação on-line com o Navegador do Sistema + + + + &Developers Web Site + &Sites dos Desenvolvedores Developers Web Site - + Sites dos Desenvolvedores Open Developers Web Site with the System Browser - + Abra os Sites dos Desenvolvedores com o Navegador do Sistema + + + + &Luminance HDR Web Site + &Luminance HDR Web Site Luminance HDR Web Site - + Luminance HDR Web Site Open Main Web Site with the System Browser - + Abra o Site Principal com o Navegador do Sistema @@ -4013,93 +4297,90 @@ Pronto. Agora abra uma imagem HDR existente ou crie uma nova! - + All HDR formats Todos os formatos HDR - + Load one or more HDR images... Carregue uma ou mais imagens HDR... - + Save files in Salvar arquivos em - - + + Failed to save %1 - + Falha ao salvar %1 - + Done! Feito! - + Aborting... Abortando... - - - Untitled - Sem título - - - + Cropped Image Imagem recortada - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Parece que você está executando a versão de 32-bit <strong>Luminance HDR</strong> em um sistema de 64 bits. <br>Faça o download da <strong>64-bit</strong> versão do <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> para obter a melhor experiência Luminance HDR! - + Unsaved changes... Alterações não salvas... - + This HDR image has unsaved changes.<br>Do you want to save it? Esta imagem HDR tem alterações não salvas.<br>Você quer salvá-las? - + Fattal Warning Fattal Aviso - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - Este operador de mapeamento de tom depende do tamanho da imagem de entrada. Aplicando este operador nesta imagem em tamanho real, provavelmente vai resultar em uma imagem diferente. - -Você quer continuar? + - + + Untitled + Sem título + + + Untitled %1 Sem título %1 - + Error: %1 Erro: %1 - + Untitled HDR Sem título HDR - + FITS Image Imagem FITS @@ -4139,7 +4420,7 @@ Fast export - + Exportação rápida @@ -4439,23 +4720,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Luzes</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Escolha aqui o método de corte luzes:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Branco sólido</span>: cortar todas as luzes ao branco sólido</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Extrair</span>: deixar luzes extraídas em várias matizes de rosa</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Mesclar</span>: Mesclar valores anexados e extraídos para uma transição gradual para o branco</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Reconstruir</span>:reconstruir luzes usando um valor de nível</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4753,28 +5025,28 @@ &OK - + Restart Reiniciar - + For the settings to take effect, please restart the application! Para que as configurações tenham efeito, reinicie o aplicativo! - - + + Choose a directory Escolher Pasta - + Open ICC Profile Abrir perfil ICC - + Color profile (*.icc *.ICC *.icm *.ICM) Perfil de cor (*.icc *.ICC *.icm *.ICM) @@ -4890,17 +5162,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ERRO: Não foi possível carregar o arquivo de Configuração de Mapeamento de Tom: - + ERROR: File too old, cannot parse Tone Mapping Setting file: ERRO: Arquivo muito velho, não foi possível analisar o arquivo de Configuração de Mapeamento de Tom: - + ERROR: cannot parse Tone Mapping Setting file: ERRO: Não foi possível analisar o arquivo de Configuração de Mapeamento de Tom: @@ -4908,370 +5180,452 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + A qualidade deve estar entre 1 (pior) and 5 (melhor). - + NULL frame passed. - + Quadro NULO foi passado. - + Adding image - + Adicionando imagem - + to the web page - + para a página da web - - - + + + Writing: - + Escrevendo: - - - - + + + + Warning Aviso - + I cannot open monitor profile. Please select a different one. Não consigo abrir o perfil do monitor. Por favor seleccione outro. - + I cannot open printer profile. Please select a different one. Não consigo abrir o perfil da impressora. Por favor seleccione outro. - + Please select a printer profile . Por favor selecione um perfil de impressora. - + I cannot perform the color transform. Please select a different monitor profile. Não consigo executar a transformação de cor. Por favor seleccione outro perfil de monitor. - - Triangular - Triangular - - - - Plateau - Plateau - - - - Gaussian - Gaussian - - - - Flat - Plano - - - - Linear - Linear - - - - Gamma - Gamma - - - - Logarithmic - Logarítmico - - - - sRGB - sRGB - - - - From Calibration/Input File - De Calibração/Arquivo de Entrada - - - - Debevec - Debevec + + + + Weights= + - - Robertson - Robertson + + + + - Response curve= + - - Robertson Response Calculation - Robertson Cálculo Responsivo + + + + - Model= + - + PreGamma=%1 PreGamma=%1 - + Contrast Equalization Equalização do Contraste - + Contrast Contraste - - + + Saturation Saturação - + Detail Detalhe - + Luminance Level Nível do Luminance - + Luminance Level=Auto Auto=Nível do Luminance - + Color Saturation Saturação de cor - + Contrast Enhancement Melhoria do Contraste - + + Alpha Alfa - + Beta Beta - + NoiseRedux Redutor de Ruído - + FFTSolver FFTSolver - + Rho Rho - + InvAlpha InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple simples - + Equation 2 Equação 2 - + Equation 4 Equação 4 - - + + Local Local - + Bias Viés - + Spatial Espacial - - + + Range Série - + Base Base - + Multiplier Multiplicador - + AutoLuminance AutoLuminance - + Cone Cone - + Rod Haste - + Key Chave - + Phi Pi - + Scales: Escalas: - + Lower Inferior - + Upper Superior - + Brightness Brilho - + Chromatic Adaptation Adaptação Cromática - + Light Adaptation Adaptação Luminosa - - Option -v -a... - Opção -v -a... + + Pupil Area + - - LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - LuminanceHDR requer align_image_stack a ser executado nas opções com "v" e sem "-a" . Opções de linha de comando foram corrigidos. + + PostSaturation=%1 + - - Cannot convert %1 to a float - Não foi possível converter %1 para um número flutuante + + PostGamma=%1 + - - Loading TMO settings from file: %1 - Carregando configurações TMO do arquivo: %1 + + + HDR Preview + - - Input file %1 + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + Robertson Cálculo Responsivo + + + + Triangular + Triangular + + + + Plateau + Plateau + + + + Gaussian + Gaussian + + + + Flat + Plano + + + + Linear + Linear + + + + Gamma + Gamma + + + + Logarithmic + Logarítmico + + + + sRGB + sRGB + + + + From Calibration or Input File + + + + + Option -v -a... + Opção -v -a... + + + + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. + LuminanceHDR requer align_image_stack a ser executado nas opções com "v" e sem "-a" . Opções de linha de comando foram corrigidos. + + + + Cannot convert %1 to a float + Não foi possível converter %1 para um número flutuante + + + + Loading TMO settings from file: %1 + Carregando configurações TMO do arquivo: %1 + + + + Input file %1 Arquivo de entrada %1 - + Running in HDR-creation mode. Executando no modo HDR-criação. - + Running in Load-HDR mode. Executando no modo Carregamento-HDR. - + Temporary directory: %1 Diretório temporário: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 Carregando arquivo %1 - + Successfully loaded file %1. Carregado com êxito o arquivo %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + O banco de dados usado para salvar os parâmetros TM não pode ser aberto. +Erro: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Todos os formatos LDR - + Save the LDR image as... Salve a imagem LDR como... + All HDR formats + + + + Save the HDR image as... Salve a imagem HDR como... - + Save as... Salvar como... @@ -5342,202 +5696,20 @@ SavedParametersDialog - + Saved Parameters Parâmetros salvos - - + Comment Comentário - + TM Operator Operador TM - - - Simple - Simples - - - - Equation 2 - Equação 2 - - - - Local Contrast Threshold - Limiar do Contraste Local - - - - Bias - Viés - - - - Spatial Kernel Sigma - Ordenamento do Kernel Sigma - - - - Range Kernel Sigma - Intervalo do Kernel Sigma - - - - Base Contrast - Contraste da Base - - - - Alpha - Alfa - - - - Beta - Beta - - - - - Color Saturation - Saturação de cor - - - - Noise Reduction - Redução de ruído - - - - Old Fattal - Fattal antigo - - - - Rho - Rho - - - - InvAlpha - InvAlpha - - - - Contrast Equalization - Equalização do Contraste - - - - Contrast Factor - Fator de contraste - - - - Saturation Factor - Fator de saturação - - - - Detail Factor - Fator de detalhe - - - - Contrast Enhancement - Melhoria do Contraste - - - - Luminance Level - Nível do Luminance - - - - Manual Luminance Level - Nível do Luminance manual - - - - Cone and Rod based on Luminance - Cone e Haste baseado no Luminance - - - - Local Tonemapping - Mapeamento de Tom local - - - - Cone Level - Nível do Cone - - - - Rod Level - Nível da Haste - - - - Multiplier - Multiplicador - - - - Use Scales - Use Escalas - - - - Key Value - Valor da Chave - - - - Phi Value - Valor do Pi - - - - Range - Intervalo - - - - Lower Scale - Escala Inferior - - - - Upper Scale - Escala Superior - - - - Brightness - Brilho - - - - Chromatic Adaptation - Adaptação Cromática - - - - Light Adaptation - Adaptação Luminosa - - - - Pre-gamma - Pre-gamma - SavingParameters @@ -5562,592 +5734,666 @@ TextLabel - + Etiqueta de Texto <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> - + <html><head/><body><p><span style=" font-weight:600; color:#0078dc;">Luminance HDR</span></p></body></html> With LibRaw version - + Com versão LibRaw models listed - + modelos listados search... - + pesquisa... - OK - OK - - - - TMOProgressIndicator - - - Abort computation - Abortar computação - - - - ThresholdWidget - - - Frame - - - - - Threshold - Limiar - - - - TiffModeDialog - - - Save as ...TIFF - Salvar como ...TIFF - - - - TonemappingPanel - - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Aqui você pode carregar e salvar um arquivo de configurações de mapeamento de tom.<br>Você também pode aplicar o conteúdo do arquivo de configurações carregado. - - - - Tone Mapping Settings - Configurações para Mapeamento de Tom - - - - Save current parameters to a text file - Salve os parâmetros atuais num arquivo de texto - - - - Save current parameters (pregamma and TMO) to a text file. - Salve os parâmetros atuais (pregamma e TMO) num arquivo de texto. - - - - Load an existing text file containing pregamma and TMO settings - Carregue um arquivo de texto contendo configurações pregamma e TMO - - - - Load an existing text file containing pregamma and TMO settings. - Carregue um arquivo de texto contendo configurações pregamma e TMO. - - - - Save current parameters - Salve os parâmetros atuais - - - - Load saved parameters - Carregar os parâmetros salvos - - - - Export - Exportar - - - - Fast export - - - - - Opens the current export direcotory. This can be changed in the preferences! - Abre o diretório de exportação atual. Isto pode ser alterado nas preferências! - - - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Aberto</span></a></p></body></html> - - - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Aqui você pode aplicar uma correção gamma para o HDR.<br>A correção gamma será aplicada antes do mapeamento de tom. - - - - Process - Processo - - - - Result Si&ze - Tama&nho final - - - - - Gamma applied before tonemapping - Gamma aplicada antes do mapeamento de tom - - - - Pre-&gamma - Pre-&gamma - - - - Restore pregamma's default value (1) - Restaurar o valor padrão de pregamma (1) - - - - Size of the resulting LDR image - Tamanho da imagem LDR resultante - - - - Here you can choose the size of the resulting LDR image. - Aqui você pode escolher o tamanho da imagem LDR resultante. - - - - Set Custom Output Size - Configurar o tamanho personalizado da saída - - - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Ao clicar neste botão você será capaz de inserir um <i>width</i>valor para o tamanho da imagem LDR resultante.<br>Depois de pressionar Enter (ou Return) um valor de altura será computada automaticamente e o novo tamanho adicionado à lista. - - - - Start tonemapping (CTRL+T) - Comece o mapeamento de tom (CTRL+T) - - - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Use parâmetros atuais acima (operador de mapeamento de tom e pregamma) para computar uma imagem LDR - - - - &Update preview - &Atualizar visualização + OK + OK + + + TMOProgressIndicator - - Ctrl+T - Ctrl+T + + Abort computation + Abortar computação + + + ThresholdWidget - - Update current LDR - Atualize LDR atual + + Frame + Quadro - - Auto Levels - Níveis Automáticos + + Threshold + Limiar + + + TiffModeDialog - - <html><head/><body><p>set auto levels threshold</p></body></html> - + + Save as ...TIFF + Salvar como ...TIFF + + + TonemappingPanel - + Tonemap Mapa de tom - + Mantiuk '06 Mantiuk '06 - + Mantiuk '08 Mantiuk '08 - + Fattal Fattal - + Ferradans Ferradans - + Drago Drago - + Durand Durand - + Reinhard '02 Reinhard '02 - + Reinhard '05 Reinhard '05 - + Ashikhmin Ashikhmin - + Pattanaik Pattanaik - + Mai + Mai + + + + Ferwerda - - Operator - Operador + + KimKautz + + + + + VanHateren + - - Contrast Factor - Fator de contraste + + Lischinski + - - Saturation Factor - Fator de saturação + + Operator + Operador - - Detail Factor - Fator de detalhe + + &Contrast Factor + - + Contrast Equalization Equalização do Contraste - - Predefined Display - Mostrador predefinido + + &Detail Factor + + + + + Saturat&ion Factor + - + Lcd Office Escritório lcd - + Lcd Lcd - + Lcd Bright Lcd Brilhante - + CRT CRT - - - Color Saturation - Saturação de cor + + Co&lor Saturation + - - Contrast Enhancement - Melhoria do Contraste + + Co&ntrast Enhancement + - + Enable Luminace Level Habilitar Nível do Luminace - - Luminance Level - Nível do Luminance + + Lum&inance Level + - - Alpha - Alpha + + Predefined &Display + - - Beta - Beta + + A&lpha + + + + + Bet&a + + + + + Color Saturat&ion + - - Noise Reduction - Redução de ruído + + &Noise Reduction + - + Version 2.3.0 Version 2.3.0 - - Inverse Alpha + + &Inverse Alpha - + Rho Rho - - Bias - Viés + + B&ias + - - Spatial Kernel Sigma - Ordenamento do Kernel Sigma + + Spatial &Kernel Sigma + - - Range Kernel Sigma - Intervalo do Kernel Sigma + + Base Co&ntrast + - - Base Contrast - Contraste da Base + + Range Kerne&l Sigma + - - Key Value - Valor da Chave + + Ph&i + - - Phi - Pi + + &Key Value + - - Use Scales - Use Escalas + + &Lower Scale + - - Range - Intervalo + + Upper S&cale + - - Lower Scale - Escala Inferior + + Use Scales + Use Escalas - - Upper Scale - Escala Superior + + Ra&nge + - - Brightness - Brilho + + &Light Adaptation + - - Chromatic Adaptation - Adaptação Cromática + + Chromatic A&daptation + - - Light Adaptation - Adaptação Luminosa + + Br&ightness + - - Local Contrast Threshold - Limiar do Contraste Local + + Local Contrast Threshol&d + - + Simple Simples - - Equation Number - Número da Equação + + Equation &Number + - + Eqn &2 - + Eqn &2 - + Eqn &4 - - - - - Multiplier - Multiplicador + Eqn &4 - + Local Tone Mapping Mapeamento de Tom Local - + + Mu&ltiplier + + + + Auto Cone/Rod Auto Cone/Haste - - Cone Level - Nível do Cone + + Co&ne Level + - - Rod Level - Nível da Haste + + Ro&d Level + - + This operator has no options + Este operador não tem opções + + + + &Multiplier + + + + + A&daptation Luminance + + + + + &C1 + + + + + C&2 + + + + + Pup&il Area + + + + + a&lpha mul - + Restore operator's default values Restaurar os valores padrão da operadora - + Restore Restaurar - + Previous applied settings Configurações anteriores aplicadas - + Previous Anterior - + Next applied settings Configurações próximas aplicadas - + Next Próximo - + + Start tonemapping (CTRL+T) + Comece o mapeamento de tom (CTRL+T) + + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Use parâmetros atuais acima (operador de mapeamento de tom e pregamma) para computar uma imagem LDR + + + + &Update preview + &Atualizar visualização + + + + Ctrl+T + Ctrl+T + + + + Update current LDR + Atualize LDR atual + + + + Auto Levels + Níveis Automáticos + + + + <html><head/><body><p>set auto levels threshold</p></body></html> + <html><head/><body><p>definir o limite dos níveis automáticos</p></body></html> + + + + Processing + + + + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Aqui você pode aplicar uma correção gamma para o HDR.<br>A correção gamma será aplicada antes do mapeamento de tom. + + + + Res&ult Size + + + + + Set Custom Output Size + Configurar o tamanho personalizado da saída + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Ao clicar neste botão você será capaz de inserir um <i>width</i>valor para o tamanho da imagem LDR resultante.<br>Depois de pressionar Enter (ou Return) um valor de altura será computada automaticamente e o novo tamanho adicionado à lista. + + + + + Gamma applied before tonemapping + Gamma aplicada antes do mapeamento de tom + + + + Pre-&gamma + Pre-&gamma + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + + + + + Pos&t-saturation + + + + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + + + + + Post-gamma + + + + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + + + + + ... + ... + + + + Settings + + + + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Aqui você pode carregar e salvar um arquivo de configurações de mapeamento de tom.<br>Você também pode aplicar o conteúdo do arquivo de configurações carregado. + + + + Tone Mapping Settings + Configurações para Mapeamento de Tom + + + + Save current parameters to a text file + Salve os parâmetros atuais num arquivo de texto + + + + Save current parameters (pregamma and TMO) to a text file. + Salve os parâmetros atuais (pregamma e TMO) num arquivo de texto. + + + + Load an existing text file containing pregamma and TMO settings + Carregue um arquivo de texto contendo configurações pregamma e TMO + + + + Load an existing text file containing pregamma and TMO settings. + Carregue um arquivo de texto contendo configurações pregamma e TMO. + + + + Load saved parameters + Carregar os parâmetros salvos + + + + Save current parameters + Salve os parâmetros atuais + + + + Export + Exportar + + + + Fast export + Exportação rápida + + + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Aberto</span></a></p></body></html> + + + Queue size: %1 Tamanho da fila: %1 - + TM Database Problem TM Problema de Banco de Dados - + The database used for saving TM parameters cannot be opened. Error: %1 O banco de dados usado para salvar os parâmetros TM não pode ser aberto. Erro: %1 - + Load a tonemapping settings text file... Carregar um arquivo de texto de configurações do mapeamento de tom... - - + + LuminanceHDR tonemapping settings text file (*.txt) arquivo texto(*.txt) de configurações de mapeamento de tom LuminanceHDR - - - - + + + + Aborting... Abortando... - + File is not readable (check existence, permissions,...) O arquivo não pode ser lido (cheque existência, permissões, ...) - + Save tonemapping settings text file to... Salve arquivo texto de configurações de mapeamento de tom para... - + File is not writable (check permissions, path...) O arquivo não é gravável (cheque permissões, caminho...) - + File is not readable (check permissions, path...) O arquivo não pode ser lido (cheque permissões, caminho...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Erro: O formato do arquivo de configurações de mapeamento de tom mudou. Este arquivo (antigo) não pode ser usado nesta versão do LuminanceHDR. Criar um novo. - + Custom LDR size LDR tamanho personalizado - + Enter the width of the new size: Digite a largura do novo tamanho: @@ -6254,7 +6500,7 @@ Show onl&y: - + Apenas mostr&ar: @@ -6274,7 +6520,7 @@ Filter &log messages: - + Filtrar &mostrar mensagens: @@ -6297,19 +6543,19 @@ &Começar - - + + All Supported formats Todos os formatos Suportados - - + + Select the input images Selecione as imagens de entrada - + &Done &Feito @@ -6317,39 +6563,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Documento de licença não encontrado, você pode encontrá-lo online: %2aqui%3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Documento de registro de alterações não encontrado, podes encontrá-lo on-line: %2aqui%3 - + Donation Doação - + Would you like to donate? Gostaria de doar? - + Yes, I'd love to! Sim, adoraria! - + Stop Bothering Me Pare de incomodar - + Remind me later Me lembre depois @@ -6357,18 +6603,18 @@ UpdateChecker - + A new release is ready for download! Uma nova versão esta pronta para baixar! - - + + Do you want to open the webpage for download now? Gostaria de abrir a página para baixar agora? - + Click to download, or select Help->Update! Clique para baixar, ou escolha Ajuda->Atualizar! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_ro.ts luminance-hdr-2.6.0/i18n/lang_ro.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_ro.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_ro.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors A&utori - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Mulţumiri Către - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &Licența - + &OK &OK @@ -123,271 +174,320 @@ Destinație - + Choose an HDR output file format Alege un format HDR pentru exportare - - Predefined profile: - Profil predefinit: - - - - Output format: - Formatul exportat: + + Filename prefix: + - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Alege unul dinte profilurile predefinite. -Vezi documentaţia pentru mai multe informaţii. + - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + Formatul exportat: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Ponderi: + + + + Predefined profile: + Profil predefinit: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Triunghiulară + + + + Linear + Liniară + + + Alignment Aliniere - - Auto align the bracketed pictures - Auto aliniază imaginile din paranteză + + Use Hugin's align_image_stack engine + Foloseşte Hugin's align_image_stack engine - - Auto-align images - Auto aliniază imaginile + + Hugin's align_&image_stack + - + Use MTB (Median Threshold Bitmap) engine Foloseşte MTB (Median Threshold Bitmap) motor - + &MTB - - Use Hugin's align_image_stack engine - Foloseşte Hugin's align_image_stack engine + + Auto align the bracketed pictures + Auto aliniază imaginile din paranteză - - Hugin's align_&image_stack - + + Auto-align images + Auto aliniază imaginile - + Auto-crop - + &Cancel - + &Start - + &Close - + Progress - + Input/Output - + Folder where created HDRs are saved Fişierul unde HDR-urile create sunt salvate - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) Fişierele unde pozele din paranteză sunt localizate (în ordine alfabetică) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... Procesarea a început... - + Loading files... - + Completed with errors Complet dar cu erori - + Completed without errors Complet fără erori - + Error: missing EXIF data Eroare: lipseşte EXIF - + Aligning... Aliniere... - + Creating HDR... Se Creează HDR... - + Doing auto anti-ghosting... - + Written Scris - + Error: Eroare: - + Aborting... Anulând... @@ -410,261 +510,302 @@ Lista de HDR-uri care vor fi mapate - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R + + + + + Remove All Files (Alt+X) - + + + ... + ... + + + + Alt+X + + + + Add Files (Alt+F) - + Alt+F - - Remove Files (Alt+R) + + Add Directory (Alt+D) - - Alt+R + + Alt+D - + Tone Mapping Settings Setări mapare de tonuri - - Add Directory (Alt+I) + + Add Files (Alt+L) - - Alt+I + + Alt+L - - Add Files (Alt+L) + + Add Directory (Alt+I) - - Alt+L + + Alt+I - + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Listă de fișiere de setări de mapare de tonuri ce vor fi folosite pentru maparea fiecărei imagini HDR - + Output Destinație - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files Specifică dosarul destinație pentru fișierele mapate de tonuri - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log Jurnal conversie - + Batch operations report Raport operații în serie - + Show onl&y: - + Filter messages based on severity Filtrează mesajele pe baza severității - + All messages Toate mesajele - + Errors only Doar erorile - + Success messages Mesajele de succes - + Filter &log messages: - + Clear filter text Șterge text filtru - + Overall completion progress Progres îndeplinire global - + &Cancel - + Start batch tone mapping Începe mapare de tonuri în serie - + &Start - + Using %n thread(s) - - - + + + Choose a directory Alege un dosar - + All HDR images Toate imaginile HDR - + Select input images Alege imaginile sursă - + Load tone mapping settings text files... Încarcă fișierele text de setări pentru maparea de tonuri... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... Procesând... - + Start processing... Începe procesarea... - + Close Închide - + &Done &Gata - + + Conversion aborted by user request. + + + + All tasks completed. Toate sarcinile finalizate. - + Aborting... Anulând... @@ -672,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Începe să proceseze %2 - + [T%1] Successfully load %2 [T%1] Încărcat cu succes %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] Fişier LDR salvat cu succes: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] EROARE: Fişierul nu poate fi salvat: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] EROARE: Încărcarea fişierului %2 a eşuat @@ -700,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Utilizare: %1 [OPȚIUNI]...[FIȘIERESURSĂ]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Eroare: Motor de aliniere nerecunoscut. - + Error: Unknown weight function specified. Eroare: funcția de ponderi necunoscută. - + Error: Unknown response curve specified. Eroare: Curba de răspuns necunoscută. - + Error: Unknown HDR creation model specified. Eroare: Model de creere HDR necunoscut. - + Error: Unknown tone mapping operator specified. Eroare: Operator mapare de tonuri necunoscut. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Eroare: Numărul de valori EV specificat este diferit de numărul de fișiere sursă. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Eroare: Informațiile Exif lipsesc din imagini și valorile EV nu sunt specificate în linia de comandă, renunțând. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack Eșuat în a executa align_image_stack - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1343,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable Ed&itabil - + R&eference R&eferință - + Select the previous image in both lists Selectează imaginea precedentă în ambele liste - + Select the next image in both lists Selectează imaginea următoare în ambele liste - + Choose a directory and a prefix Alege un dosar și un prefix @@ -1419,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Imaginea selectată în această listă poate fi deplasată în sus, în jos, în stânga și în dreapta folosind controalele de mai jos. -Histograma acestei imagini este afișată în widgetul de mai sus. +This image's histogram is displayed in the widget above. + @@ -1914,18 +2152,18 @@ - + Choose a directory Alege un dosar - - + + Error: Eroare: - + must be a directory. @@ -2085,28 +2323,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2114,7 +2352,7 @@ GenericViewer - + Pan the image to a region Deplasează imaginea la o regiune @@ -2127,45 +2365,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + Închide + + + HdrViewer - + &Mapping: &Mapare: - + Histogram: Histogramă: - + Linear Liniară - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2189,7 +2440,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2229,7 +2480,7 @@ - &MTB + M&TB @@ -2239,7 +2490,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2306,12 +2557,12 @@ [2/2]Alege setările pentru crearea HDR - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2324,47 +2575,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Primul profil predefinit dă de obicei cele mai bune rezultate. Schimbă-l doar dacă imaginea HDR rezultată nu este suficient de bună.</span></p></body></html> - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Utilizează aceasta doar dacă profilele implicite de mai sus nu dau rezultate bune - + Use Custom Configuration - + HDR Creation Model @@ -2414,238 +2665,267 @@ - + Linear Liniară - + Gamma Gamma - + Log Log - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > Î&nainte> - + &Cancel - + Image Filename Nume fișier imagine - + Exposure Expunere - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; Imagini TIFF (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Selectează imaginile sursă - + Unknown - + Loading... Se Încarcă... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - + + Do not show this message again + + + + EXIF data not found Nu am găsit informațiile EXIF - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Imagini încărcate.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Pentru a continua trebuie să setezi manual valorile expunererii.<br><font color="#FF0000">%1</font> valori încă necesare.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: Se Încarcă Eroarea: - + Start loading a set of images with different exposure Începe să încarci un set de imagini cu expuneri diferite - - - + + + Error... Eroare... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Eşuat în a porni aplicaţie externă. Te rog foloseşte: Conţinut-Ajutor-Setări-Unelte Externe pentru mai multe informaţii. - + The external application "<em>align_image_stack</em>" crashed... Aplicația externă "<em>align_image_stack</em>" a eșuat... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... A apărut o eroare necunoscută la execuția aplicației "<em>align_image_stack</em>"... - + Now click on next button Acum apasă pe butonul următor - + + Compute + + + + + Finish + + + + Aligning... Aliniere... - - - &Finish - &Finalizare + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - Ponderi: - - - - - Response curve: - - Curbă de răspuns: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Toate valorile EV au fost setate.<br>Acum apasă butonul Înainte.</b></h3></font></center> - - - Model: - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Pentru a continua trebuie să setezi manual valorile expunererii.<br><font color="#FF0000">%1</font> valori încă necesare.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Toate valorile EV au fost setate.<br>Acum apasă butonul Înainte.</b></h3></font></center> + + Hide Log + @@ -2657,7 +2937,7 @@ - + &File &Fișier @@ -2683,7 +2963,7 @@ - + &Print... &Tipărește... @@ -2699,7 +2979,7 @@ - + &Find... &Caută... @@ -2730,7 +3010,7 @@ - + &Add Bookmark &Adaugă semn de carte @@ -2746,7 +3026,7 @@ - + D&elete All Șt&erge Tot @@ -2816,100 +3096,98 @@ - + Help SideBar Bară laterală ajutor - + LuminanceHDR Online Help Ajutor online LuminanceHDR - + &Edit &Editare - + &View &Vizualizare - - + + &Bookmarks &Semne de carte - + &Quit &Ieșire - + Find &Next Caută &următorul - + Find &Previous Caută &precedentul - + &Contents &Conținut - + &Search &Căutare - + &Delete &Șterge - + Find Caută - + Search Term: Temen căutare: - + New Bookmark Semn de carte nou - + New Bookmark's Title: Titlu semn de carte: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Nici un manual nu este instalat!</p><p>Contactează furnizorul de pachete sau echipa LuminanceHDR dacă ai construit aplicația personal</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR - Navigator ajutor - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Acest protocol nu poate fi manipulat de navigatorul ajutor. -Vrei să deschid legătura cu aplicația implicită -asociată cu protocolul? + @@ -2965,22 +3243,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2988,7 +3271,7 @@ ImageQualityDialog - + Unknown @@ -3039,9 +3322,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3121,7 +3404,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3966,18 +4249,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3991,6 +4269,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -4006,91 +4289,90 @@ Gata. Acum deschide o imagine HDR existentă sau crează una nouă! - + All HDR formats Toate formatele HDR - + Load one or more HDR images... Încarcă una sau mai multe imagini HDR... - + Save files in Salvează fișierele în - - + + Failed to save %1 - + Done! Realizat! - + Aborting... Anulând... - - - Untitled - - - - + Cropped Image Imagine tăiată - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Schimbări nesalvate... - + This HDR image has unsaved changes.<br>Do you want to save it? Această imagine HDR are schimbări nesalvate.<br>Vrei să o salvezi? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + + + + Untitled %1 Fără titlu %1 - + Error: %1 Eroare: %1 - + Untitled HDR - + FITS Image @@ -4391,13 +4673,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4641,28 +4923,28 @@ &OK - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Alege un dosar - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4778,17 +5060,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: Eroare: nu pot încărca fișierul de setări pentru mapare de tonuri: - + ERROR: File too old, cannot parse Tone Mapping Setting file: Eroare: Fișier prea vechi, nu pot parcurge fișierul de setări pentru maparea de tonuri: - + ERROR: cannot parse Tone Mapping Setting file: Eroare: nu pot parcurge fișierul de setări pentru maparea de tonuri: @@ -4796,370 +5078,452 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Triunghiulară - - - - Plateau - Platou - - - - Gaussian - Gaussian - - - - Flat - - - - - Linear - Liniară - - - - Gamma - Gamma - - - - Logarithmic - - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Egalizare contrast - + Contrast - - + + Saturation Saturaţie - + Detail - + Luminance Level Nive luminanță - + Luminance Level=Auto - + Color Saturation Saturație culoare - + Contrast Enhancement Îmbunătățire contrast - + + Alpha Alfa - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 Ecuaţie 2 - + Equation 4 Ecuaţie 4 - - + + Local - + Bias Tendință - + Spatial - - + + Range Interval - + Base - + Multiplier Multiplicator - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness Strălucire - + Chromatic Adaptation Adaptare cromatică - + Light Adaptation Adaptare lumină - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Triunghiulară + + + + Plateau + Platou + + + + Gaussian + Gaussian + + + + Flat + + + + + Linear + Liniară + + + + Gamma + Gamma + + + + Logarithmic + + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... Opţiune... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float Nu pot coverti %1 la virgulă mobilă - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + Baza de date folosită pentru a salva parametrii TM nu poate fi deschisă. +Eroare: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Toate formatele LDR - + Save the LDR image as... Salvează imaginea LDR ca... + All HDR formats + + + + Save the HDR image as... Salvează imaginea HDR ca... - + Save as... Salvează ca... @@ -5230,222 +5594,40 @@ SavedParametersDialog - + Saved Parameters Parametrii Salvaţi - - + Comment Comentariu - + TM Operator Operator TM + + + SavingParameters - - Simple - Simplu + + Saving Parameters + Se Salvează Parametrii - - Equation 2 - Ecuaţie 2 + + Enter a short comment for the saved parameters: + Introdu un scurt comentariu pentru parametrii salvaţi: + + + SupportedCamerasDialog - - Local Contrast Threshold - Prag contrast local - - - - Bias - Tendință - - - - Spatial Kernel Sigma - Sigma nucleu spațial - - - - Range Kernel Sigma - Sigma nucleu interval - - - - Base Contrast - Contrast bază - - - - Alpha - Alfa - - - - Beta - Beta - - - - - Color Saturation - Saturație culoare - - - - Noise Reduction - Reducere de zgomot - - - - Old Fattal - Fattal Vechi - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Egalizare contrast - - - - Contrast Factor - Factor contrast - - - - Saturation Factor - Factor saturație - - - - Detail Factor - Factor detalii - - - - Contrast Enhancement - Îmbunătățire contrast - - - - Luminance Level - Nive luminanță - - - - Manual Luminance Level - Manual Luminance Nivel - - - - Cone and Rod based on Luminance - Con și tijă bazate pe luminanță - - - - Local Tonemapping - Mapare Locală De Tonuri - - - - Cone Level - Nivel con - - - - Rod Level - Nivel tijă - - - - Multiplier - Multiplicator - - - - Use Scales - Utilizează scale - - - - Key Value - Valoare cheie - - - - Phi Value - Valoarea Phi - - - - Range - Interval - - - - Lower Scale - Scală joasă - - - - Upper Scale - Scală înaltă - - - - Brightness - Strălucire - - - - Chromatic Adaptation - Adaptare cromatică - - - - Light Adaptation - Adaptare lumină - - - - Pre-gamma - Pre-gamma - - - - SavingParameters - - - Saving Parameters - Se Salvează Parametrii - - - - Enter a short comment for the saved parameters: - Introdu un scurt comentariu pentru parametrii salvaţi: - - - - SupportedCamerasDialog - - - List of supported cameras - + + List of supported cameras + @@ -5481,7 +5663,7 @@ TMOProgressIndicator - + Abort computation Anulează calcul @@ -5510,532 +5692,606 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Aici poți încărca și salva un fișier de setări pentru mapare de tonuri.<br>Poți deasemenea aplica conținutul fișierului de setări curent încărcat. + + Tonemap + Mapare De Tonuri - - Tone Mapping Settings - Setări mapare de tonuri + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - Salvează parametrii curenți într-un fișier text + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - Salvează parametrii curenți (pregamma și TMO) într-un fișier text. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - Încarcă un fișier text existent conținând setări pregamma și TMO + + Ferradans + - - Load an existing text file containing pregamma and TMO settings. - Încarcă un fișier text existent conținând setări pregamma și TMO. + + Drago + Drago - - Save current parameters - + + Durand + Durand - - Load saved parameters + + Reinhard '02 + Reinhard '02 + + + + Reinhard '05 + Reinhard '05 + + + + Ashikhmin + Ashikhmin + + + + Pattanaik + Pattanaik + + + + Mai - - Export + + Ferwerda - - Fast export + + KimKautz - - Opens the current export direcotory. This can be changed in the preferences! + + VanHateren - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Lischinski - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Aici poți aplica corecția gamma la HDR.<br>Corecția gamma va fi aplicată înainte de maparea de tonuri. + + Operator + Operator - - Process - Proces + + &Contrast Factor + - - Result Si&ze + + Contrast Equalization + Egalizare contrast + + + + &Detail Factor - - Gamma applied before tonemapping + Saturat&ion Factor - - Pre-&gamma - + + Lcd Office + Lcd birou - - Restore pregamma's default value (1) - Restaurează valoare implicită pregamma (1) + + Lcd + Lcd - - Size of the resulting LDR image - Dimensiunea imaginii LDR rezultate + + Lcd Bright + Lcd strălucitor - - Here you can choose the size of the resulting LDR image. - Aici poți alege dimensiunea imaginii LDR rezultate. + + CRT + CRT - - Set Custom Output Size - Setează Mărimea De Export + + Co&lor Saturation + - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Cu clic pe acest buton vei putea să inserezi o <i>lățime</i> pentru imaginea LDR rezultată.<br>După apasarea Enter o valoare a înălțimii va fi calculată automat și noua dimensiune va fi adăugată la listă. + + Co&ntrast Enhancement + - - Start tonemapping (CTRL+T) + + Enable +Luminace Level + Activează +Nivelul Luminance + + + + Lum&inance Level - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Utilizează parametrii curenți de mai sus (pregamma și operator mapare de tonuri) pentru a calcula o imagine LDR + + Predefined &Display + - - &Update preview + + A&lpha - - Ctrl+T - Ctrl+T + + Bet&a + - - Update current LDR - Actualizează LDR-ul curent + + Color Saturat&ion + - - Auto Levels + + &Noise Reduction - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Version 2.3.0 - - Tonemap - Mapare De Tonuri + + &Inverse Alpha + - - Mantiuk '06 - Mantiuk '06 + + Rho + - - Mantiuk '08 - Mantiuk '08 + + B&ias + - - Fattal - Fattal + + Spatial &Kernel Sigma + - - Ferradans + + Base Co&ntrast - - Drago - Drago + + Range Kerne&l Sigma + - - Durand - Durand + + Ph&i + - - Reinhard '02 - Reinhard '02 + + &Key Value + - - Reinhard '05 - Reinhard '05 + + &Lower Scale + - - Ashikhmin - Ashikhmin + + Upper S&cale + - - Pattanaik - Pattanaik + + Use Scales + Utilizează scale - - Mai + + Ra&nge - - Operator - Operator + + &Light Adaptation + - - Contrast Factor - Factor contrast + + Chromatic A&daptation + - - Saturation Factor - Factor saturație + + Br&ightness + - - Detail Factor - Factor detalii + + Local Contrast Threshol&d + - - Contrast Equalization - Egalizare contrast + + Simple + Simplu - - Predefined Display - Afișaj predefinit + + Equation &Number + - - Lcd Office - Lcd birou + + Eqn &2 + - - Lcd - Lcd + + Eqn &4 + - - Lcd Bright - Lcd strălucitor + + Local Tone Mapping + Mapare de tonuri locală - - CRT - CRT + + Mu&ltiplier + - - - Color Saturation - Saturație culoare + + Auto Cone/Rod + - - Contrast Enhancement - Îmbunătățire contrast + + Co&ne Level + - - Enable -Luminace Level - Activează -Nivelul Luminance + + Ro&d Level + - - Luminance Level - Nive luminanță + + This operator has no options + - - Alpha - Alfa + + &Multiplier + - - Beta - Beta + + A&daptation Luminance + - - Noise Reduction - Reducere de zgomot + + &C1 + - - Version 2.3.0 + + C&2 - - Inverse Alpha + + Pup&il Area - - Rho + + a&lpha mul - - Bias - Tendință + + Restore operator's default values + Restabilește valorile implicite ale operatorilor - - Spatial Kernel Sigma - Sigma nucleu spațial + + Restore + Restabilește - - Range Kernel Sigma - Sigma nucleu interval + + Previous applied settings + Precedentele setări aplicate - - Base Contrast - Contrast bază + + Previous + Precedent - - Key Value - Valoare cheie + + Next applied settings + Următoarele setări aplicate - - Phi - Phi + + Next + Următor - - Use Scales - Utilizează scale + + Start tonemapping (CTRL+T) + - - Range - Interval + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Utilizează parametrii curenți de mai sus (pregamma și operator mapare de tonuri) pentru a calcula o imagine LDR - - Lower Scale - Scală joasă + + &Update preview + - - Upper Scale - Scală înaltă + + Ctrl+T + Ctrl+T - - Brightness - Strălucire + + Update current LDR + Actualizează LDR-ul curent - - Chromatic Adaptation - Adaptare cromatică + + Auto Levels + - - Light Adaptation - Adaptare lumină + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Local Contrast Threshold - Prag contrast local + + Processing + - - Simple - Simplu + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Aici poți aplica corecția gamma la HDR.<br>Corecția gamma va fi aplicată înainte de maparea de tonuri. - - Equation Number - Număr ecuație + + Res&ult Size + - - Eqn &2 + + Set Custom Output Size + Setează Mărimea De Export + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Cu clic pe acest buton vei putea să inserezi o <i>lățime</i> pentru imaginea LDR rezultată.<br>După apasarea Enter o valoare a înălțimii va fi calculată automat și noua dimensiune va fi adăugată la listă. + + + + + Gamma applied before tonemapping - - Eqn &4 + + Pre-&gamma - - Multiplier - Multiplicator + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Local Tone Mapping - Mapare de tonuri locală + + Pos&t-saturation + - - Auto Cone/Rod + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> - - Cone Level - Nivel con + + Post-gamma + - - Rod Level - Nivel tijă + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - This operator has no options + + ... + ... + + + + Settings - - Restore operator's default values - Restabilește valorile implicite ale operatorilor + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Aici poți încărca și salva un fișier de setări pentru mapare de tonuri.<br>Poți deasemenea aplica conținutul fișierului de setări curent încărcat. - - Restore - Restabilește + + Tone Mapping Settings + Setări mapare de tonuri - - Previous applied settings - Precedentele setări aplicate + + Save current parameters to a text file + Salvează parametrii curenți într-un fișier text - - Previous - Precedent + + Save current parameters (pregamma and TMO) to a text file. + Salvează parametrii curenți (pregamma și TMO) într-un fișier text. - - Next applied settings - Următoarele setări aplicate + + Load an existing text file containing pregamma and TMO settings + Încarcă un fișier text existent conținând setări pregamma și TMO - - Next - Următor + + Load an existing text file containing pregamma and TMO settings. + Încarcă un fișier text existent conținând setări pregamma și TMO. + + + + Load saved parameters + + + + + Save current parameters + + + + + Export + + + + + Fast export + - + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + + + Queue size: %1 - + TM Database Problem TM Probleme Cu Baza De Date - + The database used for saving TM parameters cannot be opened. Error: %1 Baza de date folosită pentru a salva parametrii TM nu poate fi deschisă. Eroare: %1 - + Load a tonemapping settings text file... Încarcă un fișier setări text de mapare de tonuri... - - + + LuminanceHDR tonemapping settings text file (*.txt) Fișier setări text de mapare de tonuri Luminance HDR (*.txt) - - - - + + + + Aborting... Anulând... - + File is not readable (check existence, permissions,...) Fișierul nu este citibil (verifică existența, drepturi,...) - + Save tonemapping settings text file to... Salvează fișier setări text de mapare de tonuri în... - + File is not writable (check permissions, path...) Fișierul nu poate fi scris (verifică drepturi, cale...) - + File is not readable (check permissions, path...) Fișierul nu poate fi citit (verifică drepturi, cale...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Dimensiune LDR customizată - + Enter the width of the new size: Introduce lățimea noii dimensiuni: @@ -6185,19 +6441,19 @@ - - + + All Supported formats Toate formatele acceptate - - + + Select the input images Selectează imaginile sursă - + &Done &Gata @@ -6205,39 +6461,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation Donaţie - + Would you like to donate? Ai vrea să donezi? - + Yes, I'd love to! Da, aș vrea! - + Stop Bothering Me Nu mă mai deranja - + Remind me later Aminteşte-mi mai târziu @@ -6245,18 +6501,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_ru.ts luminance-hdr-2.6.0/i18n/lang_ru.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_ru.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_ru.ts 2019-06-09 19:18:38.000000000 +0000 @@ -30,75 +30,215 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> - +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Создание и тональное отображение HDR-снимков.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors - &Авторы + А&вторы - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">РАЗРАБОТЧИКИ</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Главный разработчик QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Главные разработчики Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Улучшения, исправление ошибок</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Кодовая база pfs{tools|calibration|tmo}</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">УЧАСТНИКИ</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">СОПРОВОЖДАЮЩИЕ ПАКЕТОВ</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">ПЕРЕВОДЧИКИ</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Команда перевода Luminance HDR</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Китайский</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Чешский</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Французский</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Немецкий</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Норвежский</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Польский</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Румынский</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Русский</span><span style=" font-size:10pt;">: Александр Прокудин, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Испанский</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Турецкий</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &Благодарности - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Сообщество на </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Сообщество на </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">align_image_stack из Hugin и другое</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">А также</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog Журнал изменений - + &License Agreement &Лицензионное соглашение - + &OK &ОК @@ -127,273 +267,323 @@ Сохранение полученных LDR-снимков - + Choose an HDR output file format Выберите формат для сохранения HDR - - Predefined profile: - Готовый профиль: - - - - Output format: - Выходной формат: + + Filename prefix: + Префикс имени файла: - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - Выберите один из готовых профилей для создания. -За более подробной информацией обратитесь к документации. + Выберите один из готовых профилей создания файлов. +Подробнее читайте в документации. - + Profile 1 Профиль 1 - + Profile 2 Профиль 2 - + Profile 3 Профиль 3 - + Profile 4 Профиль 4 - + Profile 5 Профиль 5 - + Profile 6 Профиль 6 - + + Output format: + Выходной формат: + + + + hdr_ + hdr_ + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + <html><head/><body><p>Если выбрано, имена файлов создаваемых HDR будут иметь вид <span style=" font-style:italic;">первый-последний_МодельСозданияHdr.ext</span>, где первый — имя первого файла в вилке экспозиции, последний — имя последнего файла в ней, а расширение выбирается в зависимости от формата HDR-файла.</p></body></html> + + + + Use Proposed Filename Scheme + Использовать предложенную схему именования + + + + Response: + Отклик: + + + + Weights: + Взвешивание: + + + + Predefined profile: + Готовый профиль: + + + + Model: + Модель: + + + + Debevec + Дебевек + + + + Triangular + Треугольная + + + + Linear + Линейная + + + Alignment Выравнивание - - Auto align the bracketed pictures - Автоматически выравнивать изображения из вилки + + Use Hugin's align_image_stack engine + Использовать движок align_image_stack из Hugin - - Auto-align images - Автоматически выровнять изображения + + Hugin's align_&image_stack + align_&image_stack из Hugin - + Use MTB (Median Threshold Bitmap) engine Использовать движок MTB (среднепороговая битовая карта) - + &MTB &MTB - - Use Hugin's align_image_stack engine - Использовать движок align_image_stack из Hugin + + Auto align the bracketed pictures + Автоматически выравнивать изображения из вилки - - Hugin's align_&image_stack - align_&image_stack из Hugin + + Auto-align images + Автоматически выровнять изображения - + Auto-crop Автокадрирование - + &Cancel О&тменить - + &Start На&чать - + &Close &Закрыть - + Progress Продвижение - + Input/Output Ввод/вывод - + Folder where created HDRs are saved Папка, куда сохраняются готовые HDR'ы - - + + Select... Выбрать... - + Folder where bracketed pictures are located (in alphabetical order) Папка, где находятся изображения из вилки (в алфавитном порядке) - + Input folder: Входная папка: - + Output folder: Выходная папка: - + Anti-ghosting Антипризрак - + Artifact-free High Dynamic Range Imaging Безартефактное создание HDR - + Threshold Порог - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> <html><head/><body><p>Порог, используемый алгоритмом удаления «призраков». Более низкий порог означает более агрессивную обработку, но может сузить окончательный динамический диапазон. Используйте кнопку «Пересчитать», чтобы увидеть текущее покрытие заплатами и соответствующим образом подстроить порог.</p></body></html> - + O. Gallo and others O. Gallo с соавторами - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> <html><head/><body><p>Включить алгоритм удаления «призраков»</p></body></html> - + Auto anti-ghosting Автоматический антипризрак - + Custom config %1 Пользовательская конфигурация %1 - + Choose a source directory Выберите исходный каталог - + Choose a output directory Выберите выходной каталог - - - + + + Warning Внимание - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - Выбранный выходной каталог содержит файлы HDR. Эти файлы могут быть перезаписаны. + Выбранный целевой каталог содержит файлы HDR. Эти файлы могут быть перезаписаны. Продолжить? - - + + Total number of pictures must be a multiple of number of bracketed images. Общее число изображений должно быть кратно числу изображений в вилке. - + Started processing... Началась обработка... - + Loading files... Загружаются файлы... - + Completed with errors Завершено с ошибками - + Completed without errors Завершено без ошибок - + Error: missing EXIF data Ошибка: отсутствуют данные EXIF - + Aligning... Выполняется выравнивание... - + Creating HDR... Создаётся HDR... - + Doing auto anti-ghosting... Изгоняются призраки... - + Written Записано - + Error: Ошибка: - + Aborting... Прерывание... @@ -416,261 +606,302 @@ Список HDR-снимков, тона которых будут отображены - - Add Directory (Alt+D) - Добавить каталог (Alt+D) + + Remove Files (Alt+R) + Удалить файлы (Alt+R) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - Добавить файлы (Alt+F) + + Remove All Files (Alt+X) + Удалить все файлы (Alt+X) - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - Удалить файлы (Alt+R) + + Alt+X + Alt+X - - Alt+R - Alt+R + + Add Files (Alt+F) + Добавить файлы (Alt+F) - - Tone Mapping Settings - Параметры отображения тонов + + Alt+F + Alt+F - Add Directory (Alt+I) - Добавить каталог (Alt+I) + Add Directory (Alt+D) + Добавить каталог (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + Параметры отображения тонов - + Add Files (Alt+L) Добавить файлы (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + Добавить каталог (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) Добавить из базы данных (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) Удалить настройки (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + Удалить все настройки (Alt+W) + + + + Alt+W + Alt+W + + + List of Tone Mapping Setting files that will be used to tone map each HDR Список файлов с параметрами отображения тонов для каждого HDR-снимка - + Output Сохранение полученных LDR-снимков - + Output Image Width: Ширина выходного изображения: - + Output Folder: Выходная папка: - - + + Specify output folder for the tone mapped files Укажите каталог для сохранения снимков с отображенными тонами - + Selec&t... &Выбрать - - + + Width of tonemapped image in percent of original image Ширина отображённого изображения в процентах от оригинала - + % % - + Output Format: Выходной формат: - + Image format of tonemapped images Формат отображённых снимков - + Image format options Опции формата изображения - + Conversion Log Журнал работы - + Batch operations report Отчет о пакетном отображении тонов - + Show onl&y: &Показывать: - + Filter messages based on severity Фильтровать сообщения по важности - + All messages Все сообщения - + Errors only Только ошибки - + Success messages Сообщения об успехе - + Filter &log messages: &Фильтр сообщений журнала: - + Clear filter text Сбросить текст фильтра - + Overall completion progress Общий прогресс выполнения - + &Cancel О&тменить - + Start batch tone mapping Запустить пакетное отображение тонов - + &Start На&чать - + Using %n thread(s) - + Используется %n потокИспользуется %n потокаИспользуется %n потоковИспользуется %n поток(а,ов) - - - + + + Choose a directory Выберите каталог - + All HDR images Все HDR-снимки - + Select input images Выберите снимки для обработки - + Load tone mapping settings text files... Загрузите файлы с описанием отображения тонов - + Luminance HDR tone mapping settings text file (*.txt) Текстовый файл настроек отображения тонов Luminance HDR (*.txt) - + + Warning + Внимание + + + + An error occurred reading one or more tonemapping options files. + Произошла ошибка при чтении одного или более файлов опций отображения тонов. + + + Processing... Выполняется обработка... - + Start processing... Начать обработку... - + Close Закрыть - + &Done &Готово - + + Conversion aborted by user request. + Преобразование прервано по запросу пользователя. + + + All tasks completed. Все задачи выполнены. - + Aborting... Прерывание... @@ -678,27 +909,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] Начата обработка %2 - + [T%1] Successfully load %2 [T%1] Успешно загружен %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + [T%1] ОШИБКА: Не удалось отобразить тона файла: %2 + + + [T%1] Successfully saved LDR file: %2 [T%1] Успешно сохранён файл LDR: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] Ошибка: Невозможно сохранить файл: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] Ошибка: загрузка %2 не удалась @@ -706,575 +942,671 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Использование: %1 [КЛЮЧИ]... [ВХОДЯЩИЕ ФАЙЛЫ]... - + Display this help. Показать эту справку. - + Display program version. Показать версию программы. - + Print more messages during execution. Выводить больше сообщений во время выполнения. - + Print a list of all supported cameras. Вывести список поддерживаемых камер. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). [AIS|MTB] Механизм выравнивания, который следует использовать при создании HDR (по умолчанию: без выравнивания). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). EV1,EV2,... Укажите числовые значения ступеней экспозиции (в количестве INPUTFILES). - + prefix Save aligned images to files which names start with prefix prefix Сохранять выровненные изображения в файлы, имена которых начинаются с префикса - + HDR_FILE Load an HDR instead of creating a new one. HDR_FILE Загрузить HDR вместо создания нового. - + HDR_FILE Save to a HDR file format. (default: don't save) HDR_FILE Сохранить в файл формата HDR. (по умолчанию: не сохранять) - + VALUE Gamma value to use during tone mapping. (default: 1) VALUE Значение гаммы для использования при отображении тонов. (по умолчанию: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + VALUE Значение насыщенности для использования после отображения тонов. (по умолчанию: 1) + + + + VALUE Gamma value to use after tone mapping. (default: 1) + VALUE Значение гаммы для использования после отображения тонов. (по умолчанию: 1) + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) VALUE Ширина, до которой надо изменить размер HDR (размер изменяется до гамма-коррекции и отображения тонов) - + LDR_FILE File name you want to save your tone mapped LDR to. LDR_FILE Имя файла для сохранения тонально отображённого LDR. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) THRESHOLD Включить автоматическое удаление призраков с заданным порогом. (0.0-1.0) - + Apply autolevels correction after tonemapping. Применить автоматическую коррекцию уровней после отображения тонов. - + Enable generation of a webpage with embedded HDR viewer. Включить генерацию веб-страницы со встроенным просмотрщиком HDR. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + FILE_EXTENSION Сохранить файл LDR с именем вида первый-последний_временныепараметры.расширение. + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + FILE_EXTENSION Сохранить файл LDR с именем вида первый-последний_МодельСозданияHdr.расширение. + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR Параметры создания HDR: нужно или загрузить существующий HDR-файл (с помощью опции -l), или указать INPUTFILES для создания нового HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + weight = triangular|gaussian|plateau|flat (По умолчанию triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + response curve = from_file|linear|gamma|log|srgb (По умолчанию linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + model: robertson|robertsonauto|debevec (По умолчанию debevec) - + curve filename = your_file_here.m имя файла кривой = ваш_файл.m - + LDR output parameters Параметры вывола LDR - + VALUE Quality of the saved tone mapped file (1-100). VALUE Качество сохранённого тонально отображённого файла (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) Формат tiff. Допустимые значения [8b|16b|32b|logluv] (по умолчанию: 8b) - + Tiff deflate compression. true|false (Default is true) Сжатие deflate для tiff. true|false (по умолчанию: true) - + HTML output parameters Параметры вывода HTML - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) Имя файла веб-страницы, которая будет сгенерирована. Если <page_name> отсутствует, будет использовано имя файла первого изображения с расширением .html. (по умолчанию: имя первого изображения) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Укажите, где хранить выходные файлы изображений. Ссылки на изображения в HTML будут обновлены соответствующим образом. Это должен быть относительный путь, и каталог должен существовать. Полезно, чтобы избежать захламления текущего каталога. (По умолчанию — текущий рабочий каталог) - + Tone mapping parameters - no tonemapping is performed unless -o is specified Параметры отображения тонов - отображение тонов не производится, если не указана -o - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) - + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) + Оператор проекции тонов. Корректные значения: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (По умолчанию используется mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + Ferwerda + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + KimKautz + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago Drago - + bias FLOAT - + Reinhard 02 Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik Pattanaik - + multiplier FLOAT - + Local tone mapping true|false Локальное отображение тонов true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + VanHateren + + + + pupil_area FLOAT + + + + + Lischinski + Lischinski + + + Luminance HDR version Версия Luminance HDR - + With LibRaw version С версией LibRaw - + models listed - + + + Error: Unsupported LDR file type. + Ошибка: Не поддерживаемый тип файла LDR. + + + + + Error: Unsupported HDR file type. + Ошибка: Не поддерживаемый тип файла HDR. + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Ошибка: не опознан движок выравнивания. - + Error: Unknown weight function specified. Ошибка: указана неизвестная функция взвешивания. - + Error: Unknown response curve specified. Ошибка: указана неизвестная кривая отклика. - + Error: Unknown HDR creation model specified. Ошибка: указана неизвестная модель создания HDR-снимка. - + Error: Unknown tone mapping operator specified. Ошибка: указан неизвестный оператор отображения тонов. - - + + Error: The specified file with TMO settings could not be parsed! Ошибка: Не удалось разобрать указанный файл с настройками операторов отображения тонов! - + Error: The specified file with TMO settings could not be parsed!: %1 Ошибка: Не удалось разобрать указанный файл с настройками операторов отображения тонов!: %1 - + Error: Quality must be in the range [1..100]. - + Ошибка: Качество должно быть в диапазоне [0..100]. - + Error: Unknown tiff format. Ошибка: Неизвестный формат tiff. - + Error: Threshold must be in the range [0..1]. - + Ошибка: Порог должен быть в диапазоне [0..1]. - + Error: The number of EV values specified is different from the number of input files. Ошибка: количество указанных значений EV отличается от количества входящих файлов. - + Load file %1 failed Загрузка файла %1 не удалась - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. Ошибка: в снимках нет данных Exif, и значения EV не указаны в командной строке. Работа программы прекращена. - + EV values have been assigned. Значения EV установлены. - - + + Starting aligning... Начинаем выравнивание… - + Failed executing align_image_stack Не удалось выполнить align_image_stack - + Failed aligning images. Не удалось выровнять изображения. - + Creating (in memory) the HDR. Создаётся HDR (в памяти). - + Saving to file %1. Сохранение в файл %1. - + Image %1 saved successfully Изображение %1 успешно сохранено - + Could not save %1 Не удалось сохранить %1 - + NOT Saving HDR image to file. %1 HDR-снимок НЕ сохраняется в файл. %1 - + Exporting to HTML Экспортирование в HTML - + ERROR: directory %1 must exist ОШИБКА: каталог %1 должен существовать - + Tonemapping requested, saving to file %1. Запрошено отображение тонов, сохраняется в файл %1. - + Resizing to width %1. Масштабирование до ширины %1. - + Applying gamma %1. Применение гаммы %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved Изображение %1 успешно сохранено - + ERROR: Cannot save to file: %1 ОШИБКА: Невозможно сохранить в файл: %1 - + Tonemapping NOT requested. Отображение тонов НЕ запрошено. - - Failed loading images - Не удалось загрузить изображения + + Failed loading images: %1 + Не удалось загрузить изображения: %1 @@ -1330,68 +1662,68 @@ <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> is open-source software and its development required hundreds of hours of work.</p><p>If you like it, you are using it in your HDR workflow and you would like to see it gradually improved, please support its authors by making a donation.</p><p>Would you like to make a donation for Luminance HDR now?</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Luminance HDR</span> — программное обеспечение с открытым исходным кодом, и его разработка потребовала сотен часов работы.</p><p>Если он вам нравится, вы используете его в своём рабочем процессе и хотели бы видеть его постоянно улучшающимся, пожалуйста, поддержите его авторов, сделав пожертвование.</p><p>Хотите сделать пожертвование для Luminance HDR?</p></body></html> Yes, I'd love to! - Да, хочу! + Да, с радостью! Ask me again later - Спросите меня попозже + Напомните об этом в другой раз No, Stop bothering me! - Нет, хватить доставать меня! + Нет, отстаньте от меня! EditingTools - + Maskable - + Good image Хороший снимок - + Add good image Добавить хороший снимок - + Remove good image Удалить хороший снимок - + Ed&itable &Двигаемые - + R&eference Опор&ные - + Select the previous image in both lists Выбрать предыдущий снимок в обоих списках - + Select the next image in both lists Выбрать следующий снимок в обоих списках - + Choose a directory and a prefix Выберите каталог и префикс @@ -1427,9 +1759,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Активный снимок из списка может быть смещен вверх, вниз, влево и вправо при помощи этих кнопок. -Гистограмма активного снимка отображается вверху слева. +This image's histogram is displayed in the widget above. + @@ -1585,7 +1916,7 @@ Anti Ghosting - + Удаление призраков @@ -1665,7 +1996,7 @@ R&emove - + У&далить @@ -1694,7 +2025,7 @@ S&trength: - + &Сила: @@ -1786,7 +2117,7 @@ Vertica&l: - + По &вертикали: @@ -1851,7 +2182,7 @@ &Next > - &Вперед > + &Вперёд > @@ -1922,18 +2253,18 @@ Экспорт - + Choose a directory Выберите каталог - - + + Error: Ошибка: - + must be a directory. должен быть каталогом. @@ -2093,28 +2424,28 @@ Красный - + Load one FITS image... Загрузить одно изображение FITS... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size Изображения FITS разного размера - + align_image_stack exited with exit code %1 align_image_stack завершился с кодом выхода %1 - + align_image_stack failed with error align_image_stack завершился с ошибкой @@ -2122,7 +2453,7 @@ GenericViewer - + Pan the image to a region Перемещение по изображению @@ -2135,45 +2466,58 @@ HdrCreationManager::loadFilesDone(): Ошибка загрузки файла. - + HdrCreationManager::loadFilesDone(): The images have different size. HdrCreationManager::loadFilesDone(): Изображения разного размера. + HdrPreview + + + HDR Preview + Предпросмотр HDR + + + + Close + Закрыть + + + HdrViewer - + &Mapping: &Соответствие: - + Histogram: Гистограмма: - + Linear Линейное - + Gamma 1.4 Гамма 1.4 - + Gamma 1.8 Гамма 1.8 - + Gamma 2.2 Гамма 2.2 - + Gamma 2.6 Гамма 2.6 @@ -2197,8 +2541,8 @@ - &Currently Loaded Files - + Currently &Loaded Files + Загру&женные файлы @@ -2237,8 +2581,8 @@ - &MTB - &MTB + M&TB + @@ -2247,8 +2591,8 @@ - Hugin's align_&image_stack - align_&image_stack из Hugin + Hu&gin's align_image_stack + align_image_stack &из Hugin @@ -2314,12 +2658,12 @@ [2/2] Выберите параметры создаваемого HDR-снимка - + Profile Профиль - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2332,47 +2676,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Первый из них как правило дает наилучшие результаты. Не используйте его только в тех случаях, когда получаемый HDR-снимок недостаточно хорош.</span></p></body></html> - - Profile 1 - Профиль 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Профиль 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Профиль 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Профиль 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Профиль 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Профиль 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Использовать только если готовые профили не дают достаточно высокого качества - + Use Custom Configuration Использовать пользовательскую конфигурацию - + HDR Creation Model Модель создания HDR @@ -2422,238 +2766,267 @@ Характеристическая кривая - + Linear Линейная - + Gamma Гамма - + Log Логарифмическая - + sRGB sRGB - - Custom - Вручную + + Custom (From File) + - + Response Curve Input File Входной файл характеристической кривой - + + Load Response + Загрузить файл отклика + + + Response Curve Output File Выходной файл характеристической кривой - + Save As... Сохранить как... - + Save Settings Сохранить настройки - + + Show HDR + Показать HDR + + + + Show HDR Preview + Показать предпросмотр HDR + + + + + Show Log + Показать журнал + + + &Next > &Вперед > - + &Cancel О&тменить - + Image Filename Имя файла снимка - + Exposure Экспозиция - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Все форматы (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; Файлы JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; Файлы TIFF (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw RAW-изображения (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Выберите исходные снимки - + Unknown Неизвестно - + Loading... Загрузка... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> <font color="#FF0000"><h3><b>Внимание:</b></h3></font> Luminance HDR не удалось найти теги <b>EXIF</b> для следующих изображений:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - </ul><hr>Несмотря на это, можно продолжить создание HDR. Для этого придётся <b>вручную</b> ввести значения ступеней экспозиции.<hr>Чтобы Luminance HDR мог сделать это <b>автоматически</b>, нужно загрузить снимки, в которых имеюся хотя бы следующие данные EXIF: <ul><li>Exposure Bias</li></ul><hr><b>Совет:</b>Потеря данных EXIF обычно происходит из-за предварительной обработки снимков.<br>Можно выполнить <b>взаимно-однозначное копирование данных EXIF</b> между двумя выборками снимков с помощью раздела меню <b>Инструменты->Копировать данные EXIF...</b>. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again + Больше не показывать это сообщение - + EXIF data not found Данные Exif не найдены - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Снимки загружены.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Для продолжения необходимо вручную указать экспозицию каждого исходного снимка.<br>Не указано значений: <font color="#FF0000">%1</font>.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + <center><font color="#ffaa00"><h3><b>Проверьте, что все значения экспозиции корректны, прежде чем продолжить.</h3></font></center> - + Loading Error: Ошибка загрузки: - + Start loading a set of images with different exposure Запустить загрузку набора изображений разной степени экспонированности - - - + + + Error... Ошибка... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Не удалось запустить внешнее приложение «<em>align_image_stack</em>».<br/>За подробностями обратитесь к разделу «Справка→Содержание…→Setting up→External Tools». - + The external application "<em>align_image_stack</em>" crashed... Внешняя программа "<em>align_image_stack</em>" аварийно завершила свою работу... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... При выполнении внешней программы "<em>align_image_stack</em>" произошла неизвестная ошибка... - + Now click on next button - + + Compute + Вычислить + + + + Finish + Завершить + + + Aligning... Выполняется выравнивание... - - - &Finish - &Завершить + + &Compute + &Рассчитать - + Load camera response curve file Загрузить файл характеристической кривой - + Camera response curve (*.m);;All Files (*) Характеристическая кривая камеры (*.m);;Все файлы (*) - + Invalid Response Curve File Некорректный файл характеристической кривой - + Invalid Response Curve File: please try a different file Некорректный файл характеристической кривой: попробуйте другой файл - + Save a camera response curve file Сохранить файл характеристической кривой камеры - + Camera response curve (*.m) Характеристическая кривая камеры (*.m) - - Weights: - Функция взвешивания: - - - - - Response curve: - - Кривая отклика: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Все значения EV указаны.<br>Теперь щёлкните кнопку «Дальше».</b></h3></font></center> - - - Model: - - Модель: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Для продолжения необходимо вручную указать экспозицию каждого исходного снимка.<br>Не указано значений: <font color="#FF0000">%1</font>.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Все значения EV указаны.<br>Теперь щёлкните кнопку «Дальше».</b></h3></font></center> + + Hide Log + Скрыть журнал @@ -2665,24 +3038,24 @@ - + &File &Файл E&dit - + &Правка V&iew - + &Вид Boo&kmarks - + &Закладки @@ -2691,7 +3064,7 @@ - + &Print... &Печать... @@ -2707,7 +3080,7 @@ - + &Find... &Найти... @@ -2738,7 +3111,7 @@ - + &Add Bookmark &Добавить закладку @@ -2750,11 +3123,11 @@ &Delete Bookmark - + &Удалить закладку - + D&elete All Удалить &все @@ -2824,100 +3197,99 @@ - + Help SideBar Боковая панель справки - + LuminanceHDR Online Help Онлайн-справка по Luminance HDR - + &Edit &Правка - + &View &Вид - - + + &Bookmarks &Закладки - + &Quit В&ыход - + Find &Next Найти &следующее совпадение - + Find &Previous Найти &предыдущее совпадение - + &Contents &Содержание - + &Search &Искать - + &Delete &Удалить - + Find Искать - + Search Term: Искомый термин: - + New Bookmark Новая закладка - + New Bookmark's Title: Название новой закладки: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Извините, но руководство не установлено!</p><p>Сообщите об этом автору установочного пакета или команде разработчиков Luminance HDR, если собрали программу самостоятельно.</p></h2> - + LuminanceHDR - Help Browser Справка по Luminance HDR - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Этот протокол не поддерживается просмотрщиком справки. -Вы хотите открыть эту ссылку приложением, ассоциированным -с этим протоколом? + Этот протокол не поддерживается программой просмотра справки. +Хотите открыть ссылку в приложении, ассоциированном с этим протоколом по умолчанию? @@ -2973,22 +3345,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 IOWorker: Этот файл недоступен для чтения: %1 - + IOWorker: file %1 has unsupported extension: %2 IOWorker: у файла %1 не поддерживаемое расширение: %2 - + IOWorker: caught exception reading %1: %2 IOWorker: исключительная ситуация при чтении %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 IOWorker: не удалось прочитать файл: %1 @@ -2996,7 +3373,7 @@ ImageQualityDialog - + Unknown Неизвестно @@ -3047,11 +3424,11 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 - + Изображение LDR [%1 × %2]: %3 @@ -3129,7 +3506,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3146,7 +3523,7 @@ Luminance &HDR Online - + Luminance &HDR в Сети @@ -3171,7 +3548,7 @@ &Preview Panel - + &Панель предпросмотра @@ -3304,7 +3681,7 @@ Rotat&e clockwise - + Повернуть по &часовой стрелке @@ -3326,7 +3703,7 @@ &Low Dynamic Range - + &Узкий динамический диапазон @@ -3336,7 +3713,7 @@ &Fit to Dynamic Range - + &Уместить в динамическом диапазоне @@ -3351,7 +3728,7 @@ &Shrink Dynamic Range - + &Сузить динамический диапазон @@ -3361,7 +3738,7 @@ &Extend Dynamic Range - + &Расширить динамический диапазон @@ -3757,12 +4134,12 @@ &Minimize - + С&вернуть Ma&ximize - + Р&азвернуть @@ -3772,7 +4149,7 @@ &Show Preview Panel - + &Показывать панель предпросмотра @@ -3821,7 +4198,7 @@ &Remove Tab - + &Удалить вкладку @@ -3831,7 +4208,7 @@ Fill &Window - + Заполнить &окно @@ -3846,7 +4223,7 @@ Batch &HDR... - + Пакетный &HDR… @@ -3856,7 +4233,7 @@ Soft Proofing - + Цветопроба @@ -3866,27 +4243,27 @@ &Show on the right - + Показывать с&права Show &on the bottom - + Показывать в&низу &Realtime Previews - + Предпросмотр в &реальном времени &Update - + О&бновить &FITS Importer... - + Импорт &FITS... @@ -3911,17 +4288,17 @@ E&xport to HTML - + Э&кспортировать в HTML Export to web page with embedded HDR viewer - + Экспортировать в виде веб-страницы со встроенным просмотром HDR &Show Full Screen - + Во весь &экран @@ -3931,7 +4308,7 @@ Show &Image Full Screen - + Показать изображение во весь &экран @@ -3941,12 +4318,12 @@ &Supported RAW Cameras - + По&ддерживаемые файлы raw Lists all cameras supported by the program - + Показывает список всех камер, поддерживаемых программой @@ -3956,12 +4333,12 @@ &Lanczos/Bilinear interpolation - + &Интерполяция: билинейная или Ланцоша <html><head/><body><p>Switch between Lanczos and Bilinear interpolation</p></body></html> - + <html><body><p>Переключение между билинейной интерполяцией и фильтром Ланцоша</p></body></html> @@ -3971,42 +4348,42 @@ &Online Documentation - - - - - &Developers Web Site - - - - - &Luminance HDR Web Site - + &Онлайн-документация Open Online Documentation Web Site with the System Browser - + Открыть веб-сайт онлайн документации в системном браузере + + + + &Developers Web Site + Сайт &разработчиков Developers Web Site - + Сайт разработчиков Open Developers Web Site with the System Browser - + Открыть веб-сайт разработчиков в системном браузере + + + + &Luminance HDR Web Site + Сайт &Luminance HDR Luminance HDR Web Site - + Сайт Luminance HDR Open Main Web Site with the System Browser - + Открыть главный веб-сайт в системном браузере @@ -4014,93 +4391,92 @@ Готово... Теперь откройте готовый HDR-снимок или создайте новый! - + All HDR formats Все форматы HDR - + Load one or more HDR images... Загрузить один и более снимков HDR... - + Save files in Сохранить файлы в - - + + Failed to save %1 Не удалось сохранить %1 - + Done! Готово! - + Aborting... Прерывание... - - - Untitled - Без имени - - - + Cropped Image Откадрированный снимок - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! Похоже, вы запускаете 32-битную версию <strong>Luminance HDR</strong> на 64-битной системе. <br>Загрузите <strong>64-битную</strong> версию с <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a>, чтобы выжать максимум из Luminance HDR! - + Unsaved changes... Изменения не сохранены - + This HDR image has unsaved changes.<br>Do you want to save it? В HDR-снимке есть несохранённые изменения.<br>Сохранить их? - + Fattal Warning Предупреждение Fattal - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - Этот оператор отображения тонов зависит от размера входного изображения. Применение этого оператора к полноразмерному изображению скорее всего приведёт к другому результату. + Этот оператор отображения тонов зависит от размера входного изображения. Применение этого оператора к полноразмерному изображению, скорее всего, приведёт к получению отличающегося изображения. Хотите продолжить? - + + Untitled + Без имени + + + Untitled %1 Безымянный %1 - + Error: %1 Ошибка: %1 - + Untitled HDR Безымянный HDR - + FITS Image Изображение FITS @@ -4120,7 +4496,7 @@ RAW Conversion - Преобразование RAW + Преобразование raw @@ -4426,13 +4802,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> @@ -4468,7 +4844,12 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Level</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specify the reconstruct highlight level. Low values favor whites and high values favor colors.</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Level</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Укажите уровень восстановления пересветов. Низкие значения отдают предпочтение белому, высокие — цветам.</p></body></html> @@ -4706,28 +5087,28 @@ &ОК - + Restart Перезапуск - + For the settings to take effect, please restart the application! Перезапустите приложение, чтобы настройки вступили в силу! - - + + Choose a directory Выберите каталог - + Open ICC Profile Открыть профиль ICC - + Color profile (*.icc *.ICC *.icm *.ICM) Цветовой профиль (*.icc *.ICC *.icm *.ICM) @@ -4843,17 +5224,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: ОШИБКА: не удается загрузить файл с параметрами отображения тонов: - + ERROR: File too old, cannot parse Tone Mapping Setting file: ОШИБКА: попытка использовать файл с параметрами отображения тонов в старом формате: - + ERROR: cannot parse Tone Mapping Setting file: ОШИБКА: не удается произвести разбор файла с параметрами отображения тонов: @@ -4861,370 +5242,454 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + Качество должно быть между 1 (худшее) и 5 (лучшее). - + NULL frame passed. - + Adding image Добавление снимка - + to the web page на веб-страницу - - - + + + Writing: Запись: - - - - + + + + Warning Внимание - + I cannot open monitor profile. Please select a different one. Не могу открыть профиль монитора. Пожалуйста, выберите другой. - + I cannot open printer profile. Please select a different one. Не могу открыть профиль принтера. Пожалуйста, выберите другой. - + Please select a printer profile . Пожалуйста, выберите профиль принтера. - + I cannot perform the color transform. Please select a different monitor profile. Не могу выполнить преобразование цвета. Пожалуйста, выберите другой профиль монитора. - - Triangular - Треугольная - - - - Plateau - Плато - - - - Gaussian - Гауссова - - - - Flat - - - - - Linear - Линейная - - - - Gamma - Гамма - - - - Logarithmic - Логарифмическая - - - - sRGB - sRGB - - - - From Calibration/Input File - Из результата калибровки/входного файла + + + + Weights= + Веса= - - Debevec - Дебевек - - - - Robertson - Робертсон + + + + - Response curve= + - Кривая отклика= - - Robertson Response Calculation - + + + + - Model= + - Модель= - + PreGamma=%1 - + Contrast Equalization Выравнивание контрастности - + Contrast Контрастность - - + + Saturation Насыщенность - + Detail Детализация - + Luminance Level Уровень светимости - + Luminance Level=Auto - + Color Saturation Насыщенность - + Contrast Enhancement Контраст - + + Alpha Альфа - + Beta Бета - + NoiseRedux - + FFTSolver - + Rho - + Ро - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + C1 + + + + C2 + C2 + + + simple - + Equation 2 Уравнение 2 - + Equation 4 Уравнение 4 - - + + Local - + Bias Смещение - + Spatial - - + + Range Диапазон - + Base - + Multiplier Множитель - + AutoLuminance - + Cone Колбочки - + Rod Палочки - + Key - + Phi δ (фи) - + Scales: - + Lower - + Upper - + Brightness Яркость - + Chromatic Adaptation Хроматическая адаптация - + Light Adaptation Адаптация к свету - - Option -v -a... - Опции -v -a... + + Pupil Area + Область зрачка - - LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - Для LuminanceHDR необходимо, чтобы align_image_stack вызывался с опцией «-v» и без опции «-a». Опции командной строки были исправлены. + + PostSaturation=%1 + - - Cannot convert %1 to a float - Невозможно преобразовать %1 в формат с плавающей точкой + + PostGamma=%1 + - - Loading TMO settings from file: %1 - Загрузка настроек операторов отображения тонов из файла %1 + + + HDR Preview + Предпросмотр HDR - - Input file %1 - Входной файл %1 + + Debevec + Дебевек - - Running in HDR-creation mode. - Запуск в режиме создания HDR. + + Robertson + Робертсон - - Running in Load-HDR mode. - Запуск в режиме загрузки HDR. + + Robertson Response Calculation + - - Temporary directory: %1 - Временный каталог: %1 + + Triangular + Треугольная - - - Using %n threads. - + + + Plateau + Плато - - Loading file %1 + + Gaussian + Гауссова + + + + Flat + + + + + Linear + Линейная + + + + Gamma + Гамма + + + + Logarithmic + Логарифмическая + + + + sRGB + sRGB + + + + From Calibration or Input File + + + + + Option -v -a... + Опции -v -a... + + + + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. + Для LuminanceHDR необходимо, чтобы align_image_stack вызывался с опцией «-v» и без опции «-a». Опции командной строки были исправлены. + + + + Cannot convert %1 to a float + Невозможно преобразовать %1 в формат с плавающей точкой + + + + Loading TMO settings from file: %1 + Загрузка настроек операторов отображения тонов из файла %1 + + + + Input file %1 + Входной файл %1 + + + + Running in HDR-creation mode. + Запуск в режиме создания HDR. + + + + Running in Load-HDR mode. + Запуск в режиме загрузки HDR. + + + + Temporary directory: %1 + Временный каталог: %1 + + + + Using %n thread(s). + Используется %n поток.Используется %n потока.Используется %n потоков.Используется %n поток(ов). + + + + Loading file %1 Загружается файл %1 - + Successfully loaded file %1. Успешно загружен файл %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + Не удалось открыть базу данных для сохранения параметров отображения тонов. +Ошибка: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + Эта версия Luminance HDR скомпилирована без поддержки дополнительных алгоритмов демозаики. +Ваши предпочтения были установлены на использование одного из отсутствующих алгоритмов и теперь изменены на использование поддерживаемого метода AHD. +Чтобы изменить это, откройте Сервис->Параметры->Преобразование raw->Качество + + All LDR formats Файлы всех LDR-форматов - + Save the LDR image as... Сохранить LDR-снимок как... + All HDR formats + Все форматы HDR + + + Save the HDR image as... Сохранить HDR-снимок как... - + Save as... Сохранить как... @@ -5295,203 +5760,20 @@ SavedParametersDialog - + Saved Parameters Сохранённые настройки - - + Comment Комментарий - + TM Operator Оператор отображения тонов - - - Simple - Простой вариант - - - - Equation 2 - Уравнение 2 - - - - Local Contrast Threshold - Порог локального контраста - - - - Bias - Смещение - - - - Spatial Kernel Sigma - Сигма пространственного ядра - - - - Range Kernel Sigma - Сигма диапазонного ядра - - - - Base Contrast - Контраст основного слоя - - - - Alpha - Альфа - - - - Beta - Бета - - - - - Color Saturation - Насыщенность - - - - Noise Reduction - Подавление шума - - - - Old Fattal - Старый Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Выравнивание контрастности - - - - Contrast Factor - Коэффициент контраста - - - - Saturation Factor - Коэффициент насыщенности - - - - Detail Factor - Коэффициент детализации - - - - Contrast Enhancement - Контраст - - - - Luminance Level - Уровень светимости - - - - Manual Luminance Level - Ручной уровень светимости - - - - Cone and Rod based on Luminance - Уровень чувствительности колбочек и -палочек на основе освещенности - - - - Local Tonemapping - Локальное отображение тонов - - - - Cone Level - Уровень чувствительности колбочек - - - - Rod Level - Уровень чувствительности палочек - - - - Multiplier - Множитель - - - - Use Scales - Использовать шкалы - - - - Key Value - Значение ключа - - - - Phi Value - Значение φ - - - - Range - Диапазон - - - - Lower Scale - Нижняя шкала - - - - Upper Scale - Верхняя шкала - - - - Brightness - Яркость - - - - Chromatic Adaptation - Хроматическая адаптация - - - - Light Adaptation - Адаптация к свету - - - - Pre-gamma - Гамма-коррекция - SavingParameters @@ -5511,7 +5793,7 @@ List of supported cameras - + Список поддерживаемых форматов @@ -5526,7 +5808,7 @@ With LibRaw version - + С версией LibRaw @@ -5547,7 +5829,7 @@ TMOProgressIndicator - + Abort computation Прервать вычисления @@ -5557,7 +5839,7 @@ Frame - + Кадр @@ -5576,532 +5858,606 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - Здесь можно загрузить или сохранить файл с параметрами отображения тонов.<br>Здесь же можно применить выбранный файл с параметрами к открытому HDR-снимку. + + Tonemap + Отображение тонов - - Tone Mapping Settings - Параметры отображения тонов + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - Сохранить параметры отображения тонов в текстовый файл + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - Сохранить текущие параметры (предварительной коррекции гаммы и операторов отображения тонов) в текстовый файл. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - Загрузить файл с параметрами гамма-коррекции и оператора отображения тонов + + Ferradans + Ferradans - - Load an existing text file containing pregamma and TMO settings. - Загрузить файл с параметрами гамма-коррекции и оператора отображения тонов. + + Drago + Drago - - Save current parameters - Сохранить текущие настройки + + Durand + Durand - - Load saved parameters - Загрузить сохранённые настройки + + Reinhard '02 + Reinhard '02 - - Export - Экспорт + + Reinhard '05 + Reinhard '05 - - Fast export - Быстрый экспорт + + Ashikhmin + Ashikhmin - - Opens the current export direcotory. This can be changed in the preferences! - Открывает текущий каталог для экспорта. Его можно изменить в настройках. + + Pattanaik + Pattanaik - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Открыть</span></a></p></body></html> + + Mai + - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - Здесь можно применить гамма-коррекцию к HDR-снимку.<br>Она будет применена перед отображением тонов. + + Ferwerda + Ferwerda - - Process - Процесс + + KimKautz + KimKautz - - Result Si&ze - Итоговый &размер + + VanHateren + VanHateren - - - Gamma applied before tonemapping - Гамма-коррекция, применяемая перед отображением тонов + + Lischinski + Lischinski - - Pre-&gamma - &Гамма-коррекция + + Operator + Оператор - - Restore pregamma's default value (1) - Восстановить исходное значение гаммы (1,00) + + &Contrast Factor + &Коэффициент контраста - - Size of the resulting LDR image - Размер конечного LDR-снимка + + Contrast Equalization + Выравнивание контрастности - - Here you can choose the size of the resulting LDR image. - Здесь вы можете выбрать размер конечного LDR-снимка. + + &Detail Factor + Коэффициент &детализации - - Set Custom Output Size - Задать итоговый размер + + Saturat&ion Factor + Коэффициент &насыщенности - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Щелкните эту кнопку для вставки значения <i>ширины</i> конечного LDR-снимка.<br>По нажатию ввода автоматически будет вычислено и подставлено значение высоты. + + Lcd Office + Офисный ЖК-монитор - - Start tonemapping (CTRL+T) - Запустить отображение тонов (Ctrl+T) + + Lcd + ЖК-монитор - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - Использовать текущие параметры (гамма-коррекция и оператор отображения тонов) для создания LDR-снимка + + Lcd Bright + Яркий ЖК-монитор - - &Update preview - &Обновить эскиз + + CRT + ЭЛТ-монитор - - Ctrl+T - Ctrl+T + + Co&lor Saturation + - - Update current LDR - Обновить текущий LDR + + Co&ntrast Enhancement + &Усиление контрастности - - Auto Levels + + Enable +Luminace Level + Включить +Уровень светимости + + + + Lum&inance Level + Уро&вень освещенности + + + + Predefined &Display - - <html><head/><body><p>set auto levels threshold</p></body></html> + + A&lpha + &Альфа + + + + Bet&a + &Бета + + + + Color Saturat&ion - - Tonemap - Отображение тонов + + &Noise Reduction + Подавление &шума - - Mantiuk '06 - Mantiuk '06 + + Version 2.3.0 + Версия 2.3.0 - - Mantiuk '08 - Mantiuk '08 + + &Inverse Alpha + &Инвертировать альфу - - Fattal - Fattal + + Rho + Ро - - Ferradans + + B&ias - - Drago - Drago + + Spatial &Kernel Sigma + - - Durand - Durand + + Base Co&ntrast + - - Reinhard '02 - Reinhard '02 + + Range Kerne&l Sigma + - - Reinhard '05 - Reinhard '05 + + Ph&i + &Фи - - Ashikhmin - Ashikhmin + + &Key Value + - - Pattanaik - Pattanaik + + &Lower Scale + - - Mai + + Upper S&cale - - Operator - Оператор + + Use Scales + Использовать шкалы - - Contrast Factor - Коэффициент контраста + + Ra&nge + &Диапазон - - Saturation Factor - Коэффициент насыщенности + + &Light Adaptation + - - Detail Factor - Коэффициент детализации + + Chromatic A&daptation + &Хроматическая адаптация - - Contrast Equalization - Выравнивание контрастности + + Br&ightness + &Яркость - - Predefined Display - Профиль монитора + + Local Contrast Threshol&d + Порог &локального контраста - - Lcd Office - Офисный ЖК-монитор + + Simple + Простой вариант - - Lcd - ЖК-монитор + + Equation &Number + &Номер уравнения - - Lcd Bright - Яркий ЖК-монитор + + Eqn &2 + Уравнение &2 - - CRT - ЭЛТ-монитор + + Eqn &4 + Уравнение &4 - - - Color Saturation - Насыщенность + + Local Tone Mapping + Локальное отображение тонов - - Contrast Enhancement - Контраст + + Mu&ltiplier + &Множитель - - Enable -Luminace Level - Включить -Уровень светимости + + Auto Cone/Rod + Авто колбочки/палочки - - Luminance Level - Уровень светимости + + Co&ne Level + Уровень &колбочек - - Alpha - Альфа + + Ro&d Level + Уровень &палочек - - Beta - Бета + + This operator has no options + У этого оператора нет параметров - - Noise Reduction - Подавление шума + + &Multiplier + &Множитель - - Version 2.3.0 - Версия 2.3.0 + + A&daptation Luminance + - - Inverse Alpha + + &C1 + &C1 + + + + C&2 + C&2 + + + + Pup&il Area - - Rho + + a&lpha mul - - Bias - Смещение + + Restore operator's default values + Восстановить исходные параметры оператора - - Spatial Kernel Sigma - Сигма пространственного ядра + + Restore + Восстановить - - Range Kernel Sigma - Сигма диапазонного ядра + + Previous applied settings + Предыдущие использованные параметры - - Base Contrast - Контраст основного слоя + + Previous + Предыдущий - - Key Value - Значение ключа + + Next applied settings + Следующие использованные параметры - - Phi - δ (фи) + + Next + Следующий - - Use Scales - Использовать шкалы + + Start tonemapping (CTRL+T) + Запустить отображение тонов (Ctrl+T) - - Range - Диапазон + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + Использовать текущие параметры (гамма-коррекция и оператор отображения тонов) для создания LDR-снимка - - Lower Scale - Нижняя шкала + + &Update preview + &Обновить эскиз - - Upper Scale - Верхняя шкала + + Ctrl+T + Ctrl+T - - Brightness - Яркость + + Update current LDR + Обновить текущий LDR - - Chromatic Adaptation - Хроматическая адаптация + + Auto Levels + Автоуровни - - Light Adaptation - Адаптация к свету + + <html><head/><body><p>set auto levels threshold</p></body></html> + <html><head/><body><p>установить порог автоуровней</p></body></html> - - Local Contrast Threshold - Порог локального контраста + + Processing + Обработка - - Simple - Простой вариант + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + Здесь можно применить гамма-коррекцию к HDR-снимку.<br>Она будет применена перед отображением тонов. - - Equation Number - Номер уравнения + + Res&ult Size + &Конечный размер - - Eqn &2 + + Set Custom Output Size + Задать итоговый размер + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Щелкните эту кнопку для вставки значения <i>ширины</i> конечного LDR-снимка.<br>По нажатию ввода автоматически будет вычислено и подставлено значение высоты. + + + + + Gamma applied before tonemapping + Гамма-коррекция, применяемая перед отображением тонов + + + + Pre-&gamma + &Гамма-коррекция + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> - - Eqn &4 + + Pos&t-saturation - - Multiplier - Множитель + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Local Tone Mapping - Локальное отображение тонов + + Post-gamma + - - Auto Cone/Rod - Авто колбочки/палочки + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - Cone Level - Уровень чувствительности колбочек + + ... + ... - - Rod Level - Уровень чувствительности палочек + + Settings + Настройки - - This operator has no options - + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + Здесь можно загрузить или сохранить файл с параметрами отображения тонов.<br>Здесь же можно применить выбранный файл с параметрами к открытому HDR-снимку. - - Restore operator's default values - Восстановить исходные параметры оператора + + Tone Mapping Settings + Параметры отображения тонов - - Restore - Восстановить + + Save current parameters to a text file + Сохранить параметры отображения тонов в текстовый файл - - Previous applied settings - Предыдущие использованные параметры + + Save current parameters (pregamma and TMO) to a text file. + Сохранить текущие параметры (предварительной коррекции гаммы и операторов отображения тонов) в текстовый файл. - - Previous - Предыдущий + + Load an existing text file containing pregamma and TMO settings + Загрузить файл с параметрами гамма-коррекции и оператора отображения тонов - - Next applied settings - Следующие использованные параметры + + Load an existing text file containing pregamma and TMO settings. + Загрузить файл с параметрами гамма-коррекции и оператора отображения тонов. - - Next - Следующий + + Load saved parameters + Загрузить сохранённые настройки + + + + Save current parameters + Сохранить текущие настройки + + + + Export + Экспорт - + + Fast export + Быстрый экспорт + + + + Opens the current export directory. This can be changed in the preferences! + Открывает текущий каталог экспорта. Это может быть изменено в настройках! + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Открыть</span></a></p></body></html> + + + Queue size: %1 Размер очереди: %1 - + TM Database Problem Проблема с базой данных отображения тонов - + The database used for saving TM parameters cannot be opened. Error: %1 Не удалось открыть базу данных для сохранения параметров отображения тонов. Ошибка: %1 - + Load a tonemapping settings text file... Загрузить текстовый файл с параметрами отображения тонов... - - + + LuminanceHDR tonemapping settings text file (*.txt) Текстовый файл с параметрами отображения тонов (*.txt) - - - - + + + + Aborting... Прерывание... - + File is not readable (check existence, permissions,...) Файл нечитаем (проверьте, существует ли он, каковы права доступа...) - + Save tonemapping settings text file to... Сохранить параметры отображения тонов... - + File is not writable (check permissions, path...) Файл незаписываем (проверьте права доступа, путь...) - + File is not readable (check permissions, path...) Файл нечитаем (проверьте права доступа, путь...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. Ошибка: формат файла параметров отображения тонов. Старый формат файлов в этой версии Luminance HDR не поддерживается. Создайте новый файл с параметрами. - + Custom LDR size Добавить свой размер LDR-снимка - + Enter the width of the new size: Укажите новую ширину: @@ -6251,19 +6607,19 @@ На&чать - - + + All Supported formats Все поддерживаемые форматы - - + + Select the input images Выберите исходные снимки - + &Done &Готово @@ -6271,39 +6627,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags Документ с лицензией на %1 не найден, вы можете прочитать его %2здесь%3. - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + %1 Журнал изменений не найден, можете посмотреть его онлайн %2здесь%3 - + Donation Пожертвование - + Would you like to donate? Желаете сделать пожертвование? - + Yes, I'd love to! Да, хочу! - + Stop Bothering Me Оставьте меня в покое - + Remind me later Напомните в другой раз @@ -6311,18 +6667,18 @@ UpdateChecker - + A new release is ready for download! Новый выпуск готов к загрузке! - - + + Do you want to open the webpage for download now? Хотите открыть страницу загрузки? - + Click to download, or select Help->Update! Нажмите чтобы загрузить, или выберите Справка->Обновить! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_tr.ts luminance-hdr-2.6.0/i18n/lang_tr.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_tr.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_tr.ts 2019-06-09 19:18:38.000000000 +0000 @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors Yaz&arlar - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To Teşekür ettiklerimiz - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement Lisans Antlaşması - + &OK &TAMAM @@ -123,270 +174,320 @@ Çıktı - + Choose an HDR output file format HDR çıktı dosyası biçiminiı seçin - - Predefined profile: - Öntanımlı profil: - - - - Output format: - Çıktı Biçimi: + + Filename prefix: + - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 Profil 1 - + Profile 2 Profil 2 - + Profile 3 Profil 3 - + Profile 4 Profil 4 - + Profile 5 Profil 5 - + Profile 6 Profil 6 - + + Output format: + Çıktı Biçimi: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + Ağırlıklar: + + + + Predefined profile: + Öntanımlı profil: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + Üçgensel + + + + Linear + Doğrusal + + + Alignment Hizalama - - Auto align the bracketed pictures - İşaretli resimleri otomatikman hizala + + Use Hugin's align_image_stack engine + Hugin'in yığın_görüntü_hizalama motorunu kullanın - - Auto-align images - Görütüleri Otom-hizala + + Hugin's align_&image_stack + - + Use MTB (Median Threshold Bitmap) engine MTB motorunu kullan (Median Threshold Bitmap) - + &MTB - - Use Hugin's align_image_stack engine - Hugin'in yığın_görüntü_hizalama motorunu kullanın + + Auto align the bracketed pictures + İşaretli resimleri otomatikman hizala - - Hugin's align_&image_stack - + + Auto-align images + Görütüleri Otom-hizala - + Auto-crop - + &Cancel &İptal - + &Start &Başlat - + &Close &Kapat - + Progress - + Input/Output - + Folder where created HDRs are saved Oluşturulan HDR'nin kayıt klasörü - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) İşaretli resimlerin bulunduğu klasör (alfabetik sıra ile) - + Input folder: - + Output folder: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory - + Choose a output directory - - - + + + Warning - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - - + + Total number of pictures must be a multiple of number of bracketed images. - + Started processing... İşlem başlatıldı... - + Loading files... - + Completed with errors Hatlar ile tamamlandı - + Completed without errors Hatasız tamamlandı - + Error: missing EXIF data Hata: yanlış EXIF verisi - + Aligning... Hizalanıyor... - + Creating HDR... HDR Oluşturuluyor... - + Doing auto anti-ghosting... - + Written Yazılı - + Error: Hata: - + Aborting... Durduruluyor... @@ -409,261 +510,302 @@ Ton haritası oluşturulacak HDRlerin listesi - - Add Directory (Alt+D) + + Remove Files (Alt+R) - - Alt+D + + Alt+R + + + + + Remove All Files (Alt+X) + + + + + + ... + ... + + + + Alt+X - + Add Files (Alt+F) - + Alt+F - - Remove Files (Alt+R) + + Add Directory (Alt+D) - - Alt+R + + Alt+D - + Tone Mapping Settings Ton Eşleme Ayarları - - Add Directory (Alt+I) + + Add Files (Alt+L) - - Alt+I + + Alt+L - - Add Files (Alt+L) + + Add Directory (Alt+I) - - Alt+L + + Alt+I - + Add from Database (Alt+B) - + Alt+B - + Remove Settings (Alt+M) Ayarları Sil (Alt+M) - + Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR Ton Eşleme Ayar dosyaları listesi, her HDR tonu haritalanırken kullanılacak - + Output Çıktı - + Output Image Width: - + Output Folder: - - + + Specify output folder for the tone mapped files Ton eşlenen dosyalar için çıkış klasörü belirtin - + Selec&t... - - + + Width of tonemapped image in percent of original image - + % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log Dönüştürme günlüğü - + Batch operations report Toplu operasyon raporu - + Show onl&y: - + Filter messages based on severity İletileri şiddetine göre filtrele - + All messages Tüm mesajlar - + Errors only Sadece Hatalar - + Success messages Mesajlar başarılı - + Filter &log messages: - + Clear filter text Filtre metinini temizle - + Overall completion progress Genel tamamlanma ilerlemesi - + &Cancel &İptal - + Start batch tone mapping Toplu Ton Eşlemeyi başlat - + &Start &Başlat - + Using %n thread(s) - - - + + + Choose a directory Bir Dizin Seçin - + All HDR images Tüm HDR biçimleri - + Select input images Giriş görüntülerini seç - + Load tone mapping settings text files... Ton eşleme ayarlarını metin dosyasına yükle... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... İşleniyor... - + Start processing... İşlemi başlat... - + Close Kapat - + &Done &Bitti - + + Conversion aborted by user request. + + + + All tasks completed. Tüm görevlet tamamlandı - + Aborting... Durduruluyor... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] İşlemi Başlat %2 - + [T%1] Successfully load %2 [T%1] Başarı ile yüklendi %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] LDR dosyası başarı ile kayıt edildi: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] HATA: Dosyayı kayıt edemiyor: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] HATA: %2 yükleme başarısız oldu @@ -699,572 +846,665 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... Kullanım: %1 [SEÇENEKLER]... [GİRİŞ DOSYALARI]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. Hata: Hizalama motoru tanınmıyor - + Error: Unknown weight function specified. Hata:Belirlenen ağırlık fonksiyonu bilinmiyor. - + Error: Unknown response curve specified. Hata: Belirlenen tepki eğrisi bilinmiyor. - + Error: Unknown HDR creation model specified. Hata: Bilinmeyen HDR oluşturma modeli belirlendi - + Error: Unknown tone mapping operator specified. Hata: Bilinmeyen ton eşleme operatörüi belirlendi - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. Hata: Belirlenen EV değerlerinin sayısı girdi dosya sayısından farklıdır. - + Load file %1 failed - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - + EV values have been assigned. - - + + Starting aligning... - + Failed executing align_image_stack yığın_görüntü_hizalama yürüyme başarısız - + Failed aligning images. - + Creating (in memory) the HDR. - + Saving to file %1. - + Image %1 saved successfully - + Could not save %1 - + NOT Saving HDR image to file. %1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images + + Failed loading images: %1 @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable Düz&enlenebilir - + R&eference Re&ferans - + Select the previous image in both lists Önceki görüntüyü her iki listeden seç - + Select the next image in both lists Sonraki görüntüyü her iki listeden seç - + Choose a directory and a prefix Bir dizin ve bir önek seçin @@ -1418,9 +1658,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - Görüntü mevcut listeded seçildi, aşağıdaki kontrolu kullanarak yukarı,aşağı,sola ve sağa çevirebilirsiniz. -Bu görüntünün widget'i yukarıda görüntülenir. +This image's histogram is displayed in the widget above. + @@ -1913,18 +2152,18 @@ - + Choose a directory Bir Dizin Seçin - - + + Error: Hata: - + must be a directory. @@ -2084,28 +2323,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2113,7 +2352,7 @@ GenericViewer - + Pan the image to a region Görüntüyü bir bölgede kaydır @@ -2126,45 +2365,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + Kapat + + + HdrViewer - + &Mapping: &Eşleme: - + Histogram: Histogram: - + Linear Doğrusal - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2188,7 +2440,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2228,7 +2480,7 @@ - &MTB + M&TB @@ -2238,7 +2490,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2305,12 +2557,12 @@ [2/2] HDR Oluşturma Ayarlarını Seçin - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2323,47 +2575,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Listedeki tanımlı ilk profil genellikle en iyi sonuçlara yol açar. Eğer çıkan HDR görüntüsü yeterince iyi değil ise, değiştirin.</span></p></body></html> - - Profile 1 - Profil 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - Profil 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - Profil 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - Profil 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - Profil 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - Profil 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results Varsayılan profiller üzerinde iyi sonuçlar yoksa, sadece bunu kullanın - + Use Custom Configuration - + HDR Creation Model @@ -2413,238 +2665,267 @@ - + Linear Doğrusal - + Gamma Gama - + Log Günlük - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... Farklı Kaydet... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &İleri > - + &Cancel &İptal - + Image Filename Görüntü Dosyası adı - + Exposure Pozlandırma - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw Tüm biçimler (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF Görüntüleri (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw RAW Görüntüleri (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images Girdi Resimlerini Seç - + Unknown Bilinmiyor - + Loading... Yükleniyor... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + + + + Do not show this message again - + EXIF data not found EXIF verisi bulunamadı - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>Görüntüler Yüklendi.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>Devam etmek için ile pozlama değerlerini kurmanız gerekiyor.<br><font color="#FF0000">%1</font> değerler hala gereklidir.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: Yükleme Hatası: - + Start loading a set of images with different exposure Farklı pozlama ile çekilen görüntülerin bir setini yüklemeyi başlat - - - + + + Error... Hata... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. Harici uygulama başlatılamadı "<em>align_image_stack</em>".<br>Lütfen daha fazla bilgi için "Yardım-> İçindekiler ... -> Ayarlar -> Harici Araçlar"ı okuyun. - + The external application "<em>align_image_stack</em>" crashed... Harici uygulama "<em>align_image_stack</em>" çöktü... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... "<em>yığın_görüntü_hizalama</em>" uygulaması yürütülürken bir hata oluştu - + Now click on next button Şimdi ileri butonuna tıklayın - + + Compute + + + + + Finish + + + + Aligning... Hizalanıyor... - - - &Finish - &Bitti + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - - - - - - Response curve: - - Yanıt Eğrisi: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>Tüm EV değerleri ayarlandı.<br>Şimdi İleri butonuna tıklayın.</b></h3></font></center> - - - Model: - - Model: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>Devam etmek için ile pozlama değerlerini kurmanız gerekiyor.<br><font color="#FF0000">%1</font> değerler hala gereklidir.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>Tüm EV değerleri ayarlandı.<br>Şimdi İleri butonuna tıklayın.</b></h3></font></center> + + Hide Log + @@ -2656,7 +2937,7 @@ - + &File &Dosya @@ -2682,7 +2963,7 @@ - + &Print... &Bas... @@ -2698,7 +2979,7 @@ - + &Find... &Bul... @@ -2729,7 +3010,7 @@ - + &Add Bookmark &Yer İmi Ekle @@ -2745,7 +3026,7 @@ - + D&elete All &Tümünü Sil @@ -2815,101 +3096,99 @@ - + Help SideBar KenarÇubugu Yardım - + LuminanceHDR Online Help LuminanceHDR Online Yardım - + &Edit &Düzen - + &View &Görünüm - - + + &Bookmarks &Yer İmleri - + &Quit &Çık - + Find &Next Sonrakini &Bul - + Find &Previous Öncekini &Bul - + &Contents &İçindekiler - + &Search &Ara - + &Delete &Sil - + Find Bul - + Search Term: Arama Terimi: - + New Bookmark Yeni Yer İmi - + New Bookmark's Title: Yeni Yer İminin Başlığı: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>Üzgünüz, kılavuz yüklü değil!</p><p>Eğer uygulamayı kendiniz yaparsanız, lütfen paket sağlayıcı veya LuminanceHDR ekibine başvurun </p></h2> - + LuminanceHDR - Help Browser LuminanceHDR -Tarayıcı Yardım - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - Bu protokol tarayıcı tarafından işlenmiyor. -Protokol ile birleşik varsayılan uygulama bağlantısını -açmak istiyor musunuz? + @@ -2965,22 +3244,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2988,7 +3272,7 @@ ImageQualityDialog - + Unknown Bilinmiyor @@ -3039,9 +3323,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3121,7 +3405,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3966,18 +4250,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3991,6 +4270,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -4006,91 +4290,90 @@ Hazır. Şimdi mevcut bir HDR görüntüsünü açın veya yeni bir tane oluşturun! - + All HDR formats Tüm HDR Biçimleri - + Load one or more HDR images... Bir veya daha fazla HDR görüntüsü yükle... - + Save files in Dosyaya kaydet - - + + Failed to save %1 - + Done! Bitti! - + Aborting... Durduruluyor... - - - Untitled - İsimsiz - - - + Cropped Image Görüntü Kırpıldı - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... Kaydedilmemiş değişiklikler.... - + This HDR image has unsaved changes.<br>Do you want to save it? Bu HDR görüntüsünde değişiklikler kayıt edilmedi. <br> Ounu kayıt etmek istiyor musunuz? - + Fattal Warning - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - + + Untitled + İsimsiz + + + Untitled %1 İsimsiz %1 - + Error: %1 Hata: %1 - + Untitled HDR - + FITS Image @@ -4402,23 +4685,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Vurgulamalar</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Buradan vurgulama yöntemini seçin:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tam Beyaz</span>: Klipli tüm vurgulamalar düz beyaz</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: Klipsiz vurgulamaları çeşitli pembe tonlarında bırakın</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Harmanla</span>: Kademeli beyaz bir geçiş için klipli ve klipsiz değerleri harmanla</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Yeniden Yap</span>: Bir düzey değeri kullanarak vurgulamaları yeniden yap</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4706,28 +4980,28 @@ &TAMAM - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory Bir Dizin Seçin - + Open ICC Profile - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4843,17 +5117,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: HATA: Ton Eşleme Ayarları dosyası yüklenemedi - + ERROR: File too old, cannot parse Tone Mapping Setting file: - + ERROR: cannot parse Tone Mapping Setting file: @@ -4861,370 +5135,453 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning - + I cannot open monitor profile. Please select a different one. - + I cannot open printer profile. Please select a different one. - + Please select a printer profile . - + I cannot perform the color transform. Please select a different monitor profile. - - Triangular - Üçgensel - - - - Plateau - Plato - - - - Gaussian - Gaussian - - - - Flat - - - - - Linear - Doğrusal - - - - Gamma - Gama - - - - Logarithmic - Logaritmik - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization Kontrast Geliştirme - + Contrast - - + + Saturation Doygunluk - + Detail - + Luminance Level Işık Düzeyi - + Luminance Level=Auto - + Color Saturation Renk Doygunluğu - + Contrast Enhancement Kontrast Geliştirme - + + Alpha Alfa - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 Denklem 2 - + Equation 4 Denklem 4 - - + + Local - + Bias Sapma - + Spatial - - + + Range Sıra - + Base - + Multiplier Çoğullayıcı - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness Parlaklık - + Chromatic Adaptation Kromatik Adaptasyon - + Light Adaptation Işık Adaptasyonu - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + Üçgensel + + + + Plateau + Plato + + + + Gaussian + Gaussian + + + + Flat + + + + + Linear + Doğrusal + + + + Gamma + Gama + + + + Logarithmic + Logaritmik + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... -v -a seçeneği... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float %1 dalgalanma için dönüştürülemiyor - + Loading TMO settings from file: %1 - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 - + Successfully loaded file %1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + Veritabanında kullanılan kayıtlı TM parametreleri açılamaz. +Hata: %1 + + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats Tüm LDR biçimleri - + Save the LDR image as... LDR biçimini farklı kaydet... + All HDR formats + + + + Save the HDR image as... HDR biçimini farklı kaydet... - + Save as... Farklı kaydet... @@ -5295,214 +5652,32 @@ SavedParametersDialog - + Saved Parameters Parametreler Kayıt edildi - - + Comment Yorum - + TM Operator TM Operatörü + + + SavingParameters - - Simple - Sade - - - - Equation 2 - Denklem 2 + + Saving Parameters + Kayıt Parametrekleri - - Local Contrast Threshold - Yerel Kontrast Eşiği - - - - Bias - Sapma - - - - Spatial Kernel Sigma - Uzaysal Çekirdek Sigması - - - - Range Kernel Sigma - Dizi Çekirdek Sigması - - - - Base Contrast - Temel Kontrast - - - - Alpha - Alfa - - - - Beta - Beta - - - - - Color Saturation - Renk Doygunluğu - - - - Noise Reduction - Gürültü Azaltma - - - - Old Fattal - Old Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - Kontrast Geliştirme - - - - Contrast Factor - Kontrast Faktörü - - - - Saturation Factor - Doygunluk Faktörü - - - - Detail Factor - Detay Faktörü - - - - Contrast Enhancement - Kontrast Geliştirme - - - - Luminance Level - Işık Düzeyi - - - - Manual Luminance Level - Işık Düzeyi Kılavuzu - - - - Cone and Rod based on Luminance - - - - - Local Tonemapping - Yerel Ton eşleme - - - - Cone Level - Koni Seviyesi - - - - Rod Level - Çubuk Seviyesi - - - - Multiplier - Çoğullayıcı - - - - Use Scales - Ölçekleri Kullan - - - - Key Value - Anahtar Değer - - - - Phi Value - Phi Degeri - - - - Range - Sıra - - - - Lower Scale - Düşük Ölçek - - - - Upper Scale - Yüksek Ölçek - - - - Brightness - Parlaklık - - - - Chromatic Adaptation - Kromatik Adaptasyon - - - - Light Adaptation - Işık Adaptasyonu - - - - Pre-gamma - Pre-Gama - - - - SavingParameters - - - Saving Parameters - Kayıt Parametrekleri - - - - Enter a short comment for the saved parameters: - + + Enter a short comment for the saved parameters: + @@ -5546,7 +5721,7 @@ TMOProgressIndicator - + Abort computation Hesaplamayı sonlandır @@ -5575,476 +5750,550 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - + + Tonemap + Ton Eşleme - - Tone Mapping Settings - Ton Eşleme Ayarları + + Mantiuk '06 + - - Save current parameters to a text file + + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. + + Fattal + Fattal + + + + Ferradans - - Load an existing text file containing pregamma and TMO settings - Ön gama ve TMO ayarlarını içeren bir metin dosyası yükle + + Drago + Drago - - Load an existing text file containing pregamma and TMO settings. - + + Durand + Durand - - Save current parameters + + Reinhard '02 + Reinhard '02 + + + + Reinhard '05 + Reinhard '05 + + + + Ashikhmin + Ashikhmin + + + + Pattanaik - - Load saved parameters + + Mai - - Export + + Ferwerda - - Fast export + + KimKautz - - Opens the current export direcotory. This can be changed in the preferences! + + VanHateren - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + Lischinski - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + + Operator + Operator + + + + &Contrast Factor - - Process - İşlem + + Contrast Equalization + Kontrast Geliştirme - - Result Si&ze + + &Detail Factor - - Gamma applied before tonemapping - Tone eşlemeden önce gama uygulandı + Saturat&ion Factor + - - Pre-&gamma + + Lcd Office + Lcd Ofis + + + + Lcd + Lcd + + + + Lcd Bright + Lcd Parlak + + + + CRT + CRT + + + + Co&lor Saturation - - Restore pregamma's default value (1) - Programcının varsayılanlarını geri yükle (1) + + Co&ntrast Enhancement + - - Size of the resulting LDR image + + Enable +Luminace Level + Işık +Düzeyini Etkinleştir + + + + Lum&inance Level - - Here you can choose the size of the resulting LDR image. + + Predefined &Display - - Set Custom Output Size - Özel Çıktı Boyutu Ayarla + + A&lpha + - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - Bu düğmeye tıkladığınızda çıkan görüntünün LDR boyutu için bir <i>genişlik</i> değeri eklemek mümkün olacak.<br>Enter (veya Return)'a bastıktan sonra yükseklik değeri otomatik olarak hesaplanır ve yeni boyut listeye eklenir. + + Bet&a + - - Start tonemapping (CTRL+T) - Ton Eşlemeyi Başlat (CTRL+T) + + Color Saturat&ion + - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + &Noise Reduction - - &Update preview + + Version 2.3.0 - - Ctrl+T - Ctrl+T + + &Inverse Alpha + - - Update current LDR - Geçerli LDR'yi güncelle + + Rho + - - Auto Levels + + B&ias - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Spatial &Kernel Sigma - - Tonemap - Ton Eşleme + + Base Co&ntrast + - - Mantiuk '06 + + Range Kerne&l Sigma - - Mantiuk '08 + + Ph&i - - Fattal - Fattal + + &Key Value + - - Ferradans + + &Lower Scale - - Drago - Drago + + Upper S&cale + - - Durand - Durand + + Use Scales + Ölçekleri Kullan - - Reinhard '02 - Reinhard '02 + + Ra&nge + - - Reinhard '05 - Reinhard '05 + + &Light Adaptation + - - Ashikhmin - Ashikhmin + + Chromatic A&daptation + - - Pattanaik + + Br&ightness - - Mai + + Local Contrast Threshol&d - - Operator - Operator + + Simple + Sade - - Contrast Factor - Kontrast Faktörü + + Equation &Number + - - Saturation Factor - Doygunluk Faktörü + + Eqn &2 + - - Detail Factor - Detay Faktörü + + Eqn &4 + - - Contrast Equalization - Kontrast Geliştirme + + Local Tone Mapping + Yerel Ton Eşleme - - Predefined Display + + Mu&ltiplier - - Lcd Office - Lcd Ofis + + Auto Cone/Rod + Otomatik Koni/Çubuk - - Lcd - Lcd + + Co&ne Level + - - Lcd Bright - Lcd Parlak + + Ro&d Level + - - CRT - CRT + + This operator has no options + - - - Color Saturation - Renk Doygunluğu + + &Multiplier + - - Contrast Enhancement - Kontrast Geliştirme + + A&daptation Luminance + - - Enable -Luminace Level - Işık -Düzeyini Etkinleştir + + &C1 + - - Luminance Level - Işık Düzeyi + + C&2 + - - Alpha - Alfa + + Pup&il Area + - - Beta - Beta + + a&lpha mul + - - Noise Reduction - Gürültü Azaltma + + Restore operator's default values + Operatörün varsayılanlarını geri yükle - - Version 2.3.0 + + Restore + Geri yükle + + + + Previous applied settings - - Inverse Alpha + + Previous + Önceki + + + + Next applied settings - - Rho + + Next + Sonraki + + + + Start tonemapping (CTRL+T) + Ton Eşlemeyi Başlat (CTRL+T) + + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - Bias - Sapma + + &Update preview + - - Spatial Kernel Sigma - Uzaysal Çekirdek Sigması + + Ctrl+T + Ctrl+T - - Range Kernel Sigma - Dizi Çekirdek Sigması + + Update current LDR + Geçerli LDR'yi güncelle - - Base Contrast - Temel Kontrast + + Auto Levels + - - Key Value - Anahtar Değer + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Phi - Phi + + Processing + - - Use Scales - Ölçekleri Kullan + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + - - Range - Sıra + + Res&ult Size + - - Lower Scale - Düşük Ölçek + + Set Custom Output Size + Özel Çıktı Boyutu Ayarla - - Upper Scale - Yüksek Ölçek + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + Bu düğmeye tıkladığınızda çıkan görüntünün LDR boyutu için bir <i>genişlik</i> değeri eklemek mümkün olacak.<br>Enter (veya Return)'a bastıktan sonra yükseklik değeri otomatik olarak hesaplanır ve yeni boyut listeye eklenir. - - Brightness - Parlaklık + + + Gamma applied before tonemapping + Tone eşlemeden önce gama uygulandı - - Chromatic Adaptation - Kromatik Adaptasyon + + Pre-&gamma + - - Light Adaptation - Işık Adaptasyonu + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Local Contrast Threshold - Yerel Kontrast Eşiği + + Pos&t-saturation + - - Simple - Sade + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Equation Number - Eşitleme Numarası + + Post-gamma + - - Eqn &2 + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> - - Eqn &4 + + ... + ... + + + + Settings - - Multiplier - Çoğullayıcı + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + - - Local Tone Mapping - Yerel Ton Eşleme + + Tone Mapping Settings + Ton Eşleme Ayarları - - Auto Cone/Rod - Otomatik Koni/Çubuk + + Save current parameters to a text file + - - Cone Level - Koni Seviyesi + + Save current parameters (pregamma and TMO) to a text file. + - - Rod Level - Çubuk Seviyesi + + Load an existing text file containing pregamma and TMO settings + Ön gama ve TMO ayarlarını içeren bir metin dosyası yükle - - This operator has no options + + Load an existing text file containing pregamma and TMO settings. - - Restore operator's default values - Operatörün varsayılanlarını geri yükle + + Load saved parameters + - - Restore - Geri yükle + + Save current parameters + - - Previous applied settings + + Export - - Previous - Önceki + + Fast export + - - Next applied settings + + Opens the current export directory. This can be changed in the preferences! - - Next - Sonraki + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + - + Queue size: %1 - + TM Database Problem TM Veritabanı Problemi - + The database used for saving TM parameters cannot be opened. Error: %1 Veritabanında kullanılan kayıtlı TM parametreleri açılamaz. @@ -6052,56 +6301,56 @@ - + Load a tonemapping settings text file... Bir ton eşleme ayarları metin dosyası yükle... - - + + LuminanceHDR tonemapping settings text file (*.txt) - - - - + + + + Aborting... Durduruluyor... - + File is not readable (check existence, permissions,...) Dosya okunabilir değil (varlığını, izinlerini.... kontrol edin) - + Save tonemapping settings text file to... Ton Eşleme ayarları metin dosyasını şuraya kopyala... - + File is not writable (check permissions, path...) Dosya yazılabilir değil (izinleri, yolu... kontrol edin) - + File is not readable (check permissions, path...) Dosya okunabilir değil (izinleri, yolu... kontrol edin) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + Custom LDR size Özel LDR boyutu - + Enter the width of the new size: Yeni genişlik boyutunu girin: @@ -6251,19 +6500,19 @@ &Başlat - - + + All Supported formats Desteklenen tüm biçimler - - + + Select the input images Girdi Resimlerini Seç - + &Done &Bitti @@ -6271,39 +6520,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1 Lisans belgesi bulunamadı: Online %2Buradan%3 bulabilirsiniz - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation Bağış - + Would you like to donate? Bağış yapmak istiyormusunuz? - + Yes, I'd love to! Evet, istiyorum! - + Stop Bothering Me Canını Sıkılıyorsa Beni Durdur - + Remind me later Daha sonra hatırlat @@ -6311,18 +6560,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/lang_zh.ts luminance-hdr-2.6.0/i18n/lang_zh.ts --- luminance-hdr-2.5.1+dfsg/i18n/lang_zh.ts 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/lang_zh.ts 2019-06-09 19:18:38.000000000 +0000 @@ -4,7 +4,7 @@ About Luminance HDR - + 关于 Luminance HDR @@ -26,75 +26,126 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> - + A&uthors &作者 - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> - + &Thanks To &感谢 - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> - + Changelog - + &License Agreement &许可证和协议 - + &OK &确定 @@ -123,270 +174,320 @@ 导出 - + Choose an HDR output file format 选择HDR导出文件格式 - - Predefined profile: - 预定义配置文件: - - - - Output format: - 导出格式: + + Filename prefix: + - - Choose one of the creation predefined profiles. + + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 配置文件1 - + Profile 2 配置文件2 - + Profile 3 配置文件3 - + Profile 4 配置文件4 - + Profile 5 配置文件5 - + Profile 6 配置文件6 - + + Output format: + 导出格式: + + + + hdr_ + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + + + Use Proposed Filename Scheme + + + + + Response: + + + + + Weights: + 权重: + + + + Predefined profile: + 预定义配置文件: + + + + Model: + + + + + Debevec + Debevec + + + + Triangular + 三角加权 + + + + Linear + 线性 + + + Alignment 对齐 - - Auto align the bracketed pictures - 自动对齐分阶段曝光图片 + + Use Hugin's align_image_stack engine + 是用Hugin's align_image_stack引擎 - - Auto-align images - 自动对齐图片 + + Hugin's align_&image_stack + - + Use MTB (Median Threshold Bitmap) engine 阀值位图中位数引擎 - + &MTB - - Use Hugin's align_image_stack engine - 是用Hugin's align_image_stack引擎 + + Auto align the bracketed pictures + 自动对齐分阶段曝光图片 - - Hugin's align_&image_stack - + + Auto-align images + 自动对齐图片 - + Auto-crop - + &Cancel &取消 - + &Start &开始 - + &Close &关闭 - + Progress 进度 - + Input/Output - + Folder where created HDRs are saved 存储HDRs文件夹 - - + + Select... 选择... - + Folder where bracketed pictures are located (in alphabetical order) 阶段曝光图片存储文件夹(按字母书序) - + Input folder: 输入文件夹: - + Output folder: 输出文件夹: - + Anti-ghosting - + Artifact-free High Dynamic Range Imaging - + Threshold - - + + <html><head/><body><p>Threshold used by auto anti-ghosting algorithm. A lower threshold means a more aggressive processing but that can lower the final dynamic range. Use the &quot;Recompute&quot; button to see the actual patches coverage and adjust the threshold accordingly</p></body></html> - + O. Gallo and others - + <html><head/><body><p>Enable auto anti-ghosting algorithm</p></body></html> - + Auto anti-ghosting - + Custom config %1 - + Choose a source directory 选择源目录 - + Choose a output directory 选择输出目录 - - - + + + Warning 警告 - - The chosen output directory contains HDR files. Those files might be overwritten. + + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - 选择的输出目录包含HDR文件,这些文件可能会被覆盖。继续? + - - + + Total number of pictures must be a multiple of number of bracketed images. 图片总数必须是多个阶段曝光图片的数量. - + Started processing... 开始处理... - + Loading files... - + Completed with errors 完成但有错误 - + Completed without errors 完成且没有错误 - + Error: missing EXIF data 错误:缺失EXIF数据 - + Aligning... 对齐中... - + Creating HDR... 生成 HDR... - + Doing auto anti-ghosting... - + Written 写入完成 - + Error: 错误: - + Aborting... 终止中... @@ -409,261 +510,302 @@ 色调映射HDRs列表 - - Add Directory (Alt+D) - 添加目录 (Alt+D) + + Remove Files (Alt+R) + 删除文件 (Alt+I) - - Alt+D - Alt+D + + Alt+R + Alt+R - - Add Files (Alt+F) - 添加文件 (Alt+F) + + Remove All Files (Alt+X) + - - Alt+F - Alt+F + + + ... + ... - - Remove Files (Alt+R) - 删除文件 (Alt+I) + + Alt+X + - - Alt+R - Alt+R + + Add Files (Alt+F) + 添加文件 (Alt+F) - - Tone Mapping Settings - 色调映射设置 + + Alt+F + Alt+F - Add Directory (Alt+I) - 添加目录 (Alt+I) + Add Directory (Alt+D) + 添加目录 (Alt+D) - Alt+I - Alt+I + Alt+D + Alt+D + + + + Tone Mapping Settings + 色调映射设置 - + Add Files (Alt+L) 添加文件 (Alt+L) - + Alt+L Alt+L - + + Add Directory (Alt+I) + 添加目录 (Alt+I) + + + + Alt+I + Alt+I + + + Add from Database (Alt+B) 从数据库添加 (Alt+B) - + Alt+B Alt+B - + Remove Settings (Alt+M) 删除文件设置 (Alt+M) - + Alt+M Alt+M - + + Remove All Settings (Alt+W) + + + + + Alt+W + + + + List of Tone Mapping Setting files that will be used to tone map each HDR 用于色调映射每一个HDR的设置文件列表 - + Output 输出 - + Output Image Width: 输出图片宽度: - + Output Folder: 输出文件夹: - - + + Specify output folder for the tone mapped files 指定色调映射文件输出文件夹 - + Selec&t... 选&择... - - + + Width of tonemapped image in percent of original image - + % % - + Output Format: - + Image format of tonemapped images - + Image format options - + Conversion Log 转换日志 - + Batch operations report 批处理运行报告 - + Show onl&y: - + Filter messages based on severity 基于严重度过滤消息 - + All messages 所有消息 - + Errors only 仅错误 - + Success messages 成功消息 - + Filter &log messages: - + Clear filter text 清楚过滤文字 - + Overall completion progress 整体完成进度 - + &Cancel &取消 - + Start batch tone mapping 开始色调映射批处理 - + &Start &开始 - + Using %n thread(s) - - - + + + Choose a directory 选择一个目录 - + All HDR images 所有HDR图片 - + Select input images 选择输入图片 - + Load tone mapping settings text files... 载入色调映射设置文本文件... - + Luminance HDR tone mapping settings text file (*.txt) - + + Warning + 警告 + + + + An error occurred reading one or more tonemapping options files. + + + + Processing... 处理中... - + Start processing... 开始处理中... - + Close 关闭 - + &Done &完成 - + + Conversion aborted by user request. + + + + All tasks completed. 所有任务已完成. - + Aborting... 终止... @@ -671,27 +813,32 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] 开始处理中 %2 - + [T%1] Successfully load %2 [T%1] 成功载入 %2 - + + [T%1] ERROR: Failed to tonemap file: %2 + + + + [T%1] Successfully saved LDR file: %2 [T%1] LDR文件成功保存: %2 - + [T%1] ERROR: Cannot save to file: %2 [T%1] 出错: 无法保存到文件: %2 - + [T%1] ERROR: Loading of %2 failed [T%1] 出错:载入 %2 失败 @@ -699,573 +846,666 @@ CommandLineInterfaceManager - + Usage: %1 [OPTIONS]... [INPUTFILES]... 使用: %1 [选项]...[输入文件]... - + Display this help. - + Display program version. - + Print more messages during execution. - + Print a list of all supported cameras. - + [AIS|MTB] Align Engine to use during HDR creation (default: no alignment). - + EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - + prefix Save aligned images to files which names start with prefix - + HDR_FILE Load an HDR instead of creating a new one. - + HDR_FILE Save to a HDR file format. (default: don't save) - + VALUE Gamma value to use during tone mapping. (default: 1) - + + VALUE Saturation value to use after tone mapping. (default: 1) + + + + + VALUE Gamma value to use after tone mapping. (default: 1) + + + + VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - + LDR_FILE File name you want to save your tone mapped LDR to. - + THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0) - + Apply autolevels correction after tonemapping. - + Enable generation of a webpage with embedded HDR viewer. - + + FILE_EXTENSION Save LDR file with a name of the form first-last_tmparameters.extension. + + + + + FILE_EXTENSION Save HDR file with a name of the form first-last_HdrCreationModel.extension. + + + + HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR - + weight = triangular|gaussian|plateau|flat (Default is triangular) - + response curve = from_file|linear|gamma|log|srgb (Default is linear) - + model: robertson|robertsonauto|debevec (Default is debevec) - + curve filename = your_file_here.m - + LDR output parameters - + VALUE Quality of the saved tone mapped file (1-100). - + Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b) - + Tiff deflate compression. true|false (Default is true) - + HTML output parameters - + VALUE Quality of the interpolated exposures, from the worst (1) to the best(4). Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. (Default is 2, which is sufficient for most applications) - + Specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. (Default is first image name) - + Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. (Default is current working directory) - + Tone mapping parameters - no tonemapping is performed unless -o is specified - - Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06) + + Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans| +ferwerda|kimkautz|pattanaik|reinhard02| +reinhard05|mai|mantiuk06|mantiuk08| +vanhateren|lischinski] (Default is mantiuk06) - + SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings - + Fattal - + + alpha FLOAT - + beta FLOAT - + color FLOAT - + noise FLOAT - + new true|false - + Ferradans - + rho FLOAT - + inv_alpha FLOAT - + + Ferwerda + + + + + mul FLOAT + + + + + adapt_lum FLOAT + + + + + KimKautz + + + + + c1 FLOAT + + + + + c2 FLOAT + + + + Mantiuk 06 - + contrast FLOAT - + saturation FLOAT - + detail FLOAT - + equalization true|false - + Mantiuk 08 - + color saturation FLOAT - + contrast enhancement FLOAT - + luminance level FLOAT - + enable luminance level true|false - + Durand - + spatial kernel sigma FLOAT - + range kernel sigma FLOAT - + base contrast FLOAT - + Drago - + bias FLOAT - + Reinhard 02 - + key value FLOAT - + phi FLOAT - + use scales true|false - + range FLOAT - + lower scale FLOAT - + upper scale FLOAT - + Reinhard 05 - + Brightness FLOAT - + Chroma adaption FLOAT - + Light adaption FLOAT - + Ashikmin - + Equation number 2 true|false - + Simple true|false - + Local threshold FLOAT - + Pattanaik - + multiplier FLOAT - + Local tone mapping true|false - + Auto luminance true|false - + cone level FLOAT - + rod level FLOAT - + + VanHateren + + + + + pupil_area FLOAT + + + + + Lischinski + + + + Luminance HDR version - + With LibRaw version - + models listed - + + + Error: Unsupported LDR file type. + + + + + + Error: Unsupported HDR file type. + + + + Error: htmlQuality must be in the range [1..4]. - + Error: Alignment engine not recognized. 出错: 无法识别对齐引擎. - + Error: Unknown weight function specified. 出错: 指定的加权函数未知. - + Error: Unknown response curve specified. 出错: 指定的响应曲线未知. - + Error: Unknown HDR creation model specified. 出错: 指定的HDR生成模型未知. - + Error: Unknown tone mapping operator specified. 出错: 指定的色调映射操作符未知. - - + + Error: The specified file with TMO settings could not be parsed! - + Error: The specified file with TMO settings could not be parsed!: %1 - + Error: Quality must be in the range [1..100]. - + Error: Unknown tiff format. - + Error: Threshold must be in the range [0..1]. - + Error: The number of EV values specified is different from the number of input files. 出错: 指定的EV值数量于输入文件数量不同. - + Load file %1 failed 载入文件 %1失败 - + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - + EV values have been assigned. EV值已被指定. - - + + Starting aligning... - + Failed executing align_image_stack 执行对齐图片堆栈失败 - + Failed aligning images. 对齐图片失败. - + Creating (in memory) the HDR. 正在(寄存器中)创建HDR. - + Saving to file %1. 正在保存到文件%1. - + Image %1 saved successfully 图片 %1 成功保存 - + Could not save %1 无法保存%1 - + NOT Saving HDR image to file. %1 未能保存HDR图片到文件%1 - + Exporting to HTML - + ERROR: directory %1 must exist - + Tonemapping requested, saving to file %1. 已请求色调映射,正在保存到文件%1. - + Resizing to width %1. - + Applying gamma %1. - + + +Applying saturation enhancement %1. + + + + + +Applying post-gamma %1. + + + + Image %1 successfully saved - + ERROR: Cannot save to file: %1 - + Tonemapping NOT requested. - - Failed loading images - 载入图片失败 + + Failed loading images: %1 + @@ -1342,47 +1582,47 @@ EditingTools - + Maskable - + Good image - + Add good image - + Remove good image - + Ed&itable 可&编辑 - + R&eference 参&考图片 - + Select the previous image in both lists 在两个列表中同时选择前面的图片 - + Select the next image in both lists 选择下一个都在两个列表中的图片 - + Choose a directory and a prefix 选择一个目录和前缀 @@ -1415,9 +1655,8 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. - 当前选中列表中的图片可以通过下面的控制上下左右平移。 -图片的直方图显示子在上面的小工具窗口中. +This image's histogram is displayed in the widget above. + @@ -1896,18 +2135,18 @@ - + Choose a directory 选择一个目录 - - + + Error: 错误: - + must be a directory. @@ -2067,28 +2306,28 @@ - + Load one FITS image... - - Cannot load FITS image %1. + + Cannot load FITS image %1. ERROR: %2 - + FITS images have different size - + align_image_stack exited with exit code %1 - + align_image_stack failed with error @@ -2096,7 +2335,7 @@ GenericViewer - + Pan the image to a region 平移图像到一个区域 @@ -2109,45 +2348,58 @@ - + HdrCreationManager::loadFilesDone(): The images have different size. + HdrPreview + + + HDR Preview + + + + + Close + 关闭 + + + HdrViewer - + &Mapping: &映射: - + Histogram: 直方图: - + Linear x线性 - + Gamma 1.4 Gamma 1.4 - + Gamma 1.8 Gamma 1.8 - + Gamma 2.2 Gamma 2.2 - + Gamma 2.6 Gamma 2.6 @@ -2171,7 +2423,7 @@ - &Currently Loaded Files + Currently &Loaded Files @@ -2211,7 +2463,7 @@ - &MTB + M&TB @@ -2221,7 +2473,7 @@ - Hugin's align_&image_stack + Hu&gin's align_image_stack @@ -2288,12 +2540,12 @@ [2/2]选择HDR生成设置 - + Profile - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2306,47 +2558,47 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">列表中第一个预定义配置通常会产生最好的效果。只有当生成的图像质量不好时再改变配置.</span></p></body></html> - - Profile 1 - 配置 1 + + Profile 1 - Debevec, Triangular, Linear + - - Profile 2 - 配置 2 + + Profile 2 - Debevec, Triangular, Gamma + - - Profile 3 - 配置 3 + + Profile 3 - Debevec, Plateau, Linear + - - Profile 4 - 配置 4 + + Profile 4 - Debevec, Plateau, Gamma + - - Profile 5 - 配置 5 + + Profile 5 - Debevec, Gaussian, Linear + - - Profile 6 - 配置 6 + + Profile 6 - Debevec, Gaussian, Gamma + - + Use this only if the default profiles above do not yield good results 仅当以上默认设置给出效果不好时才使用此选项 - + Use Custom Configuration - + HDR Creation Model @@ -2396,238 +2648,267 @@ - + Linear 线性 - + Gamma Gamma - + Log 对数 - + sRGB - - Custom + + Custom (From File) - + Response Curve Input File - + + Load Response + + + + Response Curve Output File - + Save As... 另存为... - + Save Settings - + + Show HDR + + + + + Show HDR Preview + + + + + + Show Log + + + + &Next > &下一步 > - + &Cancel &取消 - + Image Filename 图片文件名 - + Exposure 曝光 - + All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw 所有格式 (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; *.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);; - + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; TIFF 图像 (*.tiff *.tif *.TIFF *.TIF);; - + RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw 未处理图像 (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw - + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + Select the input images 选择输入图像 - + Unknown 未知 - + Loading... 加载中... - + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <b>EXIF</b> tags for the following images:<ul> - - </ul><hr>You can still proceed creating an Hdr. To do so you have to insert <b>manually</b> the EV (exposure values) or stop difference values.<hr>If you want Luminance HDR to do this <b>automatically</b>, you have to load images that have at least the following exif data: <ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. + + </ul><hr>Luminance HDR has inserted those values for you, two stops apart.<br> If the guess is correct you can proceed creating the HDR, otherwise you have to <b>manually</b> correct the EVs (exposure values) or stop difference values. <hr>To avoid this warning in the future you must load images that have at least the following exif data: <ul><li>Shutter Speed (seconds)</li></ul><ul><li>Aperture (F-Number)</li></ul><ul><li>Exposure Bias</li></ul><hr><b>HINT:</b> Losing EXIF data usually happens when you preprocess your pictures.<br>You can perform a <b>one-to-one copy of the exif data</b> between two sets of images via the <b>Tools->Copy Exif Data...</b> menu item. - + + Do not show this message again + + + + EXIF data not found 未找到EXIF数据 - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>图像加载完毕.</b></h3></font></center> - - - <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> - <center><h3><b>要继续你需要手动设置曝光值.<br><font color="#FF0000">%1</font> 仍然需要数值.</b></h3></center> + + <center><font color="#ffaa00"><h3><b>Please check that all exposure values are correct before proceedings.</h3></font></center> + - + Loading Error: 载入错误: - + Start loading a set of images with different exposure 开始加载一系列不同曝光度图像 - - - + + + Error... 错误... - + Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. 外部应用程序无法启动 "<em>对其图像堆栈</em>".<br>请阅读 "帮助 -> 目录... -> 设置 ->外部工具" 查询更多信息. - + The external application "<em>align_image_stack</em>" crashed... 外部应用程序 "<em>对其图像堆栈</em>" 崩溃... - + An unknown error occurred while executing the "<em>align_image_stack</em>" application... 在执行 "<em>对齐图像堆栈</em>" 应用程序时发生未知错误... - + Now click on next button 现在点击下一步按钮 - + + Compute + + + + + Finish + + + + Aligning... 对齐中... - - - &Finish - &完成 + + &Compute + - + Load camera response curve file - + Camera response curve (*.m);;All Files (*) - + Invalid Response Curve File - + Invalid Response Curve File: please try a different file - + Save a camera response curve file - + Camera response curve (*.m) - - Weights: - 权重: - - - - - Response curve: - -响应曲线: + + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> + <center><font color="#008400"><h3><b>已设定所有EV值.<br>现在点击下一步按钮.</b></h3></font></center> - - - Model: - -模型: + + <center><h3><b>To proceed you need to manually set the exposure values.<br><font color="#FF0000">%1</font> values still required.</b></h3></center> + <center><h3><b>要继续你需要手动设置曝光值.<br><font color="#FF0000">%1</font> 仍然需要数值.</b></h3></center> - - <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> - <center><font color="#008400"><h3><b>已设定所有EV值.<br>现在点击下一步按钮.</b></h3></font></center> + + Hide Log + @@ -2639,7 +2920,7 @@ - + &File &文件 @@ -2665,7 +2946,7 @@ - + &Print... &打印... @@ -2681,7 +2962,7 @@ - + &Find... &查找... @@ -2712,7 +2993,7 @@ - + &Add Bookmark &添加书签 @@ -2728,7 +3009,7 @@ - + D&elete All &删除所有 @@ -2798,99 +3079,98 @@ - + Help SideBar 帮助侧边栏 - + LuminanceHDR Online Help LuminanceHDR 在线帮助 - + &Edit &编辑 - + &View &查看 - - + + &Bookmarks &书签 - + &Quit &退出 - + Find &Next 查找&下一个 - + Find &Previous 查找&上一个 - + &Contents &目录 - + &Search &搜索 - + &Delete &删除 - + Find 查找 - + Search Term: 搜索词句: - + New Bookmark 新书签 - + New Bookmark's Title: 新书签的标题: - + <h2><p>Sorry, no manual is installed!</p><p>Please contact your package provider or LuminanceHDR team if you built the application yourself</p></h2> HTML message for no documentation available to show <h2><p>对不起,未安装手册指南!</p><p>如果你建立了自己的应用程序请联系你的安装包提供商或者 LuminanceHDR团队</p></h2> - + LuminanceHDR - Help Browser LuminanceHDR -帮助文件浏览 - + This protocol is not handled by the help browser. -Do you want to open the link with the default application +Do you want to open the link with the default application associated with the protocol? - 帮助浏览器不处理该协议. -你想要使用与协议相关的默认程序打开链接吗? + @@ -2946,22 +3226,27 @@ IOWorker - + IOWorker: The following file is not readable: %1 - + IOWorker: file %1 has unsupported extension: %2 - + IOWorker: caught exception reading %1: %2 - + + IOWorker: failed to allocate memory %1: %2 + + + + IOWorker: failed loading file: %1 @@ -2969,7 +3254,7 @@ ImageQualityDialog - + Unknown 未知 @@ -3020,9 +3305,9 @@ LdrViewer - - - + + + LDR image [%1 x %2]: %3 @@ -3102,7 +3387,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -3947,18 +4232,13 @@ - - &Developers Web Site - - - - - &Luminance HDR Web Site + + Open Online Documentation Web Site with the System Browser - - Open Online Documentation Web Site with the System Browser + + &Developers Web Site @@ -3972,6 +4252,11 @@ + + &Luminance HDR Web Site + + + Luminance HDR Web Site @@ -3987,93 +4272,90 @@ 已准备好.现在打开一个现有的HDR图像或创建一个新的! - + All HDR formats 所有HDR格式 - + Load one or more HDR images... 载入一个或者多个HDR图像... - + Save files in 保存文件在 - - + + Failed to save %1 - + Done! 完成! - + Aborting... 终止... - - - Untitled - 无名 - - - + Cropped Image 剪裁的图像 - + It appears that you are running the 32-bit version <strong>Luminance HDR</strong> on a 64-bit system. <br>Please download the <strong>64-bit</strong> version from <a href="http://qtpfsgui.sourceforge.net">http://qtpfsgui.sourceforge.net</a> to get the best Luminance HDR experience! - + Unsaved changes... 未保存的改动... - + This HDR image has unsaved changes.<br>Do you want to save it? 这个HDR图像还有未保存的改动.<br>你要保存它吗? - + Fattal Warning Fattal 警告 - - This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. + + This tonemapping operator depends on the size of the input image. Applying this operator on the full size image will most probably result in a different image. Do you want to continue? - 色调映射运算符取决于输入图像的大小. 在整个图像上应用这个运算符很可能生成一个不一样的图像。 - -你想继续吗? + + + + + Untitled + 无名 - + Untitled %1 无名 %1 - + Error: %1 错误:%1 - + Untitled HDR - + FITS Image @@ -4413,23 +4695,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html> + @@ -4717,28 +4990,28 @@ &确定 - + Restart - + For the settings to take effect, please restart the application! - - + + Choose a directory 选择一个目录 - + Open ICC Profile 打开ICC配置文件 - + Color profile (*.icc *.ICC *.icm *.ICM) @@ -4854,17 +5127,17 @@ QApplication - + ERROR: cannot load Tone Mapping Setting file: 错误: 无法载入色调映射设置文件: - + ERROR: File too old, cannot parse Tone Mapping Setting file: 错误: 文件太老,无法解析色调映射设置文件: - + ERROR: cannot parse Tone Mapping Setting file: 错误: 无法解析色调映射文件: @@ -4872,370 +5145,452 @@ QObject - + The quality must be between 1 (worst) and 5 (best). - + NULL frame passed. - + Adding image - + to the web page - - - + + + Writing: - - - - + + + + Warning 警告 - + I cannot open monitor profile. Please select a different one. 我打不开监视器配置文件。请选择另一个。 - + I cannot open printer profile. Please select a different one. 我打不开打印机配置文件。请选择另一个。 - + Please select a printer profile . 请选择一个打印机配置文件。 - + I cannot perform the color transform. Please select a different monitor profile. 我无法执行颜色转换。请选择一个不同的监视器配置文件. - - Triangular - 三角加权 - - - - Plateau - 平台 - - - - Gaussian - 高斯 - - - - Flat - - - - - Linear - 线性 - - - - Gamma - Gamma - - - - Logarithmic - 对数 - - - - sRGB + + + + Weights= - - From Calibration/Input File + + + + - Response curve= - - Debevec - Debevec - - - - Robertson - Robertson - - - - Robertson Response Calculation + + + + - Model= - + PreGamma=%1 - + Contrast Equalization 对比均衡 - + Contrast - - + + Saturation 饱和度 - + Detail - + Luminance Level 亮度水平 - + Luminance Level=Auto - + Color Saturation 色彩饱和度 - + Contrast Enhancement 对比度加强 - + + Alpha Alpha - + Beta Beta - + NoiseRedux - + FFTSolver - + Rho - + InvAlpha - + + MaxLuminance + + + + + AdaptationLuminance + + + + + C1 + + + + + C2 + + + + simple - + Equation 2 方程2 - + Equation 4 - - + + Local - + Bias 偏置 - + Spatial - - + + Range 范围 - + Base - + Multiplier 乘数 - + AutoLuminance - + Cone - + Rod - + Key - + Phi Phi - + Scales: - + Lower - + Upper - + Brightness 亮度 - + Chromatic Adaptation 色彩适应 - + Light Adaptation 光适应 - + + Pupil Area + + + + + PostSaturation=%1 + + + + + PostGamma=%1 + + + + + + HDR Preview + + + + + Debevec + Debevec + + + + Robertson + Robertson + + + + Robertson Response Calculation + + + + + Triangular + 三角加权 + + + + Plateau + 平台 + + + + Gaussian + 高斯 + + + + Flat + + + + + Linear + 线性 + + + + Gamma + Gamma + + + + Logarithmic + 对数 + + + + sRGB + + + + + From Calibration or Input File + + + + Option -v -a... 选项 -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v" and without the "-a" options. Command line options have been corrected. - + Cannot convert %1 to a float 无法转换 %1 为浮点数 - + Loading TMO settings from file: %1 - + Input file %1 输入文件 %1 - + Running in HDR-creation mode. HDR生成模式运行. - + Running in Load-HDR mode. 载入HDR模式运行. - + Temporary directory: %1 临时目录: %1 - - Using %n threads. + + Using %n thread(s). - + Loading file %1 载入文件%1 - + Successfully loaded file %1. 成功载入文件%1. + + The database used for saving TM parameters cannot be opened. +Error: %1 + 无法打开用以保存TM参数的数据库. +错误: %1 + + + + This version of Luminance HDR has been compiled without support for extra demosaicing algorithms. +Your preferences were set to use one of the missing algorithms and are now been changed to use the supported AHD method. +To change this go to Tools->Preferences->Raw Conversion->Quality + + + All LDR formats 所有LDR格式 - + Save the LDR image as... LDR图像另存为... + All HDR formats + + + + Save the HDR image as... HDR图像另存为... - + Save as... 另存为... @@ -5306,202 +5661,20 @@ SavedParametersDialog - + Saved Parameters 以保存的参数 - - + Comment 评论 - + TM Operator TM运算符 - - - Simple - 简单 - - - - Equation 2 - 方程2 - - - - Local Contrast Threshold - 本地对比度阀值 - - - - Bias - 偏置 - - - - Spatial Kernel Sigma - 空间内核Sigma - - - - Range Kernel Sigma - 范围内核Sigma - - - - Base Contrast - 基本对比度 - - - - Alpha - Alpha - - - - Beta - Beta - - - - - Color Saturation - 颜色饱和度 - - - - Noise Reduction - 降噪 - - - - Old Fattal - 旧Fattal - - - - Rho - - - - - InvAlpha - - - - - Contrast Equalization - 对比均衡 - - - - Contrast Factor - 对比度因子 - - - - Saturation Factor - 饱和度因子 - - - - Detail Factor - 详情因子 - - - - Contrast Enhancement - 对比度加强 - - - - Luminance Level - 亮度水平 - - - - Manual Luminance Level - 手动亮度水平 - - - - Cone and Rod based on Luminance - 基于亮度锥和视杆 - - - - Local Tonemapping - 本地色调映射 - - - - Cone Level - 圆锥水平 - - - - Rod Level - 杆水平 - - - - Multiplier - 乘数 - - - - Use Scales - 使用比例尺 - - - - Key Value - 关键值 - - - - Phi Value - Phi值 - - - - Range - 范围 - - - - Lower Scale - 较低的比例 - - - - Upper Scale - 较高的比例 - - - - Brightness - 亮度 - - - - Chromatic Adaptation - 色彩适应 - - - - Light Adaptation - 光线适应 - - - - Pre-gamma - Pre-gamma - SavingParameters @@ -5557,7 +5730,7 @@ TMOProgressIndicator - + Abort computation 终止计算 @@ -5586,532 +5759,606 @@ TonemappingPanel - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - 这里你可以载入和保存一个色调映射设置文件. <br>你还可以应用当前已载入的设置文件的内容. + + Tonemap + 色调映射 - - Tone Mapping Settings - 色调映射文件设置 + + Mantiuk '06 + Mantiuk '06 - - Save current parameters to a text file - 保存当前参数到一个text文件 + + Mantiuk '08 + Mantiuk '08 - - Save current parameters (pregamma and TMO) to a text file. - 保存当前参数(pregamma和TMO)到一个text文件. + + Fattal + Fattal - - Load an existing text file containing pregamma and TMO settings - 载入一个已存在的包含pregamma和TMO设置的text文件 + + Ferradans + - - Load an existing text file containing pregamma and TMO settings. - 载入一个已存在的包含pregamma和TMO设置的text文件. + + Drago + Drago - - Save current parameters - 保存当前参数 + + Durand + Durand - - Load saved parameters - 加载已保存的参数 + + Reinhard '02 + Reinhard '02 - - Export + + Reinhard '05 + Reinhard '05 + + + + Ashikhmin + Ashikhmin + + + + Pattanaik + Pattanaik + + + + Mai - - Fast export + + Ferwerda - - Opens the current export direcotory. This can be changed in the preferences! + + KimKautz - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + VanHateren - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - 这里你可以对HDR应用一次gamma更正.<br>gamma更正将在色调映射之前应用. + + Lischinski + - - Process - 处理 + + Operator + 运算符 - - Result Si&ze + + &Contrast Factor - - - Gamma applied before tonemapping - 色调映射之前应用Gamma + + Contrast Equalization + 对比均衡 - - Pre-&gamma + + &Detail Factor - - Restore pregamma's default value (1) - 恢复pregamma的默认值 (1) + + Saturat&ion Factor + - - Size of the resulting LDR image - 结果LDR图像大小 + + Lcd Office + 液晶显示办公室 - - Here you can choose the size of the resulting LDR image. - 这里你可以选择最后LDR图像的大小. + + Lcd + 液晶显示 - - Set Custom Output Size - 设置自定义输出文件大小 + + Lcd Bright + 液晶显示亮度 - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - 点击这个按钮,你可以给最终结果LDR图像插入一个 <i> 宽度 </i>值.<br>点击Enter(或者Return)后会自动计算高度值,并且新的大小会被添加到清单中. + + CRT + 荧光屏显示 - - Start tonemapping (CTRL+T) - 开始色调映射(CTRL+T) + + Co&lor Saturation + - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - 使用上面的当前参数 (pregamma和色调映射运算符)来运算LDR图像 + + Co&ntrast Enhancement + - - &Update preview + + Enable +Luminace Level + 启用 +亮度水平 + + + + Lum&inance Level - - Ctrl+T - Ctrl+T + + Predefined &Display + - - Update current LDR - 更新当前LDR + + A&lpha + - - Auto Levels + + Bet&a - - <html><head/><body><p>set auto levels threshold</p></body></html> + + Color Saturat&ion - - Tonemap - 色调映射 + + &Noise Reduction + - - Mantiuk '06 - Mantiuk '06 + + Version 2.3.0 + - - Mantiuk '08 - Mantiuk '08 + + &Inverse Alpha + - - Fattal - Fattal + + Rho + - - Ferradans + + B&ias - - Drago - Drago + + Spatial &Kernel Sigma + - - Durand - Durand + + Base Co&ntrast + - - Reinhard '02 - Reinhard '02 + + Range Kerne&l Sigma + - - Reinhard '05 - Reinhard '05 + + Ph&i + - - Ashikhmin - Ashikhmin + + &Key Value + - - Pattanaik - Pattanaik + + &Lower Scale + - - Mai + + Upper S&cale - - Operator - 运算符 + + Use Scales + 使用比例尺 - - Contrast Factor - 对比度因子 + + Ra&nge + - - Saturation Factor - 饱和度因子 + + &Light Adaptation + - - Detail Factor - 详情因子 + + Chromatic A&daptation + - - Contrast Equalization - 对比均衡 + + Br&ightness + - - Predefined Display - 预定义显示 + + Local Contrast Threshol&d + - - Lcd Office - 液晶显示办公室 + + Simple + 简单 - - Lcd - 液晶显示 + + Equation &Number + - - Lcd Bright - 液晶显示亮度 + + Eqn &2 + - - CRT - 荧光屏显示 + + Eqn &4 + - - - Color Saturation - 色彩饱和度 + + Local Tone Mapping + 本地色调映射 - - Contrast Enhancement - 对比度加强 + + Mu&ltiplier + - - Enable -Luminace Level - 启用 -亮度水平 + + Auto Cone/Rod + 自动锥/杆 - - Luminance Level - 亮度水平 + + Co&ne Level + - - Alpha - Alpha + + Ro&d Level + - - Beta - Beta + + This operator has no options + - - Noise Reduction - 降噪 + + &Multiplier + - - Version 2.3.0 + + A&daptation Luminance - - Inverse Alpha + + &C1 - - Rho + + C&2 - - Bias - 偏置 + + Pup&il Area + - - Spatial Kernel Sigma - 空间内核Sigma + + a&lpha mul + - - Range Kernel Sigma - 范围内核Sigma + + Restore operator's default values + 恢复运算符默认值 - - Base Contrast - 基本对比度 + + Restore + 复原 - - Key Value - 关键值 + + Previous applied settings + 前一个应用设置 - - Phi - Phi + + Previous + 前一个 - - Use Scales - 使用比例尺 + + Next applied settings + 下一个应用设置 - - Range - 范围 + + Next + 下一个 - - Lower Scale - 较低比例 + + Start tonemapping (CTRL+T) + 开始色调映射(CTRL+T) - - Upper Scale - 较高比例 + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + 使用上面的当前参数 (pregamma和色调映射运算符)来运算LDR图像 - - Brightness - 亮度 + + &Update preview + - - Chromatic Adaptation - 色彩适应 + + Ctrl+T + Ctrl+T - - Light Adaptation - 光适应 + + Update current LDR + 更新当前LDR - - Local Contrast Threshold - 本地对比度阀值 + + Auto Levels + - - Simple - 简单 + + <html><head/><body><p>set auto levels threshold</p></body></html> + - - Equation Number - 方程号 + + Processing + - - Eqn &2 + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + 这里你可以对HDR应用一次gamma更正.<br>gamma更正将在色调映射之前应用. + + + + Res&ult Size - - Eqn &4 + + Set Custom Output Size + 设置自定义输出文件大小 + + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + 点击这个按钮,你可以给最终结果LDR图像插入一个 <i> 宽度 </i>值.<br>点击Enter(或者Return)后会自动计算高度值,并且新的大小会被添加到清单中. + + + + + Gamma applied before tonemapping + 色调映射之前应用Gamma + + + + Pre-&gamma - - Multiplier - 乘数 + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + - - Local Tone Mapping - 本地色调映射 + + Pos&t-saturation + - - Auto Cone/Rod - 自动锥/杆 + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + - - Cone Level - 锥水平 + + Post-gamma + - - Rod Level - 杆水平 + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + - - This operator has no options + + ... + ... + + + + Settings - - Restore operator's default values - 恢复运算符默认值 + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + 这里你可以载入和保存一个色调映射设置文件. <br>你还可以应用当前已载入的设置文件的内容. - - Restore - 复原 + + Tone Mapping Settings + 色调映射文件设置 - - Previous applied settings - 前一个应用设置 + + Save current parameters to a text file + 保存当前参数到一个text文件 - - Previous - 前一个 + + Save current parameters (pregamma and TMO) to a text file. + 保存当前参数(pregamma和TMO)到一个text文件. - - Next applied settings - 下一个应用设置 + + Load an existing text file containing pregamma and TMO settings + 载入一个已存在的包含pregamma和TMO设置的text文件 - - Next - 下一个 + + Load an existing text file containing pregamma and TMO settings. + 载入一个已存在的包含pregamma和TMO设置的text文件. + + + + Load saved parameters + 加载已保存的参数 + + + + Save current parameters + 保存当前参数 + + + + Export + + + + + Fast export + - + + Opens the current export directory. This can be changed in the preferences! + + + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + + + Queue size: %1 - + TM Database Problem TM数据库问题 - + The database used for saving TM parameters cannot be opened. Error: %1 无法打开用以保存TM参数的数据库. 错误: %1 - + Load a tonemapping settings text file... 载入一个色调映射设置text文件... - - + + LuminanceHDR tonemapping settings text file (*.txt) LuminanceHDR色调映射设置text文件 (*.txt) - - - - + + + + Aborting... 终止... - + File is not readable (check existence, permissions,...) 文件不可读(检查是否存在,权限) - + Save tonemapping settings text file to... 保存色调映射设置text文件到... - + File is not writable (check permissions, path...) 文件不可写(检查权限,路径...) - + File is not readable (check permissions, path...) 文件不可读(检查权限,路径...) - + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. 错误:色调映射设置文件格式已改变. 这(旧)文件不能被用于这个版本的LuminanceHDR.创建一个新的. - + Custom LDR size 自定义LDR大小 - + Enter the width of the new size: 输入新大小的宽度: @@ -6261,19 +6508,19 @@ &开始 - - + + All Supported formats 所有支持的格式 - - + + Select the input images 选择输入图像 - + &Done &完成 @@ -6281,39 +6528,39 @@ UMessageBox - + %1 License document not found, you can find it online: %2here%3 %2 and %3 are html tags %1未找到证书文件,你可以在线找到: %2 这里 %3 - + %1 Changelog document not found, you can find it online: %2here%3 %2 and %3 are html tags - + Donation 捐款 - + Would you like to donate? 你想要捐款吗? - + Yes, I'd love to! 是的,我想! - + Stop Bothering Me 不要再提醒我 - + Remind me later 过后再提醒我 @@ -6321,18 +6568,18 @@ UpdateChecker - + A new release is ready for download! - - + + Do you want to open the webpage for download now? - + Click to download, or select Help->Update! diff -Nru luminance-hdr-2.5.1+dfsg/i18n/.tx/config luminance-hdr-2.6.0/i18n/.tx/config --- luminance-hdr-2.5.1+dfsg/i18n/.tx/config 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/i18n/.tx/config 2019-06-09 19:18:38.000000000 +0000 @@ -1,9 +1,10 @@ -[main] -host = https://www.transifex.com -minimum_perc = 1 - -[luminance-hdr.default] -type = QT -file_filter = lang_.ts -source_file = source.ts -source_lang = en +[main] +host = https://www.transifex.com +minimum_perc = 1 + +[luminance-hdr.default] +file_filter = lang_.ts +source_file = source.ts +source_lang = en +type = QT + diff -Nru luminance-hdr-2.5.1+dfsg/INSTALL luminance-hdr-2.6.0/INSTALL --- luminance-hdr-2.5.1+dfsg/INSTALL 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/INSTALL 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -This is the INSTALL file for Luminance HDR -------------------------------------------------------------------- -Copyright (C) 2006-2010, Giuseppe Rota - 2010-2017, Davide Anastasia - Franco Comida - Daniel Kaneider - -Webpage: http://qtpfsgui.sourceforge.net -GitHub: http://github.com/LuminanceHDR/LuminanceHDR -Sourceforge: http://sourceforge.net/projects/qtpfsgui - - - -Contents ---------- -1. Basic compilation of the sources -2. Internationalization -3. Dependencies -4. Enabling Unit Test compilation -5. Note for Packagers - -Last update: 2017.04.09 - -The build system is based on CMake (http://www.cmake.org/). -The build description is contained in the CMakeLists.txt file. - -1. Basic compilation of the sources -------------------------------------------------------------------- -To compile from source execute the following command from an EMPTY folder: - -> cmake - -to generate the Makefile. We strongly suggest to use an EMPTY folder OUTSIDE the source -directory. - -It is also possible to generate specific project files for well known IDEs (Visual Studio, -Xcode and so on). Please, refer to CMake's manual for all the available options. -CMake will also check whether all the dependecies are available or not and it will show -a message accordingly. - -Then execute the command: - -> make - -to compile the source code. - -Finally execute (as root) the command: - -> make install - -to install the luminance executable in /usr/local/bin (if not differently specified during -the configuration command). This last step will also install the icon, the desktop file, -the html documentation and the "qm" translation files used for internationalization. - -2. Internationalization -------------------------------------------------------------------- -Luminance HDR source are shipped with updated translation files for internationalization. -These file are stored inside the folder "i18n". Should you make a change inside the source code -(in particular on the UI), you need to update them. -Enabling updating of translations is performed issuing the following command: - -> cmake -DUPDATE_TRANSLATIONS=ON . - -if the current working directory (please, refer to 1. of this file) has already been -built, otherwise: - -> cmake -DUPDATE_TRANSLATIONS=ON - -This command will regenerate the Makefile for translation update. Then: - -> make - -will update every .ts file. - -To bring back the working folder to the original "building mode", you must use this command: - -> cmake -DUPDATE_TRANSLATIONS=OFF . - -and then - -> make - -to build correctly the whole source directory. - - -3. Dependencies -------------------------------------------------------------------- - -Luminance has 12 dependencies (eleven are mandatory, one is optional): - -1) Qt5 (http://qt-project.org) -Qt5 is the heart of the the graphical user interface (GUI). In the case of the Windows -version, Qt version must agree with the final building environment (Visual Studio or -*** deprecated *** MinGW) - -2) exiv2 (www.exiv2.org) -libexiv2 is a C/C++ library used to extract EXIF tags from LDR and RAW image files, and it is -required in order to extract the aperture, exposure-time and ISO tags from the input -images (and for other EXIF-related functionalities). - -3) fftw3 (www.fftw.org) -FFTW is required by the fast implementation of various tonemapping algorithm and anti-ghosting feature. -Luminance HDR requires the "float" version of fftw3 (usually called fftw3f or fftw3-single on MacPorts). - -4) libtiff (http://www.remotesensing.org/libtiff) -libtiff is required because of the tiff load/save feature. - -5) libjpeg (http://libjpeg.sourceforge.net/) -libjpeg is required because of the jpeg load/save feature. - -6) libpng (http://libpng.org/) -libpng is required because of the png save feature. - -7) OpenEXR (www.openexr.com) -OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & -Magic for use in computer imaging applications. The package is also known as *ilmbase* -in some GNU/Linux distributions. - -8) Gnu Gsl (http://www.gnu.org/software/gsl/) -Gnu GSL is required because Mantiuk08 TMO uses this library. - -9) LibRAW (http://www.libraw.org/) -Used to read the vast majority of RAW file on the market. - -10) LCMS2 (http://www.littlecms.com/) -Luminance HDR color management engine. - -11) Boost (http://www.boost.org/) -Boost provides free peer-reviewed portable C++ source libraries used inside Luminance HDR project. - -12) cfitsio (Optional) (http://heasarc.gsfc.nasa.gov/fitsio/) -CFITSIO is a library of C and Fortran subroutines for reading and writing data files in FITS -(Flexible Image Transport System) data format. -Luminance HDR can optionally support this file format commonly used by the astrophotographers community. -The build system will automatically detect the presence of the library in the system enabling proper support -for astronomical image processing. - - -Windows: -Currently, Luminance HDR can be compiled using Microsoft Visual Studio. It either works -using precompiled libraries (supplied at http://sourceforge.net/projects/qtpfsgui/files/DEPs/ -for different versions of Visual Studio) or building every dependency and Luminance itself using a script file -(build_files/platforms/msvc/getDependencies.cmd. -More information can be found inside build_files/platforms/msvc/README.txt). - -NOTE: depending on your compiler (MinGW GCC or MS Visual Studio), you must either download the -proper version of Qt or build it yourself accordingly. - -GNU/Linux: -On GNU/Linux you have to compile the code and you need the aforementioned packages -(and the *devel* or *dev* ones, depending on the distribution's naming convention). -CMake will guide you to correctly understand which dependency are missing and which are not. - -Mac OS X: -On Mac OS X, all the dependecies can be obtained using MacPorts, except LibRAW that -must be compiled straight from source, and Qt5 which must be downloaded from the official -website of the Qt project. - -4. Enabling Unit Test compilation -------------------------------------------------------------------- -In order to enable the compilation of our testing code pass -DENABLE_UNIT_TEST=ON option to cmake. -Google's framework 'gtest' must be installed in your system, the resulting test executables -will be placed under /test where is your building root directory. - -5. Note for Packagers -------------------------------------------------------------------- -Luminance's default installation prefix is "/usr/local". You can execute: - -> cmake -DCMAKE_INSTALL_PREFIX=/usr - -before running make in order to modify the default CMAKE_INSTALL_PREFIX. - -Icon luminance-hdr.png will be installed in ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps. -You may need to run update-desktop-database in case Luminance's entry doesn't show up -in the graphical menus. -Translation files will be installed inside ${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n -Help files will be installed inside ${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/help - -Running: - -> cmake -DCMAKE_BUILD_TYPE={Debug,Release,RelWithDebInfo} - -creates a Makefile that builds Luminance with different debug levels. It is strongly -suggest to use *RelWithDebInfo*: this option will leave inside the final executable all -the info necessary for a proper debug but at the same time will optimize the code as much -as possible for good performance. - -The Windows EXE is currently build using Microsoft Visual Studio. -In GNU/Linux you have to compile the code and you need the packages mentioned in Section 3 -(and the *devel* or *dev* ones, depending on the distribution's naming convention). -If you want to compile the sources in windows, you need to have a compiled version of all -the dependencies. -Building Luminance from sources on Mac OS X can be performed creating a Makefile or an Xcode -project using CMake. By default, CMake creates a Makefile on Mac OS X. - -OpenMP is only available if compiling with GCC 4.3 or newer or with Microsoft Visual Studio -(CMake will correctly find the right option for OpenMP accordingly to your compiler). - -Optimisation note: the default compiler flags include SSE2 and [Linux only] OpenMP. -SSE2 is only available on recent CPUs (Pentium 4, Pentium-M or newer). diff -Nru luminance-hdr-2.5.1+dfsg/INSTALL.md luminance-hdr-2.6.0/INSTALL.md --- luminance-hdr-2.5.1+dfsg/INSTALL.md 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/INSTALL.md 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,244 @@ +# INSTALLATION + +## Table of Contents + +1. [Introduction](#intro) +2. [Install Prebuilt Binaries](#bin) +3. [Dependencies](#dep) +4. [Compilation](#compilation) + 1. [Obtain the Source Code](#clone) + 2. [Configure CMake](#cmake) + 3. [Compile](#compile) + 4. [Update](#update) +5. [Platform Notes](#pnotes) + 1. [Windows](#pnote_win) + 2. [macOS](#pnote_macos) + +## Introduction + +This document covers the compilation and installation of Luminance HDR. + +- Copyrights + - (C) 2006-2010 Giuseppe Rota + + - (C) 2010-2017 Davide Anastasia + + - (C) Franco Comida + + - (C) Daniel Kaneider + + - (C) 2019 Maciej Dworak + +- Project homepage: + http://qtpfsgui.sourceforge.net/ +- Source code and issue tracker: + https://github.com/LuminanceHDR/LuminanceHDR +- Forum: + https://discuss.pixls.us/c/software/luminancehdr + +## Install Prebuilt Binaries + +Luminance HDR is readily available on all major platforms. + +- Get a [Windows installer](https://sourceforge.net/projects/qtpfsgui/files/luminance/) +- Linux + - Check your package manager. + - Get an [AppImage](https://github.com/aferrero2707/lhdr-appimage/releases) + - Get a [FlatPak](https://flathub.org/apps/details/net.sourceforge.qtpfsgui.LuminanceHDR) +- Get a [macOS DMG](https://sourceforge.net/projects/qtpfsgui/files/luminance/) + +The rest of this document concerns compiling Luminance HDR yourself. + +## Dependencies + +To compile Luminance HDR your system will need a set of tools and code libraries called "dependencies". The following is a list of dependencies needed to compile the latest version of Luminance HDR: + +- [Qt5](https://www.qt.io/), the widget toolkit used by the graphical user interface (GUI). +- [Exiv2](https://www.exiv2.org/), used to read and write image metadata (Exif, IPTC, XMP). +- [Little CMS](http://www.littlecms.com/), LCMS2 is used for color management. +- [libjpeg-turbo](https://libjpeg-turbo.org/) (or libjpeg), used to read and write JPEG files. +- [LibTIFF](http://www.libtiff.org/), used to read and write TIFF files. +- [libpng](http://www.libpng.org/pub/png/libpng.html), used to read and write PNG files. +- [LibRaw](https://www.libraw.org/), used to read raw files. +- [OpenEXR](http://www.openexr.com/), used to read and write high dynamic range EXR files. Some distributions refer to the package as `ilmbase`. +- [CFITSIO](https://heasarc.gsfc.nasa.gov/fitsio/), an optional library for reading and writing FITS files, commonly used by the astrophotographer community. +- [FFTW](www.fftw.org), used for computing discrete Fourier transforms. Luminance HDR requires the single-precision "float" version of FFTW3, usually called `fftw3f` or `fftw-3-single` on MacPorts. +- [Boost](https://www.boost.org/), a set of C++ support libraries. +- [GNU Scientific Library](https://www.gnu.org/software/gsl/), GSL is used by the Mantiuk08 tone mapping operator. +- [Eigen3](http://eigen.tuxfamily.org/), a C++ template library required by by the Lischinski tone mapping operator. + +## Compilation + +Compilation involves obtaining the source code, configuring the build process using CMake, and finally performing the actual compilation. + +In order to keep your file system clean and to isolate self-compiled programs from those installed using your system's package manager, we will be cloning the source code into `~/programs/code-lhdr`, performing an out-of-source build in `~/programs/code-lhdr/build` and installing the compiled program into `~/programs/lhdr`. To this end: + +```bash +mkdir ~/programs +cd ~/programs +``` + + +### 1. Obtain the Source Code + +First, you need to clone Luminance HDR's source code repository. Bring up your console and run this: + +```bash +git clone https://github.com/LuminanceHDR/LuminanceHDR.git code-lhdr +cd code-lhdr +``` + +### 2. Configure CMake + +In order to keep your source code folder clean, the build will be created in a folder called `build`. If you just cloned the source code, you will need to create this folder: + +```bash +mkdir build +cd build +``` + +CMake allows you to configure the build process. The `-D` option allows you to customize settings for the project. Multiple settings can be specified - each must be prefixed with `-D`. Multiple options must be separated by whitespace. Setting values must be enclosed in parentheses. The last argument must point to the source code (as you are in the `build` sub-folder, you can point to the source code using double dots `..`). Refer to the example at the end of this section. + +The most significant options follow: +- `CMAKE_BUILD_TYPE` + Values:`Debug`, `Release`, `RelWithDebInfo` and `MinSizeRel`. + This controls whether the build will favor faster execution times, more verbose debugging output, or a smaller executable. The `Debug` and `RelWithDebInfo` builds will let you get a useful stack-backtrace if Luminance HDR crashes while running through GDB - you can then submit the backtrace to us so that we can find the problem and fix it. The `Debug` build is the slowest but generates the most detailed information. The `RelWithDebInfo` build is as fast as a `Release` build and generates often sufficient information, though not as detailed as a `Debug` build. The `Release` build provides very little useful information when it crashes, but does contain many speed optimizations resulting in a program that works several times faster than the `Debug` build would. + For normal use, make a `Release` build. If you find a reproducible bug, then make a `Debug` build and send us a stack-backtrace (or fix it yourself and send us the patch). +- `CMAKE_INSTALL_PREFIX` + Points to a folder into which the compiled program will be installed. Defaults to `/usr/local` in Linux/macOS and `c:/Program Files/Luminance HDR` in Windows. +- `UPDATE_TRANSLATIONS` + Values:`OFF` (default), `ON`. + Luminance HDR ships with translations files for localization. These are stored inside the `i18n` folder. Should you wish to update the translation `.ts` files then set this option to `ON`, compile, then set it back to `OFF`. +- `ENABLE_UNIT_TEST` + Values:`OFF` (default), `ON`. + Enables unit testing. Requires Google's gtest framework. The resulting test executables are placed in the `test` sub-folder. + +Your final CMake command (split into multiple lines for readability) should look something like this: + +```bash +cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX="$HOME/programs/lhdr" \ + .. +``` + +### 3. Compile + +Find out how many processing units are available: + +```bash +nproc +``` + +On a typical modern machine with simultaneous multithreading, the number of processing units would be twice the number of actual physical cores. Pass this number as the value for the `--jobs` parameter below. This influences only the compilation speed, it has no influence over how fast the compiled build runs. As an example, a typical dual-core CPU would return "4" processing units. + +To start compiling, run: + +```bash +make install --jobs 4 +``` + +Compilation will take a few minutes. When completed successfully, you will see that it had installed the built files. + +To run your self-compiled build of Luminance HDR, assuming you used the settings as laid out in this document, type: + +```bash +~/programs/lhdr/bin/luminance-hdr +``` + +### 4. Update + +Every time you want to update Luminance HDR to the latest code available, just run the following: + +```bash +cd ~/programs/code-lhdr +git pull +cd build +``` + +Then repeat the compilation step above. + +You can safely delete the source code folder `~/programs/code-lhdr` if you so wish. The compiled program in `~/programs/lhdr` will still work, but then you will have to redo all the steps if you want to update. Rather, leave the repository intact so that you can just update in a week or a month's time without redoing all the steps. + +## Platform Notes + +### Windows + +Currently, Luminance HDR can be compiled using Microsoft Visual Studio. Either use the precompiled libraries available at https://sourceforge.net/projects/qtpfsgui/files/DEPs/ , or self-compile the dependencies using the provided script, as described in `/build_files/platforms/msvc/README.txt` + +It is also possible to build Luminance HDR using MSYS2/MinGW, see `build_files/platforms/msys2/README.txt` + +### macOS + +On macOS, all the dependencies can be obtained using MacPorts, except for LibRaw which must be compiled from source, and Qt5 which must be downloaded from the official Qt5 website. + +If you install Qt/5.13.0 into `~/Qt/5.13.0`, generate the project with: + +```bash +export QT=~/Qt/5.13.0/clang_64 +cd ~/programs/code-lhdr +mkdir build +cd build +cmake -DCMAKE_PREFIX_PATH=$(echo $QT/lib/cmake/* | sed -Ee 's$ $;$g') .. +make +``` + +As AppleClang requires preprocessing to detect OpenMP, the CMake command to enable AppleClang to use the libomp implementation would be: + +```bash +cmake .. \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.12" \ + -DCMAKE_PREFIX_PATH="$(echo $QT/lib/cmake/* | sed -Ee 's$ $;$g')" -G "Unix Makefiles" \ + -DCMAKE_C_COMPILER="clang" \ + -DCMAKE_CXX_COMPILER="clang++" \ + -DCMAKE_BUILD_TYPE="Release" \ + -DOpenMP_C_FLAGS=-fopenmp="lomp" \ + -DOpenMP_CXX_FLAGS=-fopenmp="lomp" \ + -DOpenMP_C_LIB_NAMES="libomp" \ + -DOpenMP_CXX_LIB_NAMES="libomp" \ + -DOpenMP_libomp_LIBRARY="/opt/local/lib/libomp.dylib" \ + -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /opt/local/lib/libomp.dylib -I/opt/local/include" \ + -DOpenMP_CXX_LIB_NAMES="libiomp5" \ + -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /opt/local/lib/libomp.dylib -I/opt/local/include" +``` + +Troubleshooting: +- If you crash on start up with a message about `libz.1.2.8.dylib`, modify the executable as follows: + ```bash + install_name_tool -change @loader_path/libz.1.2.8.dylib @loader_path/libz.1.dylib "Luminance HDR 2.6.0.app/Contents/MacOS/Luminance HDR 2.6.0" + ``` +- If you built libboost from source, you may encounter errors from macdeployqt about missing libraries. Copy the boost libraries to `/usr/lib`: + ```bash + sudo cp /usr/local/*boost*.dylib /usr/lib + ``` +- Copy Qt frameworks and dynamic libraries into the bundle: + ```bash + $QT/bin/macdeployqt Luminance*.app/ -executable=Luminance*.app/Contents/MacOS/luminance-hdr-cli -no-strip + ``` + This may produce warnings (which you can ignore) such as: + ``` + WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant. + WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant. + ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib" + ERROR: no file at "/usr/local/lib/libpq.5.dylib" + ``` + +If you wish to make a DMG: + +```bash +hdiutil create -ov -fs HFS+ -srcfolder "Luminance HDR 2.6.0.app" "Luminance HDR 2.6.0.dmg" +``` + +If you wish to build with an earlier version of the MacOSX Platform SDK (e.g. 10.10), you can obtain legacy SDKs from https://github.com/phracker/MacOSX-SDKs/releases +Then use the following: + +```bash +export QT=~/Qt/5.9.8/clang_64 +export MACOSX_DEPLOYMENT_TARGET="10.10" +export CMAKE_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk" +cmake .. \ + -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \ + -DCMAKE_PREFIX_PATH=$(echo $QT/lib/cmake/* | sed -Ee 's$ $;$g') +make +``` diff -Nru luminance-hdr-2.5.1+dfsg/luminance-hdr-2.5.0-qtwebkit.patch luminance-hdr-2.6.0/luminance-hdr-2.5.0-qtwebkit.patch --- luminance-hdr-2.5.1+dfsg/luminance-hdr-2.5.0-qtwebkit.patch 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/luminance-hdr-2.5.0-qtwebkit.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ -diff -rupN luminance-hdr-2.5.0/CMakeLists.txt luminance-hdr-2.5.0-new/CMakeLists.txt ---- luminance-hdr-2.5.0/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/CMakeLists.txt 2017-04-09 12:45:59.162231357 +0200 -@@ -34,8 +34,8 @@ find_package(Qt5Core REQUIRED) - find_package(Qt5Concurrent REQUIRED) - find_package(Qt5Widgets REQUIRED) - find_package(Qt5Gui REQUIRED) --find_package(Qt5WebEngineCore REQUIRED) --find_package(Qt5WebEngineWidgets REQUIRED) -+find_package(Qt5WebKit REQUIRED) -+find_package(Qt5WebKitWidgets REQUIRED) - find_package(Qt5Xml REQUIRED) - find_package(Qt5Sql REQUIRED) - find_package(Qt5Svg REQUIRED) -@@ -53,7 +53,7 @@ ENDIF(WIN32) - - set(LIBS ${LIBS} - ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} -- ${QT_QTWEBENGINE_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) -+ ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) - - FIND_PACKAGE(Git) - IF(GIT_FOUND) -I file binari luminance-hdr-2.5.0/.git/index e luminance-hdr-2.5.0-new/.git/index sono diversi -diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/CMakeLists.txt luminance-hdr-2.5.0-new/src/HelpBrowser/CMakeLists.txt ---- luminance-hdr-2.5.0/src/HelpBrowser/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/HelpBrowser/CMakeLists.txt 2017-04-09 12:45:59.181231204 +0200 -@@ -28,7 +28,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) - QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) - - ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX}) --qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebEngineCore WebEngineWidgets PrintSupport) -+qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets PrintSupport) - - SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE) - SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE) -diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.cpp luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.cpp ---- luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.cpp 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.cpp 2017-04-09 12:57:33.073960371 +0200 -@@ -166,8 +166,6 @@ HelpBrowser::HelpBrowser(QWidget* parent - HelpBrowser::HelpBrowser( QWidget* parent, const QString& /*caption*/, const QString& guiLanguage, const QString& jumpToSection, const QString& jumpToFile): - QMainWindow( parent ), - zoomFactor(1.0), -- //m_textBrowser(new QTextDocument), -- m_textBrowser(new QTextBrowser), - m_Ui(new Ui::HelpBrowser) - { - m_Ui->setupUi(this); -@@ -347,13 +345,6 @@ void HelpBrowser::languageChange() - - void HelpBrowser::print() - { -- /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser -- m_Ui->htmlPage->page()->toHtml([this](const QString &result){ -- this->m_textBrowser->setHtml(result); -- this->printAvailable(); -- }); -- */ -- m_textBrowser->setSource(m_Ui->htmlPage->page()->url()); - this->printAvailable(); - } - -@@ -365,19 +356,12 @@ void HelpBrowser::printAvailable() - if (dialog.exec()) - { - -- m_textBrowser->print(&printer); -+ m_Ui->htmlPage->print(&printer); - } - } - - void HelpBrowser::printPreview() - { -- /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser -- m_Ui->htmlPage->page()->toHtml([this](const QString &result){ -- this->m_textBrowser->setHtml(result); -- this->printPreviewAvailable(); -- }); -- */ -- m_textBrowser->setSource(m_Ui->htmlPage->page()->url()); - this->printPreviewAvailable(); - } - -@@ -392,7 +376,7 @@ void HelpBrowser::printPreviewAvailable( - - void HelpBrowser::paintRequested(QPrinter *printer) - { -- m_textBrowser->print(printer); -+ m_Ui->htmlPage->print(printer); - } - - void HelpBrowser::searchingButton_clicked() -@@ -789,6 +773,6 @@ void HelpBrowser::loadFinished(bool) { - statusBar()->showMessage(""); - } - --void HelpBrowser::linkHovered (const QString &url) { -+void HelpBrowser::linkHovered (const QString &url, const QString &, const QString &) { - statusBar()->showMessage(url); - } -diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.h luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.h ---- luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.h 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.h 2017-04-09 12:55:41.611767473 +0200 -@@ -64,8 +64,6 @@ - #include - #include - #include --//#include --#include - - class ScHelpTreeModel; - class QPrinter; -@@ -132,10 +130,6 @@ protected: - QMap quickHelpIndex; - QMap > bookmarkIndex; - -- // I need to keep this around because page()->toHtml( ) is asynchronous -- //QSharedPointer m_textDocument; -- QSharedPointer m_textBrowser; -- - protected slots: - virtual void languageChange(); - void histChosen(QAction* i); -@@ -215,7 +209,7 @@ protected slots: - - /*! \brief Restore Default Cursor */ - void loadFinished(bool); -- void linkHovered (const QString &); -+ void linkHovered (const QString &, const QString &, const QString &); - signals: - void closed(); - -diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.cpp luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.cpp ---- luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.cpp 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.cpp 2017-04-09 12:45:59.183231188 +0200 -@@ -57,7 +57,7 @@ for which a new license (GPL+exception) - #include "sctextbrowser.h" - - ScTextBrowser::ScTextBrowser( QWidget * parent ) -- : QWebEngineView(parent) -+ : QWebView(parent) - { - } - -diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.h luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.h ---- luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.h 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.h 2017-04-09 12:45:59.184231179 +0200 -@@ -45,9 +45,9 @@ for which a new license (GPL+exception) - #define SCTEXTBROWSER_H - - #include --#include -+#include - --class ScTextBrowser : public QWebEngineView -+class ScTextBrowser : public QWebView - { - Q_OBJECT - QUrl m_home; -diff -rupN luminance-hdr-2.5.0/src/UI/CMakeLists.txt luminance-hdr-2.5.0-new/src/UI/CMakeLists.txt ---- luminance-hdr-2.5.0/src/UI/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200 -+++ luminance-hdr-2.5.0-new/src/UI/CMakeLists.txt 2017-04-09 12:45:59.184231179 +0200 -@@ -41,7 +41,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) - QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) - - ADD_LIBRARY(ui ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) --qt5_use_modules(ui Core Concurrent Gui Widgets WebEngineWidgets) -+qt5_use_modules(ui Core Concurrent Gui Widgets WebKitWidgets) - - SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) - SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} ui PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/luminance-hdr.appdata.xml luminance-hdr-2.6.0/luminance-hdr.appdata.xml --- luminance-hdr-2.5.1+dfsg/luminance-hdr.appdata.xml 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/luminance-hdr.appdata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - luminance-hdr.desktop - CC0-1.0 - GPL-2.0+ - Create HDR images - Crea immagini HDR - -

Luminance HDR is an application for taking a set of pictures of the same scene with different exposure settings, and creating a high dynamic range (HDR) image. It supports a range on input images, including JPEG, TIFF and RAW. It can also rotate and crop, and tonemap HDR images.

-

Luminance HDR è un'applicazione per creare immagini ad elevato intervallo dinamico (HDR) a partire da un insieme di immagini di una stessa scena catturate con differente esposizione. Supporta svariati formati di input quali JPEG, TIFF e RAW. Può inoltre ruotare, ritagliare, scalare le immagini HDR e convertirle in formato a basso range dinamico (LDR) tramite tonemapping.

-
- http://qtpfsgui.sourceforge.net/ - - http://qtpfsgui.sourceforge.net/screenshots/MainWindow-2.jpg - - - luminance-hdr - - - luminance-hdr-cli - -
diff -Nru luminance-hdr-2.5.1+dfsg/luminance-hdr.desktop luminance-hdr-2.6.0/luminance-hdr.desktop --- luminance-hdr-2.5.1+dfsg/luminance-hdr.desktop 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/luminance-hdr.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -[Desktop Entry] -Name=Luminance HDR -GenericName=HDR imaging tool -GenericName[de]=Workflow für HDR-Bilder -GenericName[it]=Workflow per immagini HDR -GenericName[ru]=Работа с HDR-фотографией -GenericName[tr]=HDR Resim Düzenleyici -Categories=Graphics;RasterGraphics;2DGraphics;Photography;Viewer;Qt; -Comment=Create and tonemap HDR images -Comment[de]=Luminance HDR ist eine grafische Benutzeroberfläche zur Erzeugung von HDR-Bildern und deren Dynamikkompression -Comment[en_US]=Luminance is a graphical user interface used to create and tonemap HDR images -Comment[hu_HU]=Ez a program nagy megvilágítástartományú (HDR) képek előállítására és megtekintésére szolgál. -Comment[it]=Luminance e' una interfaccia grafica usata per creare ed eseguire il tonemapping di immagini HDR -Comment[ru]=Cоздание HDR-снимков и отображение тонов в LDR -Comment[tr]=HDR resim dosyaları oluşturun ve ton haritalamalarını düzenleyin -Exec=luminance-hdr %F -Icon=luminance-hdr -MimeType=image/x-dcraw;image/tiff;image/jpeg;image/png;image/x-exr;image/x-hdr;image/x-pfs; -StartupNotify=true -StartupWMClass=luminance-hdr -Terminal=false -Type=Application -X-DCOP-ServiceType= -X-KDE-SubstituteUID=false -X-KDE-Username= -#X-StandardInstall=false - diff -Nru luminance-hdr-2.5.1+dfsg/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml luminance-hdr-2.6.0/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml --- luminance-hdr-2.5.1+dfsg/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/net.sourceforge.qtpfsgui.LuminanceHDR.appdata.xml 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,59 @@ + + + Luminance HDR + >Luminance HDR + net.sourceforge.qtpfsgui.LuminanceHDR + CC0-1.0 + GPL-2.0+ + Create HDR images + Crea immagini HDR + + +

Luminance HDR is an application for taking a set of pictures of the same scene with different exposure settings and creating a high dynamic range (HDR) image. It supports a range on input image formats, including JPEG, TIFF and RAW. It provides eleven tone mapping operators for converting the HDR back to a low dynamic range image (LDR). It can also rotate, crop, resize HDR images and apply projective transformations. HDR images can be created and tone mapped in batch and a tool is provided for copying EXIF data from/to a set of images.

+

Luminance HDR è un'applicazione per creare immagini ad elevato intervallo dinamico (HDR) a partire da un insieme di immagini di una stessa scena catturate con differente esposizione. Supporta svariati formati di input quali JPEG, TIFF e RAW. Può inoltre ruotare, ritagliare, scalare le immagini HDR e convertirle in formato a basso range dinamico (LDR) tramite undici differenti operatori di tonemapping. Più immagini HDR possono essere create in modalità batch ed è possibile effettuare il tonemapping di un insieme di HDR sempre in modalità batch.

+
+ + net.sourceforge.qtpfsgui.LuminanceHDR.desktop + + + + http://qtpfsgui.sourceforge.net/screenshots/MainWindow.png + LuminanceHDR Main Window + + + http://qtpfsgui.sourceforge.net/screenshots/Tonemapped-image.png + Example of tonemapping of HDR + + + http://qtpfsgui.sourceforge.net/screenshots/HDR-Wizard-1st-page.png + HDR Wizard + + + http://qtpfsgui.sourceforge.net/screenshots/Batch-TM.png + Batch Tonemapping + + + + + luminance-hdr + luminance-hdr-cli + + + Luminance HDR Development Team + fcomida_AT_users.sourceforge.net + http://qtpfsgui.sourceforge.net/ + https://luminancehdr.readthedocs.io/en/latest/ + https://www.transifex.com/luminance-hdr/luminance-hdr/ + https://github.com/LuminanceHDR/LuminanceHDR/issues + https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10037712 + + + + + + Graphics + + + + +
diff -Nru luminance-hdr-2.5.1+dfsg/net.sourceforge.qtpfsgui.LuminanceHDR.desktop luminance-hdr-2.6.0/net.sourceforge.qtpfsgui.LuminanceHDR.desktop --- luminance-hdr-2.5.1+dfsg/net.sourceforge.qtpfsgui.LuminanceHDR.desktop 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/net.sourceforge.qtpfsgui.LuminanceHDR.desktop 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,27 @@ +[Desktop Entry] +Name=Luminance HDR +GenericName=HDR imaging tool +GenericName[de]=Workflow für HDR-Bilder +GenericName[it]=Workflow per immagini HDR +GenericName[ru]=Работа с HDR-фотографией +GenericName[tr]=HDR Resim Düzenleyici +Categories=Graphics;RasterGraphics;2DGraphics;Photography;Viewer;Qt; +Comment=Create and tonemap HDR images +Comment[de]=Luminance HDR ist eine grafische Benutzeroberfläche zur Erzeugung von HDR-Bildern und deren Dynamikkompression +Comment[en_US]=Luminance is a graphical user interface used to create and tonemap HDR images +Comment[hu_HU]=Ez a program nagy megvilágítástartományú (HDR) képek előállítására és megtekintésére szolgál. +Comment[it]=Luminance e' una interfaccia grafica usata per creare ed eseguire il tonemapping di immagini HDR +Comment[ru]=Cоздание HDR-снимков и отображение тонов в LDR +Comment[tr]=HDR resim dosyaları oluşturun ve ton haritalamalarını düzenleyin +Exec=luminance-hdr %F +Icon=luminance-hdr +MimeType=image/x-dcraw;image/tiff;image/jpeg;image/png;image/x-exr;image/x-hdr;image/x-pfs; +StartupNotify=true +StartupWMClass=luminance-hdr +Terminal=false +Type=Application +X-DCOP-ServiceType= +X-KDE-SubstituteUID=false +X-KDE-Username= +#X-StandardInstall=false + diff -Nru luminance-hdr-2.5.1+dfsg/README.i18n luminance-hdr-2.6.0/README.i18n --- luminance-hdr-2.5.1+dfsg/README.i18n 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/README.i18n 2019-06-09 19:18:38.000000000 +0000 @@ -1,41 +1,41 @@ -This is the README file for contributing translations (i18n) to Luminance HDR -------------------------------------------------------------------- - -Contents ---------- -1. Introduction -2. Operations - - -1. Introduction ---------------------------------------------------------------------- -Translations can be managed either using the classical Qt approach or -the Transifex (www.transifex.com) online platform. - -The Qt approach is implemented using a CMake option (UPDATE_TRANSLATIONS). If this -is set to true, then the translations in the i18n directory are updated (using Qt's lupdate). - -In the following section the operations using the online platform are described. - - -2. Operations ---------------------------------------------------------------------- -First, download the Transifex Client, available for Windows, Linux, Mac. - -Open a command shell and navigate (CD) into the i18n directory of Luminance HDR. - -The first time you use the client you need to initialize it with your credentials. -Therefore type: -> tx init - -If after an lupdate you want to update the strings online, you do -> tx push -s -t - -In order to download the translated strings do -> tx pull -a - -More options for each operation is available in the help -> tx help -or -> tx help push - +This is the README file for contributing translations (i18n) to Luminance HDR +------------------------------------------------------------------- + +Contents +--------- +1. Introduction +2. Operations + + +1. Introduction +--------------------------------------------------------------------- +Translations can be managed either using the classical Qt approach or +the Transifex (www.transifex.com) online platform. + +The Qt approach is implemented using a CMake option (UPDATE_TRANSLATIONS). If this +is set to true, then the translations in the i18n directory are updated (using Qt's lupdate). + +In the following section the operations using the online platform are described. + + +2. Operations +--------------------------------------------------------------------- +First, download the Transifex Client, available for Windows, Linux, Mac. + +Open a command shell and navigate (CD) into the i18n directory of Luminance HDR. + +The first time you use the client you need to initialize it with your credentials. +Therefore type: +> tx init + +If after an lupdate you want to update the strings online, you do +> tx push -s -t + +In order to download the translated strings do +> tx pull -a + +More options for each operation is available in the help +> tx help +or +> tx help push + diff -Nru luminance-hdr-2.5.1+dfsg/README.md luminance-hdr-2.6.0/README.md --- luminance-hdr-2.5.1+dfsg/README.md 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/README.md 2019-06-09 19:18:38.000000000 +0000 @@ -1,6 +1,7 @@ # Luminance HDR =============== -Copyright (C) 2010-2017 + +Copyright (C) 2010-2019 - Davide Anastasia - Franco Comida @@ -10,9 +11,9 @@ Copyright (C) 2006-2010 - Giuseppe Rota -- Webpage: http://qtpfsgui.sourceforge.net -- Sourceforge: http://sourceforge.net/projects/qtpfsgui -- Github: https://github.com/LuminanceHDR/LuminanceHDR +- Webpage: http://qtpfsgui.sourceforge.net +- Sourceforge: http://sourceforge.net/projects/qtpfsgui +- Github: https://github.com/LuminanceHDR/LuminanceHDR What it is ---------- diff -Nru luminance-hdr-2.5.1+dfsg/src/Alignment/Align.cpp luminance-hdr-2.6.0/src/Alignment/Align.cpp --- luminance-hdr-2.5.1+dfsg/src/Alignment/Align.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Alignment/Align.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,11 +21,11 @@ * @author Franco Comida */ +#include #include #include -#include -#include #include +#include #include @@ -33,51 +33,66 @@ #include "Common/CommonFunctions.h" #include "Exif/ExifOperations.h" +Align::Align(HdrCreationItemContainer &data, bool fromCommadLine, + int savingMode, float minLum, float maxLum) + : m_data(data), + m_fromCommandLine(fromCommadLine), + m_savingMode(savingMode), + m_minLum(minLum), + m_maxLum(maxLum), + m_ais(0) {} -Align::Align(HdrCreationItemContainer& data, bool fromCommadLine, int savingMode, float minLum, float maxLum) : - m_data(data), - m_fromCommandLine(fromCommadLine), - m_savingMode(savingMode), - m_minLum(minLum), - m_maxLum(maxLum), - m_ais(0) -{ -} - -Align::~Align() -{} +Align::~Align() {} -void Align::align_with_ais(bool ais_crop_flag) -{ +void Align::align_with_ais(bool ais_crop_flag) { m_ais.reset(new QProcess(this)); - if (m_ais == NULL) exit(1); // TODO: exit gracefully + if (m_ais == NULL) exit(1); // TODO: exit gracefully if (!m_fromCommandLine) { m_ais->setWorkingDirectory(m_luminance_options.getTempDir()); } -#ifndef WIN32 +#ifndef Q_OS_WIN QStringList env = QProcess::systemEnvironment(); - QString separator(":"); - env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1"+separator+QCoreApplication::applicationDirPath()); + QString separator(QStringLiteral(":")); + env.replaceInStrings( + QRegExp("^PATH=(.*)", Qt::CaseInsensitive), + "PATH=\\1" + separator + QCoreApplication::applicationDirPath()); m_ais->setEnvironment(env); #endif - connect(m_ais.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(ais_finished(int,QProcess::ExitStatus))); - connect(m_ais.data(), SIGNAL(error(QProcess::ProcessError)), this, SLOT(ais_failed_slot(QProcess::ProcessError))); +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + connect(m_ais.data(), + static_cast( + &QProcess::finished), + this, &Align::ais_finished); + connect(m_ais.data(), &QProcess::errorOccurred, this, + &Align::ais_failed_slot); + connect(m_ais.data(), &QIODevice::readyRead, this, &Align::readData); +#else + connect(m_ais.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, + SLOT(ais_finished(int,QProcess::ExitStatus))); + connect(m_ais.data(), SIGNAL(error(QProcess::ProcessError)), this, + SLOT(ais_failed_slot(QProcess::ProcessError))); connect(m_ais.data(), SIGNAL(readyRead()), this, SLOT(readData())); +#endif - QStringList ais_parameters = m_luminance_options.getAlignImageStackOptions(); + QStringList ais_parameters = + m_luminance_options.getAlignImageStackOptions(); - if (ais_crop_flag) { ais_parameters << "-C"; } + if (ais_crop_flag) { + ais_parameters << QStringLiteral("-C"); + } QFutureWatcher futureWatcher; - // Start the computation. -#ifdef WIN32 - const bool deflateCompression = false; // AIS is misconfigured (see hugin bug #1265480) +// Start the computation. +#ifdef Q_OS_WIN + const bool deflateCompression = + false; // AIS is misconfigured (see hugin bug #1265480) #else const bool deflateCompression = true; #endif SaveFile saveFile(m_savingMode, m_minLum, m_maxLum, deflateCompression); - futureWatcher.setFuture( QtConcurrent::map(m_data.begin(), m_data.end(), saveFile) ); + futureWatcher.setFuture( + QtConcurrent::map(m_data.begin(), m_data.end(), saveFile)); futureWatcher.waitForFinished(); if (futureWatcher.isCanceled()) return; @@ -85,115 +100,115 @@ QString uuidStr = QUuid::createUuid().toString(); QString tempDir(m_luminance_options.getTempDir()); m_ais->setWorkingDirectory(tempDir); - //ais_parameters << "-a" << tempDir + "/" + uuidStr; - ais_parameters << "-a" << uuidStr; + // ais_parameters << "-a" << tempDir + "/" + uuidStr; + ais_parameters << QStringLiteral("-a") << uuidStr; int i = 0; - for(auto &it : m_data) { - if (it.convertedFilename().isEmpty()) - continue; + for (auto &it : m_data) { + if (it.convertedFilename().isEmpty()) continue; QFileInfo qfi(it.convertedFilename()); QString filename = qfi.completeBaseName() + ".tif"; - //QString tempDir(m_luminance_options.getTempDir()); - //QString completeFilename = tempDir + "/" + filename; - //QString completeFilename = filename; - //ais_parameters << completeFilename; + // QString tempDir(m_luminance_options.getTempDir()); + // QString completeFilename = tempDir + "/" + filename; + // QString completeFilename = filename; + // ais_parameters << completeFilename; ais_parameters << filename; - QString alignedFilename = tempDir + "/" + uuidStr + QString("%1").arg(i++,4,10,QChar('0'))+".tif"; + QString alignedFilename = + tempDir + "/" + uuidStr + + QStringLiteral("%1").arg(i++, 4, 10, QChar('0')) + ".tif"; it.setAlignedFilename(alignedFilename); } qDebug() << "ais_parameters " << ais_parameters; -#ifdef Q_OS_MAC - qDebug() << QCoreApplication::applicationDirPath()+"/align_image_stack"; - m_ais->start(QCoreApplication::applicationDirPath()+"/align_image_stack", ais_parameters ); +#ifdef Q_OS_MACOS + qDebug() << QCoreApplication::applicationDirPath() + "/align_image_stack"; + m_ais->start(QCoreApplication::applicationDirPath() + "/align_image_stack", + ais_parameters); #elif defined Q_OS_WIN QFileInfo huginPath("hugin/align_image_stack.exe"); - m_ais->start(huginPath.canonicalFilePath(), ais_parameters ); + m_ais->start(huginPath.canonicalFilePath(), ais_parameters); #else - m_ais->start("align_image_stack", ais_parameters ); + m_ais->start(QStringLiteral("align_image_stack"), ais_parameters); #endif qDebug() << "ais started"; } -void Align::ais_finished(int exitcode, QProcess::ExitStatus exitstatus) -{ - if (exitstatus != QProcess::NormalExit) - { +void Align::ais_finished(int exitcode, QProcess::ExitStatus exitstatus) { + if (exitstatus != QProcess::NormalExit) { qDebug() << "ais failed"; - //emit ais_failed(QProcess::Crashed); + // emit ais_failed(QProcess::Crashed); removeTempFiles(); return; } - if (exitcode == 0) - { + if (exitcode == 0) { // TODO: try-catch // DAVIDE _ HDR CREATION - for(const auto it : m_data) { + for (const auto &it : m_data) { QString inputFilename = it.alignedFilename(); if (!inputFilename.isEmpty()) { - ExifOperations::copyExifData(it.filename().toStdString(), inputFilename.toStdString(), true, "", false, false); + ExifOperations::copyExifData(it.filename().toStdString(), + inputFilename.toStdString(), true, + "", false, false); } } // parallel load of the data... // Start the computation. - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(alignedFilesLoaded()), Qt::DirectConnection); - m_futureWatcher.setFuture( QtConcurrent::map(m_data.begin(), m_data.end(), LoadFile()) ); - } - else - { + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &Align::alignedFilesLoaded, Qt::DirectConnection); + m_futureWatcher.setFuture( + QtConcurrent::map(m_data.begin(), m_data.end(), LoadFile())); + } else { qDebug() << "align_image_stack exited with exit code " << exitcode; removeTempFiles(); emit finishedAligning(exitcode); } } -void Align::alignedFilesLoaded() -{ - disconnect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(alignedFilesLoaded())); - for(const auto it : m_data) { - if (it.filename().isEmpty()) - continue; +void Align::alignedFilesLoaded() { + disconnect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &Align::alignedFilesLoaded); + for (const auto &it : m_data) { + if (it.filename().isEmpty()) continue; QFile::remove(QFile::encodeName(it.convertedFilename()).constData()); QFile::remove(QFile::encodeName(it.alignedFilename()).constData()); - qDebug() << "void Align::ais_finished: remove " << it.convertedFilename(); + qDebug() << "void Align::ais_finished: remove " + << it.convertedFilename(); qDebug() << "void Align::ais_finished: remove " << it.alignedFilename(); } - QFile::remove(m_luminance_options.getTempDir() + "/hugin_debug_optim_results.txt"); + QFile::remove(m_luminance_options.getTempDir() + + "/hugin_debug_optim_results.txt"); emit finishedAligning(0); } -void Align::ais_failed_slot(QProcess::ProcessError error) -{ +void Align::ais_failed_slot(QProcess::ProcessError error) { qDebug() << "align_image_stack failed"; removeTempFiles(); emit failedAligning(error); } -void Align::readData() -{ +void Align::readData() { QByteArray data = m_ais->readAll(); emit dataReady(data); } -void Align::reset() -{ +void Align::reset() { if (m_ais != NULL && m_ais->state() != QProcess::NotRunning) { m_ais->kill(); } } -void Align::removeTempFiles() -{ - for(const auto it : m_data) { +void Align::removeTempFiles() { + for (const auto &it : m_data) { if (!it.alignedFilename().isEmpty()) { - QFile::remove(QFile::encodeName(it.convertedFilename()).constData()); + QFile::remove( + QFile::encodeName(it.convertedFilename()).constData()); QFile::remove(QFile::encodeName(it.alignedFilename()).constData()); - qDebug() << "void HdrCreationManager::ais_finished: remove " << it.convertedFilename(); - qDebug() << "void HdrCreationManager::ais_finished: remove " << it.alignedFilename(); + qDebug() << "void HdrCreationManager::ais_finished: remove " + << it.convertedFilename(); + qDebug() << "void HdrCreationManager::ais_finished: remove " + << it.alignedFilename(); } } } - diff -Nru luminance-hdr-2.5.1+dfsg/src/Alignment/Align.h luminance-hdr-2.6.0/src/Alignment/Align.h --- luminance-hdr-2.5.1+dfsg/src/Alignment/Align.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Alignment/Align.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,38 +24,38 @@ #ifndef ALIGN_H #define ALIGN_H -#include #include #include +#include #include #include "Common/LuminanceOptions.h" #include "HdrWizard/HdrCreationItem.h" -class Align : public QObject -{ +class Align : public QObject { Q_OBJECT -public: - Align(HdrCreationItemContainer& data, bool fromCommandLine, int savingMode = 1, float minLum = 0.0f, float maxLum = 1.0f); + public: + Align(HdrCreationItemContainer &data, bool fromCommandLine, + int savingMode = 1, float minLum = 0.0f, float maxLum = 1.0f); ~Align(); void align_with_ais(bool ais_crop_flag); void reset(); void removeTempFiles(); -signals: + signals: void finishedAligning(int); void failedAligning(QProcess::ProcessError); - void dataReady(QByteArray); + void dataReady(QByteArray &); -protected slots: + protected slots: void ais_finished(int exitcode, QProcess::ExitStatus exitstatus); void alignedFilesLoaded(); void ais_failed_slot(QProcess::ProcessError error); void readData(); -protected: + protected: HdrCreationItemContainer m_data; bool m_fromCommandLine; int m_savingMode; diff -Nru luminance-hdr-2.5.1+dfsg/src/Alignment/CMakeLists.txt luminance-hdr-2.6.0/src/Alignment/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Alignment/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Alignment/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -7,9 +7,9 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(align ${FILES_H} ${FILES_CPP} ${FILES_MOC} ) +ADD_LIBRARY(align STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ) -qt5_use_modules(align Core Gui Widgets Concurrent) +TARGET_LINK_LIBRARIES(align Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} align PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/arch/CMakeLists.txt luminance-hdr-2.6.0/src/arch/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/arch/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/arch/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -5,7 +5,7 @@ #${CMAKE_CURRENT_SOURCE_DIR}/freebsd/math.h #${CMAKE_CURRENT_SOURCE_DIR}/string.h) -#ADD_LIBRARY(arch ${FILES_H} ${FILES_CPP}) +#ADD_LIBRARY(arch STATIC ${FILES_H} ${FILES_CPP}) #SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} arch PARENT_SCOPE) #ENDIF() diff -Nru luminance-hdr-2.5.1+dfsg/src/arch/freebsd/math.h luminance-hdr-2.6.0/src/arch/freebsd/math.h --- luminance-hdr-2.5.1+dfsg/src/arch/freebsd/math.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/arch/freebsd/math.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,12 +27,12 @@ #if defined(__FreeBSD__) #if __FreeBSD__ < 6 -#define exp2f(x) ( (float)( exp2(x) ) ) +#define exp2f(x) ((float)(exp2(x))) #endif #if __FreeBSD__ < 9 -#define log2(x) (log(x) / M_LN2) -#define log2f(x) (logf(x) / M_LN2) +#define log2(x) (log(x) / M_LN2) +#define log2f(x) (logf(x) / M_LN2) #endif #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/arch/malloc.h luminance-hdr-2.6.0/src/arch/malloc.h --- luminance-hdr-2.5.1+dfsg/src/arch/malloc.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/arch/malloc.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,7 +29,7 @@ #include #else #include -#define _mm_malloc(a,b) malloc(a) -#define _mm_free(a) free(a) +#define _mm_malloc(a, b) malloc(a) +#define _mm_free(a) free(a) #endif #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/arch/msvc/math.h luminance-hdr-2.6.0/src/arch/msvc/math.h --- luminance-hdr-2.5.1+dfsg/src/arch/msvc/math.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/arch/msvc/math.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,14 +26,14 @@ #define MSVC_MATH_H //#define _USE_MATH_DEFINES -#include // re-include here +#include // re-include here #include -#define exp2f(x) (powf(2.0f, x)) -#define log2(x) (log(x) / boost::math::double_constants::ln_two) -#define log2f(x) (logf(x) / boost::math::double_constants::ln_two) +#define exp2f(x) (powf(2.0f, x)) +#define log2(x) (log(x) / boost::math::double_constants::ln_two) +#define log2f(x) (logf(x) / boost::math::double_constants::ln_two) -#pragma warning (disable:4996) +#pragma warning(disable : 4996) #endif // MSVC_MATH_H diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.cpp luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,134 +23,196 @@ * */ -#include "BatchHDR/BatchHDRDialog.h" -#include "ui_BatchHDRDialog.h" +#include +#include +#include #include -#include #include #include +#include #include #include -#include +#include #include #include -#include +#include #include -#include #include +#include #include -#include "arch/math.h" -#include "Libpfs/pfs.h" -#include "Core/IOWorker.h" -#include "OsIntegration/osintegration.h" +#include +#include +#include +#include using namespace libhdr::fusion; -BatchHDRDialog::BatchHDRDialog(QWidget *p): - QDialog(p), - m_Ui(new Ui::BatchHDRDialog), - m_numProcessed(0), - m_processed(0), - m_total(0), - m_errors(false), - m_loading_error(false), - m_abort(false), - m_processing(false) -{ +BatchHDRDialog::BatchHDRDialog(QWidget *p, QSqlDatabase db) + : QDialog(p), + m_Ui(new Ui::BatchHDRDialog), + m_numProcessed(0), + m_processed(0), + m_total(0), + m_errors(false), + m_loading_error(false), + m_abort(false), + m_processing(false), + m_db(db) { m_Ui->setupUi(this); m_Ui->closeButton->hide(); m_Ui->progressBar->hide(); - m_Ui->progressBar_2->hide(); m_hdrCreationManager = new HdrCreationManager; m_IO_Worker = new IOWorker; - connect(m_Ui->horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(num_bracketed_changed(int))); - connect(m_Ui->spinBox, SIGNAL(valueChanged(int)), this, SLOT(num_bracketed_changed(int))); - - connect(m_Ui->MTBRadioButton, SIGNAL(clicked()), this, SLOT(align_selection_clicked())); - connect(m_Ui->aisRadioButton, SIGNAL(clicked()), this, SLOT(align_selection_clicked())); - connect(m_Ui->threshold_horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(updateThresholdSlider(int))); - connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateThresholdSpinBox(double))); - - //connect(m_hdrCreationManager, SIGNAL(finishedLoadingInputFiles(QStringList)), this, SLOT(align(QStringList))); - connect(m_hdrCreationManager, SIGNAL(finishedLoadingFiles()), this, SLOT(align())); - connect(m_hdrCreationManager, SIGNAL(finishedAligning(int)), this, SLOT(create_hdr(int))); - connect(m_hdrCreationManager, SIGNAL(errorWhileLoading(QString)), this, SLOT(error_while_loading(QString))); - connect(m_hdrCreationManager, SIGNAL(aisDataReady(QByteArray)), this, SLOT(writeAisData(QByteArray))); - connect(m_hdrCreationManager, SIGNAL(ais_failed(QProcess::ProcessError)), this, SLOT(ais_failed(QProcess::ProcessError))); - connect(m_hdrCreationManager, SIGNAL(processed()), this, SLOT(processed())); - - connect(m_hdrCreationManager, SIGNAL(progressStarted()), m_Ui->progressBar, SLOT(show())); - connect(m_hdrCreationManager, SIGNAL(progressStarted()), m_Ui->progressBar_2, SLOT(show())); - connect(m_hdrCreationManager, SIGNAL(progressFinished()), m_Ui->progressBar_2, SLOT(reset())); - connect(m_hdrCreationManager, SIGNAL(progressFinished()), m_Ui->progressBar_2, SLOT(hide())); - connect(m_hdrCreationManager, SIGNAL(progressRangeChanged(int,int)), m_Ui->progressBar_2, SLOT(setRange(int,int))); - connect(m_hdrCreationManager, SIGNAL(progressValueChanged(int)), m_Ui->progressBar_2, SLOT(setValue(int))); - connect(m_hdrCreationManager, SIGNAL(loadFilesAborted()), this, SLOT(loadFilesAborted())); - //connect(this, SIGNAL(setRange(int,int)), m_Ui->progressBar_2, SLOT(setRange(int,int))); - connect(this, SIGNAL(setValue(int)), m_Ui->progressBar_2, SLOT(setValue(int))); - - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(createHdrFinished()), Qt::DirectConnection); - - m_formatHelper.initConnection(m_Ui->formatComboBox, m_Ui->formatSettingsButton, true); - - m_tempDir = m_luminance_options.getTempDir(); - m_batchHdrInputDir = m_luminance_options.getBatchHdrPathInput(""); - m_batchHdrOutputDir = m_luminance_options.getBatchHdrPathOutput(""); + connect(m_Ui->horizontalSlider, &QAbstractSlider::valueChanged, this, + &BatchHDRDialog::num_bracketed_changed); + connect(m_Ui->spinBox, SIGNAL(valueChanged(int)), this, + SLOT(num_bracketed_changed(int))); + + connect(m_Ui->MTBRadioButton, &QAbstractButton::clicked, this, + &BatchHDRDialog::align_selection_clicked); + connect(m_Ui->aisRadioButton, &QAbstractButton::clicked, this, + &BatchHDRDialog::align_selection_clicked); + connect(m_Ui->threshold_horizontalSlider, &QAbstractSlider::valueChanged, + this, &BatchHDRDialog::updateThresholdSlider); + connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, + SLOT(updateThresholdSpinBox(double))); + + connect(m_hdrCreationManager, &HdrCreationManager::finishedLoadingFiles, + this, &BatchHDRDialog::align); + connect(m_hdrCreationManager, &HdrCreationManager::finishedAligning, this, + &BatchHDRDialog::create_hdr); + connect(m_hdrCreationManager, &HdrCreationManager::errorWhileLoading, this, + &BatchHDRDialog::error_while_loading); + connect(m_hdrCreationManager, &HdrCreationManager::aisDataReady, this, + &BatchHDRDialog::writeAisData); + connect(m_hdrCreationManager, &HdrCreationManager::ais_failed, this, + &BatchHDRDialog::ais_failed); + connect(m_hdrCreationManager, &HdrCreationManager::processed, this, + &BatchHDRDialog::processed); + + connect(m_hdrCreationManager, &HdrCreationManager::progressStarted, + m_Ui->progressBar, &QWidget::show); + connect(m_hdrCreationManager, &HdrCreationManager::progressFinished, + m_Ui->progressBar, &QProgressBar::reset); + connect(m_hdrCreationManager, &HdrCreationManager::progressFinished, + m_Ui->progressBar, &QWidget::hide); + connect(m_hdrCreationManager, &HdrCreationManager::progressRangeChanged, + m_Ui->progressBar, &QProgressBar::setRange); + connect(m_hdrCreationManager, &HdrCreationManager::progressValueChanged, + m_Ui->progressBar, &QProgressBar::setValue); + connect(m_hdrCreationManager, &HdrCreationManager::loadFilesAborted, this, + &BatchHDRDialog::loadFilesAborted); + connect(this, &BatchHDRDialog::setValue, m_Ui->progressBar, + &QProgressBar::setValue); + + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &BatchHDRDialog::createHdrFinished, Qt::DirectConnection); + + m_formatHelper.initConnection(m_Ui->formatComboBox, + m_Ui->formatSettingsButton, true); + + m_tempDir = LuminanceOptions().getTempDir(); + m_batchHdrInputDir = + LuminanceOptions().getBatchHdrPathInput(QLatin1String("")); + m_batchHdrOutputDir = + LuminanceOptions().getBatchHdrPathOutput(QLatin1String("")); m_Ui->inputLineEdit->setText(m_batchHdrInputDir); m_Ui->outputLineEdit->setText(m_batchHdrOutputDir); QSqlQueryModel model; - model.setQuery("SELECT * FROM parameters"); - for (int i = 0; i < model.rowCount(); i++) - { - m_Ui->profileComboBox->addItem(tr("Custom config %1").arg(i+1)); - int weight_ = model.record(i).value("weight").toInt(); - int response_ = model.record(i).value("response").toInt(); - int model_ = model.record(i).value("model").toInt(); - QString filename_ = model.record(i).value("filename").toString(); + model.setQuery(QStringLiteral("SELECT * FROM parameters"), m_db); + for (int i = 0; i < model.rowCount(); i++) { + m_Ui->profileComboBox->addItem(tr("Custom config %1").arg(i + 1)); + int weight_ = model.record(i).value(QStringLiteral("weight")).toInt(); + int response_ = model.record(i).value(QStringLiteral("response")).toInt(); + int model_ = model.record(i).value(QStringLiteral("model")).toInt(); + QString filename_ = model.record(i).value(QStringLiteral("filename")).toString(); FusionOperatorConfig ct; ct.weightFunction = static_cast(weight_); ct.fusionOperator = static_cast(model_); - switch (response_) - { - case 0: - ct.responseCurve = RESPONSE_CUSTOM; - ct.inputResponseCurveFilename = QFile::encodeName(filename_).constData(); - ct.outputResponseCurveFilename.clear(); - break; - case 2: - ct.responseCurve = RESPONSE_GAMMA; - break; - case 3: - ct.responseCurve = RESPONSE_LOG10; - break; - case 4: - ct.responseCurve = RESPONSE_CUSTOM; - ct.fusionOperator = ROBERTSON_AUTO; - break; - case 1: - default: - ct.responseCurve = RESPONSE_LINEAR; - break; + switch (response_) { + case 0: + ct.responseCurve = RESPONSE_LINEAR; + break; + case 1: + ct.responseCurve = RESPONSE_GAMMA; + break; + case 2: + ct.responseCurve = RESPONSE_LOG10; + break; + case 3: + ct.responseCurve = RESPONSE_SRGB; + break; + case -1: + ct.responseCurve = RESPONSE_CUSTOM; + if (model_ == 2) { + ct.inputResponseCurveFilename.clear(); + ct.outputResponseCurveFilename.clear(); + } + else { + ct.inputResponseCurveFilename = QFile::encodeName(filename_).constData(); + ct.outputResponseCurveFilename.clear(); + } + break; + default: + ct.responseCurve = RESPONSE_LINEAR; + break; } m_customConfig.push_back(ct); } + // process input images + QStringList filters; + filters << QStringLiteral("*.jpg") << QStringLiteral("*.jpeg") + << QStringLiteral("*.tiff") << QStringLiteral("*.tif") + << QStringLiteral("*.crw") << QStringLiteral("*.cr2") + << QStringLiteral("*.nef") << QStringLiteral("*.dng") + << QStringLiteral("*.mrw") << QStringLiteral("*.orf") + << QStringLiteral("*.kdc") << QStringLiteral("*.dcr") + << QStringLiteral("*.arw") << QStringLiteral("*.raf") + << QStringLiteral("*.ptx") << QStringLiteral("*.pef") + << QStringLiteral("*.x3f") << QStringLiteral("*.raw") + << QStringLiteral("*.rw2") << QStringLiteral("*.sr2") + << QStringLiteral("*.3fr") << QStringLiteral("*.mef") + << QStringLiteral("*.mos") << QStringLiteral("*.erf") + << QStringLiteral("*.nrw") << QStringLiteral("*.srw"); + filters << QStringLiteral("*.JPG") << QStringLiteral("*.JPEG") + << QStringLiteral("*.TIFF") << QStringLiteral("*.TIF") + << QStringLiteral("*.CRW") << QStringLiteral("*.CR2") + << QStringLiteral("*.NEF") << QStringLiteral("*.DNG") + << QStringLiteral("*.MRW") << QStringLiteral("*.ORF") + << QStringLiteral("*.KDC") << QStringLiteral("*.DCR") + << QStringLiteral("*.ARW") << QStringLiteral("*.RAF") + << QStringLiteral("*.PTX") << QStringLiteral("*.PEF") + << QStringLiteral("*.X3F") << QStringLiteral("*.RAW") + << QStringLiteral("*.RW2") << QStringLiteral("*.SR2") + << QStringLiteral("*.3FR") << QStringLiteral("*.MEF") + << QStringLiteral("*.MOS") << QStringLiteral("*.ERF") + << QStringLiteral("*.NRW") << QStringLiteral("*.SRW"); + + QDir chosenInputDir(m_batchHdrInputDir); + chosenInputDir.setFilter(QDir::Files); + chosenInputDir.setSorting(QDir::Name); + chosenInputDir.setNameFilters(filters); + m_bracketed = chosenInputDir.entryList(); + // hack to prepend to this list the path as prefix. + m_bracketed.replaceInStrings(QRegExp("(.+)"), + chosenInputDir.path() + "/\\1"); + check_start_button(); } -BatchHDRDialog::~BatchHDRDialog() -{ +BatchHDRDialog::~BatchHDRDialog() { qDebug() << "BatchHDRDialog::~BatchHDRDialog()"; // DAVIDE _ HDR WIZARD m_hdrCreationManager->reset(); @@ -158,29 +220,29 @@ delete m_IO_Worker; } -void BatchHDRDialog::num_bracketed_changed(int value) -{ +void BatchHDRDialog::num_bracketed_changed(int value) { qDebug() << "BatchHDRDialog::num_bracketed_changed " << value; m_Ui->autoAlignCheckBox->setEnabled(value > 1); - m_Ui->autoCropCheckBox->setEnabled(value > 1); - m_Ui->aisRadioButton->setEnabled(value > 1); - m_Ui->MTBRadioButton->setEnabled(value > 1); + if (m_Ui->autoAlignCheckBox->isChecked() ) { + m_Ui->autoCropCheckBox->setEnabled(value > 1); + m_Ui->aisRadioButton->setEnabled(value > 1); + m_Ui->MTBRadioButton->setEnabled(value > 1); + } } -void BatchHDRDialog::on_selectInputFolder_clicked() -{ - QString inputDir = QFileDialog::getExistingDirectory(this, tr("Choose a source directory"), m_batchHdrInputDir); - if (!inputDir.isEmpty()) - { +void BatchHDRDialog::on_selectInputFolder_clicked() { + QString inputDir = QFileDialog::getExistingDirectory( + this, tr("Choose a source directory"), m_batchHdrInputDir); + if (!inputDir.isEmpty()) { m_Ui->inputLineEdit->setText(inputDir); - if (!m_Ui->inputLineEdit->text().isEmpty()) - { - // if the new dir, the one just chosen by the user, is different from the one stored in the settings, + if (!m_Ui->inputLineEdit->text().isEmpty()) { + // if the new dir, the one just chosen by the user, is different + // from the + // one stored in the settings, // update the settings - if (m_batchHdrInputDir != m_Ui->inputLineEdit->text()) - { + if (m_batchHdrInputDir != m_Ui->inputLineEdit->text()) { m_batchHdrInputDir = m_Ui->inputLineEdit->text(); - m_luminance_options.setBatchHdrPathInput(m_batchHdrInputDir); + LuminanceOptions().setBatchHdrPathInput(m_batchHdrInputDir); } // defaulting the same output folder as the input folder @@ -191,31 +253,31 @@ } } -void BatchHDRDialog::on_selectOutputFolder_clicked() -{ - add_output_directory(); -} +void BatchHDRDialog::on_selectOutputFolder_clicked() { add_output_directory(); } -void BatchHDRDialog::add_output_directory(QString dir) -{ - QString outputDir = !dir.isEmpty() ? dir : QFileDialog::getExistingDirectory(this, tr("Choose a output directory"), m_batchHdrOutputDir); - if (!outputDir.isEmpty()) - { +void BatchHDRDialog::add_output_directory(QString dir) { + QString outputDir = + !dir.isEmpty() ? dir : QFileDialog::getExistingDirectory( + this, tr("Choose a output directory"), + m_batchHdrOutputDir); + if (!outputDir.isEmpty()) { m_Ui->outputLineEdit->setText(outputDir); - // if the new dir, the one just chosen by the user, is different from the one stored in the settings, + // if the new dir, the one just chosen by the user, is different from + // the + // one stored in the settings, // update the settings - if (m_batchHdrOutputDir != m_Ui->outputLineEdit->text() && dir.isEmpty()) - { + if (m_batchHdrOutputDir != m_Ui->outputLineEdit->text() && + dir.isEmpty()) { m_batchHdrOutputDir = m_Ui->outputLineEdit->text(); - m_luminance_options.setBatchHdrPathOutput(m_batchHdrOutputDir); + LuminanceOptions().setBatchHdrPathOutput(m_batchHdrOutputDir); } check_start_button(); } } -void BatchHDRDialog::on_startButton_clicked() -{ - if (m_Ui->inputLineEdit->text().isEmpty() || m_Ui->outputLineEdit->text().isEmpty()) +void BatchHDRDialog::on_startButton_clicked() { + if (m_Ui->inputLineEdit->text().isEmpty() || + m_Ui->outputLineEdit->text().isEmpty()) return; // check for empty output-folder @@ -226,51 +288,44 @@ bool doStart = true; if (!files.empty()) { - foreach(QString file, files) { - if (file.startsWith("hdr_")) - foundHDR = true; + foreach (const QString &file, files) { + if (file.startsWith(QLatin1String("hdr_"))) foundHDR = true; } if (foundHDR) - doStart = QMessageBox::Yes == QMessageBox::warning(0,tr("Warning"), tr("The chosen output directory contains HDR files. Those files might be overwritten. \n\nContinue?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); + doStart = + QMessageBox::Yes == + QMessageBox::warning( + 0, tr("Warning"), + tr("The chosen output directory contains HDR files. Those " + "files might be overwritten. \n\nContinue?"), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No); } - // process input images - QStringList filters; - filters << "*.jpg" << "*.jpeg" << "*.tiff" << "*.tif" << "*.crw" << "*.cr2" << "*.nef" << "*.dng" << "*.mrw" << "*.orf" << "*.kdc" << "*.dcr" << "*.arw" << "*.raf" << "*.ptx" << "*.pef" << "*.x3f" << "*.raw" << "*.rw2" << "*.sr2" << "*.3fr" << "*.mef" << "*.mos" << "*.erf" << "*.nrw" << "*.srw"; - filters << "*.JPG" << "*.JPEG" << "*.TIFF" << "*.TIF" << "*.CRW" << "*.CR2" << "*.NEF" << "*.DNG" << "*.MRW" << "*.ORF" << "*.KDC" << "*.DCR" << "*.ARW" << "*.RAF" << "*.PTX" << "*.PEF" << "*.X3F" << "*.RAW" << "*.RW2" << "*.SR2" << "*.3FR" << "*.MEF" << "*.MOS" << "*.ERF" << "*.NRW" << "*.SRW"; - - QDir chosenInputDir(m_batchHdrInputDir); - chosenInputDir.setFilter(QDir::Files); - chosenInputDir.setSorting(QDir::Name); - chosenInputDir.setNameFilters(filters); - m_bracketed = chosenInputDir.entryList(); - //hack to prepend to this list the path as prefix. - m_bracketed.replaceInStrings(QRegExp("(.+)"), chosenInputDir.path()+"/\\1"); - qDebug() << m_bracketed; - if (m_bracketed.count() < m_Ui->spinBox->value()) { - qDebug() << "Total number of pictures must be a multiple of number of bracketed images"; - QMessageBox::warning(0,tr("Warning"), tr("Total number of pictures must be a multiple of number of bracketed images."), QMessageBox::Ok, QMessageBox::NoButton); + qDebug() << "Total number of pictures must be a multiple of number of " + "bracketed images"; + QMessageBox::warning( + 0, tr("Warning"), + tr("Total number of pictures must be a multiple of " + "number of bracketed images."), + QMessageBox::Ok, QMessageBox::NoButton); return; } if (m_bracketed.count() % m_Ui->spinBox->value() != 0) { - qDebug() << "Total number of pictures must be a multiple of number of bracketed images"; - QMessageBox::warning(0,tr("Warning"), tr("Total number of pictures must be a multiple of number of bracketed images."), QMessageBox::Ok, QMessageBox::NoButton); + qDebug() << "Total number of pictures must be a multiple of number of " + "bracketed images"; + QMessageBox::warning( + 0, tr("Warning"), + tr("Total number of pictures must be a multiple of " + "number of bracketed images."), + QMessageBox::Ok, QMessageBox::NoButton); return; } if (doStart) { m_Ui->horizontalSlider->setEnabled(false); m_Ui->spinBox->setEnabled(false); -/* - m_Ui->profileComboBox->setEnabled(false); - m_Ui->formatComboBox->setEnabled(false); - m_Ui->selectInputFolder->setEnabled(false); - m_Ui->inputLineEdit->setEnabled(false); - m_Ui->selectOutputFolder->setEnabled(false); - m_Ui->outputLineEdit->setEnabled(false); -*/ m_Ui->groupBoxOutput->setEnabled(false); m_Ui->groupBoxAlignment->setEnabled(false); m_Ui->groupBoxAg->setEnabled(false); @@ -285,36 +340,33 @@ } } -void BatchHDRDialog::batch_hdr() -{ +void BatchHDRDialog::batch_hdr() { m_processing = true; if (m_abort) { qDebug() << "Aborted"; QApplication::restoreOverrideCursor(); // DAVIDE _ HDR WIZARD - //m_hdrCreationManager->reset(); + // m_hdrCreationManager->reset(); this->reject(); } - if (!m_bracketed.isEmpty()) - { + if (!m_bracketed.isEmpty()) { + QFileInfo fi1(m_bracketed.at(0)); + QFileInfo fi2(m_bracketed.at(m_Ui->spinBox->value() - 1)); + m_output_file_name_base = + fi1.completeBaseName() + "-" + fi2.completeBaseName(); m_Ui->textEdit->append(tr("Loading files...")); m_numProcessed++; QStringList toProcess; - for (int i = 0; i < m_Ui->spinBox->value(); ++i) - { + for (int i = 0; i < m_Ui->spinBox->value(); ++i) { toProcess << m_bracketed.takeFirst(); } - qDebug() << "BatchHDRDialog::batch_hdr() Files to process: " << toProcess; + qDebug() << "BatchHDRDialog::batch_hdr() Files to process: " + << toProcess; // DAVIDE _ HDR CREATION - QtConcurrent::run( - boost::bind(&HdrCreationManager::loadFiles, - m_hdrCreationManager, - toProcess) - ); - } - else - { + QtConcurrent::run(boost::bind(&HdrCreationManager::loadFiles, + m_hdrCreationManager, toProcess)); + } else { m_Ui->closeButton->show(); m_Ui->cancelButton->hide(); m_Ui->startButton->hide(); @@ -328,14 +380,12 @@ } } -void BatchHDRDialog::align() -{ +void BatchHDRDialog::align() { QStringList filesLackingExif = m_hdrCreationManager->getFilesWithoutExif(); - if (!filesLackingExif.isEmpty()) - { + if (!filesLackingExif.isEmpty()) { qDebug() << "BatchHDRDialog::align Error: missing EXIF data"; m_Ui->textEdit->append(tr("Error: missing EXIF data")); - foreach (QString fname, filesLackingExif) + foreach (const QString &fname, filesLackingExif) m_Ui->textEdit->append(fname); m_errors = true; // DAVIDE _ HDR WIZARD @@ -343,97 +393,103 @@ batch_hdr(); return; } - if (m_Ui->autoAlignCheckBox->isChecked()) - { + if (m_Ui->autoAlignCheckBox->isChecked()) { + m_Ui->progressBar->hide(); m_Ui->textEdit->append(tr("Aligning...")); - if (m_Ui->aisRadioButton->isChecked()) - { - m_Ui->progressBar_2->show(); - m_Ui->progressBar_2->setRange(0,100); - m_Ui->progressBar_2->setValue(0); - m_hdrCreationManager->set_ais_crop_flag(m_Ui->autoCropCheckBox->isChecked()); + if (m_Ui->aisRadioButton->isChecked()) { + m_hdrCreationManager->set_ais_crop_flag( + m_Ui->autoCropCheckBox->isChecked()); m_hdrCreationManager->align_with_ais(); - } - else + } else m_hdrCreationManager->align_with_mtb(); - } - else + } else create_hdr(0); } -void BatchHDRDialog::create_hdr(int) -{ +void BatchHDRDialog::create_hdr(int) { qDebug() << "BatchHDRDialog::create_hdr()"; - m_Ui->progressBar_2->hide(); + m_Ui->progressBar->hide(); m_Ui->textEdit->append(tr("Creating HDR...")); - int idx = m_Ui->profileComboBox->currentIndex(); - - const FusionOperatorConfig* cfg = NULL; - if (idx <= 5) - { - cfg = &predef_confs[idx]; - } - else - { - cfg = &m_customConfig[idx - 6]; - } - - m_hdrCreationManager->setFusionOperator(cfg->fusionOperator); - m_hdrCreationManager->getWeightFunction().setType(cfg->weightFunction); - m_hdrCreationManager->getResponseCurve().setType(cfg->responseCurve); + //int idx = m_Ui->profileComboBox->currentIndex(); - if (m_Ui->autoAG_checkBox->isChecked()) - { + if (m_Ui->autoAG_checkBox->isChecked()) { m_Ui->textEdit->append(tr("Doing auto anti-ghosting...")); - QList > HV_offsets; - for (int i = 0; i < m_Ui->spinBox->value(); i++ ) { - HV_offsets.append(qMakePair(0,0)); - + QList> HV_offsets; + for (int i = 0; i < m_Ui->spinBox->value(); i++) { + HV_offsets.append(qMakePair(0, 0)); } float patchesPercent; - int h0 = m_hdrCreationManager->computePatches(m_Ui->threshold_doubleSpinBox->value(), m_patches, patchesPercent, HV_offsets); - m_future = QtConcurrent::run( boost::bind(&HdrCreationManager::doAntiGhosting, - m_hdrCreationManager, - m_patches, h0, false, &m_ph)); // false means auto anti-ghosting + int h0 = m_hdrCreationManager->computePatches( + m_Ui->threshold_doubleSpinBox->value(), m_patches, patchesPercent, + HV_offsets); + m_future = QtConcurrent::run(boost::bind( + &HdrCreationManager::doAntiGhosting, m_hdrCreationManager, + m_patches, h0, false, &m_ph)); // false means auto anti-ghosting m_futureWatcher.setFuture(m_future); - } - else { + } else { m_future = QtConcurrent::run( - boost::bind(&HdrCreationManager::createHdr, m_hdrCreationManager)); + boost::bind(&HdrCreationManager::createHdr, m_hdrCreationManager)); m_futureWatcher.setFuture(m_future); } } -void BatchHDRDialog::createHdrFinished() -{ +void BatchHDRDialog::createHdrFinished() { std::unique_ptr resultHDR(m_future.result()); - if (resultHDR.get() == NULL) { + if (resultHDR.get() == nullptr) { qDebug() << "Aborted"; QApplication::restoreOverrideCursor(); this->reject(); return; } + QString outName; QString suffix = m_Ui->formatComboBox->currentText(); - int paddingLength = ceil(log10(m_total + 1.0f)); - QString outName = m_Ui->outputLineEdit->text() + "/hdr_" + QString("%1").arg(m_numProcessed, paddingLength, 10, QChar('0')) + "." + suffix; - m_IO_Worker->write_hdr_frame(resultHDR.get(), outName, m_formatHelper.getParams()); + QString caption = QString( + QObject::tr("Weights= ") + + getQString(m_hdrCreationManager->getWeightFunction().getType()) + + QObject::tr(" - Response curve= ") + + getQString(m_hdrCreationManager->getResponseCurve().getType()) + + QObject::tr(" - Model= ") + + getQString(m_hdrCreationManager->getFusionOperator())); + + if (m_Ui->proposedFilenameCheckBox->isChecked()) { + outName = m_Ui->outputLineEdit->text() + "/" + m_output_file_name_base + + "_" + caption + "." + suffix; + } else { + int paddingLength = ceil(log10(m_total + 1.0f)); + outName = m_Ui->outputLineEdit->text() + "/" + + m_Ui->prefixLineEdit->text() + "_" + caption + "_" + + QStringLiteral("%1").arg(m_numProcessed, paddingLength, 10, + QChar('0')) + + "." + suffix; + } + try { + m_IO_Worker->write_hdr_frame(resultHDR.get(), outName, + m_formatHelper.getParams()); + } + catch (...) { + QApplication::restoreOverrideCursor(); + this->reject(); + return; + } + resultHDR.reset(); // DAVIDE _ HDR WIZARD m_hdrCreationManager->reset(); int progressValue = m_Ui->progressBar->value() + 1; m_Ui->progressBar->setValue(progressValue); - OsIntegration::getInstance().setProgress(progressValue, m_Ui->progressBar->maximum() - m_Ui->progressBar->minimum()); - m_Ui->textEdit->append(tr("Written ") + outName ); + OsIntegration::getInstance().setProgress( + progressValue, + m_Ui->progressBar->maximum() - m_Ui->progressBar->minimum()); + m_Ui->textEdit->append(tr("Written ") + outName); batch_hdr(); } -void BatchHDRDialog::error_while_loading(QString message) -{ +void BatchHDRDialog::error_while_loading(const QString &message) { qDebug() << message; m_Ui->textEdit->append(tr("Error: ") + message); m_errors = true; @@ -442,13 +498,10 @@ try_to_continue(); } -void BatchHDRDialog::writeAisData(QByteArray data) -{ +void BatchHDRDialog::writeAisData(QByteArray &data) { qDebug() << data; - if (data.contains("[1A")) - data.replace("[1A", ""); - if (data.contains("[2A")) - data.replace("[2A", ""); + if (data.contains("[1A")) data.replace("[1A", ""); + if (data.contains("[2A")) data.replace("[2A", ""); if (data.contains(QChar(0x01B).toLatin1())) data.replace(QChar(0x01B).toLatin1(), ""); m_Ui->textEdit->append(data); @@ -459,75 +512,86 @@ } } -void BatchHDRDialog::check_start_button() -{ - if (m_Ui->inputLineEdit->text() != "" && m_Ui->outputLineEdit->text() != "") +void BatchHDRDialog::check_start_button() { + if (m_Ui->inputLineEdit->text() != QLatin1String("") && + m_Ui->outputLineEdit->text() != QLatin1String("")) m_Ui->startButton->setEnabled(true); } -void BatchHDRDialog::on_cancelButton_clicked() -{ +void BatchHDRDialog::on_cancelButton_clicked() { if (m_processing) { m_abort = true; m_ph.qtCancel(); m_hdrCreationManager->reset(); m_Ui->cancelButton->setText(tr("Aborting...")); m_Ui->cancelButton->setEnabled(false); - } - else + } else this->reject(); } -void BatchHDRDialog::align_selection_clicked() -{ +void BatchHDRDialog::align_selection_clicked() { m_Ui->autoCropCheckBox->setEnabled(m_Ui->aisRadioButton->isChecked()); } -void BatchHDRDialog::processed() -{ +void BatchHDRDialog::processed() { m_processed++; qDebug() << "BatchHDRDialog::processed() : " << m_processed; try_to_continue(); } -void BatchHDRDialog::try_to_continue() -{ +void BatchHDRDialog::try_to_continue() { if (m_processed == m_Ui->spinBox->value()) { m_processed = 0; if (m_loading_error) { m_loading_error = false; // DAVIDE _ HDR WIZARD m_hdrCreationManager->reset(); - batch_hdr(); // try to continue + batch_hdr(); // try to continue } } } -void BatchHDRDialog::ais_failed(QProcess::ProcessError error) -{ +void BatchHDRDialog::ais_failed(QProcess::ProcessError error) { qDebug() << "Aborted"; QApplication::restoreOverrideCursor(); this->reject(); } -void BatchHDRDialog::loadFilesAborted() -{ +void BatchHDRDialog::loadFilesAborted() { qDebug() << "Aborted"; QApplication::restoreOverrideCursor(); this->reject(); } -void BatchHDRDialog::updateThresholdSlider(int newValue) -{ - float newThreshold = ((float)newValue)/10000.f; +void BatchHDRDialog::updateThresholdSlider(int newValue) { + float newThreshold = ((float)newValue) / 10000.f; bool oldState = m_Ui->threshold_doubleSpinBox->blockSignals(true); - m_Ui->threshold_doubleSpinBox->setValue( newThreshold ); + m_Ui->threshold_doubleSpinBox->setValue(newThreshold); m_Ui->threshold_doubleSpinBox->blockSignals(oldState); } -void BatchHDRDialog::updateThresholdSpinBox(double newThreshold) -{ +void BatchHDRDialog::updateThresholdSpinBox(double newThreshold) { bool oldState = m_Ui->threshold_horizontalSlider->blockSignals(true); - m_Ui->threshold_horizontalSlider->setValue( (int)(newThreshold*10000) ); + m_Ui->threshold_horizontalSlider->setValue((int)(newThreshold * 10000)); m_Ui->threshold_horizontalSlider->blockSignals(oldState); } +void BatchHDRDialog::on_profileComboBox_activated(int idx) { + const FusionOperatorConfig *cfg = nullptr; + if (idx <= 5) { + cfg = &predef_confs[idx]; + } else { + cfg = &m_customConfig[idx - 6]; + } + + QString labelModel = getQString(cfg->fusionOperator); + QString labelWeights = getQString(cfg->weightFunction); + QString labelResponse = getQString(cfg->responseCurve); + + m_Ui->labelModel->setText(labelModel); + m_Ui->labelWeights->setText(labelWeights); + m_Ui->labelResponse->setText(labelResponse); + + m_hdrCreationManager->setFusionOperator(cfg->fusionOperator); + m_hdrCreationManager->getWeightFunction().setType(cfg->weightFunction); + m_hdrCreationManager->getResponseCurve().setType(cfg->responseCurve); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.h luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.h --- luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,6 +29,7 @@ #include #include #include +#include #include "Common/LuminanceOptions.h" #include "Common/ProgressHelper.h" @@ -40,22 +41,22 @@ class HdrCreationManager; namespace Ui { - class BatchHDRDialog; +class BatchHDRDialog; } -class BatchHDRDialog: public QDialog -{ -Q_OBJECT -private: +class BatchHDRDialog : public QDialog { + Q_OBJECT + private: QScopedPointer m_Ui; -public: - BatchHDRDialog(QWidget *parent = 0); + + public: + BatchHDRDialog(QWidget *parent = 0, QSqlDatabase db = QSqlDatabase::database()); ~BatchHDRDialog(); -signals: + signals: void setValue(int); -protected slots: + protected slots: void num_bracketed_changed(int); void on_selectInputFolder_clicked(); void on_selectOutputFolder_clicked(); @@ -64,8 +65,8 @@ void batch_hdr(); void align(); void create_hdr(int); - void error_while_loading(QString); - void writeAisData(QByteArray); + void error_while_loading(const QString &); + void writeAisData(QByteArray &); void check_start_button(); void on_cancelButton_clicked(); void align_selection_clicked(); @@ -76,16 +77,16 @@ void ais_failed(QProcess::ProcessError); void createHdrFinished(); void loadFilesAborted(); + void on_profileComboBox_activated(int); -protected: - LuminanceOptions m_luminance_options; - - //Application-wide settings, loaded via QSettings + protected: + // Application-wide settings, loaded via QSettings QString m_batchHdrInputDir; QString m_batchHdrOutputDir; QString m_tempDir; QStringList m_bracketed; + QString m_output_file_name_base; IOWorker *m_IO_Worker; HdrCreationManager *m_hdrCreationManager; int m_numProcessed; @@ -95,9 +96,10 @@ bool m_loading_error; bool m_abort; bool m_processing; + QSqlDatabase m_db; QVector m_customConfig; QFutureWatcher m_futureWatcher; - QFuture m_future; + QFuture m_future; ProgressHelper m_ph; bool m_patches[agGridSize][agGridSize]; pfsadditions::FormatHelper m_formatHelper; diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.ui luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.ui --- luminance-hdr-2.5.1+dfsg/src/BatchHDR/BatchHDRDialog.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchHDR/BatchHDRDialog.ui 2019-06-09 19:18:38.000000000 +0000 @@ -6,8 +6,8 @@ 0 0 - 571 - 697 + 622 + 729 @@ -101,20 +101,7 @@ - - - - - Qt::Vertical - - - - 20 - 40 - - - - + @@ -131,17 +118,13 @@ - - - - Predefined profile: + + + + false - - - - - Output format: + Filename prefix: @@ -186,6 +169,63 @@ + + + + Output format: + + + + + + + false + + + hdr_ + + + + + + + <html><head/><body><p>With leaving this checked, filenames for created HDRs will be of the form <span style=" font-style:italic;">first-last_HdrCreationModel.ext </span>where first is the file name of 1st braketed image in the set, last is the file name of the last bracketed image in the set and extension is the selected HDR file format extension.</p></body></html> + + + Use Proposed Filename Scheme + + + true + + + + + + + Response: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Weights: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Predefined profile: + + + @@ -193,6 +233,37 @@ + + + + Model: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Debevec + + + + + + + Triangular + + + + + + + Linear + + + @@ -208,16 +279,19 @@ - - + + - true + false - Auto align the bracketed pictures + Use Hugin's align_image_stack engine - Auto-align images + Hugin's align_&image_stack + + + true @@ -234,34 +308,31 @@ - - + + - false + true - Use Hugin's align_image_stack engine + Auto align the bracketed pictures - Hugin's align_&image_stack + Auto-align images - - true + + + + + + false + + + Auto-crop - - - - false - - - Auto-crop - - - @@ -333,20 +404,10 @@ - - - 0 - - - - 0 - - Qt::AlignCenter - @@ -552,10 +613,11 @@ formatComboBox formatSettingsButton profileComboBox + proposedFilenameCheckBox + prefixLineEdit autoAlignCheckBox aisRadioButton MTBRadioButton - autoCropCheckBox autoAG_checkBox threshold_horizontalSlider threshold_doubleSpinBox @@ -579,12 +641,12 @@ setValue(int) - 560 - 32 + 614 + 35 - 492 - 33 + 508 + 32 @@ -595,12 +657,12 @@ setValue(int) - 492 - 33 + 508 + 32 - 560 - 32 + 614 + 35 @@ -611,8 +673,8 @@ accept() - 560 - 691 + 614 + 721 285 @@ -627,12 +689,12 @@ setEnabled(bool) - 549 - 252 + 606 + 341 - 402 - 302 + 519 + 395 @@ -643,12 +705,12 @@ setEnabled(bool) - 549 - 252 + 606 + 341 - 550 - 305 + 607 + 400 @@ -659,12 +721,12 @@ setEnabled(bool) - 549 - 252 + 606 + 341 - 89 - 305 + 72 + 400 @@ -675,12 +737,12 @@ setEnabled(bool) - 360 - 91 + 509 + 118 - 383 - 117 + 553 + 158 @@ -691,12 +753,12 @@ setEnabled(bool) - 336 - 93 + 509 + 118 - 335 - 141 + 553 + 198 @@ -707,12 +769,44 @@ setEnabled(bool) - 317 - 85 + 509 + 118 + + + 553 + 254 + + + + + proposedFilenameCheckBox + toggled(bool) + label_4 + setDisabled(bool) + + + 287 + 238 + + + 82 + 273 + + + + + proposedFilenameCheckBox + toggled(bool) + prefixLineEdit + setDisabled(bool) + + + 350 + 238 - 317 - 167 + 350 + 273 diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchHDR/CMakeLists.txt luminance-hdr-2.6.0/src/BatchHDR/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/BatchHDR/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchHDR/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(batchhdr ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(batchhdr Concurrent Core Gui Widgets Sql Xml) +ADD_LIBRARY(batchhdr STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(batchhdr Qt5::Concurrent Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql Qt5::Xml) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} batchhdr PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.cpp luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,378 +27,354 @@ * */ -#include #include - -#ifdef QT_DEBUG -#include -#endif +#include #include -#include -#include +#include #include +#include +#include + +#include +#include -#include "BatchTM/BatchTMDialog.h" -#include "ui_BatchTMDialog.h" +#include +#include +#include +#include +#include +#include -#include "Common/config.h" -#include "Common/SavedParametersDialog.h" -#include "Exif/ExifOperations.h" -#include "Core/TonemappingOptions.h" -#include "BatchTM/BatchTMJob.h" -#include "OsIntegration/osintegration.h" - -BatchTMDialog::BatchTMDialog(QWidget *p): - QDialog(p), m_Ui(new Ui::BatchTMDialog), - start_left(-1), stop_left(-1), start_right(-1), stop_right(-1), m_abort(false) -{ - //qRegisterMetaType("QImage"); // What's its meaning?! -#ifdef QT_DEBUG - qDebug() << "BatchTMDialog::BatchTMDialog()"; -#endif +BatchTMDialog::BatchTMDialog(QWidget *p, QSqlDatabase db) + : QDialog(p), m_Ui(new Ui::BatchTMDialog), m_abort(false), m_db(db) { m_Ui->setupUi(this); - if ( !QIcon::hasThemeIcon("vcs-added") ) + if (!QIcon::hasThemeIcon(QStringLiteral("vcs-added"))) m_Ui->from_Database_Button->setIcon(QIcon(":/program-icons/vcs-added")); - m_batchTmInputDir = m_luminance_options.getBatchTmPathHdrInput(); - m_batchTmTmoSettingsDir = m_luminance_options.getBatchTmPathTmoSettings(); - m_batchTmOutputDir = m_luminance_options.getBatchTmPathLdrOutput(); - m_max_num_threads = m_luminance_options.getBatchTmNumThreads(); - - connect(m_Ui->add_dir_HDRs_Button, SIGNAL(clicked()), this, SLOT(add_dir_HDRs()) ); - connect(m_Ui->add_HDRs_Button, SIGNAL(clicked()), this, SLOT(add_HDRs()) ); - connect(m_Ui->add_dir_TMopts_Button, SIGNAL(clicked()), this, SLOT(add_dir_TMopts()) ); - connect(m_Ui->add_TMopts_Button, SIGNAL(clicked()), this, SLOT(add_TMopts()) ); - connect(m_Ui->out_folder_Button, SIGNAL(clicked()), this, SLOT(out_folder_clicked()) ); - connect(m_Ui->remove_HDRs_Button, SIGNAL(clicked()), this, SLOT(remove_HDRs()) ); - connect(m_Ui->remove_TMOpts_Button, SIGNAL(clicked()), this, SLOT(remove_TMOpts()) ); - connect(m_Ui->BatchGoButton, SIGNAL(clicked()), this, SLOT(batch_core())); //start_called() - connect(m_Ui->cancelbutton, SIGNAL(clicked()), this, SLOT(abort())); - connect(m_Ui->from_Database_Button, SIGNAL(clicked()), this, SLOT(from_database())); - - connect(m_Ui->filterLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(filterChanged(const QString&))); - connect(m_Ui->filterComboBox, SIGNAL(activated(int)), this, SLOT(filterComboBoxActivated(int))); + m_max_num_threads = LuminanceOptions().getBatchTmNumThreads(); - connect(m_Ui->spinBox_Width, SIGNAL(valueChanged(int)), this, SLOT(updateWidth(int))); + connect(m_Ui->add_dir_HDRs_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::add_dir_HDRs); + connect(m_Ui->add_HDRs_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::add_HDRs); + connect(m_Ui->add_dir_TMopts_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::add_dir_TMopts); + connect(m_Ui->add_TMopts_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::add_TMopts); + connect(m_Ui->out_folder_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::out_folder_clicked); + connect(m_Ui->remove_HDRs_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::remove_HDRs); + connect(m_Ui->remove_TMOpts_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::remove_TMOpts); + connect(m_Ui->remove_all_HDRs_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::remove_all_HDRs); + connect(m_Ui->remove_all_TMOpts_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::remove_all_TMOpts); + connect(m_Ui->BatchGoButton, &QAbstractButton::clicked, this, + &BatchTMDialog::batch_core); // start_called() + connect(m_Ui->cancelbutton, &QAbstractButton::clicked, this, + &BatchTMDialog::abort); + connect(m_Ui->from_Database_Button, &QAbstractButton::clicked, this, + &BatchTMDialog::from_database); + connect(m_Ui->filterLineEdit, &QLineEdit::textChanged, this, + &BatchTMDialog::filterChanged); + connect(m_Ui->filterComboBox, + static_cast(&QComboBox::activated), this, + &BatchTMDialog::filterComboBoxActivated); + connect(m_Ui->spinBox_Width, + static_cast(&QSpinBox::valueChanged), this, + &BatchTMDialog::updateWidth); - full_Log_Model = new QStringListModel(); - log_filter = new QSortFilterProxyModel(this); + full_Log_Model = new QStringListModel(); + log_filter = new QSortFilterProxyModel(this); log_filter->setDynamicSortFilter(true); log_filter->setSourceModel(full_Log_Model); m_Ui->Log_Widget->setModel(log_filter); m_Ui->Log_Widget->setWordWrap(true); - m_formatHelper.initConnection(m_Ui->comboBoxFormat, m_Ui->formatSettingsButton, false); + m_formatHelper.initConnection(m_Ui->comboBoxFormat, + m_Ui->formatSettingsButton, false); m_thread_slot.release(m_max_num_threads); m_available_threads = new bool[m_max_num_threads]; - for (int r = 0; r < m_max_num_threads; r++) m_available_threads[r] = true; // reset to true + for (int r = 0; r < m_max_num_threads; r++) + m_available_threads[r] = true; // reset to true m_next_hdr_file = 0; - m_is_batch_running = false; + m_is_batch_running = false; add_log_message(tr("Using %n thread(s)", "", m_max_num_threads)); - //add_log_message(tr("Saving using file format: %1").arg(m_Ui->comboBoxFormat->currentText())); + // add_log_message(tr("Saving using file format: + // %1").arg(m_Ui->comboBoxFormat->currentText())); m_Ui->overallProgressBar->hide(); } -BatchTMDialog::~BatchTMDialog() -{ - //printf("BatchTMDialog::~BatchTMDialog()\n"); +BatchTMDialog::~BatchTMDialog() { this->hide(); delete log_filter; delete full_Log_Model; - delete [] m_available_threads; + delete[] m_available_threads; QApplication::restoreOverrideCursor(); } -void BatchTMDialog::add_dir_HDRs() -{ - //printf("BatchTMDialog::add_dir_HDRs()\n"); - - QString dirname=QFileDialog::getExistingDirectory(this, tr("Choose a directory"), m_batchTmInputDir ); - if ( !dirname.isEmpty() ) - { - m_batchTmInputDir = dirname; - m_luminance_options.setBatchTmPathHdrInput(dirname); // update settings +void BatchTMDialog::add_dir_HDRs() { + QString dirname = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), + LuminanceOptions().getBatchTmPathHdrInput()); + if (!dirname.isEmpty()) { + LuminanceOptions().setBatchTmPathHdrInput(dirname); // update settings QStringList filters; - filters << "*.exr" << "*.hdr" << "*.pic" << "*.tiff" << "*.tif" << "*.pfs" << "*.crw" << "*.cr2" << "*.nef" << "*.dng" << "*.mrw" << "*.orf" << "*.kdc" << "*.dcr" << "*.arw" << "*.raf" << "*.ptx" << "*.pef" << "*.x3f" << "*.raw" << "*.sr2" << "*.rw2" << "*.srw"; - filters << "*.EXR" << "*.HDR" << "*.PIC" << "*.TIFF" << "*.TIF" << "*.PFS" << "*.CRW" << "*.CR2" << "*.NEF" << "*.DNG" << "*.MRW" << "*.ORF" << "*.KDC" << "*.DCR" << "*.ARW" << "*.RAF" << "*.PTX" << "*.PEF" << "*.X3F" << "*.RAW" << "*.SR2" << "*.RW2" << "*.SRW"; + filters << QStringLiteral("*.exr") << QStringLiteral("*.hdr") + << QStringLiteral("*.pic") << QStringLiteral("*.tiff") + << QStringLiteral("*.tif") << QStringLiteral("*.pfs") + << QStringLiteral("*.crw") << QStringLiteral("*.cr2") + << QStringLiteral("*.nef") << QStringLiteral("*.dng") + << QStringLiteral("*.mrw") << QStringLiteral("*.orf") + << QStringLiteral("*.kdc") << QStringLiteral("*.dcr") + << QStringLiteral("*.arw") << QStringLiteral("*.raf") + << QStringLiteral("*.ptx") << QStringLiteral("*.pef") + << QStringLiteral("*.x3f") << QStringLiteral("*.raw") + << QStringLiteral("*.sr2") << QStringLiteral("*.rw2") + << QStringLiteral("*.srw"); + filters << QStringLiteral("*.EXR") << QStringLiteral("*.HDR") + << QStringLiteral("*.PIC") << QStringLiteral("*.TIFF") + << QStringLiteral("*.TIF") << QStringLiteral("*.PFS") + << QStringLiteral("*.CRW") << QStringLiteral("*.CR2") + << QStringLiteral("*.NEF") << QStringLiteral("*.DNG") + << QStringLiteral("*.MRW") << QStringLiteral("*.ORF") + << QStringLiteral("*.KDC") << QStringLiteral("*.DCR") + << QStringLiteral("*.ARW") << QStringLiteral("*.RAF") + << QStringLiteral("*.PTX") << QStringLiteral("*.PEF") + << QStringLiteral("*.X3F") << QStringLiteral("*.RAW") + << QStringLiteral("*.SR2") << QStringLiteral("*.RW2") + << QStringLiteral("*.SRW"); QDir chosendir(dirname); chosendir.setFilter(QDir::Files); chosendir.setNameFilters(filters); - QStringList onlyhdrs=chosendir.entryList(); - //hack to prepend to this list the path as prefix. - onlyhdrs.replaceInStrings(QRegExp("(.+)"), chosendir.path()+"/\\1"); + QStringList onlyhdrs = chosendir.entryList(); + // hack to prepend to this list the path as prefix. + onlyhdrs.replaceInStrings(QRegExp("(.+)"), chosendir.path() + "/\\1"); add_view_model_HDRs(onlyhdrs); } } -void BatchTMDialog::add_HDRs() -{ - //printf("BatchTMDialog::add_HDRs()\n"); - +void BatchTMDialog::add_HDRs() { QString filetypes = tr("All HDR images "); - filetypes += "(*.exr *.hdr *.pic *.tiff *.tif *.pfs *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.srw " - "*.EXR *.HDR *.PIC *.TIFF *.TIF *.PFS *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.SRW)"; - QStringList onlyhdrs = QFileDialog::getOpenFileNames(this, tr("Select input images"), m_batchTmInputDir, filetypes); - add_view_model_HDRs(onlyhdrs); + filetypes += + "(*.exr *.hdr *.pic *.tiff *.tif *.pfs *.crw *.cr2 *.nef *.dng *.mrw " + "*.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef " + "*.x3f *.raw *.sr2 *.rw2 *.srw " + "*.EXR *.HDR *.PIC *.TIFF *.TIF *.PFS *.CRW *.CR2 *.NEF *.DNG *.MRW " + "*.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW " + "*.SR2 *.RW2 *.SRW)"; + QStringList onlyhdrs = QFileDialog::getOpenFileNames( + this, tr("Select input images"), + LuminanceOptions().getBatchTmPathHdrInput(), filetypes); + if (!onlyhdrs.isEmpty()) { + QFileInfo fi(onlyhdrs.first()); + LuminanceOptions().setBatchTmPathHdrInput(fi.absolutePath()); + add_view_model_HDRs(onlyhdrs); + } } -void BatchTMDialog::add_dir_TMopts() -{ - //printf("BatchTMDialog::add_dir_TMopts()\n"); - - QString dirname = QFileDialog::getExistingDirectory(this, tr("Choose a directory"), m_batchTmTmoSettingsDir); - if ( !dirname.isEmpty() ) - { - m_batchTmTmoSettingsDir = dirname; - m_luminance_options.setBatchTmPathTmoSettings(dirname); // update settings +void BatchTMDialog::add_dir_TMopts() { + QString dirname = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), + LuminanceOptions().getBatchTmPathTmoSettings()); + if (!dirname.isEmpty()) { + LuminanceOptions().setBatchTmPathTmoSettings( + dirname); // update settings QStringList filters; - filters << "*.txt"; + filters << QStringLiteral("*.txt"); QDir chosendir(dirname); chosendir.setFilter(QDir::Files); chosendir.setNameFilters(filters); QStringList onlytxts = chosendir.entryList(); - //hack to prepend to this list the path as prefix. - onlytxts.replaceInStrings(QRegExp("(.+)"), chosendir.path()+"/\\1"); + // hack to prepend to this list the path as prefix. + onlytxts.replaceInStrings(QRegExp("(.+)"), chosendir.path() + "/\\1"); add_view_model_TM_OPTs(onlytxts); } } -void BatchTMDialog::add_TMopts() -{ - //printf("BatchTMDialog::add_TMopts()\n"); - - QStringList onlytxts = QFileDialog::getOpenFileNames(this, - tr("Load tone mapping settings text files..."), - m_batchTmTmoSettingsDir, - tr("Luminance HDR tone mapping settings text file (*.txt)")); - add_view_model_TM_OPTs(onlytxts); -} - -TonemappingOptions* BatchTMDialog::parse_tm_opt_file(QString fname) -{ - //printf("BatchTMDialog::parse_tm_opt_file()\n"); +void BatchTMDialog::add_TMopts() { + QStringList onlytxts = QFileDialog::getOpenFileNames( + this, tr("Load tone mapping settings text files..."), + LuminanceOptions().getBatchTmPathTmoSettings(), + tr("Luminance HDR tone mapping settings text file (*.txt)")); + if (!onlytxts.isEmpty()) { + QFileInfo fi(onlytxts.first()); + LuminanceOptions().setBatchTmPathTmoSettings(fi.absolutePath()); + add_view_model_TM_OPTs(onlytxts); + } +} - try - { +TonemappingOptions *BatchTMDialog::parse_tm_opt_file(const QString &fname) { + try { return TMOptionsOperations::parseFile(fname); - } - catch (QString &e) - { + } catch (QString &e) { add_log_message(e); return NULL; } } -void BatchTMDialog::check_enable_start() -{ - //printf("BatchTMDialog::check_enable_start()\n"); - - //at least 1 hdr AND at least 1 tm_opt AND output_dir not empty +void BatchTMDialog::check_enable_start() { + // at least 1 hdr AND at least 1 tm_opt AND output_dir not empty m_Ui->BatchGoButton->setEnabled( - (!m_Ui->out_folder_widgets->text().isEmpty()) && - (m_Ui->listWidget_HDRs->count() != 0) && - (m_Ui->listWidget_TMopts->count() != 0) - ); + (!m_Ui->out_folder_widgets->text().isEmpty()) && + (m_Ui->listWidget_HDRs->count() != 0) && + (m_Ui->listWidget_TMopts->count() != 0)); } -void BatchTMDialog::out_folder_clicked() -{ - //printf("BatchTMDialog::out_folder_clicked()\n"); +void BatchTMDialog::out_folder_clicked() { + QString proposedDirname = LuminanceOptions().getBatchTmPathLdrOutput(); - QString dirname = QFileDialog::getExistingDirectory(this, tr("Choose a directory"), m_batchTmOutputDir); + QString dirname = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), proposedDirname); QFileInfo test(dirname); - if (test.isWritable() && test.exists() && test.isDir() && !dirname.isEmpty()) - { - m_batchTmOutputDir = dirname; - m_luminance_options.setBatchTmPathLdrOutput(m_batchTmOutputDir); + if (test.isWritable() && test.exists() && test.isDir() && + !dirname.isEmpty()) { + LuminanceOptions().setBatchTmPathLdrOutput(dirname); m_Ui->out_folder_widgets->setText(dirname); check_enable_start(); } } -void BatchTMDialog::add_view_model_HDRs(QStringList list) -{ - //printf("BatchTMDialog::add_view_model_HDRs()\n"); - for (int idx = 0; idx < list.size(); ++idx) - { - //fill graphical list - m_Ui->listWidget_HDRs->addItem(QFileInfo(list.at(idx)).fileName()); +void BatchTMDialog::add_view_model_HDRs(const QStringList &list) { + for (int idx = 0; idx < list.size(); ++idx) { + // fill graphical list + QListWidgetItem *item = new QListWidgetItem(); + item->setData(Qt::DisplayRole, QFileInfo(list.at(idx)).fileName()); + item->setData(Qt::UserRole + 1, + QFileInfo(list.at(idx)).absoluteFilePath()); + m_Ui->listWidget_HDRs->addItem(item); } - HDRs_list += list; + // HDRs_list += list; check_enable_start(); } -void BatchTMDialog::add_view_model_TM_OPTs(QStringList list) -{ - //printf("BatchTMDialog::add_view_model_TM_OPTs()\n"); +void BatchTMDialog::add_view_model_TM_OPTs(const QStringList &list) { + bool errors = false; - for (int idx = 0; idx < list.size(); ++idx) - { + for (int idx = 0; idx < list.size(); ++idx) { QString curr_tmo_options_file = list.at(idx); - TonemappingOptions *i_th_tm_opt = parse_tm_opt_file(curr_tmo_options_file); + TonemappingOptions *i_th_tm_opt = + parse_tm_opt_file(curr_tmo_options_file); - if (i_th_tm_opt != NULL) - { + if (i_th_tm_opt != NULL) { i_th_tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); - //add to data structure + // add to data structure m_tm_options_list.append(i_th_tm_opt); - //add to UI - m_Ui->listWidget_TMopts->addItem(QFileInfo(curr_tmo_options_file).fileName()); + // add to UI + m_Ui->listWidget_TMopts->addItem( + QFileInfo(curr_tmo_options_file).fileName()); + } else { + errors = true; } } + if (errors) { + QMessageBox::warning(0, tr("Warning"), + tr("An error occurred reading one or more " + "tonemapping options files."), + QMessageBox::Ok, QMessageBox::NoButton); + } check_enable_start(); } -//TODO: questa merda deve essere sistemata... stasera! -void BatchTMDialog::update_selection_interval(bool left) -{ - //printf("BatchTMDialog::update_selection_interval()\n"); - - if (left) - { - start_left = m_Ui->listWidget_HDRs->count(); - stop_left = -1; - for ( int i = 0; i < m_Ui->listWidget_HDRs->count(); ++i ) - { - if ( m_Ui->listWidget_HDRs->isItemSelected(m_Ui->listWidget_HDRs->item(i)) ) - { - start_left= (start_left>i) ? i : start_left; - stop_left= (stop_leftlistWidget_TMopts->count(); - stop_right = -1; - for ( int i = 0; i < m_Ui->listWidget_TMopts->count(); ++i ) - { - if ( m_Ui->listWidget_TMopts->isItemSelected(m_Ui->listWidget_TMopts->item(i)) ) - { - start_right= (start_right>i) ? i : start_right; - stop_right= (stop_rightlistWidget_HDRs->selectedItems()); + check_enable_start(); } -void BatchTMDialog::remove_HDRs() -{ - //printf("BatchTMDialog::remove_HDRs()\n"); - - update_selection_interval(true); - if ( m_Ui->listWidget_HDRs->count()==0 || start_left==-1 || stop_left==-1 ) - { - return; - } - - for ( int i = (stop_left - start_left + 1); i > 0; i--) - { - m_Ui->listWidget_HDRs->takeItem(start_left); - HDRs_list.removeAt(start_left); - } - start_left = stop_left = -1; +void BatchTMDialog::remove_all_HDRs() { + m_Ui->listWidget_HDRs->clear(); check_enable_start(); } -void BatchTMDialog::remove_TMOpts() -{ - //printf("BatchTMDialog::remove_TMOpts()\n"); - - update_selection_interval(false); - if ( (m_Ui->listWidget_TMopts->count() == 0) || (start_right == -1) || (stop_right == -1) ) - { - return; +void BatchTMDialog::remove_TMOpts() { + // qDeleteAll(m_Ui->listWidget_TMopts->selectedItems()); + QList items = m_Ui->listWidget_TMopts->selectedItems(); + for (auto &item : items) { + int row = m_Ui->listWidget_TMopts->row(item); + delete m_Ui->listWidget_TMopts->takeItem(row); + delete m_tm_options_list.takeAt(row); } + check_enable_start(); +} - for (int i = (stop_right - start_right + 1); i > 0; i--) - { - m_Ui->listWidget_TMopts->takeItem(start_right); - m_tm_options_list.removeAt(start_right); - } - start_right = stop_right = -1; +void BatchTMDialog::remove_all_TMOpts() { + m_Ui->listWidget_TMopts->clear(); + qDeleteAll(m_tm_options_list); + m_tm_options_list.clear(); check_enable_start(); } -void BatchTMDialog::add_log_message(const QString& message) -{ +void BatchTMDialog::add_log_message(const QString &message) { // Mutex lock! m_add_log_message_mutex.lock(); - //qDebug() << qPrintable(message); full_Log_Model->insertRows(full_Log_Model->rowCount(), 1); - full_Log_Model->setData(full_Log_Model->index(full_Log_Model->rowCount()-1), message, Qt::DisplayRole); + full_Log_Model->setData( + full_Log_Model->index(full_Log_Model->rowCount() - 1), message, + Qt::DisplayRole); m_Ui->Log_Widget->scrollToBottom(); // Mutex unlock! m_add_log_message_mutex.unlock(); } -void BatchTMDialog::filterChanged(const QString& newtext) -{ - //printf("BatchTMDialog::filterChanged()\n"); - +void BatchTMDialog::filterChanged(const QString &newtext) { bool no_text = newtext.isEmpty(); m_Ui->filterComboBox->setEnabled(no_text); m_Ui->filterLabel1->setEnabled(no_text); m_Ui->clearTextToolButton->setEnabled(!no_text); - if (no_text) - { + if (no_text) { filterComboBoxActivated(m_Ui->filterComboBox->currentIndex()); - } - else - { - log_filter->setFilterRegExp(QRegExp(newtext, Qt::CaseInsensitive, QRegExp::RegExp)); + } else { + log_filter->setFilterRegExp( + QRegExp(newtext, Qt::CaseInsensitive, QRegExp::RegExp)); } } -void BatchTMDialog::filterComboBoxActivated(int index) -{ - //printf("BatchTMDialog::filterComboBoxActivated()\n"); - +void BatchTMDialog::filterComboBoxActivated(int index) { QString regexp; - switch (index) - { - case 0: - regexp = ".*"; - break; - case 1: - regexp = "error"; - break; - case 2: - regexp = "successful"; - break; + switch (index) { + case 0: + regexp = QStringLiteral(".*"); + break; + case 1: + regexp = QStringLiteral("error"); + break; + case 2: + regexp = QStringLiteral("successful"); + break; } - log_filter->setFilterRegExp(QRegExp(regexp, Qt::CaseInsensitive, QRegExp::RegExp)); + log_filter->setFilterRegExp( + QRegExp(regexp, Qt::CaseInsensitive, QRegExp::RegExp)); } - - // Davide Anastasia -void BatchTMDialog::batch_core() -{ - //printf("BatchTMDialog::batch_core()\n"); +void BatchTMDialog::batch_core() { init_batch_tm_ui(); - - start_batch_thread(); // kick off the conversion! + for (int row = 0; row < m_Ui->listWidget_HDRs->count(); row++) { + HDRs_list << m_Ui->listWidget_HDRs->item(row) + ->data(Qt::UserRole + 1) + .toString(); + } + start_batch_thread(); // kick off the conversion! } - -void BatchTMDialog::start_batch_thread() -{ +void BatchTMDialog::start_batch_thread() { // lock the class resources in order to work free of race-condition m_class_data_mutex.lock(); @@ -408,42 +384,42 @@ return; } - if ( m_next_hdr_file == HDRs_list.size() ) - { + if (m_next_hdr_file == HDRs_list.size()) { m_class_data_mutex.unlock(); emit stop_batch_tm_ui(); - } - else - { + } else { int t_id = get_available_thread_id(); - if ( t_id != INT_MAX ) - { + if (t_id != INT_MAX) { // at least one thread free! // start thread - // I create the thread with NEW, but I let it die on its own, so don't need to store its pointer somewhere + // I create the thread with NEW, but I let it die on its own, so + // don't + // need to store its pointer somewhere QString fileExtension = m_formatHelper.getFileExtension(); - BatchTMJob * job_thread = new BatchTMJob(t_id, HDRs_list.at(m_next_hdr_file), &m_tm_options_list, m_Ui->out_folder_widgets->text(), - fileExtension, m_formatHelper.getParams()); + BatchTMJob *job_thread = new BatchTMJob( + t_id, HDRs_list.at(m_next_hdr_file), &m_tm_options_list, + m_Ui->out_folder_widgets->text(), fileExtension, + m_formatHelper.getParams()); // Thread deletes itself when it has done with its job - connect(job_thread, SIGNAL(finished()), - job_thread, SLOT(deleteLater())); - connect(job_thread, SIGNAL(done(int)), - this, SLOT(release_thread(int))); //, Qt::DirectConnection); - connect(job_thread, SIGNAL(add_log_message(const QString &)), - this, SLOT(add_log_message(const QString &))); //, Qt::DirectConnection); - connect(job_thread, SIGNAL(increment_progress_bar(int)), - this, SLOT(increment_progress_bar(int))); //, Qt::DirectConnection); + connect(job_thread, &QThread::finished, job_thread, + &QObject::deleteLater); + connect(job_thread, &BatchTMJob::done, this, + &BatchTMDialog::release_thread); //, Qt::DirectConnection); + connect( + job_thread, &BatchTMJob::add_log_message, this, + &BatchTMDialog::add_log_message); //, Qt::DirectConnection); + connect(job_thread, &BatchTMJob::increment_progress_bar, this, + &BatchTMDialog:: + increment_progress_bar); //, Qt::DirectConnection); job_thread->start(); m_next_hdr_file++; m_class_data_mutex.unlock(); emit start_batch_thread(); - } - else - { + } else { m_class_data_mutex.unlock(); // no thread available! // I return without doing anything! @@ -452,36 +428,28 @@ } } -int BatchTMDialog::get_available_thread_id() -{ - if ( m_thread_slot.tryAcquire() ) - { +int BatchTMDialog::get_available_thread_id() { + if (m_thread_slot.tryAcquire()) { // if I'm here, at least one thread is available m_thread_control_mutex.lock(); int t_id; // look for the first available ID - for (t_id = 0; t_id < m_max_num_threads; t_id++) - { - if (m_available_threads[t_id] == true) - { + for (t_id = 0; t_id < m_max_num_threads; t_id++) { + if (m_available_threads[t_id] == true) { m_available_threads[t_id] = false; break; } } m_thread_control_mutex.unlock(); - //printf("BatchTMDialog::get_available_thread_id(): t_id = %d, max_num_threads = %d\n", t_id, m_max_num_threads); - assert ( t_id != m_max_num_threads ); + assert(t_id != m_max_num_threads); return (t_id); - } - else return INT_MAX; + } else + return INT_MAX; } -void BatchTMDialog::release_thread(int t_id) -{ - //printf("BatchTMDialog::release_thread()\n"); - +void BatchTMDialog::release_thread(int t_id) { m_thread_control_mutex.lock(); m_available_threads[t_id] = true; m_thread_control_mutex.unlock(); @@ -491,21 +459,18 @@ emit start_batch_thread(); } -void BatchTMDialog::init_batch_tm_ui() -{ - //printf("BatchTMDialog::init_batch_tm_ui()\n"); - +void BatchTMDialog::init_batch_tm_ui() { m_is_batch_running = true; // progress bar activated m_Ui->overallProgressBar->show(); - m_Ui->overallProgressBar->setMaximum( m_Ui->listWidget_HDRs->count()*(m_Ui->listWidget_TMopts->count() + 1) ); + m_Ui->overallProgressBar->setMaximum( + m_Ui->listWidget_HDRs->count() * + (m_Ui->listWidget_TMopts->count() + 1)); m_Ui->overallProgressBar->setValue(0); // disable all buttons! - //m_Ui->cancelbutton->setDisabled(true); m_Ui->BatchGoButton->setDisabled(true); - m_Ui->out_folder_Button->setDisabled(true); m_Ui->add_dir_HDRs_Button->setDisabled(true); m_Ui->add_HDRs_Button->setDisabled(true); m_Ui->remove_HDRs_Button->setDisabled(true); @@ -513,10 +478,9 @@ m_Ui->add_TMopts_Button->setDisabled(true); m_Ui->remove_TMOpts_Button->setDisabled(true); m_Ui->from_Database_Button->setDisabled(true); - m_Ui->horizontalSlider_Width->setDisabled(true); - m_Ui->spinBox_Width->setDisabled(true); - m_Ui->comboBoxFormat->setDisabled(true); - m_Ui->formatSettingsButton->setDisabled(true); + m_Ui->remove_all_HDRs_Button->setDisabled(true); + m_Ui->remove_all_TMOpts_Button->setDisabled(true); + m_Ui->groupBoxOutput->setDisabled(true); // mouse pointer to busy QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); @@ -527,16 +491,18 @@ add_log_message(tr("Start processing...")); } -void BatchTMDialog::stop_batch_tm_ui() -{ - if ( m_thread_slot.tryAcquire(m_max_num_threads) ) - { - +void BatchTMDialog::stop_batch_tm_ui() { + if (m_thread_slot.tryAcquire(m_max_num_threads)) { m_Ui->cancelbutton->setDisabled(false); m_Ui->cancelbutton->setText(tr("Close")); m_Ui->BatchGoButton->setText(tr("&Done")); - add_log_message(tr("All tasks completed.")); + + if (m_abort) + add_log_message(tr("Conversion aborted by user request.")); + else + add_log_message(tr("All tasks completed.")); + QApplication::restoreOverrideCursor(); m_is_batch_running = false; @@ -545,190 +511,259 @@ } } -void BatchTMDialog::closeEvent( QCloseEvent* ce ) -{ -#ifdef QT_DEBUG - qDebug() << "BatchTMDialog::closeEvent()"; -#endif +void BatchTMDialog::closeEvent(QCloseEvent *ce) { OsIntegration::getInstance().setProgress(-1); - if ( m_is_batch_running ) + if (m_is_batch_running) ce->ignore(); else ce->accept(); } -void BatchTMDialog::increment_progress_bar(int inc) -{ - int progressValue = m_Ui->overallProgressBar->value()+inc; +void BatchTMDialog::increment_progress_bar(int inc) { + int progressValue = m_Ui->overallProgressBar->value() + inc; m_Ui->overallProgressBar->setValue(progressValue); - OsIntegration::getInstance().setProgress(progressValue - m_Ui->overallProgressBar->minimum(), m_Ui->overallProgressBar->maximum()); + OsIntegration::getInstance().setProgress( + progressValue - m_Ui->overallProgressBar->minimum(), + m_Ui->overallProgressBar->maximum()); } -void BatchTMDialog::abort() -{ +void BatchTMDialog::abort() { if (m_is_batch_running) { m_abort = true; m_Ui->cancelbutton->setText(tr("Aborting...")); m_Ui->cancelbutton->setEnabled(false); - } - else + } else this->reject(); } -void BatchTMDialog::updateWidth(int newWidth_in_percent) -{ - TonemappingOptions *opt; - foreach (opt, m_tm_options_list) { +void BatchTMDialog::updateWidth(int newWidth_in_percent) { + foreach (TonemappingOptions *opt, m_tm_options_list) { opt->xsize_percent = newWidth_in_percent; } } -void BatchTMDialog::from_database() -{ - SavedParametersDialog dialog(this); +void BatchTMDialog::from_database() { + SavedParametersDialog dialog(m_db, this); if (dialog.exec()) { QSqlQueryModel *model = dialog.getModel(); QModelIndexList mil = dialog.getSelectedRows(); - foreach(QModelIndex mi, mil) { + foreach (const QModelIndex &mi, mil) { QString comment, tmOperator; - comment = model->record(mi.row()).value("comment").toString(); - tmOperator = model->record(mi.row()).value("operator").toString(); + comment = model->record(mi.row()) + .value(QStringLiteral("comment")) + .toString(); + tmOperator = model->record(mi.row()) + .value(QStringLiteral("operator")) + .toString(); - QSqlTableModel *temp_model = new QSqlTableModel; + QSqlTableModel *temp_model = new QSqlTableModel(nullptr, m_db); temp_model->setTable(tmOperator); temp_model->select(); - QSqlQuery query("SELECT * from " + tmOperator + " WHERE comment = '" + comment + "'"); + QSqlQuery query("SELECT * from " + tmOperator + + " WHERE comment = '" + comment + "'", m_db); TonemappingOptions *tm_opt = new TonemappingOptions; - if (tmOperator == "ashikhmin") { + if (tmOperator == QLatin1String("ashikhmin")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = ashikhmin; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.ashikhminoptions.simple = query.value(0).toBool(); - tm_opt->operator_options.ashikhminoptions.eq2 = query.value(1).toBool(); - tm_opt->operator_options.ashikhminoptions.lct = query.value(2).toFloat(); + tm_opt->operator_options.ashikhminoptions.simple = + query.value(0).toBool(); + tm_opt->operator_options.ashikhminoptions.eq2 = + query.value(1).toBool(); + tm_opt->operator_options.ashikhminoptions.lct = + query.value(2).toFloat(); tm_opt->pregamma = query.value(3).toFloat(); } - } - else if (tmOperator == "drago") { + } else if (tmOperator == QLatin1String("drago")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = drago; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.dragooptions.bias = query.value(0).toFloat(); + tm_opt->operator_options.dragooptions.bias = + query.value(0).toFloat(); tm_opt->pregamma = query.value(1).toFloat(); } - } - else if (tmOperator == "durand") { + } else if (tmOperator == QLatin1String("durand")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = durand; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.durandoptions.spatial = query.value(0).toFloat(); - tm_opt->operator_options.durandoptions.range = query.value(1).toFloat(); - tm_opt->operator_options.durandoptions.base = query.value(2).toFloat(); + tm_opt->operator_options.durandoptions.spatial = + query.value(0).toFloat(); + tm_opt->operator_options.durandoptions.range = + query.value(1).toFloat(); + tm_opt->operator_options.durandoptions.base = + query.value(2).toFloat(); tm_opt->pregamma = query.value(3).toFloat(); } - } - else if (tmOperator == "fattal") { + } else if (tmOperator == QLatin1String("fattal")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = fattal; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.fattaloptions.alpha = query.value(0).toFloat(); - tm_opt->operator_options.fattaloptions.beta = query.value(1).toFloat(); - tm_opt->operator_options.fattaloptions.color = query.value(2).toFloat(); - tm_opt->operator_options.fattaloptions.noiseredux = query.value(3).toFloat(); - tm_opt->operator_options.fattaloptions.newfattal = !query.value(4).toBool(); - tm_opt->operator_options.fattaloptions.fftsolver = !query.value(4).toBool(); + tm_opt->operator_options.fattaloptions.alpha = + query.value(0).toFloat(); + tm_opt->operator_options.fattaloptions.beta = + query.value(1).toFloat(); + tm_opt->operator_options.fattaloptions.color = + query.value(2).toFloat(); + tm_opt->operator_options.fattaloptions.noiseredux = + query.value(3).toFloat(); + tm_opt->operator_options.fattaloptions.newfattal = + !query.value(4).toBool(); + tm_opt->operator_options.fattaloptions.fftsolver = + !query.value(4).toBool(); tm_opt->pregamma = query.value(5).toFloat(); } - } - else if (tmOperator == "ferradans") { + } else if (tmOperator == QLatin1String("ferradans")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = ferradans; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.ferradansoptions.rho = query.value(0).toFloat(); - tm_opt->operator_options.ferradansoptions.inv_alpha = query.value(1).toFloat(); + tm_opt->operator_options.ferradansoptions.rho = + query.value(0).toFloat(); + tm_opt->operator_options.ferradansoptions.inv_alpha = + query.value(1).toFloat(); tm_opt->pregamma = query.value(2).toFloat(); } - } - else if (tmOperator == "mantiuk06") { + } else if (tmOperator == QLatin1String("mantiuk06")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = mantiuk06; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.mantiuk06options.contrastfactor = query.value(1).toFloat(); - tm_opt->operator_options.mantiuk06options.saturationfactor = query.value(2).toFloat(); - tm_opt->operator_options.mantiuk06options.detailfactor = query.value(3).toFloat(); - tm_opt->operator_options.mantiuk06options.contrastequalization = query.value(0).toBool(); + tm_opt->operator_options.mantiuk06options.contrastfactor = + query.value(1).toFloat(); + tm_opt->operator_options.mantiuk06options.saturationfactor = + query.value(2).toFloat(); + tm_opt->operator_options.mantiuk06options.detailfactor = + query.value(3).toFloat(); + tm_opt->operator_options.mantiuk06options + .contrastequalization = query.value(0).toBool(); tm_opt->pregamma = query.value(4).toFloat(); } - } - else if (tmOperator == "mantiuk08") { + } else if (tmOperator == QLatin1String("mantiuk08")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = mantiuk08; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.mantiuk08options.colorsaturation = query.value(0).toFloat(); - tm_opt->operator_options.mantiuk08options.contrastenhancement = query.value(1).toFloat(); - tm_opt->operator_options.mantiuk08options.luminancelevel = query.value(2).toFloat(); - tm_opt->operator_options.mantiuk08options.setluminance = query.value(3).toBool(); + tm_opt->operator_options.mantiuk08options.colorsaturation = + query.value(0).toFloat(); + tm_opt->operator_options.mantiuk08options + .contrastenhancement = query.value(1).toFloat(); + tm_opt->operator_options.mantiuk08options.luminancelevel = + query.value(2).toFloat(); + tm_opt->operator_options.mantiuk08options.setluminance = + query.value(3).toBool(); tm_opt->pregamma = query.value(4).toFloat(); } - } - else if (tmOperator == "pattanaik") { + } else if (tmOperator == QLatin1String("pattanaik")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = pattanaik; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.pattanaikoptions.autolum = query.value(4).toBool(); - tm_opt->operator_options.pattanaikoptions.local = query.value(3).toBool(); - tm_opt->operator_options.pattanaikoptions.cone = query.value(1).toFloat(); - tm_opt->operator_options.pattanaikoptions.rod = query.value(2).toFloat(); - tm_opt->operator_options.pattanaikoptions.multiplier = query.value(0).toFloat(); + tm_opt->operator_options.pattanaikoptions.autolum = + query.value(4).toBool(); + tm_opt->operator_options.pattanaikoptions.local = + query.value(3).toBool(); + tm_opt->operator_options.pattanaikoptions.cone = + query.value(1).toFloat(); + tm_opt->operator_options.pattanaikoptions.rod = + query.value(2).toFloat(); + tm_opt->operator_options.pattanaikoptions.multiplier = + query.value(0).toFloat(); tm_opt->pregamma = query.value(5).toFloat(); } - } - else if (tmOperator == "reinhard02") { + } else if (tmOperator == QLatin1String("reinhard02")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = reinhard02; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.reinhard02options.scales = query.value(0).toBool(); - tm_opt->operator_options.reinhard02options.key = query.value(1).toFloat(); - tm_opt->operator_options.reinhard02options.phi = query.value(2).toFloat(); - tm_opt->operator_options.reinhard02options.range = query.value(3).toInt(); - tm_opt->operator_options.reinhard02options.lower = query.value(4).toInt(); - tm_opt->operator_options.reinhard02options.upper = query.value(5).toInt(); + tm_opt->operator_options.reinhard02options.scales = + query.value(0).toBool(); + tm_opt->operator_options.reinhard02options.key = + query.value(1).toFloat(); + tm_opt->operator_options.reinhard02options.phi = + query.value(2).toFloat(); + tm_opt->operator_options.reinhard02options.range = + query.value(3).toInt(); + tm_opt->operator_options.reinhard02options.lower = + query.value(4).toInt(); + tm_opt->operator_options.reinhard02options.upper = + query.value(5).toInt(); tm_opt->pregamma = query.value(6).toFloat(); } - } - else if (tmOperator == "reinhard05") { + } else if (tmOperator == QLatin1String("reinhard05")) { m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); tm_opt->tmoperator = reinhard05; tm_opt->tonemapSelection = false; while (query.next()) { - tm_opt->operator_options.reinhard05options.brightness = query.value(0).toFloat(); - tm_opt->operator_options.reinhard05options.chromaticAdaptation = query.value(1).toFloat(); - tm_opt->operator_options.reinhard05options.lightAdaptation = query.value(2).toFloat(); + tm_opt->operator_options.reinhard05options.brightness = + query.value(0).toFloat(); + tm_opt->operator_options.reinhard05options + .chromaticAdaptation = query.value(1).toFloat(); + tm_opt->operator_options.reinhard05options.lightAdaptation = + query.value(2).toFloat(); tm_opt->pregamma = query.value(3).toFloat(); } + } else if (tmOperator == QLatin1String("ferwerda")) { + m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); + tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); + tm_opt->tmoperator = ferwerda; + tm_opt->tonemapSelection = false; + while (query.next()) { + tm_opt->operator_options.ferwerdaoptions.multiplier = + query.value(0).toFloat(); + tm_opt->operator_options.ferwerdaoptions.adaptationluminance = + query.value(1).toFloat(); + tm_opt->pregamma = query.value(2).toFloat(); + } + } else if (tmOperator == QLatin1String("kimkautz")) { + m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); + tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); + tm_opt->tmoperator = kimkautz; + tm_opt->tonemapSelection = false; + while (query.next()) { + tm_opt->operator_options.kimkautzoptions.c1 = + query.value(0).toFloat(); + tm_opt->operator_options.kimkautzoptions.c2 = + query.value(1).toFloat(); + tm_opt->pregamma = query.value(2).toFloat(); + } + } else if (tmOperator == QLatin1String("vanhateren")) { + m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); + tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); + tm_opt->tmoperator = vanhateren; + tm_opt->tonemapSelection = false; + while (query.next()) { + tm_opt->operator_options.vanhaterenoptions.pupil_area = + query.value(0).toFloat(); + tm_opt->pregamma = query.value(1).toFloat(); + } + } else if (tmOperator == QLatin1String("lischinski")) { + m_Ui->listWidget_TMopts->addItem(tmOperator + ": " + comment); + tm_opt->xsize_percent = m_Ui->spinBox_Width->value(); + tm_opt->tmoperator = lischinski; + tm_opt->tonemapSelection = false; + while (query.next()) { + tm_opt->operator_options.lischinskioptions.alpha = + query.value(0).toFloat(); + tm_opt->pregamma = query.value(1).toFloat(); + } } - m_tm_options_list.append(tm_opt); + m_tm_options_list.append(tm_opt); delete temp_model; } } diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.h luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.h --- luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,13 +29,14 @@ #define BATCH_IMPL_H #include -#include -#include -#include #include #include #include +#include +#include +#include #include +#include #include "LibpfsAdditions/formathelper.h" @@ -45,21 +46,20 @@ class TonemappingOptions; namespace Ui { - class BatchTMDialog; +class BatchTMDialog; } -class BatchTMDialog: public QDialog -{ +class BatchTMDialog : public QDialog { Q_OBJECT -private: + private: QScopedPointer m_Ui; -public: - BatchTMDialog(QWidget *parent = 0); + public: + BatchTMDialog(QWidget *parent = 0, QSqlDatabase db = QSqlDatabase::database()); ~BatchTMDialog(); -// protected: -private slots: + // protected: + private slots: void add_dir_HDRs(); void add_HDRs(); void add_dir_TMopts(); @@ -68,11 +68,13 @@ void check_enable_start(); void remove_HDRs(); void remove_TMOpts(); - void filterChanged(const QString&); + void remove_all_HDRs(); + void remove_all_TMOpts(); + void filterChanged(const QString &); void filterComboBoxActivated(int); void abort(); - //fuction that adds a log message to the model + // fuction that adds a log message to the model void add_log_message(const QString &); void batch_core(); @@ -85,62 +87,47 @@ void updateWidth(int); -protected: + protected: void closeEvent(QCloseEvent *); -private: - //Parses a TM_opts file (return NULL on error) - TonemappingOptions* parse_tm_opt_file(QString filename); - - //required for the cache path - LuminanceOptions m_luminance_options; - - //Application-wide settings, loaded via QSettings - QString m_batchTmInputDir; - QString m_batchTmTmoSettingsDir; - QString m_batchTmOutputDir; - - //selection start/stop left/right - //TODO: remove this rubbish, thanks! - int start_left; - int stop_left; - int start_right; - int stop_right; + private: + // Parses a TM_opts file (return NULL on error) + TonemappingOptions *parse_tm_opt_file(const QString &filename); - //data structure (model) for left-side list: HDRs + // data structure (model) for left-side list: HDRs QStringList HDRs_list; // the class that performs regexp filtering - QSortFilterProxyModel * log_filter; + QSortFilterProxyModel *log_filter; // the model that holds the data - QStringListModel * full_Log_Model; + QStringListModel *full_Log_Model; - QMutex m_add_log_message_mutex; + QMutex m_add_log_message_mutex; - QList< TonemappingOptions* > m_tm_options_list; + QList m_tm_options_list; // Davide Anastasia - //Max number of threads allowed - int m_max_num_threads; - QSemaphore m_thread_slot; - QMutex m_thread_control_mutex; - QMutex m_class_data_mutex; - bool m_is_batch_running; - bool * m_available_threads; - bool m_abort; - int m_next_hdr_file; + // Max number of threads allowed + int m_max_num_threads; + QSemaphore m_thread_slot; + QMutex m_thread_control_mutex; + QMutex m_class_data_mutex; + bool m_is_batch_running; + bool *m_available_threads; + bool m_abort; + QSqlDatabase m_db; + int m_next_hdr_file; pfsadditions::FormatHelper m_formatHelper; - int get_available_thread_id(); + int get_available_thread_id(); - void init_batch_tm_ui(); - //when removing we cycle through the list to grab the selected interval - void update_selection_interval(bool left); - //updates graphica widget (view) and data structure (model) for HDR list - void add_view_model_HDRs(QStringList); - //updates graphica widget (view) and data structure (model) for TM_opts list - void add_view_model_TM_OPTs(QStringList); + void init_batch_tm_ui(); + // updates graphica widget (view) and data structure (model) for HDR list + void add_view_model_HDRs(const QStringList &); + // updates graphica widget (view) and data structure (model) for TM_opts + // list + void add_view_model_TM_OPTs(const QStringList &); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.ui luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.ui --- luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMDialog.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/BatchTMDialog.ui 2019-06-09 19:18:38.000000000 +0000 @@ -7,7 +7,7 @@ 0 0 682 - 613 + 652 @@ -49,8 +49,11 @@ List of HDRs that will be tone mapped + + true + - QAbstractItemView::ContiguousSelection + QAbstractItemView::MultiSelection QAbstractItemView::SelectRows @@ -58,14 +61,49 @@ - - - + + + 6 + + + + + + 0 + 0 + + + + + 34 + 40 + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - Add Directory (Alt+D) + Remove Files (Alt+R) - + .. @@ -75,11 +113,34 @@ - Alt+D + Alt+R - + + + + Remove All Files (Alt+X) + + + ... + + + + .. + + + + 24 + 24 + + + + Alt+X + + + + Add Files (Alt+F) @@ -99,13 +160,13 @@ - - + + - Remove Files (Alt+R) + Add Directory (Alt+D) - + .. @@ -115,12 +176,12 @@ - Alt+R + Alt+D - - + + Qt::Vertical @@ -159,14 +220,17 @@ 2 - - - + + + 6 + + + - Add Directory (Alt+I) + Add Files (Alt+L) - + .. @@ -176,17 +240,17 @@ - Alt+I + Alt+L - - + + - Add Files (Alt+L) + Add Directory (Alt+I) - + .. @@ -196,11 +260,11 @@ - Alt+L + Alt+I - + Add from Database (Alt+B) @@ -220,7 +284,7 @@ - + Remove Settings (Alt+M) @@ -240,7 +304,7 @@ - + Qt::Vertical @@ -253,6 +317,42 @@ + + + + Remove All Settings (Alt+W) + + + ... + + + + .. + + + + 24 + 24 + + + + Alt+W + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -260,8 +360,11 @@ List of Tone Mapping Setting files that will be used to tone map each HDR + + true + - QAbstractItemView::ContiguousSelection + QAbstractItemView::MultiSelection QAbstractItemView::SelectRows @@ -274,7 +377,7 @@ - + @@ -581,14 +684,16 @@ listWidget_HDRs - listWidget_TMopts add_dir_HDRs_Button add_HDRs_Button remove_HDRs_Button + remove_all_HDRs_Button + listWidget_TMopts add_dir_TMopts_Button add_TMopts_Button from_Database_Button remove_TMOpts_Button + remove_all_TMOpts_Button comboBoxFormat formatSettingsButton horizontalSlider_Width diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMJob.cpp luminance-hdr-2.6.0/src/BatchTM/BatchTMJob.cpp --- luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMJob.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/BatchTMJob.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,106 +23,127 @@ * */ -#include "BatchTM/BatchTMJob.h" -#include "Exif/ExifOperations.h" -#include "Libpfs/progress.h" -#include "Libpfs/frame.h" -#include "Libpfs/manip/copy.h" -#include "Libpfs/manip/resize.h" -#include "Libpfs/manip/gamma.h" -#include "Libpfs/tm/TonemapOperator.h" - -#include "Core/IOWorker.h" -#include "Common/LuminanceOptions.h" - -#include #include #include +#include #include #include -BatchTMJob::BatchTMJob(int thread_id, const QString &filename, const QList* tm_options, const QString &output_folder, const QString &format, pfs::Params params): - m_thread_id(thread_id), - m_file_name(filename), - m_tm_options(tm_options), - m_output_folder(output_folder), - m_ldr_output_format(format), - m_params(params) -{ - //m_ldr_output_format = LuminanceOptions().getBatchTmLdrFormat(); +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +BatchTMJob::BatchTMJob(int thread_id, const QString &filename, + const QList *tm_options, + const QString &output_folder, const QString &format, + pfs::Params params) + : m_thread_id(thread_id), + m_file_name(filename), + m_tm_options(tm_options), + m_output_folder(output_folder), + m_ldr_output_format(format), + m_params(params) { + // m_ldr_output_format = LuminanceOptions().getBatchTmLdrFormat(); - m_output_file_name_base = m_output_folder + "/" + QFileInfo(m_file_name).completeBaseName(); + m_output_file_name_base = + m_output_folder + "/" + QFileInfo(m_file_name).completeBaseName(); } -BatchTMJob::~BatchTMJob() -{} +BatchTMJob::~BatchTMJob() {} -void BatchTMJob::run() -{ +void BatchTMJob::run() { pfs::Progress prog_helper; IOWorker io_worker; - emit add_log_message(tr("[T%1] Start processing %2").arg(m_thread_id).arg(QFileInfo(m_file_name).completeBaseName())); + emit add_log_message(tr("[T%1] Start processing %2") + .arg(m_thread_id) + .arg(QFileInfo(m_file_name).fileName())); // reference frame - QScopedPointer reference_frame( io_worker.read_hdr_frame(m_file_name) ); + QScopedPointer reference_frame( + io_worker.read_hdr_frame(m_file_name)); - if ( !reference_frame.isNull() ) - { + if (!reference_frame.isNull()) { // update message box - emit add_log_message(tr("[T%1] Successfully load %2").arg(m_thread_id).arg(QFileInfo(m_file_name).completeBaseName())); + emit add_log_message(tr("[T%1] Successfully load %2") + .arg(m_thread_id) + .arg(QFileInfo(m_file_name).fileName())); // update progress bar! emit increment_progress_bar(1); - for (int idx = 0; idx < m_tm_options->size(); ++idx) - { - TonemappingOptions* opts = m_tm_options->at(idx); + for (int idx = 0; idx < m_tm_options->size(); ++idx) { + TonemappingOptions *opts = m_tm_options->at(idx); - opts->tonemapSelection = false; // just to be sure! + opts->tonemapSelection = false; // just to be sure! opts->origxsize = reference_frame->getWidth(); - opts->xsize = (int) opts->origxsize * opts->xsize_percent / 100; + opts->xsize = (int)opts->origxsize * opts->xsize_percent / 100; QScopedPointer temporary_frame; - if ( opts->origxsize == opts->xsize ) - { - temporary_frame.reset( pfs::copy(reference_frame.data()) ); - } - else - { - temporary_frame.reset( pfs::resize(reference_frame.data(), opts->xsize, BilinearInterp) ); + if (opts->origxsize == opts->xsize) { + temporary_frame.reset(pfs::copy(reference_frame.data())); + } else { + temporary_frame.reset(pfs::resize(reference_frame.data(), + opts->xsize, BilinearInterp)); } - if ( opts->pregamma != 1.0f ) - { - pfs::applyGamma(temporary_frame.data(), opts->pregamma ); + if (opts->pregamma != 1.0f) { + pfs::applyGamma(temporary_frame.data(), opts->pregamma); } - QScopedPointer tm_operator( TonemapOperator::getTonemapOperator(opts->tmoperator) ); + QScopedPointer tm_operator( + TonemapOperator::getTonemapOperator(opts->tmoperator)); - tm_operator->tonemapFrame(*temporary_frame, opts, prog_helper); - - QString output_file_name = m_output_file_name_base+"_"+opts->getPostfix()+"."+m_ldr_output_format; + try { + tm_operator->tonemapFrame(*temporary_frame, opts, prog_helper); + } catch (...) { + emit add_log_message( + tr("[T%1] ERROR: Failed to tonemap file: %2") + .arg(m_thread_id) + .arg(QFileInfo(m_file_name).fileName())); + emit increment_progress_bar(m_tm_options->size() + 1); + emit done(m_thread_id); + return; + } - if ( io_worker.write_ldr_frame(temporary_frame.data(), - output_file_name, QString(), - QVector(), opts, - m_params) ) - { - emit add_log_message( tr("[T%1] Successfully saved LDR file: %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) ); + QString output_file_name = m_output_file_name_base + "_" + + opts->getPostfix() + "." + + m_ldr_output_format; + + if (io_worker.write_ldr_frame( + temporary_frame.data(), output_file_name, + "FromHdrFile", // inform we tonemapped an + // existing HDR with no exif + // data + QVector(), opts, m_params)) { + emit add_log_message( + tr("[T%1] Successfully saved LDR file: %2") + .arg(m_thread_id) + .arg(QFileInfo(output_file_name).fileName())); } else { - emit add_log_message( tr("[T%1] ERROR: Cannot save to file: %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) ); + emit add_log_message( + tr("[T%1] ERROR: Cannot save to file: %2") + .arg(m_thread_id) + .arg(QFileInfo(output_file_name).fileName())); } emit increment_progress_bar(1); } - } - else - { + } else { // update message box - //emit add_log_message(error_message); - emit add_log_message(tr("[T%1] ERROR: Loading of %2 failed").arg(m_thread_id).arg(QFileInfo(m_file_name).completeBaseName())); + // emit add_log_message(error_message); + emit add_log_message(tr("[T%1] ERROR: Loading of %2 failed") + .arg(m_thread_id) + .arg(QFileInfo(m_file_name).fileName())); // update progress bar! emit increment_progress_bar(m_tm_options->size() + 1); diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMJob.h luminance-hdr-2.6.0/src/BatchTM/BatchTMJob.h --- luminance-hdr-2.5.1+dfsg/src/BatchTM/BatchTMJob.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/BatchTMJob.h 2019-06-09 19:18:38.000000000 +0000 @@ -20,7 +20,8 @@ * * Original Work * @author Davide Anastasia - * This class splits the "Batch Tonemapping core" from the UI, to achieve a simpler + * This class splits the "Batch Tonemapping core" from the UI, to achieve a + * simpler * code, faster, easier to maintain and more clear to read * */ @@ -28,38 +29,40 @@ #ifndef BATCHTMJOB_H #define BATCHTMJOB_H -#include -#include #include +#include +#include #include // Forward declaration class TonemappingOptions; -class BatchTMJob : public QThread -{ +class BatchTMJob : public QThread { Q_OBJECT -public: - BatchTMJob(int thread_id, const QString& filename, const QList* tm_options, - const QString& output_folder, const QString& ldr_output_format, pfs::Params params); + public: + BatchTMJob(int thread_id, const QString &filename, + const QList *tm_options, + const QString &output_folder, const QString &ldr_output_format, + pfs::Params params); virtual ~BatchTMJob(); -signals: + signals: void done(int thread_id); - void add_log_message(QString); - //void update_progress_bar(); + void add_log_message(const QString &); + // void update_progress_bar(); void increment_progress_bar(int); -protected: + + protected: void run(); -private: - int m_thread_id; - QString m_file_name; - const QList* m_tm_options; - QString m_output_folder; - QString m_output_file_name_base; - QString m_ldr_output_format; - pfs::Params m_params; + private: + int m_thread_id; + QString m_file_name; + const QList *m_tm_options; + QString m_output_folder; + QString m_output_file_name_base; + QString m_ldr_output_format; + pfs::Params m_params; }; -#endif // BATCHTMJOB_H +#endif // BATCHTMJOB_H diff -Nru luminance-hdr-2.5.1+dfsg/src/BatchTM/CMakeLists.txt luminance-hdr-2.6.0/src/BatchTM/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/BatchTM/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/BatchTM/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -12,8 +12,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(batchtm ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(batchtm Core Gui Widgets Sql Xml) +ADD_LIBRARY(batchtm STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(batchtm Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql Qt5::Xml) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} batchtm PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/CMakeLists.txt luminance-hdr-2.6.0/src/Common/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Common/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -7,37 +7,32 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/archs.h.in ${CMAKE_CURRENT_BINARY_DIR}/archs.h @ONLY) -SET(FILES_UI - ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.ui) SET(FILES_H - ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.h ${CMAKE_CURRENT_SOURCE_DIR}/ProgressHelper.h ${CMAKE_CURRENT_SOURCE_DIR}/LuminanceOptions.h) SET(FILES_HXX - #${CMAKE_CURRENT_SOURCE_DIR}/archs.h - #${CMAKE_CURRENT_SOURCE_DIR}/config.h ${CMAKE_CURRENT_SOURCE_DIR}/TranslatorManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/CommonFunctions.h) + ${CMAKE_CURRENT_SOURCE_DIR}/CommonFunctions.h + ${CMAKE_CURRENT_SOURCE_DIR}/init_fftw.h) SET(FILES_CPP - ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/global.cpp ${CMAKE_CURRENT_SOURCE_DIR}/LuminanceOptions.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ProgressHelper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/CommonFunctions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/TranslatorManager.cpp) + ${CMAKE_CURRENT_SOURCE_DIR}/TranslatorManager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/init_fftw.cpp) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(common ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX} ${FILES_UI_H} +ADD_LIBRARY(common STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX} ${CMAKE_CURRENT_BINARY_DIR}/global.hxx ${CMAKE_CURRENT_BINARY_DIR}/config.h ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp) -qt5_use_modules(common Core Gui Widgets Xml Sql) +TARGET_LINK_LIBRARIES(common Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml) -SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE) +SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} common PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} common PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/CommonFunctions.cpp luminance-hdr-2.6.0/src/Common/CommonFunctions.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/CommonFunctions.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/CommonFunctions.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,130 +21,171 @@ * @author Franco Comida */ -#include +#include +#include #include -#include #include +#include #include -#include -#include +#include #include -#include "CommonFunctions.h" -#include "LuminanceOptions.h" -#include "Exif/ExifOperations.h" +#include +#include +#include +#include +#include #include -#include -#include -#include -#include #include #include #include #include -#include -#include -#include -#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include - -#include "Core/IOWorker.h" - +#include using namespace std; using namespace pfs; using namespace pfs::io; +using namespace libhdr::fusion; + +static void build_histogram(valarray &hist, const valarray &src) { + const size_t size = src.size(); -static void build_histogram(valarray &hist, const valarray &src) + size_t numThreads = 1; + +#ifdef _OPENMP + // Because we have an overhead in the critical region of the main loop for each thread + // we make a rough calculation to reduce the number of threads for small data size. + const size_t maxThreads = omp_get_max_threads(); + while (size > numThreads * numThreads * 16384 && numThreads < maxThreads) { + ++numThreads; + } +#endif + + // Original version used a valarray + // We use a valarray, because incrementing a float value of 0.f by 1.f saturates at 16777215.f + valarray histInt(0u, hist.size()); + +#pragma omp parallel num_threads(numThreads) { - const int size = src.size(); - for (int i = 0; i < size; i++) - { - hist[src[i]] += 1.f; + valarray histThr(0u, hist.size()); + + #pragma omp for nowait + for (size_t i = 0; i < size; i++) { + histThr[src[i]]++; + } + + // add per thread histogram to global histogram + #pragma omp critical + for(size_t i = 0; i < hist.size(); i++) { + histInt[i] += histThr[i]; + } +} + + // copy to float histogram + for(size_t i = 0; i < hist.size(); i++) { + hist[i] = histInt[i]; } - //find max + // find max float hist_max = hist.max(); - //normalize in the range [0...1] + // normalize in the range [0...1] hist /= hist_max; } -static void compute_histogram_minmax(const valarray &hist, const float threshold, float &minHist, float &maxHist) -{ - //Scaling factor: range [0..1] - const float scalingFactor = 1.f/255.f; +static void compute_histogram_minmax(const valarray &hist, + const float threshold, float &minHist, + float &maxHist) { + // Scaling factor: range [0..1] + const float scalingFactor = 1.f / 255.f; const int hist_size = hist.size(); float CUMUL = hist.sum(); - //Start from max hist + // Start from max hist float hist_max = 0.f; - int xa = 0; - for (int i = 0; i < hist_size; i++) - { - if ( hist[i] > hist_max ) - { + int xmax = 0; + for (int i = 0; i < hist_size; i++) { + if (hist[i] > hist_max) { hist_max = hist[i]; - xa = i; + xmax = i; } } - if (xa >= hist_size - 1) - { - xa = hist_size - 2; + if (xmax >= hist_size - 1) { + xmax = hist_size - 2; + } + if (xmax == 0) { + xmax = 1; } - int xb = xa + 1; + int xa = xmax - 1; + int xb = xmax + 1; - const float Threshold = threshold*CUMUL; + float CUMUL_A = hist[slice(0, xmax, 1)].sum(); + float CUMUL_B = CUMUL - CUMUL_A; + + const float Threshold_A = threshold * CUMUL_A; + const float Threshold_B = threshold * CUMUL_B; float count = 0.f; - bool decrease_xa = true; - bool increase_xb = true; - while (true) - { - count = hist[slice(xa, xb-xa+1, 1)].sum(); - if ( count >= Threshold) - break; + int counter = 0; + while (true) { + if (counter > hist_size) break; - if (decrease_xa) - xa--; + count = hist[slice(xa, xmax - xa, 1)].sum(); - if (xa <= 0) - { + if (count >= Threshold_A) break; + xa--; + + if (xa <= 0) { xa = 0; - decrease_xa = false; + break; } - count = hist[slice(xa, xb-xa+1, 1)].sum(); + counter++; + } - if (count >= Threshold) - break; + counter = 0; + while (true) { + if (counter > hist_size) break; - if (increase_xb) - xb++; + count = hist[slice(xmax, xb - xmax, 1)].sum(); - if (xb >= hist_size - 1) - { + if (count >= Threshold_B) break; + + xb++; + + if (xb >= hist_size - 1) { xb = hist_size - 1; - increase_xb = false; + break; } + + counter++; } - minHist = scalingFactor*xa; - maxHist = scalingFactor*xb; + minHist = scalingFactor * xa; + maxHist = scalingFactor * xb; } -void computeAutolevels(const QImage* data, const float threshold, float &minHist, float &maxHist, float &gamma) -{ +void computeAutolevels(const QImage *data, const float threshold, + float &minHist, float &maxHist, float &gamma) { + const int COLOR_DEPTH = 256; - const QRgb* src = reinterpret_cast(data->bits()); + const QRgb *src = reinterpret_cast(data->bits()); const int width = data->width(); const int height = data->height(); const int ELEMENTS = width * height; @@ -154,73 +195,68 @@ float minG, maxG; float minB, maxB; - //Convert to lightness - valarray lightness(ELEMENTS); + // Convert to lightness + valarray lightness(ELEMENTS); - for (int i = 0; i < ELEMENTS; i++) - { + #pragma omp parallel for + for (int i = 0; i < ELEMENTS; i++) { lightness[i] = QColor::fromRgb(src[i]).toHsl().lightness(); } - //Build histogram + + // Build histogram valarray histL(0.f, COLOR_DEPTH); build_histogram(histL, lightness); compute_histogram_minmax(histL, threshold, minL, maxL); - //get Red, Gree, Blue - valarray red(ELEMENTS); - valarray green(ELEMENTS); - valarray blue(ELEMENTS); + // get Red, Gree, Blue + valarray red(ELEMENTS); + valarray green(ELEMENTS); + valarray blue(ELEMENTS); - for (int i = 0; i < ELEMENTS; i++) - { + #pragma omp parallel for + for (int i = 0; i < ELEMENTS; i++) { red[i] = qRed(src[i]); green[i] = qGreen(src[i]); blue[i] = qBlue(src[i]); } - //Build histogram + // Build histogram valarray histR(0.f, COLOR_DEPTH); build_histogram(histR, red); compute_histogram_minmax(histR, threshold, minR, maxR); - //Build histogram + // Build histogram valarray histG(0.f, COLOR_DEPTH); build_histogram(histG, green); compute_histogram_minmax(histG, threshold, minG, maxG); - //Build histogram + // Build histogram valarray histB(0.f, COLOR_DEPTH); build_histogram(histB, blue); compute_histogram_minmax(histB, threshold, minB, maxB); - minHist = min(min(minL,minR), min(minG,minB)); - maxHist = max(max(maxL,maxR), max(maxG,maxB)); + minHist = min(min(minL, minR), min(minG, minB)); + maxHist = max(max(maxL, maxR), max(maxG, maxB)); - //const float meanL = accumulate(lightness, lightness + ELEMENTS, 0.f)/ELEMENTS; - //float midrange = minHist + .5f*(maxHist - minHist); - //gamma = log10(midrange*255.f)/log10(meanL); - gamma = 1.f; //TODO Let's return gamma = 1 + // const float meanL = accumulate(lightness, lightness + ELEMENTS, + // 0.f)/ELEMENTS; + // float midrange = minHist + .5f*(maxHist - minHist); + // gamma = log10(midrange*255.f)/log10(meanL); + gamma = 1.f; // TODO Let's return gamma = 1 } -ConvertToQRgb::ConvertToQRgb(float gamma) - : gamma(1.0f/gamma) -{ -} +ConvertToQRgb::ConvertToQRgb(float gamma) : gamma(1.0f / gamma) {} -void ConvertToQRgb::operator()(float r, float g, float b, QRgb& rgb) const -{ +void ConvertToQRgb::operator()(float r, float g, float b, QRgb &rgb) const { uint8_t r8u; uint8_t g8u; uint8_t b8u; - if (gamma == 1.0f) - { + if (gamma == 1.0f) { r8u = colorspace::convertSample(r); g8u = colorspace::convertSample(g); b8u = colorspace::convertSample(b); - } - else - { + } else { r8u = colorspace::convertSample(pow(r, gamma)); g8u = colorspace::convertSample(pow(g, gamma)); b8u = colorspace::convertSample(pow(b, gamma)); @@ -229,59 +265,58 @@ rgb = qRgb(r8u, g8u, b8u); } -void LoadFile::operator()(HdrCreationItem& currentItem) -{ - if (currentItem.filename().isEmpty()) - { +void LoadFile::operator()(HdrCreationItem ¤tItem) { + if (currentItem.filename().isEmpty()) { return; } QFileInfo qfi(currentItem.alignedFilename()); - try - { + try { QByteArray filePath = QFile::encodeName(qfi.filePath()); - qDebug() << QString("LoadFile: Loading data for %1").arg(filePath.constData()); + qDebug() << QStringLiteral("LoadFile: Loading data for %1") + .arg(filePath.constData()); FrameReaderPtr reader = FrameReaderFactory::open(filePath.constData()); - reader->read( *currentItem.frame(), getRawSettings() ); + reader->read(*currentItem.frame(), getRawSettings()); // read Average Luminance pfs::exif::ExifData exifData(currentItem.filename().toStdString()); currentItem.setAverageLuminance(exifData.getAverageSceneLuminance()); // read Exposure Time - currentItem.setExposureTime(ExifOperations::getExposureTime(filePath.constData())); + currentItem.setExposureTime( + ExifOperations::getExposureTime(filePath.constData())); - qDebug() << QString("LoadFile: Average Luminance for %1 is %2") - .arg(currentItem.filename()) - .arg(currentItem.getAverageLuminance()); + qDebug() << QStringLiteral("LoadFile: Average Luminance for %1 is %2") + .arg(currentItem.filename()) + .arg(currentItem.getAverageLuminance()); // build QImage QImage tempImage(currentItem.frame()->getWidth(), currentItem.frame()->getHeight(), QImage::Format_ARGB32_Premultiplied); - QRgb* qimageData = reinterpret_cast(tempImage.bits()); + QRgb *qimageData = reinterpret_cast(tempImage.bits()); - Channel* red; - Channel* green; - Channel* blue; + Channel *red; + Channel *green; + Channel *blue; currentItem.frame()->getXYZChannels(red, green, blue); - if (red == NULL || green == NULL || blue == NULL) - { + if (red == NULL || green == NULL || blue == NULL) { throw std::runtime_error("Null frame"); } // If frame comes from HdrWizard it has already been normalized, - // if it comes from fitsreader it's not and all channels are equal so I calculate min and max of red channel only. - std::pair minmaxRed = - boost::minmax_element(red->begin(), red->end()); + // if it comes from fitsreader it's not and all channels are equal so I + // calculate min and max of red channel only. + std::pair + minmaxRed = boost::minmax_element(red->begin(), red->end()); - float minRed = *minmaxRed.first; - float maxRed = *minmaxRed.second; + float minRed = *minmaxRed.first; + float maxRed = *minmaxRed.second; // Only useful for FitsImporter. Is there another way??? currentItem.setMin(minRed); @@ -292,48 +327,46 @@ std::cout << "LoadFile:datamax = " << maxRed << std::endl; #endif - //if ((fabs(minRed) > std::numeric_limits::epsilon()) || (fabs(maxRed - 1.f) > std::numeric_limits::epsilon())) - if (m_fromFITS) - { + // if ((fabs(minRed) > std::numeric_limits::epsilon()) || + // (fabs(maxRed - 1.f) > std::numeric_limits::epsilon())) + if (m_fromFITS) { #ifndef NDEBUG std::cout << "LoadFile: Normalizing data" << std::endl; #endif - // Let's normalize thumbnails for FitsImporter. Again, all channels are equal - Channel c(currentItem.frame()->getWidth(), currentItem.frame()->getHeight(), "X"); + // Let's normalize thumbnails for FitsImporter. Again, all channels + // are + // equal + Channel c(currentItem.frame()->getWidth(), + currentItem.frame()->getHeight(), "X"); pfs::colorspace::Normalizer normalize(minRed, maxRed); std::transform(red->begin(), red->end(), c.begin(), normalize); utils::transform(c.begin(), c.end(), c.begin(), c.begin(), qimageData, ConvertToQRgb(2.2f)); - } - else // OK, already in [0..1] range. + } else // OK, already in [0..1] range. { - utils::transform(red->begin(), red->end(), green->begin(), blue->begin(), - qimageData, ConvertToQRgb()); + utils::transform(red->begin(), red->end(), green->begin(), + blue->begin(), qimageData, ConvertToQRgb()); } - currentItem.qimage().swap( tempImage ); - } - catch (std::runtime_error& err) - { - qDebug() << QString("LoadFile: Cannot load %1: %2") - .arg(currentItem.filename()) - .arg(QString::fromStdString(err.what())); + currentItem.qimage().swap(tempImage); + } catch (std::runtime_error &err) { + qDebug() << QStringLiteral("LoadFile: Cannot load %1: %2") + .arg(currentItem.filename(), + QString::fromStdString(err.what())); throw; } } -SaveFile::SaveFile(int mode, float minLum, float maxLum, bool deflateCompression) : - m_mode(mode), - m_minLum(minLum), - m_maxLum(maxLum), - m_deflateCompression(deflateCompression) -{ -} +SaveFile::SaveFile(int mode, float minLum, float maxLum, + bool deflateCompression) + : m_mode(mode), + m_minLum(minLum), + m_maxLum(maxLum), + m_deflateCompression(deflateCompression) {} -void SaveFile::operator()(HdrCreationItem& currentItem) -{ +void SaveFile::operator()(HdrCreationItem ¤tItem) { QUuid uuid = QUuid::createUuid(); QString inputFilename = currentItem.filename(); @@ -342,74 +375,110 @@ QString outputFilename = tempdir + "/" + uuid.toString() + ".tif"; currentItem.setConvertedFilename(outputFilename); - qDebug() << QString("SaveFile: Saving data for %1 to %2 on %3").arg(inputFilename).arg(outputFilename).arg(tempdir); + qDebug() << QStringLiteral("SaveFile: Saving data for %1 to %2 on %3") + .arg(inputFilename, outputFilename, tempdir); // save pfs::Frame as tiff 16bits or 32bits - try - { + try { Params p; - p.set("tiff_mode", m_mode); // 16bits or 32bits + p.set("tiff_mode", m_mode); // 16bits or 32bits p.set("min_luminance", m_minLum); p.set("max_luminance", m_maxLum); p.set("deflateCompression", m_deflateCompression); FrameWriterPtr writer = FrameWriterFactory::open( - QFile::encodeName(outputFilename).constData(), p); - writer->write( *currentItem.frame(), p ); + QFile::encodeName(outputFilename).constData(), p); + writer->write(*currentItem.frame(), p); - } - catch (std::runtime_error& err) - { - qDebug() << QString("SaveFile: Cannot save %1: %2") - .arg(currentItem.filename()) - .arg(QString::fromStdString(err.what())); + } catch (std::runtime_error &err) { + qDebug() << QStringLiteral("SaveFile: Cannot save %1: %2") + .arg(currentItem.filename(), + QString::fromStdString(err.what())); } } -void RefreshPreview::operator()(HdrCreationItem& currentItem) -{ - qDebug() << QString("RefreshPreview: Refresh preview for %1").arg(currentItem.filename()); +void RefreshPreview::operator()(HdrCreationItem ¤tItem) { + qDebug() << QStringLiteral("RefreshPreview: Refresh preview for %1") + .arg(currentItem.filename()); - try - { + try { // build QImage QImage tempImage(currentItem.frame()->getWidth(), currentItem.frame()->getHeight(), QImage::Format_ARGB32_Premultiplied); - QRgb* qimageData = reinterpret_cast(tempImage.bits()); + QRgb *qimageData = reinterpret_cast(tempImage.bits()); - Channel* red; - Channel* green; - Channel* blue; + Channel *red; + Channel *green; + Channel *blue; currentItem.frame()->getXYZChannels(red, green, blue); float m = *std::min_element(red->begin(), red->end()); float M = *std::max_element(red->begin(), red->end()); - if (m != 0.0f || M != 1.0f) - { + if (m != 0.0f || M != 1.0f) { Channel redNorm(currentItem.frame()->getWidth(), currentItem.frame()->getHeight(), "X"); pfs::colorspace::Normalizer normalize(m, M); ConvertToQRgb convert(2.2f); - std::transform(red->begin(), red->end(), redNorm.begin(), normalize); - utils::transform(redNorm.begin(), redNorm.end(), redNorm.begin(), redNorm.begin(), - qimageData, convert); - } - else - { - utils::transform(red->begin(), red->end(), green->begin(), blue->begin(), - qimageData, ConvertToQRgb()); + std::transform(red->begin(), red->end(), redNorm.begin(), + normalize); + utils::transform(redNorm.begin(), redNorm.end(), redNorm.begin(), + redNorm.begin(), qimageData, convert); + } else { + utils::transform(red->begin(), red->end(), green->begin(), + blue->begin(), qimageData, ConvertToQRgb()); } - currentItem.qimage().swap( tempImage ); + currentItem.qimage().swap(tempImage); + } catch (std::runtime_error &err) { + qDebug() << QStringLiteral("RefreshPreview: Cannot load %1: %2") + .arg(currentItem.filename(), + QString::fromStdString(err.what())); } - catch (std::runtime_error& err) - { - qDebug() << QString("RefreshPreview: Cannot load %1: %2") - .arg(currentItem.filename()) - .arg(QString::fromStdString(err.what())); +} + +QString getQString(libhdr::fusion::FusionOperator fo) { + switch (fo) { + case DEBEVEC: + return QObject::tr("Debevec"); + case ROBERTSON: + return QObject::tr("Robertson"); + case ROBERTSON_AUTO: + return QObject::tr("Robertson Response Calculation"); } + + return QString(); } +QString getQString(libhdr::fusion::WeightFunctionType wf) { + switch (wf) { + case WEIGHT_TRIANGULAR: + return QObject::tr("Triangular"); + case WEIGHT_PLATEAU: + return QObject::tr("Plateau"); + case WEIGHT_GAUSSIAN: + return QObject::tr("Gaussian"); + case WEIGHT_FLAT: + return QObject::tr("Flat"); + } + return QString(); +} + +QString getQString(libhdr::fusion::ResponseCurveType rf) { + switch (rf) { + case RESPONSE_LINEAR: + return QObject::tr("Linear"); + case RESPONSE_GAMMA: + return QObject::tr("Gamma"); + case RESPONSE_LOG10: + return QObject::tr("Logarithmic"); + case RESPONSE_SRGB: + return QObject::tr("sRGB"); + case RESPONSE_CUSTOM: + return QObject::tr("From Calibration or Input File"); + } + + return QString(); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/CommonFunctions.h luminance-hdr-2.6.0/src/Common/CommonFunctions.h --- luminance-hdr-2.5.1+dfsg/src/Common/CommonFunctions.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/CommonFunctions.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,14 +25,16 @@ #define COMMONFUNCTIONS_H #include +#include + +#include #include #include -void computeAutolevels(const QImage* data, const float threshold, float &minL, float &maxL, float &gammaL); +void computeAutolevels(const QImage *data, const float threshold, float &minL, + float &maxL, float &gammaL); -inline -void rgb2hsl(float r, float g, float b, float& h, float& s, float& l) -{ +inline void rgb2hsl(float r, float g, float b, float &h, float &s, float &l) { float v, m, vm, r2, g2, b2; h = 0.0f; s = 0.0f; @@ -41,21 +43,20 @@ pfs::utils::minmax(r, g, b, m, v); l = (m + v) / 2.0f; - if (l <= 0.0f) - return; + if (l <= 0.0f) return; vm = v - m; s = vm; - //if (s >= 0.0f) - if (s > 0.0f) - { + // if (s >= 0.0f) + if (s > 0.0f) { float div = (l <= 0.5f) ? (v + m) : (2.0f - v - m); - assert(div != 0.f); + //assert(div != 0.f); + + if(fabs(div) < 1.e-15) + div = 1.e-15; s /= div; - } - else - { + } else { return; } r2 = (v - r) / vm; @@ -70,60 +71,56 @@ h /= 6.0f; } -inline -void hsl2rgb(float h, float sl, float l, float& r, float& g, float& b) -{ +inline void hsl2rgb(float h, float sl, float l, float &r, float &g, float &b) { float v; r = l; g = l; b = l; v = (l <= 0.5f) ? (l * (1.0f + sl)) : (l + sl - l * sl); - if (v > 0.0f) - { + if (v > 0.0f) { float m; float sv; int sextant; float fract, vsf, mid1, mid2; m = l + l - v; - sv = (v - m ) / v; + sv = (v - m) / v; h *= 6.0f; sextant = (int)h; fract = h - sextant; vsf = v * sv * fract; mid1 = m + vsf; mid2 = v - vsf; - switch (sextant) - { - case 0: - r = v; - g = mid1; - b = m; - break; - case 1: - r = mid2; - g = v; - b = m; - break; - case 2: - r = m; - g = v; - b = mid1; - break; - case 3: - r = m; - g = mid2; - b = v; - break; - case 4: - r = mid1; - g = m; - b = v; - break; - case 5: - r = v; - g = m; - b = mid2; - break; + switch (sextant) { + case 0: + r = v; + g = mid1; + b = m; + break; + case 1: + r = mid2; + g = v; + b = m; + break; + case 2: + r = m; + g = v; + b = mid1; + break; + case 3: + r = m; + g = mid2; + b = v; + break; + case 4: + r = mid1; + g = m; + b = v; + break; + case 5: + r = v; + g = m; + b = mid2; + break; } } } @@ -131,12 +128,14 @@ struct ConvertToQRgb { float gamma; explicit ConvertToQRgb(float gamma = 1.0f); - void operator()(float r, float g, float b, QRgb& rgb) const; + void operator()(float r, float g, float b, QRgb &rgb) const; }; struct LoadFile { - explicit LoadFile(bool fromFITS = false) : m_datamax(0.f), m_datamin(0.f) { m_fromFITS = fromFITS; } - void operator()(HdrCreationItem& currentItem); + explicit LoadFile(bool fromFITS = false) : m_datamax(0.f), m_datamin(0.f) { + m_fromFITS = fromFITS; + } + void operator()(HdrCreationItem ¤tItem); float normalize(float); float m_datamax; float m_datamin; @@ -148,12 +147,16 @@ float m_minLum; float m_maxLum; bool m_deflateCompression; - SaveFile(int mode, float minLum = 0.0f, float maxLum = 1.0f, bool deflateCompression = true); - void operator()(HdrCreationItem& currentItem); + SaveFile(int mode, float minLum = 0.0f, float maxLum = 1.0f, + bool deflateCompression = true); + void operator()(HdrCreationItem ¤tItem); }; struct RefreshPreview { - void operator()(HdrCreationItem& currentItem); + void operator()(HdrCreationItem ¤tItem); }; +QString getQString(libhdr::fusion::FusionOperator fo); +QString getQString(libhdr::fusion::WeightFunctionType wf); +QString getQString(libhdr::fusion::ResponseCurveType rf); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/config.h.in luminance-hdr-2.6.0/src/Common/config.h.in --- luminance-hdr-2.5.1+dfsg/src/Common/config.h.in 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/config.h.in 2019-06-09 19:18:38.000000000 +0000 @@ -61,6 +61,7 @@ #define KEY_TMOWINDOW_SHOWPREVIEWPANEL "TMOWindow_Options/TMOWindow_ShowPreviewPanel" #define KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE "TMOWindow_Options/TMOWindow_RealtimePreviewsActive" #define KEY_WIZARD_SHOWFIRSTPAGE "HDR_Wizard_Options/Wizard_ShowFirstPage" +#define KEY_WIZARD_SHOW_MISSING_EVS_WARNING "HDR_Wizard_Options/Wizard_ShowMissingEVsWarning" #define KEY_TMOWARNING_FATTALSMALL "TMOWarning_Options/TMOWarning_fattalsmall" @@ -100,6 +101,21 @@ #define KEY_USE_SAT "Raw_Conversion_Options/use_sat" #define KEY_USE_NOISE "Raw_Conversion_Options/use_noise" #define KEY_USE_CHROMA "Raw_Conversion_Options/use_chroma" +#define KEY_USER_QUAL_TOOLBUTTON "preference_dialog/user_qual_toolButton" +#define KEY_MED_PASSES_TOOLBUTTON "preference_dialog/med_passes_toolButton" +#define KEY_WB_METHOD_TOOLBUTTON "preference_dialog/wb_method_toolButton" +#define KEY_TK_TOOLBUTTON "preference_dialog/TK_toolButton" +#define KEY_MULTIPLIERS_TOOLBUTTON "preference_dialog/multipliers_toolButton" +#define KEY_HIGHLIGHTS_TOOLBUTTON "preference_dialog/highlights_toolButton" +#define KEY_LEVEL_TOOLBUTTON "preference_dialog/level_toolButton" +#define KEY_BRIGHTNESS_TOOLBUTTON "preference_dialog/brightness_toolButton" +#define KEY_USER_BLACK_TOOLBUTTON "preference_dialog/user_black_toolButton" +#define KEY_USER_SAT_TOOLBUTTON "preference_dialog/user_sat_toolButton" +#define KEY_THRESHOLD_TOOLBUTTON "preference_dialog/threshold_toolButton" +#define KEY_RED_TOOLBUTTON "preference_dialog/red_toolButton" +#define KEY_BLUE_TOOLBUTTON "preference_dialog/blue_toolButton" +#define KEY_GREEN_TOOLBUTTON "preference_dialog/green_toolButton" + #define KEY_COLOR_CAMERA_PROFILE "Color_Management_Options/camera_profile" #define KEY_COLOR_CAMERA_PROFILE_FILENAME "Color_Management_Options/camera_profile_filename" @@ -110,6 +126,19 @@ //--------------------PATHS & co. ---------------- #define KEY_RECENT_FILES "Recent_files_list" +#define KEY_EXPORT_FILE_PATH "Queue/FilePath" +#define KEY_TEMP_RESULT_PATH "Tonemapping_Options/TemporaryFilesPath" +#define KEY_RECENT_PATH_SAVE_LDR "recent_path_save_ldr" +#define KEY_RECENT_PATH_LOAD_LDR "recent_path_load_ldr" +#define KEY_RECENT_PATH_SAVE_HDR "recent_path_save_hdr" +#define KEY_RECENT_PATH_LOAD_HDR "recent_path_load_hdr" +#define KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS "Recent_path_TMO_settings" +#define KEY_RECENT_RESPONSE_CURVE_FILENAME "Recent_response_curve_filename" + +//format helper +#define KEY_EXPORT_FORMAT "FileFormats/Format" +#define KEY_EXPORT_TIFF_MODE "FileFormats/TiffMode" +#define KEY_EXPORT_QUALITY "FileFormats/Quality" // Exif #define KEY_RECENT_PATH_EXIF_FROM "Exif/Recent_path_exif_from" diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/GitSHA1.h luminance-hdr-2.6.0/src/Common/GitSHA1.h --- luminance-hdr-2.5.1+dfsg/src/Common/GitSHA1.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/GitSHA1.h 2019-06-09 19:18:38.000000000 +0000 @@ -23,7 +23,7 @@ //#ifndef GITSHA1_H //#define GITSHA1_H -//extern "C" +// extern "C" //{ extern char g_GIT_SHA1[]; //} diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/global.cpp luminance-hdr-2.6.0/src/Common/global.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/global.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/global.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,68 +21,84 @@ * @author Giuseppe Rota */ +#include #include #include #include -#include -#include -#include #include +#include +#include #include +#include "Common/LuminanceOptions.h" #include "Common/config.h" -#include "Common/global.hxx" #include "Common/global.h" -#include "Common/LuminanceOptions.h" - +#include "Common/global.hxx" -bool matchesLdrFilename(const QString& file) -{ - QRegExp exp(".*\\.(jpeg|jpg|tiff|tif|crw|cr2|nef|dng|mrw|orf|kdc|dcr|arw|raf|ptx|pef|x3f|raw|sr2|rw2)$", Qt::CaseInsensitive); +bool matchesLdrFilename(const QString &file) { + QRegExp exp( + ".*\\.(jpeg|jpg|tiff|tif|crw|cr2|nef|dng|mrw|orf|kdc|dcr|arw|" + "raf|ptx|pef|" + "x3f|raw|sr2|rw2)$", + Qt::CaseInsensitive); return exp.exactMatch(file); } -bool matchesHdrFilename(const QString& file) -{ +bool matchesHdrFilename(const QString &file) { #ifdef HAVE_CFITSIO - QRegExp exp(".*\\.(exr|hdr|pic|tiff|tif|fit|fits|pfs|crw|cr2|nef|dng|mrw|orf|kdc|dcr|arw|raf|ptx|pef|x3f|raw|sr2|rw2)$", Qt::CaseInsensitive); + QRegExp exp( + ".*\\.(exr|hdr|pic|tiff|tif|fit|fits|pfs|crw|cr2|nef|dng|mrw|" + "orf|kdc|dcr|" + "arw|raf|ptx|pef|x3f|raw|sr2|rw2)$", + Qt::CaseInsensitive); #else - QRegExp exp(".*\\.(exr|hdr|pic|tiff|tif|pfs|crw|cr2|nef|dng|mrw|orf|kdc|dcr|arw|raf|ptx|pef|x3f|raw|sr2|rw2)$", Qt::CaseInsensitive); + QRegExp exp( + ".*\\.(exr|hdr|pic|tiff|tif|pfs|crw|cr2|nef|dng|mrw|orf|kdc|" + "dcr|arw|raf|" + "ptx|pef|x3f|raw|sr2|rw2)$", + Qt::CaseInsensitive); #endif return exp.exactMatch(file); } -QStringList getAllHdrFileExtensions() -{ +QStringList getAllHdrFileExtensions() { QStringList listAll; QStringList list; - list << ".exr" << ".hdr" << ".pic" << ".tiff" << ".tif"; + list << QStringLiteral(".exr") << QStringLiteral(".hdr") + << QStringLiteral(".pic") << QStringLiteral(".tiff") + << QStringLiteral(".tif"); #if HAVE_CFITSIO - list << ".fit" << ".fits"; + list << QStringLiteral(".fit") << QStringLiteral(".fits"); #endif - list << ".pfs" << ".crw" << ".cr2" << ".nef" << ".dng" << ".mrw" << ".orf" << ".kdc" << ".dcr" << ".arw" << ".raf" << ".ptx" << ".pef" << ".x3f" << ".raw" << ".rw2" << ".sr2" << ".3fr" << ".mef" << ".mos" << ".erf" << ".nrw" << ".srw"; + list << QStringLiteral(".pfs") << QStringLiteral(".crw") + << QStringLiteral(".cr2") << QStringLiteral(".nef") + << QStringLiteral(".dng") << QStringLiteral(".mrw") + << QStringLiteral(".orf") << QStringLiteral(".kdc") + << QStringLiteral(".dcr") << QStringLiteral(".arw") + << QStringLiteral(".raf") << QStringLiteral(".ptx") + << QStringLiteral(".pef") << QStringLiteral(".x3f") + << QStringLiteral(".raw") << QStringLiteral(".rw2") + << QStringLiteral(".sr2") << QStringLiteral(".3fr") + << QStringLiteral(".mef") << QStringLiteral(".mos") + << QStringLiteral(".erf") << QStringLiteral(".nrw") + << QStringLiteral(".srw"); - foreach(QString s, list) - { + foreach (const QString &s, list) { listAll << s; listAll << s.toUpper(); } return listAll; } -bool matchesValidHDRorLDRfilename(const QString& file) -{ +bool matchesValidHDRorLDRfilename(const QString &file) { return matchesLdrFilename(file) || matchesHdrFilename(file); } -QStringList convertUrlListToFilenameList(const QList& urls) -{ +QStringList convertUrlListToFilenameList(const QList &urls) { QStringList files; - for (int i = 0; i < urls.size(); ++i) - { + for (int i = 0; i < urls.size(); ++i) { QString localFile = urls.at(i).toLocalFile(); - if (matchesValidHDRorLDRfilename(localFile)) - { + if (matchesValidHDRorLDRfilename(localFile)) { files.append(localFile); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/global.h luminance-hdr-2.6.0/src/Common/global.h --- luminance-hdr-2.5.1+dfsg/src/Common/global.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/global.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,12 +32,12 @@ #include #include -enum InterpolationMethod {LanczosInterp, BilinearInterp}; +enum InterpolationMethod { LanczosInterp, BilinearInterp }; -bool matchesLdrFilename(const QString& file); -bool matchesHdrFilename(const QString& file); -bool matchesValidHDRorLDRfilename(const QString& file); -QStringList convertUrlListToFilenameList(const QList& urls); +bool matchesLdrFilename(const QString &file); +bool matchesHdrFilename(const QString &file); +bool matchesValidHDRorLDRfilename(const QString &file); +QStringList convertUrlListToFilenameList(const QList &urls); QStringList getAllHdrFileExtensions(); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/init_fftw.cpp luminance-hdr-2.6.0/src/Common/init_fftw.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/init_fftw.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/init_fftw.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,51 @@ +/* +* This file is a part of LuminanceHDR package, based on pfstmo. +* ---------------------------------------------------------------------- +* 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 2 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +* +* @author Franco Comida +*/ + +#include +#ifdef _OPENMP +#include +#endif + +#include + +using namespace std; + +boost::mutex FFTW_MUTEX::fftw_mutex_global; +boost::mutex FFTW_MUTEX::fftw_mutex_plan; +boost::mutex FFTW_MUTEX::fftw_mutex_destroy_plan; +boost::mutex FFTW_MUTEX::fftw_mutex_alloc; +boost::mutex FFTW_MUTEX::fftw_mutex_free; + +void init_fftw() { + FFTW_MUTEX::fftw_mutex_global.lock(); + static bool is_init_threads = false; + // activate parallel execution of fft routines + if (!is_init_threads) { + fftwf_init_threads(); +#ifdef _OPENMP + fftwf_plan_with_nthreads(omp_get_max_threads()); +#else + fftwf_plan_with_nthreads(2); +#endif + is_init_threads = true; + } + FFTW_MUTEX::fftw_mutex_global.unlock(); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/init_fftw.h luminance-hdr-2.6.0/src/Common/init_fftw.h --- luminance-hdr-2.5.1+dfsg/src/Common/init_fftw.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/init_fftw.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,38 @@ +/* +* This file is a part of LuminanceHDR package, based on pfstmo. +* ---------------------------------------------------------------------- +* 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 2 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +* +* @author Davide Anastasia +*/ + +#ifndef INIT_FFTW_H +#define INIT_FFTW_H + +#include + +class FFTW_MUTEX { + public: + static boost::mutex fftw_mutex_global; + static boost::mutex fftw_mutex_plan; + static boost::mutex fftw_mutex_destroy_plan; + static boost::mutex fftw_mutex_alloc; + static boost::mutex fftw_mutex_free; +}; + +void init_fftw(); + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/LuminanceOptions.cpp luminance-hdr-2.6.0/src/Common/LuminanceOptions.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/LuminanceOptions.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/LuminanceOptions.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,211 +23,219 @@ * @author Giuseppe Rota * Improvements, bugfixing * @author Franco Comida - * Implement class deriving from QSettings (override Singleton pattern with QSettings functionalities) + * Implement class deriving from QSettings (override Singleton pattern with + * QSettings functionalities) * @author Davide Anastasia * */ +#include #include -#include -#include -#include -#include #include -#include #include #include +#include +#include +#include +#include +#include #include "Common/LuminanceOptions.h" #include "Common/config.h" -#define KEY_EXPORT_FILE_PATH "Queue/FilePath" - -#ifdef WIN32 +#if defined(Q_OS_WIN) const QString LuminanceOptions::LUMINANCE_HDR_HOME_FOLDER = "LuminanceHDR"; +#elif defined(Q_OS_MACOS) +const QString LuminanceOptions::LUMINANCE_HDR_HOME_FOLDER = + ".config/.LuminanceHDR"; #else -const QString LuminanceOptions::LUMINANCE_HDR_HOME_FOLDER = ".LuminanceHDR"; +const QString LuminanceOptions::LUMINANCE_HDR_HOME_FOLDER = + QStringLiteral(".config/luminance-hdr"); #endif -const static QString MAC_THEME = "Macintosh"; +const static QString MAC_THEME = QStringLiteral("Macintosh"); bool LuminanceOptions::isCurrentPortableMode = false; -void LuminanceOptions::checkHomeFolder() -{ - if (isCurrentPortableMode) - { +void LuminanceOptions::checkHomeFolder() { + if (isCurrentPortableMode) { return; } QDir dir(QDir::homePath()); - if (!dir.exists(LUMINANCE_HDR_HOME_FOLDER)) - { + if (!dir.exists(LUMINANCE_HDR_HOME_FOLDER)) { dir.mkdir(LUMINANCE_HDR_HOME_FOLDER); } } -LuminanceOptions::LuminanceOptions(): - QObject() -{ - initSettings(); -} +LuminanceOptions::LuminanceOptions() : QObject() { initSettings(); } -LuminanceOptions::~LuminanceOptions() -{ - delete m_settingHolder; -} +LuminanceOptions::~LuminanceOptions() { delete m_settingHolder; } -void LuminanceOptions::conditionallyDoUpgrade() -{ +void LuminanceOptions::conditionallyDoUpgrade() { LuminanceOptions options; int currentVersion = options.value(KEY_OPTIONS_VERSION, 0).toInt(); // check if update needed - if (currentVersion < LUMINANCEVERSION_NUM) - { - if (currentVersion < 2030099) - { + if (currentVersion < LUMINANCEVERSION_NUM) { + if (currentVersion < 2030099) { options.setRawWhiteBalanceMethod(1); #ifdef DEMOSAICING_GPL3 - options.setRawUserQuality(10); // AMaZE + options.setRawUserQuality(10); // AMaZE #endif } - if (currentVersion < 2040099) - { - options.setAlignImageStackOptions(sanitizeAISparams(options.getAlignImageStackOptions())); + if (currentVersion < 2040099) { + options.setAlignImageStackOptions( + sanitizeAISparams(options.getAlignImageStackOptions())); } - options.setValue(KEY_WARNING_WOW64, 0); // remind the user again with a new version + options.setValue(KEY_WARNING_WOW64, + 0); // remind the user again with a new version options.setValue(KEY_OPTIONS_VERSION, LUMINANCEVERSION_NUM); } } -bool LuminanceOptions::doShowWindowsOnWindows64Message() -{ +bool LuminanceOptions::doShowWindowsOnWindows64Message() { int currentTimes = value(KEY_WARNING_WOW64, 0).toInt() + 1; bool result = currentTimes <= 3; - if (result) - setValue(KEY_WARNING_WOW64, currentTimes); + if (result) setValue(KEY_WARNING_WOW64, currentTimes); return result; } -void LuminanceOptions::setPortableMode(bool isPortable) -{ - if (LuminanceOptions::isCurrentPortableMode != isPortable) - { - QSettings* oldSettings = m_settingHolder; +void LuminanceOptions::setPortableMode(bool isPortable) { + if (LuminanceOptions::isCurrentPortableMode != isPortable) { + QSettings *oldSettings = m_settingHolder; LuminanceOptions::isCurrentPortableMode = isPortable; initSettings(); - foreach (const QString& key, oldSettings->allKeys()) - { + foreach (const QString &key, oldSettings->allKeys()) { m_settingHolder->setValue(key, oldSettings->value(key)); } delete oldSettings; - QString filePath = QDir(QApplication::applicationDirPath()).relativeFilePath("PortableMode.txt"); - QFile file(filePath); - if (isPortable && !file.exists()) - { - if (file.open(QIODevice::WriteOnly)) - file.close(); +#ifdef Q_OS_MACOS + QString settingsDirName = + QGuiApplication::applicationDirPath() + QStringLiteral("/../../../.LuminanceHDR"); + QFile settingsDir(settingsDirName); + if (!settingsDir.exists()) { + QDir settingsPath(QGuiApplication::applicationDirPath() + QStringLiteral("/../../../")); + settingsPath.mkpath(settingsDirName); } - else if (!isPortable && file.exists()) - { +#endif + QString filePath = +#ifdef Q_OS_MACOS + QGuiApplication::applicationDirPath() + QStringLiteral("/../../../.LuminanceHDR/PortableMode.txt"); +#else + QGuiApplication::applicationDirPath() + QStringLiteral("/PortableMode.txt"); +#endif + QFile file(filePath); + if (isPortable && !file.exists()) { + if (file.open(QIODevice::WriteOnly)) file.close(); + } else if (!isPortable && file.exists()) { file.remove(); } } } -bool LuminanceOptions::checkForUpdate() -{ - +bool LuminanceOptions::checkForUpdate() { QDate date = value(KEY_UPDATE_CHECKED_ON, QDate(1, 1, 1)).toDate(); return date < QDate::currentDate(); } -void LuminanceOptions::setUpdateChecked() -{ +void LuminanceOptions::setUpdateChecked() { setValue(KEY_UPDATE_CHECKED_ON, QDate::currentDate()); } -void LuminanceOptions::initSettings() -{ - if (LuminanceOptions::isCurrentPortableMode) - m_settingHolder = new QSettings("settings.ini", QSettings::IniFormat); - else +void LuminanceOptions::initSettings() { + if (LuminanceOptions::isCurrentPortableMode) { + QString iniFile = +#ifdef Q_OS_MACOS + QGuiApplication::applicationDirPath() + QStringLiteral("/../../../.LuminanceHDR/settings.ini"); + iniFile = QDir::cleanPath(iniFile); +#else + QGuiApplication::applicationDirPath() + QStringLiteral("/settings.ini"); +#endif + m_settingHolder = + new QSettings( iniFile, QSettings::IniFormat); + } + else { m_settingHolder = new QSettings(); + } } -void LuminanceOptions::setValue(const QString& key, - const QVariant& value) -{ +void LuminanceOptions::setValue(const QString &key, const QVariant &value) { m_settingHolder->setValue(key, value); } -QVariant LuminanceOptions::value(const QString & key, - const QVariant& defaultValue) const -{ +QVariant LuminanceOptions::value(const QString &key, + const QVariant &defaultValue) const { return m_settingHolder->value(key, defaultValue); } -QString LuminanceOptions::getDatabaseFileName() -{ +QString LuminanceOptions::getDatabaseFileName() { QString filename; - if (LuminanceOptions::isCurrentPortableMode) - { - filename = QDir::currentPath(); - } - else - { - filename = QDir(QDir::homePath()).absolutePath() + "/" + LUMINANCE_HDR_HOME_FOLDER; + if (LuminanceOptions::isCurrentPortableMode) { + filename = QGuiApplication::applicationDirPath(); +#ifdef Q_OS_MACOS + filename += QLatin1String("/../../../.LuminanceHDR"); + filename = QDir::cleanPath(filename); +#endif + } else { + filename = QDir(QDir::homePath()).absolutePath() + "/" + + LUMINANCE_HDR_HOME_FOLDER; } - filename += "/saved_parameters.db"; + filename += QLatin1String("/saved_parameters.db"); return filename; } -QString LuminanceOptions::getGuiTheme() -{ -#ifdef Q_OS_MAC +QString LuminanceOptions::getFftwWisdomFileName() { + QString filename; + if (LuminanceOptions::isCurrentPortableMode) { + filename = QGuiApplication::applicationDirPath(); + } else { + filename = QDir(QDir::homePath()).absolutePath() + "/" + + LUMINANCE_HDR_HOME_FOLDER; + } + filename += QLatin1String("/lhdrwisdom.fftw"); + + return filename; +} + +QString LuminanceOptions::getGuiTheme() { +#ifdef Q_OS_MACOS return m_settingHolder->value(KEY_GUI_THEME, MAC_THEME).toString(); #else return m_settingHolder->value(KEY_GUI_THEME, "Fusion").toString(); #endif } -void LuminanceOptions::setGuiTheme(const QString& s) -{ - if (s == MAC_THEME) - { +void LuminanceOptions::setGuiTheme(const QString &s) { + if (s == MAC_THEME) { setGuiDarkMode(false); } m_settingHolder->setValue(KEY_GUI_THEME, s); } -bool LuminanceOptions::isGuiDarkMode() const -{ +bool LuminanceOptions::isGuiDarkMode() const { return m_settingHolder->value(KEY_GUI_DARKMODE, false).toBool(); } -void LuminanceOptions::setGuiDarkMode(bool b) -{ +void LuminanceOptions::setGuiDarkMode(bool b) { m_settingHolder->setValue(KEY_GUI_DARKMODE, b); } -void LuminanceOptions::applyTheme(bool /*init*/) -{ +void LuminanceOptions::applyTheme(bool /*init*/) { QString theme = LuminanceOptions().getGuiTheme(); - if (theme.compare("Macintosh") != 0 && isGuiDarkMode()) - { - //QPalette darkPalette; + if (theme.compare(QLatin1String("Macintosh")) != 0 && isGuiDarkMode()) { + // QPalette darkPalette; QPalette darkPalette = QApplication::palette(); darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); darkPalette.setColor(QPalette::WindowText, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, Qt::lightGray); + darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, + Qt::lightGray); darkPalette.setColor(QPalette::Base, QColor(25, 25, 25)); darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); darkPalette.setColor(QPalette::ToolTipBase, Qt::white); @@ -236,494 +244,408 @@ darkPalette.setColor(QPalette::Disabled, QPalette::Text, Qt::lightGray); darkPalette.setColor(QPalette::Button, QColor(53, 53, 53)); darkPalette.setColor(QPalette::ButtonText, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, Qt::lightGray); + darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, + Qt::lightGray); darkPalette.setColor(QPalette::BrightText, Qt::red); - //darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); + // darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); darkPalette.setColor(QPalette::Link, QColor(0, 120, 220)); - //darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); + // darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); darkPalette.setColor(QPalette::Highlight, QColor(0, 120, 220)); darkPalette.setColor(QPalette::HighlightedText, Qt::black); QApplication::setPalette(darkPalette); - //QApplication::setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"); - } - else - { + // QApplication::setStyleSheet("QToolTip { color: #ffffff; + // background-color: + // #2a82da; border: 1px solid white; }"); + } else { QApplication::setPalette(QApplication::palette()); } - QApplication::setStyle(QStyleFactory::create(LuminanceOptions().getGuiTheme())); + QApplication::setStyle( + QStyleFactory::create(LuminanceOptions().getGuiTheme())); } // write system default language the first time around (discard "_country") -QString LuminanceOptions::getGuiLang() -{ - return m_settingHolder->value(KEY_GUI_LANG, - QLocale::system().name().left(2)).toString(); +QString LuminanceOptions::getGuiLang() { + return m_settingHolder + ->value(KEY_GUI_LANG, QLocale::system().name().left(2)) + .toString(); } -void LuminanceOptions::setGuiLang(const QString& s) -{ +void LuminanceOptions::setGuiLang(const QString &s) { m_settingHolder->setValue(KEY_GUI_LANG, s); } -bool LuminanceOptions::isRawFourColorRGB() const -{ +bool LuminanceOptions::isRawFourColorRGB() const { return m_settingHolder->value(KEY_FOUR_COLOR_RGB, false).toBool(); } -void LuminanceOptions::setRawFourColorRGB(bool b) -{ +void LuminanceOptions::setRawFourColorRGB(bool b) { m_settingHolder->setValue(KEY_FOUR_COLOR_RGB, b); } -bool LuminanceOptions::isRawDoNotUseFujiRotate() const -{ +bool LuminanceOptions::isRawDoNotUseFujiRotate() const { return m_settingHolder->value(KEY_DO_NOT_USE_FUJI_ROTATE, false).toBool(); } -void LuminanceOptions::setRawDoNotUseFujiRotate(bool b) -{ +void LuminanceOptions::setRawDoNotUseFujiRotate(bool b) { m_settingHolder->setValue(KEY_DO_NOT_USE_FUJI_ROTATE, b); } -double LuminanceOptions::getRawAber0() const -{ +double LuminanceOptions::getRawAber0() const { return m_settingHolder->value(KEY_ABER_0, 1.0).toDouble(); } -void LuminanceOptions::setRawAber0(double v) -{ +void LuminanceOptions::setRawAber0(double v) { m_settingHolder->setValue(KEY_ABER_0, v); } -double LuminanceOptions::getRawAber1() const -{ +double LuminanceOptions::getRawAber1() const { return m_settingHolder->value(KEY_ABER_1, 1.0).toDouble(); } -void LuminanceOptions::setRawAber1(double v) -{ +void LuminanceOptions::setRawAber1(double v) { m_settingHolder->setValue(KEY_ABER_1, v); } -double LuminanceOptions::getRawAber2() const -{ +double LuminanceOptions::getRawAber2() const { return m_settingHolder->value(KEY_ABER_2, 1.0).toDouble(); } -void LuminanceOptions::setRawAber2(double v) -{ +void LuminanceOptions::setRawAber2(double v) { m_settingHolder->setValue(KEY_ABER_2, v); } -double LuminanceOptions::getRawAber3() const -{ +double LuminanceOptions::getRawAber3() const { return m_settingHolder->value(KEY_ABER_3, 1.0).toDouble(); } -void LuminanceOptions::setRawAber3(double v) -{ +void LuminanceOptions::setRawAber3(double v) { m_settingHolder->setValue(KEY_ABER_3, v); } -double LuminanceOptions::getRawGamm0() const -{ - return m_settingHolder->value(KEY_GAMM_0, 1.0/2.4).toDouble(); +double LuminanceOptions::getRawGamm0() const { + return m_settingHolder->value(KEY_GAMM_0, 1.0 / 2.4).toDouble(); } -void LuminanceOptions::setRawGamm0(double v) -{ +void LuminanceOptions::setRawGamm0(double v) { m_settingHolder->setValue(KEY_GAMM_0, v); } -double LuminanceOptions::getRawGamm1() const -{ +double LuminanceOptions::getRawGamm1() const { return m_settingHolder->value(KEY_GAMM_1, 12.92).toDouble(); } -void LuminanceOptions::setRawGamm1(double v) -{ +void LuminanceOptions::setRawGamm1(double v) { m_settingHolder->setValue(KEY_GAMM_1, v); } -int LuminanceOptions::getRawTemperatureKelvin() const -{ +int LuminanceOptions::getRawTemperatureKelvin() const { return m_settingHolder->value(KEY_TK, 6500).toInt(); } -void LuminanceOptions::setRawTemperatureKelvin(int v) -{ +void LuminanceOptions::setRawTemperatureKelvin(int v) { m_settingHolder->setValue(KEY_TK, v); } -float LuminanceOptions::getRawGreen() const -{ +float LuminanceOptions::getRawGreen() const { return m_settingHolder->value(KEY_GREEN, 1.0f).toFloat(); } -void LuminanceOptions::setRawGreen(float v) -{ +void LuminanceOptions::setRawGreen(float v) { m_settingHolder->setValue(KEY_GREEN, v); } -float LuminanceOptions::getRawUserMul0() const -{ +float LuminanceOptions::getRawUserMul0() const { return m_settingHolder->value(KEY_USER_MUL_0, 1.0f).toFloat(); } -void LuminanceOptions::setRawUserMul0(float v) -{ +void LuminanceOptions::setRawUserMul0(float v) { m_settingHolder->setValue(KEY_USER_MUL_0, v); } -float LuminanceOptions::getRawUserMul1() const -{ +float LuminanceOptions::getRawUserMul1() const { return m_settingHolder->value(KEY_USER_MUL_1, 1.0f).toFloat(); } -void LuminanceOptions::setRawUserMul1(float v) -{ +void LuminanceOptions::setRawUserMul1(float v) { m_settingHolder->setValue(KEY_USER_MUL_1, v); } -float LuminanceOptions::getRawUserMul2() const -{ +float LuminanceOptions::getRawUserMul2() const { return m_settingHolder->value(KEY_USER_MUL_2, 1.0f).toFloat(); } -void LuminanceOptions::setRawUserMul2(float v) -{ +void LuminanceOptions::setRawUserMul2(float v) { m_settingHolder->setValue(KEY_USER_MUL_2, v); } -float LuminanceOptions::getRawUserMul3() const -{ +float LuminanceOptions::getRawUserMul3() const { return m_settingHolder->value(KEY_USER_MUL_3, 1.0f).toFloat(); } -void LuminanceOptions::setRawUserMul3(float v) -{ +void LuminanceOptions::setRawUserMul3(float v) { m_settingHolder->setValue(KEY_USER_MUL_3, v); } -bool LuminanceOptions::isRawAutoBrightness() const -{ +bool LuminanceOptions::isRawAutoBrightness() const { return m_settingHolder->value(KEY_AUTO_BRIGHT, false).toBool(); } -void LuminanceOptions::setRawAutoBrightness(bool b) -{ +void LuminanceOptions::setRawAutoBrightness(bool b) { m_settingHolder->setValue(KEY_AUTO_BRIGHT, b); } -float LuminanceOptions::getRawBrightness() const -{ +float LuminanceOptions::getRawBrightness() const { return m_settingHolder->value(KEY_BRIGHTNESS, 1.0f).toFloat(); } -void LuminanceOptions::setRawBrightness(float f) -{ +void LuminanceOptions::setRawBrightness(float f) { m_settingHolder->setValue(KEY_BRIGHTNESS, f); } -float LuminanceOptions::getRawNoiseReductionThreshold() const -{ +float LuminanceOptions::getRawNoiseReductionThreshold() const { return m_settingHolder->value(KEY_THRESHOLD, 100.0f).toFloat(); } -void LuminanceOptions::setRawNoiseReductionThreshold(float v) -{ +void LuminanceOptions::setRawNoiseReductionThreshold(float v) { m_settingHolder->setValue(KEY_THRESHOLD, v); } -int LuminanceOptions::getRawHalfSize() const -{ +int LuminanceOptions::getRawHalfSize() const { return m_settingHolder->value(KEY_HALF_SIZE, 0).toInt(); } -void LuminanceOptions::setRawHalfSize(int v) -{ +void LuminanceOptions::setRawHalfSize(int v) { m_settingHolder->setValue(KEY_HALF_SIZE, v); } -int LuminanceOptions::getRawWhiteBalanceMethod() const -{ +int LuminanceOptions::getRawWhiteBalanceMethod() const { return m_settingHolder->value(KEY_WB_METHOD, 1).toInt(); } -void LuminanceOptions::setRawWhiteBalanceMethod(int v) -{ +void LuminanceOptions::setRawWhiteBalanceMethod(int v) { m_settingHolder->setValue(KEY_WB_METHOD, v); } -int LuminanceOptions::getRawOutputColor() const -{ +int LuminanceOptions::getRawOutputColor() const { return m_settingHolder->value(KEY_OUTPUT_COLOR, 1).toInt(); } // double check those! -QString LuminanceOptions::getRawOutputProfile() const -{ - //QFile::encodeName(this->value(KEY_OUTPUT_PROFILE).toString()).constData(); - return QFile::encodeName(m_settingHolder->value(KEY_OUTPUT_PROFILE).toString()); +QString LuminanceOptions::getRawOutputProfile() const { + // QFile::encodeName(this->value(KEY_OUTPUT_PROFILE).toString()).constData(); + return QFile::encodeName( + m_settingHolder->value(KEY_OUTPUT_PROFILE).toString()); } -void LuminanceOptions::setRawOutputProfile(const QString& v) -{ +void LuminanceOptions::setRawOutputProfile(const QString &v) { m_settingHolder->setValue(KEY_OUTPUT_PROFILE, v); } -QString LuminanceOptions::getRawCameraProfile() const -{ +QString LuminanceOptions::getRawCameraProfile() const { // QFile::encodeName(this->value(KEY_CAMERA_PROFILE).toString()).constData(); - return QFile::encodeName(m_settingHolder->value(KEY_CAMERA_PROFILE).toString()); + return QFile::encodeName( + m_settingHolder->value(KEY_CAMERA_PROFILE).toString()); } -void LuminanceOptions::setRawCameraProfile(const QString& v) -{ +void LuminanceOptions::setRawCameraProfile(const QString &v) { m_settingHolder->setValue(KEY_CAMERA_PROFILE, v); } -int LuminanceOptions::getRawUserFlip() const -{ +int LuminanceOptions::getRawUserFlip() const { return m_settingHolder->value(KEY_USER_FLIP, 0).toInt(); } #ifdef DEMOSAICING_GPL3 -#define USER_QUALITY 10 // using AMaZE interpolation +#define USER_QUALITY 10 // using AMaZE interpolation #elif DEMOSAICING_GPL2 -#define USER_QUALITY 5 // using AHDv2 +#define USER_QUALITY 5 // using AHDv2 #else -#define USER_QUALITY 3 // using AHD +#define USER_QUALITY 3 // using AHD #endif -int LuminanceOptions::getRawUserQuality() const -{ +int LuminanceOptions::getRawUserQuality() const { return m_settingHolder->value(KEY_USER_QUAL, USER_QUALITY).toInt(); } -void LuminanceOptions::setRawUserQuality(int v) -{ +void LuminanceOptions::setRawUserQuality(int v) { m_settingHolder->setValue(KEY_USER_QUAL, v); } -int LuminanceOptions::getRawUserSaturation() const -{ +int LuminanceOptions::getRawUserSaturation() const { return m_settingHolder->value(KEY_USER_SAT, 20000).toInt(); } -void LuminanceOptions::setRawUserSaturation(int v) -{ +void LuminanceOptions::setRawUserSaturation(int v) { m_settingHolder->setValue(KEY_USER_SAT, v); } -int LuminanceOptions::getRawMedPasses() const -{ +int LuminanceOptions::getRawMedPasses() const { return m_settingHolder->value(KEY_MED_PASSES, 0).toInt(); } -void LuminanceOptions::setRawMedPasses(int v) -{ +void LuminanceOptions::setRawMedPasses(int v) { m_settingHolder->setValue(KEY_MED_PASSES, v); } -int LuminanceOptions::getRawHighlightsMode() const -{ +int LuminanceOptions::getRawHighlightsMode() const { return m_settingHolder->value(KEY_HIGHLIGHTS, 0).toInt(); } -void LuminanceOptions::setRawHighlightsMode(int v) -{ +void LuminanceOptions::setRawHighlightsMode(int v) { m_settingHolder->setValue(KEY_HIGHLIGHTS, v); } -int LuminanceOptions::getRawLevel() const -{ +int LuminanceOptions::getRawLevel() const { return m_settingHolder->value(KEY_LEVEL, 0).toInt(); } -void LuminanceOptions::setRawLevel(int v) -{ +void LuminanceOptions::setRawLevel(int v) { m_settingHolder->setValue(KEY_LEVEL, v); } -float LuminanceOptions::getRawAutoBrightnessThreshold() const -{ +float LuminanceOptions::getRawAutoBrightnessThreshold() const { return m_settingHolder->value(KEY_AUTO_BRIGHT_THR, 0.001f).toFloat(); } -void LuminanceOptions::setRawAutoBrightnessThreshold(float v) -{ +void LuminanceOptions::setRawAutoBrightnessThreshold(float v) { m_settingHolder->setValue(KEY_AUTO_BRIGHT_THR, v); } -float LuminanceOptions::getRawMaximumThreshold() const -{ +float LuminanceOptions::getRawMaximumThreshold() const { return m_settingHolder->value(KEY_ADJUST_MAXIMUM_THR, 0.0f).toFloat(); } -void LuminanceOptions::setRawMaximumThreshold(float v) -{ +void LuminanceOptions::setRawMaximumThreshold(float v) { m_settingHolder->setValue(KEY_ADJUST_MAXIMUM_THR, v); } -bool LuminanceOptions::isRawUseBlack() const -{ +bool LuminanceOptions::isRawUseBlack() const { return m_settingHolder->value(KEY_USE_BLACK, false).toBool(); } -void LuminanceOptions::setRawUseBlack(bool b) -{ +void LuminanceOptions::setRawUseBlack(bool b) { m_settingHolder->setValue(KEY_USE_BLACK, b); } -int LuminanceOptions::getRawUserBlack() const -{ +int LuminanceOptions::getRawUserBlack() const { return m_settingHolder->value(KEY_USER_BLACK, 0).toInt(); } -void LuminanceOptions::setRawUserBlack(int v) -{ +void LuminanceOptions::setRawUserBlack(int v) { m_settingHolder->setValue(KEY_USER_BLACK, v); } -bool LuminanceOptions::isRawUseSaturation() const -{ +bool LuminanceOptions::isRawUseSaturation() const { return m_settingHolder->value(KEY_USE_SAT, false).toBool(); } -void LuminanceOptions::setRawUseSaturation(bool b) -{ +void LuminanceOptions::setRawUseSaturation(bool b) { m_settingHolder->setValue(KEY_USE_SAT, b); } -bool LuminanceOptions::isRawUseNoiseReduction() const -{ +bool LuminanceOptions::isRawUseNoiseReduction() const { return m_settingHolder->value(KEY_USE_NOISE, true).toBool(); } -void LuminanceOptions::setRawUseNoiseReduction(bool b) -{ +void LuminanceOptions::setRawUseNoiseReduction(bool b) { m_settingHolder->setValue(KEY_USE_NOISE, b); } -bool LuminanceOptions::isRawUseChromaAber() const -{ +bool LuminanceOptions::isRawUseChromaAber() const { return m_settingHolder->value(KEY_USE_CHROMA, false).toBool(); } -void LuminanceOptions::setRawUseChromaAber(bool b) -{ +void LuminanceOptions::setRawUseChromaAber(bool b) { m_settingHolder->setValue(KEY_USE_CHROMA, b); } -QString LuminanceOptions::getBatchHdrPathInput(const QString& defaultPath) -{ - return m_settingHolder->value(KEY_BATCH_HDR_PATH_INPUT, - defaultPath).toString(); +QString LuminanceOptions::getBatchHdrPathInput(const QString &defaultPath) { + return m_settingHolder->value(KEY_BATCH_HDR_PATH_INPUT, defaultPath) + .toString(); } -void LuminanceOptions::setBatchHdrPathInput(const QString& qstr) -{ +void LuminanceOptions::setBatchHdrPathInput(const QString &qstr) { m_settingHolder->setValue(KEY_BATCH_HDR_PATH_INPUT, qstr); } -QString LuminanceOptions::getBatchHdrPathOutput(const QString& defaultPath) -{ - return m_settingHolder->value(KEY_BATCH_HDR_PATH_OUTPUT, - defaultPath).toString(); +QString LuminanceOptions::getBatchHdrPathOutput(const QString &defaultPath) { + return m_settingHolder->value(KEY_BATCH_HDR_PATH_OUTPUT, defaultPath) + .toString(); } -void LuminanceOptions::setBatchHdrPathOutput(const QString& qstr) -{ +void LuminanceOptions::setBatchHdrPathOutput(const QString &qstr) { m_settingHolder->setValue(KEY_BATCH_HDR_PATH_OUTPUT, qstr); } -QString LuminanceOptions::getBatchTmPathHdrInput() -{ - return m_settingHolder->value(KEY_BATCH_TM_PATH_INPUT, - QDir::currentPath()).toString(); +QString LuminanceOptions::getBatchTmPathHdrInput() { + return m_settingHolder->value(KEY_BATCH_TM_PATH_INPUT, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setBatchTmPathHdrInput(const QString& s) -{ +void LuminanceOptions::setBatchTmPathHdrInput(const QString &s) { m_settingHolder->setValue(KEY_BATCH_TM_PATH_INPUT, s); } -QString LuminanceOptions::getBatchTmPathTmoSettings() -{ - return m_settingHolder->value(KEY_BATCH_TM_PATH_TMO_SETTINGS, - QDir::currentPath()).toString(); +QString LuminanceOptions::getBatchTmPathTmoSettings() { + return m_settingHolder + ->value(KEY_BATCH_TM_PATH_TMO_SETTINGS, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setBatchTmPathTmoSettings(const QString& s) -{ +void LuminanceOptions::setBatchTmPathTmoSettings(const QString &s) { m_settingHolder->setValue(KEY_BATCH_TM_PATH_TMO_SETTINGS, s); } -QString LuminanceOptions::getBatchTmPathLdrOutput() -{ - return m_settingHolder->value(KEY_BATCH_TM_PATH_OUTPUT, - QDir::currentPath()).toString(); +QString LuminanceOptions::getBatchTmPathLdrOutput() { + return m_settingHolder->value(KEY_BATCH_TM_PATH_OUTPUT, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setBatchTmPathLdrOutput(const QString& s) -{ +void LuminanceOptions::setBatchTmPathLdrOutput(const QString &s) { m_settingHolder->setValue(KEY_BATCH_TM_PATH_OUTPUT, s); } -int LuminanceOptions::getBatchTmNumThreads() -{ +int LuminanceOptions::getBatchTmNumThreads() { return m_settingHolder->value(KEY_BATCH_TM_NUM_THREADS, 1).toInt(); } -void LuminanceOptions::setBatchTmNumThreads(int v) -{ +void LuminanceOptions::setBatchTmNumThreads(int v) { m_settingHolder->setValue(KEY_BATCH_TM_NUM_THREADS, v); } -namespace -{ +namespace { #ifdef QT_DEBUG -struct PrintTempDir -{ - explicit PrintTempDir(const QString& str): - str_(str) - {} +struct PrintTempDir { + explicit PrintTempDir(const QString &str) : str_(str) {} - ~PrintTempDir() - { - qDebug() << "Temporary directory: " << str_; - } + ~PrintTempDir() { qDebug() << "Temporary directory: " << str_; } -private: - const QString& str_; + private: + const QString &str_; }; -#endif // QT_DEBUG +#endif // QT_DEBUG } -#define KEY_TEMP_RESULT_PATH "Tonemapping_Options/TemporaryFilesPath" - -QString LuminanceOptions::getTempDir() -{ +QString LuminanceOptions::getTempDir() { QString os_temp_dir_name = QDir::temp().absolutePath(); - QString temp_dir_name = m_settingHolder->value(KEY_TEMP_RESULT_PATH, - QDir::temp().absolutePath()).toString(); + QString temp_dir_name = + m_settingHolder + ->value(KEY_TEMP_RESULT_PATH, QDir::temp().absolutePath()) + .toString(); #ifdef QT_DEBUG PrintTempDir print_temp_dir(temp_dir_name); #endif - if ( temp_dir_name == os_temp_dir_name ) - { + if (temp_dir_name == os_temp_dir_name) { // temporary directory is equal to the OS's return temp_dir_name; } QDir temp_dir(temp_dir_name); - if ( !temp_dir.exists() ) - { + if (!temp_dir.exists()) { // directory doesn't exist! qDebug() << "Candidate temporary directory does not exist"; // reset to OS temporary directory; @@ -734,9 +656,8 @@ // directory exists... // let's check whether I can create a file or not! - QFile file(temp_dir.filePath("test_write.txt")); - if ( !file.open(QIODevice::ReadWrite) ) - { + QFile file(temp_dir.filePath(QStringLiteral("test_write.txt"))); + if (!file.open(QIODevice::ReadWrite)) { // directory is not writtable qDebug() << "Candidate temporary directory is not writtable"; // reset to OS temporary directory; @@ -748,98 +669,106 @@ return temp_dir_name; } -void LuminanceOptions::setTempDir(const QString& path) { +void LuminanceOptions::setTempDir(const QString &path) { m_settingHolder->setValue(KEY_TEMP_RESULT_PATH, path); } -//--------------------PATHS & co. ---------------- -#define KEY_RECENT_PATH_SAVE_LDR "recent_path_save_ldr" -#define KEY_RECENT_PATH_LOAD_LDR "recent_path_load_ldr" -#define KEY_RECENT_PATH_SAVE_HDR "recent_path_save_hdr" -#define KEY_RECENT_PATH_LOAD_HDR "recent_path_load_hdr" - -QString LuminanceOptions::getDefaultPathHdrIn() -{ - return m_settingHolder->value(KEY_RECENT_PATH_LOAD_HDR, - QDir::currentPath()).toString(); +QString LuminanceOptions::getDefaultPathHdrIn() { + return m_settingHolder->value(KEY_RECENT_PATH_LOAD_HDR, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setDefaultPathHdrIn(const QString& path) -{ +void LuminanceOptions::setDefaultPathHdrIn(const QString &path) { m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_HDR, path); } -QString LuminanceOptions::getDefaultPathHdrOut() -{ - return m_settingHolder->value(KEY_RECENT_PATH_SAVE_HDR, - QDir::currentPath()).toString(); +QString LuminanceOptions::getDefaultPathHdrOut() { + return m_settingHolder->value(KEY_RECENT_PATH_SAVE_HDR, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setDefaultPathHdrOut(const QString& path) -{ +void LuminanceOptions::setDefaultPathHdrOut(const QString &path) { m_settingHolder->setValue(KEY_RECENT_PATH_SAVE_HDR, path); } -QString LuminanceOptions::getDefaultPathLdrIn() -{ - return m_settingHolder->value(KEY_RECENT_PATH_LOAD_LDR, - QDir::currentPath()).toString(); +QString LuminanceOptions::getDefaultPathLdrIn() { + return m_settingHolder->value(KEY_RECENT_PATH_LOAD_LDR, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setDefaultPathLdrIn(const QString& path) -{ +void LuminanceOptions::setDefaultPathLdrIn(const QString &path) { m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_LDR, path); } -QString LuminanceOptions::getDefaultPathLdrOut() -{ - return m_settingHolder->value(KEY_RECENT_PATH_SAVE_LDR, - getDefaultPathHdrOut()).toString(); +QString LuminanceOptions::getDefaultPathLdrOut() { + return m_settingHolder + ->value(KEY_RECENT_PATH_SAVE_LDR, getDefaultPathHdrOut()) + .toString(); } -void LuminanceOptions::setDefaultPathLdrOut(const QString& path) -{ +void LuminanceOptions::setDefaultPathLdrOut(const QString &path) { m_settingHolder->setValue(KEY_RECENT_PATH_SAVE_LDR, path); } -#define KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS "Recent_path_TMO_settings" +bool LuminanceOptions::isShowMissingEVsWarning() { + return m_settingHolder->value(KEY_WIZARD_SHOW_MISSING_EVS_WARNING, true) + .toBool(); +} + +void LuminanceOptions::setShowMissingEVsWarning(const bool b) { + m_settingHolder->setValue(KEY_WIZARD_SHOW_MISSING_EVS_WARNING, b); +} -QString LuminanceOptions::getDefaultPathTmoSettings() -{ - return m_settingHolder->value(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, - QDir::currentPath()).toString(); +QString LuminanceOptions::getDefaultPathTmoSettings() { + return m_settingHolder + ->value(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, QDir::currentPath()) + .toString(); } -void LuminanceOptions::setDefaultPathTmoSettings(const QString& path) -{ +void LuminanceOptions::setDefaultPathTmoSettings(const QString &path) { m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, path); } +QString LuminanceOptions::getDefaultResponseCurveFilename() { + return m_settingHolder + ->value(KEY_RECENT_RESPONSE_CURVE_FILENAME, "") + .toString(); +} + +void LuminanceOptions::setDefaultResponseCurveFilename(const QString &filename) { + m_settingHolder->setValue(KEY_RECENT_RESPONSE_CURVE_FILENAME, filename); +} + /* settings->beginGroup(GROUP_EXTERNALTOOLS); -//bug 2001032, remove spurious default QString "-a aligned_" value set by ver 1.9.2 -if (!settings->contains(KEY_EXTERNAL_AIS_OPTIONS) || settings->value(KEY_EXTERNAL_AIS_OPTIONS).toString()=="-v -a aligned_") - settings->m_settingHolder->setValue(KEY_EXTERNAL_AIS_OPTIONS, QStringList() << "-v" << "-a" << "aligned_"); +//bug 2001032, remove spurious default QString "-a aligned_" value set by ver +1.9.2 +if (!settings->contains(KEY_EXTERNAL_AIS_OPTIONS) || +settings->value(KEY_EXTERNAL_AIS_OPTIONS).toString()=="-v -a aligned_") + settings->m_settingHolder->setValue(KEY_EXTERNAL_AIS_OPTIONS, QStringList() +<< "-v" << "-a" << "aligned_"); align_image_stack_options=settings->value(KEY_EXTERNAL_AIS_OPTIONS).toStringList(); settings->endGroup(); */ -QStringList LuminanceOptions::getAlignImageStackOptions() -{ - //return m_settingHolder->value(KEY_EXTERNAL_AIS_OPTIONS, - // QStringList() << "-v" << "aligned_").toStringList(); - return m_settingHolder->value(KEY_EXTERNAL_AIS_OPTIONS, - QStringList() << "-v").toStringList(); +QStringList LuminanceOptions::getAlignImageStackOptions() { + // return m_settingHolder->value(KEY_EXTERNAL_AIS_OPTIONS, + // QStringList() << "-v" << + // "aligned_").toStringList(); + return m_settingHolder + ->value(KEY_EXTERNAL_AIS_OPTIONS, QStringList() << QStringLiteral("-v")) + .toStringList(); } -QStringList LuminanceOptions::sanitizeAISparams(QStringList temp_ais_options, bool verbose) -{ - bool align_opt_was_ok=true; +QStringList LuminanceOptions::sanitizeAISparams(QStringList temp_ais_options, + bool verbose) { + bool align_opt_was_ok = true; - //check that we don't have '-a "aligned_"' - int idx_a = temp_ais_options.indexOf("-a"); + // check that we don't have '-a "aligned_"' + int idx_a = temp_ais_options.indexOf(QStringLiteral("-a")); if (idx_a != -1) { - if (idx_a != temp_ais_options.size()-1 && !temp_ais_options.at(idx_a+1).startsWith("-")) { + if (idx_a != temp_ais_options.size() - 1 && + !temp_ais_options.at(idx_a + 1).startsWith(QLatin1String("-"))) { temp_ais_options.removeAt(idx_a + 1); } temp_ais_options.removeAt(idx_a); @@ -847,137 +776,122 @@ align_opt_was_ok = false; } - //check if we have '-v' - if (temp_ais_options.indexOf("-v") < 0) { - temp_ais_options.insert(0, "-v"); + // check if we have '-v' + if (temp_ais_options.indexOf(QStringLiteral("-v")) < 0) { + temp_ais_options.insert(0, QStringLiteral("-v")); align_opt_was_ok = false; } if (verbose && !align_opt_was_ok) { - QMessageBox::information(0, - QObject::tr("Option -v -a..."), - QObject::tr("LuminanceHDR requires align_image_stack to be executed with the \"-v\" and without the \"-a\" options. Command line options have been corrected.")); + QMessageBox::information( + 0, QObject::tr("Option -v -a..."), + QObject::tr( + "LuminanceHDR requires align_image_stack to be executed " + "with the \"-v\" and without the \"-a\" options. Command " + "line options have been corrected.")); } return temp_ais_options; } -void LuminanceOptions::setAlignImageStackOptions(const QStringList& qstrlist, bool verbose) -{ - m_settingHolder->setValue(KEY_EXTERNAL_AIS_OPTIONS, sanitizeAISparams(qstrlist, verbose)); +void LuminanceOptions::setAlignImageStackOptions(const QStringList &qstrlist, + bool verbose) { + m_settingHolder->setValue(KEY_EXTERNAL_AIS_OPTIONS, + sanitizeAISparams(qstrlist, verbose)); } -bool LuminanceOptions::isShowFattalWarning() -{ - return m_settingHolder->value(KEY_TMOWARNING_FATTALSMALL,true).toBool(); +bool LuminanceOptions::isShowFattalWarning() { + return m_settingHolder->value(KEY_TMOWARNING_FATTALSMALL, true).toBool(); } -void LuminanceOptions::setShowFattalWarning(bool b) -{ +void LuminanceOptions::setShowFattalWarning(const bool b) { m_settingHolder->setValue(KEY_TMOWARNING_FATTALSMALL, b); } -int LuminanceOptions::getMainWindowToolBarMode() -{ - return m_settingHolder->value(KEY_TOOLBAR_MODE, - Qt::ToolButtonTextUnderIcon).toInt(); +int LuminanceOptions::getMainWindowToolBarMode() { + return m_settingHolder->value(KEY_TOOLBAR_MODE, Qt::ToolButtonTextUnderIcon) + .toInt(); } -void LuminanceOptions::setMainWindowToolBarMode(int mode) -{ +void LuminanceOptions::setMainWindowToolBarMode(int mode) { m_settingHolder->setValue(KEY_TOOLBAR_MODE, mode); } -bool LuminanceOptions::isPreviewPanelActive() -{ - return m_settingHolder->value(KEY_TMOWINDOW_SHOWPREVIEWPANEL, true).toBool(); +bool LuminanceOptions::isPreviewPanelActive() { + return m_settingHolder->value(KEY_TMOWINDOW_SHOWPREVIEWPANEL, true) + .toBool(); } -void LuminanceOptions::setPreviewPanelActive(bool status) -{ +void LuminanceOptions::setPreviewPanelActive(bool status) { m_settingHolder->setValue(KEY_TMOWINDOW_SHOWPREVIEWPANEL, status); } -bool LuminanceOptions::isRealtimePreviewsActive() -{ - return m_settingHolder->value(KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE, false).toBool(); +bool LuminanceOptions::isRealtimePreviewsActive() { + return m_settingHolder->value(KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE, false) + .toBool(); } -void LuminanceOptions::setRealtimePreviewsActive(bool status) -{ +void LuminanceOptions::setRealtimePreviewsActive(bool status) { m_settingHolder->setValue(KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE, status); } - -int LuminanceOptions::getPreviewWidth() -{ +int LuminanceOptions::getPreviewWidth() { return m_settingHolder->value(KEY_TMOWINDOW_PREVIEWS_WIDTH, 400).toInt(); } -void LuminanceOptions::setPreviewWidth(int v) -{ +void LuminanceOptions::setPreviewWidth(int v) { m_settingHolder->setValue(KEY_TMOWINDOW_PREVIEWS_WIDTH, v); } -QString LuminanceOptions::getCameraProfileFileName() -{ - return m_settingHolder->value(KEY_COLOR_CAMERA_PROFILE_FILENAME, "").toString(); +QString LuminanceOptions::getCameraProfileFileName() { + return m_settingHolder->value(KEY_COLOR_CAMERA_PROFILE_FILENAME, "") + .toString(); } -void LuminanceOptions::setCameraProfileFileName(const QString& fname) -{ +void LuminanceOptions::setCameraProfileFileName(const QString &fname) { m_settingHolder->setValue(KEY_COLOR_CAMERA_PROFILE_FILENAME, fname); } -QString LuminanceOptions::getMonitorProfileFileName() -{ - return m_settingHolder->value(KEY_COLOR_MONITOR_PROFILE_FILENAME).toString(); +QString LuminanceOptions::getMonitorProfileFileName() { + return m_settingHolder->value(KEY_COLOR_MONITOR_PROFILE_FILENAME) + .toString(); } -void LuminanceOptions::setMonitorProfileFileName(const QString& fname) -{ +void LuminanceOptions::setMonitorProfileFileName(const QString &fname) { m_settingHolder->setValue(KEY_COLOR_MONITOR_PROFILE_FILENAME, fname); } -QString LuminanceOptions::getPrinterProfileFileName() -{ - return m_settingHolder->value(KEY_COLOR_PRINTER_PROFILE_FILENAME).toString(); +QString LuminanceOptions::getPrinterProfileFileName() { + return m_settingHolder->value(KEY_COLOR_PRINTER_PROFILE_FILENAME) + .toString(); } -void LuminanceOptions::setPrinterProfileFileName(const QString& fname) -{ +void LuminanceOptions::setPrinterProfileFileName(const QString &fname) { m_settingHolder->setValue(KEY_COLOR_PRINTER_PROFILE_FILENAME, fname); } -int LuminanceOptions::getPreviewPanelMode() // 0 means on the right, 1 on the bottom +int LuminanceOptions::getPreviewPanelMode() // 0 means on the right, 1 on the + // bottom { return m_settingHolder->value(KEY_PREVIEW_PANEL_MODE).toInt(); } -void LuminanceOptions::setPreviewPanelMode(int mode) -{ +void LuminanceOptions::setPreviewPanelMode(int mode) { m_settingHolder->setValue(KEY_PREVIEW_PANEL_MODE, mode); } -void LuminanceOptions::setExportDir(QString dir) -{ +void LuminanceOptions::setExportDir(const QString &dir) { m_settingHolder->setValue(KEY_EXPORT_FILE_PATH, dir); } -QString LuminanceOptions::getExportDir() -{ +QString LuminanceOptions::getExportDir() { QString path = m_settingHolder->value(KEY_EXPORT_FILE_PATH).toString(); - if (path.isEmpty()) - { + if (path.isEmpty()) { path = QDir::homePath(); - } - else - { + } else { QDir dir(path); - if (!dir.exists()) - { + if (!dir.exists()) { path = QDir::homePath(); } } return path; } - diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/LuminanceOptions.h luminance-hdr-2.6.0/src/Common/LuminanceOptions.h --- luminance-hdr-2.5.1+dfsg/src/Common/LuminanceOptions.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/LuminanceOptions.h 2019-06-09 19:18:38.000000000 +0000 @@ -23,7 +23,8 @@ * @author Giuseppe Rota * Improvements, bugfixing * @author Franco Comida - * Implement class deriving from QSettings (override Singleton pattern with QSettings functionalities) + * Implement class deriving from QSettings (override Singleton pattern with + * QSettings functionalities) * @author Davide Anastasia * */ @@ -31,15 +32,14 @@ #ifndef LUMINANCEOPTIONS_H #define LUMINANCEOPTIONS_H +#include #include #include #include -#include -class LuminanceOptions : public QObject -{ +class LuminanceOptions : public QObject { Q_OBJECT -public: + public: static const QString LUMINANCE_HDR_HOME_FOLDER; static bool isCurrentPortableMode; static void checkHomeFolder(); @@ -47,201 +47,210 @@ explicit LuminanceOptions(); ~LuminanceOptions(); - void setValue(const QString& key, const QVariant& value); - QVariant value(const QString& key, const QVariant& defaultValue = QVariant()) const; + void setValue(const QString &key, const QVariant &value); + QVariant value(const QString &key, + const QVariant &defaultValue = QVariant()) const; static void conditionallyDoUpgrade(); bool doShowWindowsOnWindows64Message(); QString getDatabaseFileName(); - void setPortableMode(bool isPortable); + QString getFftwWisdomFileName(); + void setPortableMode(bool isPortable); bool checkForUpdate(); void setUpdateChecked(); -public Q_SLOTS: + public Q_SLOTS: // RAW settings - bool isRawFourColorRGB() const; - void setRawFourColorRGB(bool); - bool isRawDoNotUseFujiRotate() const; - void setRawDoNotUseFujiRotate(bool); + bool isRawFourColorRGB() const; + void setRawFourColorRGB(bool); + bool isRawDoNotUseFujiRotate() const; + void setRawDoNotUseFujiRotate(bool); // Chromatic Aberation - bool isRawUseChromaAber() const; - void setRawUseChromaAber(bool); - double getRawAber0() const; - void setRawAber0(double); - double getRawAber1() const; - void setRawAber1(double); - double getRawAber2() const; - void setRawAber2(double); - double getRawAber3() const; - void setRawAber3(double); - double getRawGamm0() const; - void setRawGamm0(double); - double getRawGamm1() const; - void setRawGamm1(double); + bool isRawUseChromaAber() const; + void setRawUseChromaAber(bool); + double getRawAber0() const; + void setRawAber0(double); + double getRawAber1() const; + void setRawAber1(double); + double getRawAber2() const; + void setRawAber2(double); + double getRawAber3() const; + void setRawAber3(double); + double getRawGamm0() const; + void setRawGamm0(double); + double getRawGamm1() const; + void setRawGamm1(double); // --- // White Balance - int getRawWhiteBalanceMethod() const; - void setRawWhiteBalanceMethod(int); - int getRawTemperatureKelvin() const; - void setRawTemperatureKelvin(int); - float getRawGreen() const; - void setRawGreen(float); - float getRawUserMul0() const; - void setRawUserMul0(float); - float getRawUserMul1() const; - void setRawUserMul1(float); - float getRawUserMul2() const; - void setRawUserMul2(float); - float getRawUserMul3() const; - void setRawUserMul3(float); + int getRawWhiteBalanceMethod() const; + void setRawWhiteBalanceMethod(int); + int getRawTemperatureKelvin() const; + void setRawTemperatureKelvin(int); + float getRawGreen() const; + void setRawGreen(float); + float getRawUserMul0() const; + void setRawUserMul0(float); + float getRawUserMul1() const; + void setRawUserMul1(float); + float getRawUserMul2() const; + void setRawUserMul2(float); + float getRawUserMul3() const; + void setRawUserMul3(float); // ---- // Brightness - bool isRawAutoBrightness() const; - void setRawAutoBrightness(bool); - float getRawAutoBrightnessThreshold() const; - void setRawAutoBrightnessThreshold(float); - float getRawBrightness() const; - void setRawBrightness(float f); + bool isRawAutoBrightness() const; + void setRawAutoBrightness(bool); + float getRawAutoBrightnessThreshold() const; + void setRawAutoBrightnessThreshold(float); + float getRawBrightness() const; + void setRawBrightness(float f); // --- // Noise Reduction // --- - int getRawHalfSize() const; - void setRawHalfSize(int); - int getRawOutputColor() const; - //void setRawOutputColor(int); + int getRawHalfSize() const; + void setRawHalfSize(int); + int getRawOutputColor() const; + // void setRawOutputColor(int); QString getRawOutputProfile() const; - void setRawOutputProfile(const QString&); + void setRawOutputProfile(const QString &); QString getRawCameraProfile() const; - void setRawCameraProfile(const QString&); - int getRawUserFlip() const; - //void setRawUserFlip(int); - int getRawUserQuality() const; - void setRawUserQuality(int); - int getRawMedPasses() const; - void setRawMedPasses(int); + void setRawCameraProfile(const QString &); + int getRawUserFlip() const; + // void setRawUserFlip(int); + int getRawUserQuality() const; + void setRawUserQuality(int); + int getRawMedPasses() const; + void setRawMedPasses(int); // Highlights - int getRawHighlightsMode() const; - void setRawHighlightsMode(int); - int getRawLevel() const; // reconstruction level - void setRawLevel(int); + int getRawHighlightsMode() const; + void setRawHighlightsMode(int); + int getRawLevel() const; // reconstruction level + void setRawLevel(int); // --- - float getRawMaximumThreshold() const; - void setRawMaximumThreshold(float); + float getRawMaximumThreshold() const; + void setRawMaximumThreshold(float); // Black/White Point - bool isRawUseBlack() const; - void setRawUseBlack(bool); - int getRawUserBlack() const; - void setRawUserBlack(int); - bool isRawUseSaturation() const; - void setRawUseSaturation(bool); - int getRawUserSaturation() const; - void setRawUserSaturation(int); + bool isRawUseBlack() const; + void setRawUseBlack(bool); + int getRawUserBlack() const; + void setRawUserBlack(int); + bool isRawUseSaturation() const; + void setRawUseSaturation(bool); + int getRawUserSaturation() const; + void setRawUserSaturation(int); // --- // Noise Reduction - bool isRawUseNoiseReduction() const; - void setRawUseNoiseReduction(bool); - float getRawNoiseReductionThreshold() const; - void setRawNoiseReductionThreshold(float); + bool isRawUseNoiseReduction() const; + void setRawUseNoiseReduction(bool); + float getRawNoiseReductionThreshold() const; + void setRawNoiseReductionThreshold(float); // --- QString getGuiTheme(); - void setGuiTheme(const QString&); - bool isGuiDarkMode() const; - void setGuiDarkMode(bool); - void applyTheme(bool init); + void setGuiTheme(const QString &); + bool isGuiDarkMode() const; + void setGuiDarkMode(bool); + void applyTheme(bool init); // Language // 2-chars ISO 639 language code for Luminance's user interface QString getGuiLang(); - void setGuiLang(const QString&); + void setGuiLang(const QString &); // Batch HDR - QString getBatchHdrPathInput(const QString& defaultPath = QDir::currentPath()); - QString getBatchHdrPathOutput(const QString& defaultPath = QDir::currentPath()); - void setBatchHdrPathInput(const QString&); - void setBatchHdrPathOutput(const QString&); + QString getBatchHdrPathInput( + const QString &defaultPath = QDir::currentPath()); + QString getBatchHdrPathOutput( + const QString &defaultPath = QDir::currentPath()); + void setBatchHdrPathInput(const QString &); + void setBatchHdrPathOutput(const QString &); // Batch TM QString getBatchTmPathHdrInput(); QString getBatchTmPathTmoSettings(); QString getBatchTmPathLdrOutput(); - int getBatchTmNumThreads(); + int getBatchTmNumThreads(); - void setBatchTmPathHdrInput(const QString&); - void setBatchTmPathTmoSettings(const QString&); - void setBatchTmPathLdrOutput(const QString&); - void setBatchTmNumThreads(int); + void setBatchTmPathHdrInput(const QString &); + void setBatchTmPathTmoSettings(const QString &); + void setBatchTmPathLdrOutput(const QString &); + void setBatchTmNumThreads(int); - int getNumThreads() { return getBatchTmNumThreads(); } - void setNumThreads(int i) { setBatchTmNumThreads(i); } + int getNumThreads() { return getBatchTmNumThreads(); } + void setNumThreads(int i) { setBatchTmNumThreads(i); } // Default Paths // Path to save temporary cached files QString getTempDir(); - QString getDefaultPathHdrIn(); // MainWindow - QString getDefaultPathHdrOut(); // MainWindow - QString getDefaultPathLdrIn(); // HdrWizard - QString getDefaultPathLdrOut(); // MainWindow + QString getDefaultPathHdrIn(); // MainWindow + QString getDefaultPathHdrOut(); // MainWindow + QString getDefaultPathLdrIn(); // HdrWizard + QString getDefaultPathLdrOut(); // MainWindow QString getDefaultPathTmoSettings(); + QString getDefaultResponseCurveFilename(); - void setTempDir(const QString&); - void setDefaultPathHdrIn(const QString&); - void setDefaultPathHdrOut(const QString&); - void setDefaultPathLdrIn(const QString&); // HdrWizard - void setDefaultPathLdrOut(const QString&); - void setDefaultPathTmoSettings(const QString&); + void setTempDir(const QString &); + void setDefaultPathHdrIn(const QString &); + void setDefaultPathHdrOut(const QString &); + void setDefaultPathLdrIn(const QString &); // HdrWizard + void setDefaultPathLdrOut(const QString &); + void setDefaultPathTmoSettings(const QString &); + void setDefaultResponseCurveFilename(const QString &); // HdrWizard // commandline options for align_image_stack QStringList getAlignImageStackOptions(); - void setAlignImageStackOptions(const QStringList&, bool verbose=false); + void setAlignImageStackOptions(const QStringList &, bool verbose = false); - bool isShowFattalWarning(); - void setShowFattalWarning(bool b); + bool isShowFattalWarning(); + void setShowFattalWarning(const bool b); + + bool isShowMissingEVsWarning(); + void setShowMissingEVsWarning(const bool b); // MainWindow - int getMainWindowToolBarMode(); - void setMainWindowToolBarMode(int); + int getMainWindowToolBarMode(); + void setMainWindowToolBarMode(int); // Preview Panel - bool isPreviewPanelActive(); - void setPreviewPanelActive(bool); + bool isPreviewPanelActive(); + void setPreviewPanelActive(bool); - int getPreviewWidth(); - void setPreviewWidth(int); + int getPreviewWidth(); + void setPreviewWidth(int); // Realtime Previews - bool isRealtimePreviewsActive(); - void setRealtimePreviewsActive(bool); + bool isRealtimePreviewsActive(); + void setRealtimePreviewsActive(bool); // Color Management QString getCameraProfileFileName(); - void setCameraProfileFileName(const QString&); + void setCameraProfileFileName(const QString &); QString getMonitorProfileFileName(); - void setMonitorProfileFileName(const QString&); + void setMonitorProfileFileName(const QString &); QString getPrinterProfileFileName(); - void setPrinterProfileFileName(const QString&); + void setPrinterProfileFileName(const QString &); - int getPreviewPanelMode(); - void setPreviewPanelMode(int); + int getPreviewPanelMode(); + void setPreviewPanelMode(int); // Queue QString getExportDir(); - void setExportDir(QString dir); - + void setExportDir(const QString &dir); -private: + private: void initSettings(); - QSettings* m_settingHolder; + QSettings *m_settingHolder; - static QStringList sanitizeAISparams(QStringList temp_ais_options, bool verbose = false); + static QStringList sanitizeAISparams(QStringList temp_ais_options, + bool verbose = false); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/ProgressHelper.cpp luminance-hdr-2.6.0/src/Common/ProgressHelper.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/ProgressHelper.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/ProgressHelper.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,36 +26,26 @@ using namespace pfs; -ProgressHelper::ProgressHelper(QObject *p): - QObject(p), - Progress() -{} +ProgressHelper::ProgressHelper(QObject *p) : QObject(p), Progress() {} -void ProgressHelper::setValue(int value) -{ +void ProgressHelper::setValue(int value) { Progress::setValue(value); emit qtSetValue(value); } -void ProgressHelper::setMaximum(int maximum) -{ +void ProgressHelper::setMaximum(int maximum) { Progress::setMaximum(maximum); emit qtSetMaximum(maximum); } -void ProgressHelper::setMinimum(int minimum) -{ +void ProgressHelper::setMinimum(int minimum) { Progress::setMinimum(minimum); emit qtSetMinimum(minimum); } -void ProgressHelper::setRange(int minimum, int maximum) -{ +void ProgressHelper::setRange(int minimum, int maximum) { Progress::setRange(minimum, maximum); emit qtSetRange(minimum, maximum); } -void ProgressHelper::qtCancel(bool b) -{ - Progress::cancel(b); -} +void ProgressHelper::qtCancel() { Progress::cancel(true); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/ProgressHelper.h luminance-hdr-2.6.0/src/Common/ProgressHelper.h --- luminance-hdr-2.5.1+dfsg/src/Common/ProgressHelper.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/ProgressHelper.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,11 +31,9 @@ #include "Libpfs/progress.h" //! \brief glue between pfs::Progress and Qt signal/slot -class ProgressHelper - : public QObject, public pfs::Progress -{ +class ProgressHelper : public QObject, public pfs::Progress { Q_OBJECT -public: + public: explicit ProgressHelper(QObject *p = 0); void setValue(int value); @@ -43,14 +41,14 @@ void setMaximum(int maximum); void setMinimum(int minimum); -public slots: - void qtCancel(bool b = true); + public slots: + void qtCancel(); -signals: + signals: void qtSetValue(int value); void qtSetRange(int minimum, int maximum); void qtSetMaximum(int max); void qtSetMinimum(int min); }; -#endif // PROGRESSHELPER_H +#endif // PROGRESSHELPER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.cpp luminance-hdr-2.6.0/src/Common/SavedParametersDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/SavedParametersDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -/** - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2011 Franco Comida - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Franco Comida - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "SavedParametersDialog.h" -#include "ui_SavedParametersDialog.h" - -SavedParametersDialog::SavedParametersDialog(QWidget *parent): - QDialog(parent), - model(new QSqlQueryModel()), - m_Ui(new Ui::SavedParametersDialog) -{ - m_Ui->setupUi(this); - - QString sqlQuery; - sqlQuery += "SELECT comment, 'ashikhmin' AS operator FROM ashikhmin UNION "; - sqlQuery += "SELECT comment, 'drago' AS operator FROM drago UNION "; - sqlQuery += "SELECT comment, 'durand' AS operator FROM durand UNION "; - sqlQuery += "SELECT comment, 'fattal' AS operator FROM fattal UNION "; - sqlQuery += "SELECT comment, 'ferradans' AS operator FROM ferradans UNION "; - sqlQuery += "SELECT comment, 'mantiuk06' AS operator FROM mantiuk06 UNION "; - sqlQuery += "SELECT comment, 'mantiuk08' AS operator FROM mantiuk08 UNION "; - sqlQuery += "SELECT comment, 'pattanaik' AS operator FROM pattanaik UNION "; - sqlQuery += "SELECT comment, 'reinhard02' AS operator FROM reinhard02 UNION "; - sqlQuery += "SELECT comment, 'reinhard05' AS operator FROM reinhard05"; - model->setQuery(sqlQuery); - - model->setHeaderData(0, Qt::Horizontal, tr("Comment")); - model->setHeaderData(1, Qt::Horizontal, tr("TM Operator")); - - m_Ui->tableView->setModel(model); - m_Ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); - m_Ui->tableView->show(); -} - - -SavedParametersDialog::SavedParametersDialog(TMOperator op, QWidget *parent): - QDialog(parent), - model(new QSqlTableModel()), - m_Ui(new Ui::SavedParametersDialog) -{ - m_Ui->setupUi(this); - //QSqlDatabase db = QSqlDatabase::database(); - - QSqlTableModel* tableModel = (QSqlTableModel*)model; - int col = 0; - switch (op) - { - case ashikhmin: - tableModel->setTable("ashikhmin"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Simple")); - model->setHeaderData(col++, Qt::Horizontal, tr("Equation 2")); - model->setHeaderData(col++, Qt::Horizontal, tr("Local Contrast Threshold")); - break; - case drago: - tableModel->setTable("drago"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Bias")); - break; - case durand: - tableModel->setTable("durand"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Spatial Kernel Sigma")); - model->setHeaderData(col++, Qt::Horizontal, tr("Range Kernel Sigma")); - model->setHeaderData(col++, Qt::Horizontal, tr("Base Contrast")); - break; - case fattal: - tableModel->setTable("fattal"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Alpha")); - model->setHeaderData(col++, Qt::Horizontal, tr("Beta")); - model->setHeaderData(col++, Qt::Horizontal, tr("Color Saturation")); - model->setHeaderData(col++, Qt::Horizontal, tr("Noise Reduction")); - model->setHeaderData(col++, Qt::Horizontal, tr("Old Fattal")); - break; - case ferradans: - tableModel->setTable("ferradans"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Rho")); - model->setHeaderData(col++, Qt::Horizontal, tr("InvAlpha")); - break; - case mantiuk06: - tableModel->setTable("mantiuk06"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Contrast Equalization")); - model->setHeaderData(col++, Qt::Horizontal, tr("Contrast Factor")); - model->setHeaderData(col++, Qt::Horizontal, tr("Saturation Factor")); - model->setHeaderData(col++, Qt::Horizontal, tr("Detail Factor")); - break; - case mantiuk08: - tableModel->setTable("mantiuk08"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Color Saturation")); - model->setHeaderData(col++, Qt::Horizontal, tr("Contrast Enhancement")); - model->setHeaderData(col++, Qt::Horizontal, tr("Luminance Level")); - model->setHeaderData(col++, Qt::Horizontal, tr("Manual Luminance Level")); - break; - case pattanaik: - tableModel->setTable("pattanaik"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Cone and Rod based on Luminance")); - model->setHeaderData(col++, Qt::Horizontal, tr("Local Tonemapping")); - model->setHeaderData(col++, Qt::Horizontal, tr("Cone Level")); - model->setHeaderData(col++, Qt::Horizontal, tr("Rod Level")); - model->setHeaderData(col++, Qt::Horizontal, tr("Multiplier")); - break; - case reinhard02: - tableModel->setTable("reinhard02"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Use Scales")); - model->setHeaderData(col++, Qt::Horizontal, tr("Key Value")); - model->setHeaderData(col++, Qt::Horizontal, tr("Phi Value")); - model->setHeaderData(col++, Qt::Horizontal, tr("Range")); - model->setHeaderData(col++, Qt::Horizontal, tr("Lower Scale")); - model->setHeaderData(col++, Qt::Horizontal, tr("Upper Scale")); - break; - case reinhard05: - tableModel->setTable("reinhard05"); - tableModel->select(); - model->setHeaderData(col++, Qt::Horizontal, tr("Brightness")); - model->setHeaderData(col++, Qt::Horizontal, tr("Chromatic Adaptation")); - model->setHeaderData(col++, Qt::Horizontal, tr("Light Adaptation")); - break; - default: - break; - } - model->setHeaderData(col++, Qt::Horizontal, tr("Pre-gamma")); - model->setHeaderData(col++, Qt::Horizontal, tr("Comment")); - - m_Ui->tableView->setModel(model); - m_Ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); - m_Ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); - m_Ui->tableView->show(); -} - -SavedParametersDialog::~SavedParametersDialog() -{ - delete model; -} - -QModelIndex SavedParametersDialog::getCurrentIndex() -{ - return m_Ui->tableView->currentIndex(); -} - -QSqlQueryModel* SavedParametersDialog::getModel() -{ - return model; -} - -QModelIndexList SavedParametersDialog::getSelectedRows() -{ - return m_Ui->tableView->selectionModel()->selectedRows(); -} diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.h luminance-hdr-2.6.0/src/Common/SavedParametersDialog.h --- luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/SavedParametersDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/** - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2011 Franco Comida - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Franco Comida - * - */ - -#ifndef SAVEDPARAMETERSDIALOG_H -#define SAVEDPARAMETERSDIALOG_H - -#include -#include - -#include "Core/TonemappingOptions.h" - -namespace Ui -{ - class SavedParametersDialog; -} - -class SavedParametersDialog : public QDialog -{ - Q_OBJECT - -public: - //! \brief Default constructor - explicit SavedParametersDialog(QWidget *parent = 0); - - //! \brief Specialized ctor - SavedParametersDialog(TMOperator op, QWidget *parent = 0); - - ~SavedParametersDialog(); - - QModelIndex getCurrentIndex(); - QModelIndexList getSelectedRows(); - QSqlQueryModel* getModel(); - -protected: - QSqlQueryModel* model; - QScopedPointer m_Ui; - -}; -#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.ui luminance-hdr-2.6.0/src/Common/SavedParametersDialog.ui --- luminance-hdr-2.5.1+dfsg/src/Common/SavedParametersDialog.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/SavedParametersDialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ - - - SavedParametersDialog - - - Qt::ApplicationModal - - - - 0 - 0 - 835 - 300 - - - - Saved Parameters - - - - - - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SelectRows - - - true - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - - - - - buttonBox - accepted() - SavedParametersDialog - accept() - - - 689 - 278 - - - 586 - 1 - - - - - buttonBox - rejected() - SavedParametersDialog - reject() - - - 762 - 283 - - - 721 - -2 - - - - - tableView - doubleClicked(QModelIndex) - SavedParametersDialog - accept() - - - 417 - 134 - - - 417 - 149 - - - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/TranslatorManager.cpp luminance-hdr-2.6.0/src/Common/TranslatorManager.cpp --- luminance-hdr-2.5.1+dfsg/src/Common/TranslatorManager.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/TranslatorManager.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,15 +23,15 @@ #include "global.hxx" #include -#include #include +#include TranslatorManager::ScopedQTranslator TranslatorManager::sm_appTranslator; TranslatorManager::ScopedQTranslator TranslatorManager::sm_qtTranslator; -void TranslatorManager::setLanguage(const QString& lang, bool installQtTranslation) -{ - if ( lang == "en" ) { +void TranslatorManager::setLanguage(const QString &lang, + bool installQtTranslation) { + if (lang == QLatin1String("en")) { cleanAppTranslator(); cleanQtTranslator(); @@ -39,54 +39,51 @@ } setAppTranslator(lang); - if ( installQtTranslation ) setQtTranslator(lang); + if (installQtTranslation) setQtTranslator(lang); } -void TranslatorManager::cleanAppTranslator() -{ - if ( sm_appTranslator ) { +void TranslatorManager::cleanAppTranslator() { + if (sm_appTranslator) { QCoreApplication::removeTranslator(sm_appTranslator.data()); sm_appTranslator.reset(); } } -void TranslatorManager::cleanQtTranslator() -{ - if ( sm_qtTranslator ) { +void TranslatorManager::cleanQtTranslator() { + if (sm_qtTranslator) { QCoreApplication::removeTranslator(sm_qtTranslator.data()); sm_qtTranslator.reset(); } } -void TranslatorManager::setAppTranslator(const QString& lang) -{ +void TranslatorManager::setAppTranslator(const QString &lang) { qDebug() << "I18NDIR: " << I18NDIR; cleanAppTranslator(); - ScopedQTranslator appTranslator( new QTranslator() ); + ScopedQTranslator appTranslator(new QTranslator()); - if ( appTranslator->load(QString("lang_") + lang, QString("i18n")) || - appTranslator->load(QString("lang_") + lang, I18NDIR) ) - { + if (appTranslator->load(QStringLiteral("lang_") + lang, + QStringLiteral("i18n")) || + appTranslator->load(QStringLiteral("lang_") + lang, I18NDIR)) { QCoreApplication::installTranslator(appTranslator.data()); - sm_appTranslator.swap( appTranslator ); + sm_appTranslator.swap(appTranslator); } } -void TranslatorManager::setQtTranslator(const QString& lang) -{ +void TranslatorManager::setQtTranslator(const QString &lang) { qDebug() << "QLibraryInfo::location(QLibraryInfo::TranslationsPath)): " << QLibraryInfo::location(QLibraryInfo::TranslationsPath); cleanQtTranslator(); - ScopedQTranslator qtTranslator( new QTranslator() ); + ScopedQTranslator qtTranslator(new QTranslator()); - if ( qtTranslator->load(QString("qt_") + lang, QString("i18n")) || - // qtTranslator->load(QString("qt_") + lang, I18NDIR) ) - qtTranslator->load(QString("qt_") + lang, QLibraryInfo::location( - QLibraryInfo::TranslationsPath)) ) - { + if (qtTranslator->load(QStringLiteral("qt_") + lang, + QStringLiteral("i18n")) || + // qtTranslator->load(QString("qt_") + lang, I18NDIR) ) + qtTranslator->load( + QStringLiteral("qt_") + lang, + QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { QCoreApplication::installTranslator(qtTranslator.data()); - sm_qtTranslator.swap( qtTranslator ); + sm_qtTranslator.swap(qtTranslator); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Common/TranslatorManager.h luminance-hdr-2.6.0/src/Common/TranslatorManager.h --- luminance-hdr-2.5.1+dfsg/src/Common/TranslatorManager.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Common/TranslatorManager.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,17 +26,16 @@ #include //! \brief QTranslator context manager -class TranslatorManager -{ -public: +class TranslatorManager { + public: typedef QScopedPointer ScopedQTranslator; - static - void setLanguage(const QString& lang, bool installQtTranslation = true); + static void setLanguage(const QString &lang, + bool installQtTranslation = true); -private: - static void setAppTranslator(const QString& lang); - static void setQtTranslator(const QString& lang); + private: + static void setAppTranslator(const QString &lang); + static void setQtTranslator(const QString &lang); static void cleanAppTranslator(); static void cleanQtTranslator(); @@ -45,4 +44,4 @@ static ScopedQTranslator sm_qtTranslator; }; -#endif // TRANSLATORMANAGER_H +#endif // TRANSLATORMANAGER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/CMakeLists.txt luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,7 +10,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) #QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(qtwaitingspinner ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(qtwaitingspinner Core Gui Widgets) +ADD_LIBRARY(qtwaitingspinner STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(qtwaitingspinner Qt5::Core Qt5::Gui Qt5::Widgets) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} qtwaitingspinner PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/QtWaitingSpinner.cpp luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/QtWaitingSpinner.cpp --- luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/QtWaitingSpinner.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/QtWaitingSpinner.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -18,8 +18,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include #include +#include #include #include @@ -45,16 +45,23 @@ : QWidget(parent), // Configurable settings. - m_color(c_color), m_roundness(c_roundness), + m_color(c_color), + m_roundness(c_roundness), m_minTrailOpacity(c_minTrailOpacity), - m_trailFadePercentage(c_trailFadePercentage), m_revPerSec(c_revPerSec), - m_numberOfLines(c_lines), m_lineLength(c_lineLength + c_lineWidth), - m_lineWidth(c_lineWidth), m_innerRadius(c_innerRadius), + m_trailFadePercentage(c_trailFadePercentage), + m_revPerSec(c_revPerSec), + m_numberOfLines(c_lines), + m_lineLength(c_lineLength + c_lineWidth), + m_lineWidth(c_lineWidth), + m_innerRadius(c_innerRadius), // Other - m_timer(NULL), m_parent(parent), m_centreOnParent(false), - m_currentCounter(0), m_isSpinning(false) { - initialise(); + m_timer(NULL), + m_parent(parent), + m_centreOnParent(false), + m_currentCounter(0), + m_isSpinning(false) { + initialise(); } /*----------------------------------------------------------------------------*/ @@ -64,117 +71,123 @@ : QWidget(parent, Qt::Dialog | Qt::FramelessWindowHint), // Configurable settings. - m_color(c_color), m_roundness(c_roundness), + m_color(c_color), + m_roundness(c_roundness), m_minTrailOpacity(c_minTrailOpacity), - m_trailFadePercentage(c_trailFadePercentage), m_revPerSec(c_revPerSec), - m_numberOfLines(c_lines), m_lineLength(c_lineLength + c_lineWidth), - m_lineWidth(c_lineWidth), m_innerRadius(c_innerRadius), + m_trailFadePercentage(c_trailFadePercentage), + m_revPerSec(c_revPerSec), + m_numberOfLines(c_lines), + m_lineLength(c_lineLength + c_lineWidth), + m_lineWidth(c_lineWidth), + m_innerRadius(c_innerRadius), // Other - m_timer(NULL), m_parent(parent), m_centreOnParent(centreOnParent), + m_timer(NULL), + m_parent(parent), + m_centreOnParent(centreOnParent), m_currentCounter(0) { - initialise(); + initialise(); - // We need to set the window modality AFTER we've hidden the - // widget for the first time since changing this property while - // the widget is visible has no effect. - this->setWindowModality(modality); - this->setAttribute(Qt::WA_TranslucentBackground); + // We need to set the window modality AFTER we've hidden the + // widget for the first time since changing this property while + // the widget is visible has no effect. + this->setWindowModality(modality); + this->setAttribute(Qt::WA_TranslucentBackground); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::initialise() { - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(rotate())); - updateSize(); - updateTimer(); - this->hide(); + m_timer = new QTimer(this); + connect(m_timer, &QTimer::timeout, this, &QtWaitingSpinner::rotate); + updateSize(); + updateTimer(); + this->hide(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::paintEvent(QPaintEvent * /*ev*/) { - QPainter painter(this); - painter.fillRect(this->rect(), Qt::transparent); - painter.setRenderHint(QPainter::Antialiasing, true); - - if (m_currentCounter >= m_numberOfLines) { - m_currentCounter = 0; - } - painter.setPen(Qt::NoPen); - for (int i = 0; i < m_numberOfLines; ++i) { - painter.save(); - painter.translate(m_innerRadius + m_lineLength, - m_innerRadius + m_lineLength); - qreal rotateAngle = - static_cast(360 * i) / static_cast(m_numberOfLines); - painter.rotate(rotateAngle); - painter.translate(m_innerRadius, 0); - int distance = - lineCountDistanceFromPrimary(i, m_currentCounter, m_numberOfLines); - QColor color = - currentLineColor(distance, m_numberOfLines, m_trailFadePercentage, - m_minTrailOpacity, m_color); - painter.setBrush(color); - // TODO improve the way rounded rect is painted - painter.drawRoundedRect( - QRect(0, -m_lineWidth / 2, m_lineLength, m_lineWidth), m_roundness, - m_roundness, Qt::RelativeSize); - painter.restore(); - } + QPainter painter(this); + painter.fillRect(this->rect(), Qt::transparent); + painter.setRenderHint(QPainter::Antialiasing, true); + + if (m_currentCounter >= m_numberOfLines) { + m_currentCounter = 0; + } + painter.setPen(Qt::NoPen); + for (int i = 0; i < m_numberOfLines; ++i) { + painter.save(); + painter.translate(m_innerRadius + m_lineLength, + m_innerRadius + m_lineLength); + qreal rotateAngle = + static_cast(360 * i) / static_cast(m_numberOfLines); + painter.rotate(rotateAngle); + painter.translate(m_innerRadius, 0); + int distance = + lineCountDistanceFromPrimary(i, m_currentCounter, m_numberOfLines); + QColor color = + currentLineColor(distance, m_numberOfLines, m_trailFadePercentage, + m_minTrailOpacity, m_color); + painter.setBrush(color); + // TODO improve the way rounded rect is painted + painter.drawRoundedRect( + QRect(0, -m_lineWidth / 2, m_lineLength, m_lineWidth), m_roundness, + m_roundness, Qt::RelativeSize); + painter.restore(); + } } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::start() { - updatePosition(); - m_isSpinning = true; - this->show(); - if (!m_timer->isActive()) { - m_timer->start(); - m_currentCounter = 0; - } + updatePosition(); + m_isSpinning = true; + this->show(); + if (!m_timer->isActive()) { + m_timer->start(); + m_currentCounter = 0; + } } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::stop() { - m_isSpinning = false; - this->hide(); - if (m_timer->isActive()) { - m_timer->stop(); - m_currentCounter = 0; - } + m_isSpinning = false; + this->hide(); + if (m_timer->isActive()) { + m_timer->stop(); + m_currentCounter = 0; + } } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setNumberOfLines(int lines) { - m_numberOfLines = lines; - m_currentCounter = 0; - updateTimer(); + m_numberOfLines = lines; + m_currentCounter = 0; + updateTimer(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setLineLength(int length) { - m_lineLength = length; - updateSize(); + m_lineLength = length; + updateSize(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setLineWidth(int width) { - m_lineWidth = width; - updateSize(); + m_lineWidth = width; + updateSize(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setInnerRadius(int radius) { - m_innerRadius = radius; - updateSize(); + m_innerRadius = radius; + updateSize(); } /*----------------------------------------------------------------------------*/ @@ -184,7 +197,7 @@ /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setRoundness(qreal roundness) { - m_roundness = std::max(0.0, std::min(100.0, roundness)); + m_roundness = std::max(0.0, std::min(100.0, roundness)); } /*----------------------------------------------------------------------------*/ @@ -194,69 +207,69 @@ /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setRevolutionsPerSecond(int rps) { - m_revPerSec = rps; - updateTimer(); + m_revPerSec = rps; + updateTimer(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setTrailFadePercentage(qreal trail) { - m_trailFadePercentage = trail; + m_trailFadePercentage = trail; } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::setMinimumTrailOpacity(qreal minOpacity) { - m_minTrailOpacity = minOpacity; + m_minTrailOpacity = minOpacity; } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::rotate() { - ++m_currentCounter; - if (m_currentCounter >= m_numberOfLines) { - m_currentCounter = 0; - } - update(); + ++m_currentCounter; + if (m_currentCounter >= m_numberOfLines) { + m_currentCounter = 0; + } + update(); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::updateSize() { - int size = (m_innerRadius + m_lineLength) * 2; - setFixedSize(size, size); + int size = (m_innerRadius + m_lineLength) * 2; + setFixedSize(size, size); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::updateTimer() { - m_timer->setInterval(calculateTimerInterval(m_numberOfLines, m_revPerSec)); + m_timer->setInterval(calculateTimerInterval(m_numberOfLines, m_revPerSec)); } /*----------------------------------------------------------------------------*/ void QtWaitingSpinner::updatePosition() { - if (m_parent && m_centreOnParent) { - this->move(m_parent->frameGeometry().topLeft() + m_parent->rect().center() - - this->rect().center()); - } + if (m_parent && m_centreOnParent) { + this->move(m_parent->frameGeometry().topLeft() + + m_parent->rect().center() - this->rect().center()); + } } /*----------------------------------------------------------------------------*/ int QtWaitingSpinner::calculateTimerInterval(int lines, int speed) { - return 1000 / (lines * speed); + return 1000 / (lines * speed); } /*----------------------------------------------------------------------------*/ int QtWaitingSpinner::lineCountDistanceFromPrimary(int current, int primary, int totalNrOfLines) { - int distance = primary - current; - if (distance < 0) { - distance += totalNrOfLines; - } - return distance; + int distance = primary - current; + if (distance < 0) { + distance += totalNrOfLines; + } + return distance; } /*----------------------------------------------------------------------------*/ @@ -264,24 +277,24 @@ QColor QtWaitingSpinner::currentLineColor(int countDistance, int totalNrOfLines, qreal trailFadePerc, qreal minOpacity, QColor color) { - if (countDistance == 0) { + if (countDistance == 0) { + return color; + } + const qreal minAlphaF = minOpacity / 100.0; + int distanceThreshold = + static_cast(ceil((totalNrOfLines - 1) * trailFadePerc / 100.0)); + if (countDistance > distanceThreshold) { + color.setAlphaF(minAlphaF); + } else { + qreal alphaDiff = color.alphaF() - minAlphaF; + qreal gradient = alphaDiff / static_cast(distanceThreshold + 1); + qreal resultAlpha = color.alphaF() - gradient * countDistance; + + // If alpha is out of bounds, clip it. + resultAlpha = std::min(1.0, std::max(0.0, resultAlpha)); + color.setAlphaF(resultAlpha); + } return color; - } - const qreal minAlphaF = minOpacity / 100.0; - int distanceThreshold = - static_cast(ceil((totalNrOfLines - 1) * trailFadePerc / 100.0)); - if (countDistance > distanceThreshold) { - color.setAlphaF(minAlphaF); - } else { - qreal alphaDiff = color.alphaF() - minAlphaF; - qreal gradient = alphaDiff / static_cast(distanceThreshold + 1); - qreal resultAlpha = color.alphaF() - gradient * countDistance; - - // If alpha is out of bounds, clip it. - resultAlpha = std::min(1.0, std::max(0.0, resultAlpha)); - color.setAlphaF(resultAlpha); - } - return color; } /*----------------------------------------------------------------------------*/ diff -Nru luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/QtWaitingSpinner.h luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/QtWaitingSpinner.h --- luminance-hdr-2.5.1+dfsg/src/contrib/qtwaitingspinner/QtWaitingSpinner.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/contrib/qtwaitingspinner/QtWaitingSpinner.h 2019-06-09 19:18:38.000000000 +0000 @@ -23,81 +23,81 @@ #include -#include #include +#include class QtWaitingSpinner : public QWidget { - Q_OBJECT -public: - /*! Constructor for "standard" widget behaviour - use this - * constructor if you wish to, e.g. embed your widget in another. */ - explicit QtWaitingSpinner(QWidget *parent = 0); - - /*! Constructor - use this constructor to automatically create a modal - * ("blocking") spinner on top of the calling widget/window. If a valid - * parent widget is provided, "centreOnParent" will ensure that - * QtWaitingSpinner automatically centres itself on it, if not, - * "centreOnParent" is ignored. */ - QtWaitingSpinner(Qt::WindowModality modality, QWidget *parent = 0, - bool centreOnParent = true); - -public Q_SLOTS: - void start(); - void stop(); - -public: - void setColor(QColor color); - void setRoundness(qreal roundness); - void setMinimumTrailOpacity(qreal minOpacity); - void setTrailFadePercentage(qreal trail); - void setRevolutionsPerSecond(int rps); - void setNumberOfLines(int lines); - void setLineLength(int length); - void setLineWidth(int width); - void setInnerRadius(int radius); - - bool isSpinning() const; - -private Q_SLOTS: - void rotate(); - -protected: - void paintEvent(QPaintEvent *ev); - -private: - static int calculateTimerInterval(int lines, int speed); - static int lineCountDistanceFromPrimary(int current, int primary, - int totalNrOfLines); - static QColor currentLineColor(int distance, int totalNrOfLines, - qreal trailFadePerc, qreal minOpacity, - QColor color); - - void initialise(); - void updateSize(); - void updateTimer(); - void updatePosition(); - -private: - // Configurable settings. - QColor m_color; - qreal m_roundness; // 0..100 - qreal m_minTrailOpacity; - qreal m_trailFadePercentage; - int m_revPerSec; // revolutions per second - int m_numberOfLines; - int m_lineLength; - int m_lineWidth; - int m_innerRadius; - -private: - QtWaitingSpinner(const QtWaitingSpinner&); - QtWaitingSpinner& operator=(const QtWaitingSpinner&); - - QTimer *m_timer; - QWidget *m_parent; - bool m_centreOnParent; - int m_currentCounter; - bool m_isSpinning; + Q_OBJECT + public: + /*! Constructor for "standard" widget behaviour - use this + * constructor if you wish to, e.g. embed your widget in another. */ + explicit QtWaitingSpinner(QWidget *parent = 0); + + /*! Constructor - use this constructor to automatically create a modal + * ("blocking") spinner on top of the calling widget/window. If a valid + * parent widget is provided, "centreOnParent" will ensure that + * QtWaitingSpinner automatically centres itself on it, if not, + * "centreOnParent" is ignored. */ + QtWaitingSpinner(Qt::WindowModality modality, QWidget *parent = 0, + bool centreOnParent = true); + + public Q_SLOTS: + void start(); + void stop(); + + public: + void setColor(QColor color); + void setRoundness(qreal roundness); + void setMinimumTrailOpacity(qreal minOpacity); + void setTrailFadePercentage(qreal trail); + void setRevolutionsPerSecond(int rps); + void setNumberOfLines(int lines); + void setLineLength(int length); + void setLineWidth(int width); + void setInnerRadius(int radius); + + bool isSpinning() const; + + private Q_SLOTS: + void rotate(); + + protected: + void paintEvent(QPaintEvent *ev); + + private: + static int calculateTimerInterval(int lines, int speed); + static int lineCountDistanceFromPrimary(int current, int primary, + int totalNrOfLines); + static QColor currentLineColor(int distance, int totalNrOfLines, + qreal trailFadePerc, qreal minOpacity, + QColor color); + + void initialise(); + void updateSize(); + void updateTimer(); + void updatePosition(); + + private: + // Configurable settings. + QColor m_color; + qreal m_roundness; // 0..100 + qreal m_minTrailOpacity; + qreal m_trailFadePercentage; + int m_revPerSec; // revolutions per second + int m_numberOfLines; + int m_lineLength; + int m_lineWidth; + int m_innerRadius; + + private: + QtWaitingSpinner(const QtWaitingSpinner &); + QtWaitingSpinner &operator=(const QtWaitingSpinner &); + + QTimer *m_timer; + QWidget *m_parent; + bool m_centreOnParent; + int m_currentCounter; + bool m_isSpinning; }; -#endif // QTWAITINGSPINNER_H +#endif // QTWAITINGSPINNER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/CMakeLists.txt luminance-hdr-2.6.0/src/Core/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Core/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -14,8 +14,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) # QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(core ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(core Core Gui Widgets Sql Xml) +ADD_LIBRARY(core STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} +TARGET_LINK_LIBRARIES(core Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql Qt5::Xml) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/IOWorker.cpp luminance-hdr-2.6.0/src/Core/IOWorker.cpp --- luminance-hdr-2.5.1+dfsg/src/Core/IOWorker.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/IOWorker.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,59 +27,51 @@ * */ -#include #include +#include -#include -#include #include #include +#include #include +#include -#include "Core/IOWorker.h" -#include "Libpfs/frame.h" - -#include "Viewers/GenericViewer.h" -#include "Common/LuminanceOptions.h" -#include "Core/TonemappingOptions.h" -#include "Exif/ExifOperations.h" -#include "Fileformat/pfsoutldrimage.h" - -#include // default for HDR saving -#include +#include +#include +#include +#include +#include +#include +#include +#include // default for HDR saving #include +#include using namespace pfs; using namespace pfs::io; using namespace std; -IOWorker::IOWorker(QObject* parent) - : QObject(parent) -{} +IOWorker::IOWorker(QObject *parent) : QObject(parent) {} -IOWorker::~IOWorker() -{ +IOWorker::~IOWorker() { #ifdef QT_DEBUG qDebug() << "IOWorker::~IOWorker()"; #endif } -bool IOWorker::write_hdr_frame(GenericViewer* hdr_viewer, - const QString& filename, - const pfs::Params& params) -{ - pfs::Params params2( params ); - params2.set( "min_luminance", hdr_viewer->getMinLuminanceValue() ) - ( "max_luminance", hdr_viewer->getMaxLuminanceValue() ) - ( "mapping_method", hdr_viewer->getLuminanceMappingMethod() ); +bool IOWorker::write_hdr_frame(GenericViewer *hdr_viewer, + const QString &filename, + const pfs::Params ¶ms) { + pfs::Params params2(params); + params2.set("min_luminance", hdr_viewer->getMinLuminanceValue())( + "max_luminance", hdr_viewer->getMaxLuminanceValue())( + "mapping_method", hdr_viewer->getLuminanceMappingMethod()); - pfs::Frame* hdr_frame = hdr_viewer->getFrame(); + pfs::Frame *hdr_frame = hdr_viewer->getFrame(); - bool status = write_hdr_frame(hdr_frame, filename, - params2); + bool status = write_hdr_frame(hdr_frame, filename, params2); - if ( status ) - { + if (status) { hdr_viewer->setFileName(filename); emit write_hdr_success(hdr_viewer, filename); } @@ -87,9 +79,8 @@ return status; } -bool IOWorker::write_hdr_frame(pfs::Frame *hdr_frame, const QString& filename, - const pfs::Params& params) -{ +bool IOWorker::write_hdr_frame(pfs::Frame *hdr_frame, const QString &filename, + const pfs::Params ¶ms) { bool status = true; emit IO_init(); @@ -99,28 +90,25 @@ // add parameters for TiffWriter HDR pfs::Params writerParams(params); - if (!writerParams.count("tiff_mode")) - { + if (!writerParams.count("tiff_mode")) { writerParams.set("tiff_mode", 2); } - try - { - FrameWriterPtr writer = FrameWriterFactory::open(encodedName.constData(), writerParams); + try { + FrameWriterPtr writer = + FrameWriterFactory::open(encodedName.constData(), writerParams); writer->write(*hdr_frame, writerParams); - } - catch (pfs::io::InvalidFile& exInvalid) { + } catch (pfs::io::InvalidFile &exInvalid) { qDebug() << "Unsupported format for " << exInvalid.what(); EXRWriter writer(encodedName.constData()); writer.write(*hdr_frame, writerParams); - } - catch (std::runtime_error& ex) { + } catch (std::runtime_error &ex) { qDebug() << ex.what(); status = false; } - if ( status ) { + if (status) { emit write_hdr_success(hdr_frame, filename); } else { emit write_hdr_failed(filename); @@ -129,28 +117,24 @@ return status; } -bool IOWorker::write_ldr_frame(GenericViewer* ldr_viewer, - const QString& filename, /*int quality,*/ - const QString& inputFileName, - const QVector& expoTimes, - TonemappingOptions* tmopts, - const pfs::Params& params) -{ - pfs::Frame* ldr_frame = ldr_viewer->getFrame(); - - pfs::Params p2( params ); - p2.set( "min_luminance", ldr_viewer->getMinLuminanceValue() ) - ( "max_luminance", ldr_viewer->getMaxLuminanceValue() ) - ( "mapping_method", ldr_viewer->getLuminanceMappingMethod() ); - - bool status = write_ldr_frame(ldr_frame, - filename, /*quality,*/ - inputFileName, - expoTimes, - tmopts, p2); +bool IOWorker::write_ldr_frame(GenericViewer *ldr_viewer, + const QString &filename, /*int quality,*/ + const QString &inputFileName, + const QVector &expoTimes, + TonemappingOptions *tmopts, + const pfs::Params ¶ms) { + pfs::Frame *ldr_frame = ldr_viewer->getFrame(); + + pfs::Params p2(params); + p2.set("min_luminance", ldr_viewer->getMinLuminanceValue())( + "max_luminance", ldr_viewer->getMaxLuminanceValue())( + "mapping_method", ldr_viewer->getLuminanceMappingMethod()); + + bool status = write_ldr_frame(ldr_frame, filename, /*quality,*/ + inputFileName, expoTimes, tmopts, p2); - if ( status ) { - if ( !ldr_viewer->isHDR() ) { + if (status) { + if (!ldr_viewer->isHDR()) { ldr_viewer->setFileName(filename); } @@ -159,14 +143,11 @@ return status; } - -bool IOWorker::write_ldr_frame(pfs::Frame* ldr_input, - const QString& filename, - const QString& inputFileName, - const QVector& expoTimes, - TonemappingOptions* tmopts, - const pfs::Params& params) -{ +bool IOWorker::write_ldr_frame(pfs::Frame *ldr_input, const QString &filename, + const QString &inputFileName, + const QVector &expoTimes, + TonemappingOptions *tmopts, + const pfs::Params ¶ms) { bool status = true; emit IO_init(); @@ -179,53 +160,67 @@ QString absoluteFileName = qfi.absoluteFilePath(); QByteArray encodedName = QFile::encodeName(absoluteFileName); - try - { - FrameWriterPtr writer = FrameWriterFactory::open(encodedName.constData(), params); + try { + FrameWriterPtr writer = + FrameWriterFactory::open(encodedName.constData(), params); writer->write(*ldr_input, params); - } - catch (pfs::io::UnsupportedFormat& exUnsupported) { + } catch (pfs::io::UnsupportedFormat &exUnsupported) { qDebug() << "Exception: " << exUnsupported.what(); QString format = qfi.suffix(); // QScopedPointer will call delete when this object goes out of scope QScopedPointer image(fromLDRPFStoQImage(ldr_input, 0.f, 1.f)); status = image->save(filename, format.toLocal8Bit(), -1); - } - catch (pfs::io::InvalidFile& /*exInvalid*/) { + } catch (pfs::io::InvalidFile & /*exInvalid*/) { status = false; - } - catch (pfs::io::WriteException& /*exWrite*/) { + } catch (pfs::io::WriteException & /*exWrite*/) { status = false; } - if ( status ) - { + if (status) { + // this come from an existing HDR file, we do not have exif data + // let's write our own tags only + if (inputFileName == "FromHdrFile") { + QString comment; + + if (operations != NULL) { + comment = operations->getExifComment(); + } else { + comment = QObject::tr("HDR Preview"); + } + + ExifOperations::copyExifData("", encodedName.constData(), false, + comment.toStdString(), true, false); + } // copy EXIF tags from the 1st bracketed image - if ( !inputFileName.isEmpty() ) - { + if (!inputFileName.isEmpty() && inputFileName != "FromHdrFile") { QFileInfo fileinfo(inputFileName); QString absoluteInputFileName = fileinfo.absoluteFilePath(); - QByteArray encodedInputFileName = QFile::encodeName(absoluteInputFileName); - QString comment = operations->getExifComment(); - if ( !expoTimes.empty() ) { - comment += "\nBracketed images exposure times:\n"; + QByteArray encodedInputFileName = + QFile::encodeName(absoluteInputFileName); + QString comment; + + if (operations != NULL) { + comment = operations->getExifComment(); + } else { + comment = QObject::tr("HDR Preview"); + } + + if (!expoTimes.empty()) { + comment += + QLatin1String("\nBracketed images exposure times:\n"); foreach (float e, expoTimes) { - comment += QString("%1").arg(e) + "\n"; + comment += QStringLiteral("%1").arg(e) + "\n"; } } ExifOperations::copyExifData(encodedInputFileName.constData(), - encodedName.constData(), - false, - comment.toStdString(), - true, false); + encodedName.constData(), false, + comment.toStdString(), true, false); } emit write_ldr_success(ldr_input, filename); - } - else - { + } else { emit write_ldr_failed(filename); } @@ -233,84 +228,72 @@ return status; } -pfs::Frame* IOWorker::read_hdr_frame(const QString& filename) -{ +pfs::Frame *IOWorker::read_hdr_frame(const QString &filename) { emit IO_init(); - if (filename.isEmpty()) - { + if (filename.isEmpty()) { return NULL; } QFileInfo qfi(filename); - if (!qfi.isReadable()) - { - emit read_hdr_failed(tr("IOWorker: The following file is not readable: %1").arg(filename)); + if (!qfi.isReadable()) { + emit read_hdr_failed( + tr("IOWorker: The following file is not readable: %1") + .arg(filename)); return NULL; } QScopedPointer hdrpfsframe(new pfs::Frame()); - try - { + try { QByteArray encodedFileName = QFile::encodeName(qfi.absoluteFilePath()); pfs::Params params = getRawSettings(); - FrameReaderPtr reader = FrameReaderFactory::open(encodedFileName.constData()); - reader->read( *hdrpfsframe, params ); + FrameReaderPtr reader = + FrameReaderFactory::open(encodedFileName.constData()); + reader->read(*hdrpfsframe, params); reader->close(); - } - catch (pfs::io::UnsupportedFormat& exUnsupported) - { - emit read_hdr_failed(tr("IOWorker: file %1 has unsupported extension: %2") - .arg(filename) - .arg(exUnsupported.what())); + } catch (pfs::io::UnsupportedFormat &exUnsupported) { + emit read_hdr_failed( + tr("IOWorker: file %1 has unsupported extension: %2") + .arg(filename, exUnsupported.what())); hdrpfsframe.reset(); - } - catch (std::runtime_error& err) - { + } catch (std::runtime_error &err) { emit read_hdr_failed(tr("IOWorker: caught exception reading %1: %2") - .arg(filename) - .arg(err.what())); + .arg(filename, err.what())); hdrpfsframe.reset(); - } - catch (...) - { - emit read_hdr_failed(tr("IOWorker: failed loading file: %1") - .arg(filename)); + } catch (std::bad_alloc &err) { + emit read_hdr_failed(tr("IOWorker: failed to allocate memory %1: %2") + .arg(filename, err.what())); + + hdrpfsframe.reset(); + } catch (...) { + emit read_hdr_failed( + tr("IOWorker: failed loading file: %1").arg(filename)); hdrpfsframe.reset(); } emit IO_finish(); - if (hdrpfsframe) - { - pfs::Frame* frame = hdrpfsframe.take(); + if (hdrpfsframe) { + pfs::Frame *frame = hdrpfsframe.take(); emit read_hdr_success(frame, filename); return frame; - } - else - { + } else { return NULL; } } -void IOWorker::emitNextStep(int iteration) -{ - emit setValue(iteration); -} +void IOWorker::emitNextStep(int iteration) { emit setValue(iteration); } -void IOWorker::emitMaximumValue(int expected) -{ - emit setMaximum(expected); -} +void IOWorker::emitMaximumValue(int expected) { emit setMaximum(expected); } -int progress_cb(void *data,enum LibRaw_progress p,int iteration, int expected) -{ - IOWorker *ptr = (IOWorker *) data; +int progress_cb(void *data, enum LibRaw_progress p, int iteration, + int expected) { + IOWorker *ptr = (IOWorker *)data; ptr->emitMaximumValue(expected); ptr->emitNextStep(iteration); return 0; @@ -318,17 +301,16 @@ // moves settings from LuminanceOptions into Params, for the underlying // processing engine -pfs::Params getRawSettings(const LuminanceOptions& opts) -{ +pfs::Params getRawSettings(const LuminanceOptions &opts) { pfs::Params p; -// // general parameters -// if ( opts.isRawFourColorRGB() ) -// { p.set("raw.four_color", 1); } -// if ( opts.isRawDoNotUseFujiRotate() ) -// { p.set("raw.fuji_rotate", 0); } + // // general parameters + // if ( opts.isRawFourColorRGB() ) + // { p.set("raw.four_color", 1); } + // if ( opts.isRawDoNotUseFujiRotate() ) + // { p.set("raw.fuji_rotate", 0); } -// p.set("raw.user_quality", opts.getRawUserQuality()); -// p.set("raw.med_passes", opts.getRawMedPasses()); + // p.set("raw.user_quality", opts.getRawUserQuality()); + // p.set("raw.med_passes", opts.getRawMedPasses()); // white balance p.set("raw.wb_method", opts.getRawWhiteBalanceMethod()); @@ -340,32 +322,29 @@ p.set("raw.highlights_rebuild", opts.getRawLevel()); // colors - if (opts.isRawUseBlack()) - { + if (opts.isRawUseBlack()) { p.set("raw.black_level", opts.getRawUserBlack()); } - if (opts.isRawUseSaturation()) - { + if (opts.isRawUseSaturation()) { p.set("raw.saturation", opts.getRawUserSaturation()); } // brightness - if (opts.isRawAutoBrightness()) - { + if (opts.isRawAutoBrightness()) { p.set("raw.auto_brightness", true); } p.set("raw.brightness", opts.getRawBrightness()); - p.set("raw.auto_brightness_threshold", opts.getRawAutoBrightnessThreshold()); + p.set("raw.auto_brightness_threshold", + opts.getRawAutoBrightnessThreshold()); // noise reduction - if (opts.isRawUseNoiseReduction()) - { - p.set("raw.noise_reduction_threshold", opts.getRawNoiseReductionThreshold()); + if (opts.isRawUseNoiseReduction()) { + p.set("raw.noise_reduction_threshold", + opts.getRawNoiseReductionThreshold()); } - if (opts.isRawUseChromaAber()) - { + if (opts.isRawUseChromaAber()) { p.set("raw.chroma_aber", true); p.set("raw.chroma_aber_0", opts.getRawAber0()); p.set("raw.chroma_aber_1", opts.getRawAber1()); @@ -373,18 +352,13 @@ p.set("raw.chroma_aber_3", opts.getRawAber3()); } - if (!opts.getRawCameraProfile().isEmpty()) - { + if (!opts.getRawCameraProfile().isEmpty()) { p.set("raw.camera_profile", std::string( - QFile::encodeName( opts.getRawCameraProfile() ).constData() - )); + QFile::encodeName(opts.getRawCameraProfile()).constData())); } return p; } -pfs::Params getRawSettings() -{ - return getRawSettings(LuminanceOptions()); -} +pfs::Params getRawSettings() { return getRawSettings(LuminanceOptions()); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/IOWorker.h luminance-hdr-2.6.0/src/Core/IOWorker.h --- luminance-hdr-2.5.1+dfsg/src/Core/IOWorker.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/IOWorker.h 2019-06-09 19:18:38.000000000 +0000 @@ -39,8 +39,8 @@ #include #include -#include #include +#include namespace pfs { class Frame; @@ -50,60 +50,58 @@ class TonemappingOptions; class LuminanceOptions; -int progress_cb(void *data, enum LibRaw_progress p, int iteration, int expected); +int progress_cb(void *data, enum LibRaw_progress p, int iteration, + int expected); pfs::Params getRawSettings(); -pfs::Params getRawSettings(const LuminanceOptions& opts); +pfs::Params getRawSettings(const LuminanceOptions &opts); -class IOWorker : public QObject -{ +class IOWorker : public QObject { Q_OBJECT -private: - friend - int progress_cb(void *data, enum LibRaw_progress p, int iteration, int expected); + private: + friend int progress_cb(void *data, enum LibRaw_progress p, int iteration, + int expected); void get_frame(QString fname); void emitNextStep(int iteration); void emitMaximumValue(int iteration); -public: - IOWorker(QObject* parent = 0); + public: + IOWorker(QObject *parent = 0); ~IOWorker(); -public Q_SLOTS: - pfs::Frame* read_hdr_frame(const QString& filename); + public Q_SLOTS: + pfs::Frame *read_hdr_frame(const QString &filename); - bool write_hdr_frame(pfs::Frame *frame, const QString& filename, - const pfs::Params& params = pfs::Params()); - bool write_hdr_frame(GenericViewer* frame, const QString& filename, - const pfs::Params& params = pfs::Params()); - - bool write_ldr_frame(pfs::Frame* frame, - const QString& filename, - const QString& inputFileName, - const QVector& expoTimes, - TonemappingOptions* tmopts = NULL, - const pfs::Params& params = pfs::Params()); - - bool write_ldr_frame(GenericViewer* frame, - const QString& filename, - const QString& inputFileName, - const QVector& expoTimes, - TonemappingOptions* tmopts = NULL, - const pfs::Params& params = pfs::Params()); - -signals: - void read_hdr_failed(const QString&); - void read_hdr_success(pfs::Frame*, const QString&); - - void write_hdr_failed(const QString&); - void write_hdr_success(pfs::Frame*, const QString&); - void write_hdr_success(GenericViewer*, const QString&); - - void write_ldr_failed(const QString&); - void write_ldr_success(pfs::Frame*, const QString&); - void write_ldr_success(GenericViewer*, const QString&); + bool write_hdr_frame(pfs::Frame *frame, const QString &filename, + const pfs::Params ¶ms = pfs::Params()); + bool write_hdr_frame(GenericViewer *frame, const QString &filename, + const pfs::Params ¶ms = pfs::Params()); + + bool write_ldr_frame(pfs::Frame *frame, const QString &filename, + const QString &inputFileName, + const QVector &expoTimes, + TonemappingOptions *tmopts = NULL, + const pfs::Params ¶ms = pfs::Params()); + + bool write_ldr_frame(GenericViewer *frame, const QString &filename, + const QString &inputFileName, + const QVector &expoTimes, + TonemappingOptions *tmopts = NULL, + const pfs::Params ¶ms = pfs::Params()); + + signals: + void read_hdr_failed(const QString &); + void read_hdr_success(pfs::Frame *, const QString &); + + void write_hdr_failed(const QString &); + void write_hdr_success(pfs::Frame *, const QString &); + void write_hdr_success(GenericViewer *, const QString &); + + void write_ldr_failed(const QString &); + void write_ldr_success(pfs::Frame *, const QString &); + void write_ldr_success(GenericViewer *, const QString &); void setMaximum(int); void setValue(int); @@ -112,4 +110,4 @@ void IO_finish(); }; -#endif // IOWORKER_H +#endif // IOWORKER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/TMWorker.cpp luminance-hdr-2.6.0/src/Core/TMWorker.cpp --- luminance-hdr-2.5.1+dfsg/src/Core/TMWorker.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/TMWorker.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,71 +23,69 @@ * */ -#include "Core/TMWorker.h" +#include #ifdef QT_DEBUG #include #endif -#include #include +#include -#include "Core/IOWorker.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "Libpfs/frame.h" -#include "Libpfs/params.h" -#include "Libpfs/manip/copy.h" -#include "Libpfs/manip/cut.h" -#include "Libpfs/manip/resize.h" -#include "Libpfs/manip/gamma.h" -#include "Libpfs/tm/TonemapOperator.h" - -#include "Core/TonemappingOptions.h" -#include "Common/ProgressHelper.h" - -TMWorker::TMWorker(QObject* parent): - QObject(parent), - m_Callback(new ProgressHelper) -{ +TMWorker::TMWorker(QObject *parent) + : QObject(parent), m_Callback(new ProgressHelper) { #ifdef QT_DEBUG qDebug() << "TMWorker::TMWorker() ctor"; #endif - connect(this, SIGNAL(destroyed()), m_Callback, SLOT(deleteLater())); - - connect(this, SIGNAL(tonemapRequestTermination()), m_Callback, SLOT(qtCancel()), Qt::DirectConnection); - connect(m_Callback, SIGNAL(qtSetValue(int)), this, SIGNAL(tonemapSetValue(int)), Qt::DirectConnection); - connect(m_Callback, SIGNAL(qtSetMinimum(int)), this, SIGNAL(tonemapSetMinimum(int)), Qt::DirectConnection); - connect(m_Callback, SIGNAL(qtSetMaximum(int)), this, SIGNAL(tonemapSetMaximum(int)), Qt::DirectConnection); + connect(this, &QObject::destroyed, m_Callback, &QObject::deleteLater); + connect(this, &TMWorker::tonemapRequestTermination, m_Callback, + &ProgressHelper::qtCancel, Qt::DirectConnection); + connect(m_Callback, &ProgressHelper::qtSetValue, this, + &TMWorker::tonemapSetValue, Qt::DirectConnection); + connect(m_Callback, &ProgressHelper::qtSetMinimum, this, + &TMWorker::tonemapSetMinimum, Qt::DirectConnection); + connect(m_Callback, &ProgressHelper::qtSetMaximum, this, + &TMWorker::tonemapSetMaximum, Qt::DirectConnection); } -TMWorker::~TMWorker() -{ +TMWorker::~TMWorker() { #ifdef QT_DEBUG qDebug() << "TMWorker::~TMWorker() dtor"; #endif } -pfs::Frame* TMWorker::computeTonemap(/* const */ pfs::Frame* in_frame, TonemappingOptions* tm_options, InterpolationMethod m) -{ +pfs::Frame *TMWorker::computeTonemap(/* const */ pfs::Frame *in_frame, + TonemappingOptions *tm_options, + InterpolationMethod m) { #ifdef QT_DEBUG qDebug() << "TMWorker::getTonemappedFrame()"; #endif - pfs::Frame* working_frame = preprocessFrame(in_frame, tm_options, m); + pfs::Frame *working_frame = preprocessFrame(in_frame, tm_options, m); if (working_frame == NULL) return NULL; try { tonemapFrame(working_frame, tm_options); - } - catch(...) { - emit tonemapFailed("Tonemap failed!"); + } catch (...) { + emit tonemapFailed(QStringLiteral("Tonemap failed!")); delete working_frame; return NULL; } - if ( m_Callback->canceled() ) - { - emit tonemapFailed("Canceled"); - m_Callback->cancel(false); // double check this + if (m_Callback->canceled()) { + emit tonemapFailed(QStringLiteral("Canceled")); + m_Callback->cancel(false); // double check this delete working_frame; return NULL; } @@ -98,71 +96,76 @@ return working_frame; } -void TMWorker::computeTonemapAndExport(/* const */ pfs::Frame* in_frame, TonemappingOptions* tm_options, pfs::Params params, QString exportDir, QString hdrName, QString inputfname, QVector inputExpoTimes, InterpolationMethod m) -{ - pfs::Frame* working_frame = preprocessFrame(in_frame, tm_options, m); +void TMWorker::computeTonemapAndExport(/* const */ pfs::Frame *in_frame, + TonemappingOptions *tm_options, + pfs::Params params, QString exportDir, + QString hdrName, QString inputfname, + QVector inputExpoTimes, + InterpolationMethod m) { + pfs::Frame *working_frame = preprocessFrame(in_frame, tm_options, m); if (working_frame == NULL) return; try { tonemapFrame(working_frame, tm_options); - } - catch(...) { - emit tonemapFailed("Tonemap failed!"); + } catch (...) { + emit tonemapFailed(QStringLiteral("Tonemap failed!")); delete working_frame; return; } - if ( m_Callback->canceled() ) - { - m_Callback->cancel(false); // double check this + if (m_Callback->canceled()) { + m_Callback->cancel(false); // double check this delete working_frame; return; } postprocessFrame(working_frame, tm_options); - QDir dir(exportDir); const QString firstPart = hdrName + "_" + tm_options->getPostfix(); QString extension; if (!params.get("fileextension", extension)) - extension = "tiff"; + extension = QStringLiteral("tiff"); extension = "." + extension; QString outputFilename; int idx = 1; - do - { - outputFilename = firstPart + (idx > 1 ? "-" + QString::number(idx) : QString()) + extension; + do { + outputFilename = firstPart + + (idx > 1 ? "-" + QString::number(idx) : QString()) + + extension; idx++; - } while(dir.exists(outputFilename)); + } while (dir.exists(outputFilename)); IOWorker io_worker; - if ( io_worker.write_ldr_frame(working_frame, - dir.filePath(outputFilename), inputfname, - inputExpoTimes, tm_options, - params) ) - { - //emit add_log_message( tr("[T%1] Successfully saved LDR file: %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) ); + if (io_worker.write_ldr_frame(working_frame, dir.filePath(outputFilename), + inputfname, inputExpoTimes, tm_options, + params)) { + // emit add_log_message( tr("[T%1] Successfully saved LDR file: + // %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) + // ); } else { - //emit add_log_message( tr("[T%1] ERROR: Cannot save to file: %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) ); + // emit add_log_message( tr("[T%1] ERROR: Cannot save to file: + // %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) + // ); } delete tm_options; - //emit tonemapSuccess(working_frame, tm_options); - //return working_frame; + // emit tonemapSuccess(working_frame, tm_options); + // return working_frame; delete working_frame; } -void TMWorker::tonemapFrame(pfs::Frame* working_frame, TonemappingOptions* tm_options) -{ +void TMWorker::tonemapFrame(pfs::Frame *working_frame, + TonemappingOptions *tm_options) { m_Callback->cancel(false); emit tonemapBegin(); // build tonemap object - TonemapOperator* tmEngine = TonemapOperator::getTonemapOperator(tm_options->tmoperator); + TonemapOperator *tmEngine = + TonemapOperator::getTonemapOperator(tm_options->tmoperator); // build object, pass new frame to it and collect the result tmEngine->tonemapFrame(*working_frame, tm_options, *m_Callback); @@ -171,44 +174,45 @@ delete tmEngine; } -pfs::Frame* TMWorker::preprocessFrame(pfs::Frame* input_frame, TonemappingOptions* tm_options, InterpolationMethod m) -{ - pfs::Frame* working_frame = NULL; +pfs::Frame *TMWorker::preprocessFrame(pfs::Frame *input_frame, + TonemappingOptions *tm_options, + InterpolationMethod m) { + pfs::Frame *working_frame = NULL; - if ( tm_options->tonemapSelection ) - { + if (tm_options->tonemapSelection) { // workingframe = "crop" - // std::cout << "crop:[" << opts.selection_x_up_left <<", " << opts.selection_y_up_left <<"],"; - // std::cout << "[" << opts.selection_x_bottom_right <<", " << opts.selection_y_bottom_right <<"]" << std::endl; - working_frame = pfs::cut(input_frame, - tm_options->selection_x_up_left, + // std::cout << "crop:[" << opts.selection_x_up_left <<", " << + // opts.selection_y_up_left <<"],"; + // std::cout << "[" << opts.selection_x_bottom_right <<", " << + // opts.selection_y_bottom_right <<"]" << std::endl; + working_frame = pfs::cut(input_frame, tm_options->selection_x_up_left, tm_options->selection_y_up_left, tm_options->selection_x_bottom_right, tm_options->selection_y_bottom_right); - } - else if ( tm_options->xsize != tm_options->origxsize ) - { + } else if (tm_options->xsize != tm_options->origxsize) { // workingframe = "resize" working_frame = pfs::resize(input_frame, tm_options->xsize, m); - } - else - { + } else { // workingframe = "full res" working_frame = pfs::copy(input_frame); } - if ( tm_options->pregamma != 1.0f ) - { - pfs::applyGamma( working_frame, tm_options->pregamma ); + if (tm_options->pregamma != 1.0f) { + pfs::applyGamma(working_frame, tm_options->pregamma); } return working_frame; } -void TMWorker::postprocessFrame(pfs::Frame*, TonemappingOptions*) -{ +void TMWorker::postprocessFrame(pfs::Frame *working_frame, TonemappingOptions *tm_options) { // auto-level? // black-point? // white-point? -} + if (tm_options->postsaturation != 1.0) { + pfs::applySaturation(working_frame, tm_options->postsaturation); + } + if (tm_options->postgamma != 1.0) { + pfs::applyGamma(working_frame, tm_options->postgamma); + } +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/TMWorker.h luminance-hdr-2.6.0/src/Core/TMWorker.h --- luminance-hdr-2.5.1+dfsg/src/Core/TMWorker.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/TMWorker.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,45 +29,50 @@ #include #include -#include "Common/global.h" -#include "Libpfs/params.h" +#include +#include // Forward declaration namespace pfs { - class Frame; +class Frame; } class TonemappingOptions; class ProgressHelper; -class TMWorker : public QObject -{ +class TMWorker : public QObject { Q_OBJECT -public: - TMWorker(QObject* parent = 0); + public: + TMWorker(QObject *parent = 0); ~TMWorker(); -public Q_SLOTS: + public Q_SLOTS: //! //! This function creates a copy of the input frame, tonemap the copy //! and then returns it //! - pfs::Frame* computeTonemap(/* const */pfs::Frame*, TonemappingOptions*, InterpolationMethod m); + pfs::Frame *computeTonemap(/* const */ pfs::Frame *, TonemappingOptions *, + InterpolationMethod m); - void computeTonemapAndExport(/* const */pfs::Frame*, TonemappingOptions*, pfs::Params, QString exportDir, QString hdrName, QString inputfname, QVector inputExpoTimes, InterpolationMethod m); + void computeTonemapAndExport(/* const */ pfs::Frame *, TonemappingOptions *, + pfs::Params, QString exportDir, + QString hdrName, QString inputfname, + QVector inputExpoTimes, + InterpolationMethod m); //! //! This function tonemap the input frame //! - void tonemapFrame(pfs::Frame*, TonemappingOptions*); + void tonemapFrame(pfs::Frame *, TonemappingOptions *); -private: - pfs::Frame* preprocessFrame(pfs::Frame*, TonemappingOptions*, InterpolationMethod m); - void postprocessFrame(pfs::Frame*, TonemappingOptions*); + private: + pfs::Frame *preprocessFrame(pfs::Frame *, TonemappingOptions *, + InterpolationMethod m); + void postprocessFrame(pfs::Frame *, TonemappingOptions *); -Q_SIGNALS: - void tonemapSuccess(pfs::Frame*, TonemappingOptions*); + Q_SIGNALS: + void tonemapSuccess(pfs::Frame *, TonemappingOptions *); void tonemapFailed(QString); void tonemapBegin(); @@ -75,10 +80,10 @@ void tonemapSetMaximum(int); void tonemapSetMinimum(int); void tonemapSetValue(int); - void tonemapRequestTermination(); + void tonemapRequestTermination(bool); -private: - ProgressHelper* m_Callback; + private: + ProgressHelper *m_Callback; }; -#endif // TMWORKER_H +#endif // TMWORKER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/TonemappingOptions.cpp luminance-hdr-2.6.0/src/Core/TonemappingOptions.cpp --- luminance-hdr-2.5.1+dfsg/src/Core/TonemappingOptions.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/TonemappingOptions.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -30,26 +30,31 @@ */ #include -#include #include +#include #include -#include "Common/config.h" -#include "Core/TonemappingOptions.h" -#include "TonemappingOperators/pfstmdefaultparams.h" +#include +#include +#include -void TonemappingOptions::setDefaultTonemapParameters() -{ +void TonemappingOptions::setDefaultTonemapParameters() { // Mantiuk06 - operator_options.mantiuk06options.contrastfactor = MANTIUK06_CONTRAST_FACTOR; - operator_options.mantiuk06options.saturationfactor = MANTIUK06_SATURATION_FACTOR; + operator_options.mantiuk06options.contrastfactor = + MANTIUK06_CONTRAST_FACTOR; + operator_options.mantiuk06options.saturationfactor = + MANTIUK06_SATURATION_FACTOR; operator_options.mantiuk06options.detailfactor = MANTIUK06_DETAIL_FACTOR; - operator_options.mantiuk06options.contrastequalization = MANTIUK06_CONSTRAST_EQUALIZATION; + operator_options.mantiuk06options.contrastequalization = + MANTIUK06_CONTRAST_EQUALIZATION; // Mantiuk08 - operator_options.mantiuk08options.colorsaturation = MANTIUK08_COLOR_SATURATION; - operator_options.mantiuk08options.contrastenhancement = MANTIUK08_CONTRAST_ENHANCEMENT; - operator_options.mantiuk08options.luminancelevel = MANTIUK08_LUMINANCE_LEVEL; + operator_options.mantiuk08options.colorsaturation = + MANTIUK08_COLOR_SATURATION; + operator_options.mantiuk08options.contrastenhancement = + MANTIUK08_CONTRAST_ENHANCEMENT; + operator_options.mantiuk08options.luminancelevel = + MANTIUK08_LUMINANCE_LEVEL; operator_options.mantiuk08options.setluminance = MANTIUK08_SET_LUMINANCE; // Fattal @@ -64,6 +69,14 @@ operator_options.ferradansoptions.rho = FERRADANS11_RHO; operator_options.ferradansoptions.inv_alpha = FERRADANS11_INV_ALPHA; + // Ferwerda + operator_options.ferwerdaoptions.multiplier = FERWERDA96_MULTIPLIER; + operator_options.ferwerdaoptions.adaptationluminance = FERWERDA96_ADAPTATION_LUMINANCE; + + // KimKautz + operator_options.kimkautzoptions.c1 = KIMKAUTZ08_C1; + operator_options.kimkautzoptions.c2 = KIMKAUTZ08_C2; + // Drago operator_options.dragooptions.bias = DRAGO03_BIAS; @@ -82,8 +95,10 @@ // Reinhard 05 operator_options.reinhard05options.brightness = REINHARD05_BRIGHTNESS; - operator_options.reinhard05options.chromaticAdaptation = REINHARD05_CHROMATIC_ADAPTATION; - operator_options.reinhard05options.lightAdaptation = REINHARD05_LIGHT_ADAPTATION; + operator_options.reinhard05options.chromaticAdaptation = + REINHARD05_CHROMATIC_ADAPTATION; + operator_options.reinhard05options.lightAdaptation = + REINHARD05_LIGHT_ADAPTATION; // Ashikhmin operator_options.ashikhminoptions.simple = ASHIKHMIN_SIMPLE; @@ -96,10 +111,15 @@ operator_options.pattanaikoptions.cone = PATTANAIK00_CONE; operator_options.pattanaikoptions.rod = PATTANAIK00_ROD; operator_options.pattanaikoptions.multiplier = PATTANAIK00_MULTIPLIER; + + // VanHateren + operator_options.vanhaterenoptions.pupil_area = VANHATEREN06_PUPIL_AREA; + + // Lischinski + operator_options.lischinskioptions.alpha = LISCHINSKI06_ALPHA; } -void TonemappingOptions::setDefaultParameters() -{ +void TonemappingOptions::setDefaultParameters() { // TM Defaults setDefaultTonemapParameters(); @@ -108,6 +128,8 @@ xsize_percent = 100; quality = 100; pregamma = 1.0f; + postgamma = 1.0f; + postsaturation = 1.0f; tonemapSelection = false; tmoperator = mantiuk06; @@ -117,642 +139,821 @@ selection_y_bottom_right = INT_MAX; } -char TonemappingOptions::getRatingForOperator() -{ +char TonemappingOptions::getRatingForOperator() { switch (tmoperator) { - case ashikhmin: - return 'H'; - case drago: - return 'G'; - case durand: - return 'F'; - case fattal: - return 'B'; - case mantiuk06: - return 'A'; - case mantiuk08: - return 'C'; - case pattanaik: - return 'I'; - case reinhard02: - return 'E'; - case reinhard05: - return 'D'; - case ferradans: - return 'J'; - case mai: - return 'K'; + case ashikhmin: + return 'H'; + case drago: + return 'G'; + case durand: + return 'F'; + case fattal: + return 'B'; + case mantiuk06: + return 'A'; + case mantiuk08: + return 'C'; + case pattanaik: + return 'I'; + case reinhard02: + return 'E'; + case reinhard05: + return 'D'; + case ferradans: + return 'J'; + case mai: + return 'K'; + case ferwerda: + return 'L'; + case kimkautz: + return 'M'; + case vanhateren: + return 'N'; + case lischinski: + return 'O'; } return ' '; } const QString TonemappingOptions::getPostfix() { - QString postfix=QString("pregamma_%1_").arg(pregamma); + QString postfix = QStringLiteral("pregamma_%1_").arg(pregamma); switch (tmoperator) { - case mantiuk06: - { - postfix+="mantiuk06_"; - float contrastfactor=operator_options.mantiuk06options.contrastfactor; - float saturationfactor=operator_options.mantiuk06options.saturationfactor; - float detailfactor=operator_options.mantiuk06options.detailfactor; - bool contrast_eq=operator_options.mantiuk06options.contrastequalization; + case mantiuk06: { + postfix += QLatin1String("mantiuk06_"); + float contrastfactor = + operator_options.mantiuk06options.contrastfactor; + float saturationfactor = + operator_options.mantiuk06options.saturationfactor; + float detailfactor = operator_options.mantiuk06options.detailfactor; + bool contrast_eq = + operator_options.mantiuk06options.contrastequalization; if (contrast_eq) { - postfix+=QString("contrast_equalization_%1_").arg(contrastfactor); + postfix += QStringLiteral("contrast_equalization_%1_") + .arg(contrastfactor); } else { - postfix+=QString("contrast_mapping_%1_").arg(contrastfactor); + postfix += + QStringLiteral("contrast_mapping_%1_").arg(contrastfactor); } - postfix+=QString("saturation_factor_%1_").arg(saturationfactor); - postfix+=QString("detail_factor_%1").arg(detailfactor); - } - break; - case mantiuk08: - { - postfix+="mantiuk08_"; - float colorsaturation=operator_options.mantiuk08options.colorsaturation; - float contrastenhancement=operator_options.mantiuk08options.contrastenhancement; - float luminancelevel=operator_options.mantiuk08options.luminancelevel; - bool setluminance=operator_options.mantiuk08options.setluminance; + postfix += + QStringLiteral("saturation_factor_%1_").arg(saturationfactor); + postfix += QStringLiteral("detail_factor_%1").arg(detailfactor); + } break; + case mantiuk08: { + postfix += QLatin1String("mantiuk08_"); + float colorsaturation = + operator_options.mantiuk08options.colorsaturation; + float contrastenhancement = + operator_options.mantiuk08options.contrastenhancement; + float luminancelevel = + operator_options.mantiuk08options.luminancelevel; + bool setluminance = operator_options.mantiuk08options.setluminance; if (setluminance) { - postfix+=QString("luminancelevel_%1_").arg(luminancelevel); + postfix += + QStringLiteral("luminancelevel_%1_").arg(luminancelevel); } else { - postfix+=QString("auto_luminance"); + postfix += QStringLiteral("auto_luminance_"); } - postfix+=QString("colorsaturation_%1_").arg(colorsaturation); - postfix+=QString("contrastenhancement_%1").arg(contrastenhancement); - } - break; - case fattal: - { + postfix += + QStringLiteral("color_saturation_%1_").arg(colorsaturation); + postfix += QStringLiteral("contrast_enhancement_%1") + .arg(contrastenhancement); + } break; + case fattal: { if (!operator_options.fattaloptions.newfattal) - postfix+="v1_"; - postfix+="fattal_"; - float alpha=operator_options.fattaloptions.alpha; - float beta=operator_options.fattaloptions.beta; - float saturation2=operator_options.fattaloptions.color; - float noiseredux=operator_options.fattaloptions.noiseredux; - bool fftsolver=operator_options.fattaloptions.fftsolver; - postfix+=QString("alpha_%1_").arg(alpha); - postfix+=QString("beta_%1_").arg(beta); - postfix+=QString("saturation_%1_").arg(saturation2); - postfix+=QString("noiseredux_%1_").arg(noiseredux); - postfix+=QString("fftsolver_%1").arg(fftsolver); - } - break; - case ferradans: - { - postfix+="ferradans_"; - float rho=operator_options.ferradansoptions.rho; - float inv_alpha=operator_options.ferradansoptions.inv_alpha; - postfix+=QString("rho_%1_").arg(rho); - postfix+=QString("inv_alpha_%1_").arg(inv_alpha); - } - break; - case mai: - { - postfix+="mai_"; - } - break; - case ashikhmin: - { - postfix+="ashikhmin_"; + postfix += QLatin1String("v1_"); + postfix += QLatin1String("fattal_"); + float alpha = operator_options.fattaloptions.alpha; + float beta = operator_options.fattaloptions.beta; + float saturation2 = operator_options.fattaloptions.color; + float noiseredux = operator_options.fattaloptions.noiseredux; + bool fftsolver = operator_options.fattaloptions.fftsolver; + postfix += QStringLiteral("alpha_%1_").arg(alpha); + postfix += QStringLiteral("beta_%1_").arg(beta); + postfix += QStringLiteral("saturation_%1_").arg(saturation2); + postfix += QStringLiteral("noiseredux_%1_").arg(noiseredux); + postfix += QStringLiteral("fftsolver_%1").arg(fftsolver); + } break; + case ferradans: { + postfix += QLatin1String("ferradans_"); + float rho = operator_options.ferradansoptions.rho; + float inv_alpha = operator_options.ferradansoptions.inv_alpha; + postfix += QStringLiteral("rho_%1_").arg(rho); + postfix += QStringLiteral("inv_alpha_%1").arg(inv_alpha); + } break; + case ferwerda: { + postfix += QLatin1String("ferwerda_"); + float maxlum = operator_options.ferwerdaoptions.multiplier; + float adaptlum = operator_options.ferwerdaoptions.adaptationluminance; + postfix += QStringLiteral("max_luminance_%1_").arg(maxlum); + postfix += QStringLiteral("adaptation_luminance_%1").arg(adaptlum); + } break; + case kimkautz: { + postfix += QLatin1String("kimkautz_"); + float c1 = operator_options.kimkautzoptions.c1; + float c2 = operator_options.kimkautzoptions.c2; + postfix += QStringLiteral("c1_%1_").arg(c1); + postfix += QStringLiteral("c2_%1").arg(c2); + } break; + case mai: { + postfix += QLatin1String("mai_"); + } break; + case ashikhmin: { + postfix += QLatin1String("ashikhmin_"); if (operator_options.ashikhminoptions.simple) { - postfix+="-simple"; + postfix += QLatin1String("-simple"); } else { - if (operator_options.ashikhminoptions.eq2) { - postfix+="-eq2_"; - } else { - postfix+="-eq4_"; - } - postfix+=QString("local_%1").arg(operator_options.ashikhminoptions.lct); + if (operator_options.ashikhminoptions.eq2) { + postfix += QLatin1String("-eq2_"); + } else { + postfix += QLatin1String("-eq4_"); + } + postfix += QStringLiteral("local_%1") + .arg(operator_options.ashikhminoptions.lct); } - } - break; - case drago: - { - postfix+="drago_"; - postfix+=QString("bias_%1").arg(operator_options.dragooptions.bias); - } - break; - case durand: - { - float spatial=operator_options.durandoptions.spatial; - float range=operator_options.durandoptions.range; - float base=operator_options.durandoptions.base; - postfix+="durand_"; - postfix+=QString("spatial_%1_").arg(spatial); - postfix+=QString("range_%1_").arg(range); - postfix+=QString("base_%1").arg(base); - } - break; - case pattanaik: - { - float multiplier=operator_options.pattanaikoptions.multiplier; - float cone=operator_options.pattanaikoptions.cone; - float rod=operator_options.pattanaikoptions.rod; - postfix+="pattanaik00_"; - postfix+=QString("mul_%1_").arg(multiplier); + } break; + case drago: { + postfix += QLatin1String("drago_"); + postfix += QStringLiteral("bias_%1").arg( + operator_options.dragooptions.bias); + } break; + case durand: { + float spatial = operator_options.durandoptions.spatial; + float range = operator_options.durandoptions.range; + float base = operator_options.durandoptions.base; + postfix += QLatin1String("durand_"); + postfix += QStringLiteral("spatial_%1_").arg(spatial); + postfix += QStringLiteral("range_%1_").arg(range); + postfix += QStringLiteral("base_%1").arg(base); + } break; + case pattanaik: { + float multiplier = operator_options.pattanaikoptions.multiplier; + float cone = operator_options.pattanaikoptions.cone; + float rod = operator_options.pattanaikoptions.rod; + postfix += QLatin1String("pattanaik00_"); + postfix += QStringLiteral("mul_%1_").arg(multiplier); if (operator_options.pattanaikoptions.local) { - postfix+="local"; + postfix += QLatin1String("local"); } else if (operator_options.pattanaikoptions.autolum) { - postfix+="autolum"; + postfix += QLatin1String("autolum"); } else { - postfix+=QString("cone_%1_").arg(cone); - postfix+=QString("rod_%1_").arg(rod); + postfix += QStringLiteral("cone_%1_").arg(cone); + postfix += QStringLiteral("rod_%1").arg(rod); } - } - break; - case reinhard02: - { - float key=operator_options.reinhard02options.key; - float phi=operator_options.reinhard02options.phi; - int range=operator_options.reinhard02options.range; - int lower=operator_options.reinhard02options.lower; - int upper=operator_options.reinhard02options.upper; - postfix+="reinhard02_"; - postfix+=QString("key_%1_").arg(key); - postfix+=QString("phi_%1").arg(phi); + } break; + case reinhard02: { + float key = operator_options.reinhard02options.key; + float phi = operator_options.reinhard02options.phi; + int range = operator_options.reinhard02options.range; + int lower = operator_options.reinhard02options.lower; + int upper = operator_options.reinhard02options.upper; + postfix += QLatin1String("reinhard02_"); + postfix += QStringLiteral("key_%1_").arg(key); + postfix += QStringLiteral("phi_%1").arg(phi); if (operator_options.reinhard02options.scales) { - postfix+=QString("_scales_"); - postfix+=QString("range_%1_").arg(range); - postfix+=QString("lower%1_").arg(lower); - postfix+=QString("upper%1").arg(upper); + postfix += QStringLiteral("_scales_"); + postfix += QStringLiteral("range_%1_").arg(range); + postfix += QStringLiteral("lower_%1_").arg(lower); + postfix += QStringLiteral("upper_%1").arg(upper); } - } - break; - case reinhard05: - { - float brightness=operator_options.reinhard05options.brightness; - float chromaticAdaptation= operator_options.reinhard05options.chromaticAdaptation; - float lightAdaptation=operator_options.reinhard05options.lightAdaptation; - postfix+="reinhard05_"; - postfix+=QString("brightness_%1_").arg(brightness); - postfix+=QString("chromatic_adaptation_%1_").arg(chromaticAdaptation); - postfix+=QString("light_adaptation_%1").arg(lightAdaptation); - } - break; + } break; + case reinhard05: { + float brightness = operator_options.reinhard05options.brightness; + float chromaticAdaptation = + operator_options.reinhard05options.chromaticAdaptation; + float lightAdaptation = + operator_options.reinhard05options.lightAdaptation; + postfix += QLatin1String("reinhard05_"); + postfix += QStringLiteral("brightness_%1_").arg(brightness); + postfix += QStringLiteral("chromatic_adaptation_%1_") + .arg(chromaticAdaptation); + postfix += + QStringLiteral("light_adaptation_%1").arg(lightAdaptation); + } break; + case vanhateren: { + postfix += QLatin1String("vanhateren_"); + float pupil_area = operator_options.vanhaterenoptions.pupil_area; + postfix += QStringLiteral("pupil_area_%1").arg(pupil_area); + } break; + case lischinski: { + postfix += QLatin1String("lischinski_"); + float alpha = operator_options.lischinskioptions.alpha; + postfix += QStringLiteral("alpha_%1").arg(alpha); + } break; } + postfix += QStringLiteral("_postsaturation_%1").arg(postsaturation); + postfix += QStringLiteral("_postgamma_%1").arg(postgamma); return postfix; } -const QString TonemappingOptions::getCaption(bool includePregamma, QString separator) { - QString caption=includePregamma ? QString(QObject::tr("PreGamma=%1")).arg(pregamma) + separator : QString(); +const QString TonemappingOptions::getCaption(bool includePregamma, + QString separator) { + QString caption = + includePregamma + ? QString(QObject::tr("PreGamma=%1")).arg(pregamma) + separator + : QString(); switch (tmoperator) { - case mantiuk06: - { - caption+="Mantiuk06:"; + case mantiuk06: { + caption += QLatin1String("Mantiuk06:"); caption += separator; - float contrastfactor=operator_options.mantiuk06options.contrastfactor; - float saturationfactor=operator_options.mantiuk06options.saturationfactor; - float detailfactor=operator_options.mantiuk06options.detailfactor; - bool contrast_eq=operator_options.mantiuk06options.contrastequalization; + float contrastfactor = + operator_options.mantiuk06options.contrastfactor; + float saturationfactor = + operator_options.mantiuk06options.saturationfactor; + float detailfactor = operator_options.mantiuk06options.detailfactor; + bool contrast_eq = + operator_options.mantiuk06options.contrastequalization; if (contrast_eq) { - caption+=QString(QObject::tr("Contrast Equalization") + "=%1").arg(contrastfactor); + caption += QString(QObject::tr("Contrast Equalization") + "=%1") + .arg(contrastfactor); } else { - caption+=QString(QObject::tr("Contrast") + "=%1").arg(contrastfactor); + caption += QString(QObject::tr("Contrast") + "=%1") + .arg(contrastfactor); } caption += separator; - caption+=QString(QObject::tr("Saturation") + "=%1").arg(saturationfactor); + caption += QString(QObject::tr("Saturation") + "=%1") + .arg(saturationfactor); caption += separator; - caption+=QString(QObject::tr("Detail") + "=%1").arg(detailfactor); - } - break; - case mantiuk08: - { - caption+="Mantiuk08:" + separator; - float colorsaturation=operator_options.mantiuk08options.colorsaturation; - float contrastenhancement=operator_options.mantiuk08options.contrastenhancement; - float luminancelevel=operator_options.mantiuk08options.luminancelevel; - bool setluminance=operator_options.mantiuk08options.setluminance; + caption += QString(QObject::tr("Detail") + "=%1").arg(detailfactor); + } break; + case mantiuk08: { + caption += "Mantiuk08:" + separator; + float colorsaturation = + operator_options.mantiuk08options.colorsaturation; + float contrastenhancement = + operator_options.mantiuk08options.contrastenhancement; + float luminancelevel = + operator_options.mantiuk08options.luminancelevel; + bool setluminance = operator_options.mantiuk08options.setluminance; if (setluminance) { - caption+=QString(QObject::tr("Luminance Level") + "=%1").arg(luminancelevel); + caption += QString(QObject::tr("Luminance Level") + "=%1") + .arg(luminancelevel); } else { - caption+=QString(QObject::tr("Luminance Level=Auto")); + caption += QString(QObject::tr("Luminance Level=Auto")); } caption += separator; - caption+=QString(QObject::tr("Color Saturation") + "=%1").arg(colorsaturation) + separator; - caption+=QString(QObject::tr("Contrast Enhancement") + "=%1").arg(contrastenhancement); - } - break; - case fattal: - { + caption += QString(QObject::tr("Color Saturation") + "=%1") + .arg(colorsaturation) + + separator; + caption += QString(QObject::tr("Contrast Enhancement") + "=%1") + .arg(contrastenhancement); + } break; + case fattal: { if (!operator_options.fattaloptions.newfattal) - caption+="V1_"; - float alpha=operator_options.fattaloptions.alpha; - float beta=operator_options.fattaloptions.beta; - float saturation2=operator_options.fattaloptions.color; - float noiseredux=operator_options.fattaloptions.noiseredux; - bool fftsolver=operator_options.fattaloptions.fftsolver; - caption+="Fattal:" + separator; - caption+=QString(QObject::tr("Alpha") + "=%1").arg(alpha) + separator; - caption+=QString(QObject::tr("Beta") + "=%1").arg(beta) + separator; - caption+=QString(QObject::tr("Saturation") + "=%1").arg(saturation2) + separator; - caption+=QString(QObject::tr("NoiseRedux") + "=%1").arg(noiseredux) + separator; - caption+=QString(QObject::tr("FFTSolver") + "=%1").arg(fftsolver); - } - break; - case ferradans: - { - float rho=operator_options.ferradansoptions.rho; - float inv_alpha=operator_options.ferradansoptions.inv_alpha; - caption+="Ferrands:" + separator; - caption+=QString(QObject::tr("Rho") + "=%1").arg(rho) + separator; - caption+=QString(QObject::tr("InvAlpha") + "=%1").arg(inv_alpha) + separator; - } - break; - case mai: - { - caption+="Mai:" + separator; - } - break; - case ashikhmin: - { - caption+="Ashikhmin:" + separator; + caption += QLatin1String("V1_"); + float alpha = operator_options.fattaloptions.alpha; + float beta = operator_options.fattaloptions.beta; + float saturation2 = operator_options.fattaloptions.color; + float noiseredux = operator_options.fattaloptions.noiseredux; + bool fftsolver = operator_options.fattaloptions.fftsolver; + caption += "Fattal:" + separator; + caption += + QString(QObject::tr("Alpha") + "=%1").arg(alpha) + separator; + caption += + QString(QObject::tr("Beta") + "=%1").arg(beta) + separator; + caption += + QString(QObject::tr("Saturation") + "=%1").arg(saturation2) + + separator; + caption += + QString(QObject::tr("NoiseRedux") + "=%1").arg(noiseredux) + + separator; + caption += QString(QObject::tr("FFTSolver") + "=%1").arg(fftsolver); + } break; + case ferradans: { + float rho = operator_options.ferradansoptions.rho; + float inv_alpha = operator_options.ferradansoptions.inv_alpha; + caption += "Ferrands:" + separator; + caption += QString(QObject::tr("Rho") + "=%1").arg(rho) + separator; + caption += QString(QObject::tr("InvAlpha") + "=%1").arg(inv_alpha); + } break; + case ferwerda: { + float maxlum = operator_options.ferwerdaoptions.multiplier; + float adaptlum = operator_options.ferwerdaoptions.adaptationluminance; + caption += "Ferwerda:" + separator; + caption += QString(QObject::tr("MaxLuminance") + "=%1").arg(maxlum) + separator; + caption += QString(QObject::tr("AdaptationLuminance") + "=%1").arg(adaptlum); + } break; + case kimkautz: { + float c1 = operator_options.kimkautzoptions.c1; + float c2 = operator_options.kimkautzoptions.c2; + caption += "KimKautz:" + separator; + caption += QString(QObject::tr("C1") + "=%1").arg(c1) + separator; + caption += QString(QObject::tr("C2") + "=%1").arg(c2); + } break; + case mai: { + caption += "Mai:" + separator; + } break; + case ashikhmin: { + caption += "Ashikhmin:" + separator; if (operator_options.ashikhminoptions.simple) { - caption+=QObject::tr("simple"); + caption += QObject::tr("simple"); } else { - if (operator_options.ashikhminoptions.eq2) { - caption+=QObject::tr("Equation 2"); - } else { - caption+=QObject::tr("Equation 4"); - } - caption += separator; - caption+=QString(QObject::tr("Local") + "=%1").arg(operator_options.ashikhminoptions.lct); - } - } - break; - case drago: - { - caption+="Drago:" + separator; - caption+=QString(QObject::tr("Bias") + "=%1").arg(operator_options.dragooptions.bias); - } - break; - case durand: - { - float spatial=operator_options.durandoptions.spatial; - float range=operator_options.durandoptions.range; - float base=operator_options.durandoptions.base; - caption+="Durand:" + separator; - caption+=QString(QObject::tr("Spatial") + "=%1").arg(spatial) + separator; - caption+=QString(QObject::tr("Range") + "=%1").arg(range) + separator; - caption+=QString(QObject::tr("Base") + "=%1").arg(base); - } - break; - case pattanaik: - { - float multiplier=operator_options.pattanaikoptions.multiplier; - float cone=operator_options.pattanaikoptions.cone; - float rod=operator_options.pattanaikoptions.rod; - caption+="Pattanaik00:" + separator; - caption+=QString(QObject::tr("Multiplier") + "=%1").arg(multiplier) + separator; + if (operator_options.ashikhminoptions.eq2) { + caption += QObject::tr("Equation 2"); + } else { + caption += QObject::tr("Equation 4"); + } + caption += separator; + caption += QString(QObject::tr("Local") + "=%1") + .arg(operator_options.ashikhminoptions.lct); + } + } break; + case drago: { + caption += "Drago:" + separator; + caption += QString(QObject::tr("Bias") + "=%1") + .arg(operator_options.dragooptions.bias); + } break; + case durand: { + float spatial = operator_options.durandoptions.spatial; + float range = operator_options.durandoptions.range; + float base = operator_options.durandoptions.base; + caption += "Durand:" + separator; + caption += QString(QObject::tr("Spatial") + "=%1").arg(spatial) + + separator; + caption += + QString(QObject::tr("Range") + "=%1").arg(range) + separator; + caption += QString(QObject::tr("Base") + "=%1").arg(base); + } break; + case pattanaik: { + float multiplier = operator_options.pattanaikoptions.multiplier; + float cone = operator_options.pattanaikoptions.cone; + float rod = operator_options.pattanaikoptions.rod; + caption += "Pattanaik00:" + separator; + caption += + QString(QObject::tr("Multiplier") + "=%1").arg(multiplier) + + separator; if (operator_options.pattanaikoptions.local) { - caption+=QObject::tr("Local"); + caption += QObject::tr("Local"); } else if (operator_options.pattanaikoptions.autolum) { - caption+=QObject::tr("AutoLuminance"); + caption += QObject::tr("AutoLuminance"); } else { - caption+=QString(QObject::tr("Cone") + "=%1").arg(cone) + separator; - caption+=QString(QObject::tr("Rod") + "=%1").arg(rod); + caption += + QString(QObject::tr("Cone") + "=%1").arg(cone) + separator; + caption += QString(QObject::tr("Rod") + "=%1").arg(rod); } - } - break; - case reinhard02: - { - float key=operator_options.reinhard02options.key; - float phi=operator_options.reinhard02options.phi; - int range=operator_options.reinhard02options.range; - int lower=operator_options.reinhard02options.lower; - int upper=operator_options.reinhard02options.upper; - caption+="Reinhard02:" + separator; - caption+=QString(QObject::tr("Key") + "=%1").arg(key) + separator; - caption+=QString(QObject::tr("Phi") + "=%1").arg(phi); + } break; + case reinhard02: { + float key = operator_options.reinhard02options.key; + float phi = operator_options.reinhard02options.phi; + int range = operator_options.reinhard02options.range; + int lower = operator_options.reinhard02options.lower; + int upper = operator_options.reinhard02options.upper; + caption += "Reinhard02:" + separator; + caption += QString(QObject::tr("Key") + "=%1").arg(key) + separator; + caption += QString(QObject::tr("Phi") + "=%1").arg(phi); if (operator_options.reinhard02options.scales) { - caption+= separator + QString(QObject::tr("Scales:")) + separator; - caption+=QString(QObject::tr("Range") + "=%1").arg(range) + separator; - caption+=QString(QObject::tr("Lower") + "=%1").arg(lower) + separator; - caption+=QString(QObject::tr("Upper") + "=%1").arg(upper); - } - } - break; - case reinhard05: - { - float brightness=operator_options.reinhard05options.brightness; - float chromaticAdaptation= operator_options.reinhard05options.chromaticAdaptation; - float lightAdaptation=operator_options.reinhard05options.lightAdaptation; - caption+="Reinhard05:" + separator; - caption+=QString(QObject::tr("Brightness") + "=%1").arg(brightness) + separator; - caption+=QString(QObject::tr("Chromatic Adaptation") + "=%1").arg(chromaticAdaptation) + separator; - caption+=QString(QObject::tr("Light Adaptation") + "=%1").arg(lightAdaptation); + caption += + separator + QString(QObject::tr("Scales:")) + separator; + caption += QString(QObject::tr("Range") + "=%1").arg(range) + + separator; + caption += QString(QObject::tr("Lower") + "=%1").arg(lower) + + separator; + caption += QString(QObject::tr("Upper") + "=%1").arg(upper); } - break; + } break; + case reinhard05: { + float brightness = operator_options.reinhard05options.brightness; + float chromaticAdaptation = + operator_options.reinhard05options.chromaticAdaptation; + float lightAdaptation = + operator_options.reinhard05options.lightAdaptation; + caption += "Reinhard05:" + separator; + caption += + QString(QObject::tr("Brightness") + "=%1").arg(brightness) + + separator; + caption += QString(QObject::tr("Chromatic Adaptation") + "=%1") + .arg(chromaticAdaptation) + + separator; + caption += QString(QObject::tr("Light Adaptation") + "=%1") + .arg(lightAdaptation); + } break; + case vanhateren: { + float pupil_area = operator_options.vanhaterenoptions.pupil_area; + caption += "VanHateren:" + separator; + caption += QString(QObject::tr("Pupil Area") + "=%1").arg(pupil_area); + } break; + case lischinski: { + float alpha = operator_options.lischinskioptions.alpha; + caption += "Lischinski:" + separator; + caption += QString(QObject::tr("Alpha") + "=%1").arg(alpha); + } break; } + caption += includePregamma + ? separator + QString(QObject::tr("PostSaturation=%1")).arg(postsaturation) + + separator + QString(QObject::tr("PostGamma=%1")).arg(postgamma) + : QString(); return caption; } -TonemappingOptions* TMOptionsOperations::parseFile(const QString& fname) -{ - QFile file(fname); - if ( !file.open(QIODevice::ReadOnly | QIODevice::Text) || - file.size()==0) - { - throw (QApplication::tr("ERROR: cannot load Tone Mapping Setting file: ")+fname); - //return NULL; - } +TonemappingOptions *TMOptionsOperations::parseFile(const QString &fname) { + QFile file(fname); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text) || file.size() == 0) { + throw( + QApplication::tr("ERROR: cannot load Tone Mapping Setting file: ") + + fname); + // return NULL; + } - TonemappingOptions *toreturn = new TonemappingOptions; - //memset(toreturn, 0, sizeof *toreturn); + TonemappingOptions *toreturn = new TonemappingOptions; + // memset(toreturn, 0, sizeof *toreturn); - QTextStream in(&file); - QString field,value; + QTextStream in(&file); + QString field, value; - QString tmo; // Hack, same parameter "RANGE" in durand and reinhard02 + QString tmo; // Hack, same parameter "RANGE" in durand and reinhard02 - while (!in.atEnd()) { - QString line = in.readLine(); - //skip comments - if (line.startsWith('#')) - continue; - - field=line.section('=',0,0); //get the field - value=line.section('=',1,1); //get the value - if (field=="TMOSETTINGSVERSION") { - if (value != TMOSETTINGSVERSION) { - delete toreturn; - throw (QApplication::tr("ERROR: File too old, cannot parse Tone Mapping Setting file: ")+fname); -// return NULL; - } - } else if (field=="XSIZE") { - toreturn->xsize=value.toInt(); - } else if (field=="QUALITY") { - toreturn->quality=value.toInt(); - } else if (field=="TMO") { - if (value=="Ashikhmin02") { - toreturn->tmoperator=ashikhmin; - tmo = "Ashikhmin02"; - } else if (value == "Drago03") { - toreturn->tmoperator=drago; - tmo = "Drago03"; - } else if (value == "Durand02") { - toreturn->tmoperator=durand; - tmo = "Durand02"; - } else if (value == "Fattal02") { - toreturn->tmoperator=fattal; - tmo = "Fattal02"; - } else if (value == "Ferradans11") { - toreturn->tmoperator=ferradans; - tmo = "Ferradans11"; - } else if (value == "Mai11") { - toreturn->tmoperator=mai; - tmo = "Mai11"; - } else if (value == "Pattanaik00") { - toreturn->tmoperator=pattanaik; - tmo = "Pattanaik00"; - } else if (value == "Reinhard02") { - toreturn->tmoperator=reinhard02; - tmo = "Reinhard02"; - } else if (value == "Reinhard05") { - toreturn->tmoperator=reinhard05; - tmo = "Reinhard05"; - } else if (value == "Mantiuk06") { - toreturn->tmoperator=mantiuk06; - tmo = "Mantiuk06"; - } else if (value == "Mantiuk08") { - toreturn->tmoperator=mantiuk08; - tmo = "Mantiuk08"; - } - } else if (field=="CONTRASTFACTOR") { - toreturn->operator_options.mantiuk06options.contrastfactor=value.toFloat(); - } else if (field=="SATURATIONFACTOR") { - toreturn->operator_options.mantiuk06options.saturationfactor=value.toFloat(); - } else if (field=="DETAILFACTOR") { - toreturn->operator_options.mantiuk06options.detailfactor=value.toFloat(); - } else if (field=="CONTRASTEQUALIZATION") { - toreturn->operator_options.mantiuk06options.contrastequalization=(value == "YES"); - } else if (field=="COLORSATURATION") { - toreturn->operator_options.mantiuk08options.colorsaturation=value.toFloat(); - } else if (field=="CONTRASTENHANCEMENT") { - toreturn->operator_options.mantiuk08options.contrastenhancement=value.toFloat(); - } else if (field=="LUMINANCELEVEL") { - toreturn->operator_options.mantiuk08options.luminancelevel=value.toFloat(); - } else if (field=="SETLUMINANCE") { - toreturn->operator_options.mantiuk08options.setluminance=(value == "YES"); - } else if (field=="SIMPLE") { - toreturn->operator_options.ashikhminoptions.simple= (value == "YES") ? true : false; - } else if (field=="EQUATION") { - toreturn->operator_options.ashikhminoptions.eq2= (value=="2") ? true : false; - } else if (field=="CONTRAST") { - toreturn->operator_options.ashikhminoptions.lct=value.toFloat(); - } else if (field=="BIAS") { - toreturn->operator_options.dragooptions.bias=value.toFloat(); - } else if (field=="SPATIAL") { - toreturn->operator_options.durandoptions.spatial=value.toFloat(); - } else if (field=="RANGE") { - if (tmo == "Durand02") - toreturn->operator_options.durandoptions.range=value.toFloat(); - else - toreturn->operator_options.reinhard02options.range=value.toInt(); - } else if (field=="BASE") { - toreturn->operator_options.durandoptions.base=value.toFloat(); - } else if (field=="ALPHA") { - toreturn->operator_options.fattaloptions.alpha=value.toFloat(); - } else if (field=="BETA") { - toreturn->operator_options.fattaloptions.beta=value.toFloat(); - } else if (field=="COLOR") { - toreturn->operator_options.fattaloptions.color=value.toFloat(); - } else if (field=="NOISE") { - toreturn->operator_options.fattaloptions.noiseredux=value.toFloat(); - } else if (field=="OLDFATTAL") { - toreturn->operator_options.fattaloptions.newfattal= true; // This is the new version of fattal pre FFT (always yes) - toreturn->operator_options.fattaloptions.fftsolver= (value == "NO"); - } else if (field=="RHO") { - toreturn->operator_options.ferradansoptions.rho=value.toFloat(); - } else if (field=="INV_ALPHA") { - toreturn->operator_options.ferradansoptions.inv_alpha=value.toFloat(); - } else if (field=="MULTIPLIER") { - toreturn->operator_options.pattanaikoptions.multiplier=value.toFloat(); - } else if (field=="LOCAL") { - toreturn->operator_options.pattanaikoptions.local= (value=="YES"); - } else if (field=="AUTOLUMINANCE") { - toreturn->operator_options.pattanaikoptions.autolum= (value=="YES"); - } else if (field=="CONE") { - toreturn->operator_options.pattanaikoptions.cone=value.toFloat(); - } else if (field=="ROD") { - toreturn->operator_options.pattanaikoptions.rod=value.toFloat(); - } else if (field=="KEY") { - toreturn->operator_options.reinhard02options.key=value.toFloat(); - } else if (field=="PHI") { - toreturn->operator_options.reinhard02options.phi=value.toFloat(); - } else if (field=="SCALES") { - toreturn->operator_options.reinhard02options.scales= (value=="YES") ? true : false; - } else if (field=="LOWER") { - toreturn->operator_options.reinhard02options.lower=value.toInt(); - } else if (field=="UPPER") { - toreturn->operator_options.reinhard02options.upper=value.toInt(); - } else if (field=="BRIGHTNESS") { - toreturn->operator_options.reinhard05options.brightness=value.toFloat(); - } else if (field=="CHROMATICADAPTATION") { - toreturn->operator_options.reinhard05options.chromaticAdaptation=value.toFloat(); - } else if (field=="LIGHTADAPTATION") { - toreturn->operator_options.reinhard05options.lightAdaptation=value.toFloat(); - } else if (field=="PREGAMMA") { - toreturn->pregamma=value.toFloat(); - } else { - delete toreturn; - throw (QApplication::tr("ERROR: cannot parse Tone Mapping Setting file: ")+fname); -// return NULL; - } + while (!in.atEnd()) { + QString line = in.readLine(); + // skip comments + if (line.startsWith('#')) continue; + + field = line.section('=', 0, 0); // get the field + value = line.section('=', 1, 1); // get the value + if (field == QLatin1String("TMOSETTINGSVERSION")) { + if (value != TMOSETTINGSVERSION) { + delete toreturn; + throw(QApplication::tr( + "ERROR: File too old, cannot parse Tone Mapping " + "Setting file: ") + + fname); + // return NULL; + } + } else if (field == QLatin1String("XSIZE")) { + toreturn->xsize = value.toInt(); + } else if (field == QLatin1String("QUALITY")) { + toreturn->quality = value.toInt(); + } else if (field == QLatin1String("TMO")) { + if (value == QLatin1String("Ashikhmin02")) { + toreturn->tmoperator = ashikhmin; + tmo = QStringLiteral("Ashikhmin02"); + } else if (value == QLatin1String("Drago03")) { + toreturn->tmoperator = drago; + tmo = QStringLiteral("Drago03"); + } else if (value == QLatin1String("Durand02")) { + toreturn->tmoperator = durand; + tmo = QStringLiteral("Durand02"); + } else if (value == QLatin1String("Fattal02")) { + toreturn->tmoperator = fattal; + tmo = QStringLiteral("Fattal02"); + } else if (value == QLatin1String("Ferradans11")) { + toreturn->tmoperator = ferradans; + tmo = QStringLiteral("Ferradans11"); + } else if (value == QLatin1String("Ferwerda96")) { + toreturn->tmoperator = ferwerda; + tmo = QStringLiteral("Ferwerda96"); + } else if (value == QLatin1String("KimKautz08")) { + toreturn->tmoperator = kimkautz; + tmo = QStringLiteral("KimKautz08"); + } else if (value == QLatin1String("Mai11")) { + toreturn->tmoperator = mai; + tmo = QStringLiteral("Mai11"); + } else if (value == QLatin1String("Pattanaik00")) { + toreturn->tmoperator = pattanaik; + tmo = QStringLiteral("Pattanaik00"); + } else if (value == QLatin1String("Reinhard02")) { + toreturn->tmoperator = reinhard02; + tmo = QStringLiteral("Reinhard02"); + } else if (value == QLatin1String("Reinhard05")) { + toreturn->tmoperator = reinhard05; + tmo = QStringLiteral("Reinhard05"); + } else if (value == QLatin1String("Mantiuk06")) { + toreturn->tmoperator = mantiuk06; + tmo = QStringLiteral("Mantiuk06"); + } else if (value == QLatin1String("Mantiuk08")) { + toreturn->tmoperator = mantiuk08; + tmo = QStringLiteral("Mantiuk08"); + } else if (value == QLatin1String("VanHateren06")) { + toreturn->tmoperator = vanhateren; + tmo = QStringLiteral("VanHateren06"); + } else if (value == QLatin1String("Lischinski06")) { + toreturn->tmoperator = lischinski; + tmo = QStringLiteral("Lischinski06"); + } + } else if (field == QLatin1String("CONTRASTFACTOR")) { + toreturn->operator_options.mantiuk06options.contrastfactor = + value.toFloat(); + } else if (field == QLatin1String("SATURATIONFACTOR")) { + toreturn->operator_options.mantiuk06options.saturationfactor = + value.toFloat(); + } else if (field == QLatin1String("DETAILFACTOR")) { + toreturn->operator_options.mantiuk06options.detailfactor = + value.toFloat(); + } else if (field == QLatin1String("CONTRASTEQUALIZATION")) { + toreturn->operator_options.mantiuk06options.contrastequalization = + (value == QLatin1String("YES")); + } else if (field == QLatin1String("COLORSATURATION")) { + toreturn->operator_options.mantiuk08options.colorsaturation = + value.toFloat(); + } else if (field == QLatin1String("CONTRASTENHANCEMENT")) { + toreturn->operator_options.mantiuk08options.contrastenhancement = + value.toFloat(); + } else if (field == QLatin1String("LUMINANCELEVEL")) { + toreturn->operator_options.mantiuk08options.luminancelevel = + value.toFloat(); + } else if (field == QLatin1String("SETLUMINANCE")) { + toreturn->operator_options.mantiuk08options.setluminance = + (value == QLatin1String("YES")); + } else if (field == QLatin1String("SIMPLE")) { + toreturn->operator_options.ashikhminoptions.simple = + (value == QLatin1String("YES")) ? true : false; + } else if (field == QLatin1String("EQUATION")) { + toreturn->operator_options.ashikhminoptions.eq2 = + (value == QLatin1String("2")) ? true : false; + } else if (field == QLatin1String("CONTRAST")) { + toreturn->operator_options.ashikhminoptions.lct = value.toFloat(); + } else if (field == QLatin1String("BIAS")) { + toreturn->operator_options.dragooptions.bias = value.toFloat(); + } else if (field == QLatin1String("SPATIAL")) { + toreturn->operator_options.durandoptions.spatial = value.toFloat(); + } else if (field == QLatin1String("RANGE")) { + if (tmo == QLatin1String("Durand02")) + toreturn->operator_options.durandoptions.range = + value.toFloat(); + else + toreturn->operator_options.reinhard02options.range = + value.toInt(); + } else if (field == QLatin1String("BASE")) { + toreturn->operator_options.durandoptions.base = value.toFloat(); + } else if (field == QLatin1String("ALPHA")) { + toreturn->operator_options.fattaloptions.alpha = value.toFloat(); + } else if (field == QLatin1String("BETA")) { + toreturn->operator_options.fattaloptions.beta = value.toFloat(); + } else if (field == QLatin1String("COLOR")) { + toreturn->operator_options.fattaloptions.color = value.toFloat(); + } else if (field == QLatin1String("NOISE")) { + toreturn->operator_options.fattaloptions.noiseredux = + value.toFloat(); + } else if (field == QLatin1String("OLDFATTAL")) { + toreturn->operator_options.fattaloptions.newfattal = + true; // This is the new version of fattal pre FFT (always yes) + toreturn->operator_options.fattaloptions.fftsolver = + (value == QLatin1String("NO")); + } else if (field == QLatin1String("RHO")) { + toreturn->operator_options.ferradansoptions.rho = value.toFloat(); + } else if (field == QLatin1String("INV_ALPHA")) { + toreturn->operator_options.ferradansoptions.inv_alpha = + value.toFloat(); + } else if (field == QLatin1String("MAX_LUMINANCE")) { + toreturn->operator_options.ferwerdaoptions.multiplier = value.toFloat(); + } else if (field == QLatin1String("ADAPTATION_LUMINANCE")) { + toreturn->operator_options.ferwerdaoptions.adaptationluminance = + value.toFloat(); + } else if (field == QLatin1String("KK_C1")) { + toreturn->operator_options.kimkautzoptions.c1 = value.toFloat(); + } else if (field == QLatin1String("KK_C2")) { + toreturn->operator_options.kimkautzoptions.c2 = value.toFloat(); + } else if (field == QLatin1String("MULTIPLIER")) { + toreturn->operator_options.pattanaikoptions.multiplier = + value.toFloat(); + } else if (field == QLatin1String("LOCAL")) { + toreturn->operator_options.pattanaikoptions.local = + (value == QLatin1String("YES")); + } else if (field == QLatin1String("AUTOLUMINANCE")) { + toreturn->operator_options.pattanaikoptions.autolum = + (value == QLatin1String("YES")); + } else if (field == QLatin1String("CONE")) { + toreturn->operator_options.pattanaikoptions.cone = value.toFloat(); + } else if (field == QLatin1String("ROD")) { + toreturn->operator_options.pattanaikoptions.rod = value.toFloat(); + } else if (field == QLatin1String("KEY")) { + toreturn->operator_options.reinhard02options.key = value.toFloat(); + } else if (field == QLatin1String("PHI")) { + toreturn->operator_options.reinhard02options.phi = value.toFloat(); + } else if (field == QLatin1String("SCALES")) { + toreturn->operator_options.reinhard02options.scales = + (value == QLatin1String("YES")) ? true : false; + } else if (field == QLatin1String("LOWER")) { + toreturn->operator_options.reinhard02options.lower = value.toInt(); + } else if (field == QLatin1String("UPPER")) { + toreturn->operator_options.reinhard02options.upper = value.toInt(); + } else if (field == QLatin1String("BRIGHTNESS")) { + toreturn->operator_options.reinhard05options.brightness = + value.toFloat(); + } else if (field == QLatin1String("CHROMATICADAPTATION")) { + toreturn->operator_options.reinhard05options.chromaticAdaptation = + value.toFloat(); + } else if (field == QLatin1String("LIGHTADAPTATION")) { + toreturn->operator_options.reinhard05options.lightAdaptation = + value.toFloat(); + } else if (field == QLatin1String("PUPIL_AREA")) { + toreturn->operator_options.vanhaterenoptions.pupil_area = + value.toFloat(); + } else if (field == QLatin1String("ALPHA")) { + toreturn->operator_options.lischinskioptions.alpha = + value.toFloat(); + } else if (field == QLatin1String("PREGAMMA")) { + toreturn->pregamma = value.toFloat(); + } else if (field == QLatin1String("POSTGAMMA")) { + toreturn->postgamma = value.toFloat(); + } else if (field == QLatin1String("POSTSATURATION")) { + toreturn->postsaturation = value.toFloat(); + } else { + delete toreturn; + throw(QApplication::tr( + "ERROR: cannot parse Tone Mapping Setting file: ") + + fname); + // return NULL; } - return toreturn; + } + return toreturn; } -TonemappingOptions* TMOptionsOperations::getDefaultTMOptions() { - TonemappingOptions *toreturn=new TonemappingOptions; - //TODO when instantiating the tonemapperThread, check this value: if -2 => create thread with originalsize=-2 (to skip resize the step as we did with the batch tone mapping), else (the user wants to resize) create thread with true originalxsize - toreturn->xsize=-2; - return toreturn; +TonemappingOptions *TMOptionsOperations::getDefaultTMOptions() { + TonemappingOptions *toreturn = new TonemappingOptions; + // TODO when instantiating the tonemapperThread, check this value: if -2 => + // create thread with originalsize=-2 (to skip resize the step as we did + // with + // the batch tone mapping), else (the user wants to resize) create thread + // with + // true originalxsize + toreturn->xsize = -2; + return toreturn; } -TMOptionsOperations::TMOptionsOperations(const TonemappingOptions* opts) : opts(opts) { -} +TMOptionsOperations::TMOptionsOperations(const TonemappingOptions *opts) + : opts(opts) {} QString TMOptionsOperations::getExifComment() { - QString exif_comment="Luminance HDR " LUMINANCEVERSION " tonemapping parameters:\n"; - exif_comment+="Operator: "; - switch (opts->tmoperator) { + QString exif_comment = + "Luminance HDR " LUMINANCEVERSION "\n\nTonemapping parameters:\n"; + exif_comment += QLatin1String("Operator: "); + switch (opts->tmoperator) { case mantiuk06: { - float contrastfactor=opts->operator_options.mantiuk06options.contrastfactor; - float saturationfactor=opts->operator_options.mantiuk06options.saturationfactor; - float detailfactor=opts->operator_options.mantiuk06options.detailfactor; - bool contrast_eq=opts->operator_options.mantiuk06options.contrastequalization; - exif_comment+="Mantiuk06\nParameters:\n"; - if (contrast_eq) { - exif_comment+=QString("Contrast Equalization factor: %1\n").arg(contrastfactor); - } else { - exif_comment+=QString("Contrast Mapping factor: %1\n").arg(contrastfactor); - } - exif_comment+=QString("Saturation Factor: %1 \n").arg(saturationfactor); - exif_comment+=QString("Detail Factor: %1 \n").arg(detailfactor); - } - break; + float contrastfactor = + opts->operator_options.mantiuk06options.contrastfactor; + float saturationfactor = + opts->operator_options.mantiuk06options.saturationfactor; + float detailfactor = + opts->operator_options.mantiuk06options.detailfactor; + bool contrast_eq = + opts->operator_options.mantiuk06options.contrastequalization; + exif_comment += QLatin1String("Mantiuk06\nParameters:\n"); + if (contrast_eq) { + exif_comment += + QStringLiteral("Contrast Equalization factor: %1\n") + .arg(contrastfactor); + } else { + exif_comment += QStringLiteral("Contrast Mapping factor: %1\n") + .arg(contrastfactor); + } + exif_comment += QStringLiteral("Saturation Factor: %1 \n") + .arg(saturationfactor); + exif_comment += + QStringLiteral("Detail Factor: %1 \n").arg(detailfactor); + } break; case mantiuk08: { - float colorsaturation=opts->operator_options.mantiuk08options.colorsaturation; - float contrastenhancement=opts->operator_options.mantiuk08options.contrastenhancement; - float luminancelevel=opts->operator_options.mantiuk08options.luminancelevel; - bool setluminance=opts->operator_options.mantiuk08options.setluminance; - exif_comment+="Mantiuk08\nParameters:\n"; - if (setluminance) { - exif_comment+=QString("Luminance Level: %1 \n").arg(luminancelevel); - } else { - exif_comment+=QString("Luminance Level: Auto \n"); - } - exif_comment+=QString("Color Saturation: %1 \n").arg(colorsaturation); - exif_comment+=QString("Contrast Enhancement: %1 \n").arg(contrastenhancement); - } - break; + float colorsaturation = + opts->operator_options.mantiuk08options.colorsaturation; + float contrastenhancement = + opts->operator_options.mantiuk08options.contrastenhancement; + float luminancelevel = + opts->operator_options.mantiuk08options.luminancelevel; + bool setluminance = + opts->operator_options.mantiuk08options.setluminance; + exif_comment += QLatin1String("Mantiuk08\nParameters:\n"); + if (setluminance) { + exif_comment += QStringLiteral("Luminance Level: %1 \n") + .arg(luminancelevel); + } else { + exif_comment += QStringLiteral("Luminance Level: Auto \n"); + } + exif_comment += + QStringLiteral("Color Saturation: %1 \n").arg(colorsaturation); + exif_comment += QStringLiteral("Contrast Enhancement: %1 \n") + .arg(contrastenhancement); + } break; case fattal: { - float alpha=opts->operator_options.fattaloptions.alpha; - float beta=opts->operator_options.fattaloptions.beta; - float saturation2=opts->operator_options.fattaloptions.color; - float noiseredux=opts->operator_options.fattaloptions.noiseredux; - if (!opts->operator_options.fattaloptions.newfattal) { - exif_comment+="V1_"; - } - exif_comment+="Fattal\nParameters:\n"; - exif_comment+=QString("Alpha: %1\n").arg(alpha); - exif_comment+=QString("Beta: %1\n").arg(beta); - exif_comment+=QString("Color Saturation: %1 \n").arg(saturation2); - exif_comment+=QString("Noise Reduction: %1 \n").arg(noiseredux); - } - break; + float alpha = opts->operator_options.fattaloptions.alpha; + float beta = opts->operator_options.fattaloptions.beta; + float saturation2 = opts->operator_options.fattaloptions.color; + float noiseredux = opts->operator_options.fattaloptions.noiseredux; + if (!opts->operator_options.fattaloptions.newfattal) { + exif_comment += QLatin1String("V1_"); + } + exif_comment += QLatin1String("Fattal\nParameters:\n"); + exif_comment += QStringLiteral("Alpha: %1\n").arg(alpha); + exif_comment += QStringLiteral("Beta: %1\n").arg(beta); + exif_comment += + QStringLiteral("Color Saturation: %1 \n").arg(saturation2); + exif_comment += + QStringLiteral("Noise Reduction: %1 \n").arg(noiseredux); + } break; case ferradans: { - float rho=opts->operator_options.ferradansoptions.rho; - float inv_alpha=opts->operator_options.ferradansoptions.inv_alpha; - exif_comment+="Ferrands\nParameters:\n"; - exif_comment+=QString("Rho: %1\n").arg(rho); - exif_comment+=QString("InvAlpha: %1\n").arg(inv_alpha); - } - break; + float rho = opts->operator_options.ferradansoptions.rho; + float inv_alpha = opts->operator_options.ferradansoptions.inv_alpha; + exif_comment += QLatin1String("Ferrands\nParameters:\n"); + exif_comment += QStringLiteral("Rho: %1\n").arg(rho); + exif_comment += QStringLiteral("InvAlpha: %1\n").arg(inv_alpha); + } break; + case ferwerda: { + float maxlum = opts->operator_options.ferwerdaoptions.multiplier; + float adaptlum = opts->operator_options.ferwerdaoptions.adaptationluminance; + exif_comment += QLatin1String("Ferwerda\nParameters:\n"); + exif_comment += QStringLiteral("MaxLuminance: %1\n").arg(maxlum); + exif_comment += QStringLiteral("AdaptationLuminance: %1\n").arg(adaptlum); + } break; + case kimkautz: { + float c1 = opts->operator_options.kimkautzoptions.c1; + float c2 = opts->operator_options.kimkautzoptions.c2; + exif_comment += QLatin1String("KimKautz\nParameters:\n"); + exif_comment += QStringLiteral("C1: %1\n").arg(c1); + exif_comment += QStringLiteral("C2: %1\n").arg(c2); + } break; case mai: { - exif_comment+="Ferrands\n"; - } - break; + exif_comment += QLatin1String( + "Mai\nParameters:\nThis operator has no parameters\n"); + } break; case ashikhmin: { - exif_comment+="Ashikhmin\nParameters:\n"; - if (opts->operator_options.ashikhminoptions.simple) { - exif_comment+="Simple\n"; + exif_comment += QLatin1String("Ashikhmin\nParameters:\n"); + if (opts->operator_options.ashikhminoptions.simple) { + exif_comment += QLatin1String("Simple\n"); + } else { + if (opts->operator_options.ashikhminoptions.eq2) { + exif_comment += QLatin1String("Equation 2\n"); } else { - if (opts->operator_options.ashikhminoptions.eq2) { - exif_comment+="Equation 2\n"; - } else { - exif_comment+="Equation 4\n"; - } - exif_comment+=QString("Local Contrast value: %1\n").arg(opts->operator_options.ashikhminoptions.lct); - } + exif_comment += QLatin1String("Equation 4\n"); } - break; + exif_comment += + QStringLiteral("Local Contrast value: %1\n") + .arg(opts->operator_options.ashikhminoptions.lct); + } + } break; case drago: { - exif_comment+="Drago\nParameters:\n"; - exif_comment+=QString("Bias: %1\n").arg(opts->operator_options.dragooptions.bias); - } - break; + exif_comment += QLatin1String("Drago\nParameters:\n"); + exif_comment += QStringLiteral("Bias: %1\n") + .arg(opts->operator_options.dragooptions.bias); + } break; case durand: { - float spatial=opts->operator_options.durandoptions.spatial; - float range=opts->operator_options.durandoptions.range; - float base=opts->operator_options.durandoptions.base; - exif_comment+="Durand\nParameters:\n"; - exif_comment+=QString("Spatial Kernel Sigma: %1\n").arg(spatial); - exif_comment+=QString("Range Kernel Sigma: %1\n").arg(range); - exif_comment+=QString("Base Contrast: %1\n").arg(base); - } - break; + float spatial = opts->operator_options.durandoptions.spatial; + float range = opts->operator_options.durandoptions.range; + float base = opts->operator_options.durandoptions.base; + exif_comment += QLatin1String("Durand\nParameters:\n"); + exif_comment += + QStringLiteral("Spatial Kernel Sigma: %1\n").arg(spatial); + exif_comment += + QStringLiteral("Range Kernel Sigma: %1\n").arg(range); + exif_comment += QStringLiteral("Base Contrast: %1\n").arg(base); + } break; case pattanaik: { - float multiplier=opts->operator_options.pattanaikoptions.multiplier; - float cone=opts->operator_options.pattanaikoptions.cone; - float rod=opts->operator_options.pattanaikoptions.rod; - exif_comment+="Pattanaik\nParameters:\n"; - exif_comment+=QString("Multiplier: %1\n").arg(multiplier); - if (opts->operator_options.pattanaikoptions.local) { - exif_comment+="Local Tone Mapping\n"; - } else if (opts->operator_options.pattanaikoptions.autolum) { - exif_comment+="Con and Rod based on image luminance\n"; - } else { - exif_comment+=QString("Cone Level: %1\n").arg(cone); - exif_comment+=QString("Rod Level: %1\n").arg(rod); - } - } - break; + float multiplier = + opts->operator_options.pattanaikoptions.multiplier; + float cone = opts->operator_options.pattanaikoptions.cone; + float rod = opts->operator_options.pattanaikoptions.rod; + exif_comment += QLatin1String("Pattanaik\nParameters:\n"); + exif_comment += QStringLiteral("Multiplier: %1\n").arg(multiplier); + if (opts->operator_options.pattanaikoptions.local) { + exif_comment += QLatin1String("Local Tone Mapping\n"); + } else if (opts->operator_options.pattanaikoptions.autolum) { + exif_comment += + QLatin1String("Con and Rod based on image luminance\n"); + } else { + exif_comment += QStringLiteral("Cone Level: %1\n").arg(cone); + exif_comment += QStringLiteral("Rod Level: %1\n").arg(rod); + } + } break; case reinhard02: { - float key=opts->operator_options.reinhard02options.key; - float phi=opts->operator_options.reinhard02options.phi; - int range=opts->operator_options.reinhard02options.range; - int lower=opts->operator_options.reinhard02options.lower; - int upper=opts->operator_options.reinhard02options.upper; - exif_comment+="Reinhard02\nParameters:\n"; - exif_comment+=QString("Key: %1\n").arg(key); - exif_comment+=QString("Phi: %1\n").arg(phi); - if (opts->operator_options.reinhard02options.scales) { - exif_comment+=QString("Scales\n"); - exif_comment+=QString("Range: %1\n").arg(range); - exif_comment+=QString("Lower: %1\n").arg(lower); - exif_comment+=QString("Upper: %1\n").arg(upper); - } - } - break; + float key = opts->operator_options.reinhard02options.key; + float phi = opts->operator_options.reinhard02options.phi; + int range = opts->operator_options.reinhard02options.range; + int lower = opts->operator_options.reinhard02options.lower; + int upper = opts->operator_options.reinhard02options.upper; + exif_comment += QLatin1String("Reinhard02\nParameters:\n"); + exif_comment += QStringLiteral("Key: %1\n").arg(key); + exif_comment += QStringLiteral("Phi: %1\n").arg(phi); + if (opts->operator_options.reinhard02options.scales) { + exif_comment += QStringLiteral("Scales\n"); + exif_comment += QStringLiteral("Range: %1\n").arg(range); + exif_comment += QStringLiteral("Lower: %1\n").arg(lower); + exif_comment += QStringLiteral("Upper: %1\n").arg(upper); + } + } break; case reinhard05: { - float brightness = opts->operator_options.reinhard05options.brightness; - float chromaticAdaptation = opts->operator_options.reinhard05options.chromaticAdaptation; - float lightAdaptation = opts->operator_options.reinhard05options.lightAdaptation; - exif_comment+="Reinhard05\nParameters:\n"; - exif_comment+=QString("Brightness: %1\n").arg(brightness); - exif_comment+=QString("Chromatic Adaptation: %1\n").arg(chromaticAdaptation); - exif_comment+=QString("Light Adaptation: %1\n").arg(lightAdaptation); - } - break; - } - exif_comment+=QString("------\nPreGamma: %1\n").arg(opts->pregamma); - return exif_comment; + float brightness = + opts->operator_options.reinhard05options.brightness; + float chromaticAdaptation = + opts->operator_options.reinhard05options.chromaticAdaptation; + float lightAdaptation = + opts->operator_options.reinhard05options.lightAdaptation; + exif_comment += QLatin1String("Reinhard05\nParameters:\n"); + exif_comment += QStringLiteral("Brightness: %1\n").arg(brightness); + exif_comment += QStringLiteral("Chromatic Adaptation: %1\n") + .arg(chromaticAdaptation); + exif_comment += + QStringLiteral("Light Adaptation: %1\n").arg(lightAdaptation); + } break; + case vanhateren: { + float pupil_area = + opts->operator_options.vanhaterenoptions.pupil_area; + exif_comment += QLatin1String("VanHateren06\nParameters:\n"); + exif_comment += QStringLiteral("Pupil Area: %1\n").arg(pupil_area); + } break; + case lischinski: { + float alpha = + opts->operator_options.lischinskioptions.alpha; + exif_comment += QLatin1String("Lischinski06\nParameters:\n"); + exif_comment += QStringLiteral("Alpha: %1\n").arg(alpha); + } break; + } + exif_comment += + QStringLiteral("------\nPreGamma: %1\n").arg(opts->pregamma); + return exif_comment; } - - - - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/Core/TonemappingOptions.h luminance-hdr-2.6.0/src/Core/TonemappingOptions.h --- luminance-hdr-2.5.1+dfsg/src/Core/TonemappingOptions.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Core/TonemappingOptions.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,13 +32,12 @@ #ifndef TONEMAPPINGOPTIONS_H #define TONEMAPPINGOPTIONS_H -#include #include +#include //----------------- DO NOT CHANGE ENUMERATION ORDER ----------------------- // all is used by SavedParametersDialog to select comments from all operators -enum TMOperator : unsigned short -{ +enum TMOperator : unsigned short { mantiuk06 = 0, mantiuk08 = 1, fattal = 2, @@ -50,26 +49,31 @@ ashikhmin = 8, pattanaik = 9, mai = 10, + ferwerda = 11, + kimkautz = 12, + vanhateren = 13, + lischinski = 14 }; -class TonemappingOptions -{ - -public: - int origxsize; // this parameter should be coming from the UI - int xsize_percent; // this parameter should be coming from the UI - int xsize; // this parameter should be coming from the frame +class TonemappingOptions { + public: + int origxsize; // this parameter should be coming from the UI + int xsize_percent; // this parameter should be coming from the UI + int xsize; // this parameter should be coming from the frame int quality; float pregamma; - bool tonemapSelection; // we should let do this thing to the tonemapping thread + float postgamma; + float postsaturation; + bool tonemapSelection; // we should let do this thing to the tonemapping + // thread TMOperator tmoperator; struct { struct { - bool simple; - bool eq2; //false means eq4 + bool simple; + bool eq2; // false means eq4 float lct; } ashikhminoptions; - struct{ + struct { float bias; } dragooptions; struct { @@ -90,19 +94,19 @@ float inv_alpha; } ferradansoptions; struct { - bool autolum; - bool local; + bool autolum; + bool local; float cone; float rod; float multiplier; } pattanaikoptions; struct { - bool scales; + bool scales; float key; float phi; - int range; - int lower; - int upper; + int range; + int lower; + int upper; } reinhard02options; struct { float brightness; @@ -113,18 +117,33 @@ float contrastfactor; float saturationfactor; float detailfactor; - bool contrastequalization; + bool contrastequalization; } mantiuk06options; struct { float colorsaturation; float contrastenhancement; float luminancelevel; - bool setluminance; + bool setluminance; } mantiuk08options; + struct { + float multiplier; + float adaptationluminance; + } ferwerdaoptions; + struct { + float c1; + float c2; + } kimkautzoptions; + struct { + float pupil_area; + } vanhaterenoptions; + struct { + float alpha; + } lischinskioptions; } operator_options; // Davide Anastasia - // Adding the coordinates of the crop inside this structure will allow TMOThread + // Adding the coordinates of the crop inside this structure will allow + // TMOThread // to crop itself the region of interest, keeping the code tight and simple // and avoiding useless copy in memory of the frame to be processed. int selection_x_up_left; @@ -133,13 +152,12 @@ int selection_y_bottom_right; // default constructor - TonemappingOptions() { - setDefaultParameters(); - } + TonemappingOptions() { setDefaultParameters(); } const QString getPostfix(); /** returns the translated description of the TMO operator**/ - const QString getCaption(bool pregamma = true, QString separator = QString(" ~ ")); + const QString getCaption(bool pregamma = true, + QString separator = QStringLiteral(" ~ ")); void setDefaultTonemapParameters(); void setDefaultParameters(); @@ -155,15 +173,14 @@ */ class TMOptionsOperations { -public: - TMOptionsOperations(const TonemappingOptions* opts); - static TonemappingOptions* parseFile(const QString& file); - static TonemappingOptions* getDefaultTMOptions(); - QString getExifComment(); -private: - const TonemappingOptions* opts; - + public: + TMOptionsOperations(const TonemappingOptions *opts); + static TonemappingOptions *parseFile(const QString &file); + static TonemappingOptions *getDefaultTMOptions(); + QString getExifComment(); + private: + const TonemappingOptions *opts; }; -#endif // TONEMAPPINGOPTIONS_H +#endif // TONEMAPPINGOPTIONS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Exif/CMakeLists.txt luminance-hdr-2.6.0/src/Exif/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Exif/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Exif/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) # QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(exif ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(exif Core) +ADD_LIBRARY(exif STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} +TARGET_LINK_LIBRARIES(exif Qt5::Core) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} exif PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Exif/ExifOperations.cpp luminance-hdr-2.6.0/src/Exif/ExifOperations.cpp --- luminance-hdr-2.5.1+dfsg/src/Exif/ExifOperations.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Exif/ExifOperations.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -35,185 +35,171 @@ #include #include +#include #include +#include "Common/config.h" #include "ExifOperations.h" #include "arch/math.h" -#include "Common/config.h" using namespace boost; using namespace boost::assign; -namespace ExifOperations -{ +namespace ExifOperations { typedef std::set KeysDictionary; struct ValidExifDictionary { // Note: don't use tagLabel, as it might contain white spaces - bool operator()(const std::string& groupName, const std::string& tagName, - const std::string& key) const - { + bool operator()(const std::string &groupName, const std::string &tagName, + const std::string &key) const { // support for GPSInfo - if ( groupName == "GPSInfo" ) return true; + if (groupName == "GPSInfo") return true; // remove info about thumbnail - if ( groupName == "Thumbnail" ) return false; + if (groupName == "Thumbnail") return false; // search into the map if I don't find any better match return sm_validExifTags.count(key); } -private: + + private: static KeysDictionary sm_validExifTags; }; KeysDictionary ValidExifDictionary::sm_validExifTags = list_of - // should I keep this? Isn't the version written by Exiv2? - // ("Exif.Photo.ExifVersion") - // Exif.Image - ("Exif.Image.Software") - ("Exif.Image.ImageDescription") - ("Exif.Image.Orientation") - ("Exif.Image.Make") - ("Exif.Image.Model") - ("Exif.Image.DateTime") - ("Exif.Image.ProcessingSoftware") - ("Exif.Image.GPSTag") - ("Exif.Image.SensingMethod") - ("Exif.Image.MaxApertureValue") - ("Exif.Image.SelfTimerMode") - ("Exif.Image.ShutterSpeedValue") - ("Exif.Image.ApertureValue") - ("Exif.Image.ExposureBiasValue") - ("Exif.Image.SubjectDistance") - ("Exif.Image.MeteringMode") - ("Exif.Image.CameraSerialNumber") - ("Exif.Image.LensInfo") - ("Exif.Image.ExposureTime") - ("Exif.Image.FNumber") - ("Exif.Image.ExposureProgram") - // Exif.Photo - ("Exif.Photo.SensitivityType") - ("Exif.Photo.ISOSpeed") - ("Exif.Photo.ISOSpeedRatings") - ("Exif.Photo.ISOSpeedLatitudeyyy") - ("Exif.Photo.ISOSpeedLatitudezzz") - ("Exif.Photo.FileSource") - ("Exif.Photo.SceneType") - ("Exif.Photo.SceneCaptureType") - ("Exif.Photo.UserComment") - ("Exif.Image.SensingMethod") - ("Exif.Photo.ShutterSpeedValue") - ("Exif.Photo.ApertureValue") - ("Exif.Photo.BrightnessValue") - ("Exif.Photo.ExposureBiasValue") - ("Exif.Photo.MaxApertureValue") - ("Exif.Photo.SubjectDistance") - ("Exif.Photo.MeteringMode") - ("Exif.Photo.LightSource") - ("Exif.Photo.Flash") - ("Exif.Photo.FocalLength") - ("Exif.Photo.SubjectArea") - ("Exif.Photo.UserComment") - ("Exif.Photo.ExposureMode") - ("Exif.Photo.DigitalZoomRatio") - ("Exif.Photo.FocalLengthIn35mmFilm") - ("Exif.Photo.BodySerialNumber") - ("Exif.Photo.LensSpecification") - ("Exif.Photo.LensMake") - ("Exif.Photo.LensModel") - ("Exif.Photo.LensSerialNumber") - ("Exif.Photo.DateTimeOriginal") - ("Exif.Photo.DateTimeDigitized") - // Same tags as Exif.Image - ("Exif.Photo.ExposureTime") - ("Exif.Photo.FNumber") - ("Exif.Photo.ExposureProgram") - ; - -void copyExifData(const std::string& from, const std::string& to, - bool dontOverwrite, - const std::string& comment, - bool destIsLDR, bool keepRotation) -{ + // should I keep this? Isn't the version written by Exiv2? + // ("Exif.Photo.ExifVersion") + // Exif.Image + ("Exif.Image.Software")("Exif.Image.ImageDescription")( + "Exif.Image.Orientation")("Exif.Image.Make")("Exif.Image.Model")( + "Exif.Image.DateTime")("Exif.Image.ProcessingSoftware")( + "Exif.Image.GPSTag")("Exif.Image.SensingMethod")( + "Exif.Image.MaxApertureValue")("Exif.Image.SelfTimerMode")( + "Exif.Image.ShutterSpeedValue")("Exif.Image.ApertureValue")( + "Exif.Image.ExposureBiasValue")("Exif.Image.SubjectDistance")( + "Exif.Image.MeteringMode")("Exif.Image.CameraSerialNumber")( + "Exif.Image.LensInfo")("Exif.Image.ExposureTime")("Exif.Image.FNumber")( + "Exif.Image.ExposureProgram") + // Exif.Photo + ("Exif.Photo.SensitivityType")("Exif.Photo.ISOSpeed")( + "Exif.Photo.ISOSpeedRatings")("Exif.Photo.ISOSpeedLatitudeyyy")( + "Exif.Photo.ISOSpeedLatitudezzz")("Exif.Photo.FileSource")( + "Exif.Photo.SceneType")("Exif.Photo.SceneCaptureType")( + "Exif.Photo.UserComment")("Exif.Image.SensingMethod")( + "Exif.Photo.ShutterSpeedValue")("Exif.Photo.ApertureValue")( + "Exif.Photo.BrightnessValue")("Exif.Photo.ExposureBiasValue")( + "Exif.Photo.MaxApertureValue")("Exif.Photo.SubjectDistance")( + "Exif.Photo.MeteringMode")("Exif.Photo.LightSource")( + "Exif.Photo.Flash")("Exif.Photo.FocalLength")("Exif.Photo.SubjectArea")( + "Exif.Photo.UserComment")("Exif.Photo.ExposureMode")( + "Exif.Photo.DigitalZoomRatio")("Exif.Photo.FocalLengthIn35mmFilm")( + "Exif.Photo.BodySerialNumber")("Exif.Photo.LensSpecification")( + "Exif.Photo.LensMake")("Exif.Photo.LensModel")( + "Exif.Photo.LensSerialNumber")("Exif.Photo.DateTimeOriginal")( + "Exif.Photo.DateTimeDigitized") + // Same tags as Exif.Image + ("Exif.Photo.ExposureTime")("Exif.Photo.FNumber")( + "Exif.Photo.ExposureProgram"); + +void copyExifData(const std::string &from, const std::string &to, + bool dontOverwrite, const std::string &comment, + bool destIsLDR, bool keepRotation) { #ifndef NDEBUG std::clog << "Processing EXIF from " << from << " to " << to << std::endl; #endif - try - { - // get source and destination exif data - Exiv2::Image::AutoPtr sourceImage = Exiv2::ImageFactory::open(from); - Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to); + try { + Exiv2::Image::AutoPtr sourceImage; + Exiv2::ExifData srcExifData; + + if (!from.empty()) { + // get source exif data + sourceImage = Exiv2::ImageFactory::open(from); - sourceImage->readMetadata(); - Exiv2::ExifData &srcExifData = sourceImage->exifData(); + sourceImage->readMetadata(); + srcExifData = sourceImage->exifData(); - if ( srcExifData.empty() ) { + if (srcExifData.empty()) { #ifndef NDEBUG - std::clog << "No exif data found in the image: " << from << "\n"; + std::clog << "No exif data found in the image: " << from + << std::endl; #endif - return; + return; + } } - if (dontOverwrite) - { + // get destination exif data + Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to); + + if (dontOverwrite) { // doesn't throw anything if it is empty destinationImage->readMetadata(); // doesn't throw anything if it is empty Exiv2::ExifData &destExifData = destinationImage->exifData(); - //for all the tags in the source exif data - for (Exiv2::ExifData::const_iterator it = srcExifData.begin(), itEnd = srcExifData.end(); - it != itEnd; ++it) - { - if ( ValidExifDictionary()(it->groupName(), it->tagName(), it->key()) ) { - Exiv2::ExifData::iterator outIt = destExifData.findKey( Exiv2::ExifKey(it->key()) ); - if ( outIt == destExifData.end() ) { - // we create a new tag in the destination file, the tag has the key of the source - Exiv2::Exifdatum& destTag = destExifData[it->key()]; - // now the tag has also the value of the source - destTag.setValue(&(it->value())); + if (!from.empty()) { + // for all the tags in the source exif data + for (Exiv2::ExifData::const_iterator it = srcExifData.begin(), + itEnd = srcExifData.end(); + it != itEnd; ++it) { + if (ValidExifDictionary()(it->groupName(), it->tagName(), + it->key())) { + Exiv2::ExifData::iterator outIt = + destExifData.findKey(Exiv2::ExifKey(it->key())); + if (outIt == destExifData.end()) { + // we create a new tag in the destination file, the + // tag has the + // key of the source + Exiv2::Exifdatum &destTag = destExifData[it->key()]; + // now the tag has also the value of the source + destTag.setValue(&(it->value())); + } } - } #ifndef NDEBUG - else { - std::clog << "Found invalid key: " << it->key() << "\n"; - } + else { + std::clog << "Found invalid key: " << it->key() << "\n"; + } #endif + } } // rotation support if (!keepRotation) { destExifData["Exif.Image.Orientation"] = 1; } - } - else if (destIsLDR) - { + } else if (destIsLDR) { // copy all valid tag Exiv2::ExifData destExifData; - for (Exiv2::ExifData::const_iterator it = srcExifData.begin(), itEnd = srcExifData.end(); - it != itEnd; ++it) - { - // Note: the algorithm is similar to the C++11 std::copy_if( ) - if ( ValidExifDictionary()(it->groupName(), it->tagName(), it->key()) ) { - // overwrite tag if found! - destExifData[it->key()] = it->value(); - } + if (!from.empty()) { + for (Exiv2::ExifData::const_iterator it = srcExifData.begin(), + itEnd = srcExifData.end(); + it != itEnd; ++it) { + // Note: the algorithm is similar to the C++11 std::copy_if( + // ) + if (ValidExifDictionary()(it->groupName(), it->tagName(), + it->key())) { + // overwrite tag if found! + destExifData[it->key()] = it->value(); + } #ifndef NDEBUG - else { - std::clog << "Found invalid key: " << it->key() << "\n"; - } + else { + std::clog << "Found invalid key: " << it->key() << "\n"; + } #endif + } } // if comment is not empty, overwrite/set comment values - if ( !comment.empty() ) { + if (!comment.empty()) { #ifndef NDEBUG std::clog << "EXIF comments: " << comment << "\n"; #endif - destExifData["Exif.Image.ProcessingSoftware"] = "Luminance HDR " + std::string(LUMINANCEVERSION); - destExifData["Exif.Image.Software"] = "Luminance HDR " + std::string(LUMINANCEVERSION); + destExifData["Exif.Image.ProcessingSoftware"] = + "Luminance HDR " + std::string(LUMINANCEVERSION); + destExifData["Exif.Image.Software"] = + "Luminance HDR " + std::string(LUMINANCEVERSION); destExifData["Exif.Image.ImageDescription"] = comment; - destExifData["Exif.Photo.UserComment"] = "charset=\"Ascii\" " + comment; + destExifData["Exif.Photo.UserComment"] = + "charset=\"Ascii\" " + comment; } // rotation support @@ -222,15 +208,11 @@ } destinationImage->setExifData(destExifData); - } - else - { + } else { destinationImage->setExifData(srcExifData); } destinationImage->writeMetadata(); - } - catch (Exiv2::AnyError& e) - { + } catch (Exiv2::AnyError &e) { #ifndef NDEBUG qDebug() << e.what(); #endif @@ -238,14 +220,17 @@ } /* - * This function obtains the "average scene luminance" (cd/m^2) from an image file. + * This function obtains the "average scene luminance" (cd/m^2) from an image + * file. * "average scene luminance" is the L (aka B) value mentioned in [1] * You have to take a log2f of the returned value to get an EV value. * * We are using K=12.07488f and the exif-implied value of N=1/3.125 (see [1]). - * K=12.07488f is the 1.0592f * 11.4f value in pfscalibration's pfshdrcalibrate.cpp file. + * K=12.07488f is the 1.0592f * 11.4f value in pfscalibration's + * pfshdrcalibrate.cpp file. * Based on [3] we can say that the value can also be 12.5 or even 14. - * Another reference for APEX is [4] where N is 0.3, closer to the APEX specification of 2^(-7/4)=0.2973. + * Another reference for APEX is [4] where N is 0.3, closer to the APEX + * specification of 2^(-7/4)=0.2973. * * [1] http://en.wikipedia.org/wiki/APEX_system * [2] http://en.wikipedia.org/wiki/Exposure_value @@ -257,7 +242,8 @@ * ExposureTime or ShutterSpeedValue. * Same thing for f-number: it can be found in FNumber or in ApertureValue. * - * F-number and shutter speed are mandatory in exif data for EV calculation, iso is not. + * F-number and shutter speed are mandatory in exif data for EV calculation, iso + * is not. */ /* float obtain_avg_lum(const std::string& filename) @@ -270,11 +256,16 @@ if (exifData.empty()) return -1; - Exiv2::ExifData::const_iterator iexpo = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime")); - Exiv2::ExifData::const_iterator iexpo2 = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue")); - Exiv2::ExifData::const_iterator iiso = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ISOSpeedRatings")); - Exiv2::ExifData::const_iterator ifnum = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber")); - Exiv2::ExifData::const_iterator ifnum2 = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue")); + Exiv2::ExifData::const_iterator iexpo = +exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime")); + Exiv2::ExifData::const_iterator iexpo2 = +exifData.findKey(Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue")); + Exiv2::ExifData::const_iterator iiso = +exifData.findKey(Exiv2::ExifKey("Exif.Photo.ISOSpeedRatings")); + Exiv2::ExifData::const_iterator ifnum = +exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber")); + Exiv2::ExifData::const_iterator ifnum2 = +exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue")); // default not valid values float expo = -1; @@ -307,9 +298,11 @@ } else if (ifnum2 != exifData.end()) { - fnum = static_cast(std::exp(std::log(2.0) * ifnum2->toFloat() / 2)); + fnum = static_cast(std::exp(std::log(2.0) * ifnum2->toFloat() +/ 2)); } - // some cameras/lens DO print the fnum but with value 0, and this is not allowed for ev computation purposes. + // some cameras/lens DO print the fnum but with value 0, and this is not +allowed for ev computation purposes. if (fnum == 0) return -1; @@ -327,7 +320,8 @@ //At this point the three variables have to be != -1 if (expo!=-1 && iso!=-1 && fnum!=-1) { - // std::cerr << "expo=" << expo << " fnum=" << fnum << " iso=" << iso << " |returned=" << (expo * iso) / (fnum*fnum*12.07488f) << std::endl; + // std::cerr << "expo=" << expo << " fnum=" << fnum << " iso=" +<< iso << " |returned=" << (expo * iso) / (fnum*fnum*12.07488f) << std::endl; return ( (expo * iso) / (fnum*fnum*12.07488f) ); } else @@ -342,88 +336,76 @@ } */ -float getExposureTime(const std::string& filename) -{ - try - { +float getExposureTime(const std::string &filename) { + try { Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); image->readMetadata(); Exiv2::ExifData &exifData = image->exifData(); - if (exifData.empty()) - return -1; + if (exifData.empty()) return -1; - Exiv2::ExifData::const_iterator iexpo = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime")); - Exiv2::ExifData::const_iterator iexpo2 = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue")); - //Exiv2::ExifData::const_iterator iiso = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ISOSpeedRatings")); - //Exiv2::ExifData::const_iterator ifnum = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber")); - //Exiv2::ExifData::const_iterator ifnum2 = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue")); + Exiv2::ExifData::const_iterator iexpo = + exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime")); + Exiv2::ExifData::const_iterator iexpo2 = + exifData.findKey(Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue")); + // Exiv2::ExifData::const_iterator iiso = + // exifData.findKey(Exiv2::ExifKey("Exif.Photo.ISOSpeedRatings")); + // Exiv2::ExifData::const_iterator ifnum = + // exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber")); + // Exiv2::ExifData::const_iterator ifnum2 = + // exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue")); - float expo = -1; + float expo = -1; - if (iexpo != exifData.end()) - { + if (iexpo != exifData.end()) { expo = iexpo->toFloat(); - } - else if (iexpo2 != exifData.end()) - { + } else if (iexpo2 != exifData.end()) { long num = 1; long div = 1; double tmp = std::exp(std::log(2.0) * iexpo2->toFloat()); - if (tmp > 1) - { + if (tmp > 1) { div = static_cast(tmp + 0.5); + } else { + num = static_cast(1 / tmp + 0.5); } - else - { - num = static_cast(1/tmp + 0.5); - } - expo = static_cast(num)/static_cast(div); + expo = static_cast(num) / static_cast(div); } - if (expo != -1) - { + if (expo != -1) { return expo; - } - else - { + } else { return -1; } - } - catch (Exiv2::AnyError& e) - { + } catch (Exiv2::AnyError &e) { return -1; } } -float getAverageLuminance(const std::string& filename) -{ - try - { +float getAverageLuminance(const std::string &filename) { + try { Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); image->readMetadata(); Exiv2::ExifData &exifData = image->exifData(); // Exif.Image.ExposureBiasValue Exiv2::ExifData::const_iterator itExpValue = - exifData.findKey(Exiv2::ExifKey("Exif.Image.ExposureBiasValue")); - if ( itExpValue != exifData.end() ) { + exifData.findKey(Exiv2::ExifKey("Exif.Image.ExposureBiasValue")); + if (itExpValue != exifData.end()) { return pow(2.0f, itExpValue->toFloat()); } // Exif.Photo.ExposureBiasValue itExpValue = - exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureBiasValue")); - if ( itExpValue != exifData.end() ) { + exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureBiasValue")); + if (itExpValue != exifData.end()) { return pow(2.0f, itExpValue->toFloat()); } - std::clog << "Cannot find ExposureBiasValue for " << filename << std::endl; + std::clog << "Cannot find ExposureBiasValue for " << filename + << std::endl; return -1.0; - } - catch (Exiv2::AnyError& e) - { + } catch (Exiv2::AnyError &e) { return -1.0; } } -} // ExifOperations +} // ExifOperations diff -Nru luminance-hdr-2.5.1+dfsg/src/Exif/ExifOperations.h luminance-hdr-2.6.0/src/Exif/ExifOperations.h --- luminance-hdr-2.5.1+dfsg/src/Exif/ExifOperations.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Exif/ExifOperations.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,15 +25,13 @@ #include -namespace ExifOperations -{ +namespace ExifOperations { //! //! -void copyExifData(const std::string& from, const std::string& to, +void copyExifData(const std::string &from, const std::string &to, bool dont_overwrite, - const std::string& comment = std::string(), - bool destIsLDR = false, - bool keepRotation = true); + const std::string &comment = std::string(), + bool destIsLDR = false, bool keepRotation = true); //! //! @@ -44,10 +42,9 @@ //! \brief compute average luminance from exposure bias //! \return Average Luminance (as 2^EV) or -1 if the value cannot be calculated -float getAverageLuminance(const std::string& filename); - -float getExposureTime(const std::string& filename); +float getAverageLuminance(const std::string &filename); +float getExposureTime(const std::string &filename); } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Fileformat/CMakeLists.txt luminance-hdr-2.6.0/src/Fileformat/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Fileformat/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Fileformat/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -14,8 +14,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) # QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(fileformat ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(fileformat Core Gui Widgets) +ADD_LIBRARY(fileformat STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} +TARGET_LINK_LIBRARIES(fileformat Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} fileformat PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Fileformat/pfsoutldrimage.cpp luminance-hdr-2.6.0/src/Fileformat/pfsoutldrimage.cpp --- luminance-hdr-2.5.1+dfsg/src/Fileformat/pfsoutldrimage.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Fileformat/pfsoutldrimage.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -32,20 +32,20 @@ #include "pfsoutldrimage.h" -#include #include +#include -#include #include +#include #include #include +#include +#include #include #include #include -#include -#include using namespace std; using namespace pfs; @@ -53,27 +53,18 @@ using namespace pfs; - -QRgbRemapper::QRgbRemapper(float minLuminance, float maxLuminance, RGBMappingType mappingType) +QRgbRemapper::QRgbRemapper(float minLuminance, float maxLuminance, + RGBMappingType mappingType) : m_remapper( - utils::chain( - colorspace::Normalizer(minLuminance, maxLuminance), - utils::CLAMP_F32, - Remapper(mappingType) - ) - ) -{} + utils::chain(colorspace::Normalizer(minLuminance, maxLuminance), + utils::CLAMP_F32, Remapper(mappingType))) {} -void QRgbRemapper::operator()(float r, float g, float b, QRgb& qrgb) const -{ +void QRgbRemapper::operator()(float r, float g, float b, QRgb &qrgb) const { qrgb = qRgb(m_remapper(r), m_remapper(g), m_remapper(b)); } -QImage* fromLDRPFStoQImage(pfs::Frame* in_frame, - float min_luminance, - float max_luminance, - RGBMappingType mapping_method) -{ +QImage *fromLDRPFStoQImage(pfs::Frame *in_frame, float min_luminance, + float max_luminance, RGBMappingType mapping_method) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -86,20 +77,20 @@ assert(in_frame != NULL); pfs::Channel *Xc, *Yc, *Zc; - in_frame->getXYZChannels( Xc, Yc, Zc ); - assert( Xc != NULL && Yc != NULL && Zc != NULL ); + in_frame->getXYZChannels(Xc, Yc, Zc); + assert(Xc != NULL && Yc != NULL && Zc != NULL); - QImage* temp_qimage = new QImage(in_frame->getWidth(), in_frame->getHeight(), - QImage::Format_RGB32); + QImage *temp_qimage = new QImage( + in_frame->getWidth(), in_frame->getHeight(), QImage::Format_RGB32); QRgbRemapper remapper(min_luminance, max_luminance, mapping_method); utils::transform(Xc->begin(), Xc->end(), Yc->begin(), Zc->begin(), - reinterpret_cast(temp_qimage->bits()), - remapper); + reinterpret_cast(temp_qimage->bits()), remapper); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "fromLDRPFStoQImage() = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "fromLDRPFStoQImage() = " << stop_watch.get_time() << " msec" + << std::endl; #endif return temp_qimage; diff -Nru luminance-hdr-2.5.1+dfsg/src/Fileformat/pfsoutldrimage.h luminance-hdr-2.6.0/src/Fileformat/pfsoutldrimage.h --- luminance-hdr-2.5.1+dfsg/src/Fileformat/pfsoutldrimage.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Fileformat/pfsoutldrimage.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,39 +33,36 @@ #include #include -#include -#include #include #include +#include +#include // forward declaration namespace pfs { class Frame; } -struct QRgbRemapper -{ - QRgbRemapper(float minLuminance, float maxLuminance, RGBMappingType mappingType); +struct QRgbRemapper { + QRgbRemapper(float minLuminance, float maxLuminance, + RGBMappingType mappingType); - void operator()(float r, float g, float b, QRgb& qrgb) const; + void operator()(float r, float g, float b, QRgb &qrgb) const; -private: + private: typedef pfs::utils::Chain< - pfs::colorspace::Normalizer, - pfs::utils::Chain< - pfs::utils::Clamp, - Remapper - >> QRgbRemapperCore; + pfs::colorspace::Normalizer, + pfs::utils::Chain, Remapper>> + QRgbRemapperCore; QRgbRemapperCore m_remapper; }; - //! \brief Build from a pfs::Frame a QImage of the same size //! \param[in] in_frame is a pointer to pfs::Frame* -//! \return Pointer to QImage containing an 8 bit/channel representation of the input frame -QImage* fromLDRPFStoQImage(pfs::Frame* in_frame, - float min_luminance = 0.0f, +//! \return Pointer to QImage containing an 8 bit/channel representation of the +//! input frame +QImage *fromLDRPFStoQImage(pfs::Frame *in_frame, float min_luminance = 0.0f, float max_luminance = 1.0f, RGBMappingType mapping_method = MAP_LINEAR); diff -Nru luminance-hdr-2.5.1+dfsg/src/gauss.h luminance-hdr-2.6.0/src/gauss.h --- luminance-hdr-2.5.1+dfsg/src/gauss.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/gauss.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,676 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on 23 Nov 2017, commit d61df9d. + * + * Copyright (c) 2004-2010 Gabor Horvath + * Copyright (c) Ingo Weyrich +*/ + +#ifndef _GAUSS_H_ +#define _GAUSS_H_ + +#include +#include +#include +#include "opthelper.h" + + +namespace +{ + +template void calculateYvVFactors( const T sigma, T &b1, T &b2, T &b3, T &B, T M[3][3]) +{ + // coefficient calculation + T q; + + if (sigma < 2.5) { + q = 3.97156 - 4.14554 * sqrt (1.0 - 0.26891 * sigma); + } else { + q = 0.98711 * sigma - 0.96330; + } + + T b0 = 1.57825 + 2.44413 * q + 1.4281 * q * q + 0.422205 * q * q * q; + b1 = 2.44413 * q + 2.85619 * q * q + 1.26661 * q * q * q; + b2 = -1.4281 * q * q - 1.26661 * q * q * q; + b3 = 0.422205 * q * q * q; + B = 1.0 - (b1 + b2 + b3) / b0; + + b1 /= b0; + b2 /= b0; + b3 /= b0; + + // From: Bill Triggs, Michael Sdika: Boundary Conditions for Young-van Vliet Recursive Filtering + M[0][0] = -b3 * b1 + 1.0 - b3 * b3 - b2; + M[0][1] = (b3 + b1) * (b2 + b3 * b1); + M[0][2] = b3 * (b1 + b3 * b2); + M[1][0] = b1 + b3 * b2; + M[1][1] = -(b2 - 1.0) * (b2 + b3 * b1); + M[1][2] = -(b3 * b1 + b3 * b3 + b2 - 1.0) * b3; + M[2][0] = b3 * b1 + b2 + b1 * b1 - b2 * b2; + M[2][1] = b1 * b2 + b3 * b2 * b2 - b1 * b3 * b3 - b3 * b3 * b3 - b3 * b2 + b3; + M[2][2] = b3 * (b1 + b3 * b2); + +} + +// classical filtering if the support window is small and src != dst +template void gauss3x3 (T** RESTRICT src, T** RESTRICT dst, const int W, const int H, const T c0, const T c1, const T c2, const T b0, const T b1) +{ + + // first row +#ifdef _OPENMP + #pragma omp single nowait +#endif + { + dst[0][0] = src[0][0]; + + for (int j = 1; j < W - 1; j++) + { + dst[0][j] = b1 * (src[0][j - 1] + src[0][j + 1]) + b0 * src[0][j]; + } + + dst[0][W - 1] = src[0][W - 1]; + } + +#ifdef _OPENMP + #pragma omp for nowait +#endif + + for (int i = 1; i < H - 1; i++) { + dst[i][0] = b1 * (src[i - 1][0] + src[i + 1][0]) + b0 * src[i][0]; + + for (int j = 1; j < W - 1; j++) { + dst[i][j] = c2 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c1 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + c0 * src[i][j]; + } + + dst[i][W - 1] = b1 * (src[i - 1][W - 1] + src[i + 1][W - 1]) + b0 * src[i][W - 1]; + } + + // last row +#ifdef _OPENMP + #pragma omp single +#endif + { + dst[H - 1][0] = src[H - 1][0]; + + for (int j = 1; j < W - 1; j++) { + dst[H - 1][j] = b1 * (src[H - 1][j - 1] + src[H - 1][j + 1]) + b0 * src[H - 1][j]; + } + + dst[H - 1][W - 1] = src[H - 1][W - 1]; + } +} + + +// use separated filter if the support window is small and src == dst +template void gaussHorizontal3 (T** src, T** dst, int W, int H, const float c0, const float c1) +{ + T temp[W] ALIGNED16; +#ifdef _OPENMP + #pragma omp for +#endif + + for (int i = 0; i < H; i++) { + for (int j = 1; j < W - 1; j++) { + temp[j] = (T)(c1 * (src[i][j - 1] + src[i][j + 1]) + c0 * src[i][j]); + } + + dst[i][0] = src[i][0]; + memcpy (dst[i] + 1, temp + 1, (W - 2)*sizeof(T)); + + dst[i][W - 1] = src[i][W - 1]; + } +} + +#ifdef __SSE2__ +template SSEFUNCTION void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) +{ + vfloat Tv = F2V(0.f), Tm1v, Tp1v; + vfloat Tv1 = F2V(0.f), Tm1v1, Tp1v1; + vfloat c0v, c1v; + c0v = F2V(c0); + c1v = F2V(c1); + +#ifdef _OPENMP + #pragma omp for nowait +#endif + + // process 8 columns per iteration for better usage of cpu cache + for (int i = 0; i < W - 7; i += 8) { + Tm1v = LVFU( src[0][i] ); + Tm1v1 = LVFU( src[0][i + 4] ); + STVFU( dst[0][i], Tm1v); + STVFU( dst[0][i + 4], Tm1v1); + + if (H > 1) { + Tv = LVFU( src[1][i]); + Tv1 = LVFU( src[1][i + 4]); + } + + for (int j = 1; j < H - 1; j++) { + Tp1v = LVFU( src[j + 1][i]); + Tp1v1 = LVFU( src[j + 1][i + 4]); + STVFU( dst[j][i], c1v * (Tp1v + Tm1v) + Tv * c0v); + STVFU( dst[j][i + 4], c1v * (Tp1v1 + Tm1v1) + Tv1 * c0v); + Tm1v = Tv; + Tm1v1 = Tv1; + Tv = Tp1v; + Tv1 = Tp1v1; + } + + STVFU( dst[H - 1][i], LVFU( src[H - 1][i])); + STVFU( dst[H - 1][i + 4], LVFU( src[H - 1][i + 4])); + } + +// Borders are done without SSE + float temp[H] ALIGNED16; +#ifdef _OPENMP + #pragma omp single +#endif + + for (int i = W - (W % 8); i < W; i++) { + for (int j = 1; j < H - 1; j++) { + temp[j] = c1 * (src[j - 1][i] + src[j + 1][i]) + c0 * src[j][i]; + } + + dst[0][i] = src[0][i]; + + for (int j = 1; j < H - 1; j++) { + dst[j][i] = temp[j]; + } + + dst[H - 1][i] = src[H - 1][i]; + } +} +#else +template void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) +{ + T temp[H] ALIGNED16; +#ifdef _OPENMP + #pragma omp for +#endif + + for (int i = 0; i < W; i++) { + for (int j = 1; j < H - 1; j++) { + temp[j] = (T)(c1 * (src[j - 1][i] + src[j + 1][i]) + c0 * src[j][i]); + } + + dst[0][i] = src[0][i]; + + for (int j = 1; j < H - 1; j++) { + dst[j][i] = temp[j]; + } + + dst[H - 1][i] = src[H - 1][i]; + } +} +#endif + +#ifdef __SSE2__ +// fast gaussian approximation if the support window is large +template SSEFUNCTION void gaussHorizontalSse (T** src, T** dst, const int W, const int H, const float sigma) +{ + double b1, b2, b3, B, M[3][3]; + calculateYvVFactors(sigma, b1, b2, b3, B, M); + + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { + M[i][j] *= (1.0 + b2 + (b1 - b3) * b3); + M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 - b1 - b2 - b3); + } + + vfloat Rv; + vfloat Tv, Tm2v, Tm3v; + vfloat Bv, b1v, b2v, b3v; + vfloat temp2W, temp2Wp1; + float tmp[W][4] ALIGNED16; + Bv = F2V(B); + b1v = F2V(b1); + b2v = F2V(b2); + b3v = F2V(b3); + +#ifdef _OPENMP + #pragma omp for nowait +#endif + + for (int i = 0; i < H - 3; i += 4) { + Tv = _mm_set_ps(src[i][0], src[i + 1][0], src[i + 2][0], src[i + 3][0]); + Tm3v = Tv * (Bv + b1v + b2v + b3v); + STVF( tmp[0][0], Tm3v ); + + Tm2v = _mm_set_ps(src[i][1], src[i + 1][1], src[i + 2][1], src[i + 3][1]) * Bv + Tm3v * b1v + Tv * (b2v + b3v); + STVF( tmp[1][0], Tm2v ); + + Rv = _mm_set_ps(src[i][2], src[i + 1][2], src[i + 2][2], src[i + 3][2]) * Bv + Tm2v * b1v + Tm3v * b2v + Tv * b3v; + STVF( tmp[2][0], Rv ); + + for (int j = 3; j < W; j++) { + Tv = Rv; + Rv = _mm_set_ps(src[i][j], src[i + 1][j], src[i + 2][j], src[i + 3][j]) * Bv + Tv * b1v + Tm2v * b2v + Tm3v * b3v; + STVF( tmp[j][0], Rv ); + Tm3v = Tm2v; + Tm2v = Tv; + } + + Tv = _mm_set_ps(src[i][W - 1], src[i + 1][W - 1], src[i + 2][W - 1], src[i + 3][W - 1]); + + temp2Wp1 = Tv + F2V(M[2][0]) * (Rv - Tv) + F2V(M[2][1]) * ( Tm2v - Tv ) + F2V(M[2][2]) * (Tm3v - Tv); + temp2W = Tv + F2V(M[1][0]) * (Rv - Tv) + F2V(M[1][1]) * (Tm2v - Tv) + F2V(M[1][2]) * (Tm3v - Tv); + + Rv = Tv + F2V(M[0][0]) * (Rv - Tv) + F2V(M[0][1]) * (Tm2v - Tv) + F2V(M[0][2]) * (Tm3v - Tv); + STVF(tmp[W - 1][0], Rv); + + Tm2v = Bv * Tm2v + b1v * Rv + b2v * temp2W + b3v * temp2Wp1; + STVF(tmp[W - 2][0], Tm2v); + + Tm3v = Bv * Tm3v + b1v * Tm2v + b2v * Rv + b3v * temp2W; + STVF(tmp[W - 3][0], Tm3v); + + Tv = Rv; + Rv = Tm3v; + Tm3v = Tv; + + for (int j = W - 4; j >= 0; j--) { + Tv = Rv; + Rv = LVF(tmp[j][0]) * Bv + Tv * b1v + Tm2v * b2v + Tm3v * b3v; + STVF(tmp[j][0], Rv); + Tm3v = Tm2v; + Tm2v = Tv; + } + + for (int j = 0; j < W; j++) { + dst[i + 3][j] = tmp[j][0]; + dst[i + 2][j] = tmp[j][1]; + dst[i + 1][j] = tmp[j][2]; + dst[i + 0][j] = tmp[j][3]; + } + + + } + +// Borders are done without SSE +#ifdef _OPENMP + #pragma omp single +#endif + + for (int i = H - (H % 4); i < H; i++) { + tmp[0][0] = src[i][0] * (B + b1 + b2 + b3); + tmp[1][0] = B * src[i][1] + b1 * tmp[0][0] + src[i][0] * (b2 + b3); + tmp[2][0] = B * src[i][2] + b1 * tmp[1][0] + b2 * tmp[0][0] + b3 * src[i][0]; + + for (int j = 3; j < W; j++) { + tmp[j][0] = B * src[i][j] + b1 * tmp[j - 1][0] + b2 * tmp[j - 2][0] + b3 * tmp[j - 3][0]; + } + + float temp2Wm1 = src[i][W - 1] + M[0][0] * (tmp[W - 1][0] - src[i][W - 1]) + M[0][1] * (tmp[W - 2][0] - src[i][W - 1]) + M[0][2] * (tmp[W - 3][0] - src[i][W - 1]); + float temp2W = src[i][W - 1] + M[1][0] * (tmp[W - 1][0] - src[i][W - 1]) + M[1][1] * (tmp[W - 2][0] - src[i][W - 1]) + M[1][2] * (tmp[W - 3][0] - src[i][W - 1]); + float temp2Wp1 = src[i][W - 1] + M[2][0] * (tmp[W - 1][0] - src[i][W - 1]) + M[2][1] * (tmp[W - 2][0] - src[i][W - 1]) + M[2][2] * (tmp[W - 3][0] - src[i][W - 1]); + + tmp[W - 1][0] = temp2Wm1; + tmp[W - 2][0] = B * tmp[W - 2][0] + b1 * tmp[W - 1][0] + b2 * temp2W + b3 * temp2Wp1; + tmp[W - 3][0] = B * tmp[W - 3][0] + b1 * tmp[W - 2][0] + b2 * tmp[W - 1][0] + b3 * temp2W; + + for (int j = W - 4; j >= 0; j--) { + tmp[j][0] = B * tmp[j][0] + b1 * tmp[j + 1][0] + b2 * tmp[j + 2][0] + b3 * tmp[j + 3][0]; + } + + for (int j = 0; j < W; j++) { + dst[i][j] = tmp[j][0]; + } + } +} +#endif + +// fast gaussian approximation if the support window is large +template void gaussHorizontal (T** src, T** dst, const int W, const int H, const double sigma) +{ + double b1, b2, b3, B, M[3][3]; + calculateYvVFactors(sigma, b1, b2, b3, B, M); + + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { + M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3); + } + + double temp2[W] ALIGNED16; + +#ifdef _OPENMP + #pragma omp for +#endif + + for (int i = 0; i < H; i++) { + + temp2[0] = B * src[i][0] + b1 * src[i][0] + b2 * src[i][0] + b3 * src[i][0]; + temp2[1] = B * src[i][1] + b1 * temp2[0] + b2 * src[i][0] + b3 * src[i][0]; + temp2[2] = B * src[i][2] + b1 * temp2[1] + b2 * temp2[0] + b3 * src[i][0]; + + for (int j = 3; j < W; j++) { + temp2[j] = B * src[i][j] + b1 * temp2[j - 1] + b2 * temp2[j - 2] + b3 * temp2[j - 3]; + } + + double temp2Wm1 = src[i][W - 1] + M[0][0] * (temp2[W - 1] - src[i][W - 1]) + M[0][1] * (temp2[W - 2] - src[i][W - 1]) + M[0][2] * (temp2[W - 3] - src[i][W - 1]); + double temp2W = src[i][W - 1] + M[1][0] * (temp2[W - 1] - src[i][W - 1]) + M[1][1] * (temp2[W - 2] - src[i][W - 1]) + M[1][2] * (temp2[W - 3] - src[i][W - 1]); + double temp2Wp1 = src[i][W - 1] + M[2][0] * (temp2[W - 1] - src[i][W - 1]) + M[2][1] * (temp2[W - 2] - src[i][W - 1]) + M[2][2] * (temp2[W - 3] - src[i][W - 1]); + + temp2[W - 1] = temp2Wm1; + temp2[W - 2] = B * temp2[W - 2] + b1 * temp2[W - 1] + b2 * temp2W + b3 * temp2Wp1; + temp2[W - 3] = B * temp2[W - 3] + b1 * temp2[W - 2] + b2 * temp2[W - 1] + b3 * temp2W; + + for (int j = W - 4; j >= 0; j--) { + temp2[j] = B * temp2[j] + b1 * temp2[j + 1] + b2 * temp2[j + 2] + b3 * temp2[j + 3]; + } + + for (int j = 0; j < W; j++) { + dst[i][j] = (T)temp2[j]; + } + + } +} + +#ifdef __SSE2__ +template SSEFUNCTION void gaussVerticalSse (T** src, T** dst, const int W, const int H, const float sigma) +{ + double b1, b2, b3, B, M[3][3]; + calculateYvVFactors(sigma, b1, b2, b3, B, M); + + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { + M[i][j] *= (1.0 + b2 + (b1 - b3) * b3); + M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 - b1 - b2 - b3); + } + + float tmp[H][8] ALIGNED16; + vfloat Rv; + vfloat Tv, Tm2v, Tm3v; + vfloat Rv1; + vfloat Tv1, Tm2v1, Tm3v1; + vfloat Bv, b1v, b2v, b3v; + vfloat temp2W, temp2Wp1; + vfloat temp2W1, temp2Wp11; + Bv = F2V(B); + b1v = F2V(b1); + b2v = F2V(b2); + b3v = F2V(b3); + +#ifdef _OPENMP + #pragma omp for nowait +#endif + + // process 8 columns per iteration for better usage of cpu cache + for (int i = 0; i < W - 7; i += 8) { + Tv = LVFU( src[0][i]); + Tv1 = LVFU( src[0][i + 4]); + Rv = Tv * (Bv + b1v + b2v + b3v); + Rv1 = Tv1 * (Bv + b1v + b2v + b3v); + Tm3v = Rv; + Tm3v1 = Rv1; + STVF( tmp[0][0], Rv ); + STVF( tmp[0][4], Rv1 ); + + Rv = LVFU(src[1][i]) * Bv + Rv * b1v + Tv * (b2v + b3v); + Rv1 = LVFU(src[1][i + 4]) * Bv + Rv1 * b1v + Tv1 * (b2v + b3v); + Tm2v = Rv; + Tm2v1 = Rv1; + STVF( tmp[1][0], Rv ); + STVF( tmp[1][4], Rv1 ); + + Rv = LVFU(src[2][i]) * Bv + Rv * b1v + Tm3v * b2v + Tv * b3v; + Rv1 = LVFU(src[2][i + 4]) * Bv + Rv1 * b1v + Tm3v1 * b2v + Tv1 * b3v; + STVF( tmp[2][0], Rv ); + STVF( tmp[2][4], Rv1 ); + + for (int j = 3; j < H; j++) { + Tv = Rv; + Tv1 = Rv1; + Rv = LVFU(src[j][i]) * Bv + Tv * b1v + Tm2v * b2v + Tm3v * b3v; + Rv1 = LVFU(src[j][i + 4]) * Bv + Tv1 * b1v + Tm2v1 * b2v + Tm3v1 * b3v; + STVF( tmp[j][0], Rv ); + STVF( tmp[j][4], Rv1 ); + Tm3v = Tm2v; + Tm3v1 = Tm2v1; + Tm2v = Tv; + Tm2v1 = Tv1; + } + + Tv = LVFU(src[H - 1][i]); + Tv1 = LVFU(src[H - 1][i + 4]); + + temp2Wp1 = Tv + F2V(M[2][0]) * (Rv - Tv) + F2V(M[2][1]) * (Tm2v - Tv) + F2V(M[2][2]) * (Tm3v - Tv); + temp2Wp11 = Tv1 + F2V(M[2][0]) * (Rv1 - Tv1) + F2V(M[2][1]) * (Tm2v1 - Tv1) + F2V(M[2][2]) * (Tm3v1 - Tv1); + temp2W = Tv + F2V(M[1][0]) * (Rv - Tv) + F2V(M[1][1]) * (Tm2v - Tv) + F2V(M[1][2]) * (Tm3v - Tv); + temp2W1 = Tv1 + F2V(M[1][0]) * (Rv1 - Tv1) + F2V(M[1][1]) * (Tm2v1 - Tv1) + F2V(M[1][2]) * (Tm3v1 - Tv1); + + Rv = Tv + F2V(M[0][0]) * (Rv - Tv) + F2V(M[0][1]) * (Tm2v - Tv) + F2V(M[0][2]) * (Tm3v - Tv); + Rv1 = Tv1 + F2V(M[0][0]) * (Rv1 - Tv1) + F2V(M[0][1]) * (Tm2v1 - Tv1) + F2V(M[0][2]) * (Tm3v1 - Tv1); + STVFU( dst[H - 1][i], Rv ); + STVFU( dst[H - 1][i + 4], Rv1 ); + + Tm2v = Bv * Tm2v + b1v * Rv + b2v * temp2W + b3v * temp2Wp1; + Tm2v1 = Bv * Tm2v1 + b1v * Rv1 + b2v * temp2W1 + b3v * temp2Wp11; + STVFU( dst[H - 2][i], Tm2v ); + STVFU( dst[H - 2][i + 4], Tm2v1 ); + + Tm3v = Bv * Tm3v + b1v * Tm2v + b2v * Rv + b3v * temp2W; + Tm3v1 = Bv * Tm3v1 + b1v * Tm2v1 + b2v * Rv1 + b3v * temp2W1; + STVFU( dst[H - 3][i], Tm3v ); + STVFU( dst[H - 3][i + 4], Tm3v1 ); + + Tv = Rv; + Tv1 = Rv1; + Rv = Tm3v; + Rv1 = Tm3v1; + Tm3v = Tv; + Tm3v1 = Tv1; + + for (int j = H - 4; j >= 0; j--) { + Tv = Rv; + Tv1 = Rv1; + Rv = LVF(tmp[j][0]) * Bv + Tv * b1v + Tm2v * b2v + Tm3v * b3v; + Rv1 = LVF(tmp[j][4]) * Bv + Tv1 * b1v + Tm2v1 * b2v + Tm3v1 * b3v; + STVFU( dst[j][i], Rv ); + STVFU( dst[j][i + 4], Rv1 ); + Tm3v = Tm2v; + Tm3v1 = Tm2v1; + Tm2v = Tv; + Tm2v1 = Tv1; + } + } + +// Borders are done without SSE +#ifdef _OPENMP + #pragma omp single +#endif + + for (int i = W - (W % 8); i < W; i++) { + tmp[0][0] = src[0][i] * (B + b1 + b2 + b3); + tmp[1][0] = B * src[1][i] + b1 * tmp[0][0] + src[0][i] * (b2 + b3); + tmp[2][0] = B * src[2][i] + b1 * tmp[1][0] + b2 * tmp[0][0] + b3 * src[0][i]; + + for (int j = 3; j < H; j++) { + tmp[j][0] = B * src[j][i] + b1 * tmp[j - 1][0] + b2 * tmp[j - 2][0] + b3 * tmp[j - 3][0]; + } + + float temp2Hm1 = src[H - 1][i] + M[0][0] * (tmp[H - 1][0] - src[H - 1][i]) + M[0][1] * (tmp[H - 2][0] - src[H - 1][i]) + M[0][2] * (tmp[H - 3][0] - src[H - 1][i]); + float temp2H = src[H - 1][i] + M[1][0] * (tmp[H - 1][0] - src[H - 1][i]) + M[1][1] * (tmp[H - 2][0] - src[H - 1][i]) + M[1][2] * (tmp[H - 3][0] - src[H - 1][i]); + float temp2Hp1 = src[H - 1][i] + M[2][0] * (tmp[H - 1][0] - src[H - 1][i]) + M[2][1] * (tmp[H - 2][0] - src[H - 1][i]) + M[2][2] * (tmp[H - 3][0] - src[H - 1][i]); + + tmp[H - 1][0] = temp2Hm1; + tmp[H - 2][0] = B * tmp[H - 2][0] + b1 * tmp[H - 1][0] + b2 * temp2H + b3 * temp2Hp1; + tmp[H - 3][0] = B * tmp[H - 3][0] + b1 * tmp[H - 2][0] + b2 * tmp[H - 1][0] + b3 * temp2H; + + for (int j = H - 4; j >= 0; j--) { + tmp[j][0] = B * tmp[j][0] + b1 * tmp[j + 1][0] + b2 * tmp[j + 2][0] + b3 * tmp[j + 3][0]; + } + + for (int j = 0; j < H; j++) { + dst[j][i] = tmp[j][0]; + } + + } +} +#endif + +template void gaussVertical (T** src, T** dst, const int W, const int H, const double sigma) +{ + double b1, b2, b3, B, M[3][3]; + calculateYvVFactors(sigma, b1, b2, b3, B, M); + + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { + M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3); + } + + // process 'numcols' columns for better usage of L1 cpu cache (especially faster for large values of H) + static const int numcols = 8; + double temp2[H][numcols] ALIGNED16; + double temp2Hm1[numcols], temp2H[numcols], temp2Hp1[numcols]; +#ifdef _OPENMP + #pragma omp for nowait +#endif + + 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]; + temp2[2][k] = B * src[2][i + k] + b1 * temp2[1][k] + b2 * temp2[0][k] + b3 * src[0][i + k]; + } + + for (int j = 3; j < H; j++) { + for (int k = 0; k < numcols; k++) { + temp2[j][k] = B * src[j][i + k] + b1 * temp2[j - 1][k] + b2 * temp2[j - 2][k] + b3 * temp2[j - 3][k]; + } + } + + for (int k = 0; k < numcols; k++) { + temp2Hm1[k] = src[H - 1][i + k] + M[0][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[0][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[0][2] * (temp2[H - 3][k] - src[H - 1][i + k]); + temp2H[k] = src[H - 1][i + k] + M[1][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[1][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[1][2] * (temp2[H - 3][k] - src[H - 1][i + k]); + temp2Hp1[k] = src[H - 1][i + k] + M[2][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[2][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[2][2] * (temp2[H - 3][k] - src[H - 1][i + k]); + } + + for (int k = 0; k < numcols; k++) { + dst[H - 1][i + k] = temp2[H - 1][k] = temp2Hm1[k]; + dst[H - 2][i + k] = temp2[H - 2][k] = B * temp2[H - 2][k] + b1 * temp2[H - 1][k] + b2 * temp2H[k] + b3 * temp2Hp1[k]; + dst[H - 3][i + k] = temp2[H - 3][k] = B * temp2[H - 3][k] + b1 * temp2[H - 2][k] + b2 * temp2[H - 1][k] + b3 * temp2H[k]; + } + + for (int j = H - 4; j >= 0; j--) { + for (int k = 0; k < numcols; k++) { + dst[j][i + k] = temp2[j][k] = B * temp2[j][k] + b1 * temp2[j + 1][k] + b2 * temp2[j + 2][k] + b3 * temp2[j + 3][k]; + } + } + } + +#ifdef _OPENMP + #pragma omp single +#endif + + // process remaining columns + for (int i = W - (W % numcols); i < W; i++) { + temp2[0][0] = B * src[0][i] + b1 * src[0][i] + b2 * src[0][i] + b3 * src[0][i]; + temp2[1][0] = B * src[1][i] + b1 * temp2[0][0] + b2 * src[0][i] + b3 * src[0][i]; + temp2[2][0] = B * src[2][i] + b1 * temp2[1][0] + b2 * temp2[0][0] + b3 * src[0][i]; + + for (int j = 3; j < H; j++) { + temp2[j][0] = B * src[j][i] + b1 * temp2[j - 1][0] + b2 * temp2[j - 2][0] + b3 * temp2[j - 3][0]; + } + + double temp2Hm1 = src[H - 1][i] + M[0][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[0][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[0][2] * (temp2[H - 3][0] - src[H - 1][i]); + double temp2H = src[H - 1][i] + M[1][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[1][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[1][2] * (temp2[H - 3][0] - src[H - 1][i]); + double temp2Hp1 = src[H - 1][i] + M[2][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[2][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[2][2] * (temp2[H - 3][0] - src[H - 1][i]); + + dst[H - 1][i] = temp2[H - 1][0] = temp2Hm1; + dst[H - 2][i] = temp2[H - 2][0] = B * temp2[H - 2][0] + b1 * temp2[H - 1][0] + b2 * temp2H + b3 * temp2Hp1; + dst[H - 3][i] = temp2[H - 3][0] = B * temp2[H - 3][0] + b1 * temp2[H - 2][0] + b2 * temp2[H - 1][0] + b3 * temp2H; + + for (int j = H - 4; j >= 0; j--) { + dst[j][i] = temp2[j][0] = B * temp2[j][0] + b1 * temp2[j + 1][0] + b2 * temp2[j + 2][0] + b3 * temp2[j + 3][0]; + } + } +} + +template void gaussianBlurImpl(T** src, T** dst, const int W, const int H, const double sigma) +{ + static constexpr auto GAUSS_SKIP = 0.25; + static constexpr auto GAUSS_3X3_LIMIT = 0.6; + static constexpr auto GAUSS_DOUBLE = 70.0; + + if (sigma < GAUSS_SKIP) { + // don't perform filtering + if (src != dst) { + memcpy (dst[0], src[0], W * H * sizeof(T)); + } + } else if (sigma < GAUSS_3X3_LIMIT) { + if(src != dst) { + // If src != dst we can take the fast way + // compute 3x3 kernel values + double c0 = 1.0; + double c1 = exp( -0.5 * (lhdrengine::SQR(1.0 / sigma)) ); + double c2 = exp( -lhdrengine::SQR(1.0 / sigma) ); + + // normalize kernel values + double sum = c0 + 4.0 * (c1 + c2); + c0 /= sum; + c1 /= sum; + c2 /= sum; + // compute kernel values for border pixels + double b1 = exp (-1.0 / (2.0 * sigma * sigma)); + double bsum = 2.0 * b1 + 1.0; + b1 /= bsum; + double b0 = 1.0 / bsum; + gauss3x3 (src, dst, W, H, c0, c1, c2, b0, b1); + } else { + // compute kernel values for separated 3x3 gaussian blur + double c1 = exp (-1.0 / (2.0 * sigma * sigma)); + double csum = 2.0 * c1 + 1.0; + c1 /= csum; + double c0 = 1.0 / csum; + gaussHorizontal3 (src, dst, W, H, c0, c1); + gaussVertical3 (dst, dst, W, H, c0, c1); + } + } else { +#ifdef __SSE2__ + + if (sigma < GAUSS_DOUBLE) { + gaussHorizontalSse (src, dst, W, H, sigma); + gaussVerticalSse (dst, dst, W, H, sigma); + } else { // large sigma only with double precision + gaussHorizontal (src, dst, W, H, sigma); + gaussVertical (dst, dst, W, H, sigma); + } + +#else + + if (sigma < GAUSS_DOUBLE) { + gaussHorizontal (src, dst, W, H, sigma); + gaussVertical (dst, dst, W, H, sigma); + } else { // large sigma only with double precision + gaussHorizontal (src, dst, W, H, sigma); + gaussVertical (dst, dst, W, H, sigma); + } + +#endif + } +} +} + +void gaussianBlur(float** src, float** dst, const int W, const int H, const double sigma) +{ + gaussianBlurImpl(src, dst, W, H, sigma); +} + +void gaussianBlur(float** src, float** dst, const int W, const int H, const double sigma); + +#endif \ No newline at end of file diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/CMakeLists.txt luminance-hdr-2.6.0/src/HdrCreation/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -1,32 +1,25 @@ -#SET(FILES_UI ) -SET(FILES_H ) - SET(FILES_HXX -${CMAKE_CURRENT_SOURCE_DIR}/createhdr.h -${CMAKE_CURRENT_SOURCE_DIR}/debevec.h -${CMAKE_CURRENT_SOURCE_DIR}/responses.h -${CMAKE_CURRENT_SOURCE_DIR}/robertson02.h -${CMAKE_CURRENT_SOURCE_DIR}/mtb_alignment.h -${CMAKE_CURRENT_SOURCE_DIR}/fusionoperator.h -${CMAKE_CURRENT_SOURCE_DIR}/weights.h + ${CMAKE_CURRENT_SOURCE_DIR}/debevec.h + ${CMAKE_CURRENT_SOURCE_DIR}/robertson02.h + ${CMAKE_CURRENT_SOURCE_DIR}/responses.h + ${CMAKE_CURRENT_SOURCE_DIR}/weights.h + ${CMAKE_CURRENT_SOURCE_DIR}/fusionoperator.h + ${CMAKE_CURRENT_SOURCE_DIR}/mtb_alignment.h ) SET(FILES_CPP -${CMAKE_CURRENT_SOURCE_DIR}/debevec.cpp -${CMAKE_CURRENT_SOURCE_DIR}/responses.cpp -${CMAKE_CURRENT_SOURCE_DIR}/robertson02.cpp -${CMAKE_CURRENT_SOURCE_DIR}/mtb_alignment.cpp -${CMAKE_CURRENT_SOURCE_DIR}/fusionoperator.cpp -${CMAKE_CURRENT_SOURCE_DIR}/weights.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/debevec.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/robertson02.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/responses.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/weights.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fusionoperator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mtb_alignment.cpp ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -# QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) - -ADD_LIBRARY(hdrcreation ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(hdrcreation Core Gui Widgets) +ADD_LIBRARY(hdrcreation STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) +TARGET_LINK_LIBRARIES(hdrcreation Qt5::Core) -SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} +SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} hdrcreation PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} hdrcreation PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/createhdr.h luminance-hdr-2.6.0/src/HdrCreation/createhdr.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/createhdr.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/createhdr.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,11 +27,10 @@ //! \author Giuseppe Rota //! \author Davide Anastasia -#include #include +#include -struct FusionOperatorConfig -{ +struct FusionOperatorConfig { libhdr::fusion::WeightFunctionType weightFunction; libhdr::fusion::ResponseCurveType responseCurve; libhdr::fusion::FusionOperator fusionOperator; diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/debevec.cpp luminance-hdr-2.6.0/src/HdrCreation/debevec.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/debevec.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/debevec.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -4,6 +4,7 @@ * Copyright (C) 2006,2007 Giuseppe Rota * Copyright (C) 2013 Davide Anastasia * Copyright (C) 2017 Franco Comida + * Optimized speed and memory usage 2017 Ingo Weyrich * * 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 @@ -26,21 +27,21 @@ //! \author Davide Anastasia #include "HdrCreation/debevec.h" -#include -#include #include +#include +#include -#include -#include +#include +#include +#include #include -#include +#include +#include #include +#include #include -#include -#include -#include - - +#include "../sleef.c" +#include "../opthelper.h" #ifdef _OPENMP #include #endif @@ -57,254 +58,207 @@ using namespace std; using namespace utils; using namespace colorspace; +using namespace boost::math; namespace libhdr { namespace fusion { -void DebevecOperator::computeFusion(ResponseCurve& response, WeightFunction& weight, +void DebevecOperator::computeFusion(ResponseCurve &response, + WeightFunction &weight, const vector &images, - pfs::Frame &frame) -{ + pfs::Frame &frame) { + #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif assert(images.size() != 0); - std::vector times; + vector times; - const int W = images[0].frame()->getWidth(); - const int H = images[0].frame()->getHeight(); + const size_t W = images[0].frame()->getWidth(); + const size_t H = images[0].frame()->getHeight(); - for (size_t idx = 0; idx < images.size(); ++idx) - { + for (size_t idx = 0; idx < images.size(); ++idx) { times.push_back(images[idx].averageLuminance()); } const int channels = 3; - const size_t size = W*H; + const size_t size = W * H; vector exp_values(times); + transform(exp_values.begin(), exp_values.end(), exp_values.begin(), logf); frame.resize(W, H); Channel *Ch[3]; frame.createXYZChannels(Ch[0], Ch[1], Ch[2]); Array2Df *resultCh[channels] = {Ch[0], Ch[1], Ch[2]}; + +#ifdef _OPENMP #pragma omp parallel for - for(int c = 0; c < channels; c++) { +#endif + for (int c = 0; c < channels; c++) { resultCh[c]->fill(0.f); } Array2Df weight_sum(W, H); weight_sum.fill(0.f); int length = images.size(); + +#ifdef _OPENMP + int numthreads = omp_get_max_threads(); + int nestedthreads = std::max(numthreads / length, 1); + bool oldNested = omp_get_nested(); + if(nestedthreads > 1) { + omp_set_nested(true); + } #pragma omp parallel for - for(int i = 0; i < length; i++) { +#endif + for (int i = 0; i < length; i++) { Channel *Ch[channels]; images[i].frame()->getXYZChannels(Ch[0], Ch[1], Ch[2]); Array2Df *imagesCh[channels] = {Ch[0], Ch[1], Ch[2]}; float cmax[3]; float cmin[3]; - for(int c = 0; c < channels; c++) { - cmax[c] = *max_element(Ch[c]->begin(), Ch[c]->end()); - cmin[c] = *min_element(Ch[c]->begin(), Ch[c]->end()); +#ifdef _OPENMP + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) +#endif + for (int c = 0; c < channels; c++) { + float minval = numeric_limits::max(); + float maxval = numeric_limits::min(); + for (size_t k = 0; k < size; k++) { + minval = std::min(minval, (*imagesCh[c])(k)); + maxval = std::max(maxval, (*imagesCh[c])(k)); + } + cmax[c] = maxval; + cmin[c] = minval; } - float Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); - float Min = std::min(cmin[0], std::min(cmin[1], cmin[2])); - for(int c = 0; c < channels; c++) { - transform(Ch[c]->begin(), Ch[c]->end(), Ch[c]->begin(), Normalizer(Min, Max)); + float Max = max(cmax[0], max(cmax[1], cmax[2])); + float Min = min(cmin[0], min(cmin[1], cmin[2])); + +#ifdef _OPENMP + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) +#endif + for (int c = 0; c < channels; c++) { + transform(Ch[c]->begin(), Ch[c]->end(), Ch[c]->begin(), + Normalizer(Min, Max)); } - Array2Df temp_array(W, H); - Array2Df splitted[channels] = {Array2Df(W, H), Array2Df(W, H), Array2Df(W, H)}; - Array2Df response_img[channels] = {Array2Df(W, H), Array2Df(W, H), Array2Df(W, H)}; + Array2Df response_img(W, H); Array2Df w(W, H); - for(int c = 0; c < channels; c++) { - for(size_t k = 0; k < size; k++) { - splitted[c](k) = weight((*imagesCh[c])(k)); - } - vadd(&w, &splitted[c], &w, size); + + float cmul = 1.f / channels; +#ifdef _OPENMP + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) +#endif + for (size_t k = 0; k < size; k++) { + w(k) = cmul * (weight((*imagesCh[0])(k)) + weight((*imagesCh[1])(k)) + weight((*imagesCh[2])(k))); } - vmul_scalar(&w, 1.f/channels, &w, size); - for(int c = 0; c < channels; c++) { - for(size_t k = 0; k < size; k++) { - (response_img[c])(k) = logf( response((*imagesCh[c])(k)) ); + float cadd = -logf(times.at((int)i)); + for (int c = 0; c < channels; c++) { + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) + for (size_t k = 0; k < size; k++) { + (response_img)(k) = response((*imagesCh[c])(k)); + } +#ifdef __SSE2__ + vfloat caddv = F2V(cadd); +#ifdef _OPENMP + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) +#endif + for (size_t k = 0; k < size - 3; k+=4) { + STVFU((response_img)(k), (xlogf(LVFU((response_img)(k))) + caddv) * LVFU(w(k))); + } + for (size_t k = size - (size % 4); k < size; k++) { + (response_img)(k) = (xlogf((response_img)(k)) + cadd) * w(k); + } +#else +#ifdef _OPENMP + #pragma omp parallel for num_threads(nestedthreads) if (nestedthreads>1) +#endif + for (size_t k = 0; k < size; k++) { + (response_img)(k) = (xlogf((response_img)(k)) + cadd) * w(k); } - } - for(int c = 0; c < channels; c++) { - vsum_scalar(&response_img[c], -logf(times.at((int)i)), &response_img[c], size); - vmul(&w, &response_img[c], &temp_array, size); - vadd(resultCh[c], &temp_array, resultCh[c], size); - } - vadd(&weight_sum, &w, &weight_sum, size); - } - vdiv_scalar(&weight_sum, 1.0f, &weight_sum, size); - #pragma omp parallel for - for(int c = 0; c < channels; c++) { - vmul(resultCh[c], &weight_sum, resultCh[c], size); - } - #pragma omp parallel for - for(int c = 0; c < channels; c++) { - transform(resultCh[c]->begin(), resultCh[c]->end(), resultCh[c]->begin(), expf); - } - float cmax[3]; - #pragma omp parallel for - for(int c = 0; c < channels; c++) { - cmax[c] = *max_element(resultCh[c]->begin(), resultCh[c]->end()); - } - float Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); - #pragma omp parallel for - for(int c = 0; c < channels; c++) { - replace_if(resultCh[c]->begin(), resultCh[c]->end(), std::not1(std::ref(boost::math::isnormal)), Max); - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "MergeDebevec = " << f_timer.get_time() << " msec" << std::endl; #endif -} -/* -struct ColorData { - ColorData() - : numerator_(0.f) - , denominator_(0.f) - , blackValue_(0.f) - , whiteValue_(1.f) - {} +#ifdef _OPENMP + #pragma omp critical +#endif + vadd(resultCh[c]->data(), response_img.data(), resultCh[c]->data(), size); + } - float value() { - return ((denominator_ != 0.0f) ? numerator_/denominator_ : 0.0f); +#ifdef _OPENMP + #pragma omp critical +#endif + vadd(weight_sum.data(), w.data(), weight_sum.data(), size); } +#ifdef _OPENMP + omp_set_nested(oldNested); +#endif - float numerator_; - float denominator_; - - float blackValue_; - float whiteValue_; -}; - -void DebevecOperator::computeFusion(ResponseCurve& response, WeightFunction& weight, - const vector &frames, - pfs::Frame &frame) -{ - assert(frames.size()); - - size_t numExposures = frames.size(); - Frame tempFrame ( frames[0].frame()->getWidth(), frames[0].frame()->getHeight() ); - - Channel* outputRed; - Channel* outputGreen; - Channel* outputBlue; - tempFrame.createXYZChannels(outputRed, outputGreen, outputBlue); - - DataList redChannels(numExposures); - DataList greenChannels(numExposures); - DataList blueChannels(numExposures); - - fillDataLists(frames, redChannels, greenChannels, blueChannels); - - size_t saturatedPixels = 0; - float maxAllowedValue = weight.maxTrustedValue(); - float minAllowedValue = weight.minTrustedValue(); - -#pragma omp parallel for - for (int idx = 0; idx < tempFrame.size(); ++idx) - { - // data... - ColorData redData; - ColorData greenData; - ColorData blueData; - - float maxAvgLum = boost::numeric::bounds::lowest(); - float minAvgLum = boost::numeric::bounds::highest(); - - // for all exposures - for (int exp = 0; exp < numExposures; ++exp) - { - // average luminance for this exposure - float avgLum = frames[exp].averageLuminance(); - // pick the 3 channel values - float red = redChannels[exp][idx]; - float green = greenChannels[exp][idx]; - float blue = blueChannels[exp][idx]; - - float w_red = weight(red); - float w_green = weight(green); - float w_blue = weight(blue); - - // if at least one of the color channel's values are in the bright - // "untrusted zone" and we have min exposure time - // check red channel - if ( (avgLum < minAvgLum) && - ((red > maxAllowedValue) || (green > maxAllowedValue) || (blue > maxAllowedValue)) ) - { - minAvgLum = avgLum; - redData.blackValue_ = red; - greenData.blackValue_ = green; - blueData.blackValue_ = blue; + for (int c = 0; c < channels; c++) { +#ifdef _OPENMP + #pragma omp parallel for +#endif + for(size_t y = 0; y < H; ++y) { + size_t x = 0; +#ifdef __SSE2__ + for(; x < W - 3; x += 4) { + STVFU((*resultCh[c])(x, y), xexpf(LVFU((*resultCh[c])(x,y)) / LVFU(weight_sum(x,y)))); } - - // if at least one of the color channel's values are in the dim - // "not-trusted zone" and we have max exposure time - if ( (avgLum > maxAvgLum) && - ((red < minAllowedValue) || (green < minAllowedValue) || (blue < minAllowedValue)) ) - { - maxAvgLum = avgLum; - redData.whiteValue_ = red; - greenData.whiteValue_ = green; - blueData.whiteValue_ = blue; +#endif + for(; x < W; ++x) { + (*resultCh[c])(x, y) = xexpf((*resultCh[c])(x,y) / weight_sum(x,y)); } - - float w_average = (w_red + w_green + w_blue)/3.0f; - redData.numerator_ += (w_average * response(red))/avgLum; - redData.denominator_ += w_average; - greenData.numerator_ += (w_average * response(green))/avgLum; - greenData.denominator_ += w_average; - blueData.numerator_ += (w_average * response(blue))/avgLum; - blueData.denominator_ += w_average; } - // END for all the exposures - - if ( (redData.denominator_ == 0.f) || (greenData.denominator_ == 0.f) || (blueData.denominator_ == 0.f) ) { - ++saturatedPixels; - - if ( maxAvgLum > boost::numeric::bounds::lowest() ) - { - redData.numerator_ = response(redData.blackValue_) / maxAvgLum; - greenData.numerator_ = response(greenData.blackValue_) / maxAvgLum; - blueData.numerator_ = response(blueData.blackValue_) / maxAvgLum; - - redData.denominator_ = 1.f; - greenData.denominator_ = 1.f; - blueData.denominator_ = 1.f; + } + float cmax[3]; + for (int c = 0; c < channels; c++) { + float max = numeric_limits::min(); +#ifdef _OPENMP + #pragma omp parallel for reduction(max:max) +#endif + for (size_t k = 0; k < size; k++) { + float val = (*resultCh[c])(k); + if(std::isnormal(val)) { + max = std::max(max, val); } + } + cmax[c] = max; + } - if ( minAvgLum < boost::numeric::bounds::highest() ) - { - redData.numerator_ = response(redData.whiteValue_) / minAvgLum; - greenData.numerator_ = response(greenData.whiteValue_) / minAvgLum; - blueData.numerator_ = response(blueData.whiteValue_) / minAvgLum; - - redData.denominator_ = 1.f; - greenData.denominator_ = 1.f; - blueData.denominator_ = 1.f; + float Max = max(cmax[0], max(cmax[1], cmax[2])); + + for (int c = 0; c < channels; c++) { +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (size_t k = 0; k < size; k++) { + float val = (*resultCh[c])(k); + if(!std::isnormal(val)) { + (*resultCh[c])(k) = Max; } } - - (*outputRed)(idx) = redData.value(); - (*outputGreen)(idx) = greenData.value(); - (*outputBlue)(idx) = blueData.value(); } - PRINT_DEBUG("Saturated pixels: " << saturatedPixels); + // TODO: Investigate why scaling hdr yields better result + for (int c = 0; c < channels; c++) { +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (size_t k = 0; k < size; k++) { + (*resultCh[c])(k) *= 0.1f; + } + } - frame.swap( tempFrame ); +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + cout << "MergeDebevec = " << f_timer.get_time() << " msec" + << endl; +#endif } -*/ -} // libhdr -} // fusion +} // libhdr +} // fusion diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/debevec.h luminance-hdr-2.6.0/src/HdrCreation/debevec.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/debevec.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/debevec.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,25 +37,19 @@ namespace fusion { //! \brief Debevec Radiance Map operator -class DebevecOperator : public IFusionOperator -{ -public: - DebevecOperator() - : IFusionOperator() - {} +class DebevecOperator : public IFusionOperator { + public: + DebevecOperator() : IFusionOperator() {} - FusionOperator getType() const - { - return DEBEVEC; - } + FusionOperator getType() const { return DEBEVEC; } -private: - void computeFusion(ResponseCurve& response, WeightFunction& weight, + private: + void computeFusion(ResponseCurve &response, WeightFunction &weight, const std::vector &frames, pfs::Frame &frame); }; -} // fusion -} // libhdr +} // fusion +} // libhdr -#endif // LIBHDR_FUSION_DEBEVEC_H +#endif // LIBHDR_FUSION_DEBEVEC_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/fusionoperator.cpp luminance-hdr-2.6.0/src/HdrCreation/fusionoperator.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/fusionoperator.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/fusionoperator.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,9 +23,9 @@ #include "debevec.h" #include "robertson02.h" +#include #include #include -#include #include #include @@ -37,64 +37,55 @@ namespace libhdr { namespace fusion { -IFusionOperator::IFusionOperator() -{} +IFusionOperator::IFusionOperator() {} // TODO: fix this to return a shared_ptr -pfs::Frame* IFusionOperator::computeFusion(ResponseCurve& response, WeightFunction& weight, const std::vector& frames) -{ - pfs::Frame* frame = new pfs::Frame; +pfs::Frame *IFusionOperator::computeFusion( + ResponseCurve &response, WeightFunction &weight, + const std::vector &frames) { + pfs::Frame *frame = new pfs::Frame; computeFusion(response, weight, frames, *frame); return frame; } FusionOperatorPtr IFusionOperator::build(FusionOperator type) { - switch (type) - { - case ROBERTSON_AUTO: - return std::make_shared(); - break; - case ROBERTSON: - return std::make_shared(); - break; - case DEBEVEC: - default: - return std::make_shared(); - break; + switch (type) { + case ROBERTSON_AUTO: + return std::make_shared(); + break; + case ROBERTSON: + return std::make_shared(); + break; + case DEBEVEC: + default: + return std::make_shared(); + break; } } -FusionOperator IFusionOperator::fromString(const std::string& type) -{ +FusionOperator IFusionOperator::fromString(const std::string &type) { typedef map Dict; - static Dict v = - map_list_of - ("debevec", DEBEVEC) - ("robertson", ROBERTSON) - ("robertson-auto", ROBERTSON_AUTO) - ; + static Dict v = map_list_of("debevec", DEBEVEC)("robertson", ROBERTSON)( + "robertson-auto", ROBERTSON_AUTO); Dict::const_iterator it = v.find(type); - if (it != v.end()) - { + if (it != v.end()) { return it->second; } return DEBEVEC; } -void fillDataLists(const vector &frames, - DataList& redChannels, DataList& greenChannels, DataList& blueChannels) -{ +void fillDataLists(const vector &frames, DataList &redChannels, + DataList &greenChannels, DataList &blueChannels) { assert(frames.size() == redChannels.size()); assert(frames.size() == greenChannels.size()); assert(frames.size() == blueChannels.size()); // build temporary data structure - for ( size_t exp = 0; exp < frames.size(); ++exp ) - { - Channel* red; - Channel* green; - Channel* blue; + for (size_t exp = 0; exp < frames.size(); ++exp) { + Channel *red; + Channel *green; + Channel *blue; frames[exp].frame()->getXYZChannels(red, green, blue); redChannels[exp] = red->data(); @@ -103,5 +94,5 @@ } } -} // fusion -} // libhdr +} // fusion +} // libhdr diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/fusionoperator.h luminance-hdr-2.6.0/src/HdrCreation/fusionoperator.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/fusionoperator.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/fusionoperator.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,46 +29,36 @@ //! merged image, ready for tonemap or other processing //! \note This the first header written specifically for LibHDR (milestone!) - -#include #include #include +#include namespace libhdr { namespace fusion { //! \brief This class contains a (shared) pointer to a frame, plus its average //! luminance, to be used during the fusion process -class FrameEnhanced -{ -public: - FrameEnhanced(const pfs::FramePtr& frame, float averageLuminance) - : m_frame(frame) - , m_averageLuminance(averageLuminance) - {} +class FrameEnhanced { + public: + FrameEnhanced(const pfs::FramePtr &frame, float averageLuminance) + : m_frame(frame), m_averageLuminance(averageLuminance) {} - const pfs::FramePtr& frame() const { return m_frame; } + const pfs::FramePtr &frame() const { return m_frame; } float averageLuminance() const { return m_averageLuminance; } -private: + private: pfs::FramePtr m_frame; float m_averageLuminance; }; -enum FusionOperator -{ - DEBEVEC = 0, - ROBERTSON = 1, - ROBERTSON_AUTO = 2 -}; +enum FusionOperator { DEBEVEC = 0, ROBERTSON = 1, ROBERTSON_AUTO = 2 }; class IFusionOperator; typedef std::shared_ptr FusionOperatorPtr; -class IFusionOperator -{ -public: +class IFusionOperator { + public: virtual ~IFusionOperator() {} //! \brief create an instance of the IFusionOperator from a member of @@ -77,31 +67,27 @@ //! \brief retrieve the right \c FusionOperator value for the input string. //! Valid values are "debevec", "robertson" and "robertson-auto" - static FusionOperator fromString(const std::string& type); + static FusionOperator fromString(const std::string &type); - pfs::Frame* computeFusion( - ResponseCurve& response, - WeightFunction& weight, - const std::vector& frames); + pfs::Frame *computeFusion(ResponseCurve &response, WeightFunction &weight, + const std::vector &frames); virtual FusionOperator getType() const = 0; -protected: + protected: IFusionOperator(); - virtual void computeFusion( - ResponseCurve& response, - WeightFunction& weight, - const std::vector& frames, - pfs::Frame &outFrame) = 0; + virtual void computeFusion(ResponseCurve &response, WeightFunction &weight, + const std::vector &frames, + pfs::Frame &outFrame) = 0; }; -typedef vector DataList; +typedef vector DataList; -void fillDataLists(const vector &frames, - DataList& redChannels, DataList& greenChannels, DataList& blueChannels); +void fillDataLists(const vector &frames, DataList &redChannels, + DataList &greenChannels, DataList &blueChannels); -} // fusion -} // libhdr +} // fusion +} // libhdr -#endif // LIBHDR_FUSION_FUSIONOPERATOR_H +#endif // LIBHDR_FUSION_FUSIONOPERATOR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/mtb_alignment.cpp luminance-hdr-2.6.0/src/HdrCreation/mtb_alignment.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/mtb_alignment.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/mtb_alignment.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,22 +23,21 @@ #include "mtb_alignment.h" -#include -#include #include +#include #include -#include #include #include +#include #include #include -#include -#include #include #include +#include #include #include +#include #include #include "arch/math.h" @@ -57,74 +56,67 @@ namespace libhdr { -long XORimages(const Array2Db& img1, const Array2Db& mask1, - const Array2Db& img2, const Array2Db& mask2) -{ +long XORimages(const Array2Db &img1, const Array2Db &mask1, + const Array2Db &img2, const Array2Db &mask2) { long err = 0; - for (size_t i = 0; i < img1.getRows(); i++) - { + for (size_t i = 0; i < img1.getRows(); i++) { Array2Db::const_iterator p1 = img1.row_begin(i); Array2Db::const_iterator p2 = img2.row_begin(i); Array2Db::const_iterator m1 = mask1.row_begin(i); Array2Db::const_iterator m2 = mask2.row_begin(i); - for (size_t j = 0; j < img1.getCols(); j++) - { + for (size_t j = 0; j < img1.getCols(); j++) { err += (long)((*p1++ xor *p2++) and *m1++ and *m2++); } } return err; } - // setThreshold gets the data from the input image and creates the threshold // and mask images. // Those are bitmap (0,1 valued) with depth()=1 -void setThreshold(const Array2D8u& in, const int threshold, const int noise, - Array2Db& threshold_out, Array2Db& mask_out) -{ +void setThreshold(const Array2D8u &in, const int threshold, const int noise, + Array2Db &threshold_out, Array2Db &mask_out) { assert(in.getCols() == threshold_out.getCols()); assert(in.getRows() == threshold_out.getRows()); assert(in.getCols() == mask_out.getCols()); assert(in.getRows() == mask_out.getRows()); - for (size_t i = 0; i < in.getRows(); i++) - { + for (size_t i = 0; i < in.getRows(); i++) { Array2D8u::const_iterator inp = in.row_begin(i); Array2Db::iterator outp = threshold_out.row_begin(i); Array2Db::iterator maskp = mask_out.row_begin(i); - for (size_t j = 0; j < in.getCols(); j++) - { + for (size_t j = 0; j < in.getCols(); j++) { *outp++ = *inp < threshold ? 0 : 1; - *maskp++ = (*inp > (threshold-noise)) && (*inp < (threshold+noise)) ? 0 : 1; + *maskp++ = + (*inp > (threshold - noise)) && (*inp < (threshold + noise)) + ? 0 + : 1; ++inp; } } } -void getExpShift(const Array2D8u& img1, const int median1, - const Array2D8u& img2, const int median2, - const int noise, const int shift_bits, - int &shift_x, int &shift_y) -{ +void getExpShift(const Array2D8u &img1, const int median1, + const Array2D8u &img2, const int median2, const int noise, + const int shift_bits, int &shift_x, int &shift_y) { assert(img1.getCols() == img2.getCols()); assert(img1.getRows() == img2.getRows()); int curr_x = 0; int curr_y = 0; - if (shift_bits > 0) - { - Array2D8u img1small(img1.getCols()/2, img1.getRows()/2); - Array2D8u img2small(img2.getCols()/2, img2.getRows()/2); + if (shift_bits > 0) { + Array2D8u img1small(img1.getCols() / 2, img1.getRows() / 2); + Array2D8u img2small(img2.getCols() / 2, img2.getRows() / 2); pfs::resize(img1, img1small, BilinearInterp); pfs::resize(img2, img2small, BilinearInterp); - getExpShift(img1small, median1, img2small, median2, - noise, shift_bits-1, curr_x, curr_y); + getExpShift(img1small, median1, img2small, median2, noise, + shift_bits - 1, curr_x, curr_y); curr_x *= 2; curr_y *= 2; } @@ -141,19 +133,18 @@ Array2Db img2mask_shifted(img2.getCols(), img2.getRows()); int minerr = img1.size(); - for (int i = -1; i <= 1; i++) - { - for (int j = -1; j <= 1; j++) - { + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { int dx = curr_x + i; int dy = curr_y + j; pfs::shift(img2threshold, dx, dy, img2_shifted); pfs::shift(img2mask, dx, dy, img2mask_shifted); - long err = XORimages(img1threshold, img1mask, img2_shifted, img2mask_shifted); + long err = XORimages(img1threshold, img1mask, img2_shifted, + img2mask_shifted); - if ( err < minerr ) { + if (err < minerr) { minerr = err; shift_x = dx; shift_y = dy; @@ -161,19 +152,19 @@ } } - PRINT_DEBUG("getExpShift::Level " << shift_bits << " shift (" << shift_x << "," << shift_y << ")"); + PRINT_DEBUG("getExpShift::Level " << shift_bits << " shift (" << shift_x + << "," << shift_y << ")"); } -int getLum(const Frame& in, Array2D8u& out, double quantile) -{ +int getLum(const Frame &in, Array2D8u &out, double quantile) { assert(quantile >= 0.0); assert(quantile <= 1.0); Array2D8u tempOut(in.getWidth(), in.getHeight()); - const Channel* R; - const Channel* G; - const Channel* B; + const Channel *R; + const Channel *G; + const Channel *B; in.getXYZChannels(R, G, B); // convert to grayscale... @@ -184,69 +175,66 @@ vector hist(256, 0); assert(hist.size() == 256u); - for (Array2D8u::iterator it = tempOut.begin(); it != tempOut.end(); ++it) - { - ++hist[ *it ]; + for (Array2D8u::iterator it = tempOut.begin(); it != tempOut.end(); ++it) { + ++hist[*it]; } // find the quantile... - size_t relativeQuantile = in.size()*quantile; + size_t relativeQuantile = in.size() * quantile; size_t idx = 0; size_t cdf = 0; for (; idx < hist.size(); ++idx) { cdf += hist[idx]; - if ( cdf >= relativeQuantile ) break; + if (cdf >= relativeQuantile) break; } // return values... - out.swap( tempOut ); + out.swap(tempOut); return idx; } -void mtbalign(const pfs::Frame& image1, const pfs::Frame& image2, +void mtbalign(const pfs::Frame &image1, const pfs::Frame &image2, const double quantile, const int noise, const int shift_bits, - int &shift_x, int &shift_y) -{ + int &shift_x, int &shift_y) { Array2D8u img1lum; Array2D8u img2lum; int median1 = getLum(image1, img1lum, quantile); int median2 = getLum(image2, img2lum, quantile); - PRINT_DEBUG("align::medians, image 1: " << median1 << ", image 2: " << median2); - getExpShift(img1lum, median1, - img2lum, median2, - noise, shift_bits, shift_x, shift_y); + PRINT_DEBUG("align::medians, image 1: " << median1 + << ", image 2: " << median2); + getExpShift(img1lum, median1, img2lum, median2, noise, shift_bits, shift_x, + shift_y); - PRINT_DEBUG("align::done, final shift is (" << shift_x << "," << shift_y <<")"); + PRINT_DEBUG("align::done, final shift is (" << shift_x << "," << shift_y + << ")"); } static const double quantile = 0.5; static const int noise = 4; -void mtb_alignment(std::vector &framePtrList) -{ +void mtb_alignment(std::vector &framePtrList) { if (framePtrList.size() <= 1) return; - int width = framePtrList[0]->getWidth(); - int height = framePtrList[0]->getHeight(); + int width = framePtrList[0]->getWidth(); + int height = framePtrList[0]->getHeight(); - int shift_bits = std::max( - (int)floor( - log2( (double)std::min(width,height)) - ) - 6, 0); - PRINT_DEBUG("width=" << width << ", height=" << height << ", shift_bits=" << shift_bits); - - // these arrays contain the shifts of each image (except the 0-th) wrt the previous one - vector shiftsX(framePtrList.size()-1); - vector shiftsY(framePtrList.size()-1); + int shift_bits = + std::max((int)floor(log2((double)std::min(width, height))) - 6, 0); + PRINT_DEBUG("width=" << width << ", height=" << height + << ", shift_bits=" << shift_bits); + + // these arrays contain the shifts of each image (except the 0-th) wrt the + // previous one + vector shiftsX(framePtrList.size() - 1); + vector shiftsY(framePtrList.size() - 1); // find the shitfs - for (size_t i = 0; i < framePtrList.size()-1; i++) - { - mtbalign(*framePtrList[i], *framePtrList[i+1], - quantile, noise, shift_bits, shiftsX[i], shiftsY[i]); + for (size_t i = 0; i < framePtrList.size() - 1; i++) { + mtbalign(*framePtrList[i], *framePtrList[i + 1], quantile, noise, + shift_bits, shiftsX[i], shiftsY[i]); } PRINT_DEBUG("shifting the images"); @@ -255,22 +243,21 @@ int cumulativeX = 0; int cumulativeY = 0; // shift the images (apply the shifts starting from the second (index=1)) - for (int i = 1; i < originalsize; i++) - { + for (int i = 1; i < originalsize; i++) { cumulativeX += shiftsX[i - 1]; cumulativeY += shiftsY[i - 1]; // avoid shifting if cumulativeX and cumulativeY are zero - if ( cumulativeX || cumulativeY ) - { - PRINT_DEBUG("Cumulative shift for image " << i << " = (" << cumulativeX - << "," <swap( *shiftedFrame ); + framePtrList[i]->swap(*shiftedFrame); } } } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/mtb_alignment.h luminance-hdr-2.6.0/src/HdrCreation/mtb_alignment.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/mtb_alignment.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/mtb_alignment.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,13 +27,18 @@ //! \author Davide Anastasia //! Remove dependency from Qt and refactoring for new libhdr library +#ifndef LIBHDR_MTB_ALIGNMENT_H +#define LIBHDR_MTB_ALIGNMENT_H + #include -#include #include +#include namespace libhdr { -void mtb_alignment(std::vector& framePtrList); +void mtb_alignment(std::vector &framePtrList); + +} // libhdr -} // libhdr +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/responses.cpp luminance-hdr-2.6.0/src/HdrCreation/responses.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/responses.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/responses.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,21 +24,21 @@ #include "responses.h" -#include -#include +#include #include +#include +#include #include -#include +#include #include #include -#include #include #include -#include #include +#include using namespace std; using namespace boost; @@ -48,51 +48,37 @@ namespace libhdr { namespace fusion { -ResponseCurveType ResponseCurve::fromString(const std::string& type) -{ - typedef map Dict; - static Dict v = - map_list_of - ("log10", RESPONSE_LOG10) - ("log", RESPONSE_LOG10) - ("linear", RESPONSE_LINEAR) - ("gamma", RESPONSE_GAMMA) - ("srgb", RESPONSE_SRGB) - ; +ResponseCurveType ResponseCurve::fromString(const std::string &type) { + typedef map + Dict; + static Dict v = map_list_of("log10", RESPONSE_LOG10)("log", RESPONSE_LOG10)( + "linear", RESPONSE_LINEAR)("gamma", RESPONSE_GAMMA)("srgb", + RESPONSE_SRGB); Dict::const_iterator it = v.find(type); - if ( it != v.end() ) - { + if (it != v.end()) { return it->second; } return RESPONSE_LINEAR; } -ResponseCurve::ResponseCurve(ResponseCurveType type) - : m_type(type) -{ +ResponseCurve::ResponseCurve(ResponseCurveType type) : m_type(type) { setType(type); } -void ResponseCurve::writeToFile(const std::string& fileName) const -{ +void ResponseCurve::writeToFile(const std::string &fileName) const { ScopedStdIoFile outputFile(fopen(fileName.c_str(), "w")); - responseSave(outputFile.data(), - m_responses[RESPONSE_CHANNEL_RED].data(), + responseSave(outputFile.data(), m_responses[RESPONSE_CHANNEL_RED].data(), m_responses[RESPONSE_CHANNEL_GREEN].data(), - m_responses[RESPONSE_CHANNEL_BLUE].data(), - NUM_BINS); + m_responses[RESPONSE_CHANNEL_BLUE].data(), NUM_BINS); } -bool ResponseCurve::readFromFile(const string &fileName) -{ +bool ResponseCurve::readFromFile(const string &fileName) { ScopedStdIoFile inputFile(fopen(fileName.c_str(), "r")); if (!responseLoad(inputFile.data(), m_responses[RESPONSE_CHANNEL_RED].data(), m_responses[RESPONSE_CHANNEL_GREEN].data(), - m_responses[RESPONSE_CHANNEL_BLUE].data(), - NUM_BINS)) - { + m_responses[RESPONSE_CHANNEL_BLUE].data(), NUM_BINS)) { throw std::runtime_error("Invalid response curve file"); } @@ -100,78 +86,70 @@ return true; } -void fillResponseLinear(ResponseCurve::ResponseContainer& response) -{ +void fillResponseLinear(ResponseCurve::ResponseContainer &response) { // fill response function - float factor = 1.f/(float)(response.size() - 1); - for (size_t i = 0; i < response.size(); ++i) - { - response[i] = (float)i*factor; + float factor = 1.f / (float)(response.size() - 1); + for (size_t i = 0; i < response.size(); ++i) { + response[i] = (float)i * factor; } response[0] = response[1]; } -void fillResponseGamma(ResponseCurve::ResponseContainer& response) -{ +void fillResponseGamma(ResponseCurve::ResponseContainer &response) { size_t divider = (response.size() - 1); - for (size_t i = 0; i < response.size(); ++i) - { - response[i] = std::pow(4.f * ((float)i/divider), 1.7f) + 1e-4; + for (size_t i = 0; i < response.size(); ++i) { + response[i] = std::pow(4.f * ((float)i / divider), 1.7f) + 1e-4; } response[0] = response[1]; } - // I use a namespace to avoid name collision -namespace details_log10 -{ -const float s_mid = 0.5f; -const float s_norm = 0.0625f; +namespace details_log10 { +//const float s_mid = 0.5f; +const float s_norm = 0.0625f; // the value 8.f is s_mid/s_norm. The actual formula is 10^((i - mid)/norm) -const float s_inverseMaxValue = 1.f/1e8; // == 1.f/std::pow(10.0f, (1.f/norm - 8.f)); +const float s_inverseMaxValue = + 1.f / 1e8; // == 1.f/std::pow(10.0f, (1.f/norm - 8.f)); } -void fillResponseLog10(ResponseCurve::ResponseContainer& response) -{ +void fillResponseLog10(ResponseCurve::ResponseContainer &response) { size_t divider = (response.size() - 1); - for (size_t i = 0; i < response.size(); ++i) - { - response[i] = details_log10::s_inverseMaxValue * - std::pow(10.0f, ((((float)i/divider)/details_log10::s_norm) - 8.f) ); + for (size_t i = 0; i < response.size(); ++i) { + response[i] = + details_log10::s_inverseMaxValue * + std::pow(10.0f, + ((((float)i / divider) / details_log10::s_norm) - 8.f)); } response[0] = response[1]; } -void fillResponseSRGB(ResponseCurve::ResponseContainer& response) -{ +void fillResponseSRGB(ResponseCurve::ResponseContainer &response) { size_t divider = (response.size() - 1); pfs::colorspace::ConvertSRGB2RGB converter; - for (size_t i = 0; i < response.size(); ++i) - { - response[i] = converter((float)i/divider); + for (size_t i = 0; i < response.size(); ++i) { + response[i] = converter((float)i / divider); } response[0] = response[1]; } -void ResponseCurve::setType(ResponseCurveType type) -{ - typedef void (*ResponseCurveCalculator)(ResponseContainer&); +void ResponseCurve::setType(ResponseCurveType type) { + if (type == RESPONSE_CUSTOM) { + m_type = type; + return; + } + typedef void (*ResponseCurveCalculator)(ResponseContainer &); typedef map ResponseCurveFunc; - static ResponseCurveFunc funcs = - map_list_of - (RESPONSE_LOG10, &fillResponseLog10) - (RESPONSE_LINEAR, &fillResponseLinear) - (RESPONSE_GAMMA, &fillResponseGamma) - (RESPONSE_SRGB, &fillResponseSRGB) - ; + static ResponseCurveFunc funcs = map_list_of( + RESPONSE_LOG10, &fillResponseLog10)(RESPONSE_LINEAR, + &fillResponseLinear)( + RESPONSE_GAMMA, &fillResponseGamma)(RESPONSE_SRGB, &fillResponseSRGB); ResponseCurveType type_ = RESPONSE_LINEAR; ResponseCurveCalculator func_ = &fillResponseLinear; ResponseCurveFunc::const_iterator it = funcs.find(type); - if (it != funcs.end()) - { + if (it != funcs.end()) { type_ = it->first; func_ = it->second; } @@ -183,74 +161,72 @@ func_(m_responses[RESPONSE_CHANNEL_BLUE]); } -} // fusion -} // libhdr +} // fusion +} // libhdr -void dump_gnuplot( const char* filename, const float* array, int M ) -{ - FILE* fp = fopen(filename, "w"); +void dump_gnuplot(const char *filename, const float *array, int M) { + FILE *fp = fopen(filename, "w"); fprintf(fp, "# GNUPlot dump\n"); - for( int i=0 ; iM ) + if (m < 0 || m > M) std::cerr << "response: camera value out of range," << " m=" << m << std::endl; else { diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/responses.h luminance-hdr-2.6.0/src/HdrCreation/responses.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/responses.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/responses.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,16 +25,15 @@ #ifndef LIBHDR_FUSION_RESPONSES_H #define LIBHDR_FUSION_RESPONSES_H -#include #include -#include #include +#include +#include namespace libhdr { namespace fusion { -enum ResponseCurveType -{ +enum ResponseCurveType { RESPONSE_CUSTOM = -1, RESPONSE_LINEAR = 0, RESPONSE_GAMMA = 1, @@ -42,21 +41,19 @@ RESPONSE_SRGB = 3 }; -enum ResponseChannel -{ +enum ResponseChannel { RESPONSE_CHANNEL_RED = 0, RESPONSE_CHANNEL_GREEN = 1, RESPONSE_CHANNEL_BLUE = 2 }; -class ResponseCurve -{ -public: +class ResponseCurve { + public: static const size_t NUM_BINS = (1 << 12); typedef std::array ResponseContainer; static size_t getIdx(float sample); - static ResponseCurveType fromString(const std::string& type); + static ResponseCurveType fromString(const std::string &type); explicit ResponseCurve(ResponseCurveType type = RESPONSE_LINEAR); @@ -66,42 +63,45 @@ //! \brief return the response of the value \c input. \c input is in the //! range [0, 1] - float getResponse(float input, ResponseChannel channel = RESPONSE_CHANNEL_RED) const; + float getResponse(float input, + ResponseChannel channel = RESPONSE_CHANNEL_RED) const; - float operator()(float input, ResponseChannel channel = RESPONSE_CHANNEL_RED) const - { return getResponse(input, channel); } + float operator()(float input, + ResponseChannel channel = RESPONSE_CHANNEL_RED) const { + return getResponse(input, channel); + } - void writeToFile(const std::string& fileName) const; - bool readFromFile(const std::string& fileName); + void writeToFile(const std::string &fileName) const; + bool readFromFile(const std::string &fileName); - ResponseContainer& get(ResponseChannel channel); - const ResponseContainer& get(ResponseChannel channel) const; + ResponseContainer &get(ResponseChannel channel); + const ResponseContainer &get(ResponseChannel channel) const; -protected: + protected: ResponseCurveType m_type; std::array m_responses; }; -inline -ResponseCurveType ResponseCurve::getType() const -{ return m_type; } +inline ResponseCurveType ResponseCurve::getType() const { return m_type; } -inline -size_t ResponseCurve::getIdx(float sample) +inline size_t ResponseCurve::getIdx(float sample) //{ return size_t(sample*(NUM_BINS - 1) + 0.45f); } TODO: check this one -{ return size_t(sample*(NUM_BINS - 1)); } +{ + return size_t(sample * (NUM_BINS - 1)); +} + +inline ResponseCurve::ResponseContainer &ResponseCurve::get( + ResponseChannel channel) { + return m_responses[channel]; +} -inline -ResponseCurve::ResponseContainer& ResponseCurve::get(ResponseChannel channel) -{ return m_responses[channel]; } - -inline -const ResponseCurve::ResponseContainer& ResponseCurve::get(ResponseChannel channel) const -{ return m_responses[channel]; } +inline const ResponseCurve::ResponseContainer &ResponseCurve::get( + ResponseChannel channel) const { + return m_responses[channel]; +} -inline -float ResponseCurve::getResponse(float input, ResponseChannel channel) const -{ +inline float ResponseCurve::getResponse(float input, + ResponseChannel channel) const { assert(channel >= 0); assert(channel <= 2); assert(input >= 0.f); @@ -110,8 +110,8 @@ return m_responses[channel][getIdx(input)]; } -} // fusion -} // libhdr +} // fusion +} // libhdr //! \brief Save response curve to a MatLab file for further reuse //! @@ -119,14 +119,16 @@ //! \param I camera response function (array size of M) //! \param M number of camera output levels //! \param name matrix name for use in Octave or Matlab -void responseSave(FILE* file, const float* Ir, const float* Ig, const float* Ib, int M); +void responseSave(FILE *file, const float *Ir, const float *Ig, const float *Ib, + int M); //! \brief Load response curve (saved with responseSave();) //! //! \param file file handle to save response curve //! \param I [out] camera response function (array size of M) //! \param M number of camera output levels -//! \return false means file has different output levels or is wrong for some other reason -bool responseLoad(FILE* file, float* Ir, float* Ig, float* Ib, int M); +//! \return false means file has different output levels or is wrong for some +//! other reason +bool responseLoad(FILE *file, float *Ir, float *Ig, float *Ib, int M); #endif // RESPONSES_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/robertson02.cpp luminance-hdr-2.6.0/src/HdrCreation/robertson02.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/robertson02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/robertson02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -28,17 +28,16 @@ #include "robertson02.h" #include "arch/math.h" +#include #include #include -#include -#include #include +#include #include #include -#include #include - +#include #include @@ -55,21 +54,15 @@ namespace fusion { void RobertsonOperator::applyResponse( - ResponseCurve& response, - WeightFunction& weight, - ResponseChannel channel, - const DataList& inputData, float* outputData, - size_t width, size_t height, - float minAllowedValue, float maxAllowedValue, - const float* arrayofexptime) -{ - assert( inputData.size() ); + ResponseCurve &response, WeightFunction &weight, ResponseChannel channel, + const DataList &inputData, float *outputData, size_t width, size_t height, + float minAllowedValue, float maxAllowedValue, const float *arrayofexptime) { + assert(inputData.size()); size_t saturatedPixels = 0; - int numPixels = (int) width*height; - for (int j = 0; j < numPixels; ++j) - { + int numPixels = (int)width * height; + for (int j = 0; j < numPixels; ++j) { // all exposures for each pixel float sum = 0.0f; float div = 0.0f; @@ -77,8 +70,7 @@ float minti = +1e6f; // for all exposures - for (int i = 0; i < (int)inputData.size(); ++i) - { + for (int i = 0; i < (int)inputData.size(); ++i) { float m = inputData[i][j]; float ti = arrayofexptime[i]; @@ -87,24 +79,24 @@ // --- anti saturation: observe minimum exposure time at which // saturated value is present, and maximum exp time at which // black value is present - if ( m > maxAllowedValue ) { + if (m > maxAllowedValue) { minti = std::min(minti, ti); } - if ( m < minAllowedValue ) { + if (m < minAllowedValue) { maxti = std::max(maxti, ti); } // --- anti-ghosting: monotonous increase in time should result // in monotonous increase in intensity; make forward and // backward check, ignore value if condition not satisfied -// int m_lower = inputData.getSample(i_lower[i], j); -// int m_upper = inputData.getSample(i_upper[i], j); + // int m_lower = inputData.getSample(i_lower[i], j); + // int m_upper = inputData.getSample(i_upper[i], j); -// if ( N > 1) { -// if ( m_lower > m || m_upper < m ) { -// continue; -// } -// } + // if ( N > 1) { + // if ( m_lower > m || m_upper < m ) { + // continue; + // } + // } sum += w * ti * r; div += w * ti * ti; @@ -112,20 +104,20 @@ // --- anti saturation: if a meaningful representation of pixel // was not found, replace it with information from observed data - if ( div == 0.0f ) { + if (div == 0.0f) { ++saturatedPixels; } - if ( div == 0.0f && maxti > -1e6f ) { + if (div == 0.0f && maxti > -1e6f) { sum = minAllowedValue; div = maxti; } - if ( div == 0.0f && minti < +1e6f ) { + if (div == 0.0f && minti < +1e6f) { sum = maxAllowedValue; div = minti; } - if ( div != 0.0f ) { - outputData[j] = sum/div; + if (div != 0.0f) { + outputData[j] = sum / div; } else { outputData[j] = 0.0f; } @@ -134,18 +126,19 @@ PRINT_DEBUG("Saturated pixels: " << saturatedPixels); } -void RobertsonOperator::computeFusion(ResponseCurve& response, WeightFunction& weight, - const std::vector &frames, pfs::Frame &frame) -{ - assert( frames.size() ); +void RobertsonOperator::computeFusion(ResponseCurve &response, + WeightFunction &weight, + const std::vector &frames, + pfs::Frame &frame) { + assert(frames.size()); size_t numExposures = frames.size(); - Frame tempFrame (frames[0].frame()->getWidth(), - frames[0].frame()->getHeight()); + Frame tempFrame(frames[0].frame()->getWidth(), + frames[0].frame()->getHeight()); - Channel* outputRed; - Channel* outputGreen; - Channel* outputBlue; + Channel *outputRed; + Channel *outputGreen; + Channel *outputBlue; tempFrame.createXYZChannels(outputRed, outputGreen, outputBlue); DataList redChannels(numExposures); @@ -162,18 +155,18 @@ std::back_inserter(averageLuminances), boost::bind(&FrameEnhanced::averageLuminance, _1)); - applyResponse(response, weight, RESPONSE_CHANNEL_RED, redChannels, outputRed->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, - averageLuminances.data()); // red - applyResponse(response, weight, RESPONSE_CHANNEL_BLUE, blueChannels, outputBlue->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, - averageLuminances.data()); // blue - applyResponse(response, weight, RESPONSE_CHANNEL_GREEN, greenChannels, outputGreen->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, - averageLuminances.data()); // green + applyResponse(response, weight, RESPONSE_CHANNEL_RED, redChannels, + outputRed->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, + averageLuminances.data()); // red + applyResponse(response, weight, RESPONSE_CHANNEL_BLUE, blueChannels, + outputBlue->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, + averageLuminances.data()); // blue + applyResponse(response, weight, RESPONSE_CHANNEL_GREEN, greenChannels, + outputGreen->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, + averageLuminances.data()); // green float cmax[3]; cmax[0] = *max_element(outputRed->begin(), outputRed->end()); @@ -181,55 +174,55 @@ cmax[2] = *max_element(outputBlue->begin(), outputBlue->end()); float Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); - replace_if(outputRed->begin(), outputRed->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(outputGreen->begin(), outputGreen->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(outputBlue->begin(), outputBlue->end(), [](float f){ return !isnormal(f); }, Max); + replace_if(outputRed->begin(), outputRed->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(outputGreen->begin(), outputGreen->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(outputBlue->begin(), outputBlue->end(), + [](float f) { return !isnormal(f); }, Max); - frame.swap( tempFrame ); + frame.swap(tempFrame); } -} // namespace fusion -} // namespace libhdr +} // namespace fusion +} // namespace libhdr -namespace -{ +namespace { using namespace libhdr::fusion; // maximum iterations after algorithm accepts local minima -const int MAXIT = 35; //500; +const int MAXIT = 35; // 500; // maximum accepted error -const float MAX_DELTA = 1e-3f; //1e-5f; +const float MAX_DELTA = 1e-3f; // 1e-5f; -float normalizeI(ResponseCurve::ResponseContainer& I) -{ +float normalizeI(ResponseCurve::ResponseContainer &I) { size_t M = I.size(); size_t Mmin = 0; - size_t Mmax = M-1; + size_t Mmax = M - 1; // find min max - for (Mmin=0 ; Mmin0 && I[Mmax]==0 ; --Mmax); + for (Mmin = 0; Mmin < M && I[Mmin] == 0; ++Mmin) + ; + for (Mmax = M - 1; Mmax > 0 && I[Mmax] == 0; --Mmax) + ; - size_t Mmid = Mmin+(Mmax-Mmin)/2; + size_t Mmid = Mmin + (Mmax - Mmin) / 2; float mid = I[Mmid]; - if (mid == 0.0f) - { + if (mid == 0.0f) { // find first non-zero middle response - while ((Mmid < Mmax) && (I[Mmid] == 0.0f)) - { + while ((Mmid < Mmax) && (I[Mmid] == 0.0f)) { Mmid++; } mid = I[Mmid]; } - PRINT_DEBUG("robertson02: middle response, mid = " << mid << - " [" << Mmid << "]" << " " << Mmin << "..." << Mmax); + PRINT_DEBUG("robertson02: middle response, mid = " + << mid << " [" << Mmid << "]" + << " " << Mmin << "..." << Mmax); - if (mid != 0.0f) - { - for (size_t m = 0; m < M; ++m) - { + if (mid != 0.0f) { + for (size_t m = 0; m < M; ++m) { I[m] /= mid; } } @@ -265,35 +258,30 @@ } */ -} // anonymous +} // anonymous namespace libhdr { namespace fusion { void RobertsonOperatorAuto::computeResponse( - ResponseCurve& response, - WeightFunction& weight, - ResponseChannel channel, - const DataList& inputData, float* outputData, - size_t width, size_t height, - float minAllowedValue, float maxAllowedValue, - const float* arrayofexptime) -{ + ResponseCurve &response, WeightFunction &weight, ResponseChannel channel, + const DataList &inputData, float *outputData, size_t width, size_t height, + float minAllowedValue, float maxAllowedValue, const float *arrayofexptime) { typedef ResponseCurve::ResponseContainer ResponseContainer; - int N = inputData.size(); + int N = inputData.size(); // 0 . initialization // a. normalize response - ResponseContainer& I = response.get(channel); + ResponseContainer &I = response.get(channel); normalizeI(I); // b. copy response ResponseContainer Ip = response.get(channel); // c. set previous delta double pdelta = 0.0; - applyResponse(response, weight, channel, inputData, outputData, width, height, - minAllowedValue, maxAllowedValue, arrayofexptime); + applyResponse(response, weight, channel, inputData, outputData, width, + height, minAllowedValue, maxAllowedValue, arrayofexptime); std::vector cardEm(ResponseCurve::NUM_BINS); ResponseContainer sum; @@ -302,24 +290,22 @@ assert(sum.size() == Ip.size()); assert(sum.size() == I.size()); - for (size_t cur_it = 0; cur_it < MAXIT; ++cur_it) - { + for (size_t cur_it = 0; cur_it < MAXIT; ++cur_it) { // reset buffers fill(cardEm.begin(), cardEm.end(), 0); fill(sum.begin(), sum.end(), 0.f); // 1. Minimize with respect to I - for (int i = 0; i < N; ++i) - { + for (int i = 0; i < N; ++i) { float ti = arrayofexptime[i]; // this is probably uglier than necessary, (I copy th FOR in order // not to do the IFs inside them) but I don't know how to improve it - for (size_t j = 0; j < width*height; ++j) - { + for (size_t j = 0; j < width * height; ++j) { size_t sample = response.getIdx(inputData[i][j]); - //if ((sample < ResponseCurve::NUM_BINS) && (sample >= 0)) // sample is unsigned so always >= 0 - if (sample < ResponseCurve::NUM_BINS) - { + // if ((sample < ResponseCurve::NUM_BINS) && (sample >= 0)) // + // sample is + // unsigned so always >= 0 + if (sample < ResponseCurve::NUM_BINS) { sum[sample] += ti * outputData[j]; cardEm[sample]++; } @@ -331,14 +317,10 @@ } float Iprevious = 0.f; - for (size_t m = 0; m < I.size(); ++m) - { - if (cardEm[m] != 0) - { + for (size_t m = 0; m < I.size(); ++m) { + if (cardEm[m] != 0) { I[m] = Iprevious = sum[m] / cardEm[m]; - } - else - { + } else { I[m] = Iprevious; } } @@ -347,18 +329,16 @@ normalizeI(I); // 3. Apply new response - applyResponse(response, weight, channel, inputData, outputData, width, height, - minAllowedValue, maxAllowedValue, arrayofexptime); + applyResponse(response, weight, channel, inputData, outputData, width, + height, minAllowedValue, maxAllowedValue, arrayofexptime); // 4. Check stopping condition double delta = 0.0; int hits = 0; - for (size_t m = 0; m < I.size(); ++m) - { - if (I[m] != 0.0f) - { + for (size_t m = 0; m < I.size(); ++m) { + if (I[m] != 0.0f) { float diff = I[m] - Ip[m]; - delta += diff * diff; + delta += (double) diff * diff; Ip[m] = I[m]; hits++; } @@ -366,17 +346,20 @@ delta /= hits; #ifndef NDEBUG - PRINT_DEBUG(" #" << cur_it << " delta=" << delta << " (coverage: " << 100*hits/I.size() << "%)"); + PRINT_DEBUG(" #" << cur_it << " delta=" << delta + << " (coverage: " << 100 * hits / I.size() << "%)"); +#endif + if (delta < MAX_DELTA) { +#ifndef NDEBUG + std::cerr << " #" << cur_it << " delta=" << pdelta + << " <- converged\n"; #endif - if (delta < MAX_DELTA) - { - std::cerr << " #" << cur_it << " delta=" << pdelta << " <- converged\n"; break; - } - else if ( boost::math::isnan(delta) || (cur_it > MAXIT && pdelta < delta) ) - { + } else if (boost::math::isnan(delta) || + (cur_it > MAXIT && pdelta < delta)) { #ifndef NDEBUG - std::cerr << "algorithm failed to converge, too noisy data in range\n"; + std::cerr + << "algorithm failed to converge, too noisy data in range\n"; #endif break; } @@ -386,21 +369,17 @@ } void RobertsonOperatorAuto::computeFusion( - ResponseCurve& response, - WeightFunction& weight, - const std::vector &frames, pfs::Frame &frame) -{ - assert( frames.size() ); + ResponseCurve &response, WeightFunction &weight, + const std::vector &frames, pfs::Frame &frame) { + assert(frames.size()); size_t numExposures = frames.size(); - Frame tempFrame( - frames[0].frame()->getWidth(), - frames[0].frame()->getHeight() - ); - - Channel* outputRed; - Channel* outputGreen; - Channel* outputBlue; + Frame tempFrame(frames[0].frame()->getWidth(), + frames[0].frame()->getHeight()); + + Channel *outputRed; + Channel *outputGreen; + Channel *outputBlue; tempFrame.createXYZChannels(outputRed, outputGreen, outputBlue); DataList redChannels(numExposures); @@ -418,19 +397,19 @@ boost::bind(&FrameEnhanced::averageLuminance, _1)); // red - computeResponse(response, weight, RESPONSE_CHANNEL_RED, redChannels, outputRed->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, + computeResponse(response, weight, RESPONSE_CHANNEL_RED, redChannels, + outputRed->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, averageLuminances.data()); // green - computeResponse(response, weight, RESPONSE_CHANNEL_GREEN, greenChannels, outputGreen->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, + computeResponse(response, weight, RESPONSE_CHANNEL_GREEN, greenChannels, + outputGreen->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, averageLuminances.data()); // blue - computeResponse(response, weight, RESPONSE_CHANNEL_BLUE, blueChannels, outputBlue->data(), - tempFrame.getWidth(), tempFrame.getHeight(), - minAllowedValue, maxAllowedValue, + computeResponse(response, weight, RESPONSE_CHANNEL_BLUE, blueChannels, + outputBlue->data(), tempFrame.getWidth(), + tempFrame.getHeight(), minAllowedValue, maxAllowedValue, averageLuminances.data()); float cmax[3]; @@ -439,12 +418,15 @@ cmax[2] = *max_element(outputBlue->begin(), outputBlue->end()); float Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); - replace_if(outputRed->begin(), outputRed->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(outputGreen->begin(), outputGreen->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(outputBlue->begin(), outputBlue->end(), [](float f){ return !isnormal(f); }, Max); + replace_if(outputRed->begin(), outputRed->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(outputGreen->begin(), outputGreen->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(outputBlue->begin(), outputBlue->end(), + [](float f) { return !isnormal(f); }, Max); - frame.swap( tempFrame ); + frame.swap(tempFrame); } -} // namespace fusion -} // namespace libhdr +} // namespace fusion +} // namespace libhdr diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/robertson02.h luminance-hdr-2.6.0/src/HdrCreation/robertson02.h --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/robertson02.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/robertson02.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,75 +25,52 @@ //! \brief Robertson02 algorithm for automatic self-calibration. //! \author Davide Anastasia -#include -#include - +#include #include #include -#include namespace libhdr { namespace fusion { //! \brief Debevec Radiance Map operator -class RobertsonOperator : public IFusionOperator -{ -public: - RobertsonOperator() - : IFusionOperator() - {} - - FusionOperator getType() const - { - return ROBERTSON; - } - -private: - void computeFusion( - ResponseCurve& response, - WeightFunction& weight, - const std::vector& frames, pfs::Frame &frame); - -protected: - void applyResponse( - ResponseCurve& response, - WeightFunction& weight, - ResponseChannel channel, - const DataList& inputData, float* outputData, - size_t width, size_t height, - float minAllowedValue, float maxAllowedValue, - const float* arrayofexptime); +class RobertsonOperator : public IFusionOperator { + public: + RobertsonOperator() : IFusionOperator() {} + + FusionOperator getType() const { return ROBERTSON; } + + private: + void computeFusion(ResponseCurve &response, WeightFunction &weight, + const std::vector &frames, + pfs::Frame &frame); + + protected: + void applyResponse(ResponseCurve &response, WeightFunction &weight, + ResponseChannel channel, const DataList &inputData, + float *outputData, size_t width, size_t height, + float minAllowedValue, float maxAllowedValue, + const float *arrayofexptime); }; -class RobertsonOperatorAuto : public RobertsonOperator -{ -public: - RobertsonOperatorAuto() - : RobertsonOperator() - {} - - FusionOperator getType() const - { - return ROBERTSON_AUTO; - } - -private: - void computeFusion( - ResponseCurve& response, - WeightFunction& weight, - const std::vector& frames, pfs::Frame &outFrame); - - void computeResponse( - ResponseCurve& response, - WeightFunction& weight, - ResponseChannel channel, - const DataList& inputData, float* outputData, - size_t width, size_t height, - float minAllowedValue, float maxAllowedValue, - const float* arrayofexptime); +class RobertsonOperatorAuto : public RobertsonOperator { + public: + RobertsonOperatorAuto() : RobertsonOperator() {} + + FusionOperator getType() const { return ROBERTSON_AUTO; } + + private: + void computeFusion(ResponseCurve &response, WeightFunction &weight, + const std::vector &frames, + pfs::Frame &outFrame); + + void computeResponse(ResponseCurve &response, WeightFunction &weight, + ResponseChannel channel, const DataList &inputData, + float *outputData, size_t width, size_t height, + float minAllowedValue, float maxAllowedValue, + const float *arrayofexptime); }; -} // fusion -} // libhdr +} // fusion +} // libhdr -#endif // ROBERTSON02_H +#endif // ROBERTSON02_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrCreation/weights.cpp luminance-hdr-2.6.0/src/HdrCreation/weights.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrCreation/weights.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrCreation/weights.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,9 +1,9 @@ #include -#include "arch/math.h" #include -#include #include +#include +#include "arch/math.h" #include @@ -16,28 +16,21 @@ namespace libhdr { namespace fusion { -WeightFunctionType WeightFunction::fromString(const std::string& type) -{ - typedef map Dict; - static Dict v = - map_list_of - ("triangular", WEIGHT_TRIANGULAR) - ("gaussian", WEIGHT_GAUSSIAN) - ("plateau", WEIGHT_PLATEAU) - ("flat", WEIGHT_FLAT) - ; +WeightFunctionType WeightFunction::fromString(const std::string &type) { + typedef map + Dict; + static Dict v = map_list_of("triangular", WEIGHT_TRIANGULAR)( + "gaussian", WEIGHT_GAUSSIAN)("plateau", WEIGHT_PLATEAU)("flat", + WEIGHT_FLAT); Dict::const_iterator it = v.find(type); - if (it != v.end()) - { + if (it != v.end()) { return it->second; } return WEIGHT_GAUSSIAN; } -WeightFunction::WeightFunction(WeightFunctionType type) - : m_type(type) -{ +WeightFunction::WeightFunction(WeightFunctionType type) : m_type(type) { setType(type); } @@ -45,120 +38,129 @@ static const float s_triangularThreshold = 2.0f / WeightFunction::NUM_BINS; } -static float getWeightTriangular(float input) -{ +static float getWeightTriangular(float input) { // ignore very low weights - if ( (input < s_triangularThreshold) || (input > (1.f - s_triangularThreshold)) ) { + if (input < s_triangularThreshold || + input > 1.0f - s_triangularThreshold) { return 0.f; } float half = 0.5f; - return input < half ? 2*input : 2.0f*(1.0f-input); + return input < half ? 2.0f * input : 2.0f * (1.0f - input); } -static void fillWeightTriangular(WeightFunction::WeightContainer& weight) -{ +static void fillWeightTriangular(WeightFunction::WeightContainer &weight) { size_t divider = (weight.size() - 1); - for (size_t i = 0; i < weight.size(); ++i) - { - weight[i] = getWeightTriangular((float)i/divider); + for (size_t i = 0; i < weight.size(); ++i) { + weight[i] = getWeightTriangular((float)i / divider); } } -static float minTrustedValueTriangular() { return 0.f - std::numeric_limits::epsilon(); } -static float maxTrustedValueTriangular() { return 1.f + std::numeric_limits::epsilon(); } +static float minTrustedValueTriangular() { + return 0.f - std::numeric_limits::epsilon(); +} +static float maxTrustedValueTriangular() { + return 1.f + std::numeric_limits::epsilon(); +} namespace { -static const float s_gaussianThreshold = 2.0f/WeightFunction::NUM_BINS; +static const float s_gaussianThreshold = 2.0f / WeightFunction::NUM_BINS; static const float s_mu = 0.5f; } -static float getWeightGaussian(float input) -{ +static float getWeightGaussian(float input) { // ignore very low weights - if ( (input < s_gaussianThreshold) || (input > (1.f - s_gaussianThreshold)) ) { + if (input < s_gaussianThreshold || + input > 1.0f - s_gaussianThreshold) { return 0.f; } - - return (exp( -32.0f*(input - s_mu)*(input - s_mu) )); + return exp(-32.0f * (input - s_mu) * (input - s_mu)); } -static void fillWeightGaussian(WeightFunction::WeightContainer& weight) -{ +static void fillWeightGaussian(WeightFunction::WeightContainer &weight) { size_t divider = (weight.size() - 1); - for (size_t i = 0; i < weight.size(); ++i) - { - weight[i] = getWeightGaussian((float)i/divider); + for (size_t i = 0; i < weight.size(); ++i) { + weight[i] = getWeightGaussian((float)i / divider); } } -static float minTrustedValueGaussian() { return 0.f - std::numeric_limits::epsilon(); } -static float maxTrustedValueGaussian() { return 1.f + std::numeric_limits::epsilon(); } +static float minTrustedValueGaussian() { + return 0.f - std::numeric_limits::epsilon(); +} +static float maxTrustedValueGaussian() { + return 1.f + std::numeric_limits::epsilon(); +} namespace { static const float s_plateauThreshold = 0.00025f; } -static float getWeightPlateau(float input) -{ - if ((input < s_plateauThreshold) || (input > (1.f - s_plateauThreshold))) - { +static float getWeightPlateau(float input) { + if ((input < s_plateauThreshold) || + (input > (1.f - s_plateauThreshold))) { return 0.f; } - return 1.f - pow( (2.0f*input - 1.0f), 12.0f); + return 1.f - pow((2.0f * input - 1.0f), 12.0f); } -static void fillWeightPlateau(WeightFunction::WeightContainer& weight) -{ +static void fillWeightPlateau(WeightFunction::WeightContainer &weight) { size_t divider = (weight.size() - 1); - for (size_t i = 0; i < weight.size(); ++i) - { - weight[i] = getWeightPlateau((float)i/divider); + for (size_t i = 0; i < weight.size(); ++i) { + weight[i] = getWeightPlateau((float)i / divider); } } -static float minTrustedValuePlateau() { return 0.f - std::numeric_limits::epsilon(); } -static float maxTrustedValuePlateau() { return 1.f + std::numeric_limits::epsilon(); } +static float minTrustedValuePlateau() { + return 0.f - std::numeric_limits::epsilon(); +} +static float maxTrustedValuePlateau() { + return 1.f + std::numeric_limits::epsilon(); +} -static void fillWeightFlat(WeightFunction::WeightContainer& weight) -{ +static void fillWeightFlat(WeightFunction::WeightContainer &weight) { std::fill(weight.begin(), weight.end(), 1.f); } -static float minTrustedValueFlat() { return 0.f - std::numeric_limits::epsilon(); } -static float maxTrustedValueFlat() { return 1.f + std::numeric_limits::epsilon(); } +static float minTrustedValueFlat() { + return 0.f - std::numeric_limits::epsilon(); +} +static float maxTrustedValueFlat() { + return 1.f + std::numeric_limits::epsilon(); +} -void WeightFunction::setType(WeightFunctionType type) -{ - typedef void (*WeightFunctionCalculator)(WeightContainer&); +void WeightFunction::setType(WeightFunctionType type) { + typedef void (*WeightFunctionCalculator)(WeightContainer &); typedef float (*WeightTrustedValue)(); - struct WeightFunctionFiller - { + struct WeightFunctionFiller { WeightFunctionCalculator fillData; WeightTrustedValue minTrustValue; WeightTrustedValue maxTrustValue; }; - typedef std::map WeightFunctionFunc; - WeightFunctionFiller fillter_t = {&fillWeightTriangular, &minTrustedValueTriangular, &maxTrustedValueTriangular}; - WeightFunctionFiller fillter_g = {&fillWeightGaussian, &minTrustedValueGaussian, &maxTrustedValueGaussian}; - WeightFunctionFiller fillter_p = {&fillWeightPlateau, &minTrustedValuePlateau, &maxTrustedValuePlateau}; - WeightFunctionFiller fillter_f = {&fillWeightFlat, &minTrustedValueFlat, &maxTrustedValueFlat}; + typedef std::map + WeightFunctionFunc; + WeightFunctionFiller fillter_t = {&fillWeightTriangular, + &minTrustedValueTriangular, + &maxTrustedValueTriangular}; + WeightFunctionFiller fillter_g = {&fillWeightGaussian, + &minTrustedValueGaussian, + &maxTrustedValueGaussian}; + WeightFunctionFiller fillter_p = { + &fillWeightPlateau, &minTrustedValuePlateau, &maxTrustedValuePlateau}; + WeightFunctionFiller fillter_f = {&fillWeightFlat, &minTrustedValueFlat, + &maxTrustedValueFlat}; static WeightFunctionFunc funcs = - map_list_of - (WEIGHT_TRIANGULAR, fillter_t) - (WEIGHT_GAUSSIAN, fillter_g) - (WEIGHT_PLATEAU, fillter_p) - (WEIGHT_FLAT, fillter_f) - ; + map_list_of(WEIGHT_TRIANGULAR, fillter_t)(WEIGHT_GAUSSIAN, fillter_g)( + WEIGHT_PLATEAU, fillter_p)(WEIGHT_FLAT, fillter_f); WeightFunctionType type_ = WEIGHT_TRIANGULAR; - WeightFunctionFiller func_ = {&fillWeightTriangular, &minTrustedValueTriangular, &maxTrustedValueTriangular}; + WeightFunctionFiller func_ = {&fillWeightTriangular, + &minTrustedValueTriangular, + &maxTrustedValueTriangular}; WeightFunctionFunc::const_iterator it = funcs.find(type); - if (it != funcs.end()) - { + if (it != funcs.end()) { type_ = it->first; func_ = it->second; } @@ -169,41 +171,33 @@ m_maxTrustedValue = func_.maxTrustValue(); } +} // fusion +} // libhdr -} // fusion -} // libhdr - -bool weightsLoad( FILE* file, float* w, int M) -{ +bool weightsLoad(FILE *file, float *w, int M) { char line[1024]; - int m=0,c=0; + int m = 0, c = 0; // parse weighting function matrix header - while( fgets(line, 1024, file) ) - if( sscanf(line, "# rows: %d\n", &m) == 1 ) - break; - if( m!=M ) - { + while (fgets(line, 1024, file)) + if (sscanf(line, "# rows: %d\n", &m) == 1) break; + if (m != M) { std::cerr << "response: number of input levels is different," << " M=" << M << " m=" << m << std::endl; return false; } - while( fgets(line, 1024, file) ) - if( sscanf(line, "# columns: %d\n", &c) == 1 ) - break; - if( c!=2 ) - return false; + while (fgets(line, 1024, file)) + if (sscanf(line, "# columns: %d\n", &c) == 1) break; + if (c != 2) return false; // read response - for( int i=0 ; i #include -#include #include +#include +#include namespace libhdr { namespace fusion { -enum WeightFunctionType -{ +enum WeightFunctionType { WEIGHT_TRIANGULAR = 0, WEIGHT_GAUSSIAN = 1, WEIGHT_PLATEAU = 2, WEIGHT_FLAT = 3 }; -class WeightFunction -{ -public: +class WeightFunction { + public: static const size_t NUM_BINS = (1 << 12); typedef std::array WeightContainer; - static WeightFunctionType fromString(const std::string& type); + static WeightFunctionType fromString(const std::string &type); static size_t getIdx(float sample); @@ -55,12 +53,12 @@ float operator()(float input) const { return getWeight(input); } void setType(WeightFunctionType type); - WeightFunctionType getType() const { return m_type; } + WeightFunctionType getType() const { return m_type; } - float minTrustedValue() const { return m_minTrustedValue; } - float maxTrustedValue() const { return m_maxTrustedValue; } + float minTrustedValue() const { return m_minTrustedValue; } + float maxTrustedValue() const { return m_maxTrustedValue; } -private: + private: WeightFunctionType m_type; WeightContainer m_weights; @@ -68,36 +66,34 @@ float m_maxTrustedValue; }; -inline -size_t WeightFunction::getIdx(float sample) +inline size_t WeightFunction::getIdx(float sample) //{ return size_t(sample*(NUM_BINS - 1) + 0.45f); } TODO: check this one -{ return size_t(sample*(NUM_BINS - 1)); } - -inline -float WeightFunction::getWeight(float input) const { + return size_t(sample * (NUM_BINS - 1)); +} + +inline float WeightFunction::getWeight(float input) const { assert(input >= 0.f); assert(input <= 1.f); return m_weights[getIdx(input)]; } -inline -WeightFunction::WeightContainer WeightFunction::getWeights() const -{ +inline WeightFunction::WeightContainer WeightFunction::getWeights() const { return m_weights; } -} // fusion -} // libhdr +} // fusion +} // libhdr //! \brief Load weighting function //! //! \param file file handle to save response curve //! \param w [out] weights (array size of M) //! \param M number of camera output levels -//! \return false means file has different output levels or is wrong for some other reason -bool weightsLoad(FILE* file, float* w, int M); +//! \return false means file has different output levels or is wrong for some +//! other reason +bool weightsLoad(FILE *file, float *w, int M); //! \brief Save weighting function //! @@ -105,6 +101,6 @@ //! \param w weights (array size of M) //! \param M number of camera output levels //! \param name matrix name for use in Octave or Matlab -void weightsSave(FILE* file, const float* w, int M, const char* name); +void weightsSave(FILE *file, const float *w, int M, const char *name); -#endif // LIBHDR_FUSION_WEIGHTS_H +#endif // LIBHDR_FUSION_WEIGHTS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrHTML/CMakeLists.txt luminance-hdr-2.6.0/src/HdrHTML/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/HdrHTML/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrHTML/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -12,8 +12,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -ADD_LIBRARY(hdrhtml ${FILES_H} ${FILES_CPP}) -qt5_use_modules(hdrhtml Core Gui) +ADD_LIBRARY(hdrhtml STATIC ${FILES_H} ${FILES_CPP}) +TARGET_LINK_LIBRARIES(hdrhtml Qt5::Core Qt5::Gui) SET(FILES_CLI_H ${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.h) @@ -22,8 +22,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pfsouthdrhtml.cpp) -ADD_LIBRARY(hdrhtml-cli ${FILES_CLI_H} ${FILES_CLI_CPP}) -qt5_use_modules(hdrhtml-cli Core Gui) +ADD_LIBRARY(hdrhtml-cli STATIC ${FILES_CLI_H} ${FILES_CLI_CPP}) +TARGET_LINK_LIBRARIES(hdrhtml-cli Qt5::Core Qt5::Gui) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrHTML/hdrhtml.cpp luminance-hdr-2.6.0/src/HdrHTML/hdrhtml.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrHTML/hdrhtml.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrHTML/hdrhtml.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,24 +25,25 @@ * $Id: hdrhtml.cpp,v 1.8 2014/06/16 21:50:08 rafm Exp $ */ +#include #include "hdrhtml.h" -#include +#include #include +#include #include -#include #include #include -#include -#include #include +#include +#include #include "Libpfs/exception.h" -#if defined (WIN32) || defined (__APPLE__) +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) #include #endif -#include "hdrhtml-path.hxx" +#include "HdrHTML/hdrhtml-path.hxx" #include #include @@ -54,99 +55,88 @@ // Parameters controllig the web page // ================================================ -const int f_step_res = 3; // How many steps per f-stop (do not change) -const int pix_per_fstop = 25; // Distance in pixels between f-stops shown on the histogram -const char *hdrhtml_version = "1.0"; // Version of the HDRHTML code - +const int f_step_res = 3; // How many steps per f-stop (do not change) +const int pix_per_fstop = + 25; // Distance in pixels between f-stops shown on the histogram +const char *hdrhtml_version = "1.0"; // Version of the HDRHTML code // ================================================ // Histogram // ================================================ -template -class Histogram -{ -public: - vector x; // Bin centers - vector n; // No of items in a bin - size_t bins; - - Histogram() : bins( 0 ) - { - } - - ~Histogram() - { - free(); - } - - void free() - { - //delete []x; - //delete []n; - bins = 0; - } - - void compute( const T *data, size_t d_size, int bins = 30, T min_val = 1, T max_val = -1, bool reject_outofrange = true ) - { - assert( bins > 0 ); +template +class Histogram { + public: + vector x; // Bin centers + vector n; // No of items in a bin + size_t bins; - free(); - this->bins = bins; + Histogram() : bins(0) {} - if( min_val > max_val ) // missing min/max info - { - min_val = numeric_limits::max(); - max_val = numeric_limits::min(); + ~Histogram() { free(); } - for( size_t k=0; k < d_size; k++ ) { - if( data[k] > max_val ) max_val = data[k]; - if( data[k] < min_val ) min_val = data[k]; - } - } - - x.resize(bins); - n.resize(bins); - - T delta = (max_val-min_val) / (float)bins; // width of a single bin - -// T *e = new T[bins+1]; // bin edges -// for( int k=0; k <= bins; k++ ) { -// e[k] = min_val + (float)k * delta; -// } - for( int k=0; k < bins; k++ ) { - x[k] = min_val + (float)k * delta + delta/2; - n[k] = 0; - } - - if( reject_outofrange ) { - for( size_t k=0; k < d_size; k++ ) { - int ind = floor( (data[k]-min_val) / (max_val-min_val) * (float)bins ); - if( ind < 0 ) - continue; - if( ind >= bins ) - continue; - n[ind]++; - } - } else { - for( size_t k=0; k < d_size; k++ ) { - int ind = floor( (data[k]-min_val) / (max_val-min_val) * (float)bins ); - if( ind < 0 ) { - n[0]++; - continue; - } - if( ind >= bins ) { - n[bins-1]++; - continue; - } - n[ind]++; - } + void free() { + // delete []x; + // delete []n; + bins = 0; } + void compute(const T *data, size_t d_size, int bins = 30, T min_val = 1, + T max_val = -1, bool reject_outofrange = true) { + assert(bins > 0); + + free(); + this->bins = bins; + + if (min_val > max_val) // missing min/max info + { + min_val = numeric_limits::max(); + max_val = numeric_limits::min(); + + for (size_t k = 0; k < d_size; k++) { + if (data[k] > max_val) max_val = data[k]; + if (data[k] < min_val) min_val = data[k]; + } + } + + x.resize(bins); + n.resize(bins); + T delta = (max_val - min_val) / (float)bins; // width of a single bin - } + // T *e = new T[bins+1]; // bin edges + // for( int k=0; k <= bins; k++ ) { + // e[k] = min_val + (float)k * delta; + // } + for (int k = 0; k < bins; k++) { + x[k] = min_val + (float)k * delta + delta / 2; + n[k] = 0; + } + if (reject_outofrange) { + for (size_t k = 0; k < d_size; k++) { + int ind = floor((data[k] - min_val) / (max_val - min_val) * + (float)bins); + if (ind < 0) continue; + if (ind >= bins) continue; + n[ind]++; + } + } else { + for (size_t k = 0; k < d_size; k++) { + int ind = floor((data[k] - min_val) / (max_val - min_val) * + (float)bins); + if (ind < 0) { + n[0]++; + continue; + } + if (ind >= bins) { + n[bins - 1]++; + continue; + } + n[ind]++; + } + } + } }; // ================================================ @@ -159,84 +149,79 @@ * x_i must be at least two elements * y_i must be initialized after creating an object */ -class UniformArrayLUT -{ -public: - float *y_i; - - UniformArrayLUT( size_t lut_size, const float *x_i, float *y_i = NULL ) : y_i(NULL), x_i( x_i ), lut_size( lut_size ), delta( x_i[1]-x_i[0] ) - { - if( y_i == NULL ) { - this->y_i = new float[lut_size]; - own_y_i = true; - } else { - this->y_i = y_i; - own_y_i = false; +class UniformArrayLUT { + public: + float *y_i; + + UniformArrayLUT(size_t lut_size, const float *x_i, float *y_i = NULL) + : y_i(NULL), x_i(x_i), lut_size(lut_size), delta(x_i[1] - x_i[0]) { + if (y_i == NULL) { + this->y_i = new float[lut_size]; + own_y_i = true; + } else { + this->y_i = y_i; + own_y_i = false; + } } - } - UniformArrayLUT() : y_i(NULL), x_i( 0 ), lut_size( 0 ), delta( 0. ) {} + UniformArrayLUT() : y_i(NULL), x_i(0), lut_size(0), delta(0.), own_y_i(false) {} - UniformArrayLUT(const UniformArrayLUT& other) : y_i(NULL), x_i( other.x_i ), lut_size( other.lut_size ), delta( other.delta ) - { - this->y_i = new float[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); - } - - UniformArrayLUT& operator = (const UniformArrayLUT& other) - { - if (this != &other) - { - this->lut_size = other.lut_size; - this->delta = other.delta; - this->x_i = other.x_i; - this->y_i = new float[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); - } - return *this; - } - - ~UniformArrayLUT() - { - if( own_y_i ) - delete []y_i; - } - - float interp( float x ) - { - const float ind_f = (x - x_i[0])/delta; - const size_t ind_low = (size_t)(ind_f); - const size_t ind_hi = (size_t)ceil(ind_f); - - if( (ind_f < 0) ) // Out of range checks - return y_i[0]; - if( (ind_hi >= lut_size) ) - return y_i[lut_size-1]; - - if( (ind_low == ind_hi) ) - return y_i[ind_low]; // No interpolation necessary - - return y_i[ind_low] + (y_i[ind_hi]-y_i[ind_low])*(ind_f-(float)ind_low); // Interpolation - } - -private: - const float *x_i; - size_t lut_size; - float delta; + UniformArrayLUT(const UniformArrayLUT &other) + : y_i(NULL), + x_i(other.x_i), + lut_size(other.lut_size), + delta(other.delta) { + this->y_i = new float[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); + } + + UniformArrayLUT &operator=(const UniformArrayLUT &other) { + if (this != &other) { + this->lut_size = other.lut_size; + this->delta = other.delta; + this->x_i = other.x_i; + this->y_i = new float[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); + } + return *this; + } + + ~UniformArrayLUT() { + if (own_y_i) delete[] y_i; + } + + float interp(float x) { + const float ind_f = (x - x_i[0]) / delta; + const size_t ind_low = (size_t)(ind_f); + const size_t ind_hi = (size_t)ceil(ind_f); + + if ((ind_f < 0)) // Out of range checks + return y_i[0]; + if ((ind_hi >= lut_size)) return y_i[lut_size - 1]; + + if ((ind_low == ind_hi)) + return y_i[ind_low]; // No interpolation necessary + + return y_i[ind_low] + + (y_i[ind_hi] - y_i[ind_low]) * + (ind_f - (float)ind_low); // Interpolation + } + + private: + const float *x_i; + size_t lut_size; + float delta; - bool own_y_i; + bool own_y_i; }; -template -inline T clamp( T x, T min, T max ) -{ - if( x < min ) - return min; - if( x > max ) - return max; - return x; +template +inline T clamp(T x, T min, T max) { + if (x < min) return min; + if (x > max) return max; + return x; } /** @@ -245,796 +230,742 @@ * x_i must be at least two elements * y_i must be initialized after creating an object */ -template -class ArrayLUT -{ - const vector x_i; - size_t lut_size; - - bool own_y_i; -public: - vector y_i; - - ArrayLUT( size_t lut_size, const vector &x_i, vector &y_i ) : x_i( x_i ), lut_size( lut_size ) - { - assert( lut_size > 0 ); - - if( y_i.size() == 0 ) { - this->y_i.resize(lut_size); - own_y_i = true; - } else { - this->y_i = y_i; - own_y_i = false; +template +class ArrayLUT { + const vector x_i; + size_t lut_size; + + bool own_y_i; + + public: + vector y_i; + + ArrayLUT(size_t lut_size, const vector &x_i, vector &y_i) + : x_i(x_i), lut_size(lut_size) { + assert(lut_size > 0); + + if (y_i.size() == 0) { + this->y_i.resize(lut_size); + own_y_i = true; + } else { + this->y_i = y_i; + own_y_i = false; + } } - } - ArrayLUT() : x_i( 0 ), y_i(0), lut_size( 0 ) {} + ArrayLUT() : x_i(0), y_i(0), lut_size(0), own_y_i(false) {} - ArrayLUT(const ArrayLUT& other) : x_i( other.x_i ), lut_size( other.lut_size ) - { - this->y_i = new Ty[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(Ty)); - } - - ArrayLUT& operator = (const ArrayLUT& other) - { - if (this != &other) - { - this->lut_size = other.lut_size; - this->x_i = other.x_i; - this->y_i = new Ty[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(Ty)); - } - return *this; - } - - ~ArrayLUT() - { - //if( own_y_i ) - // delete []y_i; - } - - Ty interp( Tx x ) - { - if( (x <= x_i[0]) ) // Out of range checks - return y_i[0]; - if( (x >= x_i[lut_size-1]) ) - return y_i[lut_size-1]; - - // binary search - size_t l = 0, r = lut_size-1; - while( true ) { - size_t m = (l+r)/2; - if( m == l ) break; - if( x < x_i[m] ) - r = m; - else - l = m; + ArrayLUT(const ArrayLUT &other) : x_i(other.x_i), lut_size(other.lut_size) { + this->y_i = new Ty[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(Ty)); } - float alpha = (float)(x - x_i[l])/(float)(x_i[r]-x_i[l]); + ArrayLUT &operator=(const ArrayLUT &other) { + if (this != &other) { + this->lut_size = other.lut_size; + this->x_i = other.x_i; + this->y_i = new Ty[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(Ty)); + } + return *this; + } - return y_i[l] + (Ty)(alpha * (y_i[r]-y_i[l])); - } + ~ArrayLUT() { + // if( own_y_i ) + // delete []y_i; + } + + Ty interp(Tx x) { + if ((x <= x_i[0])) // Out of range checks + return y_i[0]; + if ((x >= x_i[lut_size - 1])) return y_i[lut_size - 1]; + + // binary search + size_t l = 0, r = lut_size - 1; + while (true) { + size_t m = (l + r) / 2; + if (m == l) break; + if (x < x_i[m]) + r = m; + else + l = m; + } + float alpha = (float)(x - x_i[l]) / (float)(x_i[r] - x_i[l]); + return y_i[l] + (Ty)(alpha * (y_i[r] - y_i[l])); + } }; // ================================================ // Percentiles // ================================================ - /** * Compute prctiles using image cummulative histogram, which is less * accurate method but much faster than sorting. */ -template -class Percentiles -{ - Histogram hist; - const size_t bin_n; - size_t d_size; -public: - - /** - * @param data - table with samples - * @param d_size - number of samples - */ - Percentiles( const T *data, size_t d_size ) : - bin_n( 1000 ), d_size( d_size ) // Accuracy 0.1 prctile - { - hist.compute( data, d_size, bin_n, 1, -1, false ); - // Compute cummulative histogram - for( size_t k = 1; k < bin_n; k++ ) - hist.n[k] += hist.n[k-1]; - -// cerr << "d_size: " << d_size << " hist.n: " << hist.n[bin_n-1] << "\n"; - assert( hist.n[bin_n-1] == d_size ); - } - - T prctile( double p ) - { - ArrayLUT lut( hist.bins, hist.n, hist.x ); - - return lut.interp( (size_t)(p*(double)d_size/100.) ); - } +template +class Percentiles { + Histogram hist; + const size_t bin_n; + size_t d_size; + + public: + /** + * @param data - table with samples + * @param d_size - number of samples + */ + Percentiles(const T *data, size_t d_size) + : bin_n(1000), + d_size(d_size) // Accuracy 0.1 prctile + { + hist.compute(data, d_size, bin_n, 1, -1, false); + // Compute cummulative histogram + for (size_t k = 1; k < bin_n; k++) hist.n[k] += hist.n[k - 1]; + // cerr << "d_size: " << d_size << " hist.n: " << hist.n[bin_n-1] << + // "\n"; + assert(hist.n[bin_n - 1] == d_size); + } + T prctile(double p) { + ArrayLUT lut(hist.bins, hist.n, hist.x); + return lut.interp((size_t)(p * (double)d_size / 100.)); + } }; - // ================================================ // Text template file utils // ================================================ -typedef void (*replace_callback)( ostream &out, void *user_data, const char *parameter ); - -class ReplacePattern -{ - -public: - - const char* pattern; - string replace_with; - replace_callback callback; - void *user_data; - - ReplacePattern( const char* pattern, string replace_with ) : - pattern( pattern ), replace_with( replace_with ), callback( NULL ), user_data( NULL) - { - } - - ReplacePattern( const char* pattern, float replace_with_num ) : - pattern( pattern ), callback( NULL ), user_data( NULL) - { - ostringstream num_str; - num_str << replace_with_num; - replace_with = num_str.str(); - } - - ReplacePattern( const char* pattern, int replace_with_num ) : - pattern( pattern ), callback( NULL ), user_data( NULL) - { - ostringstream num_str; - num_str << replace_with_num; - replace_with = num_str.str(); - } - - ReplacePattern( const char* pattern, replace_callback callback, void *user_data = NULL ) : - pattern( pattern ), callback( callback ), user_data( user_data ) - { - } - - ReplacePattern() : pattern( NULL ), callback( NULL ), user_data( NULL) - { - } - - virtual void write_replacement( ostream &out, const char *parameter = NULL ) - { - if( callback != NULL ) - callback( out, user_data, parameter ); - else - out << replace_with; - } - +typedef void (*replace_callback)(ostream &out, void *user_data, + const char *parameter); +class ReplacePattern { + public: + const char *pattern; + string replace_with; + replace_callback callback; + void *user_data; + + ReplacePattern(const char *pattern, string replace_with) + : pattern(pattern), + replace_with(replace_with), + callback(NULL), + user_data(NULL) {} + + ReplacePattern(const char *pattern, float replace_with_num) + : pattern(pattern), callback(NULL), user_data(NULL) { + ostringstream num_str; + num_str << replace_with_num; + replace_with = num_str.str(); + } + + ReplacePattern(const char *pattern, int replace_with_num) + : pattern(pattern), callback(NULL), user_data(NULL) { + ostringstream num_str; + num_str << replace_with_num; + replace_with = num_str.str(); + } + + ReplacePattern(const char *pattern, replace_callback callback, + void *user_data = NULL) + : pattern(pattern), callback(callback), user_data(user_data) {} + + ReplacePattern() : pattern(NULL), callback(NULL), user_data(NULL) {} + + virtual void write_replacement(ostream &out, const char *parameter = NULL) { + if (callback != NULL) + callback(out, user_data, parameter); + else + out << replace_with; + } }; -void create_from_template( ostream &outfs, const char *template_file_name, - ReplacePattern *pattern_list ) -{ - ifstream infs( template_file_name ); - if( !infs.good() ) { - ostringstream error_message; - error_message << "Cannot open '" << template_file_name << "' for reading"; - throw pfs::Exception( error_message.str().c_str() ); - } - - - const int MAX_LINE_LENGTH = 2048; -// int lines = 0; - while( true ) { - char line[MAX_LINE_LENGTH]; - infs.getline( line, MAX_LINE_LENGTH ); - - if( !infs.good() ) - break; - - string line_str( line ); - int pos = 0; - - while( true ) { - size_t find_pos = line_str.find_first_of( '@', pos ); - if( find_pos == string::npos ) { - outfs << line_str.substr( pos, string::npos ); - break; - } - - bool replaced = false; - size_t end_marker = line_str.find_first_of( "@[", find_pos+1 ); - if( end_marker != string::npos ) { - - for( int k = 0; pattern_list[k].pattern != NULL; k++ ) - { - if( line_str.compare( find_pos+1, end_marker-find_pos-1, pattern_list[k].pattern ) == 0 ) { - outfs << line_str.substr( pos, find_pos-pos ); - - string parameter; - if( line_str[end_marker] == '[' ) { - size_t param_endmarker = line_str.find_first_of( ']', end_marker+1 ); - if( param_endmarker == string::npos ) - throw pfs::Exception( "Non-closed bracker in the replacement keyword" ); - parameter = line_str.substr( end_marker+1, param_endmarker-end_marker-1 ); - end_marker = param_endmarker+1; +void create_from_template(ostream &outfs, const char *template_file_name, + ReplacePattern *pattern_list) { + ifstream infs(template_file_name); + if (!infs.good()) { + ostringstream error_message; + error_message << "Cannot open '" << template_file_name + << "' for reading"; + throw pfs::Exception(error_message.str().c_str()); + } + + const int MAX_LINE_LENGTH = 2048; + // int lines = 0; + while (true) { + char line[MAX_LINE_LENGTH]; + infs.getline(line, MAX_LINE_LENGTH); + + if (!infs.good()) break; + + string line_str(line); + int pos = 0; + + while (true) { + size_t find_pos = line_str.find_first_of('@', pos); + if (find_pos == string::npos) { + outfs << line_str.substr(pos, string::npos); + break; } - pattern_list[k].write_replacement( outfs, parameter.empty() ? NULL : parameter.c_str() ); - pos = end_marker + 1; - replaced = true; - break; - } + bool replaced = false; + size_t end_marker = line_str.find_first_of("@[", find_pos + 1); + if (end_marker != string::npos) { + for (int k = 0; pattern_list[k].pattern != NULL; k++) { + if (line_str.compare(find_pos + 1, + end_marker - find_pos - 1, + pattern_list[k].pattern) == 0) { + outfs << line_str.substr(pos, find_pos - pos); + + string parameter; + if (line_str[end_marker] == '[') { + size_t param_endmarker = + line_str.find_first_of(']', end_marker + 1); + if (param_endmarker == string::npos) + throw pfs::Exception( + "Non-closed bracker in " + "the replacement keyword"); + parameter = line_str.substr( + end_marker + 1, + param_endmarker - end_marker - 1); + end_marker = param_endmarker + 1; + } + + pattern_list[k].write_replacement( + outfs, + parameter.empty() ? NULL : parameter.c_str()); + pos = end_marker + 1; + replaced = true; + break; + } + } + } + if (!replaced) { + outfs << line_str.substr(pos, find_pos - pos + 1); + pos = find_pos + 1; + } } - } - if( !replaced ) { - outfs << line_str.substr( pos, find_pos-pos+1 ); - pos = find_pos+1; - } - + outfs << "\n"; } - - - outfs << "\n"; - - } - } -void create_from_template( const char *output_file_name, const char *template_file_name, - ReplacePattern *pattern_list ) -{ - ofstream outfs( output_file_name ); - if( !outfs.good() ) { - ostringstream error_message; - error_message << "Cannot open '" << output_file_name << "' for writing"; - throw pfs::Exception( error_message.str().c_str() ); - } - try { - create_from_template( outfs, template_file_name, pattern_list ); - } - catch( pfs::Exception &e) { - throw; - } +void create_from_template(const char *output_file_name, + const char *template_file_name, + ReplacePattern *pattern_list) { + ofstream outfs(output_file_name); + if (!outfs.good()) { + ostringstream error_message; + error_message << "Cannot open '" << output_file_name << "' for writing"; + throw pfs::Exception(error_message.str().c_str()); + } + try { + create_from_template(outfs, template_file_name, pattern_list); + } catch (pfs::Exception &e) { + throw; + } } - - - // ================================================ // Read and parse CVS files // ================================================ +class CSVTable { + public: + float **data; + int columns, rows; -class CSVTable -{ -public: - - float **data; - int columns, rows; - - CSVTable() : data( NULL ), columns( 0), rows( 0 ) - { - } + CSVTable() : data(NULL), columns(0), rows(0) {} + ~CSVTable() { free(); } - ~CSVTable() - { - free(); - } + void free() { + if (data == NULL) return; - void free() - { - if( data == NULL ) - return; + for (int k = 0; k < columns; k++) delete[] data[k]; - for( int k = 0; k < columns; k++ ) - delete [] data[k]; + delete[] data; - delete []data; - - data = NULL; - } - - - void read( const char *file_name, int columns ) - { - free(); - - this->columns = columns; - - ifstream ifs( file_name ); - - if( !ifs.is_open() ) { - string full_message( "Cannot open file: " ); - full_message += file_name; - throw pfs::Exception( full_message.c_str() ); + data = NULL; } - list value_list; + void read(const char *file_name, int columns) { + free(); - const int MAX_LINE_LENGTH = 1024; - int lines = 0; - while( 1 ) { - char line[MAX_LINE_LENGTH]; - ifs.getline( line, MAX_LINE_LENGTH ); + this->columns = columns; - if( !ifs.good() ) - break; + ifstream ifs(file_name); - string line_str( line ); - int pos = 0; - for( int k=0; k < columns; k++ ) { - // Skip white spaces - while( line_str[pos] == ' ' || line_str[pos] == '\t' ) pos++; - size_t new_pos = line_str.find_first_of( ',', pos ); - size_t len; - if( new_pos == string::npos ) { - if( k != columns-1 ) { - string full_message( "Missing column data in the file: " ); + if (!ifs.is_open()) { + string full_message("Cannot open file: "); full_message += file_name; - throw pfs::Exception( full_message.c_str() ); - } - len = string::npos; - } else - len = new_pos-pos; - - float value; - if( len == 0 ) { - value = numeric_limits::quiet_NaN(); - } else { - string token = line_str.substr( pos, len ); - const char *str_beg = token.c_str(); - char *str_end; - //cerr << "token: " << str_beg << "\n"; - value = strtof( str_beg, &str_end ); - if( str_beg == str_end ) { - ostringstream error_message; - error_message << "Error parsing line " << lines+1 << " of " << file_name << "\n"; - throw pfs::Exception( error_message.str().c_str() ); - } + throw pfs::Exception(full_message.c_str()); } + list value_list; - value_list.push_back( value ); + const int MAX_LINE_LENGTH = 1024; + int lines = 0; + while (1) { + char line[MAX_LINE_LENGTH]; + ifs.getline(line, MAX_LINE_LENGTH); + + if (!ifs.good()) break; + + string line_str(line); + int pos = 0; + for (int k = 0; k < columns; k++) { + // Skip white spaces + while (line_str[pos] == ' ' || line_str[pos] == '\t') pos++; + size_t new_pos = line_str.find_first_of(',', pos); + size_t len; + if (new_pos == string::npos) { + if (k != columns - 1) { + string full_message( + "Missing column data in the file: "); + full_message += file_name; + throw pfs::Exception(full_message.c_str()); + } + len = string::npos; + } else + len = new_pos - pos; + + float value; + if (len == 0) { + value = numeric_limits::quiet_NaN(); + } else { + string token = line_str.substr(pos, len); + const char *str_beg = token.c_str(); + char *str_end; + // cerr << "token: " << str_beg << "\n"; + value = strtof(str_beg, &str_end); + if (str_beg == str_end) { + ostringstream error_message; + error_message << "Error parsing line " << lines + 1 + << " of " << file_name << "\n"; + throw pfs::Exception(error_message.str().c_str()); + } + } - pos = new_pos+1; - } + value_list.push_back(value); - lines++; - } + pos = new_pos + 1; + } - float **table = new float*[columns]; - for( int c=0; c < columns; c++ ) - table[c] = new float[lines]; + lines++; + } - for( int l=0; l < lines; l++ ) - for( int c=0; c < columns; c++ ) { - table[c][l] = value_list.front(); - value_list.pop_front(); - } + float **table = new float *[columns]; + for (int c = 0; c < columns; c++) table[c] = new float[lines]; - data = table; - this->rows = lines; - } + for (int l = 0; l < lines; l++) + for (int c = 0; c < columns; c++) { + table[c][l] = value_list.front(); + value_list.pop_front(); + } + data = table; + this->rows = lines; + } }; - // ================================================ // HDR HTML code // ================================================ - -void HDRHTMLSet::add_image( int width, int height, float *R, float *G, float *B, - float *Y, - const char *base_name, const char *out_dir, int quality, bool verbose ) -{ - - //THIS CAUSED ME A BIG HEADACHE!!! - string user_locale = locale("").name(); - locale::global(locale::classic()); - - const int pixels = width*height; - const int basis_no = quality; - - // Load LUT for the basis tone-curves - ostringstream lut_filename; -#if defined (WIN32) || defined (__APPLE__) - QString h_t_b = HDRHTMLDIR; - h_t_b.append("\\hdrhtml_t_b"); - lut_filename << h_t_b.toStdString().c_str() << basis_no+1 << ".csv"; +void HDRHTMLSet::add_image(int width, int height, float *R, float *G, float *B, + float *Y, const char *base_name, const char *out_dir, + int quality, bool verbose) { + // THIS CAUSED ME A BIG HEADACHE!!! + string user_locale = locale("").name(); + locale::global(locale::classic()); + + const int pixels = width * height; + const int basis_no = quality; + + // Load LUT for the basis tone-curves + ostringstream lut_filename; +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) + QString h_t_b = HDRHTMLDIR; + h_t_b.append("\\hdrhtml_t_b"); + lut_filename << h_t_b.toStdString().c_str() << basis_no + 1 << ".csv"; #else - lut_filename << HDRHTMLDIR "/hdrhtml_t_b" << basis_no+1 << ".csv"; + lut_filename << HDRHTMLDIR "/hdrhtml_t_b" << basis_no + 1 << ".csv"; #endif - CSVTable basis_table; - try { - basis_table.read( lut_filename.str().c_str(), basis_no+1 ); - } - catch (pfs::Exception &e) { - throw; - } - // Transform the first row (luminance factors) to the log domain - for( int k = 0; k < basis_table.rows; k++ ) { - basis_table.data[0][k] = log2f( basis_table.data[0][k] ); - } - -// Fix zero and negative values in the image, convert to log2 space, find min and max values - float img_min = numeric_limits::max(); - float img_max = numeric_limits::min(); - { - float *arrays[] = { R, G, B, Y }; - - int k; - - for( k = 0; k < 4; k++ ) { - float *x = arrays[k]; - float min_val = numeric_limits::max(), max_val = numeric_limits::min(); - for( int i=0; i < pixels; i++ ) { - if( x[i] < min_val && x[i] > 0) - min_val = x[i]; - if( x[i] > max_val ) - max_val = x[i]; - } - img_max = max( img_max, log2f(max_val) ); - img_min = min( img_min, log2f(min_val) ); - - for( int i=0; i < pixels; i++ ) { - if( x[i] < min_val ) - x[i] = log2f(min_val); - else - x[i] = log2f(x[i]); - } + CSVTable basis_table; + try { + basis_table.read(lut_filename.str().c_str(), basis_no + 1); + } catch (pfs::Exception &e) { + throw; + } + // Transform the first row (luminance factors) to the log domain + for (int k = 0; k < basis_table.rows; k++) { + basis_table.data[0][k] = log2f(basis_table.data[0][k]); } - } - Percentiles prc( Y, pixels ); - img_min = prc.prctile( 0.1 ); - img_max = prc.prctile( 99.9 ); - - img_min -= 4; // give extra room for brightenning - // how many 8-fstop segments we need to cover the DR - int f8_stops = ceil((img_max-img_min)/8); - - // start with this f-stop - float l_start = img_min + (img_max-img_min-f8_stops*8)/2; - - float l_med = prc.prctile( 50 ); - float best_exp = round(l_med-l_start-4); - -// pix_per_fstop = 25; - -// % generate image histogram - - const int hist_height = 36; - int hist_width = width; -// float hist_img_sz = [36 size(img,2)]; - float hist_fstops = (float)hist_width / (float)pix_per_fstop; - float hist_start = (img_max-img_min-hist_fstops)/2; - { - - Histogram hist; - hist.compute( Y, pixels, hist_width, img_min+hist_start, img_min+hist_start+hist_fstops ); - - unsigned short *hist_buffer = new unsigned short[hist_width*hist_height*3]; - float hist_n_max = -1; - for( int k = 0; k < hist_width; k++ ) - hist_n_max = max( hist_n_max, (float)hist.n[k] ); - - for( int k = 0; k < hist_width; k++ ) { - float top = hist_height - round((float)hist.n[k]/hist_n_max * hist_height); - for( int r = 0; r < hist_height; r++ ) { - hist_buffer[(r*hist_width+k)*3+0] = 0; - hist_buffer[(r*hist_width+k)*3+1] = (r>=top ? (1<<16) -1 : 0); - hist_buffer[(r*hist_width+k)*3+2] = 0; - } - } - - unsigned char *hist_buffer_c = new unsigned char[hist_width*hist_height*3]; - for( int h = 0; h < hist_width*hist_height*3; h++ ) { - float v = 255.f * (hist_buffer[h]/65535.f); - hist_buffer_c[h] = (unsigned char)v; - } - -// tick_fstops = (floor(hist_l(end))-ceil(hist_l(1))); -// ticks = round((ceil(hist_l(1))-hist_l(1))*pix_per_fstop) + (1:tick_fstops)*pix_per_fstop; -// hist_img(1:5,ticks,1:2) = 0.5; -// hist_img(end-4:end,ticks,1:2) = 0.5; -// plot_name = sprintf( '%s_hist.png', base_name ); -// imwrite( hist_img, plot_name ); - - QImage hist_image(hist_buffer_c, hist_width, hist_height, QImage::Format_RGB888); - ostringstream img_filename; - if( out_dir != NULL ) - img_filename << out_dir << "/"; - if( image_dir != NULL ) - img_filename << image_dir << "/"; - img_filename << base_name << "_hist.png"; - if (verbose) - cout << QObject::tr("Writing: ").toStdString() << img_filename.str() << endl; - hist_image.save( QString::fromStdString(img_filename.str())); + // Fix zero and negative values in the image, convert to log2 space, find + // min + // and max values + float img_min = numeric_limits::max(); + float img_max = numeric_limits::min(); + { + float *arrays[] = {R, G, B, Y}; - delete []hist_buffer; - } + int k; - // generate basis images + for (k = 0; k < 4; k++) { + float *x = arrays[k]; + float min_val = numeric_limits::max(), + max_val = numeric_limits::min(); + for (int i = 0; i < pixels; i++) { + if (x[i] < min_val && x[i] > 0) min_val = x[i]; + if (x[i] > max_val) max_val = x[i]; + } + img_max = max(img_max, log2f(max_val)); + img_min = min(img_min, log2f(min_val)); - //unsigned short *imgBuffer = - //new unsigned short[pixels*3]; - vector imgBuffer(pixels*3); - vector imgBuffer_c(pixels*3); - for( int k=1; k <= f8_stops+1; k++ ) { + for (int i = 0; i < pixels; i++) { + if (x[i] < min_val) + x[i] = log2f(min_val); + else + x[i] = log2f(x[i]); + } + } + } + Percentiles prc(Y, pixels); + img_min = prc.prctile(0.1); + img_max = prc.prctile(99.9); - float max_value = (float)numeric_limits::max(); //(1<<16) -1; + img_min -= 4; // give extra room for brightenning + // how many 8-fstop segments we need to cover the DR + int f8_stops = ceil((img_max - img_min) / 8); - float exp_multip = log2f(1/powf( 2, l_start + k*8 )); + // start with this f-stop + float l_start = img_min + (img_max - img_min - f8_stops * 8) / 2; - int max_basis = basis_no; - if( k == f8_stops+1 ) // Do only one shared basis for the last 8-fstop segment - max_basis = 1; + float l_med = prc.prctile(50); + float best_exp = round(l_med - l_start - 4); - for( int b=0; b < max_basis; b++ ) { - UniformArrayLUT basis_lut( basis_table.rows, basis_table.data[0], basis_table.data[b+1] ); + // pix_per_fstop = 25; - int i = 0; - for( int pix = 0; pix < pixels; pix++ ) { + // % generate image histogram - float rgb[3]; - rgb[0] = R[pix]; - rgb[1] = G[pix]; - rgb[2] = B[pix]; + const int hist_height = 36; + int hist_width = width; + // float hist_img_sz = [36 size(img,2)]; + float hist_fstops = (float)hist_width / (float)pix_per_fstop; + float hist_start = (img_max - img_min - hist_fstops) / 2; + { + Histogram hist; + hist.compute(Y, pixels, hist_width, img_min + hist_start, + img_min + hist_start + hist_fstops); + + unsigned short *hist_buffer = + new unsigned short[hist_width * hist_height * 3]; + float hist_n_max = -1; + for (int k = 0; k < hist_width; k++) + hist_n_max = max(hist_n_max, (float)hist.n[k]); + + for (int k = 0; k < hist_width; k++) { + float top = hist_height - + round((float)hist.n[k] / hist_n_max * hist_height); + for (int r = 0; r < hist_height; r++) { + hist_buffer[(r * hist_width + k) * 3 + 0] = 0; + hist_buffer[(r * hist_width + k) * 3 + 1] = + (r >= top ? (1 << 16) - 1 : 0); + hist_buffer[(r * hist_width + k) * 3 + 2] = 0; + } + } - for( int c=0; c < 3; c++ ) { - float exposure_comp_v = rgb[c] + exp_multip; - float v = (basis_lut.interp(exposure_comp_v)*max_value); - imgBuffer[i++] = v; + unsigned char *hist_buffer_c = + new unsigned char[hist_width * hist_height * 3]; + for (int h = 0; h < hist_width * hist_height * 3; h++) { + float v = 255.f * (hist_buffer[h] / 65535.f); + hist_buffer_c[h] = (unsigned char)v; } - } - for( int pix = 0; pix < pixels*3; pix++ ) { - float r = imgBuffer[pix]; - imgBuffer_c[pix] = (unsigned char)r; - } - QImage imImage(imgBuffer_c.data(), width, height, QImage::Format_RGB888); - ostringstream img_filename; - if( out_dir != NULL ) - img_filename << out_dir << "/"; - if( image_dir != NULL ) - img_filename << image_dir << "/"; - img_filename << base_name << '_' << k-1 << '_' << b+1 << ".jpg"; - if (verbose) - cout << QObject::tr("Writing: ").toStdString() << img_filename.str() << endl; - imImage.save( QString::fromStdString(img_filename.str())); - } + // tick_fstops = (floor(hist_l(end))-ceil(hist_l(1))); + // ticks = round((ceil(hist_l(1))-hist_l(1))*pix_per_fstop) + + // (1:tick_fstops)*pix_per_fstop; + // hist_img(1:5,ticks,1:2) = 0.5; + // hist_img(end-4:end,ticks,1:2) = 0.5; + // plot_name = sprintf( '%s_hist.png', base_name ); + // imwrite( hist_img, plot_name ); + + QImage hist_image(hist_buffer_c, hist_width, hist_height, + QImage::Format_RGB888); + ostringstream img_filename; + if (out_dir != NULL) img_filename << out_dir << "/"; + if (image_dir != NULL) img_filename << image_dir << "/"; + img_filename << base_name << "_hist.png"; + if (verbose) + cout << QObject::tr("Writing: ").toStdString() << img_filename.str() + << endl; + hist_image.save(QString::fromStdString(img_filename.str())); + + delete[] hist_buffer; + } + + // generate basis images + + // unsigned short *imgBuffer = + // new unsigned short[pixels*3]; + vector imgBuffer(pixels * 3); + vector imgBuffer_c(pixels * 3); + for (int k = 1; k <= f8_stops + 1; k++) { + float max_value = + (float)numeric_limits::max(); //(1<<16) -1; + + float exp_multip = log2f(1 / powf(2, l_start + k * 8)); + + int max_basis = basis_no; + if (k == + f8_stops + + 1) // Do only one shared basis for the last 8-fstop segment + max_basis = 1; + + for (int b = 0; b < max_basis; b++) { + UniformArrayLUT basis_lut(basis_table.rows, basis_table.data[0], + basis_table.data[b + 1]); + + int i = 0; + for (int pix = 0; pix < pixels; pix++) { + float rgb[3]; + rgb[0] = R[pix]; + rgb[1] = G[pix]; + rgb[2] = B[pix]; + + for (int c = 0; c < 3; c++) { + float exposure_comp_v = rgb[c] + exp_multip; + float v = (basis_lut.interp(exposure_comp_v) * max_value); + imgBuffer[i++] = v; + } + } + for (int pix = 0; pix < pixels * 3; pix++) { + float r = imgBuffer[pix]; + imgBuffer_c[pix] = (unsigned char)r; + } + QImage imImage(imgBuffer_c.data(), width, height, + QImage::Format_RGB888); - } + ostringstream img_filename; + if (out_dir != NULL) img_filename << out_dir << "/"; + if (image_dir != NULL) img_filename << image_dir << "/"; + img_filename << base_name << '_' << k - 1 << '_' << b + 1 << ".jpg"; + if (verbose) + cout << QObject::tr("Writing: ").toStdString() + << img_filename.str() << endl; + imImage.save(QString::fromStdString(img_filename.str())); + } + } - HDRHTMLImage new_image( base_name, width, height ); + HDRHTMLImage new_image(base_name, width, height); - new_image.hist_width = hist_width; - new_image.f8_stops = f8_stops; - new_image.f_step_res = f_step_res; - new_image.basis = basis_no; - new_image.shared_basis = 1; - new_image.pix_per_fstop = pix_per_fstop; - new_image.hist_start = hist_start; - new_image.hist_width = hist_width; - new_image.best_exp = best_exp; + new_image.hist_width = hist_width; + new_image.f8_stops = f8_stops; + new_image.f_step_res = f_step_res; + new_image.basis = basis_no; + new_image.shared_basis = 1; + new_image.pix_per_fstop = pix_per_fstop; + new_image.hist_start = hist_start; + new_image.hist_width = hist_width; + new_image.best_exp = best_exp; - image_list.push_back( new_image ); + image_list.push_back(new_image); - locale::global(locale(user_locale.c_str())); + locale::global(locale(user_locale.c_str())); } -void print_image_objects( ostream &out, void *user_data, const char *parameter ); -void print_cf_table( ostream &out, void *user_data, const char *parameter ); -void print_image_htmlcode( ostream &out, void *user_data, const char *parameter ); - -void HDRHTMLSet::generate_webpage( const char *page_template, const char *image_template, - const char *out_dir, const char *object_output, const char *html_output, bool verbose) -{ - if( image_list.empty() ) - return; - - ostringstream out_file_name; - if (out_dir != NULL) - out_file_name << out_dir << "/"; - if( page_name == NULL ) - out_file_name << image_list.front().base_name << ".html"; - else - out_file_name << page_name; - - // Load the table of the opacity coeffcients - ostringstream lut_filename; -#if defined (WIN32) || defined (__APPLE__) - QString h_c_b = HDRHTMLDIR; - h_c_b.append("\\hdrhtml_c_b"); - lut_filename << h_c_b.toStdString().c_str() << image_list.front().basis+1 << ".csv"; +void print_image_objects(ostream &out, void *user_data, const char *parameter); +void print_cf_table(ostream &out, void *user_data, const char *parameter); +void print_image_htmlcode(ostream &out, void *user_data, const char *parameter); + +void HDRHTMLSet::generate_webpage(const char *page_template, + const char *image_template, + const char *out_dir, + const char *object_output, + const char *html_output, bool verbose) { + if (image_list.empty()) return; + + ostringstream out_file_name; + if (out_dir != NULL) out_file_name << out_dir << "/"; + if (page_name == NULL) + out_file_name << image_list.front().base_name << ".html"; + else + out_file_name << page_name; + + // Load the table of the opacity coeffcients + ostringstream lut_filename; +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) + QString h_c_b = HDRHTMLDIR; + h_c_b.append("\\hdrhtml_c_b"); + lut_filename << h_c_b.toStdString().c_str() << image_list.front().basis + 1 + << ".csv"; #else - lut_filename << HDRHTMLDIR "/hdrhtml_c_b" << image_list.front().basis+1 << ".csv"; + lut_filename << HDRHTMLDIR "/hdrhtml_c_b" << image_list.front().basis + 1 + << ".csv"; #endif - CSVTable coeff_table; - coeff_table.read( lut_filename.str().c_str(), image_list.front().basis+1 ); + CSVTable coeff_table; + coeff_table.read(lut_filename.str().c_str(), image_list.front().basis + 1); - ReplacePattern replace_list[] = { - ReplacePattern( "cf_array_def", print_cf_table, &coeff_table ), - ReplacePattern( "hdr_img_def", print_image_objects, this ), - ReplacePattern( "image_htmlcode", print_image_htmlcode, this ), - ReplacePattern( "title", page_name == NULL ? "HDRHTML viewer" : page_name ), - ReplacePattern( "version", hdrhtml_version ), - ReplacePattern() - }; - - this->image_template = image_template; - try { - create_from_template( out_file_name.str().c_str(), page_template, replace_list ); - } - catch( pfs::Exception &e) { - throw; - } - - if( object_output != NULL ) { - ofstream oofs( object_output ); - if( !oofs.good() ) { - ostringstream error_message; - error_message << "Cannot open '" << object_output << "' for writing"; - throw pfs::Exception( error_message.str().c_str() ); - } - print_image_objects( oofs, this, NULL ); - } - - if (verbose) - cout << QObject::tr("Writing: ").toStdString() << out_file_name.str().c_str() << endl; - - if( html_output != NULL ) { - ofstream hofs( html_output ); - if( !hofs.good() ) { - ostringstream error_message; - error_message << "Cannot open '" << html_output << "' for writing"; - throw pfs::Exception( error_message.str().c_str() ); - } + ReplacePattern replace_list[] = { + ReplacePattern("cf_array_def", print_cf_table, &coeff_table), + ReplacePattern("hdr_img_def", print_image_objects, this), + ReplacePattern("image_htmlcode", print_image_htmlcode, this), + ReplacePattern("title", + page_name == NULL ? "HDRHTML viewer" : page_name), + ReplacePattern("version", hdrhtml_version), + ReplacePattern()}; + + this->image_template = image_template; try { - print_image_htmlcode( hofs, this, NULL ); - } - catch( pfs::Exception &e) { + create_from_template(out_file_name.str().c_str(), page_template, + replace_list); + } catch (pfs::Exception &e) { throw; } - } + if (object_output != NULL) { + ofstream oofs(object_output); + if (!oofs.good()) { + ostringstream error_message; + error_message << "Cannot open '" << object_output + << "' for writing"; + throw pfs::Exception(error_message.str().c_str()); + } + print_image_objects(oofs, this, NULL); + } + + if (verbose) + cout << QObject::tr("Writing: ").toStdString() + << out_file_name.str().c_str() << endl; + + if (html_output != NULL) { + ofstream hofs(html_output); + if (!hofs.good()) { + ostringstream error_message; + error_message << "Cannot open '" << html_output << "' for writing"; + throw pfs::Exception(error_message.str().c_str()); + } + try { + print_image_htmlcode(hofs, this, NULL); + } catch (pfs::Exception &e) { + throw; + } + } } -void print_image_objects( ostream &out, void *user_data, const char *parameter ) -{ - HDRHTMLSet *hdrhtml_set = static_cast(user_data); - - list::iterator it; - for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); ++it ) { - string obj_name( "hdr_" ); - obj_name.append( it->base_name ); - - out << obj_name << " = new Object();\n"; - out << obj_name << ".width = " << it->width << ";\n"; - out << obj_name << ".height = " << it->height << ";\n"; - out << obj_name << ".f8_stops = " << it->f8_stops << ";\n"; - out << obj_name << ".f_step_res = " << it->f_step_res << ";\n"; - out << obj_name << ".base_name = \"" << it->base_name << "\";\n"; - if( hdrhtml_set->image_dir==NULL ) - out << obj_name << ".image_dir = \"\";\n"; - else - out << obj_name << ".image_dir = \"" << hdrhtml_set->image_dir << "/\";\n"; - out << obj_name << ".basis = " << it->basis << ";\n"; - out << obj_name << ".shared_basis = " << it->shared_basis << ";\n"; - out << obj_name << ".pix_per_fstop = " << it->pix_per_fstop << ";\n"; - out << obj_name << ".hist_start = " << it->hist_start << ";\n"; - out << obj_name << ".hist_width = " << it->hist_width << ";\n"; - out << obj_name << ".exposure = " << it->best_exp << ";\n"; - out << obj_name << ".best_exp = " << it->best_exp << ";\n\n"; - } +void print_image_objects(ostream &out, void *user_data, const char *parameter) { + HDRHTMLSet *hdrhtml_set = static_cast(user_data); + list::iterator it; + for (it = hdrhtml_set->image_list.begin(); + it != hdrhtml_set->image_list.end(); ++it) { + string obj_name("hdr_"); + obj_name.append(it->base_name); + + out << obj_name << " = new Object();\n"; + out << obj_name << ".width = " << it->width << ";\n"; + out << obj_name << ".height = " << it->height << ";\n"; + out << obj_name << ".f8_stops = " << it->f8_stops << ";\n"; + out << obj_name << ".f_step_res = " << it->f_step_res << ";\n"; + out << obj_name << ".base_name = \"" << it->base_name << "\";\n"; + if (hdrhtml_set->image_dir == NULL) + out << obj_name << ".image_dir = \"\";\n"; + else + out << obj_name << ".image_dir = \"" << hdrhtml_set->image_dir + << "/\";\n"; + out << obj_name << ".basis = " << it->basis << ";\n"; + out << obj_name << ".shared_basis = " << it->shared_basis << ";\n"; + out << obj_name << ".pix_per_fstop = " << it->pix_per_fstop << ";\n"; + out << obj_name << ".hist_start = " << it->hist_start << ";\n"; + out << obj_name << ".hist_width = " << it->hist_width << ";\n"; + out << obj_name << ".exposure = " << it->best_exp << ";\n"; + out << obj_name << ".best_exp = " << it->best_exp << ";\n\n"; + } } -void print_image_htmlcode( ostream &out, HDRHTMLSet *hdrhtml_set, const HDRHTMLImage &it ) -{ - string obj_name( "hdr_" ); - obj_name.append( it.base_name ); +void print_image_htmlcode(ostream &out, HDRHTMLSet *hdrhtml_set, + const HDRHTMLImage &it) { + string obj_name("hdr_"); + obj_name.append(it.base_name); ostringstream img_dir; - if( hdrhtml_set->image_dir != NULL ) - img_dir << hdrhtml_set->image_dir << "/"; + if (hdrhtml_set->image_dir != NULL) + img_dir << hdrhtml_set->image_dir << "/"; ReplacePattern replace_list[] = { - ReplacePattern( "hdr_img_width", it.width ), - ReplacePattern( "hdr_img_height", it.height ), - ReplacePattern( "img_dir", img_dir.str() ), - ReplacePattern( "hist_width", it.hist_width ), - ReplacePattern( "base_name", it.base_name ), - ReplacePattern( "help_mark_pos", it.hist_width-12 ), - ReplacePattern( "hdr_img_object", obj_name ), - ReplacePattern( "version", hdrhtml_version ), - ReplacePattern() - }; + ReplacePattern("hdr_img_width", it.width), + ReplacePattern("hdr_img_height", it.height), + ReplacePattern("img_dir", img_dir.str()), + ReplacePattern("hist_width", it.hist_width), + ReplacePattern("base_name", it.base_name), + ReplacePattern("help_mark_pos", it.hist_width - 12), + ReplacePattern("hdr_img_object", obj_name), + ReplacePattern("version", hdrhtml_version), + ReplacePattern()}; try { - create_from_template( out, hdrhtml_set->image_template, replace_list ); - } - catch( pfs::Exception &e) { + create_from_template(out, hdrhtml_set->image_template, replace_list); + } catch (pfs::Exception &e) { throw; } } -void print_image_htmlcode( ostream &out, void *user_data, const char *parameter ) -{ - HDRHTMLSet *hdrhtml_set = static_cast(user_data); - - if( parameter != NULL ) { - - list::iterator it; - for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); ++it ) { - if( it->base_name.compare( parameter ) == 0 ) - break; - } - if( it == hdrhtml_set->image_list.end() ) - { - cerr << "Warning: image '" << parameter << "' not found\n"; - throw; - } - try { - print_image_htmlcode( out, hdrhtml_set, *it ); - } - catch( pfs::Exception &e) { - throw; - } - - } else { - - list::iterator it; - for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); ++it ) { - - try { - print_image_htmlcode( out, hdrhtml_set, *it ); - } - catch( pfs::Exception &e) { - throw; - } +void print_image_htmlcode(ostream &out, void *user_data, + const char *parameter) { + HDRHTMLSet *hdrhtml_set = static_cast(user_data); + + if (parameter != NULL) { + list::iterator it; + for (it = hdrhtml_set->image_list.begin(); + it != hdrhtml_set->image_list.end(); ++it) { + if (it->base_name.compare(parameter) == 0) break; + } + if (it == hdrhtml_set->image_list.end()) { + cerr << "Warning: image '" << parameter << "' not found\n"; + throw pfs::Exception("HdrHML: image parameter not found"); + } + try { + print_image_htmlcode(out, hdrhtml_set, *it); + } catch (pfs::Exception &e) { + throw; + } + } else { + list::iterator it; + for (it = hdrhtml_set->image_list.begin(); + it != hdrhtml_set->image_list.end(); ++it) { + try { + print_image_htmlcode(out, hdrhtml_set, *it); + } catch (pfs::Exception &e) { + throw; + } + } } - } - } -void print_cf_table( ostream &out, void *user_data, const char *parameter ) -{ - CSVTable *cf = static_cast(user_data); - - out << "var cf = new Array(\n"; - for( int b=0; b < cf->rows; b++ ) { - out << " new Array("; - for( int ex=0; ex < cf->columns; ex++ ) { - out << ' ' << cf->data[ex][b]; - if( ex != cf->columns-1 ) - out << ','; - } - out << ')'; - if( b != cf->rows-1 ) - out << ','; - out << "\n"; - } - out << ");\n"; +void print_cf_table(ostream &out, void *user_data, const char *parameter) { + CSVTable *cf = static_cast(user_data); + out << "var cf = new Array(\n"; + for (int b = 0; b < cf->rows; b++) { + out << " new Array("; + for (int ex = 0; ex < cf->columns; ex++) { + out << ' ' << cf->data[ex][b]; + if (ex != cf->columns - 1) out << ','; + } + out << ')'; + if (b != cf->rows - 1) out << ','; + out << "\n"; + } + out << ");\n"; } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrHTML/hdrhtml.h luminance-hdr-2.6.0/src/HdrHTML/hdrhtml.h --- luminance-hdr-2.5.1+dfsg/src/HdrHTML/hdrhtml.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrHTML/hdrhtml.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,56 +28,58 @@ #ifndef HDRHTML_H #define HDRHTML_H -#include #include +#include namespace hdrhtml { -class HDRHTMLImage -{ -public: - std::string base_name; - int width, height; - int f8_stops; - int f_step_res; - int basis; - int shared_basis; - int pix_per_fstop; - float hist_start; - int hist_width; - float exposure; - float best_exp; - - HDRHTMLImage( const char *base_name, int width, int height ) : - base_name( base_name ), width( width ), height( height ), - f8_stops( 0 ), f_step_res(0), basis( 0 ), shared_basis( 0 ), pix_per_fstop(0), hist_start( 0 ), hist_width( 0 ), - exposure( 0 ), best_exp( 0 ) - { - } - +class HDRHTMLImage { + public: + std::string base_name; + int width, height; + int f8_stops; + int f_step_res; + int basis; + int shared_basis; + int pix_per_fstop; + float hist_start; + int hist_width; + float exposure; + float best_exp; + + HDRHTMLImage(const char *base_name, int width, int height) + : base_name(base_name), + width(width), + height(height), + f8_stops(0), + f_step_res(0), + basis(0), + shared_basis(0), + pix_per_fstop(0), + hist_start(0), + hist_width(0), + exposure(0), + best_exp(0) {} }; -class HDRHTMLSet -{ - const char *page_name; -public: - const char *image_dir; - const char *image_template; - std::list image_list; - -HDRHTMLSet( const char *page_name, const char *image_dir = NULL ) : - page_name( page_name ), image_dir( image_dir ), image_template( NULL ) - { - } - - - void add_image( int width, int height, float *R, float *G, float *B, - float *Y, - const char *base_name, const char *out_dir, int quality, bool verbose ); +class HDRHTMLSet { + const char *page_name; - void generate_webpage( const char *page_template, const char *image_template, - const char *out_dir, const char *object_output = NULL, const char *html_output = NULL, bool verbose = false); + public: + const char *image_dir; + const char *image_template; + std::list image_list; + + HDRHTMLSet(const char *page_name, const char *image_dir = NULL) + : page_name(page_name), image_dir(image_dir), image_template(NULL) {} + + void add_image(int width, int height, float *R, float *G, float *B, + float *Y, const char *base_name, const char *out_dir, + int quality, bool verbose); + + void generate_webpage(const char *page_template, const char *image_template, + const char *out_dir, const char *object_output = NULL, + const char *html_output = NULL, bool verbose = false); }; - } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrHTML/pfsouthdrhtml.cpp luminance-hdr-2.6.0/src/HdrHTML/pfsouthdrhtml.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrHTML/pfsouthdrhtml.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrHTML/pfsouthdrhtml.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,9 +25,10 @@ * $Id: pfsouthdrhtml.cpp,v 1.5 2010/06/13 14:45:55 rafm Exp $ */ +#include #include "hdrhtml.h" -#if defined (WIN32) || defined (__APPLE__) +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) #include #endif #include @@ -38,15 +39,17 @@ #include "Libpfs/frame.h" #include "Libpfs/exception.h" #include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/exception.h" +#include "Libpfs/frame.h" +#include "hdrhtml-path.hxx" using namespace hdrhtml; using namespace std; -void generate_hdrhtml(pfs::Frame *frame, - string page_name, string out_dir, string image_dir, string object_output, string html_output, - int quality, bool verbose) -{ -#if defined (WIN32) || defined (__APPLE__) +void generate_hdrhtml(pfs::Frame *frame, string page_name, string out_dir, + string image_dir, string object_output, + string html_output, int quality, bool verbose) { +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) const int MAX_LINE_LENGTH = 2048; QString p_t = HDRHTMLDIR; p_t.append("/hdrhtml_default_templ/hdrhtml_page_templ.html"); @@ -62,28 +65,31 @@ const char *page_template = p_t_temp; const char *image_template = i_t_temp; #else - const char *page_template = HDRHTMLDIR "/hdrhtml_default_templ/hdrhtml_page_templ.html"; - const char *image_template = HDRHTMLDIR "/hdrhtml_default_templ/hdrhtml_image_templ.html"; + const char *page_template = + HDRHTMLDIR "/hdrhtml_default_templ/hdrhtml_page_templ.html"; + const char *image_template = + HDRHTMLDIR "/hdrhtml_default_templ/hdrhtml_image_templ.html"; #endif - if( quality < 1 || quality > 5 ) - throw pfs::Exception( QObject::tr("The quality must be between 1 (worst) and 5 (best).").toStdString() ); + if (quality < 1 || quality > 5) + throw pfs::Exception( + QObject::tr("The quality must be between 1 (worst) and 5 (best).") + .toStdString()); - if( frame == NULL ) { - throw pfs::Exception( QObject::tr("NULL frame passed.").toStdString() ); + if (frame == NULL) { + throw pfs::Exception(QObject::tr("NULL frame passed.").toStdString()); } pfs::Channel *R, *G, *B; - frame->getXYZChannels( R, G, B ); + frame->getXYZChannels(R, G, B); - int size = frame->getWidth()*frame->getHeight(); + int size = frame->getWidth() * frame->getHeight(); - pfs::Array2Df X( frame->getWidth(), frame->getHeight() ); - pfs::Array2Df Y( frame->getWidth(), frame->getHeight() ); - pfs::Array2Df Z( frame->getWidth(), frame->getHeight() ); + pfs::Array2Df X(frame->getWidth(), frame->getHeight()); + pfs::Array2Df Y(frame->getWidth(), frame->getHeight()); + pfs::Array2Df Z(frame->getWidth(), frame->getHeight()); - pfs::transformColorSpace( pfs::CS_RGB, R, G, B, - pfs::CS_XYZ, &X, &Y, &Z ); + pfs::transformColorSpace(pfs::CS_RGB, R, G, B, pfs::CS_XYZ, &X, &Y, &Z); float *R1 = new float[size]; float *G1 = new float[size]; @@ -96,45 +102,43 @@ copy(Y.begin(), Y.end(), Y1); // Get base_name if needed string base_name; - string tmp_str( page_name ); + string tmp_str(page_name); // Remove extension - size_t dot_pos = tmp_str.find_last_of( '.' ); - if( (dot_pos != string::npos) & (dot_pos > 0) ) - tmp_str = tmp_str.substr( 0, dot_pos ); + size_t dot_pos = tmp_str.find_last_of('.'); + if ((dot_pos != string::npos) & (dot_pos > 0)) + tmp_str = tmp_str.substr(0, dot_pos); // Substitute invalid characters - while( true ) { - size_t invalid_pos = tmp_str.find_last_of( "-! #@()[]{}`." ); - if( invalid_pos == string::npos ) - break; - tmp_str.replace( invalid_pos, 1, 1, '_' ); + while (true) { + size_t invalid_pos = tmp_str.find_last_of("-! #@()[]{}`."); + if (invalid_pos == string::npos) break; + tmp_str.replace(invalid_pos, 1, 1, '_'); } base_name = tmp_str; - HDRHTMLSet image_set( NULL, image_dir.empty() ? NULL : image_dir.c_str() ); + HDRHTMLSet image_set(NULL, image_dir.empty() ? NULL : image_dir.c_str()); if (verbose) - cout << QObject::tr("Adding image ").toStdString() << base_name << QObject::tr(" to the web page").toStdString() << endl; + cout << QObject::tr("Adding image ").toStdString() << base_name + << QObject::tr(" to the web page").toStdString() << endl; try { - image_set.add_image( frame->getWidth(), frame->getHeight(), - R1, G1, B1, Y1, - base_name.c_str(), - out_dir.empty() ? NULL : out_dir.c_str(), - quality, verbose ); - } - catch( pfs::Exception &e) { + image_set.add_image(frame->getWidth(), frame->getHeight(), R1, G1, B1, + Y1, base_name.c_str(), + out_dir.empty() ? NULL : out_dir.c_str(), quality, + verbose); + } catch (pfs::Exception &e) { throw; } try { - image_set.generate_webpage( page_template, image_template, - out_dir.empty() ? NULL : out_dir.c_str(), - object_output.empty() ? NULL : object_output.c_str(), - html_output.empty() ? NULL: html_output.c_str(), verbose ); - } - catch( pfs::Exception &e) { + image_set.generate_webpage( + page_template, image_template, + out_dir.empty() ? NULL : out_dir.c_str(), + object_output.empty() ? NULL : object_output.c_str(), + html_output.empty() ? NULL : html_output.c_str(), verbose); + } catch (pfs::Exception &e) { throw; } @@ -143,4 +147,3 @@ delete[] B1; delete[] Y1; } - diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrHTML/pfsouthdrhtml.h luminance-hdr-2.6.0/src/HdrHTML/pfsouthdrhtml.h --- luminance-hdr-2.5.1+dfsg/src/HdrHTML/pfsouthdrhtml.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrHTML/pfsouthdrhtml.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,8 +30,9 @@ #include -void generate_hdrhtml(pfs::Frame *frame, - std::string page_name, std::string out_dir, std::string image_dir, std::string object_output, std::string html_output, - int quality, bool verbose); +void generate_hdrhtml(pfs::Frame *frame, std::string page_name, + std::string out_dir, std::string image_dir, + std::string object_output, std::string html_output, + int quality, bool verbose); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/AutoAntighosting.cpp luminance-hdr-2.6.0/src/HdrWizard/AutoAntighosting.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/AutoAntighosting.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/AutoAntighosting.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,119 +23,111 @@ * */ -#include - +#include +#include #include #include #include -#include #ifdef _OPENMP #include #endif -#include "Common/CommonFunctions.h" -#include +#include +#include #include +#include #include #include -#include "Libpfs/utils/msec_timer.h" - -#include +#include #include "AutoAntighosting.h" // --- LEGACY CODE --- using namespace pfs::utils; -float max(const Array2Df& u) -{ - return *std::max_element(u.begin(), u.end()); -} +float max(const Array2Df &u) { return *std::max_element(u.begin(), u.end()); } -float min(const Array2Df& u) -{ - return *std::min_element(u.begin(), u.end()); -} +float min(const Array2Df &u) { return *std::min_element(u.begin(), u.end()); } -void solve_pde_dct(Array2Df &F, Array2Df &U) -{ +void solve_pde_dct(Array2Df &F, Array2Df &U) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); #endif - // activate parallel execution of fft routines - fftwf_init_threads(); -#ifdef _OPENMP - fftwf_plan_with_nthreads( omp_get_max_threads() ); -#else - fftwf_plan_with_nthreads( 2 ); -#endif + // activate parallel execution of fft routines + init_fftw(); const int width = U.getCols(); const int height = U.getRows(); - assert((int)F.getCols()==width && (int)F.getRows()==height); + assert((int)F.getCols() == width && (int)F.getRows() == height); Array2Df Ftr(width, height); - fftwf_plan p = NULL; // Let's see if this blocks compiler warnings - #pragma omp parallel for private(p) schedule(static) - for ( int j = 0; j < height; j++ ) { - #pragma omp critical (make_plan) - p = fftwf_plan_r2r_1d(width, F.data()+width*j, Ftr.data()+width*j, FFTW_REDFT00, FFTW_ESTIMATE); - fftwf_execute(p); + FFTW_MUTEX::fftw_mutex_plan.lock(); + fftwf_plan p = fftwf_plan_r2r_1d(width, F.data() + width, + Ftr.data() + width, FFTW_REDFT00, + FFTW_ESTIMATE); + FFTW_MUTEX::fftw_mutex_plan.unlock(); + +#pragma omp parallel for + for (int j = 0; j < height; j++) { + fftwf_execute_r2r(p, F.data() + width * j, Ftr.data() + width * j); } - #pragma omp parallel - { - vector c(height); - #pragma omp for - for ( int i = 0; i < width; i++ ) { - for (int j = 0; j < height; j++) { - c[j] = 1.0f; - } - float b = 2.0f*(cos(boost::math::double_constants::pi*i/width) - 2.0f); - c[0] /= b; - Ftr(i, 0) /= b; - for (int j = 1; j < height - 1; j++ ) { - float m = (b - c[j-1]); - c[j] /= m; - Ftr(i, j) = (Ftr(i, j) - Ftr(i, j-1))/m; - } - Ftr(i, height - 1) = (Ftr(i, height - 1) - Ftr(i, height - 2))/(b - c[height - 2]); - U(i, height - 1) = Ftr(i, height - 1); - for (int j = height - 2; j >= 0; j--) { - U(i, j) = Ftr(i, j) - c[j]*U(i, j+1); +#pragma omp parallel + { + vector c(height); +#pragma omp for + for (int i = 0; i < width; i++) { + for (int j = 0; j < height; j++) { + c[j] = 1.0f; + } + float b = + 2.0f * + (cos(boost::math::double_constants::pi * i / width) - 2.0f); + c[0] /= b; + Ftr(i, 0) /= b; + for (int j = 1; j < height - 1; j++) { + float m = (b - c[j - 1]); + c[j] /= m; + Ftr(i, j) = (Ftr(i, j) - Ftr(i, j - 1)) / m; + } + Ftr(i, height - 1) = + (Ftr(i, height - 1) - Ftr(i, height - 2)) / (b - c[height - 2]); + U(i, height - 1) = Ftr(i, height - 1); + for (int j = height - 2; j >= 0; j--) { + U(i, j) = Ftr(i, j) - c[j] * U(i, j + 1); + } } } - } - const float invDivisor = 1.0f / (2.0f*(width-1)); - #pragma omp parallel for schedule(static) lastprivate(p) - for ( int j = 0; j < height; j++ ) { - #pragma omp critical (make_plan) - p = fftwf_plan_r2r_1d(width, U.data()+width*j, U.data()+width*j, FFTW_REDFT00, FFTW_ESTIMATE); - fftwf_execute(p); + const float invDivisor = 1.0f / (2.0f * (width - 1)); +#pragma omp parallel for + for (int j = 0; j < height; j++) { + fftwf_execute_r2r(p, U.data() + width * j, U.data() + width * j); - for ( int i = 0; i < width; i++ ) { + for (int i = 0; i < width; i++) { U(i, j) *= invDivisor; } } + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); fftwf_destroy_plan(p); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "solve_pde_dct = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "solve_pde_dct = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -int findIndex(const float* data, int size) -{ +int findIndex(const float *data, int size) { assert(size > 0); int idx = 0; float currentMax = data[0]; for (int i = 0; i < size; i++) { - if ( data[i] > currentMax ) { + if (data[i] > currentMax) { currentMax = data[i]; idx = i; } @@ -145,15 +137,11 @@ typedef vector BufferF; -inline -float hueMean(const BufferF& data) -{ - return std::accumulate(data.begin(), data.end(), 0.0f)/data.size(); +inline float hueMean(const BufferF &data) { + return std::accumulate(data.begin(), data.end(), 0.0f) / data.size(); } -void hueSquaredMean(const HdrCreationItemContainer& data, - vector& HE) -{ +void hueSquaredMean(const HdrCreationItemContainer &data, vector &HE) { size_t width = data[0].frame()->getWidth(); size_t height = data[0].frame()->getHeight(); size_t numItems = data.size(); @@ -168,7 +156,7 @@ for (size_t j = 0; j < height; j++) { for (size_t i = 0; i < width; i++) { for (size_t w = 0; w < numItems; w++) { - data[w].frame()->getXYZChannels( X, Y, Z ); + data[w].frame()->getXYZChannels(X, Y, Z); r = (*X)(i, j); g = (*Y)(i, j); @@ -181,42 +169,35 @@ for (size_t w = 0; w < numItems; w++) { float H = hueMean_ - hues[w]; - HS[w] += H*H; + HS[w] += H * H; } } } for (size_t w = 0; w < numItems; w++) { - HE[w] = HS[w] / (width*height); - - qDebug() << "HE[" << w << "]: " << HE[w]; + HE[w] = HS[w] / (width * height); } } -void sdv(const HdrCreationItem& item1, - const HdrCreationItem& item2, - const float deltaEV, - const int dx, const int dy, - float &sR, float &sG, float &sB) -{ +void sdv(const HdrCreationItem &item1, const HdrCreationItem &item2, + const float deltaEV, const int dx, const int dy, float &sR, float &sG, + float &sB) { Channel *X1, *Y1, *Z1, *X2, *Y2, *Z2; - item1.frame()->getXYZChannels( X1, Y1, Z1 ); - item2.frame()->getXYZChannels( X2, Y2, Z2 ); - Array2Df& R1 = *X1; - Array2Df& G1 = *Y1; - Array2Df& B1 = *Z1; - Array2Df& R2 = *X2; - Array2Df& G2 = *Y2; - Array2Df& B2 = *Z2; - - const int W = item1.frame()->getWidth(); - const int H = item1.frame()->getHeight(); - - vector logRed(W*H); - vector logGreen(W*H); - vector logBlue(W*H); - - qDebug() << "deltaEV " << deltaEV; + item1.frame()->getXYZChannels(X1, Y1, Z1); + item2.frame()->getXYZChannels(X2, Y2, Z2); + Array2Df &R1 = *X1; + Array2Df &G1 = *Y1; + Array2Df &B1 = *Z1; + Array2Df &R2 = *X2; + Array2Df &G2 = *Y2; + Array2Df &B2 = *Z2; + + const size_t W = item1.frame()->getWidth(); + const size_t H = item1.frame()->getHeight(); + + vector logRed(W * H); + vector logGreen(W * H); + vector logBlue(W * H); float logDeltaEV = log(std::abs(deltaEV)); @@ -224,62 +205,65 @@ float mR = 0.0f; float mG = 0.0f; float mB = 0.0f; - for (int y = 0; y < H; y++) { - if (y+dy < 0 || y+dy > H-1) - continue; - for (int x = 0; x < W; x++) { - if (x+dx < 0 || x+dx > W-1) + for (size_t y = 0; y < H; y++) { + if (y + dy < 0 || y + dy > H - 1) continue; + for (size_t x = 0; x < W; x++) { + if (x + dx < 0 || x + dx > W - 1) continue; + if (R1(x, y) >= 1.0f || R2(x + dx, y + dy) >= 1.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; + continue; + } + if (G1(x, y) >= 1.0f || G2(x + dx, y + dy) >= 1.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; + continue; + } + if (B1(x, y) >= 1.0f || B2(x + dx, y + dy) >= 1.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; + continue; + } + if (R1(x, y) <= 0.0f || R2(x + dx, y + dy) <= 0.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; + continue; + } + if (G1(x, y) <= 0.0f || G2(x + dx, y + dy) <= 0.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; + continue; + } + if (B1(x, y) <= 0.0f || B2(x + dx, y + dy) <= 0.0f) { + logRed[count] = 0.0f; + logGreen[count] = 0.0f; + logBlue[count++] = 0.0f; continue; - if (R1(x, y) >= 1.0f || R2(x+dx, y+dy) >= 1.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; - } - if (G1(x, y) >= 1.0f || G2(x+dx, y+dy) >= 1.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; - } - if (B1(x, y) >= 1.0f || B2(x+dx, y+dy) >= 1.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; - } - if (R1(x, y) <= 0.0f || R2(x+dx, y+dy) <= 0.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; - } - if (G1(x, y) <= 0.0f || G2(x+dx, y+dy) <= 0.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; - } - if (B1(x, y) <= 0.0f || B2(x+dx, y+dy) <= 0.0f) { - logRed[count] = 0.0f; - logGreen[count] = 0.0f; - logBlue[count++] = 0.0f; - continue; } if (deltaEV > 0) { - logRed[count] = log(R1(x, y)) - log(R2(x+dx, y+dy)) - logDeltaEV; - logGreen[count] = log(G1(x, y)) - log(G2(x+dx, y+dy)) - logDeltaEV; - logBlue[count] = log(B1(x, y)) - log(B2(x+dx, y+dy)) - logDeltaEV; + logRed[count] = + log(R1(x, y)) - log(R2(x + dx, y + dy)) - logDeltaEV; + logGreen[count] = + log(G1(x, y)) - log(G2(x + dx, y + dy)) - logDeltaEV; + logBlue[count] = + log(B1(x, y)) - log(B2(x + dx, y + dy)) - logDeltaEV; mR += std::abs(logRed[count]); mG += std::abs(logGreen[count]); mB += std::abs(logBlue[count]); count++; - } - else { - logRed[count] = log(R1(x, y)) - log(R2(x+dx, y+dy)) + logDeltaEV; - logGreen[count] = log(G1(x, y)) - log(G2(x+dx, y+dy)) + logDeltaEV; - logBlue[count] = log(B1(x, y)) - log(B2(x+dx, y+dy)) + logDeltaEV; + } else { + logRed[count] = + log(R1(x, y)) - log(R2(x + dx, y + dy)) + logDeltaEV; + logGreen[count] = + log(G1(x, y)) - log(G2(x + dx, y + dy)) + logDeltaEV; + logBlue[count] = + log(B1(x, y)) - log(B2(x + dx, y + dy)) + logDeltaEV; mR += std::abs(logRed[count]); mG += std::abs(logGreen[count]); mB += std::abs(logBlue[count]); @@ -291,10 +275,6 @@ mG /= count; mB /= count; - qDebug() << "mR" << mR; - qDebug() << "mG" << mG; - qDebug() << "mB" << mB; - sR = 0.0f; sG = 0.0f; sB = 0.0f; @@ -310,71 +290,68 @@ sR = mR + std::sqrt(sR); sG = mG + std::sqrt(sG); sB = mB + std::sqrt(sB); - - qDebug() << "sR" << sR; - qDebug() << "sG" << sG; - qDebug() << "sB" << sB; } -bool comparePatches(const HdrCreationItem& item1, - const HdrCreationItem& item2, - const int i, const int j, - const int gridX, const int gridY, - const float threshold, - const float sR, const float sG, const float sB, - const float deltaEV, - const int dx, const int dy) -{ +bool comparePatches(const HdrCreationItem &item1, const HdrCreationItem &item2, + const int i, const int j, const int gridX, const int gridY, + const float threshold, const float sR, const float sG, + const float sB, const float deltaEV, const int dx, + const int dy) { const int gridSize = gridX * gridY; vector logRed(gridSize); vector logGreen(gridSize); vector logBlue(gridSize); Channel *X1, *Y1, *Z1, *X2, *Y2, *Z2; - item1.frame()->getXYZChannels( X1, Y1, Z1 ); - item2.frame()->getXYZChannels( X2, Y2, Z2 ); - Array2Df& R1 = *X1; - Array2Df& G1 = *Y1; - Array2Df& B1 = *Z1; - Array2Df& R2 = *X2; - Array2Df& G2 = *Y2; - Array2Df& B2 = *Z2; + item1.frame()->getXYZChannels(X1, Y1, Z1); + item2.frame()->getXYZChannels(X2, Y2, Z2); + Array2Df &R1 = *X1; + Array2Df &G1 = *Y1; + Array2Df &B1 = *Z1; + Array2Df &R2 = *X2; + Array2Df &G2 = *Y2; + Array2Df &B2 = *Z2; float logDeltaEV = log(std::abs(deltaEV)); - const int width = gridX*agGridSize; - const int height = gridY*agGridSize; + const int width = gridX * agGridSize; + const int height = gridY * agGridSize; int count = 0; - for (int y = j * gridY; y < (j+1) * gridY; y++) { - if (y+dy < 0 || y+dy > height-1) - continue; - for (int x = i * gridX; x < (i+1) * gridX; x++) { - if (x+dx < 0 || x+dx > width-1) - continue; + for (int y = j * gridY; y < (j + 1) * gridY; y++) { + if (y + dy < 0 || y + dy > height - 1) continue; + for (int x = i * gridX; x < (i + 1) * gridX; x++) { + if (x + dx < 0 || x + dx > width - 1) continue; if (deltaEV > 0) { - logRed[count] = log(R1(x, y)) - log(R2(x+dx, y+dy)) - logDeltaEV; - logGreen[count] = log(G1(x, y)) - log(G2(x+dx, y+dy)) - logDeltaEV; - logBlue[count++] = log(B1(x, y)) - log(B2(x+dx, y+dy)) - logDeltaEV; - } - else { - logRed[count] = log(R1(x, y)) - log(R2(x+dx, y+dy)) + logDeltaEV; - logGreen[count] = log(G1(x, y)) - log(G2(x+dx, y+dy)) + logDeltaEV; - logBlue[count++] = log(B1(x, y)) - log(B2(x+dx, y+dy)) + logDeltaEV; + logRed[count] = + log(R1(x, y)) - log(R2(x + dx, y + dy)) - logDeltaEV; + logGreen[count] = + log(G1(x, y)) - log(G2(x + dx, y + dy)) - logDeltaEV; + logBlue[count++] = + log(B1(x, y)) - log(B2(x + dx, y + dy)) - logDeltaEV; + } else { + logRed[count] = + log(R1(x, y)) - log(R2(x + dx, y + dy)) + logDeltaEV; + logGreen[count] = + log(G1(x, y)) - log(G2(x + dx, y + dy)) + logDeltaEV; + logBlue[count++] = + log(B1(x, y)) - log(B2(x + dx, y + dy)) + logDeltaEV; } } } count = 0; for (int h = 0; h < gridSize; h++) { - if (std::abs(logRed[h]) > 2.0f*sR || std::abs(logGreen[h]) > 2.0f*sG || std::abs(logBlue[h]) > 2.0f*sB) + if (std::abs(logRed[h]) > 2.0f * sR || + std::abs(logGreen[h]) > 2.0f * sG || + std::abs(logBlue[h]) > 2.0f * sB) count++; } - return (static_cast(count) / static_cast(gridX*gridY)) > threshold; + return (static_cast(count) / static_cast(gridX * gridY)) > + threshold; } -void computeIrradiance(Array2Df& irradiance, const Array2Df& in) -{ +void computeIrradiance(Array2Df &irradiance, const Array2Df &in) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -385,17 +362,17 @@ #pragma omp parallel for schedule(static) for (int i = 0; i < width * height; ++i) { - irradiance(i) = std::exp( in(i) ); + irradiance(i) = std::exp(in(i)); } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "computeIrradiance = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "computeIrradiance = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -void computeLogIrradiance(Array2Df &logIrradiance, const Array2Df &u) -{ +void computeLogIrradiance(Array2Df &logIrradiance, const Array2Df &u) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -404,25 +381,26 @@ const int height = u.getRows(); float ir, logIr; - #pragma omp parallel for private (ir, logIr) schedule(static) - for (int i = 0; i < width*height; i++) { - ir = u(i); - if (ir == 0.0f) - logIr = -11.09f; - else - logIr = std::log(ir); +#pragma omp parallel for private(ir, logIr) schedule(static) + for (int i = 0; i < width * height; i++) { + ir = u(i); + if (ir == 0.0f) + logIr = -11.09f; + else + logIr = std::log(ir); - logIrradiance(i) = logIr; + logIrradiance(i) = logIr; } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "computeLogIrradiance = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "computeLogIrradiance = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -void computeGradient(Array2Df &gradientX, Array2Df &gradientY, const Array2Df& in) -{ +void computeGradient(Array2Df &gradientX, Array2Df &gradientY, + const Array2Df &in) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -431,37 +409,42 @@ const int width = in.getCols(); const int height = in.getRows(); - #pragma omp parallel for schedule(static) - for (int j = 1; j < height-1; j++) { - for (int i = 1; i < width-1; i++) { - gradientX(i, j) = 0.5f*(in(i+1, j) - in(i-1, j)); - gradientY(i, j) = 0.5f*(in(i, j+1) - in(i, j-1)); +#pragma omp parallel for schedule(static) + for (int j = 1; j < height - 1; j++) { + for (int i = 1; i < width - 1; i++) { + gradientX(i, j) = 0.5f * (in(i + 1, j) - in(i - 1, j)); + gradientY(i, j) = 0.5f * (in(i, j + 1) - in(i, j - 1)); } } - #pragma omp parallel for schedule(static) - for (int i = 1; i < width-1; i++) { - gradientX(i, 0) = 0.5f*(in(i+1, 0) - in(i-1, 0)); - gradientX(i, height-1) = 0.5f*(in(i+1, height-1) - in(i-1, height-1)); +#pragma omp parallel for schedule(static) + for (int i = 1; i < width - 1; i++) { + gradientX(i, 0) = 0.5f * (in(i + 1, 0) - in(i - 1, 0)); + gradientX(i, height - 1) = + 0.5f * (in(i + 1, height - 1) - in(i - 1, height - 1)); gradientY(i, 0) = 0.0f; - gradientY(i, height-1) = 0.0f; + gradientY(i, height - 1) = 0.0f; } - #pragma omp parallel for schedule(static) - for (int j = 1; j < height-1; j++) { +#pragma omp parallel for schedule(static) + for (int j = 1; j < height - 1; j++) { gradientX(0, j) = 0.0f; - gradientX(width-1, j) = 0.0f; - gradientY(0, j) = 0.5f*(in(0, j+1) - in(0, j-1)); - gradientY(width-1, j) = 0.5f*(in(width-1, j+1) - in(width-1, j-1)); - } - gradientX(0, 0) = gradientX(0, height-1) = gradientX(width-1, 0) = gradientX(width-1, height-1) = 0.0f; - gradientY(0, 0) = gradientY(0, height-1) = gradientY(width-1, 0) = gradientY(width-1, height-1) = 0.0f; + gradientX(width - 1, j) = 0.0f; + gradientY(0, j) = 0.5f * (in(0, j + 1) - in(0, j - 1)); + gradientY(width - 1, j) = + 0.5f * (in(width - 1, j + 1) - in(width - 1, j - 1)); + } + gradientX(0, 0) = gradientX(0, height - 1) = gradientX(width - 1, 0) = + gradientX(width - 1, height - 1) = 0.0f; + gradientY(0, 0) = gradientY(0, height - 1) = gradientY(width - 1, 0) = + gradientY(width - 1, height - 1) = 0.0f; #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "computeGradient = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "computeGradient = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -void computeDivergence(Array2Df &divergence, const Array2Df& gradientX, const Array2Df& gradientY) -{ +void computeDivergence(Array2Df &divergence, const Array2Df &gradientX, + const Array2Df &gradientY) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -470,36 +453,44 @@ const int height = gradientX.getRows(); divergence(0, 0) = gradientX(0, 0) + gradientY(0, 0); - #pragma omp parallel for schedule(static) - for (int j = 1; j < height-1; j++) { - for (int i = 1; i < width-1; i++) { - divergence(i, j) = 0.5f*(gradientX(i+1, j) - gradientX(i-1, j)) + - 0.5f*(gradientY(i, j+1) - gradientY(i, j-1)); +#pragma omp parallel for schedule(static) + for (int j = 1; j < height - 1; j++) { + for (int i = 1; i < width - 1; i++) { + divergence(i, j) = + 0.5f * (gradientX(i + 1, j) - gradientX(i - 1, j)) + + 0.5f * (gradientY(i, j + 1) - gradientY(i, j - 1)); } } - #pragma omp parallel for schedule(static) - for (int j = 1; j < height-1; j++) { - divergence(0, j) = gradientX(1, j) - gradientX(0, j) + 0.5f*(gradientY(0, j+1) - gradientY(0, j-1)); - divergence(width-1, j) = gradientX(width-1, j) - gradientX(width-2, j) + - 0.5f*(gradientY(width-1, j) - gradientY(width-1, j-1)); - } - #pragma omp parallel for schedule(static) - for (int i = 1; i < width-1; i++) { - divergence(i, 0) = 0.5f*(gradientX(i, 0) - gradientX(i-1, 0)) + gradientY(i, 0); - divergence(i, height-1) = 0.5f*(gradientX(i+1, height-1) - gradientX(i-1, height-1)) + - gradientY(i, height-1) - gradientY(i, height-2); +#pragma omp parallel for schedule(static) + for (int j = 1; j < height - 1; j++) { + divergence(0, j) = gradientX(1, j) - gradientX(0, j) + + 0.5f * (gradientY(0, j + 1) - gradientY(0, j - 1)); + divergence(width - 1, j) = + gradientX(width - 1, j) - gradientX(width - 2, j) + + 0.5f * (gradientY(width - 1, j) - gradientY(width - 1, j - 1)); + } +#pragma omp parallel for schedule(static) + for (int i = 1; i < width - 1; i++) { + divergence(i, 0) = + 0.5f * (gradientX(i, 0) - gradientX(i - 1, 0)) + gradientY(i, 0); + divergence(i, height - 1) = + 0.5f * + (gradientX(i + 1, height - 1) - gradientX(i - 1, height - 1)) + + gradientY(i, height - 1) - gradientY(i, height - 2); } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "computeDivergence = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "computeDivergence = " << stop_watch.get_time() << " msec" + << std::endl; #endif } void blendGradients(Array2Df &gradientXBlended, Array2Df &gradientYBlended, const Array2Df &gradientX, const Array2Df &gradientY, - const Array2Df &gradientXGood, const Array2Df &gradientYGood, - bool patches[agGridSize][agGridSize], const int gridX, const int gridY) -{ + const Array2Df &gradientXGood, + const Array2Df &gradientYGood, + bool patches[agGridSize][agGridSize], const int gridX, + const int gridY) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -508,36 +499,35 @@ int height = gradientY.getRows(); int x, y; - #pragma omp parallel for private(x, y) schedule(static) - for (int j = 0; j < height; j++) - { - y = floor(static_cast(j)/gridY); - for (int i = 0; i < width; i++) - { - x = floor(static_cast(i)/gridX); - if (patches[x][y] == true) - { +#pragma omp parallel for private(x, y) schedule(static) + for (int j = 0; j < height - 1; j++) { + y = floor(static_cast(j) / gridY); + for (int i = 0; i < width; i++) { + x = floor(static_cast(i) / gridX); + if (patches[x][y] == true) { gradientXBlended(i, j) = gradientXGood(i, j); gradientYBlended(i, j) = gradientYGood(i, j); - if (i % gridX == 0) - { - if ((j-1) >= 0) - { - gradientXBlended(i, j) = 0.5f*(gradientXGood(i, j+1) + gradientX(i, j-1)); - gradientYBlended(i, j) = 0.5f*(gradientYGood(i, j+1) + gradientY(i, j-1)); + if (i % gridX == 0) { + if ((j - 1) >= 0) { + gradientXBlended(i, j) = + 0.5f * + (gradientXGood(i, j + 1) + gradientX(i, j - 1)); + gradientYBlended(i, j) = + 0.5f * + (gradientYGood(i, j + 1) + gradientY(i, j - 1)); } } - if (j % gridY == 0) - { - if ((i-1) >= 0) - { - gradientXBlended(i, j) = 0.5f*(gradientXGood(i+1, j) + gradientX(i-1, j)); - gradientYBlended(i, j) = 0.5f*(gradientYGood(i+1, j) + gradientY(i-1, j)); + if (j % gridY == 0) { + if ((i - 1) >= 0) { + gradientXBlended(i, j) = + 0.5f * + (gradientXGood(i + 1, j) + gradientX(i - 1, j)); + gradientYBlended(i, j) = + 0.5f * + (gradientYGood(i + 1, j) + gradientY(i - 1, j)); } } - } - else - { + } else { gradientXBlended(i, j) = gradientX(i, j); gradientYBlended(i, j) = gradientY(i, j); } @@ -545,15 +535,15 @@ } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "blendGradients = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "blendGradients = " << stop_watch.get_time() << " msec" + << std::endl; #endif } void blendGradients(Array2Df &gradientXBlended, Array2Df &gradientYBlended, const Array2Df &gradientX, const Array2Df &gradientY, - const Array2Df &gradientXGood, const Array2Df &gradientYGood, - const QImage& agMask) -{ + const Array2Df &gradientXGood, + const Array2Df &gradientYGood, const QImage &agMask) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -561,14 +551,13 @@ int width = gradientX.getCols(); int height = gradientY.getRows(); - #pragma omp parallel for schedule(static) +#pragma omp parallel for schedule(static) for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { - if (qAlpha(agMask.pixel(i,j)) != 0) { + if (qAlpha(agMask.pixel(i, j)) != 0) { gradientXBlended(i, j) = gradientXGood(i, j); gradientYBlended(i, j) = gradientYGood(i, j); - } - else { + } else { gradientXBlended(i, j) = gradientX(i, j); gradientYBlended(i, j) = gradientY(i, j); } @@ -576,17 +565,17 @@ } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "blendGradients = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "blendGradients = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -void colorBalance(pfs::Array2Df& U, const pfs::Array2Df& F, const int x, const int y) -{ +void colorBalance(pfs::Array2Df &U, const pfs::Array2Df &F, const int x, + const int y) { const int width = U.getCols(); const int height = U.getRows(); float sf = F(x, y) / U(x, y); - #pragma omp parallel for schedule(static) - for (int i = 0; i < width * height; i++) - U(i) *= sf; +#pragma omp parallel for schedule(static) + for (int i = 0; i < width * height; i++) U(i) *= sf; } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/AutoAntighosting.h luminance-hdr-2.6.0/src/HdrWizard/AutoAntighosting.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/AutoAntighosting.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/AutoAntighosting.h 2019-06-09 19:18:38.000000000 +0000 @@ -23,6 +23,9 @@ * */ +#ifndef AUTO_ANTIGHOSTING_H +#define AUTO_ANTIGHOSTING_H + #include "HdrCreationItem.h" #define agGridSize 40 @@ -30,50 +33,50 @@ using namespace std; using namespace pfs; -float max(const Array2Df& u); -float min(const Array2Df& u); +float max(const Array2Df &u); +float min(const Array2Df &u); void solve_pde_dct(Array2Df &F, Array2Df &U); void clampToZero(Array2Df &R, Array2Df &G, Array2Df &B, float m); -int findIndex(const float* data, int size); -void hueSquaredMean(const HdrCreationItemContainer& data, - vector& HE); -void sdv(const HdrCreationItem& item1, - const HdrCreationItem& item2, - const float deltaEV, - const int dx, const int dy, - float &sR, float &sG, float &sB); - -bool comparePatches(const HdrCreationItem& item1, - const HdrCreationItem& item2, - const int i, const int j, - const int gridX, const int gridY, - const float threshold, - const float sR, const float sG, const float sB, - const float deltaEV, - const int dx, const int dy); - -void computeIrradiance(Array2Df& irradiance, const Array2Df& in); -void computeLogIrradiance(Array2Df &logIrradiance, const Array2Df& u); - -void computeGradient(Array2Df &gradientX, Array2Df &gradientY, const Array2Df &in); -void computeDivergence(Array2Df &divergence, const Array2Df& gradientX, - const Array2Df& gradientY); +int findIndex(const float *data, int size); +void hueSquaredMean(const HdrCreationItemContainer &data, vector &HE); +void sdv(const HdrCreationItem &item1, const HdrCreationItem &item2, + const float deltaEV, const int dx, const int dy, float &sR, float &sG, + float &sB); + +bool comparePatches(const HdrCreationItem &item1, const HdrCreationItem &item2, + const int i, const int j, const int gridX, const int gridY, + const float threshold, const float sR, const float sG, + const float sB, const float deltaEV, const int dx, + const int dy); + +void computeIrradiance(Array2Df &irradiance, const Array2Df &in); +void computeLogIrradiance(Array2Df &logIrradiance, const Array2Df &u); + +void computeGradient(Array2Df &gradientX, Array2Df &gradientY, + const Array2Df &in); +void computeDivergence(Array2Df &divergence, const Array2Df &gradientX, + const Array2Df &gradientY); void blendGradients(Array2Df &gradientXBlended, Array2Df &gradientYBlended, const Array2Df &gradientX, const Array2Df &gradientY, - const Array2Df &gradientXGood, const Array2Df &gradientYGood, + const Array2Df &gradientXGood, + const Array2Df &gradientYGood, bool patches[agGridSize][agGridSize], int gridX, int gridY); void blendGradients(Array2Df &gradientXBlended, Array2Df &gradientYBlended, const Array2Df &gradientX, const Array2Df &gradientY, - const Array2Df &gradientXGood, const Array2Df &gradientYGood, - const QImage& agMask); + const Array2Df &gradientXGood, + const Array2Df &gradientYGood, const QImage &agMask); + +void colorBalance(pfs::Array2Df &U, const pfs::Array2Df &F, int x, int y); +qreal averageLightness(const Array2Df &R, const Array2Df &G, const Array2Df &B, + const int i, const int j, const int gridX, + const int gridY); +qreal averageLightness(const Array2Df &R, const Array2Df &G, const Array2Df &B); +qreal averageLightness(const HdrCreationItem &item); +void blend(pfs::Array2Df &R1, pfs::Array2Df &G1, pfs::Array2Df &B1, + const pfs::Array2Df &R2, const pfs::Array2Df &G2, + const pfs::Array2Df &B2, const QImage &mask, + const QImage &maskGoodImage); -void colorBalance(pfs::Array2Df& U, const pfs::Array2Df& F, int x, int y); -qreal averageLightness(const Array2Df& R, const Array2Df& G, const Array2Df& B, - const int i, const int j, const int gridX, const int gridY); -qreal averageLightness(const Array2Df& R, const Array2Df& G, const Array2Df& B); -qreal averageLightness(const HdrCreationItem& item); -void blend(pfs::Array2Df& R1, pfs::Array2Df& G1, pfs::Array2Df& B1, - const pfs::Array2Df& R2, const pfs::Array2Df& G2, const pfs::Array2Df& B2, - const QImage& mask, const QImage& maskGoodImage); +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/CMakeLists.txt luminance-hdr-2.6.0/src/HdrWizard/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -2,7 +2,8 @@ SET(FILES_UI ${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.ui -${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.ui) +${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.ui +${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.ui) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.h) @@ -13,20 +14,22 @@ SET(FILES_H_QT ${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.h ${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.h -${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.h) +${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.h +${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.h) SET(FILES_CPP_QT ${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.cpp ${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.cpp -${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.cpp) +${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.cpp +${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.cpp) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) QT5_WRAP_CPP(FILES_MOC ${FILES_H_QT}) -ADD_LIBRARY(hdrwizard ${FILES_H} ${FILES_H_QT} ${FILES_CPP} ${FILES_CPP_QT} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(hdrwizard Core Concurrent Gui Widgets Sql) +ADD_LIBRARY(hdrwizard STATIC ${FILES_H} ${FILES_H_QT} ${FILES_CPP} ${FILES_CPP_QT} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(hdrwizard Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql) SET(FILES_CLI_H ${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationItem.h @@ -47,8 +50,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.cpp) QT5_WRAP_CPP(FILES_CLI_MOC ${FILES_CLI_H_QT}) -ADD_LIBRARY(hdrwizard-cli ${FILES_CLI_H} ${FILES_CLI_H_QT} ${FILES_CLI_CPP} ${FILES_CLI_CPP_QT} ${FILES_CLI_MOC}) -qt5_use_modules(hdrwizard-cli Core Concurrent Gui Widgets Sql) +ADD_LIBRARY(hdrwizard-cli STATIC ${FILES_CLI_H} ${FILES_CLI_H_QT} ${FILES_CLI_CPP} ${FILES_CLI_CPP_QT} ${FILES_CLI_MOC}) +TARGET_LINK_LIBRARIES(hdrwizard-cli Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP_QT} ${FILES_H_QT} diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.cpp luminance-hdr-2.6.0/src/HdrWizard/EditingTools.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/EditingTools.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,106 +21,124 @@ * Original Work * @author Giuseppe Rota * - * Improvements, bugfixing, anti-ghosting, new preview widget based on QGraphicsView + * Improvements, bugfixing, anti-ghosting, new preview widget based on + * QGraphicsView * @author Franco Comida * */ -#include -#include -#include #include -#include #include +#include +#include +#include +#include -#include "ui_EditingTools.h" +#include "HdrWizard/ui_EditingTools.h" #include "Common/config.h" -#include "UI/GammaAndLevels.h" -#include "Viewers/PanIconWidget.h" -#include "HdrWizard/EditingTools.h" #include "Exif/ExifOperations.h" #include "HdrCreation/mtb_alignment.h" +#include "HdrWizard/EditingTools.h" +#include "HdrWizard/ui_EditingTools.h" +#include "UI/GammaAndLevels.h" +#include "Viewers/PanIconWidget.h" -EditingTools::EditingTools(HdrCreationManager *hcm, bool autoAg, QWidget *parent) : - QDialog(parent), - m_Ui(new Ui::EditingToolsDialog), - m_currentAgMaskIndex(0), - m_hcm(hcm), - m_additionalShiftValue(0), - m_imagesSaved(false), - m_agGoodImageIndex(-1), - m_antiGhosting(false), - m_doAutoAntighosting(autoAg), - m_doManualAntighosting(false), - m_patchesEdited(false) -{ +EditingTools::EditingTools(HdrCreationManager *hcm, bool autoAg, + QWidget *parent) + : QDialog(parent), + m_Ui(new Ui::EditingToolsDialog), + m_currentAgMaskIndex(0), + m_hcm(hcm), + m_additionalShiftValue(0), + m_imagesSaved(false), + m_agGoodImageIndex(-1), + m_antiGhosting(false), + m_doAutoAntighosting(autoAg), + m_doManualAntighosting(false), + m_patchesEdited(false) { m_Ui->setupUi(this); - if ( !QIcon::hasThemeIcon("edit-select-lasso") ) - { - m_Ui->lassoColorButton->setIcon(QIcon(":/program-icons/edit-select-lasso")); - m_Ui->toolButtonPath->setIcon(QIcon(":/program-icons/edit-select-lasso")); + if (!QIcon::hasThemeIcon(QStringLiteral("edit-select-lasso"))) { + m_Ui->lassoColorButton->setIcon( + QIcon(":/program-icons/edit-select-lasso")); + m_Ui->toolButtonPath->setIcon( + QIcon(":/program-icons/edit-select-lasso")); } - if ( !QIcon::hasThemeIcon("draw-brush") ) - { + if (!QIcon::hasThemeIcon(QStringLiteral("draw-brush"))) { m_Ui->maskColorButton->setIcon(QIcon(":/program-icons/draw-brush")); m_Ui->toolButtonPaint->setIcon(QIcon(":/program-icons/draw-brush")); } - if ( !QIcon::hasThemeIcon("zoom") ) + if (!QIcon::hasThemeIcon(QStringLiteral("zoom"))) m_Ui->fillButton->setIcon(QIcon(":/program-icons/zoom")); - if ( !QIcon::hasThemeIcon("help-whatsthis") ) + if (!QIcon::hasThemeIcon(QStringLiteral("help-whatsthis"))) m_Ui->whatsThisButton->setIcon(QIcon(":/program-icons/help-whatsthis")); - if ( !QIcon::hasThemeIcon("transform-crop-and-resize") ) - m_Ui->cropButton->setIcon(QIcon(":/program-icons/transform-crop-and-resize")); - if ( !QIcon::hasThemeIcon("dialog-ok-apply") ) - m_Ui->toolButtonApplyMask->setIcon(QIcon(":/program-icons/dialog-ok-apply")); - if ( !QIcon::hasThemeIcon("arrow-up") ) + if (!QIcon::hasThemeIcon(QStringLiteral("transform-crop-and-resize"))) + m_Ui->cropButton->setIcon( + QIcon(":/program-icons/transform-crop-and-resize")); + if (!QIcon::hasThemeIcon(QStringLiteral("dialog-ok-apply"))) + m_Ui->toolButtonApplyMask->setIcon( + QIcon(":/program-icons/dialog-ok-apply")); + if (!QIcon::hasThemeIcon(QStringLiteral("arrow-up"))) m_Ui->prevBothButton->setIcon(QIcon(":/program-icons/uparrow")); - if ( !QIcon::hasThemeIcon("arrow-down") ) + if (!QIcon::hasThemeIcon(QStringLiteral("arrow-down"))) m_Ui->nextBothButton->setIcon(QIcon(":/program-icons/downarrow")); for (int i = 0; i < agGridSize; i++) - for (int j = 0; j < agGridSize; j++) - m_patches[i][j] = false; + for (int j = 0; j < agGridSize; j++) m_patches[i][j] = false; HdrCreationItemContainer data = m_hcm->getData(); - for ( HdrCreationItemContainer::iterator it = data.begin(), - itEnd = data.end(); it != itEnd; ++it) { + for (HdrCreationItemContainer::iterator it = data.begin(), + itEnd = data.end(); + it != itEnd; ++it) { m_originalImagesList.push_back(&it->qimage()); m_fileList.push_back(it->filename()); } int width = m_originalImagesList.at(0)->width(); int height = m_originalImagesList.at(0)->height(); - m_gridX = width/agGridSize; - m_gridY = height/agGridSize; + m_gridX = width / agGridSize; + m_gridY = height / agGridSize; int size = m_originalImagesList.size(); - for ( int h = 0; h < size; h++) { + for (int h = 0; h < size; h++) { QImage *img = new QImage(width, height, QImage::Format_ARGB32); - img->fill(qRgba(0,0,0,0)); + img->fill(qRgba(0, 0, 0, 0)); m_antiGhostingMasksList.append(img); } m_antiGhostingMask = new QImage(width, height, QImage::Format_ARGB32); - m_antiGhostingMask->fill(qRgba(0,0,0,0)); + m_antiGhostingMask->fill(qRgba(0, 0, 0, 0)); m_expotimes = m_hcm->getExpotimes(); - //m_Ui->toolOptionsFrame->setVisible(false); + // m_Ui->toolOptionsFrame->setVisible(false); m_Ui->maskColorButton->setVisible(false); m_Ui->lassoColorButton->setVisible(false); - QColor maskcolor = QColor(m_luminanceOptions.value(KEY_MANUAL_AG_MASK_COLOR,0x00FF0000).toUInt()); - QColor lassocolor = QColor(m_luminanceOptions.value(KEY_MANUAL_AG_LASSO_COLOR,0x000000FF).toUInt()); - Qt::ToolButtonStyle style = (Qt::ToolButtonStyle) m_luminanceOptions.value(KEY_TOOLBAR_MODE,Qt::ToolButtonTextUnderIcon).toInt(); - m_Ui->maskColorButton->setStyleSheet("background: rgb("+QString("%1").arg(maskcolor.red())+","+QString("%1").arg(maskcolor.green())+","+QString("%1").arg(maskcolor.blue())+")"); - m_Ui->lassoColorButton->setStyleSheet("background: rgb("+QString("%1").arg(lassocolor.red())+","+QString("%1").arg(lassocolor.green())+","+QString("%1").arg(lassocolor.blue())+")"); - assert(m_originalImagesList.size()==m_fileList.size()); + QColor maskcolor = + QColor(m_luminanceOptions.value(KEY_MANUAL_AG_MASK_COLOR, 0x00FF0000) + .toUInt()); + QColor lassocolor = + QColor(m_luminanceOptions.value(KEY_MANUAL_AG_LASSO_COLOR, 0x000000FF) + .toUInt()); + Qt::ToolButtonStyle style = + (Qt::ToolButtonStyle)m_luminanceOptions + .value(KEY_TOOLBAR_MODE, Qt::ToolButtonTextUnderIcon) + .toInt(); + m_Ui->maskColorButton->setStyleSheet( + "background: rgb(" + QStringLiteral("%1").arg(maskcolor.red()) + "," + + QStringLiteral("%1").arg(maskcolor.green()) + "," + + QStringLiteral("%1").arg(maskcolor.blue()) + ")"); + m_Ui->lassoColorButton->setStyleSheet( + "background: rgb(" + QStringLiteral("%1").arg(lassocolor.red()) + "," + + QStringLiteral("%1").arg(lassocolor.green()) + "," + + QStringLiteral("%1").arg(lassocolor.blue()) + ")"); + assert(m_originalImagesList.size() == m_fileList.size()); QVBoxLayout *qvl = new QVBoxLayout; qvl->setMargin(0); qvl->setSpacing(0); - m_previewWidget = new PreviewWidget(this, m_originalImagesList[1],m_originalImagesList[0]); + m_previewWidget = new PreviewWidget(this, m_originalImagesList[1], + m_originalImagesList[0]); m_previewWidget->setMask(m_antiGhostingMasksList[0]); m_previewWidget->setBrushColor(maskcolor); m_previewWidget->setLassoColor(lassocolor); @@ -133,7 +151,7 @@ m_Ui->previewImageFrame->setLayout(qvl); int idx = 0; - foreach(QString s,m_fileList) { + foreach (QString s, m_fileList) { m_filesMap[QFileInfo(s).fileName()] = idx++; m_Ui->movableListWidget->addItem(QFileInfo(s).fileName()); m_Ui->referenceListWidget->addItem(QFileInfo(s).fileName()); @@ -151,75 +169,113 @@ m_Ui->toolButtonPaint->setToolButtonStyle(style); m_Ui->toolButtonPath->setToolButtonStyle(style); - //m_Ui->drawingModeFrame->hide(); + // m_Ui->drawingModeFrame->hide(); QStringList::ConstIterator it = m_fileList.begin(); - while( it != m_fileList.end() ) { - m_HV_offsets.append(qMakePair(0,0)); + while (it != m_fileList.constEnd()) { + m_HV_offsets.append(qMakePair(0, 0)); ++it; } - m_histogram=new HistogramLDR(this); - m_histogram->setData( m_originalImagesList.at(1) ); + m_histogram = new HistogramLDR(this); + m_histogram->setData(m_originalImagesList.at(1)); m_histogram->adjustSize(); - ((QGridLayout*)(m_Ui->groupBoxHistogram->layout()))->addWidget(m_histogram); + ((QGridLayout *)(m_Ui->groupBoxHistogram->layout())) + ->addWidget(m_histogram); m_previewWidget->setFocus(); m_Ui->autoAG_checkBox->setChecked(m_doAutoAntighosting); setupConnections(); -} //end of constructor +} // end of constructor void EditingTools::setupConnections() { - connect(m_Ui->upToolButton,SIGNAL(clicked()),this,SLOT(upClicked())); - connect(m_Ui->rightToolButton,SIGNAL(clicked()),this,SLOT(rightClicked())); - connect(m_Ui->downToolButton,SIGNAL(clicked()),this,SLOT(downClicked())); - connect(m_Ui->leftToolButton,SIGNAL(clicked()),this,SLOT(leftClicked())); - connect(m_Ui->horizShiftSB,SIGNAL(valueChanged(int)),this,SLOT(horizShiftChanged(int))); - connect(m_Ui->vertShiftSB,SIGNAL(valueChanged(int)),this,SLOT(vertShiftChanged(int))); - connect(m_Ui->resetButton,SIGNAL(clicked()),this,SLOT(resetCurrent())); - connect(m_Ui->resetAllButton,SIGNAL(clicked()),this,SLOT(resetAll())); - - connect(m_Ui->movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); - connect(m_Ui->referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); - connect(m_Ui->prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); - connect(m_Ui->nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); - - connect(m_Ui->whatsThisButton,SIGNAL(clicked()),this,SLOT(enterWhatsThis())); - connect(m_Ui->fitButton,SIGNAL(clicked()),this,SLOT(fitPreview())); - connect(m_Ui->origSizeButton,SIGNAL(clicked()),this,SLOT(origSize())); - connect(m_Ui->fillButton,SIGNAL(clicked()),this,SLOT(fillPreview())); - connect(m_Ui->cropButton,SIGNAL(clicked()),this,SLOT(cropStack())); - connect(m_previewWidget,SIGNAL(selectionReady(bool)),m_Ui->cropButton,SLOT(setEnabled(bool))); - connect(m_previewWidget,SIGNAL(patchesEdited()),this,SLOT(setPatchesEdited())); - connect(m_Ui->saveImagesButton,SIGNAL(clicked()),this,SLOT(saveImagesButtonClicked())); - connect(m_Ui->blendModeCB,SIGNAL(currentIndexChanged(int)),m_previewWidget,SLOT(requestedBlendMode(int))); - connect(m_Ui->blendModeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(blendModeCBIndexChanged(int))); - //connect(antighostToolButton,SIGNAL(toggled(bool)),toolOptionsFrame,SLOT(setVisible(bool))); - //connect(m_Ui->antighostToolButton,SIGNAL(toggled(bool)),m_Ui->drawingModeFrame,SLOT(setVisible(bool))); - connect(m_Ui->antighostToolButton,SIGNAL(toggled(bool)),m_previewWidget,SLOT(switchAntighostingMode(bool))); - connect(m_Ui->antighostToolButton,SIGNAL(toggled(bool)),this,SLOT(antighostToolButtonToggled(bool))); - connect(m_Ui->toolButtonPaint,SIGNAL(toggled(bool)),this,SLOT(antighostToolButtonPaintToggled(bool))); - connect(m_Ui->agBrushSizeQSpinbox,SIGNAL(valueChanged(int)),m_previewWidget,SLOT(setBrushSize(int))); - connect(m_Ui->agBrushStrengthQSpinbox,SIGNAL(valueChanged(int)),m_previewWidget,SLOT(setBrushStrength(int))); - connect(m_Ui->maskColorButton,SIGNAL(clicked()),this,SLOT(maskColorButtonClicked())); - connect(m_Ui->lassoColorButton,SIGNAL(clicked()),this,SLOT(lassoColorButtonClicked())); - connect(m_Ui->toolButtonSaveMask,SIGNAL(clicked()),m_previewWidget,SLOT(saveAgMask())); - connect(m_Ui->toolButtonSaveMask,SIGNAL(clicked()),this,SLOT(saveAgMask())); - connect(m_Ui->toolButtonApplyMask,SIGNAL(clicked()),this,SLOT(applySavedAgMask())); - connect(m_Ui->threshold_horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(updateThresholdSlider(int))); - connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateThresholdSpinBox(double))); - - connect(m_Ui->Next_Finishbutton,SIGNAL(clicked()),this,SLOT(nextClicked())); - //connect(m_previewWidget, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); - connect(m_Ui->removeMaskRadioButton,SIGNAL(toggled(bool)),m_previewWidget,SLOT(setBrushMode(bool))); + connect(m_Ui->upToolButton, &QAbstractButton::clicked, this, + &EditingTools::upClicked); + connect(m_Ui->rightToolButton, &QAbstractButton::clicked, this, + &EditingTools::rightClicked); + connect(m_Ui->downToolButton, &QAbstractButton::clicked, this, + &EditingTools::downClicked); + connect(m_Ui->leftToolButton, &QAbstractButton::clicked, this, + &EditingTools::leftClicked); + connect(m_Ui->horizShiftSB, SIGNAL(valueChanged(int)), this, + SLOT(horizShiftChanged(int))); + connect(m_Ui->vertShiftSB, SIGNAL(valueChanged(int)), this, + SLOT(vertShiftChanged(int))); + connect(m_Ui->resetButton, &QAbstractButton::clicked, this, + &EditingTools::resetCurrent); + connect(m_Ui->resetAllButton, &QAbstractButton::clicked, this, + &EditingTools::resetAll); + + connect(m_Ui->movableListWidget, &QListWidget::currentRowChanged, this, + &EditingTools::updateMovable); + connect(m_Ui->referenceListWidget, &QListWidget::currentRowChanged, this, + &EditingTools::updatePivot); + connect(m_Ui->prevBothButton, &QAbstractButton::clicked, this, + &EditingTools::prevBoth); + connect(m_Ui->nextBothButton, &QAbstractButton::clicked, this, + &EditingTools::nextBoth); + + connect(m_Ui->whatsThisButton, &QAbstractButton::clicked, this, + &EditingTools::enterWhatsThis); + connect(m_Ui->fitButton, &QAbstractButton::clicked, this, + &EditingTools::fitPreview); + connect(m_Ui->origSizeButton, &QAbstractButton::clicked, this, + &EditingTools::origSize); + connect(m_Ui->fillButton, &QAbstractButton::clicked, this, + &EditingTools::fillPreview); + connect(m_Ui->cropButton, &QAbstractButton::clicked, this, + &EditingTools::cropStack); + connect(m_previewWidget, &PreviewWidget::selectionReady, m_Ui->cropButton, + &QWidget::setEnabled); + connect(m_previewWidget, &PreviewWidget::patchesEdited, this, + &EditingTools::setPatchesEdited); + connect(m_Ui->saveImagesButton, &QAbstractButton::clicked, this, + &EditingTools::saveImagesButtonClicked); + connect(m_Ui->blendModeCB, SIGNAL(currentIndexChanged(int)), + m_previewWidget, SLOT(requestedBlendMode(int))); + connect(m_Ui->blendModeCB, SIGNAL(currentIndexChanged(int)), this, + SLOT(blendModeCBIndexChanged(int))); + // connect(antighostToolButton,SIGNAL(toggled(bool)),toolOptionsFrame,SLOT(setVisible(bool))); + // connect(m_Ui->antighostToolButton,SIGNAL(toggled(bool)),m_Ui->drawingModeFrame,SLOT(setVisible(bool))); + connect(m_Ui->antighostToolButton, &QAbstractButton::toggled, + m_previewWidget, &PreviewWidget::switchAntighostingMode); + connect(m_Ui->antighostToolButton, &QAbstractButton::toggled, this, + &EditingTools::antighostToolButtonToggled); + connect(m_Ui->toolButtonPaint, &QAbstractButton::toggled, this, + &EditingTools::antighostToolButtonPaintToggled); + connect(m_Ui->agBrushSizeQSpinbox, SIGNAL(valueChanged(int)), + m_previewWidget, SLOT(setBrushSize(int))); + connect(m_Ui->agBrushStrengthQSpinbox, SIGNAL(valueChanged(int)), + m_previewWidget, SLOT(setBrushStrength(int))); + connect(m_Ui->maskColorButton, &QAbstractButton::clicked, this, + &EditingTools::maskColorButtonClicked); + connect(m_Ui->lassoColorButton, &QAbstractButton::clicked, this, + &EditingTools::lassoColorButtonClicked); + connect(m_Ui->toolButtonSaveMask, &QAbstractButton::clicked, + m_previewWidget, &PreviewWidget::saveAgMask); + connect(m_Ui->toolButtonSaveMask, &QAbstractButton::clicked, this, + &EditingTools::saveAgMask); + connect(m_Ui->toolButtonApplyMask, &QAbstractButton::clicked, this, + &EditingTools::applySavedAgMask); + connect(m_Ui->threshold_horizontalSlider, &QAbstractSlider::valueChanged, + this, &EditingTools::updateThresholdSlider); + connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, + SLOT(updateThresholdSpinBox(double))); + + connect(m_Ui->Next_Finishbutton, &QAbstractButton::clicked, this, + &EditingTools::nextClicked); + // connect(m_previewWidget, SIGNAL(moved(QPoint)), this, + // SLOT(updateScrollBars(QPoint))); + connect(m_Ui->removeMaskRadioButton, &QAbstractButton::toggled, + m_previewWidget, &PreviewWidget::setBrushMode); - connect(m_hcm, SIGNAL(imagesSaved()), this, SLOT(restoreSaveImagesButtonState())); + connect(m_hcm, &HdrCreationManager::imagesSaved, this, + &EditingTools::restoreSaveImagesButtonState); } -EditingTools::~EditingTools() -{ +EditingTools::~EditingTools() { delete m_previewWidget; delete m_histogram; delete m_patchesMask; @@ -227,47 +283,43 @@ delete m_antiGhostingMask; } -void EditingTools::keyPressEvent(QKeyEvent *event) -{ - int key=event->key(); - Qt::KeyboardModifiers mods=event->modifiers(); - if ((mods & Qt::ShiftModifier)!=0 && (mods & Qt::ControlModifier)!=0) - m_additionalShiftValue=99; +void EditingTools::keyPressEvent(QKeyEvent *event) { + int key = event->key(); + Qt::KeyboardModifiers mods = event->modifiers(); + if ((mods & Qt::ShiftModifier) != 0 && (mods & Qt::ControlModifier) != 0) + m_additionalShiftValue = 99; else if (mods & Qt::ControlModifier) - m_additionalShiftValue=49; + m_additionalShiftValue = 49; else if (mods & Qt::ShiftModifier) - m_additionalShiftValue=9; + m_additionalShiftValue = 9; - if (key==Qt::Key_W||key==Qt::Key_I) + if (key == Qt::Key_W || key == Qt::Key_I) upClicked(); - else if (key==Qt::Key_S||key==Qt::Key_K) + else if (key == Qt::Key_S || key == Qt::Key_K) downClicked(); - else if (key==Qt::Key_D||key==Qt::Key_L) + else if (key == Qt::Key_D || key == Qt::Key_L) rightClicked(); - else if (key==Qt::Key_A||key==Qt::Key_J) + else if (key == Qt::Key_A || key == Qt::Key_J) leftClicked(); - if (key==Qt::Key_Escape) - reject(); + if (key == Qt::Key_Escape) reject(); } -void EditingTools::keyReleaseEvent ( QKeyEvent * event ) -{ - m_additionalShiftValue=0; +void EditingTools::keyReleaseEvent(QKeyEvent *event) { + m_additionalShiftValue = 0; event->ignore(); } -void EditingTools::cropStack() -{ - //zoom the image to 1:1, so that the crop area is in a one-to-one relationship with the pixel coordinates. +void EditingTools::cropStack() { + // zoom the image to 1:1, so that the crop area is in a one-to-one + // relationship with the pixel coordinates. origSize(); m_hcm->applyShiftsToItems(m_HV_offsets); resetAll(); QRect ca = m_previewWidget->getSelectionRect(); - if(ca.width()<=0 || ca.height()<=0) - return; + if (ca.width() <= 0 || ca.height() <= 0) return; - QImage* tmp = m_previewWidget->getMask(); + QImage *tmp = m_previewWidget->getMask(); delete m_antiGhostingMasksList[m_currentAgMaskIndex]; m_antiGhostingMasksList.replace(m_currentAgMaskIndex, tmp); cropAgMasks(ca); @@ -275,79 +327,77 @@ m_originalImagesList.clear(); HdrCreationItemContainer data = m_hcm->getData(); for (HdrCreationItemContainer::iterator it = data.begin(), - itEnd = data.end(); it != itEnd; ++it) - { + itEnd = data.end(); + it != itEnd; ++it) { m_originalImagesList.push_back(&it->qimage()); } int width = m_originalImagesList.at(0)->width(); int height = m_originalImagesList.at(0)->height(); - m_gridX = width/agGridSize; - m_gridY = height/agGridSize; + m_gridX = width / agGridSize; + m_gridY = height / agGridSize; m_previewWidget->removeSelection(); - m_previewWidget->setMovable(m_originalImagesList[m_Ui->movableListWidget->currentRow()]); - m_previewWidget->setPivot(m_originalImagesList[m_Ui->referenceListWidget->currentRow()]); + m_previewWidget->setMovable( + m_originalImagesList[m_Ui->movableListWidget->currentRow()]); + m_previewWidget->setPivot( + m_originalImagesList[m_Ui->referenceListWidget->currentRow()]); m_currentAgMaskIndex = m_Ui->movableListWidget->currentRow(); m_previewWidget->setMask(m_antiGhostingMasksList[m_currentAgMaskIndex]); - //restore fit - if (m_Ui->fitButton->isChecked()) - fitPreview(); - //and start it up + // restore fit + if (m_Ui->fitButton->isChecked()) fitPreview(); + // and start it up m_previewWidget->updatePreviewImage(); } -void EditingTools::cropAgMasks(const QRect& ca) { +void EditingTools::cropAgMasks(const QRect &ca) { int origlistsize = m_antiGhostingMasksList.size(); for (int image_idx = 0; image_idx < origlistsize; image_idx++) { QImage *newimage = new QImage(m_antiGhostingMasksList.at(0)->copy(ca)); - if (newimage == NULL) - exit(1); // TODO: exit gracefully + if (newimage == NULL) exit(1); // TODO: exit gracefully m_antiGhostingMasksList.append(newimage); delete m_antiGhostingMasksList.takeAt(0); } } -void EditingTools::computeAgMask() -{ +void EditingTools::computeAgMask() { const int width = m_antiGhostingMasksList.at(0)->width(); const int height = m_antiGhostingMasksList.at(0)->height(); const int size = m_antiGhostingMasksList.size(); - QImage* tmp = m_previewWidget->getMask(); + QImage *tmp = m_previewWidget->getMask(); delete m_antiGhostingMasksList[m_currentAgMaskIndex]; m_antiGhostingMasksList.replace(m_currentAgMaskIndex, tmp); for (int h = 0; h < size; h++) { for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { - if (qAlpha(m_antiGhostingMasksList.at(h)->pixel(i,j)) != 0) - m_antiGhostingMask->setPixel(i, j, m_antiGhostingMasksList.at(h)->pixel(i, j)); + if (qAlpha(m_antiGhostingMasksList.at(h)->pixel(i, j)) != 0) + m_antiGhostingMask->setPixel( + i, j, m_antiGhostingMasksList.at(h)->pixel(i, j)); } } } } -void EditingTools::nextClicked() -{ +void EditingTools::nextClicked() { m_Ui->Next_Finishbutton->setEnabled(false); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - if (!m_imagesSaved) - m_hcm->applyShiftsToItems(m_HV_offsets); + if (!m_imagesSaved) m_hcm->applyShiftsToItems(m_HV_offsets); if (m_doAutoAntighosting) { QStringList::ConstIterator it = m_fileList.begin(); - while( it != m_fileList.end() ) { - m_HV_offsets.append(qMakePair(0,0)); + while (it != m_fileList.constEnd()) { + m_HV_offsets.append(qMakePair(0, 0)); ++it; } if (m_patchesEdited) { m_previewWidget->getPatches(m_patches); m_hcm->setPatches(m_patches); - } - else { + } else { float patchesPercent; - m_agGoodImageIndex = m_hcm->computePatches(m_Ui->threshold_doubleSpinBox->value(), m_patches, patchesPercent, m_HV_offsets); + m_agGoodImageIndex = + m_hcm->computePatches(m_Ui->threshold_doubleSpinBox->value(), + m_patches, patchesPercent, m_HV_offsets); } - } - else if (m_agGoodImageIndex != -1) { + } else if (m_agGoodImageIndex != -1) { computeAgMask(); m_hcm->setAntiGhostingMask(m_antiGhostingMask); m_doManualAntighosting = true; @@ -357,11 +407,12 @@ emit accept(); } -void EditingTools::updateMovable(int newidx) -{ - //inform display_widget of the change - m_previewWidget->setMovable(m_originalImagesList[newidx], m_HV_offsets[newidx].first, m_HV_offsets[newidx].second); - //prevent a change in the spinboxes to start a useless calculation +void EditingTools::updateMovable(int newidx) { + // inform display_widget of the change + m_previewWidget->setMovable(m_originalImagesList[newidx], + m_HV_offsets[newidx].first, + m_HV_offsets[newidx].second); + // prevent a change in the spinboxes to start a useless calculation m_Ui->horizShiftSB->blockSignals(true); m_Ui->horizShiftSB->setValue(m_HV_offsets[newidx].first); m_Ui->horizShiftSB->blockSignals(false); @@ -374,30 +425,36 @@ } void EditingTools::updatePivot(int newidx) { - m_previewWidget->setPivot(m_originalImagesList[newidx],m_HV_offsets[newidx].first, m_HV_offsets[newidx].second); + m_previewWidget->setPivot(m_originalImagesList[newidx], + m_HV_offsets[newidx].first, + m_HV_offsets[newidx].second); m_previewWidget->updatePreviewImage(); } void EditingTools::upClicked() { - m_Ui->vertShiftSB->setValue(m_Ui->vertShiftSB->value()-1-m_additionalShiftValue); + m_Ui->vertShiftSB->setValue(m_Ui->vertShiftSB->value() - 1 - + m_additionalShiftValue); } void EditingTools::downClicked() { - m_Ui->vertShiftSB->setValue(m_Ui->vertShiftSB->value()+1+m_additionalShiftValue); + m_Ui->vertShiftSB->setValue(m_Ui->vertShiftSB->value() + 1 + + m_additionalShiftValue); } void EditingTools::rightClicked() { - m_Ui->horizShiftSB->setValue(m_Ui->horizShiftSB->value()+1+m_additionalShiftValue); + m_Ui->horizShiftSB->setValue(m_Ui->horizShiftSB->value() + 1 + + m_additionalShiftValue); } void EditingTools::leftClicked() { - m_Ui->horizShiftSB->setValue(m_Ui->horizShiftSB->value()-1-m_additionalShiftValue); + m_Ui->horizShiftSB->setValue(m_Ui->horizShiftSB->value() - 1 - + m_additionalShiftValue); } void EditingTools::vertShiftChanged(int v) { - m_HV_offsets[m_Ui->movableListWidget->currentRow()].second=v; + m_HV_offsets[m_Ui->movableListWidget->currentRow()].second = v; m_previewWidget->updateVertShiftMovable(v); m_previewWidget->updatePreviewImage(); } void EditingTools::horizShiftChanged(int v) { - m_HV_offsets[m_Ui->movableListWidget->currentRow()].first=v; + m_HV_offsets[m_Ui->movableListWidget->currentRow()].first = v; m_previewWidget->updateHorizShiftMovable(v); m_previewWidget->updatePreviewImage(); } @@ -405,30 +462,35 @@ void EditingTools::resetCurrent() { m_Ui->horizShiftSB->setValue(0); m_Ui->vertShiftSB->setValue(0); -// m_previewWidget->updateVertShiftMovable(0); -// m_previewWidget->updateHorizShiftMovable(0); + // m_previewWidget->updateVertShiftMovable(0); + // m_previewWidget->updateHorizShiftMovable(0); } void EditingTools::resetAll() { for (int i = 0; i < m_HV_offsets.size(); ++i) { - m_HV_offsets[i].first=0; - m_HV_offsets[i].second=0; + m_HV_offsets[i].first = 0; + m_HV_offsets[i].second = 0; } - //prevent a change in the spinboxes to start a useless calculation - //horizShiftSB->blockSignals(true); - //vertShiftSB->blockSignals(true); - resetCurrent(); //graphical update - //horizShiftSB->blockSignals(false); - //vertShiftSB->blockSignals(false); + // prevent a change in the spinboxes to start a useless calculation + // horizShiftSB->blockSignals(true); + // vertShiftSB->blockSignals(true); + resetCurrent(); // graphical update + // horizShiftSB->blockSignals(false); + // vertShiftSB->blockSignals(false); } void EditingTools::prevLeft() { - int prev=(m_Ui->movableListWidget->currentRow()==0) ? m_Ui->movableListWidget->count()-1 : m_Ui->movableListWidget->currentRow()-1; + int prev = (m_Ui->movableListWidget->currentRow() == 0) + ? m_Ui->movableListWidget->count() - 1 + : m_Ui->movableListWidget->currentRow() - 1; m_Ui->movableListWidget->setCurrentRow(prev); } void EditingTools::nextLeft() { - int next=(m_Ui->movableListWidget->currentRow()==m_Ui->movableListWidget->count()-1) ? 0 : m_Ui->movableListWidget->currentRow()+1; + int next = (m_Ui->movableListWidget->currentRow() == + m_Ui->movableListWidget->count() - 1) + ? 0 + : m_Ui->movableListWidget->currentRow() + 1; m_Ui->movableListWidget->setCurrentRow(next); } @@ -443,45 +505,39 @@ } void EditingTools::prevRight() { - int prev=(m_Ui->referenceListWidget->currentRow()==0) ? m_Ui->referenceListWidget->count()-1 : m_Ui->referenceListWidget->currentRow()-1; + int prev = (m_Ui->referenceListWidget->currentRow() == 0) + ? m_Ui->referenceListWidget->count() - 1 + : m_Ui->referenceListWidget->currentRow() - 1; m_Ui->referenceListWidget->setCurrentRow(prev); } void EditingTools::nextRight() { - int next=(m_Ui->referenceListWidget->currentRow()==m_Ui->referenceListWidget->count()-1) ? 0 : m_Ui->referenceListWidget->currentRow()+1; + int next = (m_Ui->referenceListWidget->currentRow() == + m_Ui->referenceListWidget->count() - 1) + ? 0 + : m_Ui->referenceListWidget->currentRow() + 1; m_Ui->referenceListWidget->setCurrentRow(next); } -void EditingTools::enterWhatsThis() { - QWhatsThis::enterWhatsThisMode(); -} +void EditingTools::enterWhatsThis() { QWhatsThis::enterWhatsThisMode(); } -void EditingTools::zoomIn() { - m_previewWidget->zoomIn(); -} +void EditingTools::zoomIn() { m_previewWidget->zoomIn(); } -void EditingTools::zoomOut() { - m_previewWidget->zoomOut(); -} +void EditingTools::zoomOut() { m_previewWidget->zoomOut(); } -void EditingTools::fitPreview() { - m_previewWidget->fitToWindow(); -} +void EditingTools::fitPreview() { m_previewWidget->fitToWindow(); } -void EditingTools::fillPreview() { - m_previewWidget->fillToWindow(); -} -void EditingTools::origSize() { - m_previewWidget->normalSize(); -} +void EditingTools::fillPreview() { m_previewWidget->fillToWindow(); } +void EditingTools::origSize() { m_previewWidget->normalSize(); } void EditingTools::antighostToolButtonToggled(bool toggled) { m_previewWidget->update(); - toggled ? m_previewWidget->setSelectionTool(false) : m_previewWidget->setSelectionTool(true); + toggled ? m_previewWidget->setSelectionTool(false) + : m_previewWidget->setSelectionTool(true); if (toggled) { m_Ui->stackedWidget->setCurrentIndex(1); m_antiGhosting = true; - QImage* tmp = m_previewWidget->getMask(); + QImage *tmp = m_previewWidget->getMask(); delete m_antiGhostingMasksList[m_currentAgMaskIndex]; m_antiGhostingMasksList.replace(m_currentAgMaskIndex, tmp); m_currentAgMaskIndex = m_Ui->movableListWidget->currentRow(); @@ -490,56 +546,77 @@ m_Ui->label_editable_list->setText(tr("Maskable")); m_Ui->label_reference_list->setText(tr("Good image")); m_Ui->saveImagesButton->setDisabled(true); - m_Ui->prevBothButton->setIcon(QIcon::fromTheme("go-next", QIcon(":/program-icons/go-next"))); - m_Ui->nextBothButton->setIcon(QIcon::fromTheme("go-previous", QIcon(":/program-icons/go-previous"))); + m_Ui->prevBothButton->setIcon(QIcon::fromTheme( + QStringLiteral("go-next"), QIcon(":/program-icons/go-next"))); + m_Ui->nextBothButton->setIcon( + QIcon::fromTheme(QStringLiteral("go-previous"), + QIcon(":/program-icons/go-previous"))); m_Ui->prevBothButton->setToolTip(tr("Add good image")); m_Ui->nextBothButton->setToolTip(tr("Remove good image")); m_Ui->nextBothButton->setDisabled(true); - disconnect(m_Ui->prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); - disconnect(m_Ui->nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); - disconnect(m_Ui->movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); - disconnect(m_Ui->referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); - connect(m_Ui->prevBothButton,SIGNAL(clicked()),this,SLOT(addGoodImage())); - connect(m_Ui->nextBothButton,SIGNAL(clicked()),this,SLOT(removeGoodImage())); + disconnect(m_Ui->prevBothButton, &QAbstractButton::clicked, this, + &EditingTools::prevBoth); + disconnect(m_Ui->nextBothButton, &QAbstractButton::clicked, this, + &EditingTools::nextBoth); + disconnect(m_Ui->movableListWidget, &QListWidget::currentRowChanged, + this, &EditingTools::updateMovable); + disconnect(m_Ui->referenceListWidget, &QListWidget::currentRowChanged, + this, &EditingTools::updatePivot); + connect(m_Ui->prevBothButton, &QAbstractButton::clicked, this, + &EditingTools::addGoodImage); + connect(m_Ui->nextBothButton, &QAbstractButton::clicked, this, + &EditingTools::removeGoodImage); m_Ui->referenceListWidget->clear(); if (m_agGoodImageIndex != -1) { m_previewWidget->show(); m_Ui->prevBothButton->setDisabled(true); m_Ui->nextBothButton->setDisabled(false); - m_Ui->referenceListWidget->addItem(QFileInfo(m_fileList[m_agGoodImageIndex]).fileName()); + m_Ui->referenceListWidget->addItem( + QFileInfo(m_fileList[m_agGoodImageIndex]).fileName()); m_Ui->referenceListWidget->setCurrentRow(0); - //movableListWidget->setCurrentRow(0); + // movableListWidget->setCurrentRow(0); updatePivot(m_agGoodImageIndex); QString filename = m_Ui->movableListWidget->currentItem()->text(); int idx = m_filesMap[filename]; updateMovable(idx); m_previewWidget->updatePreviewImage(); } - connect(m_Ui->movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateAgMask(int))); - } - else { + connect(m_Ui->movableListWidget, &QListWidget::currentRowChanged, this, + &EditingTools::updateAgMask); + } else { m_Ui->stackedWidget->setCurrentIndex(0); m_antiGhosting = false; m_previewWidget->show(); - disconnect(m_Ui->movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateAgMask(int))); + disconnect(m_Ui->movableListWidget, &QListWidget::currentRowChanged, + this, &EditingTools::updateAgMask); m_Ui->label_editable_list->setText(tr("Ed&itable")); m_Ui->label_reference_list->setText(tr("R&eference")); - m_Ui->prevBothButton->setIcon(QIcon::fromTheme("arrow-up", QIcon(":/program-icons/uparrow"))); - m_Ui->nextBothButton->setIcon(QIcon::fromTheme("arrow-down", QIcon(":/program-icons/downarrow"))); - m_Ui->prevBothButton->setToolTip(tr("Select the previous image in both lists")); - m_Ui->nextBothButton->setToolTip(tr("Select the next image in both lists")); + m_Ui->prevBothButton->setIcon(QIcon::fromTheme( + QStringLiteral("arrow-up"), QIcon(":/program-icons/uparrow"))); + m_Ui->nextBothButton->setIcon(QIcon::fromTheme( + QStringLiteral("arrow-down"), QIcon(":/program-icons/downarrow"))); + m_Ui->prevBothButton->setToolTip( + tr("Select the previous image in both lists")); + m_Ui->nextBothButton->setToolTip( + tr("Select the next image in both lists")); m_Ui->prevBothButton->setDisabled(false); m_Ui->nextBothButton->setDisabled(false); m_Ui->saveImagesButton->setDisabled(false); m_Ui->movableListWidget->clear(); m_Ui->referenceListWidget->clear(); - disconnect(m_Ui->prevBothButton,SIGNAL(clicked()),this,SLOT(addGoodImage())); - disconnect(m_Ui->nextBothButton,SIGNAL(clicked()),this,SLOT(removeGoodImage())); - connect(m_Ui->prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); - connect(m_Ui->nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); - connect(m_Ui->movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); - connect(m_Ui->referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); - foreach(QString s,m_fileList) { + disconnect(m_Ui->prevBothButton, &QAbstractButton::clicked, this, + &EditingTools::addGoodImage); + disconnect(m_Ui->nextBothButton, &QAbstractButton::clicked, this, + &EditingTools::removeGoodImage); + connect(m_Ui->prevBothButton, &QAbstractButton::clicked, this, + &EditingTools::prevBoth); + connect(m_Ui->nextBothButton, &QAbstractButton::clicked, this, + &EditingTools::nextBoth); + connect(m_Ui->movableListWidget, &QListWidget::currentRowChanged, this, + &EditingTools::updateMovable); + connect(m_Ui->referenceListWidget, &QListWidget::currentRowChanged, + this, &EditingTools::updatePivot); + foreach (QString s, m_fileList) { m_Ui->movableListWidget->addItem(QFileInfo(s).fileName()); m_Ui->referenceListWidget->addItem(QFileInfo(s).fileName()); } @@ -552,8 +629,12 @@ QColor returned = QColorDialog::getColor(); if (returned.isValid()) { m_previewWidget->setBrushColor(returned); - m_Ui->maskColorButton->setStyleSheet(QString("background: rgb(%1,%2,%3)").arg(returned.red()).arg(returned.green()).arg(returned.blue())); - m_luminanceOptions.setValue(KEY_MANUAL_AG_MASK_COLOR,returned.rgb()); + m_Ui->maskColorButton->setStyleSheet( + QStringLiteral("background: rgb(%1,%2,%3)") + .arg(returned.red()) + .arg(returned.green()) + .arg(returned.blue())); + m_luminanceOptions.setValue(KEY_MANUAL_AG_MASK_COLOR, returned.rgb()); } } @@ -561,8 +642,12 @@ QColor returned = QColorDialog::getColor(); if (returned.isValid()) { m_previewWidget->setLassoColor(returned); - m_Ui->lassoColorButton->setStyleSheet(QString("background: rgb(%1,%2,%3)").arg(returned.red()).arg(returned.green()).arg(returned.blue())); - m_luminanceOptions.setValue(KEY_MANUAL_AG_LASSO_COLOR,returned.rgb()); + m_Ui->lassoColorButton->setStyleSheet( + QStringLiteral("background: rgb(%1,%2,%3)") + .arg(returned.red()) + .arg(returned.green()) + .arg(returned.blue())); + m_luminanceOptions.setValue(KEY_MANUAL_AG_LASSO_COLOR, returned.rgb()); } } @@ -570,20 +655,18 @@ m_Ui->maskColorButton->setVisible(newindex == 4); m_Ui->lassoColorButton->setVisible(newindex == 4); if (newindex == 4 && !m_antiGhosting) - ;//m_agWidget->show(); + ; // m_agWidget->show(); else if (newindex != 4 && !m_antiGhosting) - ;//m_agWidget->hide(); + ; // m_agWidget->hide(); } void EditingTools::saveImagesButtonClicked() { m_Ui->saveImagesButton->setEnabled(false); m_Ui->Next_Finishbutton->setEnabled(false); - QString fnameprefix=QFileDialog::getSaveFileName( - this, - tr("Choose a directory and a prefix"), - m_luminanceOptions.getDefaultPathLdrIn()); - if (fnameprefix.isEmpty()) - return; + QString fnameprefix = QFileDialog::getSaveFileName( + this, tr("Choose a directory and a prefix"), + m_luminanceOptions.getDefaultPathLdrIn()); + if (fnameprefix.isEmpty()) return; QFileInfo qfi(fnameprefix); QFileInfo test(qfi.path()); @@ -591,14 +674,14 @@ m_luminanceOptions.setDefaultPathLdrIn(qfi.path()); if (test.isWritable() && test.exists() && test.isDir()) { - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_hcm->applyShiftsToItems(m_HV_offsets); - m_hcm->saveImages(QFile::encodeName((qfi.path() + "/" + qfi.fileName()))); + m_hcm->saveImages( + QFile::encodeName((qfi.path() + "/" + qfi.fileName()))); } } -void EditingTools::restoreSaveImagesButtonState() -{ +void EditingTools::restoreSaveImagesButtonState() { m_imagesSaved = true; m_Ui->saveImagesButton->setEnabled(true); m_Ui->Next_Finishbutton->setEnabled(true); @@ -606,31 +689,34 @@ m_originalImagesList.clear(); HdrCreationItemContainer data = m_hcm->getData(); - for ( HdrCreationItemContainer::iterator it = data.begin(), - itEnd = data.end(); it != itEnd; ++it) { + for (HdrCreationItemContainer::iterator it = data.begin(), + itEnd = data.end(); + it != itEnd; ++it) { m_originalImagesList.push_back(&it->qimage()); } - m_previewWidget->setMovable(m_originalImagesList[m_Ui->movableListWidget->currentRow()]); - m_previewWidget->setPivot(m_originalImagesList[m_Ui->referenceListWidget->currentRow()]); + m_previewWidget->setMovable( + m_originalImagesList[m_Ui->movableListWidget->currentRow()]); + m_previewWidget->setPivot( + m_originalImagesList[m_Ui->referenceListWidget->currentRow()]); } -void EditingTools::setAntiGhostingWidget(QImage *mask, QPair HV_offset) -{ +void EditingTools::setAntiGhostingWidget(QImage *mask, + QPair HV_offset) { m_previewWidget->setMask(mask); m_previewWidget->setHV_offset(HV_offset); } -void EditingTools::addGoodImage() -{ +void EditingTools::addGoodImage() { QString filename = m_Ui->movableListWidget->currentItem()->text(); int idx = m_filesMap[filename]; int idxGoodImage = m_Ui->movableListWidget->currentRow(); m_Ui->referenceListWidget->addItem(QFileInfo(m_fileList[idx]).fileName()); m_Ui->referenceListWidget->setCurrentRow(0); m_agGoodImageIndex = idx; - m_antiGhostingMasksList[idx]->fill(qRgba(0,0,0,0)); - m_Ui->movableListWidget->item(idxGoodImage)->setBackground(QColor(Qt::yellow)); + m_antiGhostingMasksList[idx]->fill(qRgba(0, 0, 0, 0)); + m_Ui->movableListWidget->item(idxGoodImage) + ->setBackground(QColor(Qt::yellow)); m_Ui->prevBothButton->setDisabled(true); m_Ui->nextBothButton->setDisabled(false); @@ -638,8 +724,7 @@ m_previewWidget->show(); } -void EditingTools::removeGoodImage() -{ +void EditingTools::removeGoodImage() { QString filename = m_Ui->referenceListWidget->currentItem()->text(); int idx = m_filesMap[filename]; m_Ui->movableListWidget->item(idx)->setBackground(QColor(Qt::white)); @@ -650,11 +735,10 @@ m_previewWidget->hide(); } -void EditingTools::updateAgMask(int) -{ +void EditingTools::updateAgMask(int) { QString filename = m_Ui->movableListWidget->currentItem()->text(); int idx = m_filesMap[filename]; - QImage* tmp = m_previewWidget->getMask(); + QImage *tmp = m_previewWidget->getMask(); delete m_antiGhostingMasksList[m_currentAgMaskIndex]; m_antiGhostingMasksList.replace(m_currentAgMaskIndex, tmp); m_currentAgMaskIndex = idx; @@ -662,72 +746,66 @@ updateMovable(idx); } -void EditingTools::saveAgMask() -{ - m_Ui->toolButtonApplyMask->setEnabled(true); -} +void EditingTools::saveAgMask() { m_Ui->toolButtonApplyMask->setEnabled(true); } -void EditingTools::applySavedAgMask() -{ +void EditingTools::applySavedAgMask() { QString filename = m_Ui->movableListWidget->currentItem()->text(); int idx = m_filesMap[filename]; delete m_antiGhostingMasksList[idx]; - m_antiGhostingMasksList[idx] = new QImage(*m_previewWidget->getSavedAgMask()); + m_antiGhostingMasksList[idx] = + new QImage(*m_previewWidget->getSavedAgMask()); m_previewWidget->setMask(m_antiGhostingMasksList[idx]); m_previewWidget->updatePreviewImage(); } -void EditingTools::antighostToolButtonPaintToggled(bool toggled) -{ - (toggled) ? m_previewWidget->setDrawWithBrush() : m_previewWidget->setDrawPath(); +void EditingTools::antighostToolButtonPaintToggled(bool toggled) { + (toggled) ? m_previewWidget->setDrawWithBrush() + : m_previewWidget->setDrawPath(); } -void EditingTools::on_recomputePatches_pushButton_clicked() -{ +void EditingTools::on_recomputePatches_pushButton_clicked() { float patchesPercent; - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_patchesEdited = false; m_Ui->recomputePatches_pushButton->setEnabled(false); - m_agGoodImageIndex = m_hcm->computePatches(m_Ui->threshold_doubleSpinBox->value(), m_patches, patchesPercent, m_HV_offsets); + m_agGoodImageIndex = + m_hcm->computePatches(m_Ui->threshold_doubleSpinBox->value(), m_patches, + patchesPercent, m_HV_offsets); m_previewWidget->switchViewPatchesMode(true, m_patches, m_gridX, m_gridY); m_previewWidget->renderPatchesMask(); - m_Ui->totalPatches_lineEdit->setText(QString::number(patchesPercent,'g', 2)+"%"); + m_Ui->totalPatches_lineEdit->setText( + QString::number(patchesPercent, 'g', 2) + "%"); m_Ui->recomputePatches_pushButton->setEnabled(true); QApplication::restoreOverrideCursor(); } -void EditingTools::on_autoAG_checkBox_toggled(bool toggled) -{ +void EditingTools::on_autoAG_checkBox_toggled(bool toggled) { if (toggled) { m_doAutoAntighosting = true; m_patchesEdited = false; m_Ui->antighostToolButton->setEnabled(false); - m_previewWidget->switchViewPatchesMode(true, m_patches, m_gridX, m_gridY); - } - else { + m_previewWidget->switchViewPatchesMode(true, m_patches, m_gridX, + m_gridY); + } else { m_doAutoAntighosting = false; m_Ui->antighostToolButton->setEnabled(true); - m_previewWidget->switchViewPatchesMode(false, m_patches, m_gridX, m_gridY); + m_previewWidget->switchViewPatchesMode(false, m_patches, m_gridX, + m_gridY); m_agGoodImageIndex = -1; } } -void EditingTools::updateThresholdSlider(int newValue) -{ - float newThreshold = ((float)newValue)/10000.f; +void EditingTools::updateThresholdSlider(int newValue) { + float newThreshold = ((float)newValue) / 10000.f; bool oldState = m_Ui->threshold_doubleSpinBox->blockSignals(true); - m_Ui->threshold_doubleSpinBox->setValue( newThreshold ); + m_Ui->threshold_doubleSpinBox->setValue(newThreshold); m_Ui->threshold_doubleSpinBox->blockSignals(oldState); } -void EditingTools::updateThresholdSpinBox(double newThreshold) -{ +void EditingTools::updateThresholdSpinBox(double newThreshold) { bool oldState = m_Ui->threshold_horizontalSlider->blockSignals(true); - m_Ui->threshold_horizontalSlider->setValue( (int)(newThreshold*10000) ); + m_Ui->threshold_horizontalSlider->setValue((int)(newThreshold * 10000)); m_Ui->threshold_horizontalSlider->blockSignals(oldState); } -void EditingTools::setPatchesEdited() -{ - m_patchesEdited = true; -} +void EditingTools::setPatchesEdited() { m_patchesEdited = true; } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.h luminance-hdr-2.6.0/src/HdrWizard/EditingTools.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/EditingTools.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,10 +31,10 @@ #include #include -#include "PreviewWidget.h" +#include "Common/LuminanceOptions.h" #include "Common/global.h" #include "HdrWizard/HdrCreationManager.h" -#include "Common/LuminanceOptions.h" +#include "PreviewWidget.h" class HistogramLDR; class PanIconWidget; @@ -43,23 +43,26 @@ class EditingToolsDialog; } -class EditingTools : public QDialog -{ -Q_OBJECT -public: - EditingTools(HdrCreationManager *, bool autoAg, QWidget *parent=0); +class EditingTools : public QDialog { + Q_OBJECT + public: + EditingTools(HdrCreationManager *, bool autoAg, QWidget *parent = 0); ~EditingTools(); - bool isAutoAntighostingEnabled() { return m_doAutoAntighosting == true; } - bool isManualAntighostingEnabled() { return m_doManualAntighosting == true; } - int getAgGoodImageIndex() { return m_agGoodImageIndex; } -protected: + bool isAutoAntighostingEnabled() { return m_doAutoAntighosting == true; } + bool isManualAntighostingEnabled() { + return m_doManualAntighosting == true; + } + int getAgGoodImageIndex() { return m_agGoodImageIndex; } + + protected: void keyPressEvent(QKeyEvent *); void keyReleaseEvent(QKeyEvent *); -private: + + private: QScopedPointer m_Ui; - QList m_originalImagesList; - QList m_antiGhostingMasksList; - QImage* m_antiGhostingMask; + QList m_originalImagesList; + QList m_antiGhostingMasksList; + QImage *m_antiGhostingMask; int m_currentAgMaskIndex; QStringList m_fileList; HdrCreationManager *m_hcm; @@ -67,7 +70,7 @@ QScrollArea *m_scrollArea; PreviewWidget *m_previewWidget; int m_additionalShiftValue; - QList< QPair > m_HV_offsets; + QList> m_HV_offsets; HistogramLDR *m_histogram; QSize m_previousPreviewWidgetSize; bool m_imagesSaved; @@ -80,14 +83,14 @@ int m_gridY; bool m_doAutoAntighosting; bool m_doManualAntighosting; - QImage* m_patchesMask; + QImage *m_patchesMask; bool m_patchesEdited; - void setAntiGhostingWidget(QImage*, QPair); - void cropAgMasks(const QRect& ca); + void setAntiGhostingWidget(QImage *, QPair); + void cropAgMasks(const QRect &ca); void computeAgMask(); -private slots: + private slots: void saveImagesButtonClicked(); void updatePivot(int); void updateMovable(int); diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.ui luminance-hdr-2.6.0/src/HdrWizard/EditingTools.ui --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/EditingTools.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/EditingTools.ui 2019-06-09 19:18:38.000000000 +0000 @@ -137,7 +137,7 @@ The image currently selected in this list can be translated up,down,left and right using the controls below. -This image's histogram is diplayed in the widget above. +This image's histogram is displayed in the widget above. diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationItem.cpp luminance-hdr-2.6.0/src/HdrWizard/HdrCreationItem.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationItem.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrCreationItem.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,41 +22,37 @@ * */ -#include #include +#include #include #include "HdrCreationItem.h" HdrCreationItem::HdrCreationItem(const QString &filename) - : m_filename(filename) - , m_convertedFilename(filename) - , m_alignedFilename(filename) - , m_averageLuminance(-1.f) - , m_exposureTime(-1.f) - , m_datamin(0.f) - , m_datamax(1.f) - , m_frame(std::make_shared()) - , m_thumbnail(new QImage()) -{ - // qDebug() << QString("Building HdrCreationItem for %1").arg(m_filename); + : m_filename(filename), + m_convertedFilename(filename), + m_alignedFilename(filename), + m_averageLuminance(-1.f), + m_exposureTime(-1.f), + m_datamin(0.f), + m_datamax(1.f), + m_frame(std::make_shared()), + m_thumbnail(new QImage()) { + // qDebug() << QString("Building HdrCreationItem for %1").arg(m_filename); } -HdrCreationItem::HdrCreationItem(const QString &filename, const QString& convertedFilename) - : m_filename(filename) - , m_convertedFilename(convertedFilename) - , m_alignedFilename(convertedFilename) - , m_averageLuminance(-1.f) - , m_exposureTime(-1.f) - , m_datamin(0.f) - , m_datamax(1.f) - , m_frame(std::make_shared()) - , m_thumbnail(new QImage()) -{ -} +HdrCreationItem::HdrCreationItem(const QString &filename, + const QString &convertedFilename) + : m_filename(filename), + m_convertedFilename(convertedFilename), + m_alignedFilename(convertedFilename), + m_averageLuminance(-1.f), + m_exposureTime(-1.f), + m_datamin(0.f), + m_datamax(1.f), + m_frame(std::make_shared()), + m_thumbnail(new QImage()) {} -HdrCreationItem::~HdrCreationItem() -{ +HdrCreationItem::~HdrCreationItem() { // qDebug() << QString("Destroying HdrCreationItem for %1").arg(m_filename); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationItem.h luminance-hdr-2.6.0/src/HdrWizard/HdrCreationItem.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationItem.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrCreationItem.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,65 +24,64 @@ #ifndef HDRCREATIONITEM_H #define HDRCREATIONITEM_H -#include +#include #include +#include #include -#include #include #include "arch/math.h" // defines an element that contains all the informations for this particular // image to be used inside the HdrWizard -class HdrCreationItem -{ -public: - explicit HdrCreationItem(const QString& filename); - HdrCreationItem(const QString& filename, const QString& convertedFilename); +class HdrCreationItem { + public: + explicit HdrCreationItem(const QString &filename); + HdrCreationItem(const QString &filename, const QString &convertedFilename); ~HdrCreationItem(); - const QString& filename() const { return m_filename; } - const QString& convertedFilename() const { return m_convertedFilename; } - void setConvertedFilename(const QString& f) { m_convertedFilename = f; } - const QString& alignedFilename() const { return m_alignedFilename; } - void setAlignedFilename(const QString& f) { m_alignedFilename = f; } - - const pfs::FramePtr& frame() const { return m_frame; } - pfs::FramePtr& frame() { return m_frame; } - bool isValid() const { return m_frame->isValid(); } + const QString &filename() const { return m_filename; } + const QString &convertedFilename() const { return m_convertedFilename; } + void setConvertedFilename(const QString &f) { m_convertedFilename = f; } + const QString &alignedFilename() const { return m_alignedFilename; } + void setAlignedFilename(const QString &f) { m_alignedFilename = f; } + + const pfs::FramePtr &frame() const { return m_frame; } + pfs::FramePtr &frame() { return m_frame; } + bool isValid() const { return m_frame->isValid(); } - bool hasAverageLuminance() const { return (m_averageLuminance != -1.f); } + bool hasAverageLuminance() const { return (m_averageLuminance != -1.f); } void setAverageLuminance(float avl) { m_averageLuminance = avl; } - float getAverageLuminance() const { return m_averageLuminance; } + float getAverageLuminance() const { return m_averageLuminance; } - bool hasExposureTime() const { return (m_exposureTime != -1.f); } - void setExposureTime(float e) { m_exposureTime = e; } - float getExposureTime() const { return m_exposureTime; } - - bool hasEV() const { return hasAverageLuminance(); } - void setEV(float ev) { m_averageLuminance = std::pow(2.f, ev); } - float getEV() const { return log2(m_averageLuminance); } - - void setMin(float m) { m_datamin = m; } - void setMax (float M) { m_datamax = M; } - float getMin() const { return m_datamin; } - float getMax() const { return m_datamax; } - - QImage& qimage() { return *m_thumbnail; } - const QImage& qimage() const { return *m_thumbnail; } - -private: - QString m_filename; - QString m_convertedFilename; - QString m_alignedFilename; - float m_averageLuminance; - float m_exposureTime; - float m_datamin; - float m_datamax; - pfs::FramePtr m_frame; - QSharedPointer m_thumbnail; + bool hasExposureTime() const { return (m_exposureTime != -1.f); } + void setExposureTime(float e) { m_exposureTime = e; } + float getExposureTime() const { return m_exposureTime; } + + bool hasEV() const { return hasAverageLuminance(); } + void setEV(float ev) { m_averageLuminance = std::pow(2.f, ev); } + float getEV() const { return log2(m_averageLuminance); } + + void setMin(float m) { m_datamin = m; } + void setMax(float M) { m_datamax = M; } + float getMin() const { return m_datamin; } + float getMax() const { return m_datamax; } + + QImage &qimage() { return *m_thumbnail; } + const QImage &qimage() const { return *m_thumbnail; } + + private: + QString m_filename; + QString m_convertedFilename; + QString m_alignedFilename; + float m_averageLuminance; + float m_exposureTime; + float m_datamin; + float m_datamax; + pfs::FramePtr m_frame; + QSharedPointer m_thumbnail; }; -typedef std::vector< HdrCreationItem > HdrCreationItemContainer; +typedef std::vector HdrCreationItemContainer; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationManager.cpp luminance-hdr-2.6.0/src/HdrWizard/HdrCreationManager.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationManager.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrCreationManager.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -28,45 +28,45 @@ #include "HdrCreationManager.h" -#include #include -#include -#include #include +#include +#include +#include #include -#include #include +#include #include +#include +#include +#include #include #include #include -#include -#include -#include -#include "Common/CommonFunctions.h" +#include +#include +#include +#include #include -#include -#include -#include #include #include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include -#include "arch/math.h" -#include "TonemappingOperators/fattal02/pde.h" -#include "Exif/ExifOperations.h" -#include "HdrCreation/mtb_alignment.h" -#include "WhiteBalance.h" +#include +#include +#include +#include +#include using namespace std; using namespace pfs; @@ -75,8 +75,7 @@ using namespace utils; using namespace libhdr::fusion; -const FusionOperatorConfig predef_confs[6] = -{ +const FusionOperatorConfig predef_confs[6] = { {WEIGHT_TRIANGULAR, RESPONSE_LINEAR, DEBEVEC, QString(), QString()}, {WEIGHT_TRIANGULAR, RESPONSE_GAMMA, DEBEVEC, QString(), QString()}, {WEIGHT_PLATEAU, RESPONSE_LINEAR, DEBEVEC, QString(), QString()}, @@ -86,103 +85,103 @@ }; // --- NEW CODE --- -namespace -{ +namespace { -QImage* shiftQImage(const QImage *in, int dx, int dy) -{ - QImage *out = new QImage(in->size(),QImage::Format_ARGB32); - assert(out!=NULL); - out->fill(qRgba(0,0,0,0)); //transparent black - for(int i = 0; i < in->height(); i++) - { - if( (i+dy) < 0 ) continue; - if( (i+dy) >= in->height()) break; - QRgb *inp = (QRgb*)in->scanLine(i); - QRgb *outp = (QRgb*)out->scanLine(i+dy); - for(int j = 0; j < in->width(); j++) - { - if( (j+dx) >= in->width()) break; - if( (j+dx) >= 0 ) outp[j+dx] = *inp; +QImage *shiftQImage(const QImage *in, int dx, int dy) { + QImage *out = new QImage(in->size(), QImage::Format_ARGB32); + assert(out != NULL); + out->fill(qRgba(0, 0, 0, 0)); // transparent black + for (int i = 0; i < in->height(); i++) { + if ((i + dy) < 0) continue; + if ((i + dy) >= in->height()) break; + QRgb *inp = (QRgb *)in->scanLine(i); + QRgb *outp = (QRgb *)out->scanLine(i + dy); + for (int j = 0; j < in->width(); j++) { + if ((j + dx) >= in->width()) break; + if ((j + dx) >= 0) outp[j + dx] = *inp; inp++; } } return out; } -void shiftItem(HdrCreationItem& item, int dx, int dy) -{ - FramePtr shiftedFrame( pfs::shift(*item.frame(), dx, dy) ); +void shiftItem(HdrCreationItem &item, int dx, int dy) { + FramePtr shiftedFrame(pfs::shift(*item.frame(), dx, dy)); item.frame().swap(shiftedFrame); - shiftedFrame.reset(); // release memory + shiftedFrame.reset(); // release memory QScopedPointer img(shiftQImage(&item.qimage(), dx, dy)); - item.qimage().swap( *img ); - img.reset(); // release memory + item.qimage().swap(*img); + img.reset(); // release memory } } -static -bool checkFileName(const HdrCreationItem& item, const QString& str) { +static bool checkFileName(const HdrCreationItem &item, const QString &str) { return (item.filename().compare(str) == 0); } -void HdrCreationManager::loadFiles(const QStringList &filenames) -{ - for(const auto filename : filenames) - { - qDebug() << QString("HdrCreationManager::loadFiles(): Checking %1").arg(filename); - HdrCreationItemContainer::iterator it = find_if(m_data.begin(), m_data.end(), - boost::bind(&checkFileName, _1, filename)); +void HdrCreationManager::loadFiles(const QStringList &filenames) { + for (const auto &filename : filenames) { + qDebug() << QStringLiteral( + "HdrCreationManager::loadFiles(): Checking %1") + .arg(filename); + HdrCreationItemContainer::iterator it = + find_if(m_data.begin(), m_data.end(), + boost::bind(&checkFileName, _1, filename)); // has the file been inserted already? - if (it == m_data.end()) - { - qDebug() << QString("HdrCreationManager::loadFiles(): Schedule loading for %1").arg(filename); + if (it == m_data.end()) { + qDebug() << QStringLiteral( + "HdrCreationManager::loadFiles(): \ + Schedule loading for %1") + .arg(filename); m_tmpdata.push_back(HdrCreationItem(filename)); - } - else - { - qDebug() << QString("HdrCreationManager::loadFiles(): %1 has already been loaded").arg(filename); + } else { + qDebug() << QStringLiteral( + "HdrCreationManager::loadFiles(): %1 \ + has already been loaded") + .arg(filename); } } // parallel load of the data... - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone()), Qt::DirectConnection); + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrCreationManager::loadFilesDone, Qt::DirectConnection); // Start the computation. - m_futureWatcher.setFuture( QtConcurrent::map(m_tmpdata.begin(), m_tmpdata.end(), LoadFile()) ); + m_futureWatcher.setFuture( + QtConcurrent::map(m_tmpdata.begin(), m_tmpdata.end(), LoadFile())); } -void HdrCreationManager::loadFilesDone() -{ - qDebug() << "HdrCreationManager::loadFilesDone(): Data loaded ... move to internal structure!"; - if (m_futureWatcher.isCanceled() ) // LoadFile() threw an exception - { - emit errorWhileLoading(tr("HdrCreationManager::loadFilesDone(): Error loading a file.")); - disconnect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone())); +void HdrCreationManager::loadFilesDone() { + qDebug() << "HdrCreationManager::loadFilesDone(): Data loaded ... move to \ + internal structure!"; + if (m_futureWatcher.isCanceled()) // LoadFile() threw an exception + { + emit errorWhileLoading( + tr("HdrCreationManager::loadFilesDone(): Error loading a file.")); + disconnect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrCreationManager::loadFilesDone); m_tmpdata.clear(); return; } - if (isLoadResponseCurve()) - { - try - { + if (isLoadResponseCurve()) { + try { m_response->readFromFile( - QFile::encodeName(getResponseCurveInputFilename()).constData()); + QFile::encodeName(getResponseCurveInputFilename()).constData()); setLoadResponseCurve(false); - } - catch(std::runtime_error &e) - { + } catch (std::runtime_error &e) { emit errorWhileLoading(QString(e.what())); } } - disconnect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone())); - for(const auto hdrCreationItem : m_tmpdata) - { - if (hdrCreationItem.isValid()) - { - qDebug() << QString("HdrCreationManager::loadFilesDone(): Insert data for %1").arg(hdrCreationItem.filename()); + disconnect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrCreationManager::loadFilesDone); + for (const auto &hdrCreationItem : m_tmpdata) { + if (hdrCreationItem.isValid()) { + qDebug() << QStringLiteral( + "HdrCreationManager::loadFilesDone(): \ + Insert data for %1") + .arg(hdrCreationItem.filename()); m_data.push_back(hdrCreationItem); } } @@ -190,67 +189,58 @@ refreshEVOffset(); - if (!framesHaveSameSize()) - { + if (!framesHaveSameSize()) { m_data.clear(); - emit errorWhileLoading(tr("HdrCreationManager::loadFilesDone(): The images have different size.")); - } - else - { + emit errorWhileLoading( + tr("HdrCreationManager::loadFilesDone(): The images have different " + "size.")); + } else { emit finishedLoadingFiles(); } } -void HdrCreationManager::refreshEVOffset() -{ +void HdrCreationManager::refreshEVOffset() { // no data - if (m_data.size() <= 0) - { + if (m_data.size() <= 0) { m_evOffset = 0.f; return; } std::vector evs; - for(const auto hdrCreationItem : m_data) - { - if (hdrCreationItem.hasEV()) - { + for (const auto &hdrCreationItem : m_data) { + if (hdrCreationItem.hasEV()) { evs.push_back(hdrCreationItem.getEV()); } } // no image has EV - if (evs.size() <= 0) - { + if (evs.size() <= 0) { m_evOffset = 0.f; return; } // only one image available - if (evs.size() == 1) - { + if (evs.size() == 1) { m_evOffset = evs[0]; return; } // sort... std::sort(evs.begin(), evs.end()); - m_evOffset = evs[(evs.size() + 1)/2 - 1]; + m_evOffset = evs[(evs.size() + 1) / 2 - 1]; - qDebug() << QString("HdrCreationManager::refreshEVOffset(): offset = %1").arg(m_evOffset); + qDebug() << QStringLiteral( + "HdrCreationManager::refreshEVOffset(): offset = %1") + .arg(m_evOffset); } -float HdrCreationManager::getEVOffset() const -{ - return m_evOffset; -} +float HdrCreationManager::getEVOffset() const { return m_evOffset; } -QStringList HdrCreationManager::getFilesWithoutExif() const -{ +QStringList HdrCreationManager::getFilesWithoutExif() const { QStringList invalidFiles; - foreach (const HdrCreationItem& fileData, m_data) { - if ( !fileData.hasAverageLuminance() ) { - invalidFiles.push_back( fileData.filename() ); + foreach (const HdrCreationItem &fileData, m_data) { + if (!fileData.hasAverageLuminance()) { + invalidFiles.push_back(fileData.filename()); } } return invalidFiles; @@ -258,16 +248,15 @@ size_t HdrCreationManager::numFilesWithoutExif() const { size_t counter = 0; - foreach (const HdrCreationItem& fileData, m_data) { - if ( !fileData.hasAverageLuminance() ) { + foreach (const HdrCreationItem &fileData, m_data) { + if (!fileData.hasAverageLuminance()) { ++counter; } } return counter; } -void HdrCreationManager::removeFile(int idx) -{ +void HdrCreationManager::removeFile(int idx) { Q_ASSERT(idx >= 0); Q_ASSERT(idx < (int)m_data.size()); @@ -277,77 +266,75 @@ } HdrCreationManager::HdrCreationManager(bool fromCommandLine) - : m_evOffset(0.f) - , m_response(new ResponseCurve(predef_confs[0].responseCurve)) - , m_weight(new WeightFunction(predef_confs[0].weightFunction)) - , m_responseCurveInputFilename() - , m_agMask(NULL) - , m_align() - , m_ais_crop_flag(false) - , fromCommandLine(fromCommandLine) - , m_isLoadResponseCurve(false) -{ + : m_evOffset(0.f), + m_response(new ResponseCurve(predef_confs[0].responseCurve)), + m_weight(new WeightFunction(predef_confs[0].weightFunction)), + m_responseCurveInputFilename(), + m_agMask(NULL), + m_align(), + m_ais_crop_flag(false), + fromCommandLine(fromCommandLine), + m_isLoadResponseCurve(false) { // setConfig(predef_confs[0]); setFusionOperator(predef_confs[0].fusionOperator); - for (int i = 0; i < agGridSize; i++) - { - for (int j = 0; j < agGridSize; j++) - { + for (int i = 0; i < agGridSize; i++) { + for (int j = 0; j < agGridSize; j++) { m_patches[i][j] = false; } } - connect(&m_futureWatcher, SIGNAL(started()), this, SIGNAL(progressStarted()), Qt::DirectConnection); - connect(&m_futureWatcher, SIGNAL(finished()), this, SIGNAL(progressFinished()), Qt::DirectConnection); - connect(this, SIGNAL(progressCancel()), &m_futureWatcher, SLOT(cancel()), Qt::DirectConnection); - connect(&m_futureWatcher, SIGNAL(progressRangeChanged(int,int)), this, SIGNAL(progressRangeChanged(int,int)), Qt::DirectConnection); - connect(&m_futureWatcher, SIGNAL(progressValueChanged(int)), this, SIGNAL(progressValueChanged(int)), Qt::DirectConnection); + connect(&m_futureWatcher, &QFutureWatcherBase::started, this, + &HdrCreationManager::progressStarted, Qt::DirectConnection); + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrCreationManager::progressFinished, Qt::DirectConnection); + connect(this, &HdrCreationManager::progressCancel, &m_futureWatcher, + &QFutureWatcherBase::cancel, Qt::DirectConnection); + connect(&m_futureWatcher, &QFutureWatcherBase::progressRangeChanged, this, + &HdrCreationManager::progressRangeChanged, Qt::DirectConnection); + connect(&m_futureWatcher, &QFutureWatcherBase::progressValueChanged, this, + &HdrCreationManager::progressValueChanged, Qt::DirectConnection); } -void HdrCreationManager::setConfig(const FusionOperatorConfig &c) -{ - if (!c.inputResponseCurveFilename.isEmpty()) - { +void HdrCreationManager::setConfig(const FusionOperatorConfig &c) { + if (!c.inputResponseCurveFilename.isEmpty()) { setLoadResponseCurve(true); setResponseCurveInputFilename(c.inputResponseCurveFilename); - } - else - { + } else { m_response->setType(c.responseCurve); } getWeightFunction().setType(c.weightFunction); setFusionOperator(c.fusionOperator); } -QVector HdrCreationManager::getExpotimes() const -{ +QVector HdrCreationManager::getExpotimes() const { QVector expotimes; - for ( HdrCreationItemContainer::const_iterator it = m_data.begin(), - itEnd = m_data.end(); it != itEnd; ++it) { + for (HdrCreationItemContainer::const_iterator it = m_data.begin(), + itEnd = m_data.end(); + it != itEnd; ++it) { expotimes.push_back(it->getEV()); } return expotimes; } -bool HdrCreationManager::framesHaveSameSize() -{ +bool HdrCreationManager::framesHaveSameSize() { size_t width = m_data[0].frame()->getWidth(); size_t height = m_data[0].frame()->getHeight(); - for ( HdrCreationItemContainer::const_iterator it = m_data.begin() + 1, - itEnd = m_data.end(); it != itEnd; ++it) { - if (it->frame()->getWidth() != width || it->frame()->getHeight() != height) + for (HdrCreationItemContainer::const_iterator it = m_data.begin() + 1, + itEnd = m_data.end(); + it != itEnd; ++it) { + if (it->frame()->getWidth() != width || + it->frame()->getHeight() != height) return false; } return true; } -void HdrCreationManager::align_with_mtb() -{ +void HdrCreationManager::align_with_mtb() { // build temporary container... vector frames; for (size_t i = 0; i < m_data.size(); ++i) { - frames.push_back( m_data[i].frame() ); + frames.push_back(m_data[i].frame()); } // run MTB @@ -355,88 +342,80 @@ // rebuild previews QFutureWatcher futureWatcher; - futureWatcher.setFuture( QtConcurrent::map(m_data.begin(), m_data.end(), RefreshPreview()) ); + futureWatcher.setFuture( + QtConcurrent::map(m_data.begin(), m_data.end(), RefreshPreview())); futureWatcher.waitForFinished(); // emit finished emit finishedAligning(0); } -void HdrCreationManager::set_ais_crop_flag(bool flag) -{ +void HdrCreationManager::set_ais_crop_flag(bool flag) { m_ais_crop_flag = flag; } -void HdrCreationManager::align_with_ais() -{ +void HdrCreationManager::align_with_ais() { m_align.reset(new Align(m_data, fromCommandLine, 1)); - connect(m_align.get(), SIGNAL(finishedAligning(int)), this, SIGNAL(finishedAligning(int))); - connect(m_align.get(), SIGNAL(failedAligning(QProcess::ProcessError)), this, SIGNAL(ais_failed(QProcess::ProcessError))); - connect(m_align.get(), SIGNAL(failedAligning(QProcess::ProcessError)), this, SLOT(ais_failed_slot(QProcess::ProcessError))); - connect(m_align.get(), SIGNAL(dataReady(QByteArray)), this, SIGNAL(aisDataReady(QByteArray))); + connect(m_align.get(), &Align::finishedAligning, this, + &HdrCreationManager::finishedAligning); + connect(m_align.get(), &Align::failedAligning, this, + &HdrCreationManager::ais_failed); + connect(m_align.get(), &Align::failedAligning, this, + &HdrCreationManager::ais_failed_slot); + connect(m_align.get(), &Align::dataReady, this, + &HdrCreationManager::aisDataReady); m_align->align_with_ais(m_ais_crop_flag); } -void HdrCreationManager::ais_failed_slot(QProcess::ProcessError error) -{ +void HdrCreationManager::ais_failed_slot(QProcess::ProcessError error) { qDebug() << "align_image_stack failed"; m_align->removeTempFiles(); - } -pfs::Frame* HdrCreationManager::createHdr() -{ +pfs::Frame *HdrCreationManager::createHdr() { std::vector frames; - for (size_t idx = 0; idx < m_data.size(); ++idx) - { + for (size_t idx = 0; idx < m_data.size(); ++idx) { frames.push_back( - FrameEnhanced( - m_data[idx].frame(), - std::pow(2.f, m_data[idx].getEV() - m_evOffset) - ) - ); + FrameEnhanced(m_data[idx].frame(), + std::pow(2.f, m_data[idx].getEV() - m_evOffset))); } - libhdr::fusion::FusionOperatorPtr fusionOperatorPtr = IFusionOperator::build(m_fusionOperator); - pfs::Frame* outputFrame(fusionOperatorPtr->computeFusion(*m_response, *m_weight, frames)); - - if (!m_responseCurveOutputFilename.isEmpty()) - { - m_response->writeToFile(QFile::encodeName(m_responseCurveOutputFilename).constData()); + libhdr::fusion::FusionOperatorPtr fusionOperatorPtr = + IFusionOperator::build(m_fusionOperator); + pfs::Frame *outputFrame( + fusionOperatorPtr->computeFusion(*m_response, *m_weight, frames)); + + if (!m_responseCurveOutputFilename.isEmpty()) { + m_response->writeToFile( + QFile::encodeName(m_responseCurveOutputFilename).constData()); } return outputFrame; } -void HdrCreationManager::applyShiftsToItems(const QList >& hvOffsets) -{ +void HdrCreationManager::applyShiftsToItems( + const QList> &hvOffsets) { int size = m_data.size(); - //shift the frames and images - for (int i = 0; i < size; i++) - { - if ( hvOffsets[i].first == hvOffsets[i].second && - hvOffsets[i].first == 0 ) - { + // shift the frames and images + for (int i = 0; i < size; i++) { + if (hvOffsets[i].first == hvOffsets[i].second && + hvOffsets[i].first == 0) { continue; } - shiftItem(m_data[i], - hvOffsets[i].first, - hvOffsets[i].second); + shiftItem(m_data[i], hvOffsets[i].first, hvOffsets[i].second); } } -void HdrCreationManager::cropItems(const QRect& ca) -{ +void HdrCreationManager::cropItems(const QRect &ca) { // crop all frames and images int size = m_data.size(); - for (int idx = 0; idx < size; idx++) - { - std::unique_ptr newimage(new QImage(m_data[idx].qimage().copy(ca))); - if (newimage == NULL) - { - exit(1); // TODO: exit gracefully + for (int idx = 0; idx < size; idx++) { + std::unique_ptr newimage( + new QImage(m_data[idx].qimage().copy(ca))); + if (newimage == NULL) { + exit(1); // TODO: exit gracefully } m_data[idx].qimage().swap(*newimage); newimage.reset(); @@ -445,42 +424,43 @@ ca.getCoords(&x_ul, &y_ur, &x_bl, &y_br); FramePtr cropped( - cut(m_data[idx].frame().get(), - static_cast(x_ul), static_cast(y_ur), - static_cast(x_bl), static_cast(y_br)) - ); + cut(m_data[idx].frame().get(), static_cast(x_ul), + static_cast(y_ur), static_cast(x_bl), + static_cast(y_br))); m_data[idx].frame().swap(cropped); cropped.reset(); } } -HdrCreationManager::~HdrCreationManager() -{ +HdrCreationManager::~HdrCreationManager() { this->reset(); delete m_agMask; } -void HdrCreationManager::saveImages(const QString& prefix) -{ +void HdrCreationManager::saveImages(const QString &prefix) { int idx = 0; - for ( HdrCreationItemContainer::const_iterator it = m_data.begin(), - itEnd = m_data.end(); it != itEnd; ++it) { - - QString filename = prefix + QString("_%1").arg(idx) + ".tiff"; + for (HdrCreationItemContainer::const_iterator it = m_data.begin(), + itEnd = m_data.end(); + it != itEnd; ++it) { + QString filename = prefix + QStringLiteral("_%1").arg(idx) + ".tiff"; pfs::io::TiffWriter writer(QFile::encodeName(filename).constData()); - writer.write( *it->frame(), pfs::Params("tiff_mode", 1) ); + writer.write(*it->frame(), pfs::Params("tiff_mode", 1)); QFileInfo qfi(filename); QString absoluteFileName = qfi.absoluteFilePath(); QByteArray encodedName = QFile::encodeName(absoluteFileName); - ExifOperations::copyExifData(QFile::encodeName(it->filename()).constData(), encodedName.constData(), false); + ExifOperations::copyExifData( + QFile::encodeName(it->filename()).constData(), + encodedName.constData(), false); ++idx; } emit imagesSaved(); } -int HdrCreationManager::computePatches(float threshold, bool patches[][agGridSize], float &percent, QList > HV_offset) -{ +int HdrCreationManager::computePatches(float threshold, + bool patches[][agGridSize], + float &percent, + QList> HV_offset) { qDebug() << "HdrCreationManager::computePatches"; qDebug() << threshold; #ifdef TIMER_PROFILING @@ -508,9 +488,9 @@ } for (int h = 0; h < size; h++) { - if (h == m_agGoodImageIndex) - continue; - float deltaEV = log2(m_data[m_agGoodImageIndex].getAverageLuminance()) - log2(m_data[h].getAverageLuminance()); + if (h == m_agGoodImageIndex) continue; + float deltaEV = log2(m_data[m_agGoodImageIndex].getAverageLuminance()) - + log2(m_data[h].getAverageLuminance()); int dx = HV_offset[m_agGoodImageIndex].first - HV_offset[h].first; int dy = HV_offset[m_agGoodImageIndex].second - HV_offset[h].second; float sR, sG, sB; @@ -518,9 +498,9 @@ //#pragma omp parallel for schedule(static) for (int j = 0; j < agGridSize; j++) { for (int i = 0; i < agGridSize; i++) { - if (comparePatches(m_data[m_agGoodImageIndex], - m_data[h], - i, j, gridX, gridY, threshold, sR, sG, sB, deltaEV, dx, dy)) { + if (comparePatches(m_data[m_agGoodImageIndex], m_data[h], i, j, + gridX, gridY, threshold, sR, sG, sB, deltaEV, + dx, dy)) { m_patches[i][j] = true; } } @@ -530,23 +510,24 @@ int count = 0; for (int i = 0; i < agGridSize; i++) for (int j = 0; j < agGridSize; j++) - if (m_patches[i][j] == true) - count++; - percent = static_cast(count) / static_cast(agGridSize*agGridSize) * 100.0f; + if (m_patches[i][j] == true) count++; + percent = static_cast(count) / + static_cast(agGridSize * agGridSize) * 100.0f; qDebug() << "Total patches: " << percent << "%"; - memcpy(patches, m_patches, agGridSize*agGridSize); + memcpy(patches, m_patches, agGridSize * agGridSize); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "computePatches = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "computePatches = " << stop_watch.get_time() << " msec" + << std::endl; #endif return m_agGoodImageIndex; } - -pfs::Frame *HdrCreationManager::doAntiGhosting(bool patches[][agGridSize], int h0, bool manualAg, ProgressHelper *ph) -{ +pfs::Frame *HdrCreationManager::doAntiGhosting(bool patches[][agGridSize], + int h0, bool manualAg, + ProgressHelper *ph) { qDebug() << "HdrCreationManager::doAntiGhosting"; #ifdef TIMER_PROFILING msec_timer stop_watch; @@ -556,9 +537,11 @@ const int height = m_data[0].frame()->getHeight(); const int gridX = width / agGridSize; const int gridY = height / agGridSize; - connect(ph, SIGNAL(qtSetRange(int, int)), this, SIGNAL(progressRangeChanged(int, int))); - connect(ph, SIGNAL(qtSetValue(int)), this, SIGNAL(progressValueChanged(int))); - ph->setRange(0,100); + connect(ph, &ProgressHelper::qtSetRange, this, + &HdrCreationManager::progressRangeChanged); + connect(ph, &ProgressHelper::qtSetValue, this, + &HdrCreationManager::progressValueChanged); + ph->setRange(0, 100); ph->setValue(0); emit progressStarted(); @@ -568,7 +551,8 @@ const Channel *Good_Rc, *Good_Gc, *Good_Bc; Channel *Ch_Good[3]; - m_data[h0].frame().get()->getXYZChannels(Ch_Good[0], Ch_Good[1], Ch_Good[2]); + m_data[h0].frame().get()->getXYZChannels(Ch_Good[0], Ch_Good[1], + Ch_Good[2]); Good_Rc = Ch_Good[0]; Good_Gc = Ch_Good[1]; @@ -576,362 +560,284 @@ const Channel *Rc, *Gc, *Bc; Channel *Ch[3]; - Frame* ghosted = createHdr(); + std::unique_ptr ghosted(createHdr()); ghosted->getXYZChannels(Ch[0], Ch[1], Ch[2]); - for(int c = 0; c < 3; c++) { + for (int c = 0; c < 3; c++) { cmax[c] = *max_element(Ch[c]->begin(), Ch[c]->end()); cmin[c] = *min_element(Ch[c]->begin(), Ch[c]->end()); } Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); Min = std::min(cmin[0], std::min(cmin[1], cmin[2])); - for(int c = 0; c < 3; c++) { - replace_if(Ch[c]->begin(), Ch[c]->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(Ch[c]->begin(), Ch[c]->end(), [](float f){ return !isfinite(f); }, Max); - transform(Ch[c]->begin(), Ch[c]->end(), Ch[c]->begin(), Normalizer(Min, Max)); + for (int c = 0; c < 3; c++) { + replace_if(Ch[c]->begin(), Ch[c]->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(Ch[c]->begin(), Ch[c]->end(), + [](float f) { return !isfinite(f); }, Max); + transform(Ch[c]->begin(), Ch[c]->end(), Ch[c]->begin(), + Normalizer(Min, Max)); } Rc = Ch[0]; Gc = Ch[1]; Bc = Ch[2]; - ph->setValue(20); + ph->setValue(5); if (ph->canceled()) return NULL; - Array2Df* logIrradianceGood_R = new Array2Df(width, height); + //Red channel + std::unique_ptr logIrradianceGood_R(new Array2Df(width, height)); computeLogIrradiance(*logIrradianceGood_R, *Good_Rc); - ph->setValue(22); + ph->setValue(10); if (ph->canceled()) { - delete logIrradianceGood_R; return NULL; } - Array2Df* logIrradianceGood_G = new Array2Df(width, height); - computeLogIrradiance(*logIrradianceGood_G, *Good_Gc); - ph->setValue(24); + std::unique_ptr logIrradiance_R(new Array2Df(width, height)); + computeLogIrradiance(*logIrradiance_R, *Rc); + ph->setValue(13); if (ph->canceled()) { - delete logIrradianceGood_G; return NULL; } - Array2Df* logIrradianceGood_B = new Array2Df(width, height); - computeLogIrradiance(*logIrradianceGood_B, *Good_Bc); - ph->setValue(26); + std::unique_ptr gradientXGood_R(new Array2Df(width, height)); + std::unique_ptr gradientYGood_R(new Array2Df(width, height)); + std::unique_ptr gradientX_R(new Array2Df(width, height)); + std::unique_ptr gradientY_R(new Array2Df(width, height)); + std::unique_ptr gradientXBlended_R(new Array2Df(width, height)); + std::unique_ptr gradientYBlended_R(new Array2Df(width, height)); + + computeGradient(*gradientXGood_R, *gradientYGood_R, *logIrradianceGood_R); + ph->setValue(15); if (ph->canceled()) { - delete logIrradianceGood_B; return NULL; } - Array2Df* logIrradiance_R = new Array2Df(width, height); - computeLogIrradiance(*logIrradiance_R, *Rc); - ph->setValue(28); + computeGradient(*gradientX_R, *gradientY_R, *logIrradiance_R); + ph->setValue(20); if (ph->canceled()) { - delete logIrradiance_R; return NULL; } - Array2Df* logIrradiance_G = new Array2Df(width, height); - computeLogIrradiance(*logIrradiance_G, *Gc); - ph->setValue(30); + if (manualAg) + blendGradients(*gradientXBlended_R, *gradientYBlended_R, *gradientX_R, + *gradientY_R, *gradientXGood_R, *gradientYGood_R, + *m_agMask); + else + blendGradients(*gradientXBlended_R, *gradientYBlended_R, *gradientX_R, + *gradientY_R, *gradientXGood_R, *gradientYGood_R, + patches, gridX, gridY); + + ph->setValue(25); if (ph->canceled()) { - delete logIrradiance_G; return NULL; } - Array2Df* logIrradiance_B = new Array2Df(width, height); - computeLogIrradiance(*logIrradiance_B, *Bc); - ph->setValue(32); + + std::unique_ptr divergence_R(new Array2Df(width, height)); + computeDivergence(*divergence_R, *gradientXBlended_R, *gradientYBlended_R); + ph->setValue(28); if (ph->canceled()) { - delete logIrradiance_B; return NULL; } - Array2Df* gradientXGood_R = new Array2Df(width, height); - Array2Df* gradientYGood_R = new Array2Df(width, height); - Array2Df* gradientX_R = new Array2Df(width, height); - Array2Df* gradientY_R = new Array2Df(width, height); - Array2Df* gradientXBlended_R = new Array2Df(width, height); - Array2Df* gradientYBlended_R = new Array2Df(width, height); - computeGradient(*gradientXGood_R, *gradientYGood_R, *logIrradianceGood_R); - delete logIrradianceGood_R; + qDebug() << "solve_pde"; + solve_pde_dct(*divergence_R, *logIrradiance_R); ph->setValue(33); if (ph->canceled()) { - delete gradientXGood_R; - delete gradientYGood_R; - delete gradientX_R; - delete gradientY_R; - delete gradientXBlended_R; - delete gradientYBlended_R; return NULL; } - computeGradient(*gradientX_R, *gradientY_R, *logIrradiance_R); - ph->setValue(34); + + //Green channel + std::unique_ptr logIrradianceGood_G = std::move(logIrradianceGood_R); // reuse of logIrradianceGood_R + computeLogIrradiance(*logIrradianceGood_G, *Good_Gc); + ph->setValue(36); if (ph->canceled()) { - delete gradientXGood_R; - delete gradientYGood_R; - delete gradientX_R; - delete gradientY_R; - delete gradientXBlended_R; - delete gradientYBlended_R; return NULL; } - if (manualAg) - blendGradients(*gradientXBlended_R, *gradientYBlended_R, - *gradientX_R, *gradientY_R, - *gradientXGood_R, *gradientYGood_R, - *m_agMask); - else - blendGradients(*gradientXBlended_R, *gradientYBlended_R, - *gradientX_R, *gradientY_R, - *gradientXGood_R, *gradientYGood_R, - patches, gridX, gridY); - delete gradientX_R; - delete gradientY_R; - delete gradientXGood_R; - delete gradientYGood_R; - ph->setValue(35); - if (ph->canceled()) { - delete gradientXBlended_R; - delete gradientYBlended_R; + std::unique_ptr logIrradiance_G(new Array2Df(width, height)); + computeLogIrradiance(*logIrradiance_G, *Gc); + ph->setValue(38); + if (ph->canceled()) { return NULL; } + std::unique_ptr gradientXGood_G = std::move(gradientXGood_R); + std::unique_ptr gradientYGood_G = std::move(gradientYGood_R); + std::unique_ptr gradientX_G = std::move(gradientX_R); + std::unique_ptr gradientY_G = std::move(gradientY_R); + std::unique_ptr gradientXBlended_G = std::move(gradientXBlended_R); + std::unique_ptr gradientYBlended_G = std::move(gradientYBlended_R); - Array2Df* gradientXGood_G = new Array2Df(width, height); - Array2Df* gradientYGood_G = new Array2Df(width, height); - Array2Df* gradientX_G = new Array2Df(width, height); - Array2Df* gradientY_G = new Array2Df(width, height); - Array2Df* gradientXBlended_G = new Array2Df(width, height); - Array2Df* gradientYBlended_G = new Array2Df(width, height); computeGradient(*gradientXGood_G, *gradientYGood_G, *logIrradianceGood_G); - delete logIrradianceGood_G; - ph->setValue(36); + ph->setValue(43); if (ph->canceled()) { - delete gradientXGood_G; - delete gradientYGood_G; - delete gradientX_G; - delete gradientY_G; - delete gradientXBlended_G; - delete gradientYBlended_G; return NULL; } computeGradient(*gradientX_G, *gradientY_G, *logIrradiance_G); - ph->setValue(37); + ph->setValue(48); if (ph->canceled()) { - delete gradientXGood_G; - delete gradientYGood_G; - delete gradientX_G; - delete gradientY_G; - delete gradientXBlended_G; - delete gradientYBlended_G; return NULL; } if (manualAg) - blendGradients(*gradientXBlended_G, *gradientYBlended_G, - *gradientX_G, *gradientY_G, - *gradientXGood_G, *gradientYGood_G, + blendGradients(*gradientXBlended_G, *gradientYBlended_G, *gradientX_G, + *gradientY_G, *gradientXGood_G, *gradientYGood_G, *m_agMask); else - blendGradients(*gradientXBlended_G, *gradientYBlended_G, - *gradientX_G, *gradientY_G, - *gradientXGood_G, *gradientYGood_G, + blendGradients(*gradientXBlended_G, *gradientYBlended_G, *gradientX_G, + *gradientY_G, *gradientXGood_G, *gradientYGood_G, patches, gridX, gridY); - delete gradientX_G; - delete gradientY_G; - delete gradientXGood_G; - delete gradientYGood_G; - ph->setValue(38); + + ph->setValue(53); if (ph->canceled()) { - delete gradientXBlended_G; - delete gradientYBlended_G; return NULL; } - Array2Df* gradientXGood_B = new Array2Df(width, height); - Array2Df* gradientYGood_B = new Array2Df(width, height); - Array2Df* gradientX_B = new Array2Df(width, height); - Array2Df* gradientY_B = new Array2Df(width, height); - Array2Df* gradientXBlended_B = new Array2Df(width, height); - Array2Df* gradientYBlended_B = new Array2Df(width, height); - computeGradient(*gradientXGood_B, *gradientYGood_B, *logIrradianceGood_B); - delete logIrradianceGood_B; - ph->setValue(39); + std::unique_ptr divergence_G(new Array2Df(width, height)); + computeDivergence(*divergence_G, *gradientXBlended_G, *gradientYBlended_G); + ph->setValue(60); if (ph->canceled()) { - delete gradientXGood_B; - delete gradientYGood_B; - delete gradientX_B; - delete gradientY_B; - delete gradientXBlended_B; - delete gradientYBlended_B; return NULL; } - computeGradient(*gradientX_B, *gradientY_B, *logIrradiance_B); - ph->setValue(40); + + qDebug() << "solve_pde"; + solve_pde_dct(*divergence_G, *logIrradiance_G); + ph->setValue(66); if (ph->canceled()) { - delete gradientXGood_B; - delete gradientYGood_B; - delete gradientX_B; - delete gradientY_B; - delete gradientXBlended_B; - delete gradientYBlended_B; return NULL; } - if (manualAg) - blendGradients(*gradientXBlended_B, *gradientYBlended_B, - *gradientX_B, *gradientY_B, - *gradientXGood_B, *gradientYGood_B, - *m_agMask); - else - blendGradients(*gradientXBlended_B, *gradientYBlended_B, - *gradientX_B, *gradientY_B, - *gradientXGood_B, *gradientYGood_B, - patches, gridX, gridY); - delete gradientX_B; - delete gradientY_B; - delete gradientXGood_B; - delete gradientYGood_B; - ph->setValue(41); + + //Blue channel + std::unique_ptr logIrradianceGood_B = std::move(logIrradianceGood_G); // reuse of logIrradianceGood_R + computeLogIrradiance(*logIrradianceGood_B, *Good_Bc); + ph->setValue(71); if (ph->canceled()) { - delete gradientXBlended_B; - delete gradientYBlended_B; return NULL; } - - Array2Df* divergence_R = new Array2Df(width, height); - computeDivergence(*divergence_R, *gradientXBlended_R, *gradientYBlended_R); - delete gradientXBlended_R; - delete gradientYBlended_R; - ph->setValue(42); + std::unique_ptr logIrradiance_B(new Array2Df(width, height)); + computeLogIrradiance(*logIrradiance_B, *Bc); + ph->setValue(76); if (ph->canceled()) { - delete divergence_R; return NULL; } - Array2Df* divergence_G = new Array2Df(width, height); - computeDivergence(*divergence_G, *gradientXBlended_G, *gradientYBlended_G); - delete gradientXBlended_G; - delete gradientYBlended_G; - ph->setValue(43); + std::unique_ptr gradientXGood_B = std::move(gradientXGood_G); + std::unique_ptr gradientYGood_B = std::move(gradientYGood_G); + std::unique_ptr gradientX_B = std::move(gradientX_G); + std::unique_ptr gradientY_B = std::move(gradientY_G); + std::unique_ptr gradientXBlended_B = std::move(gradientXBlended_G); + std::unique_ptr gradientYBlended_B = std::move(gradientYBlended_G); + + computeGradient(*gradientXGood_B, *gradientYGood_B, *logIrradianceGood_B); + ph->setValue(81); if (ph->canceled()) { - delete divergence_G; return NULL; } - Array2Df* divergence_B = new Array2Df(width, height); - computeDivergence(*divergence_B, *gradientXBlended_B, *gradientYBlended_B); - delete gradientXBlended_B; - delete gradientYBlended_B; - ph->setValue(44); + computeGradient(*gradientX_B, *gradientY_B, *logIrradiance_B); + ph->setValue(86); if (ph->canceled()) { - delete divergence_B; return NULL; } + if (manualAg) + blendGradients(*gradientXBlended_B, *gradientYBlended_B, *gradientX_B, + *gradientY_B, *gradientXGood_B, *gradientYGood_B, + *m_agMask); + else + blendGradients(*gradientXBlended_B, *gradientYBlended_B, *gradientX_B, + *gradientY_B, *gradientXGood_B, *gradientYGood_B, + patches, gridX, gridY); - qDebug() << "solve_pde"; - solve_pde_dct(*divergence_R, *logIrradiance_R); - qDebug() << "residual: " << residual_pde(logIrradiance_R, divergence_R); - delete divergence_R; - ph->setValue(60); + ph->setValue(90); if (ph->canceled()) { - delete logIrradiance_R; return NULL; } - qDebug() << "solve_pde"; - solve_pde_dct(*divergence_G, *logIrradiance_G); - qDebug() << "residual: " << residual_pde(logIrradiance_G, divergence_G); - delete divergence_G; - ph->setValue(76); + std::unique_ptr divergence_B(new Array2Df(width, height)); + computeDivergence(*divergence_B, *gradientXBlended_B, *gradientYBlended_B); + ph->setValue(93); if (ph->canceled()) { - delete logIrradiance_G; return NULL; } qDebug() << "solve_pde"; solve_pde_dct(*divergence_B, *logIrradiance_B); - qDebug() << "residual: " << residual_pde(logIrradiance_B, divergence_B); - delete divergence_B; - ph->setValue(93); + ph->setValue(94); if (ph->canceled()) { - delete logIrradiance_B; return NULL; } - Frame* deghosted = new Frame(width, height); - //Channel *Urc, *Ugc, *Ubc; + //Blend + Frame *deghosted = new Frame(width, height); + // Channel *Urc, *Ugc, *Ubc; Channel *Uc[3]; deghosted->createXYZChannels(Uc[0], Uc[1], Uc[2]); computeIrradiance(*Uc[0], *logIrradiance_R); - delete logIrradiance_R; - ph->setValue(94); + ph->setValue(95); if (ph->canceled()) { delete deghosted; return NULL; } computeIrradiance(*Uc[1], *logIrradiance_G); - delete logIrradiance_G; - ph->setValue(95); + ph->setValue(97); if (ph->canceled()) { delete deghosted; return NULL; } computeIrradiance(*Uc[2], *logIrradiance_B); - delete logIrradiance_B; - ph->setValue(96); + ph->setValue(99); if (ph->canceled()) { delete deghosted; return NULL; } - //shadesOfGrayAWB(*Uc[0], *Uc[1], *Uc[2]); + // shadesOfGrayAWB(*Uc[0], *Uc[1], *Uc[2]); - for(int c = 0; c < 3; c++) { + for (int c = 0; c < 3; c++) { cmax[c] = *max_element(Uc[c]->begin(), Uc[c]->end()); cmin[c] = *min_element(Uc[c]->begin(), Uc[c]->end()); } Max = std::max(cmax[0], std::max(cmax[1], cmax[2])); Min = std::min(cmin[0], std::min(cmin[1], cmin[2])); - for(int c = 0; c < 3; c++) { - replace_if(Uc[c]->begin(), Uc[c]->end(), [](float f){ return !isnormal(f); }, Max); - replace_if(Uc[c]->begin(), Uc[c]->end(), [](float f){ return !isfinite(f); }, Max); - transform(Uc[c]->begin(), Uc[c]->end(), Uc[c]->begin(), Normalizer(Min, Max)); + for (int c = 0; c < 3; c++) { + replace_if(Uc[c]->begin(), Uc[c]->end(), + [](float f) { return !isnormal(f); }, Max); + replace_if(Uc[c]->begin(), Uc[c]->end(), + [](float f) { return !isfinite(f); }, Max); + transform(Uc[c]->begin(), Uc[c]->end(), Uc[c]->begin(), + Normalizer(Min, Max)); } ph->setValue(100); emit progressFinished(); - delete ghosted; - this->reset(); + //this->reset(); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "doAntiGhosting = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "doAntiGhosting = " << stop_watch.get_time() << " msec" + << std::endl; #endif return deghosted; } - -void HdrCreationManager::getAgData(bool patches[][agGridSize], int &h0) -{ - memcpy(patches, m_patches, agGridSize*agGridSize); +void HdrCreationManager::getAgData(bool patches[][agGridSize], int &h0) { + memcpy(patches, m_patches, agGridSize * agGridSize); h0 = m_agGoodImageIndex; } -void HdrCreationManager::setPatches(bool patches[][agGridSize]) -{ - memcpy(m_patches, patches, agGridSize*agGridSize); +void HdrCreationManager::setPatches(bool patches[][agGridSize]) { + memcpy(m_patches, patches, agGridSize * agGridSize); } -void HdrCreationManager::reset() -{ +void HdrCreationManager::reset() { if (m_align != NULL) { m_align->reset(); } - if (m_futureWatcher.isRunning()) - { + if (m_futureWatcher.isRunning()) { qDebug() << "Aborting loadFiles..."; m_futureWatcher.cancel(); m_futureWatcher.waitForFinished(); emit loadFilesAborted(); } - disconnect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone())); + disconnect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrCreationManager::loadFilesDone); m_data.clear(); m_tmpdata.clear(); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationManager.h luminance-hdr-2.6.0/src/HdrWizard/HdrCreationManager.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrCreationManager.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrCreationManager.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,101 +27,123 @@ #ifndef HDRCREATIONMANAGER_H #define HDRCREATIONMANAGER_H +#include #include #include -#include -#include +#include #include +#include #include -#include -#include -#include #include +#include +#include -#include "Alignment/Align.h" -#include "Common/LuminanceOptions.h" -#include "Common/ProgressHelper.h" -#include "arch/math.h" -#include "HdrCreationItem.h" -#include "AutoAntighosting.h" +#include +#include +#include +#include +#include +#include // Some other file expect this to be available extern const FusionOperatorConfig predef_confs[6]; -class HdrCreationManager : public QObject -{ +class HdrCreationManager : public QObject { Q_OBJECT -private: + private: HdrCreationItemContainer m_data; HdrCreationItemContainer m_tmpdata; -public: + public: explicit HdrCreationManager(bool fromCommandLine = false); ~HdrCreationManager(); // ----- NEW FUNCTIONS ------ - HdrCreationItem& getFile(size_t idx) { return m_data[idx]; } - const HdrCreationItem& getFile(size_t idx) const { return m_data[idx]; } + HdrCreationItem &getFile(size_t idx) { return m_data[idx]; } + const HdrCreationItem &getFile(size_t idx) const { return m_data[idx]; } - void loadFiles(const QStringList& filenames); + void loadFiles(const QStringList &filenames); void removeFile(int idx); - void clearFiles() { m_data.clear(); m_tmpdata.clear(); } - size_t availableInputFiles() const { return m_data.size(); } + void clearFiles() { + m_data.clear(); + m_tmpdata.clear(); + } + size_t availableInputFiles() const { return m_data.size(); } QStringList getFilesWithoutExif() const; size_t numFilesWithoutExif() const; void setLoadResponseCurve(bool b) { m_isLoadResponseCurve = b; } bool isLoadResponseCurve() const { return m_isLoadResponseCurve; } - void setResponseCurveInputFilename(const QString &fn) { m_responseCurveInputFilename = fn; } - QString & getResponseCurveInputFilename() { return m_responseCurveInputFilename; } + void setResponseCurveInputFilename(const QString &fn) { + m_responseCurveInputFilename = fn; + } + QString &getResponseCurveInputFilename() { + return m_responseCurveInputFilename; + } // iterators - typedef HdrCreationItemContainer::iterator iterator; - typedef HdrCreationItemContainer::const_iterator const_iterator; - - iterator begin() { return m_data.begin(); } - iterator end() { return m_data.end(); } - const_iterator begin() const { return m_data.begin(); } - const_iterator end() const { return m_data.end(); } - - const libhdr::fusion::ResponseCurve& getResponseCurve() const { return *m_response; } - libhdr::fusion::ResponseCurve& getResponseCurve() { return *m_response; } - - const libhdr::fusion::WeightFunction& getWeightFunction() const { return *m_weight; } - libhdr::fusion::WeightFunction& getWeightFunction() { return *m_weight; } - - void setFusionOperator(libhdr::fusion::FusionOperator fo) { m_fusionOperator = fo; } - libhdr::fusion::FusionOperator getFusionOperator() { return m_fusionOperator; } + typedef HdrCreationItemContainer::iterator iterator; + typedef HdrCreationItemContainer::const_iterator const_iterator; - void setResponseCurveOutputFile(const QString& filename) { m_responseCurveOutputFilename = filename; } - const QString& responseCurveOutputFile() const { return m_responseCurveOutputFilename; } + iterator begin() { return m_data.begin(); } + iterator end() { return m_data.end(); } + const_iterator begin() const { return m_data.begin(); } + const_iterator end() const { return m_data.end(); } + + const libhdr::fusion::ResponseCurve &getResponseCurve() const { + return *m_response; + } + libhdr::fusion::ResponseCurve &getResponseCurve() { return *m_response; } + + const libhdr::fusion::WeightFunction &getWeightFunction() const { + return *m_weight; + } + libhdr::fusion::WeightFunction &getWeightFunction() { return *m_weight; } + + void setFusionOperator(libhdr::fusion::FusionOperator fo) { + m_fusionOperator = fo; + } + libhdr::fusion::FusionOperator getFusionOperator() { + return m_fusionOperator; + } + + void setResponseCurveOutputFile(const QString &filename) { + m_responseCurveOutputFilename = filename; + } + const QString &responseCurveOutputFile() const { + return m_responseCurveOutputFilename; + } - void setConfig(const FusionOperatorConfig& cfg); + void setConfig(const FusionOperatorConfig &cfg); - pfs::Frame* createHdr(); + pfs::Frame *createHdr(); void set_ais_crop_flag(bool flag); void align_with_ais(); void align_with_mtb(); - const HdrCreationItemContainer& getData() const { return m_data; } - //const QList& getAntiGhostingMasksList() const { return m_antiGhostingMasksList; } - //void setAntiGhostingMasksList(QList& list) { m_antiGhostingMasksList.swap(list); } - void setAntiGhostingMask(QImage* mask) { m_agMask = new QImage(*mask); } + const HdrCreationItemContainer &getData() const { return m_data; } + // const QList& getAntiGhostingMasksList() const { return + // m_antiGhostingMasksList; } + // void setAntiGhostingMasksList(QList& list) { + // m_antiGhostingMasksList.swap(list); } + void setAntiGhostingMask(QImage *mask) { m_agMask = new QImage(*mask); } QVector getExpotimes() const; - void applyShiftsToItems(const QList >&); - void cropItems(const QRect& ca); - void cropAgMasks(const QRect& ca); - - void saveImages(const QString& prefix); - //void doAntiGhosting(int); - int computePatches(float threshold, bool patches[][agGridSize], float &percent, QList > HV_offset); - pfs::Frame* doAntiGhosting(bool patches[][agGridSize], int h0, bool manualAg, ProgressHelper *ph); + void applyShiftsToItems(const QList> &); + void cropItems(const QRect &ca); + void cropAgMasks(const QRect &ca); + + void saveImages(const QString &prefix); + // void doAntiGhosting(int); + int computePatches(float threshold, bool patches[][agGridSize], + float &percent, QList> HV_offset); + pfs::Frame *doAntiGhosting(bool patches[][agGridSize], int h0, + bool manualAg, ProgressHelper *ph); void getAgData(bool patches[][agGridSize], int &h0); void setPatches(bool patches[][agGridSize]); @@ -129,30 +151,30 @@ void reset(); -signals: + signals: // computation progress void progressStarted(); void progressFinished(); void progressCancel(); - void progressRangeChanged(int,int); + void progressRangeChanged(int, int); void progressValueChanged(int); void finishedLoadingFiles(); // legacy code - void finishedLoadingInputFiles(const QStringList& filesLackingExif); - void errorWhileLoading(const QString& message); //also for !valid size + void finishedLoadingInputFiles(const QStringList &filesLackingExif); + void errorWhileLoading(const QString &message); // also for !valid size - void fileLoaded(int index, const QString& fname, float expotime); + void fileLoaded(int index, const QString &fname, float expotime); void finishedAligning(int); - void expotimeValueChanged(float,int); + void expotimeValueChanged(float, int); void ais_failed(QProcess::ProcessError); - void aisDataReady(const QByteArray& data); + void aisDataReady(QByteArray &data); void processed(); void imagesSaved(); void loadFilesAborted(); -private: + private: bool framesHaveSameSize(); void refreshEVOffset(); @@ -165,8 +187,9 @@ QString m_responseCurveOutputFilename; QFutureWatcher m_futureWatcher; - //QList m_antiGhostingMasksList; //QImages used for manual anti-ghosting - QImage* m_agMask; + // QList m_antiGhostingMasksList; //QImages used for manual + // anti-ghosting + QImage *m_agMask; LuminanceOptions m_luminance_options; // alignment @@ -178,7 +201,7 @@ bool m_patches[agGridSize][agGridSize]; bool m_isLoadResponseCurve; -private slots: + private slots: void ais_failed_slot(QProcess::ProcessError); void loadFilesDone(); }; diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.cpp luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,43 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida + */ + + +#include "HdrWizard/ui_HdrPreview.h" +#include "HdrWizard/HdrPreview.h" + +HdrPreview::HdrPreview(QDialog *parent) + : QDialog(parent), + m_Ui(new Ui::HdrPreview), + m_viewer(new HdrViewer(NULL)) { + + m_Ui->setupUi(this); + m_Ui->hdrPreviewFrame->layout()->addWidget(m_viewer.data()); + m_viewer->setFocus(); +} + +HdrPreview::~HdrPreview() { +} + +void HdrPreview::showEvent(QShowEvent *) { + m_viewer->setFocus(); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.h luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,51 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida + */ + +#ifndef HDRPREVIEW_H +#define HDRPREVIEW_H + +#include + +#include "Viewers/HdrViewer.h" + +namespace Ui { +class HdrPreview; +} + +class HdrPreview : public QDialog { + Q_OBJECT + public: + + HdrPreview(QDialog *parent); + ~HdrPreview(); + + void setFrame(std::shared_ptr frame) {m_viewer->setFrameShared(frame); } + + protected: + QScopedPointer m_Ui; + QSharedPointer m_viewer; + + void showEvent(QShowEvent *); +}; + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.ui luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.ui --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrPreview.ui 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrPreview.ui 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,79 @@ + + + HdrPreview + + + + 0 + 0 + 660 + 509 + + + + HDR Preview + + + + + + + 500 + 250 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + + + + Qt::Horizontal + + + + 555 + 20 + + + + + + + + Close + + + + + + + + + pushButton + clicked() + HdrPreview + accept() + + + 605 + 486 + + + 485 + 476 + + + + + diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.cpp luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,77 +21,62 @@ * ---------------------------------------------------------------------- */ -#include "HdrWizard.h" -#include "ui_HdrWizard.h" +#include "HdrWizard/HdrWizard.h" +#include "HdrWizard/ui_HdrWizard.h" -#include #include #include +#include #include -#include -#include #include #include -#include -#include +#include #include #include #include #include +#include #include +#include // #include +#include +#include #include #include -#include -#include // --- SQL handling -#include +#include #include #include -#include +#include // --- end SQL handling -#include "arch/math.h" -#include "arch/freebsd/math.h" +#include "Common/CommonFunctions.h" #include "Common/config.h" #include "Common/global.h" -#include "OsIntegration/osintegration.h" #include "HdrWizard/EditingTools.h" #include "HdrWizard/HdrCreationManager.h" +#include "OsIntegration/osintegration.h" +#include "arch/freebsd/math.h" +#include "arch/math.h" using namespace libhdr::fusion; -static const ResponseCurveType responses_in_gui[] = -{ - RESPONSE_LINEAR, - RESPONSE_GAMMA, - RESPONSE_LOG10, - RESPONSE_SRGB, - RESPONSE_CUSTOM, +static const ResponseCurveType responses_in_gui[] = { + RESPONSE_LINEAR, RESPONSE_GAMMA, RESPONSE_LOG10, + RESPONSE_SRGB, RESPONSE_CUSTOM, }; -static const FusionOperator models_in_gui[] = -{ - DEBEVEC, - ROBERTSON, - ROBERTSON_AUTO -}; +static const FusionOperator models_in_gui[] = {DEBEVEC, ROBERTSON, + ROBERTSON_AUTO}; -static const WeightFunctionType weights_in_gui[] = -{ - WEIGHT_TRIANGULAR, - WEIGHT_GAUSSIAN, - WEIGHT_PLATEAU, - WEIGHT_FLAT -}; +static const WeightFunctionType weights_in_gui[] = { + WEIGHT_TRIANGULAR, WEIGHT_GAUSSIAN, WEIGHT_PLATEAU, WEIGHT_FLAT}; -namespace -{ +namespace { -static QString buildEVString(float newEV) -{ +static QString buildEVString(float newEV) { QString EVdisplay; QTextStream ts(&EVdisplay); ts.setRealNumberPrecision(2); @@ -100,189 +85,159 @@ return EVdisplay; } -static void updateTableItem(QTableWidgetItem* tableItem, float newEV) -{ +static void updateTableItem(QTableWidgetItem *tableItem, float newEV) { tableItem->setBackground(QBrush(Qt::white)); tableItem->setForeground(QBrush(Qt::black)); tableItem->setText(buildEVString(newEV)); } - } -HdrWizard::HdrWizard(QWidget *p, - const QStringList &files, - const QStringList &/*inputFilesName*/, - const QVector &/*inputExpoTimes*/) - : QDialog(p) - , m_Ui(new Ui::HdrWizard) - , m_hdrCreationManager(new HdrCreationManager) - , m_doAutoAntighosting(false) - , m_doManualAntighosting(false) - , m_processing(false) -{ +HdrWizard::HdrWizard(QWidget *p, const QStringList &files, + const QStringList &, + const QVector &, + QSqlDatabase db + ) + : QDialog(p), + m_Ui(new Ui::HdrWizard), + m_hdrCreationManager(new HdrCreationManager), + m_pfsFrameHDR(nullptr), + m_doAutoAntighosting(false), + m_doManualAntighosting(false), + m_processing(false), + m_isConfigChanged(false), + m_db(db), + m_hdrPreview(new HdrPreview(0)) { m_Ui->setupUi(this); - if ( !QIcon::hasThemeIcon("edit-clear-list") ) - m_Ui->clearListButton->setIcon(QIcon(":/program-icons/edit-clear-list")); + if (!QIcon::hasThemeIcon(QStringLiteral("edit-clear-list"))) + m_Ui->clearListButton->setIcon( + QIcon(":/program-icons/edit-clear-list")); setAcceptDrops(true); setupConnections(); m_Ui->tableWidget->setHorizontalHeaderLabels( - QStringList() << tr("Image Filename") << tr("Exposure") - ); - m_Ui->tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); + QStringList() << tr("Image Filename") << tr("Exposure")); + m_Ui->tableWidget->horizontalHeader()->setSectionResizeMode( + 0, QHeaderView::Stretch); m_Ui->tableWidget->verticalHeader()->hide(); // m_Ui->tableWidget->resizeColumnsToContents(); m_Ui->progressBar->hide(); m_Ui->textEdit->hide(); + m_Ui->HideLogButton->hide(); - if (files.size()) - { + if (files.size()) { m_Ui->pagestack->setCurrentIndex(0); QMetaObject::invokeMethod(this, "loadInputFiles", Qt::QueuedConnection, Q_ARG(QStringList, files)); } - - // Same code as the one in BatchHDRDialog!!! TODO: put everything in the same - // place :( - /* - QSqlQueryModel model; - model.setQuery("SELECT * FROM parameters"); - for (int i = 0; i < model.rowCount(); i++) { - m_Ui->predefConfigsComboBox->addItem(tr("Custom config %1").arg(i+1)); - int weight_ = model.record(i).value("weight").toInt(); - int response_ = model.record(i).value("response").toInt(); - int model_ = model.record(i).value("model").toInt(); - QString filename_ = model.record(i).value("filename").toString(); - FusionOperatorConfig ct; - switch (weight_) { - case 0: - ct.weights = TRIANGULAR; - break; - case 1: - ct.weights = GAUSSIAN; - break; - case 2: - ct.weights = PLATEAU; - break; - } - switch (response_) { - case 0: - ct.response_curve = FROM_FILE; - ct.LoadCurveFromFilename = filename_; - ct.SaveCurveToFilename = ""; - break; - case 1: - ct.response_curve = LINEAR; - break; - case 2: - ct.response_curve = GAMMA; - break; - case 3: - ct.response_curve = LOG10; - break; - case 4: - ct.response_curve = FROM_ROBERTSON; - break; - } - switch (model_) { - case 0: - ct.model = DEBEVEC; - break; - case 1: - ct.model = ROBERTSON; - break; - } - m_customConfig.push_back(ct); - } - */ } -HdrWizard::~HdrWizard() -{ -#ifdef QT_DEBUG - qDebug() << "HdrWizard::~HdrWizard()"; -#endif +HdrWizard::~HdrWizard() { } -void HdrWizard::setupConnections() -{ - //connect(&m_ioFutureWatcher, SIGNAL(finished()), this, SLOT(loadInputFilesDone())); - - connect(m_hdrCreationManager.data(), SIGNAL(finishedLoadingFiles()), this, SLOT(loadInputFilesDone())); - //connect(m_hdrCreationManager.data(), SIGNAL(progressStarted()), m_Ui->progressBar, SLOT(show()), Qt::DirectConnection); - //connect(m_hdrCreationManager.data(), SIGNAL(progressFinished()), m_Ui->progressBar, SLOT(reset())); - //connect(m_hdrCreationManager.data(), SIGNAL(progressFinished()), m_Ui->progressBar, SLOT(hide()), Qt::DirectConnection); +void HdrWizard::setupConnections() { - connect(m_hdrCreationManager.data(), SIGNAL(progressRangeChanged(int,int)), this, SIGNAL(setRange(int,int)), Qt::DirectConnection); - connect(m_hdrCreationManager.data(), SIGNAL(progressValueChanged(int)), this, SIGNAL(setValue(int)), Qt::DirectConnection); + connect(m_hdrCreationManager.data(), + &HdrCreationManager::finishedLoadingFiles, this, + &HdrWizard::loadInputFilesDone); + connect(m_hdrCreationManager.data(), + &HdrCreationManager::progressRangeChanged, this, + &HdrWizard::setRange, Qt::DirectConnection); + connect(m_hdrCreationManager.data(), + &HdrCreationManager::progressValueChanged, this, + &HdrWizard::setValue, Qt::DirectConnection); + connect(this, &HdrWizard::setValue, m_Ui->progressBar, + &QProgressBar::setValue, Qt::DirectConnection); + connect(this, &HdrWizard::setRange, m_Ui->progressBar, + &QProgressBar::setRange, Qt::DirectConnection); + + connect(this, &HdrWizard::setValue, OsIntegration::getInstancePtr(), + &OsIntegration::setProgressValue, Qt::DirectConnection); + connect(this, &HdrWizard::setRange, OsIntegration::getInstancePtr(), + &OsIntegration::setProgressRange, Qt::DirectConnection); - connect(this, SIGNAL(setValue(int)), m_Ui->progressBar, SLOT(setValue(int)), Qt::DirectConnection); - connect(this, SIGNAL(setRange(int,int)), m_Ui->progressBar, SLOT(setRange(int,int)), Qt::DirectConnection); - - connect(this, SIGNAL(setValue(int)), OsIntegration::getInstancePtr(), SLOT(setProgressValue(int)), Qt::DirectConnection); - connect(this, SIGNAL(setRange(int,int)), OsIntegration::getInstancePtr(), SLOT(setProgressRange(int,int)), Qt::DirectConnection); - - connect(m_Ui->NextFinishButton, SIGNAL(clicked()), this, SLOT(NextFinishButtonClicked())); + connect(m_Ui->NextFinishButton, &QAbstractButton::clicked, this, + &HdrWizard::NextFinishButtonClicked); connect(m_Ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_Ui->pagestack, SIGNAL(currentChanged(int)), this, SLOT(currentPageChangedInto(int))); + connect(m_Ui->pagestack, &QStackedWidget::currentChanged, this, + &HdrWizard::currentPageChangedInto); - connect(m_Ui->loadImagesButton, SIGNAL(clicked()), this, SLOT(loadImagesButtonClicked())); - connect(m_Ui->removeImageButton, SIGNAL(clicked()), this, SLOT(removeImageButtonClicked())); - connect(m_Ui->clearListButton, SIGNAL(clicked()), this, SLOT(clearListButtonClicked())); - - connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); - connect(m_Ui->EVSlider, SIGNAL(valueChanged(int)), this, SLOT(updateEVSlider(int))); - connect(m_Ui->ImageEVdsb, SIGNAL(valueChanged(double)), this, SLOT(updateEVSpinBox(double))); - /* - connect(m_Ui->ais_radioButton, SIGNAL(clicked()), this, SLOT(alignSelectionClicked())); - connect(m_Ui->mtb_radioButton, SIGNAL(clicked()), this, SLOT(alignSelectionClicked())); - */ - connect(m_Ui->profileComboBox, SIGNAL(activated(int)), this, SLOT(predefConfigsComboBoxActivated(int))); - connect(m_Ui->customConfigCheckBox, SIGNAL(toggled(bool)), this, SLOT(customConfigCheckBoxToggled(bool))); - connect(m_Ui->weightFunctionComboBox, SIGNAL(activated(int)), this, SLOT(weightingFunctionComboBoxActivated(int))); - connect(m_Ui->responseCurveComboBox, SIGNAL(activated(int)), this, SLOT(responseCurveComboBoxActivated(int))); - connect(m_Ui->saveRespCurveFileButton, SIGNAL(clicked()), this, SLOT(saveRespCurveFileButtonClicked())); - connect(m_Ui->modelComboBox, SIGNAL(activated(int)), this, SLOT(modelComboBoxActivated(int))); - - /* - connect(m_hdrCreationManager.data(), SIGNAL(fileLoaded(int,QString,float)), this, SLOT(fileLoaded(int,QString,float))); - connect(m_hdrCreationManager.data(), SIGNAL(finishedLoadingInputFiles(QStringList)), this, SLOT(finishedLoadingInputFiles(QStringList))); - */ - connect(m_hdrCreationManager.data(), SIGNAL(errorWhileLoading(QString)), this, SLOT(errorWhileLoading(QString))); - //connect(m_hdrCreationManager.data(), SIGNAL(expotimeValueChanged(float,int)), this, SLOT(updateGraphicalEVvalue(float,int))); - connect(m_hdrCreationManager.data(), SIGNAL(finishedAligning(int)), this, SLOT(finishedAligning(int))); - connect(m_hdrCreationManager.data(), SIGNAL(ais_failed(QProcess::ProcessError)), this, SLOT(ais_failed(QProcess::ProcessError))); - connect(m_hdrCreationManager.data(), SIGNAL(aisDataReady(QByteArray)), this, SLOT(writeAisData(QByteArray))); - - //connect(this, SIGNAL(rejected()), m_hdrCreationManager.data(), SLOT(removeTempFiles())); - //connect(this, SIGNAL(rejected()), OsIntegration::getInstancePtr(), SLOT(setProgressValue(-1)), Qt::DirectConnection); - connect(m_Ui->threshold_horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(updateThresholdSlider(int))); - connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateThresholdSpinBox(double))); + connect(m_Ui->loadImagesButton, &QAbstractButton::clicked, this, + &HdrWizard::loadImagesButtonClicked); + connect(m_Ui->removeImageButton, &QAbstractButton::clicked, this, + &HdrWizard::removeImageButtonClicked); + connect(m_Ui->clearListButton, &QAbstractButton::clicked, this, + &HdrWizard::clearListButtonClicked); + + connect(m_Ui->tableWidget, &QTableWidget::currentCellChanged, this, + &HdrWizard::inputHdrFileSelected); + connect(m_Ui->EVSlider, &QAbstractSlider::valueChanged, this, + &HdrWizard::updateEVSlider); + connect(m_Ui->ImageEVdsb, SIGNAL(valueChanged(double)), this, + SLOT(updateEVSpinBox(double))); + connect(m_Ui->profileComboBox, SIGNAL(activated(int)), this, + SLOT(predefConfigsComboBoxActivated(int))); + connect(m_Ui->customConfigCheckBox, &QAbstractButton::toggled, this, + &HdrWizard::customConfigCheckBoxToggled); + connect(m_Ui->weightFunctionComboBox, SIGNAL(activated(int)), this, + SLOT(weightingFunctionComboBoxActivated(int))); + connect(m_Ui->responseCurveComboBox, SIGNAL(activated(int)), this, + SLOT(responseCurveComboBoxActivated(int))); + connect(m_Ui->saveRespCurveFileButton, &QAbstractButton::clicked, this, + &HdrWizard::saveRespCurveFileButtonClicked); + connect(m_Ui->modelComboBox, SIGNAL(activated(int)), this, + SLOT(modelComboBoxActivated(int))); + + connect(m_hdrCreationManager.data(), &HdrCreationManager::errorWhileLoading, + this, &HdrWizard::errorWhileLoading); + connect(m_hdrCreationManager.data(), &HdrCreationManager::finishedAligning, + this, &HdrWizard::finishedAligning); + connect(m_hdrCreationManager.data(), &HdrCreationManager::ais_failed, this, + &HdrWizard::ais_failed); + connect(m_hdrCreationManager.data(), &HdrCreationManager::aisDataReady, + this, &HdrWizard::writeAisData); + + connect(m_Ui->threshold_horizontalSlider, &QAbstractSlider::valueChanged, + this, &HdrWizard::updateThresholdSlider); + connect(m_Ui->threshold_doubleSpinBox, SIGNAL(valueChanged(double)), this, + SLOT(updateThresholdSpinBox(double))); + connect(m_Ui->HideLogButton, SIGNAL(clicked(bool)), + this, SLOT(updateHideLogButtonText(bool))); } -void HdrWizard::loadImagesButtonClicked() -{ +void HdrWizard::loadImagesButtonClicked() { QString filetypes; - // when changing these filetypes, also change in DnDOption - for Drag and Drop - filetypes += tr("All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw"); - filetypes += tr("*.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);;"); + // when changing these filetypes, also change in DnDOption - for Drag and + // Drop + filetypes += tr( + "All formats (*.jpeg *.jpg *.tiff *.tif *.crw *.cr2 *.nef *.dng *.mrw " + "*.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 " + "*.3fr *.mef *.mos *.erf *.nrw *.srw"); + filetypes += tr( + "*.JPEG *.JPG *.TIFF *.TIF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC " + "*.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF " + "*.MOS *.ERF *.NRW *.SRW);;"); filetypes += tr("JPEG (*.jpeg *.jpg *.JPEG *.JPG);;"); filetypes += tr("TIFF Images (*.tiff *.tif *.TIFF *.TIF);;"); - filetypes += tr("RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw"); - filetypes += tr("*.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW)"); - - QStringList files = QFileDialog::getOpenFileNames(this, tr("Select the input images"), luminance_options.getDefaultPathLdrIn(), filetypes ); + filetypes += + tr("RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw " + "*.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf " + "*.nrw *.srw"); + filetypes += tr( + "*.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX " + "*.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW)"); + + QStringList files = QFileDialog::getOpenFileNames( + this, tr("Select the input images"), + luminance_options.getDefaultPathLdrIn(), filetypes); loadInputFiles(files); } -void HdrWizard::updateTableGrid() -{ - qDebug() << "HdrWizard::updateTableGrid(): Fill grid with values in the m_data structure"; +void HdrWizard::updateTableGrid() { int currentRow = m_Ui->tableWidget->currentRow(); @@ -293,33 +248,34 @@ // insert the row at the bottom of the table widget int counter = 0; QStringList filesWithoutExif; - BOOST_FOREACH(const HdrCreationItem& item, *m_hdrCreationManager) - { + BOOST_FOREACH (const HdrCreationItem &item, *m_hdrCreationManager) { float normalizedEV = item.getEV() - m_hdrCreationManager->getEVOffset(); - qDebug() << QString("HdrWizard::updateTableGrid(): Fill row %1: %2 %3 EV (%4 EV)") - .arg(counter) - .arg(item.filename()) - .arg(item.getEV()) - .arg(normalizedEV); + qDebug() << QStringLiteral( + "HdrWizard::updateTableGrid(): Fill row %1: \ + %2 %3 EV (%4 EV)") + .arg(counter) + .arg(item.filename()) + .arg(item.getEV()) + .arg(normalizedEV); // fill graphical list m_Ui->tableWidget->insertRow(counter); - m_Ui->tableWidget->setItem(counter, 0, new QTableWidgetItem(QFileInfo(item.filename()).fileName())); - if (item.hasEV()) - { - QTableWidgetItem *tableitem = new QTableWidgetItem(buildEVString(normalizedEV)); + m_Ui->tableWidget->setItem( + counter, 0, + new QTableWidgetItem(QFileInfo(item.filename()).fileName())); + if (item.hasEV()) { + QTableWidgetItem *tableitem = + new QTableWidgetItem(buildEVString(normalizedEV)); tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); m_Ui->tableWidget->setItem(counter, 1, tableitem); - } - else - { + } else { // if image doesn't contain (the required) exif tags // I keep the name of all the files without exif data... filesWithoutExif.push_back(item.filename()); - - QTableWidgetItem *tableitem = new QTableWidgetItem(QString(tr("Unknown"))); + QTableWidgetItem *tableitem = + new QTableWidgetItem(QString(tr("Unknown"))); tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); tableitem->setBackground(QBrush(Qt::yellow)); tableitem->setForeground(QBrush(Qt::red)); @@ -330,35 +286,25 @@ } // highlight current row (possibly remain on the previously selected one!) - if (currentRow < 0) - { - if (m_hdrCreationManager->availableInputFiles() > 0) - { + if (currentRow < 0) { + if (m_hdrCreationManager->availableInputFiles() > 0) { currentRow = 0; - } - else - { + } else { currentRow = -1; } - } - else - { - if (currentRow > (int)m_hdrCreationManager->availableInputFiles()) - { + } else { + if (currentRow > (int)m_hdrCreationManager->availableInputFiles()) { currentRow = 0; } // else, don't change the value! } m_Ui->tableWidget->selectRow(currentRow); - if (counter) - { + if (counter) { m_Ui->clearListButton->setEnabled(true); enableNextOrWarning(filesWithoutExif); - } - else - { + } else { m_Ui->clearListButton->setEnabled(false); m_Ui->removeImageButton->setEnabled(false); m_Ui->NextFinishButton->setEnabled(false); @@ -367,9 +313,7 @@ } } -void HdrWizard::removeImageButtonClicked() -{ - qDebug() << "HdrWizard::removeImageButtonClicked()"; +void HdrWizard::removeImageButtonClicked() { int index = m_Ui->tableWidget->currentRow(); @@ -381,75 +325,68 @@ updateTableGrid(); } -void HdrWizard::clearListButtonClicked() -{ - qDebug() << "HdrWizard::clearListButtonClicked()"; +void HdrWizard::clearListButtonClicked() { m_hdrCreationManager->clearFiles(); updateTableGrid(); } -void HdrWizard::updateEVSlider(int newValue) -{ +void HdrWizard::updateEVSlider(int newValue) { int currentRow = m_Ui->tableWidget->currentRow(); - float newEV = ((float)newValue)/100.f; + float newEV = ((float)newValue) / 100.f; bool oldState = m_Ui->ImageEVdsb->blockSignals(true); m_Ui->ImageEVdsb->setValue(newEV); m_Ui->ImageEVdsb->blockSignals(oldState); - qDebug() << QString("HdrWizard::updateEVSlider(): %1 EV (%2) for %3") - .arg(newEV) - .arg(newEV + m_hdrCreationManager->getEVOffset()) - .arg(currentRow); + qDebug() << QStringLiteral("HdrWizard::updateEVSlider(): %1 EV (%2) for %3") + .arg(newEV) + .arg(newEV + m_hdrCreationManager->getEVOffset()) + .arg(currentRow); QTableWidgetItem *tableitem = m_Ui->tableWidget->item(currentRow, 1); - if (tableitem) - { + if (tableitem) { updateTableItem(tableitem, newEV); } - m_hdrCreationManager->getFile(currentRow).setEV(newEV + m_hdrCreationManager->getEVOffset()); + m_hdrCreationManager->getFile(currentRow) + .setEV(newEV + m_hdrCreationManager->getEVOffset()); updateLabelMaybeNext(m_hdrCreationManager->numFilesWithoutExif()); } -void HdrWizard::updateEVSpinBox(double newEV) -{ +void HdrWizard::updateEVSpinBox(double newEV) { int currentRow = m_Ui->tableWidget->currentRow(); bool oldState = m_Ui->EVSlider->blockSignals(true); - m_Ui->EVSlider->setValue( (int)(newEV*100) ); + m_Ui->EVSlider->setValue((int)(newEV * 100)); m_Ui->EVSlider->blockSignals(oldState); - qDebug() << QString("HdrWizard::updateEVSpinBox(): %1 EV (%2) for %3") - .arg(newEV) - .arg(newEV + m_hdrCreationManager->getEVOffset()) - .arg(currentRow); + qDebug() << QStringLiteral( + "HdrWizard::updateEVSpinBox(): %1 EV (%2) for %3") + .arg(newEV) + .arg(newEV + m_hdrCreationManager->getEVOffset()) + .arg(currentRow); QTableWidgetItem *tableitem = m_Ui->tableWidget->item(currentRow, 1); - if (tableitem) - { + if (tableitem) { updateTableItem(tableitem, newEV); } - m_hdrCreationManager->getFile(currentRow).setEV(newEV + m_hdrCreationManager->getEVOffset()); + m_hdrCreationManager->getFile(currentRow) + .setEV(newEV + m_hdrCreationManager->getEVOffset()); updateLabelMaybeNext(m_hdrCreationManager->numFilesWithoutExif()); } -void HdrWizard::inputHdrFileSelected(int currentRow) -{ - qDebug() << QString("HdrWizard::inputHdrFileSelected(%1)").arg(currentRow); +void HdrWizard::inputHdrFileSelected(int currentRow) { - if ((currentRow < 0) || (m_Ui->tableWidget->rowCount() < 0)) - { + if ((currentRow < 0) || (m_Ui->tableWidget->rowCount() < 0)) { // no selection... m_Ui->EVgroupBox->setEnabled(false); m_Ui->removeImageButton->setEnabled(false); m_Ui->clearListButton->setEnabled(false); m_Ui->NextFinishButton->setEnabled(false); m_Ui->previewLabel->clear(); - } - else // if ( m_Ui->tableWidget->rowCount() > 0 ) + } else // if ( m_Ui->tableWidget->rowCount() > 0 ) { // enable remove button m_Ui->removeImageButton->setEnabled(true); @@ -460,15 +397,15 @@ m_Ui->EVSlider->blockSignals(true); m_Ui->EVgroupBox->setEnabled(true); - if (m_hdrCreationManager->getFile(currentRow).hasEV()) - { - float normalizedEV = m_hdrCreationManager->getFile(currentRow).getEV() - m_hdrCreationManager->getEVOffset(); + if (m_hdrCreationManager->getFile(currentRow).hasEV()) { + float normalizedEV = + m_hdrCreationManager->getFile(currentRow).getEV() - + m_hdrCreationManager->getEVOffset(); m_Ui->ImageEVdsb->setValue(normalizedEV); - m_Ui->EVSlider->setValue(static_cast(normalizedEV*100.f + 0.5f)); - } - else - { + m_Ui->EVSlider->setValue( + static_cast(normalizedEV * 100.f + 0.5f)); + } else { m_Ui->ImageEVdsb->setValue(0.0); m_Ui->EVSlider->setValue(0); } @@ -476,84 +413,52 @@ m_Ui->EVSlider->blockSignals(false); // load QImage... - m_Ui->previewLabel->setPixmap( - QPixmap::fromImage( - m_hdrCreationManager->getFile(currentRow).qimage().scaled( - m_Ui->previewLabel->size(), Qt::KeepAspectRatio) - )); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage( + m_hdrCreationManager->getFile(currentRow) + .qimage() + .scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); m_Ui->ImageEVdsb->setFocus(); } } - -void HdrWizard::dragEnterEvent(QDragEnterEvent *event) -{ +void HdrWizard::dragEnterEvent(QDragEnterEvent *event) { if (m_Ui->loadImagesButton->isEnabled()) { event->acceptProposedAction(); } } -void HdrWizard::dropEvent(QDropEvent *event) -{ - if (event->mimeData()->hasUrls()) - { - QStringList files = convertUrlListToFilenameList(event->mimeData()->urls()); +void HdrWizard::dropEvent(QDropEvent *event) { + if (event->mimeData()->hasUrls()) { + QStringList files = + convertUrlListToFilenameList(event->mimeData()->urls()); loadInputFiles(files); } event->acceptProposedAction(); } -void HdrWizard::loadInputFiles(const QStringList& files) -{ - if ( !files.isEmpty() ) - { +void HdrWizard::loadInputFiles(const QStringList &files) { + if (!files.isEmpty()) { // update the luminance_options luminance_options.setDefaultPathLdrIn(QFileInfo(files.at(0)).path()); m_Ui->loadImagesButton->setEnabled(false); - m_Ui->confirmloadlabel->setText("

" + tr("Loading...") + "

"); -/* - QProgressDialog progressDialog(this); - progressDialog.setWindowModality(Qt::WindowModal); - progressDialog.setLabelText(QString("Loading %1 file(s) using %2 thread(s)...") - .arg(files.size()) - .arg(QThread::idealThreadCount()) - ); - - connect(m_hdrCreationManager.data(), SIGNAL(progressStarted()), &progressDialog, SLOT(exec())); - connect(m_hdrCreationManager.data(), SIGNAL(progressStarted()), &progressDialog, SLOT(show())); - connect(m_hdrCreationManager.data(), SIGNAL(progressFinished()), &progressDialog, SLOT(reset())); - connect(m_hdrCreationManager.data(), SIGNAL(progressFinished()), &progressDialog, SLOT(hide())); - connect(m_hdrCreationManager.data(), SIGNAL(progressRangeChanged(int,int)), &progressDialog, SLOT(setRange(int,int))); - connect(m_hdrCreationManager.data(), SIGNAL(progressValueChanged(int)), &progressDialog, SLOT(setValue(int))); - connect(&progressDialog, SIGNAL(canceled()), m_hdrCreationManager.data(), SIGNAL(progressCancel())); -*/ + m_Ui->confirmloadlabel->setText("

" + tr("Loading...") + + "

"); + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); m_Ui->progressBar->show(); - // m_hdrCreationManager->loadFiles(files); - //connect(&m_futureWatcher, SIGNAL(started()), m_Ui->progressBar, SLOT(show())); - //connect(&m_futureWatcher, SIGNAL(finished()), m_Ui->progressBar, SLOT(hide())); + m_inputFilesName = files; m_futureWatcher.setFuture( - QtConcurrent::run( - boost::bind(&HdrCreationManager::loadFiles, - m_hdrCreationManager.data(), - files) - ) - ); - - - // Query the progress dialog to check if was canceled. - // qDebug() << "Canceled?" << progressDialog.wasCanceled(); + QtConcurrent::run(boost::bind(&HdrCreationManager::loadFiles, + m_hdrCreationManager.data(), files))); } } -void HdrWizard::loadInputFilesDone() -{ - m_futureWatcher.waitForFinished(); // should breeze over... - qDebug() << "HdrWizard::loadInputFilesDone()"; +void HdrWizard::loadInputFilesDone() { + m_futureWatcher.waitForFinished(); // should breeze over... m_Ui->progressBar->hide(); m_Ui->loadImagesButton->setEnabled(true); @@ -562,8 +467,7 @@ m_Ui->alignGroupBox->setEnabled(true); m_Ui->agGroupBox->setEnabled(true); - if (m_Ui->tableWidget->rowCount() > 1) - { + if (m_Ui->tableWidget->rowCount() > 1) { m_Ui->alignCheckBox->setEnabled(true); } @@ -572,60 +476,72 @@ // this function should be called if we have at least a file currently in // memory, otherwise it will give a misleading information -void HdrWizard::enableNextOrWarning(const QStringList& filesWithoutExif) -{ +void HdrWizard::enableNextOrWarning(const QStringList &filesWithoutExif) { // If I have at least one file with empty EXIF, I raise an error... - if ( !filesWithoutExif.empty() ) - { + if (!filesWithoutExif.empty()) { QString warningMessage = - tr("

WARNING:

"\ - "Luminance HDR was not able to find the relevant EXIF " \ - "tags for the following images:" \ - "
    "); + tr("

    WARNING:

    " + "Luminance HDR was not able to find the relevant EXIF " + "tags for the following images:" + "
      "); - foreach(const QString& filename, filesWithoutExif) { + foreach (const QString &filename, filesWithoutExif) { QFileInfo qfi(filename); warningMessage += "
    • " + qfi.baseName() + "
    • "; } - warningMessage += - tr("
    "\ - "
    You can still proceed creating an Hdr. To do so you have to insert manually the EV (exposure values) or stop difference values." \ - "
    If you want Luminance HDR to do this automatically, you have to load images that have at least the following exif data: " \ - "
    • Exposure Bias
    " - "
    HINT: Losing EXIF data usually happens when you preprocess your pictures.
    " \ - "You can perform a one-to-one copy of the exif data between two sets of images via the " \ - "Tools->Copy Exif Data... menu item."); - - // "
    • Shutter Speed (seconds)
    • " - // "
    • Aperture (f-number)
    " + warningMessage += tr( + "
" + "
Luminance HDR has inserted those values for you, two stops " + "apart.
" + "If the guess is correct you can proceed creating the HDR, " + "otherwise you have to manually correct the EVs (exposure " + "values) or stop difference values. " + "
To avoid this warning in the future you must load images that " + "have at least the following exif data: " + "
  • Shutter Speed (seconds)
" + "
  • Aperture (F-Number)
" + "
  • Exposure Bias
" + "
HINT: Losing EXIF data usually happens when you " + "preprocess your pictures.
" + "You can perform a one-to-one copy of the exif data between " + "two sets of images via the " + "Tools->Copy Exif Data... menu item."); QApplication::restoreOverrideCursor(); - QMessageBox::warning(this, tr("EXIF data not found"), warningMessage); + if (luminance_options.isShowMissingEVsWarning()) { + QMessageBox msgBox; + QCheckBox cb(tr("Do not show this message again")); + msgBox.setText(tr("EXIF data not found")); + msgBox.setInformativeText(warningMessage); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setCheckBox(&cb); + msgBox.exec(); + if (msgBox.checkBox()->isChecked()) + luminance_options.setShowMissingEVsWarning(false); + } + setEVsValues(); QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); } updateLabelMaybeNext(filesWithoutExif.size()); } -void HdrWizard::updateLabelMaybeNext(size_t numFilesWithoutExif) -{ - if ( numFilesWithoutExif == 0 ) { +void HdrWizard::updateLabelMaybeNext(size_t numFilesWithoutExif) { + if (numFilesWithoutExif == 0) { m_Ui->NextFinishButton->setEnabled(true); m_Ui->confirmloadlabel->setText( - tr("

Images Loaded." \ - "

")); + tr("

Images Loaded." + "

")); } else { - m_Ui->NextFinishButton->setEnabled(false); + m_Ui->NextFinishButton->setEnabled(true); m_Ui->confirmloadlabel->setText( - tr("

To proceed you need to manually " \ - "set the exposure values.
%1 " \ - "values still required.

") - .arg(numFilesWithoutExif)); + tr("

Please check that " + "all exposure values are correct before " + "proceedings.

")); } } -void HdrWizard::errorWhileLoading(const QString& error) -{ +void HdrWizard::errorWhileLoading(const QString &error) { m_Ui->tableWidget->clear(); m_Ui->tableWidget->setRowCount(0); m_Ui->tableWidget->setEnabled(true); @@ -637,29 +553,23 @@ m_Ui->clearListButton->setEnabled(false); m_Ui->NextFinishButton->setEnabled(false); m_Ui->EVgroupBox->setEnabled(false); - QMessageBox::critical(this,tr("Loading Error: "), error); + QMessageBox::critical(this, tr("Loading Error: "), error); // DAVIDE _ HDR CREATION m_hdrCreationManager->clearFiles(); QApplication::restoreOverrideCursor(); - m_Ui->confirmloadlabel->setText("

"+ - tr("Start loading a set of images with different exposure") + - "

"); + m_Ui->confirmloadlabel->setText( + "

" + + tr("Start loading a set of images with different exposure") + + "

"); } -void HdrWizard::finishedAligning(int exitcode) -{ +void HdrWizard::finishedAligning(int exitcode) { emit setValue(-1); m_Ui->progressBar->hide(); - m_Ui->textEdit->hide(); QApplication::restoreOverrideCursor(); - if (exitcode != 0) - { - /* - QMessageBox::warning(this, tr("Error..."), - tr("align_image_stack failed to align images.")); - */ + if (exitcode != 0) { ais_failed(QProcess::UnknownError); return; } @@ -668,26 +578,36 @@ m_Ui->progressBar->hide(); } -void HdrWizard::ais_failed(QProcess::ProcessError e) -{ +void HdrWizard::ais_failed(QProcess::ProcessError e) { emit setValue(-1); m_Ui->progressBar->hide(); m_Ui->textEdit->hide(); QApplication::restoreOverrideCursor(); switch (e) { - case QProcess::FailedToStart: - QMessageBox::warning(this, tr("Error..."), tr("Failed to start external application \"align_image_stack\".
Please read \"Help -> Contents... -> Setting up -> External Tools\" for more information.")); - break; - case QProcess::Crashed: - QMessageBox::warning(this, tr("Error..."), tr("The external application \"align_image_stack\" crashed...")); - break; - case QProcess::Timedout: - case QProcess::ReadError: - case QProcess::WriteError: - case QProcess::UnknownError: - QMessageBox::warning(this, tr("Error..."), tr("An unknown error occurred while executing the \"align_image_stack\" application...")); - break; + case QProcess::FailedToStart: + QMessageBox::warning( + this, tr("Error..."), + tr("Failed to start external application " + "\"align_image_stack\".
Please read " + "\"Help -> Contents... -> Setting up -> External " + "Tools\" for more information.")); + break; + case QProcess::Crashed: + QMessageBox::warning( + this, tr("Error..."), + tr("The external application " + "\"align_image_stack\" crashed...")); + break; + case QProcess::Timedout: + case QProcess::ReadError: + case QProcess::WriteError: + case QProcess::UnknownError: + QMessageBox::warning( + this, tr("Error..."), + tr("An unknown error occurred while executing the " + "\"align_image_stack\" application...")); + break; } m_Ui->tableWidget->setEnabled(true); m_Ui->previewLabel->setEnabled(true); @@ -699,318 +619,273 @@ m_Ui->NextFinishButton->setEnabled(true); m_Ui->alignGroupBox->setEnabled(true); m_Ui->alignCheckBox->setChecked(false); - m_Ui->NextFinishButton->setEnabled(true); + m_Ui->HideLogButton->hide(); m_Ui->confirmloadlabel->setText("

" + tr("Now click on next button") + "

"); } -void HdrWizard::customConfigCheckBoxToggled(bool wantCustom) -{ - if (wantCustom == false) - { +void HdrWizard::customConfigCheckBoxToggled(bool wantCustom) { + if (wantCustom == false) { predefConfigsComboBoxActivated(m_Ui->profileComboBox->currentIndex()); } } -void HdrWizard::NextFinishButtonClicked() -{ +void HdrWizard::on_hdrPreviewButton_clicked() { + showHDR(); +} + +void HdrWizard::on_hdrPreviewCheckBox_stateChanged(int state) { + if (state == Qt::Checked) { + m_Ui->NextFinishButton->setText(tr("Compute")); + } + else { + m_Ui->NextFinishButton->setText(tr("Finish")); + } +} + +void HdrWizard::showHDR() { + m_hdrPreview->exec(); +} + +void HdrWizard::NextFinishButtonClicked() { int currentpage = m_Ui->pagestack->currentIndex(); - switch (currentpage) - { - case 0: - { - //now align, if requested - if (m_Ui->alignCheckBox->isChecked()) - { - QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); - m_Ui->confirmloadlabel->setText("

"+tr("Aligning...")+"

"); - m_Ui->loadImagesButton->setDisabled(true); - m_Ui->removeImageButton->setDisabled(true); - m_Ui->clearListButton->setDisabled(true); - m_Ui->previewLabel->setDisabled(true); - m_Ui->NextFinishButton->setDisabled(true); - m_Ui->alignGroupBox->setDisabled(true); - m_Ui->agGroupBox->setDisabled(true); - m_Ui->EVgroupBox->setDisabled(true); - m_Ui->tableWidget->setDisabled(true); - repaint(); - m_Ui->progressBar->setMaximum(0); - m_Ui->progressBar->setMinimum(0); - m_Ui->progressBar->show(); - if (m_Ui->ais_radioButton->isChecked()) - { - //m_Ui->progressBar->setRange(0,100); - //m_Ui->progressBar->setValue(0); - m_Ui->textEdit->show(); - m_hdrCreationManager->set_ais_crop_flag(m_Ui->autoCropCheckBox->isChecked()); - m_hdrCreationManager->align_with_ais(); + switch (currentpage) { + case 0: { + // now align, if requested + if (m_Ui->alignCheckBox->isChecked()) { + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); + m_Ui->HideLogButton->show(); + m_Ui->confirmloadlabel->setText("

" + + tr("Aligning...") + + "

"); + m_Ui->loadImagesButton->setDisabled(true); + m_Ui->removeImageButton->setDisabled(true); + m_Ui->clearListButton->setDisabled(true); + m_Ui->previewLabel->setDisabled(true); + m_Ui->NextFinishButton->setDisabled(true); + m_Ui->alignGroupBox->setDisabled(true); + m_Ui->agGroupBox->setDisabled(true); + m_Ui->EVgroupBox->setDisabled(true); + m_Ui->tableWidget->setDisabled(true); + repaint(); + m_Ui->progressBar->setMaximum(0); + m_Ui->progressBar->setMinimum(0); + m_Ui->progressBar->show(); + if (m_Ui->ais_radioButton->isChecked()) { + m_hdrCreationManager->set_ais_crop_flag( + m_Ui->autoCropCheckBox->isChecked()); + m_hdrCreationManager->align_with_ais(); + } else { + m_hdrCreationManager->align_with_mtb(); + } + return; } - else - { - m_hdrCreationManager->align_with_mtb(); + m_Ui->pagestack->setCurrentIndex(1); + } break; + case 1: { + if (m_pfsFrameHDR == nullptr || m_isConfigChanged) { + startComputation(); } - return; - } - m_Ui->pagestack->setCurrentIndex(1); - } break; - case 1: - { - m_processing = true; - repaint(); - QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); - m_Ui->NextFinishButton->setEnabled(false); - m_Ui->cancelButton->setEnabled(false); - - if (m_Ui->autoAG_checkBox->isChecked() && !m_Ui->checkBoxEditingTools->isChecked()) - { - int num_images = m_hdrCreationManager->getData().size(); - QList< QPair > HV_offsets; - for (int i = 0; i < num_images; i++) { - HV_offsets.append(qMakePair(0,0)); + else if (!m_Ui->hdrPreviewCheckBox->isChecked()) { + accept(); + } + else { + showHDR(); } - float patchesPercent; - m_agGoodImageIndex = m_hdrCreationManager->computePatches(m_Ui->threshold_doubleSpinBox->value(), m_patches, patchesPercent, HV_offsets); - m_doAutoAntighosting = true; } - if (m_doAutoAntighosting) - { - int h0; - m_hdrCreationManager->getAgData(m_patches, h0); - m_future = QtConcurrent::run( boost::bind(&HdrCreationManager::doAntiGhosting, - m_hdrCreationManager.data(), - m_patches, h0, false, &m_ph)); // false means auto anti-ghosting - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(autoAntighostingFinished()), Qt::DirectConnection); - m_Ui->progressBar->show(); - m_futureWatcher.setFuture(m_future); + } +} + +void HdrWizard::startComputation() { + m_processing = true; + repaint(); + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); + m_Ui->NextFinishButton->setEnabled(false); + m_Ui->cancelButton->setEnabled(false); + + if (m_Ui->autoAG_checkBox->isChecked() && + !m_Ui->checkBoxEditingTools->isChecked()) { + int num_images = m_hdrCreationManager->getData().size(); + QList> HV_offsets; + for (int i = 0; i < num_images; i++) { + HV_offsets.append(qMakePair(0, 0)); } - else if (m_doManualAntighosting) - { - m_future = QtConcurrent::run( boost::bind(&HdrCreationManager::doAntiGhosting, - m_hdrCreationManager.data(), - m_patches, m_agGoodImageIndex, true, &m_ph)); // true means manual anti-ghosting - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(autoAntighostingFinished()), Qt::DirectConnection); - m_Ui->progressBar->show(); - m_futureWatcher.setFuture(m_future); + float patchesPercent; + m_agGoodImageIndex = m_hdrCreationManager->computePatches( + m_Ui->threshold_doubleSpinBox->value(), m_patches, + patchesPercent, HV_offsets); + m_doAutoAntighosting = true; + } + if (m_doAutoAntighosting) { + int h0; + m_hdrCreationManager->getAgData(m_patches, h0); + m_future = QtConcurrent::run(boost::bind( + &HdrCreationManager::doAntiGhosting, + m_hdrCreationManager.data(), m_patches, h0, false, + &m_ph)); // false means auto anti-ghosting + if (m_pfsFrameHDR == nullptr) { + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrWizard::createHdrFinished, + Qt::DirectConnection); } - else - { - createHdr(); + m_Ui->progressBar->show(); + m_futureWatcher.setFuture(m_future); + } else if (m_doManualAntighosting) { + m_future = QtConcurrent::run( + boost::bind(&HdrCreationManager::doAntiGhosting, + m_hdrCreationManager.data(), m_patches, + m_agGoodImageIndex, true, + &m_ph)); // true means manual anti-ghosting + if (m_pfsFrameHDR == nullptr) { + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrWizard::createHdrFinished, + Qt::DirectConnection); } - } + m_Ui->progressBar->show(); + m_futureWatcher.setFuture(m_future); + } else { + createHdr(); } } -void HdrWizard::createHdr() -{ - m_future = QtConcurrent::run( boost::bind(&HdrCreationManager::createHdr, - m_hdrCreationManager.data())); +void HdrWizard::createHdr() { + m_Ui->NextFinishButton->setEnabled(false); + m_Ui->cancelButton->setEnabled(false); + + m_future = QtConcurrent::run(boost::bind(&HdrCreationManager::createHdr, + m_hdrCreationManager.data())); - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(createHdrFinished()), Qt::DirectConnection); + if (m_pfsFrameHDR == nullptr) { + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &HdrWizard::createHdrFinished, Qt::DirectConnection); + } m_futureWatcher.setFuture(m_future); } -void HdrWizard::createHdrFinished() -{ - m_pfsFrameHDR = m_future.result(); - OsIntegration::getInstance().setProgress(-1); - QApplication::restoreOverrideCursor(); - accept(); -} +void HdrWizard::createHdrFinished() { + m_isConfigChanged = false; + m_processing = false; + m_Ui->NextFinishButton->setEnabled(true); + m_Ui->cancelButton->setEnabled(true); + m_Ui->hdrPreviewButton->setEnabled(true); -void HdrWizard::autoAntighostingFinished() -{ - m_pfsFrameHDR = m_future.result(); + m_pfsFrameHDR.reset(m_future.result()); m_Ui->progressBar->hide(); OsIntegration::getInstance().setProgress(-1); QApplication::restoreOverrideCursor(); - if (m_pfsFrameHDR == NULL) - QDialog::reject(); - else + + if (m_Ui->hdrPreviewCheckBox->isChecked() ) { + m_hdrPreview->setFrame(m_pfsFrameHDR); + m_hdrPreview->exec(); + } + else { accept(); + } } -void HdrWizard::currentPageChangedInto(int newindex) -{ - //predefined configs page - // m_Ui->textEdit->hide(); - if (newindex == 1) { - //m_hdrCreationManager->removeTempFiles(); - m_Ui->NextFinishButton->setText(tr("&Finish")); - //when at least 2 LDR or MDR inputs perform Manual Alignment - int num_images = m_hdrCreationManager->getData().size(); -/* - if (m_hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) - numldrs = m_hdrCreationManager->getLDRList().size(); - else - numldrs = m_hdrCreationManager->getMDRList().size(); - - qDebug() << "numldrs = " << numldrs; -*/ - //if (m_hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE && numldrs >= 2) { - if (m_Ui->checkBoxEditingTools->isChecked() && num_images >= 2) { - this->setDisabled(true); - EditingTools *editingtools = new EditingTools(m_hdrCreationManager.data(), m_Ui->autoAG_checkBox->isChecked()); - if (editingtools->exec() == QDialog::Accepted) { - m_doAutoAntighosting = editingtools->isAutoAntighostingEnabled(); - m_doManualAntighosting = editingtools->isManualAntighostingEnabled(); - m_agGoodImageIndex = editingtools->getAgGoodImageIndex(); - this->setDisabled(false); - } else { - emit reject(); - } - delete editingtools; +void HdrWizard::currentPageChangedInto(int newindex) { + m_Ui->NextFinishButton->setText(tr("&Compute")); + // when at least 2 LDR or MDR inputs perform Manual Alignment + int num_images = m_hdrCreationManager->getData().size(); + if (m_Ui->checkBoxEditingTools->isChecked() && num_images >= 2) { + this->setDisabled(true); + EditingTools *editingtools = + new EditingTools(m_hdrCreationManager.data(), + m_Ui->autoAG_checkBox->isChecked()); + if (editingtools->exec() == QDialog::Accepted) { + m_doAutoAntighosting = + editingtools->isAutoAntighostingEnabled(); + m_doManualAntighosting = + editingtools->isManualAntighostingEnabled(); + m_agGoodImageIndex = editingtools->getAgGoodImageIndex(); + this->setDisabled(false); + } else { + emit reject(); } - } - else if (newindex == 2) { //custom config - predefConfigsComboBoxActivated(1); - m_Ui->NextFinishButton->setText(tr("&Finish")); - return; + delete editingtools; } } -bool HdrWizard::loadRespCurve() -{ - QString loadcurvefilename = QFileDialog::getOpenFileName( - this, - tr("Load camera response curve file"), - QDir::currentPath(), - tr("Camera response curve (*.m);;All Files (*)") ); +bool HdrWizard::loadRespCurve(bool newfile) { - if (loadcurvefilename.isEmpty()) - { + QString loadcurvefilename; + + if (!newfile) { + loadcurvefilename = LuminanceOptions().getDefaultResponseCurveFilename(); + } + + if (loadcurvefilename.isEmpty()) { + loadcurvefilename = QFileDialog::getOpenFileName( + this, tr("Load camera response curve file"), QDir::currentPath(), + tr("Camera response curve (*.m);;All Files (*)")); + } + + if (loadcurvefilename.isEmpty()) { return false; } + else { + LuminanceOptions().setDefaultResponseCurveFilename(loadcurvefilename); + } - try - { - HdrCreationItemContainer c = m_hdrCreationManager->getData(); + try { m_hdrCreationManager->getResponseCurve().readFromFile( - QFile::encodeName(loadcurvefilename).constData()); + QFile::encodeName(loadcurvefilename).constData()); Q_ASSERT(m_hdrCreationManager->getResponseCurve().getType() == RESPONSE_CUSTOM); m_Ui->RespCurveFileLoadedLineEdit->setText(loadcurvefilename); return true; - } - catch (const std::runtime_error& /*err*/) - { - QMessageBox::warning(this, tr("Invalid Response Curve File"), - tr("Invalid Response Curve File: please try a different file")); + } catch (const std::runtime_error & /*err*/) { + QMessageBox::warning( + this, tr("Invalid Response Curve File"), + tr("Invalid Response Curve File: please try a different file")); return false; } } -void HdrWizard::saveRespCurveFileButtonClicked() -{ +void HdrWizard::saveRespCurveFileButtonClicked() { QString savecurvefilename = QFileDialog::getSaveFileName( - this, - tr("Save a camera response curve file"), - QDir::currentPath(), - tr("Camera response curve (*.m)") ); - if (!savecurvefilename.isEmpty()) - { + this, tr("Save a camera response curve file"), QDir::currentPath(), + tr("Camera response curve (*.m)")); + if (!savecurvefilename.isEmpty()) { m_Ui->CurveFileNameSaveLineEdit->setText(savecurvefilename); m_hdrCreationManager->setResponseCurveOutputFile(savecurvefilename); } } -namespace -{ -static QString getQString(libhdr::fusion::WeightFunctionType wf) -{ - switch (wf) - { - case WEIGHT_TRIANGULAR: - return QObject::tr("Triangular"); - case WEIGHT_PLATEAU: - return QObject::tr("Plateau"); - case WEIGHT_GAUSSIAN: - return QObject::tr("Gaussian"); - case WEIGHT_FLAT: - return QObject::tr("Flat"); - } - - return QString(); -} - -static QString getQString(libhdr::fusion::ResponseCurveType rf) -{ - switch (rf) - { - case RESPONSE_LINEAR: - return QObject::tr("Linear"); - case RESPONSE_GAMMA: - return QObject::tr("Gamma"); - case RESPONSE_LOG10: - return QObject::tr("Logarithmic"); - case RESPONSE_SRGB: - return QObject::tr("sRGB"); - case RESPONSE_CUSTOM: - return QObject::tr("From Calibration/Input File"); - //case FROM_FILE: - // return tr("From File: ") + m_hdrCreationManager->fusionOperatorConfig.inputResponseCurveFilename; - } - - return QString(); -} - -static QString getQString(libhdr::fusion::FusionOperator fo) - -{ - switch (fo) - { - case DEBEVEC: - return QObject::tr("Debevec"); - case ROBERTSON: - return QObject::tr("Robertson"); - case ROBERTSON_AUTO: - return QObject::tr("Robertson Response Calculation"); - } - - return QString(); -} - - -void updateHdrCreationManagerModel(HdrCreationManager& manager, FusionOperator fusionOperator) -{ - qDebug() << "Change model to " << (int)fusionOperator; +namespace { +void updateHdrCreationManagerModel(HdrCreationManager &manager, + FusionOperator fusionOperator) { manager.setFusionOperator(fusionOperator); - if (fusionOperator != ROBERTSON_AUTO) - { - + if (fusionOperator == ROBERTSON_AUTO) { + manager.getResponseCurve().setType(RESPONSE_CUSTOM); } } -void updateHdrCreationManagerResponse(HdrCreationManager& manager, ResponseCurveType responseType) -{ - qDebug() << "Change response to " << (int)responseType; +void updateHdrCreationManagerResponse(HdrCreationManager &manager, + ResponseCurveType responseType) { manager.getResponseCurve().setType(responseType); } -void updateHdrCreationManagerWeight(HdrCreationManager& manager, WeightFunctionType weight) -{ - qDebug() << "Change weights to " << (int)weight; +void updateHdrCreationManagerWeight(HdrCreationManager &manager, + WeightFunctionType weight) { manager.getWeightFunction().setType(weight); } - } -void HdrWizard::predefConfigsComboBoxActivated(int index_from_gui) -{ - const FusionOperatorConfig* cfg = NULL; +void HdrWizard::predefConfigsComboBoxActivated(int index_from_gui) { + m_isConfigChanged = true; + const FusionOperatorConfig *cfg = nullptr; - if (index_from_gui <= 5) - { + if (index_from_gui <= 5) { cfg = &predef_confs[index_from_gui]; - } - else - { + } else { cfg = &m_customConfig[index_from_gui - 6]; } @@ -1029,33 +904,32 @@ m_Ui->saveRespCurveFileButton->setEnabled(false); } -void HdrWizard::weightingFunctionComboBoxActivated(int from_gui) -{ - updateHdrCreationManagerWeight(*m_hdrCreationManager, weights_in_gui[from_gui]); +void HdrWizard::weightingFunctionComboBoxActivated(int from_gui) { + m_isConfigChanged = true; + updateHdrCreationManagerWeight(*m_hdrCreationManager, + weights_in_gui[from_gui]); } -void HdrWizard::responseCurveComboBoxActivated(int from_gui) -{ +void HdrWizard::responseCurveComboBoxActivated(int from_gui) { + m_isConfigChanged = true; ResponseCurveType rc = responses_in_gui[from_gui]; - if (rc == RESPONSE_CUSTOM) - { - if (loadRespCurve()) - { + if (rc == RESPONSE_CUSTOM) { + if (loadRespCurve(false)) { m_Ui->responseCurveInputFileLabel->setEnabled(true); m_Ui->RespCurveFileLoadedLineEdit->setEnabled(true); - } - else if (m_hdrCreationManager->getResponseCurve().getType() != RESPONSE_CUSTOM) - { + m_Ui->loadRespCurveFileButton->setEnabled(true); + } else if (m_hdrCreationManager->getResponseCurve().getType() != + RESPONSE_CUSTOM) { m_Ui->responseCurveInputFileLabel->setEnabled(false); m_Ui->RespCurveFileLoadedLineEdit->setEnabled(false); + m_Ui->loadRespCurveFileButton->setEnabled(false); // I didn't load, so I select the previous value (which is stored // in the current ResponseCurve object... - updateHdrCreationManagerResponse(*m_hdrCreationManager, - m_hdrCreationManager->getResponseCurve().getType()); - switch (m_hdrCreationManager->getResponseCurve().getType()) - { + updateHdrCreationManagerResponse(*m_hdrCreationManager, m_hdrCreationManager->getResponseCurve().getType()); + + switch (m_hdrCreationManager->getResponseCurve().getType()) { case RESPONSE_LINEAR: m_Ui->responseCurveComboBox->setCurrentIndex(0); break; @@ -1071,105 +945,108 @@ default: break; } - } - else - { - updateHdrCreationManagerResponse(*m_hdrCreationManager,RESPONSE_LINEAR); + } else { + updateHdrCreationManagerResponse(*m_hdrCreationManager, + RESPONSE_LINEAR); m_Ui->responseCurveComboBox->setCurrentIndex(0); } - } - else - { + } else { m_Ui->responseCurveInputFileLabel->setEnabled(false); m_Ui->RespCurveFileLoadedLineEdit->setEnabled(false); + m_Ui->loadRespCurveFileButton->setEnabled(false); m_Ui->RespCurveFileLoadedLineEdit->clear(); updateHdrCreationManagerResponse(*m_hdrCreationManager, rc); } } -void HdrWizard::modelComboBoxActivated(int from_gui) -{ - qDebug() << "void HdrWizard::modelComboBoxActivated(int from_gui)"; +void HdrWizard::modelComboBoxActivated(int from_gui) { + m_isConfigChanged = true; FusionOperator fo = models_in_gui[from_gui]; updateHdrCreationManagerModel(*m_hdrCreationManager, fo); - if (fo == ROBERTSON_AUTO) - { + if (fo == ROBERTSON_AUTO) { m_Ui->responseCurveOutputFileLabel->setEnabled(true); m_Ui->CurveFileNameSaveLineEdit->setEnabled(true); m_Ui->saveRespCurveFileButton->setEnabled(true); - } - else - { + m_Ui->responseCurveComboBox->setEnabled(false); + m_Ui->responseCurveLabel->setEnabled(false); + m_Ui->RespCurveFileLoadedLineEdit->setEnabled(false); + m_Ui->loadRespCurveFileButton->setEnabled(false); + m_Ui->responseCurveInputFileLabel->setEnabled(false); + } else { m_Ui->responseCurveOutputFileLabel->setEnabled(false); m_Ui->CurveFileNameSaveLineEdit->setEnabled(false); m_Ui->saveRespCurveFileButton->setEnabled(false); + m_Ui->responseCurveComboBox->setEnabled(true); + m_Ui->responseCurveLabel->setEnabled(true); + if ( m_Ui->responseCurveComboBox->currentIndex() == 4 ) { + m_Ui->RespCurveFileLoadedLineEdit->setEnabled(true); + m_Ui->loadRespCurveFileButton->setEnabled(true); + m_Ui->responseCurveInputFileLabel->setEnabled(true); + } } } -QString HdrWizard::getCaptionTEXT() -{ - return QString(tr("Weights: ") + getQString(m_hdrCreationManager->getWeightFunction().getType()) + - tr(" - Response curve: ") + getQString(m_hdrCreationManager->getResponseCurve().getType()) + - tr(" - Model: ") + getQString(m_hdrCreationManager->getFusionOperator())); +QString HdrWizard::getCaptionTEXT() { + return QString( + QObject::tr("Weights= ") + + getQString(m_hdrCreationManager->getWeightFunction().getType()) + + QObject::tr(" - Response curve= ") + + getQString(m_hdrCreationManager->getResponseCurve().getType()) + + QObject::tr(" - Model= ") + + getQString(m_hdrCreationManager->getFusionOperator())); } -QStringList HdrWizard::getInputFilesNames() -{ - return QStringList(); - // return m_inputFilesName; +QStringList HdrWizard::getInputFilesNames() { + return m_inputFilesName; } // triggered by user interaction -void HdrWizard::editingEVfinished() -{ +void HdrWizard::editingEVfinished() { // transform from EV value to expotime value - if (m_hdrCreationManager->getFilesWithoutExif().empty()) - { + if (m_hdrCreationManager->getFilesWithoutExif().empty()) { m_Ui->NextFinishButton->setEnabled(true); - //give an offset to the EV values if they are outside of the -10..10 range. - //m_hdrCreationManager->checkEVvalues(); - m_Ui->confirmloadlabel->setText(tr("

All the EV values have been set.
Now click on Next button.

")); + // give an offset to the EV values if they are outside of the -10..10 + // range. + // m_hdrCreationManager->checkEVvalues(); + m_Ui->confirmloadlabel->setText( + tr("

All the EV values have " + "been " + "set.
Now click on Next button.

")); } else { - m_Ui->confirmloadlabel->setText( QString(tr("

To proceed you need to manually set the exposure values.
%1 values still required.

")).arg(m_hdrCreationManager->getFilesWithoutExif().size()) ); + m_Ui->confirmloadlabel->setText( + QString(tr("

To proceed you need to manually set the " + "exposure values.
%1 " + "values still required.

")) + .arg(m_hdrCreationManager->getFilesWithoutExif().size())); } } -void HdrWizard::resizeEvent( QResizeEvent * ) -{ - qDebug() << "void HdrWizard::resizeEvent(QResizeEvent*)"; +void HdrWizard::resizeEvent(QResizeEvent *) { int currentRow = m_Ui->tableWidget->currentRow(); int numberOfRow = m_Ui->tableWidget->rowCount(); - if ( currentRow >= 0 && currentRow < numberOfRow ) - { - m_Ui->previewLabel->setPixmap( - QPixmap::fromImage( - m_hdrCreationManager->getFile(currentRow).qimage().scaled( - m_Ui->previewLabel->size(), Qt::KeepAspectRatio) - )); - } - else { + if (currentRow >= 0 && currentRow < numberOfRow) { + m_Ui->previewLabel->setPixmap(QPixmap::fromImage( + m_hdrCreationManager->getFile(currentRow) + .qimage() + .scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } else { m_Ui->previewLabel->setText(QString()); } } -void HdrWizard::alignSelectionClicked() -{ +void HdrWizard::alignSelectionClicked() { m_Ui->autoCropCheckBox->setEnabled(m_Ui->ais_radioButton->isChecked()); } -void HdrWizard::reject() -{ +void HdrWizard::reject() { QApplication::restoreOverrideCursor(); - if (m_processing) - { + if (m_processing) { m_ph.qtCancel(); - } - else - { + } else { m_hdrCreationManager->reset(); QDialog::reject(); } @@ -1177,19 +1054,18 @@ void HdrWizard::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) { - m_Ui->tableWidget->selectRow((m_Ui->tableWidget->currentRow() == m_Ui->tableWidget->rowCount()-1) ? 0 : m_Ui->tableWidget->currentRow()+1); + m_Ui->tableWidget->selectRow((m_Ui->tableWidget->currentRow() == + m_Ui->tableWidget->rowCount() - 1) + ? 0 + : m_Ui->tableWidget->currentRow() + 1); } else if (event->key() == Qt::Key_Escape) { emit reject(); } } -void HdrWizard::writeAisData(QByteArray data) -{ - qDebug() << data; - if (data.contains("[1A")) - data.replace("[1A", ""); - if (data.contains("[2A")) - data.replace("[2A", ""); +void HdrWizard::writeAisData(QByteArray data) { + if (data.contains("[1A")) data.replace("[1A", ""); + if (data.contains("[2A")) data.replace("[2A", ""); if (data.contains(QChar(0x01B).toLatin1())) data.replace(QChar(0x01B).toLatin1(), ""); @@ -1202,24 +1078,20 @@ } } -void HdrWizard::on_pushButtonSaveSettings_clicked() -{ - /* - QSqlQuery query; +void HdrWizard::on_pushButtonSaveSettings_clicked() { + QSqlQuery query(m_db); QString response_filename; - int weight = m_Ui->triGaussPlateauComboBox->currentIndex(); - int response; - if (m_Ui->predefRespCurveRadioButton->isChecked()) { - response = m_Ui->gammaLinLogComboBox->currentIndex(); - } - else if (m_Ui->loadRespCurveFromFileCheckbox->isChecked()) { - response = FROM_FILE; + int weight = m_Ui->weightFunctionComboBox->currentIndex(); + int response = m_Ui->responseCurveComboBox->currentIndex(); + int model = m_Ui->modelComboBox->currentIndex(); + + if (response == 4) { + response = RESPONSE_CUSTOM; response_filename = m_Ui->RespCurveFileLoadedLineEdit->text(); } - else - response = FROM_ROBERTSON; - - int model = m_Ui->modelComboBox->currentIndex(); + if (model == 2) { + response = RESPONSE_CUSTOM; + } query.prepare("INSERT INTO parameters (weight, response, model, filename) " "VALUES (:weight, :response, :model, :filename)"); @@ -1232,27 +1104,47 @@ if (res == false) qDebug() << "Insert: " << query.lastError(); m_Ui->pushButtonSaveSettings->setEnabled(false); - */ } -void HdrWizard::updateProgressBar(int value) -{ +void HdrWizard::updateProgressBar(int value) { if (value == 0) m_Ui->progressBar->setMaximum(100); m_Ui->progressBar->setValue(value); } -void HdrWizard::updateThresholdSlider(int newValue) -{ - float newThreshold = ((float)newValue)/10000.f; +void HdrWizard::updateThresholdSlider(int newValue) { + float newThreshold = ((float)newValue) / 10000.f; bool oldState = m_Ui->threshold_doubleSpinBox->blockSignals(true); - m_Ui->threshold_doubleSpinBox->setValue( newThreshold ); + m_Ui->threshold_doubleSpinBox->setValue(newThreshold); m_Ui->threshold_doubleSpinBox->blockSignals(oldState); } -void HdrWizard::updateThresholdSpinBox(double newThreshold) -{ +void HdrWizard::updateThresholdSpinBox(double newThreshold) { bool oldState = m_Ui->threshold_horizontalSlider->blockSignals(true); - m_Ui->threshold_horizontalSlider->setValue( (int)(newThreshold*10000) ); + m_Ui->threshold_horizontalSlider->setValue((int)(newThreshold * 10000)); m_Ui->threshold_horizontalSlider->blockSignals(oldState); } +void HdrWizard::setEVsValues() { + int tot_images = m_Ui->tableWidget->rowCount(); + float minEV = -2.0f * (float)(tot_images / 2); + float EV = minEV; + for (int i = 0; i < tot_images; i++, EV += 2.0f) { + QTableWidgetItem *tableitem = m_Ui->tableWidget->item(i, 1); + updateTableItem(tableitem, EV); + m_hdrCreationManager->getFile(i).setEV( + EV + m_hdrCreationManager->getEVOffset()); + } + bool oldState = m_Ui->ImageEVdsb->blockSignals(true); + m_Ui->ImageEVdsb->setValue(minEV); + m_Ui->EVSlider->setValue((int)100.f * minEV); + m_Ui->ImageEVdsb->blockSignals(oldState); + updateLabelMaybeNext(1); +} + +void HdrWizard::updateHideLogButtonText(bool b) { + b ? m_Ui->HideLogButton->setText(tr("Hide Log")) : m_Ui->HideLogButton->setText(tr("Show Log")); +} + +void HdrWizard::on_loadRespCurveFileButton_clicked() { + loadRespCurve(true); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.h luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,13 +24,16 @@ #ifndef HDRWIZARD_IMPL_H #define HDRWIZARD_IMPL_H -#include -#include -#include #include +#include #include #include +#include +#include +#include +#include "HdrPreview.h" +#include "Libpfs/manip/copy.h" #include "Common/LuminanceOptions.h" #include "HdrWizard/HdrCreationManager.h" @@ -38,21 +41,22 @@ class HdrWizard; } -class HdrWizard : public QDialog -{ +class HdrWizard : public QDialog { Q_OBJECT -private: + private: // members ... private functions are below QScopedPointer m_Ui; QScopedPointer m_hdrCreationManager; QFutureWatcher m_futureWatcher; - QFuture m_future; + QFuture m_future; LuminanceOptions luminance_options; + QStringList m_inputFilesName; + // the new hdr, returned by the HdrCreationManager class - pfs::Frame* m_pfsFrameHDR; + std::shared_ptr m_pfsFrameHDR; // hdr creation parameters QVector m_customConfig; @@ -61,39 +65,43 @@ bool m_doManualAntighosting; int m_agGoodImageIndex; bool m_processing; + bool m_isConfigChanged; + QSqlDatabase m_db; + QScopedPointer m_hdrPreview; ProgressHelper m_ph; -public: - HdrWizard(QWidget *parent, - const QStringList &files, + public: + HdrWizard(QWidget *parent, const QStringList &files, const QStringList &inputFilesName, - const QVector &inputExpoTimes); + const QVector &inputExpoTimes, + QSqlDatabase db = QSqlDatabase::database() ); ~HdrWizard(); //! \brief get the current PFS Frame - pfs::Frame* getPfsFrameHDR() { return m_pfsFrameHDR; } + pfs::Frame *getPfsFrameHDR() { pfs::Frame *toReturn = pfs::copy(m_pfsFrameHDR.get()); return toReturn; } //! \brief return the caption text QString getCaptionTEXT(); QStringList getInputFilesNames(); -protected: + protected: void resizeEvent(QResizeEvent *); void keyPressEvent(QKeyEvent *); void dragEnterEvent(QDragEnterEvent *); void dropEvent(QDropEvent *); + void setEVsValues(); -private: + private: void updateTableGrid(); - void enableNextOrWarning(const QStringList& filesWithoutExif); + void enableNextOrWarning(const QStringList &filesWithoutExif); void updateLabelMaybeNext(size_t numFilesWithoutExif); -signals: + signals: void setValue(int value); void setRange(int min, int max); -private slots: - void loadInputFiles(const QStringList& files); + private slots: + void loadInputFiles(const QStringList &files); void loadInputFilesDone(); void loadImagesButtonClicked(); @@ -105,10 +113,10 @@ void updateEVSlider(int newValue); void updateEVSpinBox(double newValue); -private slots: + private slots: // void fileLoaded(int index, const QString& fname, float expotime); // void finishedLoadingInputFiles(const QStringList& NoExifFiles); - void errorWhileLoading(const QString& errormessage); + void errorWhileLoading(const QString &errormessage); // void updateGraphicalEVvalue(float expotime, int index_in_table); @@ -123,8 +131,9 @@ void responseCurveComboBoxActivated(int); void modelComboBoxActivated(int); - bool loadRespCurve(); + bool loadRespCurve(bool); void saveRespCurveFileButtonClicked(); + void on_loadRespCurveFileButton_clicked(); // ...end! void NextFinishButtonClicked(); @@ -139,9 +148,14 @@ void updateThresholdSlider(int); void updateThresholdSpinBox(double); + void startComputation(); void createHdr(); void createHdrFinished(); - void autoAntighostingFinished(); + void updateHideLogButtonText(bool); + void showHDR(); + + void on_hdrPreviewButton_clicked(); + void on_hdrPreviewCheckBox_stateChanged(int state); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.ui luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.ui --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/HdrWizard.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/HdrWizard.ui 2019-06-09 19:18:38.000000000 +0000 @@ -17,7 +17,7 @@ :/program-icons/luminance-hdr:/program-icons/luminance-hdr - + @@ -77,7 +77,7 @@ - &Currently Loaded Files + Currently &Loaded Files Qt::AlignCenter @@ -391,14 +391,14 @@ 6 - + false - &MTB + M&TB @@ -424,7 +424,7 @@ false - Hugin's align_&image_stack + Hu&gin's align_image_stack true @@ -640,30 +640,27 @@ - + [2/2] Choose Settings for HDR Creation - - - 15 - + Profile - Qt::AlignJustify|Qt::AlignVCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter true - + @@ -680,37 +677,37 @@ - Profile 1 + Profile 1 - Debevec, Triangular, Linear - Profile 2 + Profile 2 - Debevec, Triangular, Gamma - Profile 3 + Profile 3 - Debevec, Plateau, Linear - Profile 4 + Profile 4 - Debevec, Plateau, Gamma - Profile 5 + Profile 5 - Debevec, Gaussian, Linear - Profile 6 + Profile 6 - Debevec, Gaussian, Gamma - + Use this only if the default profiles above do not yield good results @@ -731,9 +728,12 @@ HDR Creation Model + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + - + false @@ -774,7 +774,7 @@ - + false @@ -815,15 +815,18 @@ Response Curve + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + - + false - + 0 0 @@ -856,7 +859,7 @@ - Custom + Custom (From File) @@ -874,21 +877,35 @@ - - - - false - - - - 240 - 0 - - - - true - - + + + + + + false + + + + 240 + 0 + + + + true + + + + + + + false + + + Load Response + + + + @@ -903,7 +920,7 @@ - + @@ -936,7 +953,7 @@ - + false @@ -949,6 +966,26 @@ + + + + false + + + Show HDR + + + + + + + Show HDR Preview + + + true + + + @@ -1001,6 +1038,16 @@ + + + Show Log + + + true + + + + false @@ -1069,12 +1116,12 @@ setEnabled(bool) - 94 - 43 + 310 + 103 - 58 - 55 + 134 + 173 @@ -1085,12 +1132,12 @@ setEnabled(bool) - 94 - 43 + 310 + 103 - 58 - 53 + 134 + 208 @@ -1101,12 +1148,12 @@ setDisabled(bool) - 94 - 43 + 310 + 103 - 88 - 56 + 460 + 77 @@ -1117,12 +1164,12 @@ setDisabled(bool) - 94 - 43 + 310 + 103 - 57 - 56 + 133 + 77 @@ -1133,12 +1180,12 @@ setEnabled(bool) - 622 - 234 + 162 + 316 - 791 - 258 + 341 + 316 @@ -1149,12 +1196,12 @@ setEnabled(bool) - 622 - 234 + 162 + 316 - 791 - 278 + 398 + 316 @@ -1165,12 +1212,12 @@ setEnabled(bool) - 622 - 234 + 162 + 316 - 572 - 302 + 149 + 345 @@ -1181,12 +1228,12 @@ setEnabled(bool) - 671 - 373 + 656 + 313 - 520 - 443 + 529 + 348 @@ -1197,12 +1244,12 @@ setEnabled(bool) - 756 - 373 + 656 + 313 - 658 - 446 + 656 + 343 @@ -1213,12 +1260,12 @@ setEnabled(bool) - 774 - 371 + 656 + 313 - 779 - 439 + 744 + 348 @@ -1229,12 +1276,12 @@ setEnabled(bool) - 94 - 43 + 310 + 103 - 58 - 52 + 134 + 138 @@ -1245,12 +1292,12 @@ setEnabled(bool) - 455 - 107 + 310 + 103 - 418 - 139 + 460 + 173 @@ -1261,12 +1308,12 @@ setEnabled(bool) - 455 - 107 + 310 + 103 - 417 - 139 + 460 + 138 @@ -1277,12 +1324,12 @@ setEnabled(bool) - 455 - 107 + 310 + 103 - 410 - 209 + 460 + 208 @@ -1293,12 +1340,44 @@ setFocus() - 441 - 107 + 310 + 103 + + + 310 + 103 + + + + + HideLogButton + clicked(bool) + textEdit + setVisible(bool) + + + 507 + 646 + + + 263 + 513 + + + + + customConfigCheckBox + toggled(bool) + pushButtonSaveSettings + setEnabled(bool) + + + 391 + 93 - 441 - 107 + 424 + 338 diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/PreviewWidget.cpp luminance-hdr-2.6.0/src/HdrWizard/PreviewWidget.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/PreviewWidget.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/PreviewWidget.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,46 +24,45 @@ * @author Franco Comida */ -#include -#include #include #include +#include +#include #include "Viewers/GenericViewer.h" -#include "Viewers/PanIconWidget.h" -#include "Viewers/IGraphicsView.h" #include "Viewers/IGraphicsPixmapItem.h" +#include "Viewers/IGraphicsView.h" +#include "Viewers/PanIconWidget.h" #include "PreviewWidget.h" -namespace -{ -// define the number of pixels to count as border of the image, because of the shadow +namespace { +// define the number of pixels to count as border of the image, because of the +// shadow static const int BORDER_SIZE = 30; } -PreviewWidget::PreviewWidget(QWidget *parent, QImage *m, const QImage *p) : - QWidget(parent), - m_movableImage(m), - m_pivotImage(p), - m_agMask(NULL), - m_originalAgMask(NULL), - m_patchesMask(NULL), - m_agMaskPixmap(NULL), - m_savedMask(NULL), - m_prevComputed(), - m_mx(0), - m_my(0), - m_px(0), - m_py(0), - m_old_mx(0), - m_old_my(0), - m_agcursorPixmap(NULL), - m_drawingMode(BRUSH) -{ +PreviewWidget::PreviewWidget(QWidget *parent, QImage *m, const QImage *p) + : QWidget(parent), + m_movableImage(m), + m_pivotImage(p), + m_agMask(nullptr), + m_originalAgMask(nullptr), + m_patchesMask(nullptr), + m_agMaskPixmap(nullptr), + m_savedMask(nullptr), + m_prevComputed(), + m_mx(0), + m_my(0), + m_px(0), + m_py(0), + m_old_mx(0), + m_old_my(0), + m_agcursorPixmap(nullptr), + m_drawingMode(BRUSH) { setFocusPolicy(Qt::StrongFocus); - //setMouseTracking(true); - //set internal brush values to their default + // setMouseTracking(true); + // set internal brush values to their default m_brushAddMode = true; setBrushSize(32); m_previousPixmapSize = -1; @@ -72,8 +71,8 @@ m_previousPixmapColor = QColor(); fillAntiGhostingCursorPixmap(); - m_previewImage = new QImage(m_movableImage->size(),QImage::Format_ARGB32); - m_previewImage->fill(qRgba(255,0,0,255)); + m_previewImage = new QImage(m_movableImage->size(), QImage::Format_ARGB32); + m_previewImage->fill(qRgba(255, 0, 0, 255)); blendmode = &PreviewWidget::computeDiffRgba; m_mode = EditingMode; m_rect = m_movableImage->rect(); @@ -84,26 +83,31 @@ mScene = new QGraphicsScene(this); mScene->setBackgroundBrush(Qt::darkGray); mView = new IGraphicsView(mScene, this); - //mView->setViewport(new QGLWidget()); //OpenGL viewer + // mView->setViewport(new QGLWidget()); //OpenGL viewer mView->setCacheMode(QGraphicsView::CacheBackground); mView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); mView->viewport()->installEventFilter(this); mView->viewport()->setMouseTracking(false); - connect(mView, SIGNAL(zoomIn()), this, SLOT(zoomIn())); - connect(mView, SIGNAL(zoomOut()), this, SLOT(zoomOut())); - connect(mView, SIGNAL(viewAreaChangedSize()), this, SLOT(updateView())); + connect(mView, &IGraphicsView::zoomIn, this, &PreviewWidget::zoomIn); + connect(mView, &IGraphicsView::zoomOut, this, &PreviewWidget::zoomOut); + connect(mView, &IGraphicsView::viewAreaChangedSize, this, + &PreviewWidget::updateView); mView->horizontalScrollBar()->setTracking(true); mView->verticalScrollBar()->setTracking(true); - connect(mView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarChanged(int))); - connect(mView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarChanged(int))); + connect(mView->horizontalScrollBar(), &QAbstractSlider::valueChanged, this, + &PreviewWidget::scrollBarChanged); + connect(mView->verticalScrollBar(), &QAbstractSlider::valueChanged, this, + &PreviewWidget::scrollBarChanged); mCornerButton = new QToolButton(this); - mCornerButton->setIcon(QIcon::fromTheme("move", QIcon(":/program-icons/move"))); + mCornerButton->setIcon(QIcon::fromTheme(QStringLiteral("move"), + QIcon(":/program-icons/move"))); mView->setCornerWidget(mCornerButton); - connect(mCornerButton, SIGNAL(pressed()), this, SLOT(slotCornerButtonPressed())); + connect(mCornerButton, &QAbstractButton::pressed, this, + &PreviewWidget::slotCornerButtonPressed); mVBL->addWidget(mView); mView->show(); @@ -113,7 +117,8 @@ renderPreviewImage(blendmode, m_rect); mPixmap->setPixmap(QPixmap::fromImage(*m_previewImage)); fitToWindow(); - connect(mPixmap, SIGNAL(selectionReady(bool)), this, SIGNAL(selectionReady(bool))); + connect(mPixmap, &IGraphicsPixmapItem::selectionReady, this, + &PreviewWidget::selectionReady); mAgPixmap = new IGraphicsPixmapItem(mPixmap); mAgPixmap->setZValue(1); @@ -123,8 +128,7 @@ mAgPixmap->setAcceptedMouseButtons(0); } -PreviewWidget::~PreviewWidget() -{ +PreviewWidget::~PreviewWidget() { delete m_previewImage; delete mPixmap; if (m_agMaskPixmap) { @@ -132,66 +136,77 @@ delete m_originalAgMask; delete m_agMask; } + if (m_patchesMask) { + delete m_patchesMask; + } } -QRgb outofbounds = qRgba(0,0,0,255); +QRgb outofbounds = qRgba(0, 0, 0, 255); -void PreviewWidget::renderPreviewImage(QRgb(PreviewWidget::*rendermode)(const QRgb*,const QRgb*)const, const QRect rect ) { +void PreviewWidget::renderPreviewImage( + QRgb (PreviewWidget::*rendermode)(const QRgb *, const QRgb *) const, + const QRect rect) { int originx = rect.x(); int originy = rect.y(); int W = rect.width(); int H = rect.height(); if (rect.isNull()) { - //requested fullsize render - QRegion areaToRender= QRegion(QRect(0, 0, m_previewImage->size().width(), m_previewImage->size().height())) - m_prevComputed; + // requested fullsize render + QRegion areaToRender = + QRegion(QRect(0, 0, m_previewImage->size().width(), + m_previewImage->size().height())) - + m_prevComputed; if (!areaToRender.isEmpty()) { - //render only what you have to + // render only what you have to originx = areaToRender.boundingRect().x(); originy = areaToRender.boundingRect().y(); W = areaToRender.boundingRect().width(); H = areaToRender.boundingRect().height(); m_prevComputed += areaToRender; - } else //image already rendered fullsize + } else // image already rendered fullsize return; } - //these kind of things can happen and lead to strange and nasty runtime errors! - //usually it's an error of 2,3 px + // these kind of things can happen and lead to strange and nasty runtime + // errors! + // usually it's an error of 2,3 px if ((originy + H - 1) >= m_movableImage->height()) H = m_movableImage->height() - originy; if ((originx + W - 1) >= m_movableImage->width()) W = m_movableImage->width() - originx; - const QRgb *movVal = NULL; - const QRgb *pivVal = NULL; - QRgb *movLine = NULL; - QRgb *pivLine = NULL; - QRgb *out = NULL; - - //for all the rows that we have to paint - #pragma omp parallel for private(out, movVal, pivVal, movLine, pivLine) - for(int i = originy; i < originy+H; i++) { - out = (QRgb*)m_previewImage->scanLine(i); - - //if within bounds considering vertical offset - if ( !( (i - m_my) < 0 || (i - m_my) >= m_movableImage->height()) ) - movLine = (QRgb*)(m_movableImage->scanLine(i - m_my)); + const QRgb *movVal = nullptr; + const QRgb *pivVal = nullptr; + QRgb *movLine = nullptr; + QRgb *pivLine = nullptr; + QRgb *out = nullptr; + +// for all the rows that we have to paint +#pragma omp parallel for private(out, movVal, pivVal, movLine, pivLine) + for (int i = originy; i < originy + H; i++) { + out = (QRgb *)m_previewImage->scanLine(i); + + // if within bounds considering vertical offset + if (!((i - m_my) < 0 || (i - m_my) >= m_movableImage->height())) + movLine = (QRgb *)(m_movableImage->scanLine(i - m_my)); else - movLine = NULL; + movLine = nullptr; - if ( !( (i - m_py) < 0 || (i- m_py) >= m_pivotImage->height()) ) - pivLine = (QRgb*)(m_pivotImage->scanLine(i - m_py)); + if (!((i - m_py) < 0 || (i - m_py) >= m_pivotImage->height())) + pivLine = (QRgb *)(m_pivotImage->scanLine(i - m_py)); else - pivLine = NULL; + pivLine = nullptr; - //for all the columns that we have to paint - for(int j = originx; j < originx + W; j++) { - //if within bounds considering horizontal offset - if (movLine == NULL || (j - m_mx) < 0 || (j - m_mx) >= m_movableImage->width()) + // for all the columns that we have to paint + for (int j = originx; j < originx + W; j++) { + // if within bounds considering horizontal offset + if (movLine == nullptr || (j - m_mx) < 0 || + (j - m_mx) >= m_movableImage->width()) movVal = &outofbounds; else movVal = &movLine[j - m_mx]; - if (pivLine == NULL || (j - m_px) < 0 || (j - m_px) >= m_pivotImage->width()) + if (pivLine == nullptr || (j - m_px) < 0 || + (j - m_px) >= m_pivotImage->width()) pivVal = &outofbounds; else pivVal = &pivLine[j - m_px]; @@ -199,51 +214,50 @@ if (m_pivotImage == m_movableImage) out[j] = *movVal; else - out[j] = (this->*rendermode)(movVal,pivVal); + out[j] = (this->*rendermode)(movVal, pivVal); } } } namespace { -void paste(QImage* mask, QImage pixmap, const int mx, const int my) -{ +void paste(QImage *mask, QImage pixmap, const int mx, const int my) { const int W = mask->width(); const int H = mask->height(); - for(int j = 0; j < H; j++) { - for(int i = 0; i < W; i++) { - if (((i+mx)>=0 && (i+mx) < W) && ((j+my) >=0 && (j+mysetPixel(i, j, pixmap.pixel(i+mx, j+my)); + for (int j = 0; j < H; j++) { + for (int i = 0; i < W; i++) { + if (((i + mx) >= 0 && (i + mx) < W) && + ((j + my) >= 0 && (j + my < H))) + mask->setPixel(i, j, pixmap.pixel(i + mx, j + my)); } } } } -void PreviewWidget::renderAgMask() -{ +void PreviewWidget::renderAgMask() { int W = 0, H = 0; - const QRgb *maskVal = NULL; - const QRgb *maskLine = NULL; - QRgb *outMask = NULL; + const QRgb *maskVal = nullptr; + const QRgb *maskLine = nullptr; + QRgb *outMask = nullptr; if (m_agMaskPixmap) { W = m_originalAgMask->width(); H = m_originalAgMask->height(); - //for all the rows that we have to paint + // for all the rows that we have to paint //#pragma omp parallel for private(outMask, maskVal, maskLine) - for(int i = 0; i < H; i++) { + for (int i = 0; i < H; i++) { outMask = (QRgb *)m_agMask->scanLine(i); - if ( !( (i - m_my) < 0 || (i - m_my) >= H )) + if (!((i - m_my) < 0 || (i - m_my) >= H)) maskLine = (QRgb *)m_originalAgMask->scanLine(i - m_my); else - maskLine = NULL; + maskLine = nullptr; - //for all the columns that we have to paint - for(int j = 0; j < W; j++) { - //if within bounds considering horizontal offset - if (maskLine == NULL || (j - m_mx) < 0 || (j - m_mx) >= W) + // for all the columns that we have to paint + for (int j = 0; j < W; j++) { + // if within bounds considering horizontal offset + if (maskLine == nullptr || (j - m_mx) < 0 || (j - m_mx) >= W) maskVal = &outofbounds; else maskVal = &maskLine[j - m_mx]; @@ -254,19 +268,19 @@ } } -//void PreviewWidget::renderPatchesMask(bool patches[][agGridSize], const int gridX, const int gridY) -void PreviewWidget::renderPatchesMask() -{ +// void PreviewWidget::renderPatchesMask(bool patches[][agGridSize], const int +// gridX, const int gridY) +void PreviewWidget::renderPatchesMask() { QPainter painter(m_patchesMask); painter.setPen(Qt::NoPen); - painter.setBrush(QColor::fromRgb(255,255,255,60)); + painter.setBrush(QColor::fromRgb(255, 255, 255, 60)); painter.setCompositionMode(QPainter::CompositionMode_Clear); - painter.drawRect(0, 0, m_gridX*agGridSize, m_gridY*agGridSize); + painter.drawRect(0, 0, m_gridX * agGridSize, m_gridY * agGridSize); painter.setCompositionMode(QPainter::CompositionMode_SourceOver); for (int i = 0; i < agGridSize; i++) { for (int j = 0; j < agGridSize; j++) { if (m_patches[i][j] == true) - painter.drawRect(i*m_gridX, j*m_gridY, m_gridX, m_gridY); + painter.drawRect(i * m_gridX, j * m_gridY, m_gridX, m_gridY); } } painter.end(); @@ -287,72 +301,69 @@ else if (newindex == 3) blendmode = &PreviewWidget::computeOnlyPivot; - m_prevComputed=QRegion(); + m_prevComputed = QRegion(); renderPreviewImage(blendmode, m_rect); mPixmap->setPixmap(QPixmap::fromImage(*m_previewImage)); - //updateView(); + // updateView(); } -bool PreviewWidget::eventFilter(QObject* object, QEvent* event) -{ - //if (m_mode == EditingMode || m_mode == ViewPatches) return false; +bool PreviewWidget::eventFilter(QObject *object, QEvent *event) { + // if (m_mode == EditingMode || m_mode == ViewPatches) return false; if (m_mode == EditingMode) return false; if (event->type() == QEvent::MouseButtonPress) { - QMouseEvent* mouse = static_cast(event); + QMouseEvent *mouse = static_cast(event); if (mouse->buttons() == Qt::MidButton) { - QApplication::setOverrideCursor( QCursor(Qt::ClosedHandCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::ClosedHandCursor)); m_mousePos = mView->mapToScene(mouse->pos()); - } - else if (mouse->buttons() == Qt::LeftButton) { + } else if (mouse->buttons() == Qt::LeftButton) { if (m_mode == ViewPatches) { - QPointF relativeToWidget = mView->mapToScene(mapFromGlobal(QCursor::pos())); - int i = floor(relativeToWidget.x()/m_gridX); - int j = floor(relativeToWidget.y()/m_gridY); + QPointF relativeToWidget = + mView->mapToScene(mapFromGlobal(QCursor::pos())); + int i = floor(relativeToWidget.x() / m_gridX); + int j = floor(relativeToWidget.y() / m_gridY); m_patches[i][j] = !m_patches[i][j]; renderPatchesMask(); emit patchesEdited(); - } - else { + } else { if (m_drawingMode == PATH) { - QPointF relativeToWidget = mView->mapToScene(mapFromGlobal(QCursor::pos())); - //int sx = relativeToWidget.x() - m_mx; - //int sy = relativeToWidget.y() - m_my; - //QPointF shifted(sx,sy); - //m_firstPoint = m_lastPoint = m_currentPoint = shifted; - m_firstPoint = m_lastPoint = m_currentPoint = relativeToWidget; + QPointF relativeToWidget = + mView->mapToScene(mapFromGlobal(QCursor::pos())); + // int sx = relativeToWidget.x() - m_mx; + // int sy = relativeToWidget.y() - m_my; + // QPointF shifted(sx,sy); + // m_firstPoint = m_lastPoint = m_currentPoint = shifted; + m_firstPoint = m_lastPoint = m_currentPoint = + relativeToWidget; m_path = QPainterPath(m_firstPoint); m_drawingPathEnded = false; - } - else if (m_drawingMode == BRUSH) + } else if (m_drawingMode == BRUSH) drawWithBrush(); mAgPixmap->setPixmap(*m_agMaskPixmap); m_timerid = QObject::startTimer(0); } } - } - else if (event->type() == QEvent::MouseMove) { - QMouseEvent* mouse = static_cast(event); + } else if (event->type() == QEvent::MouseMove) { + QMouseEvent *mouse = static_cast(event); if (mouse->buttons() == Qt::MidButton) { QPointF pos = mView->mapToScene(mouse->pos()); - //moving mouse with middle button pans the preview + // moving mouse with middle button pans the preview QPointF diff = pos - m_mousePos; - if (mouse->modifiers() == Qt::ShiftModifier) - diff *= 5; - //emit moved(diff); + if (mouse->modifiers() == Qt::ShiftModifier) diff *= 5; + // emit moved(diff); m_mousePos = mView->mapToScene(mouse->pos()); - } - else if (mouse->buttons() == Qt::LeftButton && m_drawingMode == PATH) { - QPointF relativeToWidget = mView->mapToScene(mapFromGlobal(QCursor::pos())); - //int sx = relativeToWidget.x() - m_mx; - //int sy = relativeToWidget.y() - m_my; - //QPointF shifted(sx,sy); - //m_currentPoint = shifted; + } else if (mouse->buttons() == Qt::LeftButton && + m_drawingMode == PATH) { + QPointF relativeToWidget = + mView->mapToScene(mapFromGlobal(QCursor::pos())); + // int sx = relativeToWidget.x() - m_mx; + // int sy = relativeToWidget.y() - m_my; + // QPointF shifted(sx,sy); + // m_currentPoint = shifted; m_currentPoint = relativeToWidget; } mAgPixmap->setPixmap(*m_agMaskPixmap); - } - else if (event->type() == QEvent::MouseButtonRelease) { - QMouseEvent* mouse = static_cast(event); + } else if (event->type() == QEvent::MouseButtonRelease) { + QMouseEvent *mouse = static_cast(event); if (mouse->button() == Qt::LeftButton) { QObject::killTimer(m_timerid); if (m_drawingMode == PATH) { @@ -360,16 +371,15 @@ m_drawingPathEnded = true; drawPath(); } - } - else if (mouse->button() == Qt::MidButton) { + } else if (mouse->button() == Qt::MidButton) { QApplication::restoreOverrideCursor(); } - paste(m_agMask, m_agMaskPixmap->toImage(), (m_mx-m_old_mx), (m_my-m_old_my)); + paste(m_agMask, m_agMaskPixmap->toImage(), (m_mx - m_old_mx), + (m_my - m_old_my)); delete m_originalAgMask; m_originalAgMask = new QImage(*m_agMask); mAgPixmap->setPixmap(*m_agMaskPixmap); - } - else if (event->type() == QEvent::Enter) { + } else if (event->type() == QEvent::Enter) { if (m_mode == EditingMode) QApplication::restoreOverrideCursor(); else if (m_mode == ViewPatches) @@ -378,13 +388,11 @@ if (m_drawingMode == BRUSH) { fillAntiGhostingCursorPixmap(); QApplication::setOverrideCursor(*m_agcursorPixmap); - } - else + } else QApplication::setOverrideCursor(Qt::CrossCursor); } - } - else if (event->type() == QEvent::Leave) - QApplication::restoreOverrideCursor(); + } else if (event->type() == QEvent::Leave) + QApplication::restoreOverrideCursor(); return false; } @@ -396,9 +404,7 @@ m_prevComputed = QRegion(); } -void PreviewWidget::setPivot(QImage *p) { - m_pivotImage = p; -} +void PreviewWidget::setPivot(QImage *p) { m_pivotImage = p; } void PreviewWidget::setMovable(QImage *m, int p_mx, int p_my) { m_movableImage = m; @@ -409,15 +415,14 @@ void PreviewWidget::setMovable(QImage *m) { m_movableImage = m; - //TODO: check this + // TODO: check this delete m_previewImage; m_previewImage = new QImage(m_movableImage->size(), QImage::Format_ARGB32); updateView(); } void PreviewWidget::setMask(QImage *mask) { - if (m_agMaskPixmap) - delete m_agMaskPixmap; + if (m_agMaskPixmap) delete m_agMaskPixmap; m_originalAgMask = new QImage(*mask); m_agMask = new QImage(*mask); m_agMaskPixmap = new QPixmap(QPixmap::fromImage(*m_agMask)); @@ -426,16 +431,14 @@ } void PreviewWidget::setPatchesMask(QImage *mask) { - if (m_agMaskPixmap) - m_patchesMask = new QImage(*mask); + if (m_agMaskPixmap) m_patchesMask = new QImage(*mask); } -QImage *PreviewWidget::getMask() -{ +QImage *PreviewWidget::getMask() { if (m_agMaskPixmap) { return new QImage(*m_originalAgMask); } - return NULL; + return nullptr; } void PreviewWidget::updateVertShiftMovable(int v) { @@ -446,14 +449,13 @@ m_my = v; m_old_mx = m_mx; m_prevComputed = QRegion(); - } void PreviewWidget::updateHorizShiftMovable(int h) { - if(m_mx != h) + if (m_mx != h) m_old_mx = m_mx; else - m_old_mx = h; + m_old_mx = h; m_mx = h; m_old_my = m_my; m_prevComputed = QRegion(); @@ -469,43 +471,41 @@ m_prevComputed = QRegion(); } -void PreviewWidget::fitToWindow() -{ - // DO NOT de-comment: this line is not an optimization, it's a nice way to stop everything working correctly! - //if ( mViewerMode == FIT_WINDOW ) return; +void PreviewWidget::fitToWindow() { + // DO NOT de-comment: this line is not an optimization, it's a nice way to + // stop everything working correctly! + // if ( mViewerMode == FIT_WINDOW ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = FIT_WINDOW; - const int w = mView->viewport()->size().width() - 2*BORDER_SIZE; - const int h = mView->viewport()->size().height() - 2*BORDER_SIZE; + const int w = mView->viewport()->size().width() - 2 * BORDER_SIZE; + const int h = mView->viewport()->size().height() - 2 * BORDER_SIZE; - qreal w_ratio = qreal(w)/getWidth(); - qreal h_ratio = qreal(h)/getHeight(); + qreal w_ratio = qreal(w) / getWidth(); + qreal h_ratio = qreal(h) / getHeight(); - qreal sf = qMin(w_ratio, h_ratio)/getScaleFactor(); + qreal sf = qMin(w_ratio, h_ratio) / getScaleFactor(); // update only if the change is above the 0.05% - if ( qAbs(sf - static_cast(1.0)) > 0.05 ) - { + if (qAbs(sf - static_cast(1.0)) > 0.05) { #ifdef QT_DEBUG - //qDebug() << "void GenericViewer::fitToWindow().sf = " << sf; +// qDebug() << "void GenericViewer::fitToWindow().sf = " << sf; #endif - mView->scale(sf,sf); + mView->scale(sf, sf); emit changed(this); } } -bool PreviewWidget::isFittedToWindow() -{ +bool PreviewWidget::isFittedToWindow() { return ((mViewerMode == FIT_WINDOW) ? true : false); } -void PreviewWidget::fillToWindow() -{ - // DO NOT de-comment: this line is not an optimization, it's a nice way to stop everything working correctly! - //if ( mViewerMode == FILL_WINDOW ) return; +void PreviewWidget::fillToWindow() { + // DO NOT de-comment: this line is not an optimization, it's a nice way to + // stop everything working correctly! + // if ( mViewerMode == FILL_WINDOW ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = FILL_WINDOW; @@ -513,165 +513,134 @@ const int w = mView->viewport()->size().width(); const int h = mView->viewport()->size().height(); - qreal w_ratio = qreal(w)/getWidth(); - qreal h_ratio = qreal(h)/getHeight(); + qreal w_ratio = qreal(w) / getWidth(); + qreal h_ratio = qreal(h) / getHeight(); - qreal sf = qMax(w_ratio, h_ratio)/getScaleFactor(); + qreal sf = qMax(w_ratio, h_ratio) / getScaleFactor(); // update only if the change is above the 0.05% - if ( qAbs(sf - static_cast(1.0)) > 0.05 ) - { + if (qAbs(sf - static_cast(1.0)) > 0.05) { #ifdef QT_DEBUG - //qDebug() << "void GenericViewer::fillToWindow().sf = " << sf; +// qDebug() << "void GenericViewer::fillToWindow().sf = " << sf; #endif - mView->scale(sf,sf); + mView->scale(sf, sf); emit changed(this); } } -bool PreviewWidget::isFilledToWindow() -{ +bool PreviewWidget::isFilledToWindow() { return ((mViewerMode == FILL_WINDOW) ? true : false); } -void PreviewWidget::normalSize() -{ - //if ( mViewerMode == NORMAL_SIZE ) return; +void PreviewWidget::normalSize() { + // if ( mViewerMode == NORMAL_SIZE ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = NORMAL_SIZE; qreal curr_scale_factor = getScaleFactor(); - qreal scale_by = 1.0f/curr_scale_factor; + qreal scale_by = 1.0f / curr_scale_factor; mView->scale(scale_by, scale_by); emit changed(this); } -bool PreviewWidget::isNormalSize() -{ +bool PreviewWidget::isNormalSize() { return ((mViewerMode == NORMAL_SIZE) ? true : false); } -PreviewWidget::ViewerMode PreviewWidget::getViewerMode() -{ - return mViewerMode; -} - -void PreviewWidget::setViewerMode(PreviewWidget::ViewerMode viewer_mode) -{ - switch (viewer_mode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FIT_WINDOW: - fitToWindow(); - break; - case FILL_WINDOW: - fillToWindow(); - break; +PreviewWidget::ViewerMode PreviewWidget::getViewerMode() { return mViewerMode; } + +void PreviewWidget::setViewerMode(PreviewWidget::ViewerMode viewer_mode) { + switch (viewer_mode) { + case NORMAL_SIZE: + normalSize(); + break; + case FIT_WINDOW: + fitToWindow(); + break; + case FILL_WINDOW: + fillToWindow(); + break; } } -void PreviewWidget::zoomIn() -{ +void PreviewWidget::zoomIn() { // update the current view - switch (mViewerMode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FILL_WINDOW: - normalSize(); - break; - case FIT_WINDOW: - fillToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + normalSize(); + break; + case FILL_WINDOW: + normalSize(); + break; + case FIT_WINDOW: + fillToWindow(); + break; } emit changed(this); } -void PreviewWidget::zoomOut() -{ +void PreviewWidget::zoomOut() { // update the current view - switch (mViewerMode) - { - case NORMAL_SIZE: - fillToWindow(); - break; - case FILL_WINDOW: - fitToWindow(); - break; - case FIT_WINDOW: - fitToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + fillToWindow(); + break; + case FILL_WINDOW: + fitToWindow(); + break; + case FIT_WINDOW: + fitToWindow(); + break; } emit changed(this); } -void PreviewWidget::updateView() -{ +void PreviewWidget::updateView() { #ifdef QT_DEBUG qDebug() << "void PreviewWidget::updateView()"; #endif - switch (mViewerMode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FILL_WINDOW: - fillToWindow(); - break; - case FIT_WINDOW: - fitToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + normalSize(); + break; + case FILL_WINDOW: + fillToWindow(); + break; + case FIT_WINDOW: + fitToWindow(); + break; } } -QRect PreviewWidget::getSelectionRect(void) -{ +QRect PreviewWidget::getSelectionRect(void) { return mPixmap->getSelectionRect(); } -void PreviewWidget::setSelectionTool(bool toggled) -{ - if (toggled) mPixmap->enableSelectionTool(); - else mPixmap->disableSelectionTool(); +void PreviewWidget::setSelectionTool(bool toggled) { + if (toggled) + mPixmap->enableSelectionTool(); + else + mPixmap->disableSelectionTool(); } -void PreviewWidget::removeSelection(void) -{ - mPixmap->removeSelection(); -} +void PreviewWidget::removeSelection(void) { mPixmap->removeSelection(); } -bool PreviewWidget::hasSelection(void) -{ - return mPixmap->hasSelection(); -} +bool PreviewWidget::hasSelection(void) { return mPixmap->hasSelection(); } -int PreviewWidget::getWidth() -{ - return m_movableImage->width(); -} +int PreviewWidget::getWidth() { return m_movableImage->width(); } -int PreviewWidget::getHeight() -{ - return m_movableImage->height(); -} +int PreviewWidget::getHeight() { return m_movableImage->height(); } -float PreviewWidget::getScaleFactor() -{ - return mView->transform().m11(); -} +float PreviewWidget::getScaleFactor() { return mView->transform().m11(); } -void PreviewWidget::slotCornerButtonPressed() -{ +void PreviewWidget::slotCornerButtonPressed() { mPanIconWidget = new PanIconWidget(this); // is there a way to avoid this call? @@ -683,63 +652,62 @@ float topviewpos = (float)(mView->verticalScrollBar()->value()); float wps_w = (float)(mView->maximumViewportSize().width()); float wps_h = (float)(mView->maximumViewportSize().height()); - QRect r((int)(leftviewpos/zf), (int)(topviewpos/zf), (int)(wps_w/zf), (int)(wps_h/zf)); + QRect r((int)(leftviewpos / zf), (int)(topviewpos / zf), (int)(wps_w / zf), + (int)(wps_h / zf)); mPanIconWidget->setRegionSelection(r); mPanIconWidget->setMouseFocus(); - connect(mPanIconWidget, SIGNAL(selectionMoved(QRect)), this, SLOT(slotPanIconSelectionMoved(QRect))); - connect(mPanIconWidget, SIGNAL(finished()), this, SLOT(slotPanIconHidden())); + connect(mPanIconWidget, &PanIconWidget::selectionMoved, this, + &PreviewWidget::slotPanIconSelectionMoved); + connect(mPanIconWidget, &PanIconWidget::finished, this, + &PreviewWidget::slotPanIconHidden); QPoint g = mView->mapToGlobal(mView->viewport()->pos()); - g.setX(g.x()+ mView->viewport()->size().width()); - g.setY(g.y()+ mView->viewport()->size().height()); - mPanIconWidget->popup(QPoint(g.x() - mPanIconWidget->width()/2, g.y() - mPanIconWidget->height()/2)); + g.setX(g.x() + mView->viewport()->size().width()); + g.setY(g.y() + mView->viewport()->size().height()); + mPanIconWidget->popup(QPoint(g.x() - mPanIconWidget->width() / 2, + g.y() - mPanIconWidget->height() / 2)); mPanIconWidget->setCursorToLocalRegionSelectionCenter(); } -void PreviewWidget::slotPanIconSelectionMoved(QRect gotopos) -{ - mView->horizontalScrollBar()->setValue((int)(gotopos.x()*this->getScaleFactor())); - mView->verticalScrollBar()->setValue((int)(gotopos.y()*this->getScaleFactor())); +void PreviewWidget::slotPanIconSelectionMoved(QRect gotopos) { + mView->horizontalScrollBar()->setValue( + (int)(gotopos.x() * this->getScaleFactor())); + mView->verticalScrollBar()->setValue( + (int)(gotopos.y() * this->getScaleFactor())); emit changed(this); } -void PreviewWidget::slotPanIconHidden() -{ +void PreviewWidget::slotPanIconHidden() { mPanIconWidget->close(); mCornerButton->blockSignals(true); mCornerButton->animateClick(); mCornerButton->blockSignals(false); } -void PreviewWidget::scrollBarChanged(int /*value*/) -{ - emit changed(this); -} +void PreviewWidget::scrollBarChanged(int /*value*/) { emit changed(this); } -void PreviewWidget::updatePreviewImage() -{ +void PreviewWidget::updatePreviewImage() { renderPreviewImage(blendmode, m_rect); mPixmap->setPixmap(QPixmap::fromImage(*m_previewImage)); - if ( m_mode == AntighostingMode) { + if (m_mode == AntighostingMode) { if ((m_mx != m_old_mx) && (m_my != m_old_my)) { delete m_agMask; m_agMask = new QImage(*m_originalAgMask); - paste(m_agMask, m_agMaskPixmap->toImage(), -(m_mx-m_old_mx), -(m_my-m_old_my)); + paste(m_agMask, m_agMaskPixmap->toImage(), -(m_mx - m_old_mx), + -(m_my - m_old_my)); delete m_agMaskPixmap; m_agMaskPixmap = new QPixmap(QPixmap::fromImage(*m_agMask)); mAgPixmap->setPixmap(*m_agMaskPixmap); - } - else if ((m_mx != m_old_mx) && (m_my == m_old_my)) { + } else if ((m_mx != m_old_mx) && (m_my == m_old_my)) { delete m_agMask; m_agMask = new QImage(*m_originalAgMask); - paste(m_agMask, m_agMaskPixmap->toImage(), -(m_mx-m_old_mx), 0); + paste(m_agMask, m_agMaskPixmap->toImage(), -(m_mx - m_old_mx), 0); delete m_agMaskPixmap; m_agMaskPixmap = new QPixmap(QPixmap::fromImage(*m_agMask)); mAgPixmap->setPixmap(*m_agMaskPixmap); - } - else if ((m_my != m_old_my) && (m_mx == m_old_mx)) { + } else if ((m_my != m_old_my) && (m_mx == m_old_mx)) { delete m_agMask; m_agMask = new QImage(*m_originalAgMask); - paste(m_agMask, m_agMaskPixmap->toImage(), 0, -(m_my-m_old_my)); + paste(m_agMask, m_agMaskPixmap->toImage(), 0, -(m_my - m_old_my)); delete m_agMaskPixmap; m_agMaskPixmap = new QPixmap(QPixmap::fromImage(*m_agMask)); mAgPixmap->setPixmap(*m_agMaskPixmap); @@ -747,17 +715,11 @@ } } -void PreviewWidget::setDrawWithBrush() -{ - m_drawingMode = BRUSH; -} +void PreviewWidget::setDrawWithBrush() { m_drawingMode = BRUSH; } -void PreviewWidget::setDrawPath() -{ - m_drawingMode = PATH; -} +void PreviewWidget::setDrawPath() { m_drawingMode = PATH; } -void PreviewWidget::setBrushSize (const int newsize) { +void PreviewWidget::setBrushSize(const int newsize) { m_requestedPixmapSize = newsize; } @@ -766,34 +728,34 @@ m_brushAddMode = !removemode; } -void PreviewWidget::setBrushStrength (const int newstrength) { +void PreviewWidget::setBrushStrength(const int newstrength) { m_requestedPixmapStrength = newstrength; - m_requestedPixmapColor.setAlpha(qMax(60,m_requestedPixmapStrength)); + m_requestedPixmapColor.setAlpha(qMax(60, m_requestedPixmapStrength)); m_requestedPixmapStrength *= (!m_brushAddMode) ? -1 : 1; } -void PreviewWidget::setBrushColor (const QColor newcolor) { +void PreviewWidget::setBrushColor(const QColor newcolor) { m_requestedPixmapColor = newcolor; update(); } -void PreviewWidget::setLassoColor (const QColor newcolor) { +void PreviewWidget::setLassoColor(const QColor newcolor) { m_requestedLassoColor = newcolor; update(); } void PreviewWidget::fillAntiGhostingCursorPixmap() { - if (m_agcursorPixmap) - delete m_agcursorPixmap; + if (m_agcursorPixmap) delete m_agcursorPixmap; m_previousPixmapSize = m_requestedPixmapSize; m_previousPixmapStrength = m_requestedPixmapStrength; m_previousPixmapColor = m_requestedPixmapColor; - m_agcursorPixmap = new QPixmap(m_requestedPixmapSize,m_requestedPixmapSize); + m_agcursorPixmap = + new QPixmap(m_requestedPixmapSize, m_requestedPixmapSize); m_agcursorPixmap->fill(Qt::transparent); QPainter painter(m_agcursorPixmap); painter.setPen(Qt::DashLine); - painter.setBrush(QBrush(m_requestedPixmapColor,Qt::SolidPattern)); - painter.drawEllipse(0,0,m_requestedPixmapSize,m_requestedPixmapSize); + painter.setBrush(QBrush(m_requestedPixmapColor, Qt::SolidPattern)); + painter.drawEllipse(0, 0, m_requestedPixmapSize, m_requestedPixmapSize); } void PreviewWidget::switchAntighostingMode(bool ag) { @@ -805,83 +767,81 @@ mAgPixmap->setVisible(true); m_mode = AntighostingMode; } else { - mPixmap->setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton|Qt::MidButton); + mPixmap->setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton | + Qt::MidButton); mAgPixmap->setVisible(false); m_mode = EditingMode; } } -void PreviewWidget::switchViewPatchesMode(bool pp, bool patches[][agGridSize], const int gridX, const int gridY) { +void PreviewWidget::switchViewPatchesMode(bool pp, bool patches[][agGridSize], + const int gridX, const int gridY) { if (pp) { mPixmap->setAcceptedMouseButtons(0); mAgPixmap->setVisible(true); m_mode = ViewPatches; m_gridX = gridX; m_gridY = gridY; - memcpy(m_patches, patches, agGridSize*agGridSize); + memcpy(m_patches, patches, agGridSize * agGridSize); } else { - mPixmap->setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton|Qt::MidButton); + mPixmap->setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton | + Qt::MidButton); mAgPixmap->setVisible(false); m_mode = EditingMode; } } -void PreviewWidget::saveAgMask() -{ - if (m_savedMask) - delete m_savedMask; +void PreviewWidget::saveAgMask() { + if (m_savedMask) delete m_savedMask; m_savedMask = new QImage(m_agMaskPixmap->toImage()); } -QImage * PreviewWidget::getSavedAgMask() -{ - return m_savedMask; -} +QImage *PreviewWidget::getSavedAgMask() { return m_savedMask; } -void PreviewWidget::timerEvent(QTimerEvent *) -{ +void PreviewWidget::timerEvent(QTimerEvent *) { (m_drawingMode == BRUSH) ? drawWithBrush() : drawPath(); } -void PreviewWidget::drawWithBrush() -{ +void PreviewWidget::drawWithBrush() { QPointF relativeToWidget = mView->mapToScene(mapFromGlobal(QCursor::pos())); float scaleFactor = getScaleFactor(); - //int sx = relativeToWidget.x() - m_mx; - //int sy = relativeToWidget.y() - m_my; - //QPointF shifted(sx,sy); + // int sx = relativeToWidget.x() - m_mx; + // int sy = relativeToWidget.y() - m_my; + // QPointF shifted(sx,sy); QPainter p(m_agMaskPixmap); p.setPen(Qt::NoPen); p.setBrush(QBrush(m_requestedPixmapColor, Qt::SolidPattern)); - if (!m_brushAddMode) - p.setCompositionMode(QPainter::CompositionMode_Clear); - int pixSize = m_requestedPixmapSize/(2*scaleFactor); - //p.drawEllipse(shifted, pixSize, pixSize); + if (!m_brushAddMode) p.setCompositionMode(QPainter::CompositionMode_Clear); + int pixSize = m_requestedPixmapSize / (2 * scaleFactor); + // p.drawEllipse(shifted, pixSize, pixSize); p.drawEllipse(relativeToWidget, pixSize, pixSize); p.end(); } -void PreviewWidget::drawPath() -{ +void PreviewWidget::drawPath() { QPainter painter(m_agMaskPixmap); - painter.setPen(QPen(m_requestedLassoColor, 0, Qt::SolidLine, - Qt::FlatCap, Qt::MiterJoin)); + painter.setPen(QPen(m_requestedLassoColor, 0, Qt::SolidLine, Qt::FlatCap, + Qt::MiterJoin)); painter.setBrush(QBrush()); if (m_drawingPathEnded) { - painter.setCompositionMode(QPainter::CompositionMode_Clear); // Nasty hack, QPen does not draw semi transparent + painter.setCompositionMode( + QPainter::CompositionMode_Clear); // Nasty hack, + // QPen does + // not draw + // semi + // transparent painter.drawPath(m_path); if (m_brushAddMode) painter.setCompositionMode(QPainter::CompositionMode_SourceOver); painter.fillPath(m_path, m_requestedPixmapColor); - if (m_brushAddMode) { // redraw the path + if (m_brushAddMode) { // redraw the path painter.setPen(QPen(m_requestedPixmapColor, 0, Qt::SolidLine, - Qt::FlatCap, Qt::MiterJoin)); + Qt::FlatCap, Qt::MiterJoin)); painter.setCompositionMode(QPainter::CompositionMode_SourceOver); painter.drawPath(m_path); } - } - else { + } else { m_path.lineTo(m_lastPoint); m_lastPoint = m_currentPoint; painter.drawPath(m_path); @@ -889,7 +849,6 @@ painter.end(); } -void PreviewWidget::getPatches(bool patches[][agGridSize]) -{ - memcpy(patches, m_patches, agGridSize*agGridSize); +void PreviewWidget::getPatches(bool patches[][agGridSize]) { + memcpy(patches, m_patches, agGridSize * agGridSize); } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/PreviewWidget.h luminance-hdr-2.6.0/src/HdrWizard/PreviewWidget.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/PreviewWidget.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/PreviewWidget.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,41 +25,33 @@ #define PREVIEWWIDGET_H #include -#include +#include +#include +#include #include -#include +#include #include -#include +#include #include #include -#include -#include -#include "AutoAntighosting.h" // Just for agGridSize !!! +#include "AutoAntighosting.h" // Just for agGridSize !!! class IGraphicsView; class IGraphicsPixmapItem; class PanIconWidget; -class PreviewWidget : public QWidget -{ -Q_OBJECT -public: +class PreviewWidget : public QWidget { + Q_OBJECT + public: //! \brief Enum containing the list of possible view mode - enum ViewerMode - { - FIT_WINDOW = 0, - FILL_WINDOW = 1, - NORMAL_SIZE = 2 - }; + enum ViewerMode { FIT_WINDOW = 0, FILL_WINDOW = 1, NORMAL_SIZE = 2 }; PreviewWidget(QWidget *parent, QImage *m, const QImage *p); ~PreviewWidget(); - QSize sizeHint () const { - return m_previewImage->size(); - } + QSize sizeHint() const { return m_previewImage->size(); } float getScaleFactor(); - QImage * getPreviewImage() { + QImage *getPreviewImage() { renderPreviewImage(blendmode); return m_previewImage; } @@ -78,8 +70,9 @@ bool isNormalSize(); void setMask(QImage *mask); - QImage* getMask(); // Conversion to QImage to QPixmap is made for speed optimization - // we need to return a QImage from the modified QPixmap + QImage *getMask(); // Conversion to QImage to QPixmap is made for speed + // optimization + // we need to return a QImage from the modified QPixmap void setPatchesMask(QImage *mask); void setHV_offset(QPair HV_offset) { @@ -89,10 +82,11 @@ void setDrawWithBrush(); void setDrawPath(); - //void renderPatchesMask(bool patches[][agGridSize], const int gridX, const int gridY); + // void renderPatchesMask(bool patches[][agGridSize], const int gridX, const + // int gridY); void renderPatchesMask(); -public slots: + public slots: void requestedBlendMode(int); void updateView(); // tells the Viewer to update the View area void updatePreviewImage(); @@ -117,8 +111,8 @@ void removeSelection(); void switchAntighostingMode(bool); - void switchViewPatchesMode(bool, bool [][agGridSize], const int, const int); - void getPatches(bool [][agGridSize]); + void switchViewPatchesMode(bool, bool[][agGridSize], const int, const int); + void getPatches(bool[][agGridSize]); void setBrushSize(const int); void setBrushStrength(const int); void setBrushColor(const QColor); @@ -127,67 +121,72 @@ void saveAgMask(); QImage *getSavedAgMask(); -protected slots: + protected slots: void slotPanIconSelectionMoved(QRect); void slotPanIconHidden(); void slotCornerButtonPressed(); void scrollBarChanged(int /*value*/); -signals: + signals: void moved(QPoint diff); void selectionReady(bool isReady); - void changed(PreviewWidget *v); // emitted when zoomed in/out, scrolled .... + void changed( + PreviewWidget *v); // emitted when zoomed in/out, scrolled .... void patchesEdited(); -protected: - bool eventFilter(QObject* object, QEvent* event); + protected: + bool eventFilter(QObject *object, QEvent *event); virtual void timerEvent(QTimerEvent *event); -private: - //5 blending modes - inline QRgb computeOnlyMovable(const QRgb *Mrgba, const QRgb */*Prgba*/) const { + private: + // 5 blending modes + inline QRgb computeOnlyMovable(const QRgb *Mrgba, + const QRgb * /*Prgba*/) const { return *Mrgba; } - inline QRgb computeOnlyPivot(const QRgb */*Mrgba*/, const QRgb *Prgba) const { + inline QRgb computeOnlyPivot(const QRgb * /*Mrgba*/, + const QRgb *Prgba) const { return *Prgba; } inline QRgb computeAddRgba(const QRgb *Mrgba, const QRgb *Prgba) const { - int ro,go,bo; - int Mred = qRed(*Mrgba); + int ro, go, bo; + int Mred = qRed(*Mrgba); int Mgreen = qGreen(*Mrgba); - int Mblue = qBlue(*Mrgba); + int Mblue = qBlue(*Mrgba); int Malpha = qAlpha(*Mrgba); - int Pred = qRed(*Prgba); + int Pred = qRed(*Prgba); int Pgreen = qGreen(*Prgba); - int Pblue = qBlue(*Prgba); + int Pblue = qBlue(*Prgba); int Palpha = qAlpha(*Prgba); - //blend samples using alphas as weights - ro = ( Pred*Palpha + Mred*Malpha )/510; - go = ( Pgreen*Palpha + Mgreen*Malpha )/510; - bo = ( Pblue*Palpha + Mblue*Malpha )/510; - //the output image still has alpha=255 (opaque) - return qRgba(ro,go,bo,255); + // blend samples using alphas as weights + ro = (Pred * Palpha + Mred * Malpha) / 510; + go = (Pgreen * Palpha + Mgreen * Malpha) / 510; + bo = (Pblue * Palpha + Mblue * Malpha) / 510; + // the output image still has alpha=255 (opaque) + return qRgba(ro, go, bo, 255); } inline QRgb computeDiffRgba(const QRgb *Mrgba, const QRgb *Prgba) const { - int ro,go,bo; - int Mred = qRed(*Mrgba); - int Mgreen = qGreen(*Mrgba); - int Mblue = qBlue(*Mrgba); - int Malpha = qAlpha(*Mrgba); - int Pred = qRed(*Prgba); - int Pgreen = qGreen(*Prgba); - int Pblue = qBlue(*Prgba); - int Palpha = qAlpha(*Prgba); - //blend samples using alphas as weights - ro = qAbs( Pred*Palpha - Mred*Malpha )/255; - go = qAbs( Pgreen*Palpha - Mgreen*Malpha )/255; - bo = qAbs( Pblue*Palpha - Mblue*Malpha )/255; - //the output image still has alpha=255 (opaque) - return qRgba(ro,go,bo,255); + int ro, go, bo; + int Mred = qRed(*Mrgba); + int Mgreen = qGreen(*Mrgba); + int Mblue = qBlue(*Mrgba); + int Malpha = qAlpha(*Mrgba); + int Pred = qRed(*Prgba); + int Pgreen = qGreen(*Prgba); + int Pblue = qBlue(*Prgba); + int Palpha = qAlpha(*Prgba); + // blend samples using alphas as weights + ro = qAbs(Pred * Palpha - Mred * Malpha) / 255; + go = qAbs(Pgreen * Palpha - Mgreen * Malpha) / 255; + bo = qAbs(Pblue * Palpha - Mblue * Malpha) / 255; + // the output image still has alpha=255 (opaque) + return qRgba(ro, go, bo, 255); } - QRgb(PreviewWidget::*blendmode)(const QRgb*,const QRgb*)const; - void renderPreviewImage(QRgb(PreviewWidget::*f)(const QRgb*,const QRgb*)const,const QRect a = QRect()); + QRgb (PreviewWidget::*blendmode)(const QRgb *, const QRgb *) const; + void renderPreviewImage(QRgb (PreviewWidget::*f)(const QRgb *, const QRgb *) + const, + const QRect a = QRect()); void renderAgMask(); void scrollAgMask(int, int); @@ -201,30 +200,30 @@ QPixmap *m_agMaskPixmap; QImage *m_savedMask; - QToolButton* mCornerButton; - PanIconWidget* mPanIconWidget; + QToolButton *mCornerButton; + PanIconWidget *mPanIconWidget; QVBoxLayout *mVBL; - QGraphicsScene* mScene; - IGraphicsView* mView; + QGraphicsScene *mScene; + IGraphicsView *mView; ViewerMode mViewerMode; IGraphicsPixmapItem *mPixmap, *mAgPixmap; QRegion m_prevComputed; QRect m_rect; - //movable and pivot's x,y shifts + // movable and pivot's x,y shifts int m_mx, m_my, m_px, m_py; int m_old_mx, m_old_my; - //zoom factor - //float m_scaleFactor; + // zoom factor + // float m_scaleFactor; int m_timerid; QPixmap *m_agcursorPixmap; int m_requestedPixmapSize, m_previousPixmapSize; int m_requestedPixmapStrength, m_previousPixmapStrength; QColor m_requestedPixmapColor, m_previousPixmapColor, m_requestedLassoColor; - bool m_brushAddMode;//false means brush is in remove mode. + bool m_brushAddMode; // false means brush is in remove mode. void fillAntiGhostingCursorPixmap(); void drawWithBrush(); void drawPath(); @@ -240,8 +239,8 @@ int m_gridX; int m_gridY; - enum {BRUSH, PATH} m_drawingMode; - enum {EditingMode, AntighostingMode, ViewPatches} m_mode; + enum { BRUSH, PATH } m_drawingMode; + enum { EditingMode, AntighostingMode, ViewPatches } m_mode; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/WhiteBalance.cpp luminance-hdr-2.6.0/src/HdrWizard/WhiteBalance.cpp --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/WhiteBalance.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/WhiteBalance.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,125 +1,111 @@ #include "WhiteBalance.h" -#include #include -#include #include +#include #include +#include #include +#include +#include #include -#include -#include #include #include -#include -#include +#include +#include #include "Libpfs/utils/msec_timer.h" using namespace pfs; using namespace pfs::colorspace; using namespace pfs::utils; -void computeHistogram(const pfs::Array2Df& data, std::vector& histogram, - float min, float max) -{ +void computeHistogram(const pfs::Array2Df &data, std::vector &histogram, + float min, float max) { Normalizer norm(min, max); - for (pfs::Array2Df::const_iterator it = data.begin(), itEnd = data.end(); it != itEnd; ++it) - { + for (pfs::Array2Df::const_iterator it = data.begin(), itEnd = data.end(); + it != itEnd; ++it) { // 1.0f -> histogram.size() - 1 - size_t bin = static_cast(norm(*it)*(histogram.size()-1)+0.5f); + size_t bin = + static_cast(norm(*it) * (histogram.size() - 1) + 0.5f); ++histogram[bin]; } } -std::pair quantiles(const pfs::Array2Df& data, - float nb_min, float nb_max, - float min, float max) -{ +std::pair quantiles(const pfs::Array2Df &data, float nb_min, + float nb_max, float min, float max) { // compute histogram (less expensive than sorting the entire sequence... std::vector hist(65535, 0); computeHistogram(data, hist, min, max); // normalize percentiles to image size... - size_t lb_percentile = static_cast(nb_min*data.size() + 0.5f); - size_t ub_percentile = static_cast(nb_max*data.size() + 0.5f); + size_t lb_percentile = static_cast(nb_min * data.size() + 0.5f); + size_t ub_percentile = static_cast(nb_max * data.size() + 0.5f); size_t counter = 0; std::pair minmax; - for (size_t idx = 0; idx < hist.size(); ++idx) - { + for (size_t idx = 0; idx < hist.size(); ++idx) { counter += hist[idx]; if (counter >= lb_percentile) { - minmax.first = static_cast(idx)/(hist.size()-1)*(max - min) + min; + minmax.first = + static_cast(idx) / (hist.size() - 1) * (max - min) + min; break; } } counter = 0; - for (size_t idx = 0; idx < hist.size(); ++idx) - { + for (size_t idx = 0; idx < hist.size(); ++idx) { counter += hist[idx]; if (counter >= ub_percentile) { - minmax.second = static_cast(idx)/(hist.size()-1)*(max - min) + min; + minmax.second = + static_cast(idx) / (hist.size() - 1) * (max - min) + min; break; } } #ifndef NDEBUG std::cout << "([" << nb_min << ", " << min << ", " << lb_percentile << "]" - ", [" << nb_max << ", " << max << ", " << ub_percentile << "])" << std::endl; + ", [" + << nb_max << ", " << max << ", " << ub_percentile << "])" + << std::endl; #endif return minmax; } -std::pair getMinMax(const pfs::Array2Df& data) -{ - std::pair minmax = - boost::minmax_element(data.begin(), data.end()); +std::pair getMinMax(const pfs::Array2Df &data) { + std::pair + minmax = boost::minmax_element(data.begin(), data.end()); return std::pair(*minmax.first, *minmax.second); } -void balance(pfs::Array2Df& data, float nb_min, float nb_max) -{ +void balance(pfs::Array2Df &data, float nb_min, float nb_max) { std::pair minmax = getMinMax(data); - if (nb_min > 0.f || nb_max < 1.f) - { + if (nb_min > 0.f || nb_max < 1.f) { minmax = quantiles(data, nb_min, nb_max, minmax.first, minmax.second); } - std::transform( - data.begin(), - data.end(), - data.begin(), - utils::chain( - utils::ClampF32(minmax.first, minmax.second), - Normalizer(minmax.first, minmax.second) - ) - ); + std::transform(data.begin(), data.end(), data.begin(), + utils::chain(utils::ClampF32(minmax.first, minmax.second), + Normalizer(minmax.first, minmax.second))); } -void checkParameterValidity(float& nb_min, float& nb_max) -{ - if (nb_min < 0.f) - { +void checkParameterValidity(float &nb_min, float &nb_max) { + if (nb_min < 0.f) { nb_min = 0.f; } - if (nb_max > 1.f) - { + if (nb_max > 1.f) { nb_max = 1.f; } - if (nb_min > nb_max) - { + if (nb_min > nb_max) { std::swap(nb_min, nb_max); } } -void colorBalanceRGB(Array2Df& R, Array2Df& G, Array2Df& B, - float nb_min, float nb_max) -{ +void colorBalanceRGB(Array2Df &R, Array2Df &G, Array2Df &B, float nb_min, + float nb_max) { checkParameterValidity(nb_min, nb_max); #pragma omp parallel sections @@ -142,9 +128,7 @@ } } - -void robustAWB(Array2Df* R_orig, Array2Df* G_orig, Array2Df* B_orig) -{ +void robustAWB(Array2Df *R_orig, Array2Df *G_orig, Array2Df *B_orig) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -176,22 +160,23 @@ for (int it = 0; it < iterMax; it++) { transformRGB2Yuv(&R, &G, &B, &Y, &U, &V); - #pragma omp parallel for - for (int i = 0; i < width*height; i++) - F(i) = (abs(U(i)) + abs(V(i)))/Y(i); +#pragma omp parallel for + for (int i = 0; i < width * height; i++) + F(i) = (abs(U(i)) + abs(V(i))) / Y(i); int sum = 0; //#pragma omp parallel for reduction(+:sum) - for (int i = 0; i < width*height; i++) { + for (int i = 0; i < width * height; i++) { if (F(i) < T) { sum = sum + 1; gray_r.push_back(U(i)); gray_b.push_back(V(i)); } } - if (sum == 0) - break; - float U_bar = accumulate(gray_r.begin(), gray_r.end(), 0.0f)/gray_r.size(); - float V_bar = accumulate(gray_b.begin(), gray_b.end(), 0.0f)/gray_b.size(); + if (sum == 0) break; + float U_bar = + accumulate(gray_r.begin(), gray_r.end(), 0.0f) / gray_r.size(); + float V_bar = + accumulate(gray_b.begin(), gray_b.end(), 0.0f) / gray_b.size(); float err; float delta; int ch; @@ -200,29 +185,25 @@ if (abs(U_bar) > abs(V_bar)) { err = U_bar; ch = 2; - } - else { + } else { err = V_bar; ch = 0; } if (abs(err) >= a && abs(err) < c) { - delta = 2.0f*(err/abs(err))*u; - } - else if (abs(err) >= c) { + delta = 2.0f * (err / abs(err)) * u; + } else if (abs(err) >= c) { break; - } - else if (abs(err) < b) { + } else if (abs(err) < b) { delta = 0.0f; break; - } - else { - delta = err*u; + } else { + delta = err * u; } gain[ch] -= delta; - #pragma omp parallel for - for (int i = 0; i < width*height; i++) { - R(i) = (*R_orig)(i) * gain[0]; - B(i) = (*B_orig)(i) * gain[2]; +#pragma omp parallel for + for (int i = 0; i < width * height; i++) { + R(i) = (*R_orig)(i)*gain[0]; + B(i) = (*B_orig)(i)*gain[2]; } // qDebug() << it << " : " << err; } @@ -230,23 +211,20 @@ copy(&B, B_orig); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "robustAWB = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "robustAWB = " << stop_watch.get_time() << " msec" + << std::endl; #endif } - -float computeAccumulation(const pfs::Array2Df& matrix) -{ +float computeAccumulation(const pfs::Array2Df &matrix) { float acc = 0.f; - for (size_t i = 0; i < matrix.size(); i++) - { + for (size_t i = 0; i < matrix.size(); i++) { acc += std::pow(matrix(i), 6.0f); } - return std::pow(acc/matrix.size(), 1.f/6.f); + return std::pow(acc / matrix.size(), 1.f / 6.f); } -void shadesOfGrayAWB(Array2Df& R, Array2Df& G, Array2Df& B) -{ +void shadesOfGrayAWB(Array2Df &R, Array2Df &G, Array2Df &B) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); @@ -274,7 +252,7 @@ eB = computeAccumulation(B); } } - float norm = std::sqrt(eR*eR + eG*eG + eB*eB); + float norm = std::sqrt(eR * eR + eG * eG + eB * eB); eR /= norm; eG /= norm; eB /= norm; @@ -284,7 +262,7 @@ float gainB = maximum / eB; #pragma omp parallel sections -{ + { #pragma omp section { /* Executes in thread 1 */ @@ -304,36 +282,31 @@ #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "shadesOfGrayAWB = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "shadesOfGrayAWB = " << stop_watch.get_time() << " msec" + << std::endl; #endif } - -void whiteBalance(Frame& frame, WhiteBalanceType type) -{ - Channel* r; - Channel* g; - Channel* b; +void whiteBalance(Frame &frame, WhiteBalanceType type) { + Channel *r; + Channel *g; + Channel *b; frame.getXYZChannels(r, g, b); whiteBalance(*r, *g, *b, type); } -void whiteBalance(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, WhiteBalanceType type) -{ - switch (type) - { - case WB_COLORBALANCE: - { - colorBalanceRGB(R, G, B, 0.005, 0.995); - } break; - case WB_ROBUST: - { - robustAWB(&R, &G, &B); - } break; - case WB_SHADESOFGRAY: - { - shadesOfGrayAWB(R, G, B); - } break; +void whiteBalance(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + WhiteBalanceType type) { + switch (type) { + case WB_COLORBALANCE: { + colorBalanceRGB(R, G, B, 0.005, 0.995); + } break; + case WB_ROBUST: { + robustAWB(&R, &G, &B); + } break; + case WB_SHADESOFGRAY: { + shadesOfGrayAWB(R, G, B); + } break; } } diff -Nru luminance-hdr-2.5.1+dfsg/src/HdrWizard/WhiteBalance.h luminance-hdr-2.6.0/src/HdrWizard/WhiteBalance.h --- luminance-hdr-2.5.1+dfsg/src/HdrWizard/WhiteBalance.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HdrWizard/WhiteBalance.h 2019-06-09 19:18:38.000000000 +0000 @@ -11,19 +11,19 @@ * channel, saturating a percentage of the pixels at the beginning and * end of the color space on each channel. */ -void colorBalanceRGB(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - float nb_min, float nb_max); -void robustAWB(pfs::Array2Df* R, pfs::Array2Df* G, pfs::Array2Df* B); -void shadesOfGrayAWB(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B); +void colorBalanceRGB(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + float nb_min, float nb_max); +void robustAWB(pfs::Array2Df *R, pfs::Array2Df *G, pfs::Array2Df *B); +void shadesOfGrayAWB(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B); -enum WhiteBalanceType -{ +enum WhiteBalanceType { WB_COLORBALANCE = 0, WB_ROBUST = 1, WB_SHADESOFGRAY = 2 }; -void whiteBalance(pfs::Frame& frame, WhiteBalanceType type); -void whiteBalance(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, WhiteBalanceType type); +void whiteBalance(pfs::Frame &frame, WhiteBalanceType type); +void whiteBalance(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + WhiteBalanceType type); -#endif // WHITEBALANCE_H +#endif // WHITEBALANCE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/CMakeLists.txt luminance-hdr-2.6.0/src/HelpBrowser/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -27,8 +27,12 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX}) -qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebEngineCore WebEngineWidgets PrintSupport) +ADD_LIBRARY(helpbrowser STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX}) +IF(Qt5WebEngineCore_FOUND) + TARGET_LINK_LIBRARIES(helpbrowser Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Xml Qt5::WebEngineCore Qt5::WebEngineWidgets Qt5::PrintSupport) +ELSE() + TARGET_LINK_LIBRARIES(helpbrowser Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Xml Qt5::WebKit Qt5::WebKitWidgets Qt5::PrintSupport) +ENDIF() SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/helpbrowser.cpp luminance-hdr-2.6.0/src/HelpBrowser/helpbrowser.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/helpbrowser.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/helpbrowser.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -46,13 +46,14 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "helpbrowser.h" -#include "ui_HelpBrowser.h" -#include "ui_HelpSideBar.h" +#include "HelpBrowser/helpbrowser.h" +#include "HelpBrowser/ui_HelpBrowser.h" +#include "HelpBrowser/ui_HelpSideBar.h" -#include #include #include +#include +#include #include #include #include @@ -68,21 +69,21 @@ #include #include #include -#include #include +#include #include #include #include -#include +#include -#include #include #include +#include +#include "Common/LuminanceOptions.h" #include "Common/global.h" -#include "HelpBrowser/schelptreemodel.h" #include "HelpBrowser/LuminancePaths.h" -#include "Common/LuminanceOptions.h" +#include "HelpBrowser/schelptreemodel.h" /*! \brief XML parsef for documantation history. This is small helper class which reads saved bookmarks configuration @@ -90,32 +91,27 @@ The reference to historyBrowser is a reference to the dialog. \author Petr Vanek */ -class HistoryParser2 : public QXmlDefaultHandler -{ - public: - HelpBrowser *helpBrowser; - - bool startDocument() - { - return true; - } - - bool startElement(const QString&, const QString&, const QString& qName, const QXmlAttributes& attrs) - { - if (qName == "item") - { - struct histd2 his; - his.title = attrs.value(0); - his.url = attrs.value(1); - helpBrowser->mHistory[helpBrowser->histMenu->addAction(his.title)] = his; - } - return true; +class HistoryParser2 : public QXmlDefaultHandler { + public: + HelpBrowser *helpBrowser; + + bool startDocument() { return true; } + + bool startElement(const QString &, const QString &, const QString &qName, + const QXmlAttributes &attrs) { + if (qName == QLatin1String("item")) { + struct histd2 his; + his.title = attrs.value(0); + his.url = attrs.value(1); + helpBrowser->mHistory[helpBrowser->histMenu->addAction(his.title)] = + his; } + return true; + } - bool endElement(const QString&, const QString&, const QString&) - { - return true; - } + bool endElement(const QString &, const QString &, const QString &) { + return true; + } }; /*! \brief XML parsef for documantation bookmarks. @@ -124,93 +120,106 @@ The reference to QListView *view is a reference to the list view with bookmarks \author Petr Vanek */ -class BookmarkParser2 : public QXmlDefaultHandler -{ - public: - QTreeWidget* view; - QMap* quickHelpIndex; - QMap >* bookmarkIndex; - - bool startDocument() - { - return true; - } - - bool startElement(const QString&, const QString&, const QString& qName, const QXmlAttributes& attrs) - { - if (qName == "item") - { - //TODO : This will dump items if bookmarks get loaded into a different GUI language - if (quickHelpIndex->contains(attrs.value(1))) - { - bookmarkIndex->insert(attrs.value(0), qMakePair(attrs.value(1), attrs.value(2))); - view->addTopLevelItem(new QTreeWidgetItem(view, QStringList() << attrs.value(0))); - } +class BookmarkParser2 : public QXmlDefaultHandler { + public: + QTreeWidget *view; + QMap *quickHelpIndex; + QMap> *bookmarkIndex; + + bool startDocument() { return true; } + + bool startElement(const QString &, const QString &, const QString &qName, + const QXmlAttributes &attrs) { + if (qName == QLatin1String("item")) { + // TODO : This will dump items if bookmarks get loaded into a + // different + // GUI language + if (quickHelpIndex->contains(attrs.value(1))) { + bookmarkIndex->insert( + attrs.value(0), qMakePair(attrs.value(1), attrs.value(2))); + view->addTopLevelItem( + new QTreeWidgetItem(view, QStringList() << attrs.value(0))); } - return true; } + return true; + } - bool endElement(const QString&, const QString&, const QString&) - { - return true; - } + bool endElement(const QString &, const QString &, const QString &) { + return true; + } }; -HelpBrowser::HelpBrowser(QWidget* parent): - QMainWindow( parent ), - m_Ui(new Ui::HelpBrowser) -{ +HelpBrowser::HelpBrowser(QWidget *parent) + : QMainWindow(parent), m_Ui(new Ui::HelpBrowser) { m_Ui->setupUi(this); } -HelpBrowser::HelpBrowser( QWidget* parent, const QString& /*caption*/, const QString& guiLanguage, const QString& jumpToSection, const QString& jumpToFile): - QMainWindow( parent ), - zoomFactor(1.0), - //m_textBrowser(new QTextDocument), - m_textBrowser(new QTextBrowser), - m_Ui(new Ui::HelpBrowser) -{ +HelpBrowser::HelpBrowser(QWidget *parent, const QString & /*caption*/, + const QString &guiLanguage, + const QString &jumpToSection, + const QString &jumpToFile) + : QMainWindow(parent), + zoomFactor(1.0), + // m_textBrowser(new QTextDocument), + m_textBrowser(new QTextBrowser), + m_Ui(new Ui::HelpBrowser) { m_Ui->setupUi(this); - restoreGeometry(LuminanceOptions().value("HelpBrowserGeometry").toByteArray()); + restoreGeometry(LuminanceOptions() + .value(QStringLiteral("HelpBrowserGeometry")) + .toByteArray()); setupLocalUI(); - //m_Ui->htmlPage->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); - //connect(m_Ui->htmlPage, SIGNAL(linkClicked(const QUrl &)), this, SLOT(handleExternalLink(const QUrl &))); - connect(m_Ui->htmlPage, SIGNAL(loadStarted()), this, SLOT(loadStarted())); - connect(m_Ui->htmlPage, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); - //connect(m_Ui->htmlPage->page(), SIGNAL(linkHovered(const QString &, const QString &, const QString & )), this, SLOT(linkHovered(const QString &, const QString &, const QString & ))); - connect(m_Ui->htmlPage->page(), SIGNAL(linkHovered(const QString &)), this, SLOT(linkHovered(const QString &))); - - language = guiLanguage.isEmpty() ? QString("en") : guiLanguage.left(2); - finalBaseDir = LuminancePaths::HelpDir(); + // m_Ui->htmlPage->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); + // connect(m_Ui->htmlPage, SIGNAL(linkClicked(const QUrl &)), this, + // SLOT(handleExternalLink(const QUrl &))); +#ifdef USE_DEPRECATED_QTWEBKIT + connect(m_Ui->htmlPage, &QWebView::loadStarted, this, + &HelpBrowser::loadStarted); + connect(m_Ui->htmlPage, &QWebView::loadFinished, this, + &HelpBrowser::loadFinished); +#else + connect(m_Ui->htmlPage, &QWebEngineView::loadStarted, this, + &HelpBrowser::loadStarted); + connect(m_Ui->htmlPage, &QWebEngineView::loadFinished, this, + &HelpBrowser::loadFinished); +#endif + // connect(m_Ui->htmlPage->page(), SIGNAL(linkHovered(const QString &, const + // QString &, const QString & )), this, SLOT(linkHovered(const QString &, + // const QString &, const QString & ))); +#ifdef USE_DEPRECATED_QTWEBKIT + connect(m_Ui->htmlPage->page(), &QWebPage::linkHovered, this, + &HelpBrowser::linkHovered); +#else + connect(m_Ui->htmlPage->page(), &QWebEnginePage::linkHovered, this, + &HelpBrowser::linkHovered); +#endif + language = + guiLanguage.isEmpty() ? QStringLiteral("en") : guiLanguage.left(2); + finalBaseDir = LuminancePaths::HelpDir(); qDebug() << finalBaseDir; - m_Ui->htmlPage->setHome( QUrl::fromLocalFile( finalBaseDir + "index.html" )); - menuModel=NULL; + m_Ui->htmlPage->setHome(QUrl::fromLocalFile(finalBaseDir + "index.html")); + menuModel = NULL; loadMenu(); - if (menuModel!=NULL) - { + if (menuModel != NULL) { readBookmarks(); - jumpToHelpSection(jumpToSection, jumpToFile ); + jumpToHelpSection(jumpToSection, jumpToFile); languageChange(); - } - else - { + } else { qDebug("menuModel == NULL"); displayNoHelp(); } } -HelpBrowser::~HelpBrowser() -{ - LuminanceOptions().setValue("HelpBrowserGeometry", saveGeometry()); +HelpBrowser::~HelpBrowser() { + LuminanceOptions().setValue(QStringLiteral("HelpBrowserGeometry"), + saveGeometry()); } -void HelpBrowser::closeEvent(QCloseEvent *) -{ +void HelpBrowser::closeEvent(QCloseEvent *event) { delete menuModel; // no need to delete child widgets, Qt does it all for us @@ -223,13 +232,13 @@ stream << "\n"; stream << "\n"; QTreeWidgetItemIterator it(helpSideBar->m_Ui->bookmarksView); - while (*it) - { - if (bookmarkIndex.contains((*it)->text(0))) - { + while (*it) { + if (bookmarkIndex.contains((*it)->text(0))) { QString pagetitle(bookmarkIndex.value((*it)->text(0)).first); QString filename(bookmarkIndex.value((*it)->text(0)).second); - stream << "\ttext(0) << "\" pagetitle=\"" << pagetitle << "\" url=\"" << filename << "\" />\n"; + stream << "\ttext(0) + << "\" pagetitle=\"" << pagetitle << "\" url=\"" + << filename << "\" />\n"; } ++it; } @@ -246,84 +255,113 @@ stream.setCodec("UTF-8"); stream << "\n"; stream << "\n"; - for (QMap::Iterator it = mHistory.begin() ; it != mHistory.end(); ++it) - stream << "\t\n"; + for (QMap::Iterator it = mHistory.begin(); + it != mHistory.end(); ++it) + stream << "\t\n"; stream << "\n"; stream.flush(); options.setValue(KEY_HELP_HISTORY, ba); } // size -// prefs->set("xsize", width()); -// prefs->set("ysize", height()); + // prefs->set("xsize", width()); + // prefs->set("ysize", height()); emit closed(); + QMainWindow::closeEvent(event); } -void HelpBrowser::setupLocalUI() -{ +void HelpBrowser::setupLocalUI() { helpSideBar = new HelpSideBar(tr("Help SideBar"), this); helpSideBar->setFeatures(QDockWidget::AllDockWidgetFeatures); addDockWidget(Qt::LeftDockWidgetArea, helpSideBar); - histMenu=new QMenu(this); + histMenu = new QMenu(this); m_Ui->goBack->setMenu(histMenu); helpSideBar->m_Ui->listView->header()->hide(); helpSideBar->m_Ui->searchingView->header()->hide(); helpSideBar->m_Ui->bookmarksView->header()->hide(); - //basic ui - connect(m_Ui->filePrint, SIGNAL(triggered()), this, SLOT(print())); - connect(m_Ui->filePrintPreview, SIGNAL(triggered()), this, SLOT(printPreview())); - connect(m_Ui->fileExit, SIGNAL(triggered()), this, SLOT(close())); + // basic ui + connect(m_Ui->filePrint, &QAction::triggered, this, &HelpBrowser::print); + connect(m_Ui->filePrintPreview, &QAction::triggered, this, + &HelpBrowser::printPreview); + connect(m_Ui->fileExit, &QAction::triggered, this, &QWidget::close); connect(m_Ui->editFind, SIGNAL(triggered()), this, SLOT(find())); - connect(m_Ui->editFindNext, SIGNAL(triggered()), this, SLOT(findNext())); - connect(m_Ui->editFindPrev, SIGNAL(triggered()), this, SLOT(findPrevious())); - connect(m_Ui->viewContents, SIGNAL(triggered()), this, SLOT(viewContents_clicked())); - connect(m_Ui->viewSearch, SIGNAL(triggered()), this, SLOT(viewSearch_clicked())); - connect(m_Ui->viewBookmarks, SIGNAL(triggered()), this, SLOT(viewBookmarks_clicked())); - connect(m_Ui->bookAdd, SIGNAL(triggered()), this, SLOT(bookmarkButton_clicked())); - connect(m_Ui->bookDel, SIGNAL(triggered()), this, SLOT(deleteBookmarkButton_clicked())); - connect(m_Ui->bookDelAll, SIGNAL(triggered()), this, SLOT(deleteAllBookmarkButton_clicked())); - connect(m_Ui->goHome, SIGNAL(triggered()), m_Ui->htmlPage, SLOT(home())); - connect(m_Ui->goBack, SIGNAL(triggered()), m_Ui->htmlPage, SLOT(back())); - connect(m_Ui->goFwd, SIGNAL(triggered()), m_Ui->htmlPage, SLOT(forward())); - connect(m_Ui->zoomIn, SIGNAL(triggered()), this, SLOT(zoomIn_clicked())); - connect(m_Ui->zoomOriginal, SIGNAL(triggered()), this, SLOT(zoomOriginal_clicked())); - connect(m_Ui->zoomOut, SIGNAL(triggered()), this, SLOT(zoomOut_clicked())); - connect(histMenu, SIGNAL(triggered(QAction*)), this, SLOT(histChosen(QAction*))); + connect(m_Ui->editFindNext, &QAction::triggered, this, + &HelpBrowser::findNext); + connect(m_Ui->editFindPrev, &QAction::triggered, this, + &HelpBrowser::findPrevious); + connect(m_Ui->viewContents, &QAction::triggered, this, + &HelpBrowser::viewContents_clicked); + connect(m_Ui->viewSearch, &QAction::triggered, this, + &HelpBrowser::viewSearch_clicked); + connect(m_Ui->viewBookmarks, &QAction::triggered, this, + &HelpBrowser::viewBookmarks_clicked); + connect(m_Ui->bookAdd, &QAction::triggered, this, + &HelpBrowser::bookmarkButton_clicked); + connect(m_Ui->bookDel, &QAction::triggered, this, + &HelpBrowser::deleteBookmarkButton_clicked); + connect(m_Ui->bookDelAll, &QAction::triggered, this, + &HelpBrowser::deleteAllBookmarkButton_clicked); + connect(m_Ui->goHome, &QAction::triggered, m_Ui->htmlPage, + &ScTextBrowser::home); +#ifdef USE_DEPRECATED_QTWEBKIT + connect(m_Ui->goBack, &QAction::triggered, m_Ui->htmlPage, + &QWebView::back); + connect(m_Ui->goFwd, &QAction::triggered, m_Ui->htmlPage, + &QWebView::forward); +#else + connect(m_Ui->goBack, &QAction::triggered, m_Ui->htmlPage, + &QWebEngineView::back); + connect(m_Ui->goFwd, &QAction::triggered, m_Ui->htmlPage, + &QWebEngineView::forward); +#endif + connect(m_Ui->zoomIn, &QAction::triggered, this, + &HelpBrowser::zoomIn_clicked); + connect(m_Ui->zoomOriginal, &QAction::triggered, this, + &HelpBrowser::zoomOriginal_clicked); + connect(m_Ui->zoomOut, &QAction::triggered, this, + &HelpBrowser::zoomOut_clicked); + connect(histMenu, &QMenu::triggered, this, &HelpBrowser::histChosen); // searching - connect(helpSideBar->m_Ui->searchingEdit, SIGNAL(returnPressed()), this, SLOT(searchingButton_clicked())); - connect(helpSideBar->m_Ui->searchingButton, SIGNAL(clicked()), this, SLOT(searchingButton_clicked())); - connect(helpSideBar->m_Ui->searchingView, SIGNAL(itemClicked( QTreeWidgetItem *, int)), this, SLOT(itemSearchSelected(QTreeWidgetItem *, int))); + connect(helpSideBar->m_Ui->searchingEdit, &QLineEdit::returnPressed, this, + &HelpBrowser::searchingButton_clicked); + connect(helpSideBar->m_Ui->searchingButton, &QAbstractButton::clicked, this, + &HelpBrowser::searchingButton_clicked); + connect(helpSideBar->m_Ui->searchingView, &QTreeWidget::itemClicked, this, + &HelpBrowser::itemSearchSelected); // bookmarks - connect(helpSideBar->m_Ui->bookmarkButton, SIGNAL(clicked()), this, SLOT(bookmarkButton_clicked())); - connect(helpSideBar->m_Ui->deleteBookmarkButton, SIGNAL(clicked()), this, SLOT(deleteBookmarkButton_clicked())); - connect(helpSideBar->m_Ui->deleteAllBookmarkButton, SIGNAL(clicked()), this, SLOT(deleteAllBookmarkButton_clicked())); - connect(helpSideBar->m_Ui->bookmarksView, SIGNAL(itemClicked( QTreeWidgetItem *, int)), this, SLOT(itemBookmarkSelected(QTreeWidgetItem *, int))); + connect(helpSideBar->m_Ui->bookmarkButton, &QAbstractButton::clicked, this, + &HelpBrowser::bookmarkButton_clicked); + connect(helpSideBar->m_Ui->deleteBookmarkButton, &QAbstractButton::clicked, + this, &HelpBrowser::deleteBookmarkButton_clicked); + connect(helpSideBar->m_Ui->deleteAllBookmarkButton, + &QAbstractButton::clicked, this, + &HelpBrowser::deleteAllBookmarkButton_clicked); + connect(helpSideBar->m_Ui->bookmarksView, &QTreeWidget::itemClicked, this, + &HelpBrowser::itemBookmarkSelected); // links hoover - connect(m_Ui->htmlPage, SIGNAL(overLink(const QString &)), this, SLOT(showLinkContents(const QString &))); + connect(m_Ui->htmlPage, &ScTextBrowser::overLink, this, + &HelpBrowser::showLinkContents); languageChange(); } -void HelpBrowser::showLinkContents(const QString &link) -{ +void HelpBrowser::showLinkContents(const QString &link) { statusBar()->showMessage(link); } -void HelpBrowser::changeEvent(QEvent *e) -{ - if (e->type() == QEvent::LanguageChange) - { +void HelpBrowser::changeEvent(QEvent *e) { + if (e->type() == QEvent::LanguageChange) { languageChange(); } QWidget::changeEvent(e); } -void HelpBrowser::languageChange() -{ - setWindowTitle( tr( "LuminanceHDR Online Help" ) ); +void HelpBrowser::languageChange() { + setWindowTitle(tr("LuminanceHDR Online Help")); m_Ui->fileMenu->setTitle(tr("&File")); m_Ui->editMenu->setTitle(tr("&Edit")); @@ -345,89 +383,93 @@ m_Ui->retranslateUi(this); } -void HelpBrowser::print() -{ - /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser +void HelpBrowser::print() { + /* TODO With this method images aren't loaded so I'm passing the html page + to + a QTextBrowser m_Ui->htmlPage->page()->toHtml([this](const QString &result){ this->m_textBrowser->setHtml(result); this->printAvailable(); }); */ +#ifdef USE_DEPRECATED_QTWEBKIT + m_textBrowser->setSource(m_Ui->htmlPage->url()); +#else m_textBrowser->setSource(m_Ui->htmlPage->page()->url()); +#endif this->printAvailable(); } -void HelpBrowser::printAvailable() -{ +void HelpBrowser::printAvailable() { QPrinter printer; printer.setFullPage(true); QPrintDialog dialog(&printer, this); - if (dialog.exec()) - { - + if (dialog.exec()) { m_textBrowser->print(&printer); } } -void HelpBrowser::printPreview() -{ - /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser +void HelpBrowser::printPreview() { + /* TODO With this method images aren't loaded so I'm passing the html page + to + a QTextBrowser m_Ui->htmlPage->page()->toHtml([this](const QString &result){ this->m_textBrowser->setHtml(result); this->printPreviewAvailable(); }); */ +#ifdef USE_DEPRECATED_QTWEBKIT + m_textBrowser->setSource(m_Ui->htmlPage->url()); +#else m_textBrowser->setSource(m_Ui->htmlPage->page()->url()); +#endif this->printPreviewAvailable(); } -void HelpBrowser::printPreviewAvailable() -{ +void HelpBrowser::printPreviewAvailable() { QPrinter printer; printer.setFullPage(true); QPrintPreviewDialog dialog(&printer, this); - connect(&dialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(paintRequested(QPrinter *))); + connect(&dialog, &QPrintPreviewDialog::paintRequested, this, + &HelpBrowser::paintRequested); dialog.exec(); } -void HelpBrowser::paintRequested(QPrinter *printer) -{ +void HelpBrowser::paintRequested(QPrinter *printer) { m_textBrowser->print(printer); } -void HelpBrowser::searchingButton_clicked() -{ +void HelpBrowser::searchingButton_clicked() { // root files QApplication::changeOverrideCursor(QCursor(Qt::WaitCursor)); searchingInDirectory(finalBaseDir); QApplication::restoreOverrideCursor(); } -void HelpBrowser::searchingInDirectory(const QString& aDir) -{ +void HelpBrowser::searchingInDirectory(const QString &aDir) { QDir dir(QDir::toNativeSeparators(aDir + "/")); QStringList in; - in.append("*.html"); + in.append(QStringLiteral("*.html")); QStringList lst = dir.entryList(in); - for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) - { + for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) { QString fname(aDir + "/" + (*it)); QFile f(fname); - if (f.open(QIODevice::ReadOnly)) - { + if (f.open(QIODevice::ReadOnly)) { QTextStream stream(&f); QString str = stream.readAll(); - int cnt = str.count(helpSideBar->m_Ui->searchingEdit->text(), Qt::CaseInsensitive); - if (cnt > 0) - { - QString fullname = fname; + int cnt = str.count(helpSideBar->m_Ui->searchingEdit->text(), + Qt::CaseInsensitive); + if (cnt > 0) { + // QString fullname = fname; QString toFind(fname.remove(finalBaseDir + "/")); QMapIterator i(quickHelpIndex); - while (i.hasNext()) - { + while (i.hasNext()) { i.next(); - if (i.value()==toFind) - helpSideBar->m_Ui->searchingView->addTopLevelItem(new QTreeWidgetItem(helpSideBar->m_Ui->searchingView, QStringList() << i.key())); + if (i.value() == toFind) + helpSideBar->m_Ui->searchingView->addTopLevelItem( + new QTreeWidgetItem( + helpSideBar->m_Ui->searchingView, + QStringList() << i.key())); } } f.close(); @@ -435,25 +477,23 @@ } // get dirs - ugly recursion in.clear(); - in.append("*"); + in.append(QStringLiteral("*")); QStringList dst = dir.entryList(in, QDir::Dirs); for (QStringList::Iterator it = dst.begin(); it != dst.end(); ++it) - if ((*it)!="." && (*it)!="..") - searchingInDirectory(QDir::toNativeSeparators(aDir + QString((*it)) + "/")); + if ((*it) != QLatin1String(".") && (*it) != QLatin1String("..")) + searchingInDirectory( + QDir::toNativeSeparators(aDir + QString((*it)) + "/")); } -void HelpBrowser::find() -{ - findText = QInputDialog::getText( this, tr("Find"), tr("Search Term:"), QLineEdit::Normal, findText, 0); - if (findText.isNull()) - return; +void HelpBrowser::find() { + findText = QInputDialog::getText(this, tr("Find"), tr("Search Term:"), + QLineEdit::Normal, findText, 0); + if (findText.isNull()) return; findNext(); } -void HelpBrowser::findNext() -{ - if (findText.isNull()) - { +void HelpBrowser::findNext() { + if (findText.isNull()) { find(); return; } @@ -461,10 +501,8 @@ m_Ui->htmlPage->findText(findText, 0); } -void HelpBrowser::findPrevious() -{ - if (findText.isNull()) - { +void HelpBrowser::findPrevious() { + if (findText.isNull()) { find(); return; } @@ -472,76 +510,70 @@ m_Ui->htmlPage->findText(findText); } -void HelpBrowser::bookmarkButton_clicked() -{ +void HelpBrowser::bookmarkButton_clicked() { QString title = m_Ui->htmlPage->title(); QString fname(QDir::cleanPath(m_Ui->htmlPage->url().toLocalFile())); - title = QInputDialog::getText(this, tr("New Bookmark"), tr("New Bookmark's Title:"), QLineEdit::Normal, title, 0); + title = QInputDialog::getText(this, tr("New Bookmark"), + tr("New Bookmark's Title:"), + QLineEdit::Normal, title, 0); // user cancel - if (title.isNull()) - return; - //TODO: start storing full paths - QString toFind(fname.remove(finalBaseDir)); - toFind=toFind.mid(1, toFind.length()-1); + if (title.isNull()) return; + // TODO: start storing full paths + QString toFind(fname.remove(finalBaseDir)); + toFind = toFind.mid(1, toFind.length() - 1); QMapIterator i(quickHelpIndex); - while (i.hasNext()) - { + while (i.hasNext()) { i.next(); - if (i.value()==toFind) - { + if (i.value() == toFind) { bookmarkIndex.insert(title, qMakePair(i.key(), i.value())); - helpSideBar->m_Ui->bookmarksView->addTopLevelItem(new QTreeWidgetItem(helpSideBar->m_Ui->bookmarksView, QStringList() << title)); + helpSideBar->m_Ui->bookmarksView->addTopLevelItem( + new QTreeWidgetItem(helpSideBar->m_Ui->bookmarksView, + QStringList() << title)); } } } -void HelpBrowser::deleteBookmarkButton_clicked() -{ +void HelpBrowser::deleteBookmarkButton_clicked() { QTreeWidgetItem *twi = helpSideBar->m_Ui->bookmarksView->currentItem(); - if (twi!=NULL) - { + if (twi != NULL) { if (bookmarkIndex.contains(twi->text(0))) bookmarkIndex.remove(twi->text(0)); delete twi; } } -void HelpBrowser::deleteAllBookmarkButton_clicked() -{ +void HelpBrowser::deleteAllBookmarkButton_clicked() { bookmarkIndex.clear(); helpSideBar->m_Ui->bookmarksView->clear(); } -void HelpBrowser::histChosen(QAction* i) -{ +void HelpBrowser::histChosen(QAction *i) { if (mHistory.contains(i)) - m_Ui->htmlPage->load( QUrl::fromLocalFile(mHistory[i].url) ); + m_Ui->htmlPage->load(QUrl::fromLocalFile(mHistory[i].url)); } -void HelpBrowser::jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile) -{ +void HelpBrowser::jumpToHelpSection(const QString &jumpToSection, + const QString &jumpToFile) { QString toLoad; - bool noDocs=false; + bool noDocs = false; - if (jumpToFile.isEmpty()) - { - toLoad = finalBaseDir + "/"; //clean this later to handle 5 char locales - if (jumpToSection.isEmpty()) - { - QModelIndex index=menuModel->index(0,1); - if (index.isValid()) - { - helpSideBar->m_Ui->listView->selectionModel()->select(index, QItemSelectionModel::ClearAndSelect); + if (jumpToFile.isEmpty()) { + toLoad = + finalBaseDir + "/"; // clean this later to handle 5 char locales + if (jumpToSection.isEmpty()) { + QModelIndex index = menuModel->index(0, 1); + if (index.isValid()) { + helpSideBar->m_Ui->listView->selectionModel()->select( + index, QItemSelectionModel::ClearAndSelect); toLoad += menuModel->data(index, Qt::DisplayRole).toString(); - //qDebug("jumpToHelpSection %c / %c", finalBaseDir, menuModel->data(index, Qt::DisplayRole).toString()); - } - else - noDocs=true; + // qDebug("jumpToHelpSection %c / %c", finalBaseDir, + // menuModel->data(index, Qt::DisplayRole).toString()); + } else + noDocs = true; } - } - else - toLoad=jumpToFile; + } else + toLoad = jumpToFile; if (!noDocs) loadHelp(toLoad); @@ -549,113 +581,105 @@ displayNoHelp(); } -void HelpBrowser::loadHelp(const QString& filename) -{ +void HelpBrowser::loadHelp(const QString &filename) { struct histd2 his; bool Avail = true; QString toLoad; QFileInfo fi; fi = QFileInfo(filename); - if (fi.fileName().length()>0) - { + if (fi.fileName().length() > 0) { if (fi.exists()) - toLoad=filename; - else - { - toLoad = LuminancePaths::HelpDir() + "index.html"; - language="en"; - //qDebug("Help index: %c", toLoad); + toLoad = filename; + else { + toLoad = LuminancePaths::HelpDir() + "index.html"; + language = QStringLiteral("en"); + // qDebug("Help index: %c", toLoad); fi = QFileInfo(toLoad); - if (!fi.exists()) - { + if (!fi.exists()) { displayNoHelp(); Avail = false; } } - } - else - Avail=false; - if (Avail) - { - m_Ui->htmlPage->load( QUrl::fromLocalFile(toLoad) ); - //m_Ui->htmlPage->page()->setBackgroundColor(QColor(25, 25, 25)); + } else + Avail = false; + if (Avail) { + m_Ui->htmlPage->load(QUrl::fromLocalFile(toLoad)); + // m_Ui->htmlPage->page()->setBackgroundColor(QColor(25, 25, 25)); his.title = m_Ui->htmlPage->title(); - if (his.title.isEmpty()) - his.title = toLoad; + if (his.title.isEmpty()) his.title = toLoad; his.url = toLoad; mHistory[histMenu->addAction(his.title)] = his; } - if (mHistory.count() > 15) - { - QAction* first=histMenu->actions().first(); + if (mHistory.count() > 15) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + QAction *first = histMenu->actions().constFirst(); +#else + QAction *first = histMenu->actions().first(); +#endif mHistory.remove(first); histMenu->removeAction(first); } } -void HelpBrowser::loadMenu() -{ +void HelpBrowser::loadMenu() { QString baseHelpDir(LuminancePaths::HelpDir()); QString baseHelpMenuFile = baseHelpDir + "menu.xml"; QFileInfo baseFi = QFileInfo(baseHelpMenuFile); QString toLoad = baseHelpMenuFile; - finalBaseDir=baseFi.path(); - if (baseFi.exists()) - { - if (menuModel!=NULL) - delete menuModel; - menuModel=new ScHelpTreeModel(toLoad, "Topic", "Location", &quickHelpIndex); + finalBaseDir = baseFi.path(); + if (baseFi.exists()) { + if (menuModel != NULL) delete menuModel; + menuModel = + new ScHelpTreeModel(toLoad, QStringLiteral("Topic"), + QStringLiteral("Location"), &quickHelpIndex); helpSideBar->m_Ui->listView->setModel(menuModel); - helpSideBar->m_Ui->listView->setSelectionMode(QAbstractItemView::SingleSelection); - QItemSelectionModel *selectionModel = new QItemSelectionModel(menuModel); + helpSideBar->m_Ui->listView->setSelectionMode( + QAbstractItemView::SingleSelection); + QItemSelectionModel *selectionModel = + new QItemSelectionModel(menuModel); helpSideBar->m_Ui->listView->setSelectionModel(selectionModel); - connect(helpSideBar->m_Ui->listView->selectionModel(), SIGNAL(selectionChanged( const QItemSelection &, const QItemSelection &)), this, SLOT(itemSelected( const QItemSelection &, const QItemSelection &))); + connect(helpSideBar->m_Ui->listView->selectionModel(), + &QItemSelectionModel::selectionChanged, this, + &HelpBrowser::itemSelected); - helpSideBar->m_Ui->listView->setColumnHidden(1,true); - } - else - { - //qDebug("Help menu does not exist: %c", baseHelpMenuFile); - menuModel=NULL; + helpSideBar->m_Ui->listView->setColumnHidden(1, true); + } else { + // qDebug("Help menu does not exist: %c", baseHelpMenuFile); + menuModel = NULL; } } -void HelpBrowser::readBookmarks() -{ +void HelpBrowser::readBookmarks() { LuminanceOptions options; QByteArray ba(options.value(KEY_HELP_BOOKMARK).toByteArray()); QBuffer buffer(&ba); BookmarkParser2 handler; handler.view = helpSideBar->m_Ui->bookmarksView; - handler.quickHelpIndex=&quickHelpIndex; - handler.bookmarkIndex=&bookmarkIndex; + handler.quickHelpIndex = &quickHelpIndex; + handler.bookmarkIndex = &bookmarkIndex; QXmlInputSource source(&buffer); QXmlSimpleReader reader; reader.setContentHandler(&handler); reader.parse(source); } -void HelpBrowser::setText(const QString& str) -{ - m_Ui->htmlPage->setHtml(str); -} +void HelpBrowser::setText(const QString &str) { m_Ui->htmlPage->setHtml(str); } -void HelpBrowser::itemSelected(const QItemSelection & selected, const QItemSelection & deselected) -{ +void HelpBrowser::itemSelected(const QItemSelection &selected, + const QItemSelection &deselected) { Q_UNUSED(deselected); - QModelIndex index; QModelIndexList items = selected.indexes(); - int i=0; - foreach (index, items) - { - if (i==1) // skip 0, as this is always the rootitem, even if we are selecting the rootitem. hmm - { - QString filename(menuModel->data(index, Qt::DisplayRole).toString()); - if (!filename.isEmpty()) - { + int i = 0; + foreach (const QModelIndex &index, items) { + if (i == 1) // skip 0, as this is always the rootitem, even if we are + // selecting the rootitem. hmm + { + QString filename( + menuModel->data(index, Qt::DisplayRole).toString()); + if (!filename.isEmpty()) { loadHelp(finalBaseDir + "/" + filename); } } @@ -663,16 +687,12 @@ } } -void HelpBrowser::itemSearchSelected(QTreeWidgetItem *twi, int i) -{ +void HelpBrowser::itemSearchSelected(QTreeWidgetItem *twi, int i) { Q_UNUSED(i); - if (!twi) - return; - if (quickHelpIndex.contains(twi->text(0))) - { + if (!twi) return; + if (quickHelpIndex.contains(twi->text(0))) { QString filename(quickHelpIndex.value(twi->text(0))); - if (!filename.isEmpty()) - { + if (!filename.isEmpty()) { loadHelp(finalBaseDir + "/" + filename); findText = helpSideBar->m_Ui->searchingEdit->text(); findNext(); @@ -680,22 +700,21 @@ } } -void HelpBrowser::itemBookmarkSelected(QTreeWidgetItem *twi, int i) -{ +void HelpBrowser::itemBookmarkSelected(QTreeWidgetItem *twi, int i) { Q_UNUSED(i); - if (!twi) - return; - if (bookmarkIndex.contains(twi->text(0))) - { + if (!twi) return; + if (bookmarkIndex.contains(twi->text(0))) { QString filename(bookmarkIndex.value(twi->text(0)).second); - if (!filename.isEmpty()) - loadHelp(finalBaseDir + "/" + filename); + if (!filename.isEmpty()) loadHelp(finalBaseDir + "/" + filename); } } -void HelpBrowser::displayNoHelp() -{ - QString noHelpMsg=tr("

Sorry, no manual is installed!

Please contact your package provider or LuminanceHDR team if you built the application yourself

", "HTML message for no documentation available to show"); +void HelpBrowser::displayNoHelp() { + QString noHelpMsg = + tr("

Sorry, no manual is installed!

Please contact your " + "package provider or LuminanceHDR team if you built the application " + "yourself

", + "HTML message for no documentation available to show"); m_Ui->htmlPage->setHtml(noHelpMsg); @@ -738,8 +757,7 @@ void HelpBrowser::zoomIn_clicked() { zoomFactor *= 1.2; - if (zoomFactor > 46) - zoomFactor = 46.005; + if (zoomFactor > 46) zoomFactor = 46.005; m_Ui->htmlPage->setZoomFactor(zoomFactor); } @@ -750,31 +768,24 @@ void HelpBrowser::zoomOut_clicked() { zoomFactor /= 1.2; - if (zoomFactor < .02) - zoomFactor = .0217; + if (zoomFactor < .02) zoomFactor = .0217; m_Ui->htmlPage->setZoomFactor(zoomFactor); } void HelpBrowser::handleExternalLink(const QUrl &url) { -//TODO: Check whether handling these protocol internally has now been fixed in Windows - if ((url.scheme() == "http") || url.scheme() == "https") { -/* -#ifdef WIN32 - QDesktopServices::openUrl(url); -#else -*/ + if ((url.scheme() == QLatin1String("http")) || + url.scheme() == QLatin1String("https")) { m_Ui->htmlPage->load(url); -//#endif - } - else { + } else { QApplication::restoreOverrideCursor(); - if ( QMessageBox::warning(this, tr("LuminanceHDR - Help Browser"), - tr("This protocol is not handled by the help browser.\n" - "Do you want to open the link with the default application \n" - "associated with the protocol?"), - QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes - ) { - + if (QMessageBox::warning( + this, tr("LuminanceHDR - Help Browser"), + tr("This protocol is not handled by the help browser.\n" + "Do you want to open the link with the default application " + "\n" + "associated with the protocol?"), + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No) == QMessageBox::Yes) { QDesktopServices::openUrl(url); } } @@ -786,9 +797,9 @@ void HelpBrowser::loadFinished(bool) { QApplication::restoreOverrideCursor(); - statusBar()->showMessage(""); + statusBar()->showMessage(QLatin1String("")); } -void HelpBrowser::linkHovered (const QString &url) { +void HelpBrowser::linkHovered(const QString &url) { statusBar()->showMessage(url); } diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/helpbrowser.h luminance-hdr-2.6.0/src/HelpBrowser/helpbrowser.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/helpbrowser.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/helpbrowser.h 2019-06-09 19:18:38.000000000 +0000 @@ -50,6 +50,7 @@ #define HELPBROWSER_H #include +#include #include #include #include @@ -58,12 +59,11 @@ #include #include #include +#include #include #include #include #include -#include -#include //#include #include @@ -82,30 +82,32 @@ }; namespace Ui { - class HelpBrowser; +class HelpBrowser; } -class HelpBrowser : public QMainWindow -{ +class HelpBrowser : public QMainWindow { Q_OBJECT -public: - explicit HelpBrowser(QWidget* parent); - HelpBrowser(QWidget* parent, const QString& caption, const QString& guiLangage="en", const QString& jumpToSection="", const QString& jumpToFile=""); + public: + explicit HelpBrowser(QWidget *parent); + HelpBrowser(QWidget *parent, const QString &caption, + const QString &guiLangage = QStringLiteral("en"), + const QString &jumpToSection = QLatin1String(""), + const QString &jumpToFile = QLatin1String("")); ~HelpBrowser(); - - /*! \brief History menu. It's public because of history reader - separate class */ - QMenu* histMenu; + /*! \brief History menu. It's public because of history reader - separate + * class */ + QMenu *histMenu; /*! \brief Mapping the documents for history. */ - QMap mHistory; + QMap mHistory; /*! \brief Set text to the browser \param str a QString with text (html) */ - void setText(const QString& str); + void setText(const QString &str); -protected: - virtual void changeEvent(QEvent* e); - void closeEvent(QCloseEvent * event); + protected: + virtual void changeEvent(QEvent *e); + void closeEvent(QCloseEvent *event); void setupLocalUI(); /*! \brief Reads saved bookmarks from external file */ @@ -114,38 +116,44 @@ It uses directory-recursion. I hope that the documentation will have only 2-3 level dir structure so it doesn't matter. \author Petr Vanek */ - void searchingInDirectory(const QString&); + void searchingInDirectory(const QString &); /*! \brief Tell the user there is no help available */ void displayNoHelp(); HelpSideBar *helpSideBar; qreal zoomFactor; - //! \brief Selected language is here. If there is no docs for this language, "en" is used. + //! \brief Selected language is here. If there is no docs for this language, + //! "en" is used. QString language; - //! \brief QString holding location of menu.xml we are using, we load the help files from here + //! \brief QString holding location of menu.xml we are using, we load the + //! help + //! files from here QString finalBaseDir; /*! \brief Text to be found in document */ QString findText; - ScHelpTreeModel* menuModel; + ScHelpTreeModel *menuModel; QMap quickHelpIndex; - QMap > bookmarkIndex; + QMap> bookmarkIndex; - // I need to keep this around because page()->toHtml( ) is asynchronous - //QSharedPointer m_textDocument; + // I need to keep this around because page()->toHtml( ) is + // asynchronous + // QSharedPointer m_textDocument; QSharedPointer m_textBrowser; -protected slots: + protected slots: virtual void languageChange(); - void histChosen(QAction* i); - void jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile=""); - void loadHelp(const QString& filename); + void histChosen(QAction *i); + void jumpToHelpSection(const QString &jumpToSection, + const QString &jumpToFile = QLatin1String("")); + void loadHelp(const QString &filename); void loadMenu(); void showLinkContents(const QString &link); /*! \brief Load doc file when user select filename in content view. */ - void itemSelected(const QItemSelection & selected, const QItemSelection & deselected); + void itemSelected(const QItemSelection &selected, + const QItemSelection &deselected); /*! \brief Load doc file when user select filename in search view. */ void itemSearchSelected(QTreeWidgetItem *, int); @@ -215,14 +223,12 @@ /*! \brief Restore Default Cursor */ void loadFinished(bool); - void linkHovered (const QString &); -signals: + void linkHovered(const QString &); + signals: void closed(); -protected: + protected: QScopedPointer m_Ui; - }; -#endif // HELPBROWSER_H - +#endif // HELPBROWSER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/HelpSideBar.cpp luminance-hdr-2.6.0/src/HelpBrowser/HelpSideBar.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/HelpSideBar.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/HelpSideBar.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,22 +21,18 @@ * @author Franco Comida */ -#include "HelpSideBar.h" -#include "ui_HelpSideBar.h" +#include "HelpBrowser/HelpSideBar.h" +#include "HelpBrowser/ui_HelpSideBar.h" -HelpSideBar::HelpSideBar(const QString &title, QWidget *parent, Qt::WindowFlags flags): - QDockWidget(title, parent, flags), - m_Ui(new Ui::HelpSideBar) -{ +HelpSideBar::HelpSideBar(const QString &title, QWidget *parent, + Qt::WindowFlags flags) + : QDockWidget(title, parent, flags), m_Ui(new Ui::HelpSideBar) { m_Ui->setupUi(this); } -HelpSideBar::~HelpSideBar() -{} +HelpSideBar::~HelpSideBar() {} -void HelpSideBar::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) - m_Ui->retranslateUi(this); +void HelpSideBar::changeEvent(QEvent *event) { + if (event->type() == QEvent::LanguageChange) m_Ui->retranslateUi(this); QWidget::changeEvent(event); } diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/HelpSideBar.h luminance-hdr-2.6.0/src/HelpBrowser/HelpSideBar.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/HelpSideBar.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/HelpSideBar.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,21 +27,21 @@ #include namespace Ui { - class HelpSideBar; +class HelpSideBar; } -class HelpSideBar : public QDockWidget -{ -Q_OBJECT +class HelpSideBar : public QDockWidget { + Q_OBJECT -public: - HelpSideBar(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0); + public: + HelpSideBar(const QString &title, QWidget *parent = 0, + Qt::WindowFlags flags = 0); ~HelpSideBar(); -protected: - virtual void changeEvent(QEvent* event); -public: - QScopedPointer m_Ui; + protected: + virtual void changeEvent(QEvent *event); + public: + QScopedPointer m_Ui; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/LuminancePaths.cpp luminance-hdr-2.6.0/src/HelpBrowser/LuminancePaths.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/LuminancePaths.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/LuminancePaths.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,17 +25,16 @@ * */ -#include "LuminancePaths.h" -#include "help-path.hxx" +#include "HelpBrowser/LuminancePaths.h" +#include "HelpBrowser/help-path.hxx" +#include #include #include LuminancePaths *LuminancePaths::instance = 0; -LuminancePaths * LuminancePaths::getThis() -{ - if(!instance) - instance = new LuminancePaths; +LuminancePaths *LuminancePaths::getThis() { + if (!instance) instance = new LuminancePaths; return instance; } @@ -43,52 +42,54 @@ const QString dirsep(QDir::separator()); } -QString LuminancePaths::HelpDir() -{ - if (getThis()->LuminancePathsDB.contains("HelpDir")) { - QString hf = getThis()->LuminancePathsDB["HelpDir"]; - if ( !hf.isEmpty() && QDir(hf).exists() ) { +QString LuminancePaths::HelpDir() { + if (getThis()->LuminancePathsDB.contains(QStringLiteral("HelpDir"))) { + QString hf = getThis()->LuminancePathsDB[QStringLiteral("HelpDir")]; + if (!hf.isEmpty() && QDir(hf).exists()) { return hf; } } -#ifdef Q_OS_MAC - QString hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + "../Resources/help/en" + dirsep); -#elif _WIN32 - QString hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + "help" + dirsep); - // no fall-back -#else // UNIX - // hf = LocalizedDirPath( PREFIX + dirsep + "share" + dirsep + "fontmatrix" + dirsep + "help" + dirsep ); - // hf = LocalizedDirPath("usr" + dirsep + "share" + dirsep + "luminance-hdr" + dirsep + "help" + dirsep); +#ifdef Q_OS_MACOS + QString hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + + "../Resources/help/en" + dirsep); +#elif defined(Q_OS_WIN) + QString hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + + "help" + dirsep); +// no fall-back +#else // UNIX + // hf = LocalizedDirPath( PREFIX + dirsep + "share" + dirsep + "fontmatrix" + // + + // dirsep + "help" + dirsep ); + // hf = LocalizedDirPath("usr" + dirsep + "share" + dirsep + "luminance-hdr" + // + + // dirsep + "help" + dirsep); QString hf = LocalizedDirPath(HELPDIR + dirsep); #endif - getThis()->LuminancePathsDB["HelpDir"] = hf; + getThis()->LuminancePathsDB[QStringLiteral("HelpDir")] = hf; return hf; } -QString LuminancePaths::LocalizedDirPath(const QString & base, const QString& fallback ) -{ - QString sep("_"); +QString LuminancePaths::LocalizedDirPath(const QString &base, + const QString &fallback) { + QString sep(QStringLiteral("_")); QStringList l_c(QLocale::system().name().split(sep)); - QString langcode( l_c.first() ); + QString langcode(l_c.first()); QString countrycode(l_c.last()); QStringList names; - if((!langcode.isEmpty()) || (!countrycode.isEmpty())) - { - names << base + langcode + sep + countrycode ; - names << base + langcode ; + if ((!langcode.isEmpty()) || (!countrycode.isEmpty())) { + names << base + langcode + sep + countrycode; + names << base + langcode; } - names << base + fallback ; - names << base ; + names << base + fallback; + names << base; - foreach(QString t, names) - { + foreach (const QString &t, names) { QDir d(t); - if( d.exists() ) - return d.absolutePath() + QString(QDir::separator()) ; + if (d.exists()) return d.absolutePath() + QString(QDir::separator()); } return QString(); diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/LuminancePaths.h luminance-hdr-2.6.0/src/HelpBrowser/LuminancePaths.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/LuminancePaths.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/LuminancePaths.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,20 +29,20 @@ #ifndef LUMINANCEPATHS_H #define LUMINANCEPATHS_H -#include -#include -#include #include +#include +#include +#include -class LuminancePaths -{ - QMap LuminancePathsDB; - LuminancePaths() {} - static LuminancePaths *instance; - static LuminancePaths *getThis(); +class LuminancePaths { + QMap LuminancePathsDB; + LuminancePaths() {} + static LuminancePaths *instance; + static LuminancePaths *getThis(); - public: - static QString HelpDir(); - static QString LocalizedDirPath(const QString& base, const QString& fallback = QString("en")); + public: + static QString HelpDir(); + static QString LocalizedDirPath( + const QString &base, const QString &fallback = QStringLiteral("en")); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/schelptreemodel.cpp luminance-hdr-2.6.0/src/HelpBrowser/schelptreemodel.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/schelptreemodel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/schelptreemodel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -33,178 +33,180 @@ models. */ -#include #include #include +#include #include "schelptreemodel.h" -ScHelpTreeModel::ScHelpTreeModel(const QString &dataFile, const QString &col1name, const QString &col2name, QMap* indexToBuild, QObject *parent) - : TreeModel(parent) -{ +ScHelpTreeModel::ScHelpTreeModel(const QString &dataFile, + const QString &col1name, + const QString &col2name, + QMap *indexToBuild, + QObject *parent) + : TreeModel(parent) { QList rootData; rootData << col1name << col2name; rootItem = new TreeItem(rootData); - if (!dataFile.isEmpty()) - setupModelData(dataFile, rootItem, indexToBuild); + if (!dataFile.isEmpty()) setupModelData(dataFile, rootItem, indexToBuild); } -void ScHelpTreeModel::setupModelData(const QString &dataFile, TreeItem *parent, QMap* indexToBuild) -{ - QFile file( dataFile ); - if ( !file.open( QIODevice::ReadOnly ) ) - return; - QDomDocument doc( "menuentries" ); - if ( !doc.setContent( &file ) ) - { +void ScHelpTreeModel::setupModelData(const QString &dataFile, TreeItem *parent, + QMap *indexToBuild) { + QFile file(dataFile); + if (!file.open(QIODevice::ReadOnly)) return; + QDomDocument doc(QStringLiteral("menuentries")); + if (!doc.setContent(&file)) { file.close(); return; } file.close(); - QList parents; + QList parents; QList indentations; parents << parent; indentations << 0; QDomElement docElem = doc.documentElement(); QDomNode n = docElem.firstChild(); -// bool haveTutorials=false; + // bool haveTutorials=false; QList columnData; - int position=0; - while( !n.isNull() ) - { - QDomElement e = n.toElement(); // try to convert the node to an element. - if( !e.isNull() ) - { - if (e.hasAttribute( "text" ) && e.hasAttribute( "file" )) - { - QDomAttr textAttr = e.attributeNode( "text" ); - QDomAttr fileAttr = e.attributeNode( "file" ); + int position = 0; + while (!n.isNull()) { + QDomElement e = + n.toElement(); // try to convert the node to an element. + if (!e.isNull()) { + if (e.hasAttribute(QStringLiteral("text")) && + e.hasAttribute(QStringLiteral("file"))) { + QDomAttr textAttr = e.attributeNode(QStringLiteral("text")); + QDomAttr fileAttr = e.attributeNode(QStringLiteral("file")); columnData.clear(); - columnData << textAttr.value() << fileAttr.value(); - if (position > indentations.last()) - { - // The last child of the current parent is now the new parent + columnData << textAttr.value() << fileAttr.value(); + if (position > indentations.last()) { + // The last child of the current parent is now the new + // parent // unless the current parent has no children. - if (parents.last()->childCount() > 0) - { - parents << parents.last()->child(parents.last()->childCount()-1); + if (parents.last()->childCount() > 0) { + parents << parents.last()->child( + parents.last()->childCount() - 1); indentations << position; } - } - else - { - while (position < indentations.last() && parents.count() > 0) { + } else { + while (position < indentations.last() && + parents.count() > 0) { parents.pop_back(); indentations.pop_back(); } } // Append a new item to the current parent's list of children. - parents.last()->appendChild(new TreeItem(columnData, parents.last())); + parents.last()->appendChild( + new TreeItem(columnData, parents.last())); if (indexToBuild) indexToBuild->insert(textAttr.value(), fileAttr.value()); } - QDomNodeList nl=n.childNodes(); - if (nl.count()>0) - position=1; - for(int i=0 ; i<= nl.count() ; i++) - { - QDomNode child=nl.item(i); - if (child.isElement()) - { + QDomNodeList nl = n.childNodes(); + if (nl.count() > 0) position = 1; + for (int i = 0; i <= nl.count(); i++) { + QDomNode child = nl.item(i); + if (child.isElement()) { QDomElement ec = child.toElement(); - if (!ec.isNull()) - { - if (ec.hasAttribute( "text" ) && ec.hasAttribute( "file" )) - { - QDomAttr textAttr = ec.attributeNode( "text" ); - QDomAttr fileAttr = ec.attributeNode( "file" ); + if (!ec.isNull()) { + if (ec.hasAttribute(QStringLiteral("text")) && + ec.hasAttribute(QStringLiteral("file"))) { + QDomAttr textAttr = + ec.attributeNode(QStringLiteral("text")); + QDomAttr fileAttr = + ec.attributeNode(QStringLiteral("file")); columnData.clear(); - columnData << textAttr.value() << fileAttr.value(); - if (position > indentations.last()) - { - // The last child of the current parent is now the new parent + columnData << textAttr.value() << fileAttr.value(); + if (position > indentations.last()) { + // The last child of the current parent is now + // the new parent // unless the current parent has no children. - if (parents.last()->childCount() > 0) - { - parents << parents.last()->child(parents.last()->childCount()-1); + if (parents.last()->childCount() > 0) { + parents << parents.last()->child( + parents.last()->childCount() - 1); indentations << position; } - } - else - { - while (position < indentations.last() && parents.count() > 0) { + } else { + while (position < indentations.last() && + parents.count() > 0) { parents.pop_back(); indentations.pop_back(); } } - // Append a new item to the current parent's list of children. - parents.last()->appendChild(new TreeItem(columnData, parents.last())); + // Append a new item to the current parent's list of + // children. + parents.last()->appendChild( + new TreeItem(columnData, parents.last())); if (indexToBuild) - indexToBuild->insert(textAttr.value(), fileAttr.value()); + indexToBuild->insert(textAttr.value(), + fileAttr.value()); } - //3rd level - QDomNodeList nl2=child.childNodes(); - if (nl2.count()>0) - position=2; - for(int i2=0 ; i2<= nl2.count() ; i2++) - { - QDomNode childchild=nl2.item(i2); - if (childchild.isElement()) - { + // 3rd level + QDomNodeList nl2 = child.childNodes(); + if (nl2.count() > 0) position = 2; + for (int i2 = 0; i2 <= nl2.count(); i2++) { + QDomNode childchild = nl2.item(i2); + if (childchild.isElement()) { QDomElement ecc = childchild.toElement(); - if (!ecc.isNull()) - { - QDomAttr textAttr = ecc.attributeNode( "text" ); - QDomAttr fileAttr = ecc.attributeNode( "file" ); + if (!ecc.isNull()) { + QDomAttr textAttr = ecc.attributeNode( + QStringLiteral("text")); + QDomAttr fileAttr = ecc.attributeNode( + QStringLiteral("file")); columnData.clear(); - columnData << textAttr.value() << fileAttr.value(); - if (position > indentations.last()) - { - // The last child of the current parent is now the new parent - // unless the current parent has no children. - - if (parents.last()->childCount() > 0) - { - parents << parents.last()->child(parents.last()->childCount()-1); + columnData << textAttr.value() + << fileAttr.value(); + if (position > indentations.last()) { + // The last child of the current parent + // is now the new + // parent + // unless the current parent has no + // children. + + if (parents.last()->childCount() > 0) { + parents << parents.last()->child( + parents.last()->childCount() - + 1); indentations << position; } - } - else - { - while (position < indentations.last() && parents.count() > 0) { + } else { + while (position < indentations.last() && + parents.count() > 0) { parents.pop_back(); indentations.pop_back(); } } - // Append a new item to the current parent's list of children. - parents.last()->appendChild(new TreeItem(columnData, parents.last())); + // Append a new item to the current parent's + // list of children. + parents.last()->appendChild(new TreeItem( + columnData, parents.last())); if (indexToBuild) - indexToBuild->insert(textAttr.value(), fileAttr.value()); + indexToBuild->insert(textAttr.value(), + fileAttr.value()); } } } - position=1; + position = 1; } } } - position=0; + position = 0; } n = n.nextSibling(); } } -void ScHelpTreeModel::addRow(const QString& s1, const QString& s2, int /*i*/) -{ - QList parents; +void ScHelpTreeModel::addRow(const QString &s1, const QString &s2, int /*i*/) { + QList parents; QList indentations; parents << rootItem; if (parents.last()->childCount() > 0) - parents << parents.last()->child(parents.last()->childCount()-1); + parents << parents.last()->child(parents.last()->childCount() - 1); QList columnData; - columnData << s1 << s2;// << i; + columnData << s1 << s2; // << i; parents.last()->appendChild(new TreeItem(columnData, parents.last())); } diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/schelptreemodel.h luminance-hdr-2.6.0/src/HelpBrowser/schelptreemodel.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/schelptreemodel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/schelptreemodel.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,26 +30,26 @@ #define SCHELP_TREEMODEL_H #include +#include #include #include -#include #include "treemodel.h" +class ScHelpTreeModel : public TreeModel { + // Q_OBJECT -class ScHelpTreeModel : public TreeModel -{ -// Q_OBJECT - -public: - ScHelpTreeModel(const QString &dataFile, const QString &col1name, const QString &col2name, QMap* indexToBuild, QObject *parent = 0); - ~ScHelpTreeModel() {}; - - void addRow(const QString&, const QString&, int i); - -private: - void setupModelData(const QString &dataFile, TreeItem *parent, QMap* indexToBuild); - + public: + ScHelpTreeModel(const QString &dataFile, const QString &col1name, + const QString &col2name, + QMap *indexToBuild, QObject *parent = 0); + ~ScHelpTreeModel(){}; + + void addRow(const QString &, const QString &, int i); + + private: + void setupModelData(const QString &dataFile, TreeItem *parent, + QMap *indexToBuild); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/sctextbrowser.cpp luminance-hdr-2.6.0/src/HelpBrowser/sctextbrowser.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/sctextbrowser.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/sctextbrowser.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -56,13 +56,11 @@ #include "sctextbrowser.h" -ScTextBrowser::ScTextBrowser( QWidget * parent ) - : QWebEngineView(parent) -{ -} - -void ScTextBrowser::home() -{ - if(m_home.isValid()) - load(m_home); +#ifdef USE_DEPRECATED_QTWEBKIT +ScTextBrowser::ScTextBrowser(QWidget *parent) : QWebView(parent) {} +#else +ScTextBrowser::ScTextBrowser(QWidget *parent) : QWebEngineView (parent) {} +#endif +void ScTextBrowser::home() { + if (m_home.isValid()) load(m_home); } diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/sctextbrowser.h luminance-hdr-2.6.0/src/HelpBrowser/sctextbrowser.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/sctextbrowser.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/sctextbrowser.h 2019-06-09 19:18:38.000000000 +0000 @@ -45,22 +45,30 @@ #define SCTEXTBROWSER_H #include -#include -class ScTextBrowser : public QWebEngineView -{ +#ifdef USE_DEPRECATED_QTWEBKIT +#include +#else +#include +#endif + +#ifdef USE_DEPRECATED_QTWEBKIT +class ScTextBrowser : public QWebView { +#else +class ScTextBrowser : public QWebEngineView { +#endif Q_OBJECT QUrl m_home; - public: - explicit ScTextBrowser( QWidget * parent = 0 ); - void setHome(const QUrl& h){m_home = h;} - signals: - void overLink(const QString &link); + public: + explicit ScTextBrowser(QWidget *parent = 0); + void setHome(const QUrl &h) { m_home = h; } - public slots: - void home(); + signals: + void overLink(const QString &link); + public slots: + void home(); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treeitem.cpp luminance-hdr-2.6.0/src/HelpBrowser/treeitem.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treeitem.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/treeitem.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -36,51 +36,28 @@ #include "treeitem.h" -TreeItem::TreeItem ( const QList &data, TreeItem *parent ) -{ +TreeItem::TreeItem(const QList &data, TreeItem *parent) { parentItem = parent; itemData = data; } -TreeItem::~TreeItem() -{ - qDeleteAll ( childItems ); -} +TreeItem::~TreeItem() { qDeleteAll(childItems); } -void TreeItem::appendChild ( TreeItem *item ) -{ - childItems.append ( item ); -} +void TreeItem::appendChild(TreeItem *item) { childItems.append(item); } -TreeItem *TreeItem::child ( int row ) -{ - return childItems.value ( row ); -} +TreeItem *TreeItem::child(int row) { return childItems.value(row); } -int TreeItem::childCount() const -{ - return childItems.count(); -} +int TreeItem::childCount() const { return childItems.count(); } -int TreeItem::columnCount() const -{ - return itemData.count(); -} +int TreeItem::columnCount() const { return itemData.count(); } -QVariant TreeItem::data ( int column ) const -{ - return itemData.value ( column ); -} +QVariant TreeItem::data(int column) const { return itemData.value(column); } -TreeItem *TreeItem::parent() -{ - return parentItem; -} +TreeItem *TreeItem::parent() { return parentItem; } -int TreeItem::row() const -{ - if ( parentItem ) - return parentItem->childItems.indexOf ( const_cast ( this ) ); +int TreeItem::row() const { + if (parentItem) + return parentItem->childItems.indexOf(const_cast(this)); return 0; } diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treeitem.h luminance-hdr-2.6.0/src/HelpBrowser/treeitem.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treeitem.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/treeitem.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,25 +32,24 @@ #include #include -class TreeItem -{ - public: - TreeItem ( const QList &data, TreeItem *parent = 0 ); - ~TreeItem(); +class TreeItem { + public: + TreeItem(const QList &data, TreeItem *parent = 0); + ~TreeItem(); - void appendChild ( TreeItem *child ); + void appendChild(TreeItem *child); - TreeItem *child ( int row ); - int childCount() const; - int columnCount() const; - QVariant data ( int column ) const; - int row() const; - TreeItem *parent(); + TreeItem *child(int row); + int childCount() const; + int columnCount() const; + QVariant data(int column) const; + int row() const; + TreeItem *parent(); - private: - QList childItems; - QList itemData; - TreeItem *parentItem; + private: + QList childItems; + QList itemData; + TreeItem *parentItem; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treemodel.cpp luminance-hdr-2.6.0/src/HelpBrowser/treemodel.cpp --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treemodel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/treemodel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -38,152 +38,130 @@ #include "treeitem.h" #include "treemodel.h" -TreeModel::TreeModel ( const QString &data, QObject *parent ) - : QAbstractItemModel ( parent ) -{ +TreeModel::TreeModel(const QString &data, QObject *parent) + : QAbstractItemModel(parent) { QList rootData; - rootData << "Title" << "Summary"; - rootItem = new TreeItem ( rootData ); - setupModelData ( data.split ( QString ( "\n" ) ), rootItem ); + rootData << "Title" + << "Summary"; + rootItem = new TreeItem(rootData); + setupModelData(data.split(QStringLiteral("\n")), rootItem); } -TreeModel::~TreeModel() -{ - delete rootItem; -} +TreeModel::~TreeModel() { delete rootItem; } -int TreeModel::columnCount ( const QModelIndex &parent ) const -{ - if ( parent.isValid() ) - return static_cast ( parent.internalPointer() )->columnCount(); +int TreeModel::columnCount(const QModelIndex &parent) const { + if (parent.isValid()) + return static_cast(parent.internalPointer())->columnCount(); else return rootItem->columnCount(); } -QVariant TreeModel::data ( const QModelIndex &index, int role ) const -{ - if ( !index.isValid() ) - return QVariant(); +QVariant TreeModel::data(const QModelIndex &index, int role) const { + if (!index.isValid()) return QVariant(); - if ( role != Qt::DisplayRole ) - return QVariant(); + if (role != Qt::DisplayRole) return QVariant(); - TreeItem *item = static_cast ( index.internalPointer() ); + TreeItem *item = static_cast(index.internalPointer()); - return item->data ( index.column() ); + return item->data(index.column()); } -Qt::ItemFlags TreeModel::flags ( const QModelIndex &index ) const -{ - if ( !index.isValid() ) - return Qt::ItemIsEnabled; +Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const { + if (!index.isValid()) return Qt::ItemIsEnabled; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } -QVariant TreeModel::headerData ( int section, Qt::Orientation orientation, - int role ) const -{ - if ( orientation == Qt::Horizontal && role == Qt::DisplayRole ) - return rootItem->data ( section ); +QVariant TreeModel::headerData(int section, Qt::Orientation orientation, + int role) const { + if (orientation == Qt::Horizontal && role == Qt::DisplayRole) + return rootItem->data(section); return QVariant(); } -QModelIndex TreeModel::index ( int row, int column, const QModelIndex &parent ) -const -{ +QModelIndex TreeModel::index(int row, int column, + const QModelIndex &parent) const { TreeItem *parentItem; - if ( !parent.isValid() ) + if (!parent.isValid()) parentItem = rootItem; else - parentItem = static_cast ( parent.internalPointer() ); + parentItem = static_cast(parent.internalPointer()); - TreeItem *childItem = parentItem->child ( row ); - if ( childItem ) - return createIndex ( row, column, childItem ); + TreeItem *childItem = parentItem->child(row); + if (childItem) + return createIndex(row, column, childItem); else return QModelIndex(); } -QModelIndex TreeModel::parent ( const QModelIndex &index ) const -{ - if ( !index.isValid() ) - return QModelIndex(); +QModelIndex TreeModel::parent(const QModelIndex &index) const { + if (!index.isValid()) return QModelIndex(); - TreeItem *childItem = static_cast ( index.internalPointer() ); + TreeItem *childItem = static_cast(index.internalPointer()); TreeItem *parentItem = childItem->parent(); - if ( parentItem == rootItem ) - return QModelIndex(); + if (parentItem == rootItem) return QModelIndex(); - return createIndex ( parentItem->row(), 0, parentItem ); + return createIndex(parentItem->row(), 0, parentItem); } -int TreeModel::rowCount ( const QModelIndex &parent ) const -{ +int TreeModel::rowCount(const QModelIndex &parent) const { TreeItem *parentItem; - if ( !parent.isValid() ) + if (!parent.isValid()) parentItem = rootItem; else - parentItem = static_cast ( parent.internalPointer() ); + parentItem = static_cast(parent.internalPointer()); return parentItem->childCount(); } -void TreeModel::setupModelData ( const QStringList &lines, TreeItem *parent ) -{ - QList parents; +void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent) { + QList parents; QList indentations; parents << parent; indentations << 0; int number = 0; - while ( number < lines.count() ) - { + while (number < lines.count()) { int position = 0; - while ( position < lines[number].length() ) - { - if ( lines[number].mid ( position, 1 ) != " " ) - break; + while (position < lines[number].length()) { + if (lines[number].mid(position, 1) != QLatin1String(" ")) break; position++; } - QString lineData = lines[number].mid ( position ).trimmed(); + QString lineData = lines[number].mid(position).trimmed(); - if ( !lineData.isEmpty() ) - { + if (!lineData.isEmpty()) { // Read the column data from the rest of the line. - QStringList columnStrings = lineData.split ( "\t", QString::SkipEmptyParts ); + QStringList columnStrings = + lineData.split(QStringLiteral("\t"), QString::SkipEmptyParts); QList columnData; - for ( int column = 0; column < columnStrings.count(); ++column ) + for (int column = 0; column < columnStrings.count(); ++column) columnData << columnStrings[column]; - if ( position > indentations.last() ) - { + if (position > indentations.last()) { // The last child of the current parent is now the new parent // unless the current parent has no children. - if ( parents.last()->childCount() > 0 ) - { - parents << parents.last()->child ( parents.last()->childCount()-1 ); + if (parents.last()->childCount() > 0) { + parents << parents.last()->child( + parents.last()->childCount() - 1); indentations << position; } - } - else - { - while ( position < indentations.last() && parents.count() > 0 ) - { + } else { + while (position < indentations.last() && parents.count() > 0) { parents.pop_back(); indentations.pop_back(); } } // Append a new item to the current parent's list of children. - parents.last()->appendChild ( new TreeItem ( columnData, parents.last() ) ); + parents.last()->appendChild( + new TreeItem(columnData, parents.last())); } number++; diff -Nru luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treemodel.h luminance-hdr-2.6.0/src/HelpBrowser/treemodel.h --- luminance-hdr-2.5.1+dfsg/src/HelpBrowser/treemodel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/HelpBrowser/treemodel.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,31 +33,31 @@ #include #include -#include "treeitem.h" //CB include this here to make subclasses easier +#include "treeitem.h" //CB include this here to make subclasses easier -class TreeModel : public QAbstractItemModel -{ -// Q_OBJECT - - public: - TreeModel ( const QString &data, QObject *parent = 0 ); - explicit TreeModel ( QObject * /*parent = 0*/ ) : rootItem(NULL) {}; //CB Added for ScHelpTreeModel - ~TreeModel(); - - QVariant data ( const QModelIndex &index, int role ) const; - Qt::ItemFlags flags ( const QModelIndex &index ) const; - QVariant headerData ( int section, Qt::Orientation orientation, - int role = Qt::DisplayRole ) const; - QModelIndex index ( int row, int column, - const QModelIndex &parent = QModelIndex() ) const; - QModelIndex parent ( const QModelIndex &index ) const; - int rowCount ( const QModelIndex &parent = QModelIndex() ) const; - int columnCount ( const QModelIndex &parent = QModelIndex() ) const; +class TreeModel : public QAbstractItemModel { + // Q_OBJECT - protected: - void setupModelData ( const QStringList &lines, TreeItem *parent ); + public: + TreeModel(const QString &data, QObject *parent = 0); + explicit TreeModel(QObject * /*parent = 0*/) + : rootItem(NULL){}; // CB Added for ScHelpTreeModel + ~TreeModel(); + + QVariant data(const QModelIndex &index, int role) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + QVariant headerData(int section, Qt::Orientation orientation, + int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, + const QModelIndex &parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex &index) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; - TreeItem *rootItem; + protected: + void setupModelData(const QStringList &lines, TreeItem *parent); + + TreeItem *rootItem; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/helpersse2.h luminance-hdr-2.6.0/src/helpersse2.h --- luminance-hdr-2.5.1+dfsg/src/helpersse2.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/helpersse2.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,558 @@ +//////////////////////////////////////////////////////////////// +// +// this code was taken from http://shibatch.sourceforge.net/ +// Many thanks to the author of original version: Naoki Shibata +// +// This version contains modifications made by Ingo Weyrich +// +//////////////////////////////////////////////////////////////// + +#ifndef __SSE2__ +#error Please specify -msse2. +#endif + +#ifdef __GNUC__ +#define INLINE __inline +#else +#define INLINE inline +#endif + +#include + +#include + +typedef __m128d vdouble; +typedef __m128i vint; +typedef __m128i vmask; + +typedef __m128 vfloat; +typedef __m128i vint2; + +// +#ifdef __GNUC__ +#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) +#define STVFU(x,y) _mm_storeu_ps(&x,y) +#define LVI(x) _mm_load_si128((__m128i*)&x) +#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also need to map the aligned functions to unaligned functions for WIN32 builds +#define LVF(x) _mm_loadu_ps((float*)&x) +#define LVFU(x) _mm_loadu_ps(&x) +#define STVF(x,y) _mm_storeu_ps(&x,y) +#define STVFU(x,y) _mm_storeu_ps(&x,y) +#define LVI(x) _mm_loadu_si128((__m128i*)&x) +#endif +#else +#define LVF(x) _mm_load_ps((float*)&x) +#define LVFU(x) _mm_loadu_ps(&x) +#define STVF(x,y) _mm_store_ps(&x,y) +#define STVFU(x,y) _mm_storeu_ps(&x,y) +#define LVI(x) _mm_load_si128((__m128i*)&x) +#endif + +#if defined(__x86_64__) && defined(__AVX__) +#define PERMUTEPS(a,mask) _mm_permute_ps(a,mask) +#else +#define PERMUTEPS(a,mask) _mm_shuffle_ps(a,a,mask) +#endif + +static INLINE vfloat LC2VFU(float &a) +{ + // Load 8 floats from a and combine a[0],a[2],a[4] and a[6] into a vector of 4 floats + vfloat a1 = _mm_loadu_ps( &a ); + vfloat a2 = _mm_loadu_ps( (&a) + 4 ); + return _mm_shuffle_ps(a1,a2,_MM_SHUFFLE( 2,0,2,0 )); +} + + +// Store a vector of 4 floats in a[0],a[2],a[4] and a[6] +#if defined(__x86_64__) && defined(__SSE4_1__) +// SSE4.1 => use _mm_blend_ps instead of _mm_set_epi32 and vself +#define STC2VFU(a,v) {\ + __m128 TST1V = _mm_loadu_ps(&a);\ + __m128 TST2V = _mm_unpacklo_ps(v,v);\ + _mm_storeu_ps(&a, _mm_blend_ps(TST1V,TST2V,5));\ + TST1V = _mm_loadu_ps((&a)+4);\ + TST2V = _mm_unpackhi_ps(v,v);\ + _mm_storeu_ps((&a)+4, _mm_blend_ps(TST1V,TST2V,5));\ + } +#else +#define STC2VFU(a,v) {\ + __m128 TST1V = _mm_loadu_ps(&a);\ + __m128 TST2V = _mm_unpacklo_ps(v,v);\ + vmask cmask = _mm_set_epi32(0xffffffff,0,0xffffffff,0);\ + _mm_storeu_ps(&a, vself(cmask,TST1V,TST2V));\ + TST1V = _mm_loadu_ps((&a)+4);\ + TST2V = _mm_unpackhi_ps(v,v);\ + _mm_storeu_ps((&a)+4, vself(cmask,TST1V,TST2V));\ + } +#endif + +#define ZEROV _mm_setzero_ps() +#define F2V(a) _mm_set1_ps((a)) + +static INLINE vint vrint_vi_vd(vdouble vd) +{ + return _mm_cvtpd_epi32(vd); +} +static INLINE vint vtruncate_vi_vd(vdouble vd) +{ + return _mm_cvttpd_epi32(vd); +} +static INLINE vdouble vcast_vd_vi(vint vi) +{ + return _mm_cvtepi32_pd(vi); +} +static INLINE vdouble vcast_vd_d(double d) +{ + return _mm_set_pd(d, d); +} +static INLINE vint vcast_vi_i(int i) +{ + return _mm_set_epi32(0, 0, i, i); +} + +static INLINE vmask vreinterpret_vm_vd(vdouble vd) +{ + return (__m128i)vd; +} +static INLINE vdouble vreinterpret_vd_vm(vint vm) +{ + return (__m128d)vm; +} + +static INLINE vmask vreinterpret_vm_vf(vfloat vf) +{ + return (__m128i)vf; +} +static INLINE vfloat vreinterpret_vf_vm(vmask vm) +{ + return (__m128)vm; +} + +// + +static INLINE vfloat vcast_vf_f(float f) +{ + return _mm_set_ps(f, f, f, f); +} + +// Don't use intrinsics here. Newer gcc versions (>= 4.9, maybe also before 4.9) generate better code when not using intrinsics +// example: vaddf(vmulf(a,b),c) will generate an FMA instruction when build for chips with that feature only when vaddf and vmulf don't use intrinsics +static INLINE vfloat vaddf(vfloat x, vfloat y) +{ + return x + y; +} +static INLINE vfloat vsubf(vfloat x, vfloat y) +{ + return x - y; +} +static INLINE vfloat vmulf(vfloat x, vfloat y) +{ + return x * y; +} +static INLINE vfloat vdivf(vfloat x, vfloat y) +{ + return x / y; +} +// Also don't use intrinsic here: Some chips support FMA instructions with 3 and 4 operands +// 3 operands: a = a*b+c, b = a*b+c, c = a*b+c // destination has to be one of a,b,c +// 4 operands: d = a*b+c // destination does not have to be one of a,b,c +// gcc will use the one which fits best when not using intrinsics. With using intrinsics that's not possible +static INLINE vfloat vmlaf(vfloat x, vfloat y, vfloat z) { + return x * y + z; +} +static INLINE vfloat vrecf(vfloat x) +{ + return vdivf(vcast_vf_f(1.0f), x); +} +static INLINE vfloat vsqrtf(vfloat x) +{ + return _mm_sqrt_ps(x); +} +static INLINE vfloat vmaxf(vfloat x, vfloat y) +{ + return _mm_max_ps(x, y); +} +static INLINE vfloat vminf(vfloat x, vfloat y) +{ + return _mm_min_ps(x, y); +} + +// + +static INLINE vdouble vadd(vdouble x, vdouble y) +{ + return _mm_add_pd(x, y); +} +static INLINE vdouble vsub(vdouble x, vdouble y) +{ + return _mm_sub_pd(x, y); +} +static INLINE vdouble vmul(vdouble x, vdouble y) +{ + return _mm_mul_pd(x, y); +} +static INLINE vdouble vdiv(vdouble x, vdouble y) +{ + return _mm_div_pd(x, y); +} +static INLINE vdouble vrec(vdouble x) +{ + return _mm_div_pd(_mm_set_pd(1, 1), x); +} +static INLINE vdouble vsqrt(vdouble x) +{ + return _mm_sqrt_pd(x); +} +static INLINE vdouble vmla(vdouble x, vdouble y, vdouble z) +{ + return vadd(vmul(x, y), z); +} + +static INLINE vdouble vmax(vdouble x, vdouble y) +{ + return _mm_max_pd(x, y); +} +static INLINE vdouble vmin(vdouble x, vdouble y) +{ + return _mm_min_pd(x, y); +} + +static INLINE vdouble vabs(vdouble d) +{ + return (__m128d)_mm_andnot_pd(_mm_set_pd(-0.0, -0.0), d); +} +static INLINE vdouble vneg(vdouble d) +{ + return (__m128d)_mm_xor_pd(_mm_set_pd(-0.0, -0.0), d); +} + +// + +static INLINE vint vaddi(vint x, vint y) +{ + return _mm_add_epi32(x, y); +} +static INLINE vint vsubi(vint x, vint y) +{ + return _mm_sub_epi32(x, y); +} + +static INLINE vint vandi(vint x, vint y) +{ + return _mm_and_si128(x, y); +} +static INLINE vint vandnoti(vint x, vint y) +{ + return _mm_andnot_si128(x, y); +} +static INLINE vint vori(vint x, vint y) +{ + return _mm_or_si128(x, y); +} +static INLINE vint vxori(vint x, vint y) +{ + return _mm_xor_si128(x, y); +} + +static INLINE vint vslli(vint x, int c) +{ + return _mm_slli_epi32(x, c); +} +static INLINE vint vsrli(vint x, int c) +{ + return _mm_srli_epi32(x, c); +} +static INLINE vint vsrai(vint x, int c) +{ + return _mm_srai_epi32(x, c); +} + +// + +static INLINE vmask vandm(vmask x, vmask y) +{ + return _mm_and_si128(x, y); +} +static INLINE vmask vandnotm(vmask x, vmask y) +{ + return _mm_andnot_si128(x, y); +} +static INLINE vmask vorm(vmask x, vmask y) +{ + return _mm_or_si128(x, y); +} +static INLINE vmask vxorm(vmask x, vmask y) +{ + return _mm_xor_si128(x, y); +} +static INLINE vmask vnotm(vmask x) +{ + return _mm_xor_si128(x, _mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())); +} + +static INLINE vmask vmask_eq(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmpeq_pd(x, y); +} +static INLINE vmask vmask_neq(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmpneq_pd(x, y); +} +static INLINE vmask vmask_lt(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmplt_pd(x, y); +} +static INLINE vmask vmask_le(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmple_pd(x, y); +} +static INLINE vmask vmask_gt(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmpgt_pd(x, y); +} +static INLINE vmask vmask_ge(vdouble x, vdouble y) +{ + return (__m128i)_mm_cmpge_pd(x, y); +} + +static INLINE vmask vmaskf_eq(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmpeq_ps(x, y); +} +static INLINE vmask vmaskf_neq(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmpneq_ps(x, y); +} +static INLINE vmask vmaskf_lt(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmplt_ps(x, y); +} +static INLINE vmask vmaskf_le(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmple_ps(x, y); +} +static INLINE vmask vmaskf_gt(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmpgt_ps(x, y); +} +static INLINE vmask vmaskf_ge(vfloat x, vfloat y) +{ + return (__m128i)_mm_cmpge_ps(x, y); +} + + +static INLINE vmask vmaski_eq(vint x, vint y) +{ + __m128 s = (__m128)_mm_cmpeq_epi32(x, y); + return (__m128i)_mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 0, 0)); +} + +static INLINE vdouble vsel(vmask mask, vdouble x, vdouble y) +{ + return (__m128d)vorm(vandm(mask, (__m128i)x), vandnotm(mask, (__m128i)y)); +} + +static INLINE vint vseli_lt(vdouble d0, vdouble d1, vint x, vint y) +{ + vmask mask = (vmask)_mm_cmpeq_ps(_mm_cvtpd_ps((vdouble)vmask_lt(d0, d1)), _mm_set_ps(0, 0, 0, 0)); + return vori(vandnoti(mask, x), vandi(mask, y)); +} + +// + +static INLINE vint2 vcast_vi2_vm(vmask vm) +{ + return (vint2)vm; +} +static INLINE vmask vcast_vm_vi2(vint2 vi) +{ + return (vmask)vi; +} + +static INLINE vint2 vrint_vi2_vf(vfloat vf) +{ + return _mm_cvtps_epi32(vf); +} +static INLINE vint2 vtruncate_vi2_vf(vfloat vf) +{ + return _mm_cvttps_epi32(vf); +} +static INLINE vfloat vcast_vf_vi2(vint2 vi) +{ + return _mm_cvtepi32_ps(vcast_vm_vi2(vi)); +} +static INLINE vint2 vcast_vi2_i(int i) +{ + return _mm_set_epi32(i, i, i, i); +} + +static INLINE vint2 vaddi2(vint2 x, vint2 y) +{ + return vaddi(x, y); +} +static INLINE vint2 vsubi2(vint2 x, vint2 y) +{ + return vsubi(x, y); +} + +static INLINE vint2 vandi2(vint2 x, vint2 y) +{ + return vandi(x, y); +} +static INLINE vint2 vandnoti2(vint2 x, vint2 y) +{ + return vandnoti(x, y); +} +static INLINE vint2 vori2(vint2 x, vint2 y) +{ + return vori(x, y); +} +static INLINE vint2 vxori2(vint2 x, vint2 y) +{ + return vxori(x, y); +} + +static INLINE vint2 vslli2(vint2 x, int c) +{ + return vslli(x, c); +} +static INLINE vint2 vsrli2(vint2 x, int c) +{ + return vsrli(x, c); +} +static INLINE vint2 vsrai2(vint2 x, int c) +{ + return vsrai(x, c); +} + +static INLINE vmask vmaski2_eq(vint2 x, vint2 y) +{ + return _mm_cmpeq_epi32(x, y); +} +static INLINE vint2 vseli2(vmask m, vint2 x, vint2 y) +{ + return vorm(vandm(m, x), vandnotm(m, y)); +} + +// + +static INLINE double vcast_d_vd(vdouble v) +{ + double s[2]; + _mm_storeu_pd(s, v); + return s[0]; +} + +static INLINE float vcast_f_vf(vfloat v) +{ + float s[4]; + _mm_storeu_ps(s, v); + return s[0]; +} + +static INLINE vmask vsignbit(vdouble d) +{ + return _mm_and_si128((__m128i)d, _mm_set_epi32(0x80000000, 0x0, 0x80000000, 0x0)); +} + +static INLINE vdouble vsign(vdouble d) +{ + return (__m128d)_mm_or_si128((__m128i)_mm_set_pd(1, 1), _mm_and_si128((__m128i)d, _mm_set_epi32(0x80000000, 0x0, 0x80000000, 0x0))); +} + +static INLINE vdouble vmulsign(vdouble x, vdouble y) +{ + return (__m128d)vxori((__m128i)x, vsignbit(y)); +} + +static INLINE vmask vmask_isinf(vdouble d) +{ + return (vmask)_mm_cmpeq_pd(vabs(d), _mm_set_pd(INFINITY, INFINITY)); +} + +static INLINE vmask vmask_ispinf(vdouble d) +{ + return (vmask)_mm_cmpeq_pd(d, _mm_set_pd(INFINITY, INFINITY)); +} + +static INLINE vmask vmask_isminf(vdouble d) +{ + return (vmask)_mm_cmpeq_pd(d, _mm_set_pd(-INFINITY, -INFINITY)); +} + +static INLINE vmask vmask_isnan(vdouble d) +{ + return (vmask)_mm_cmpneq_pd(d, d); +} + +static INLINE vdouble visinf(vdouble d) +{ + return (__m128d)_mm_and_si128(vmask_isinf(d), _mm_or_si128(vsignbit(d), (__m128i)_mm_set_pd(1, 1))); +} + +static INLINE vdouble visinf2(vdouble d, vdouble m) +{ + return (__m128d)_mm_and_si128(vmask_isinf(d), _mm_or_si128(vsignbit(d), (__m128i)m)); +} + +// + +static INLINE vdouble vpow2i(vint q) +{ + q = _mm_add_epi32(_mm_set_epi32(0x0, 0x0, 0x3ff, 0x3ff), q); + q = (__m128i)_mm_shuffle_ps((__m128)q, (__m128)q, _MM_SHUFFLE(1, 3, 0, 3)); + return (__m128d)_mm_slli_epi32(q, 20); +} + +static INLINE vdouble vldexp(vdouble x, vint q) +{ + vint m = _mm_srai_epi32(q, 31); + m = _mm_slli_epi32(_mm_sub_epi32(_mm_srai_epi32(_mm_add_epi32(m, q), 9), m), 7); + q = _mm_sub_epi32(q, _mm_slli_epi32(m, 2)); + vdouble y = vpow2i(m); + return vmul(vmul(vmul(vmul(vmul(x, y), y), y), y), vpow2i(q)); +} + +static INLINE vint vilogbp1(vdouble d) +{ + vint m = vmask_lt(d, vcast_vd_d(4.9090934652977266E-91)); + d = vsel(m, vmul(vcast_vd_d(2.037035976334486E90), d), d); + __m128i q = _mm_and_si128((__m128i)d, _mm_set_epi32(((1 << 12) - 1) << 20, 0, ((1 << 12) - 1) << 20, 0)); + q = _mm_srli_epi32(q, 20); + q = vorm(vandm (m, _mm_sub_epi32(q, _mm_set_epi32(300 + 0x3fe, 0, 300 + 0x3fe, 0))), + vandnotm(m, _mm_sub_epi32(q, _mm_set_epi32( 0x3fe, 0, 0x3fe, 0)))); + q = (__m128i)_mm_shuffle_ps((__m128)q, (__m128)q, _MM_SHUFFLE(0, 0, 3, 1)); + return q; +} + +static INLINE vdouble vupper(vdouble d) +{ + return (__m128d)_mm_and_si128((__m128i)d, _mm_set_epi32(0xffffffff, 0xf8000000, 0xffffffff, 0xf8000000)); +} + +// + +typedef struct { + vdouble x, y; +} vdouble2; + +static INLINE vdouble2 dd(vdouble h, vdouble l) +{ + vdouble2 ret = {h, l}; + return ret; +} + +static INLINE vdouble2 vsel2(vmask mask, vdouble2 x, vdouble2 y) +{ + return dd((__m128d)vorm(vandm(mask, (__m128i)x.x), vandnotm(mask, (__m128i)y.x)), + (__m128d)vorm(vandm(mask, (__m128i)x.y), vandnotm(mask, (__m128i)y.y))); +} + +static INLINE vdouble2 abs_d(vdouble2 x) +{ + return dd((__m128d)_mm_xor_pd(_mm_and_pd(_mm_set_pd(-0.0, -0.0), x.x), x.x), + (__m128d)_mm_xor_pd(_mm_and_pd(_mm_set_pd(-0.0, -0.0), x.x), x.y)); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d_fwd.h luminance-hdr-2.6.0/src/Libpfs/array2d_fwd.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d_fwd.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/array2d_fwd.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,13 +24,12 @@ #ifndef PFS_ARRAY2D_FWD_H #define PFS_ARRAY2D_FWD_H -namespace pfs -{ +namespace pfs { template class Array2D; //! \brief typedef provided for backward compatibility with the old API typedef Array2D Array2Df; -} // namespace pfs +} // namespace pfs #endif /* PFS_ARRAY2D_FWD_H */ diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d.h luminance-hdr-2.6.0/src/Libpfs/array2d.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/array2d.h 2019-06-09 19:18:38.000000000 +0000 @@ -22,10 +22,10 @@ #ifndef PFS_ARRAY2D_H #define PFS_ARRAY2D_H -#include +#include #include +#include #include -#include #include @@ -36,8 +36,7 @@ //! is inspired by the one in PFSTOOLS, but they are now quite different and //! most likely, not compatible -namespace pfs -{ +namespace pfs { //! //! \brief Two dimensional array of data //! @@ -47,26 +46,25 @@ //! direct access to the data (using getRawData() or data()). //! template -class Array2D -{ -public: - typedef std::vector DataBuffer; - typedef typename DataBuffer::value_type value_type; - typedef Array2D self; +class Array2D { + public: + typedef std::vector DataBuffer; + typedef typename DataBuffer::value_type value_type; + typedef Array2D self; //! \brief default constructor - empty \c Array2D Array2D(); //! \brief init \c Array2D with a matrix of \a cols times \a rows - Array2D(size_t cols, size_t rows); // (width, height) + Array2D(size_t cols, size_t rows); // (width, height) //! \brief copy ctor //! \note If you want to build an empty \c Array2D with the same size of the //! source, use the ctor that takes dimension and you will spare the copy - Array2D(const self& rhs); + Array2D(const self &rhs); //! \brief assignment operator (always performs deep copy) - self& operator=(const self& other); + self &operator=(const self &other); //! \brief virtual destructor virtual ~Array2D() {} @@ -78,8 +76,8 @@ //! \param col number of a column (x) within the range [0, getCols()-1) //! \param row number of a row (y) within the range [0,getRows()-1) //! - Type& operator()( size_t cols, size_t rows ); - const Type& operator()( size_t cols, size_t rows ) const; + Type &operator()(size_t cols, size_t rows); + const Type &operator()(size_t cols, size_t rows) const; //! Access an element of the array. This method mocks the subscript operator //! in a vector class @@ -87,98 +85,92 @@ //! \param index index of an element within the range //! [0, etCols()*getRows()-1) //! - Type& operator()( size_t index ); - const Type& operator()( size_t index ) const; + Type &operator()(size_t index); + const Type &operator()(size_t index) const; //! \brief Get number of columns or, in case of an image, width. - size_t getCols() const { return m_cols; } + size_t getCols() const { return m_cols; } //! \brief Get number of rows or, in case of an image, height. - size_t getRows() const { return m_rows; } + size_t getRows() const { return m_rows; } - size_t size() const { return m_rows*m_cols; } + size_t size() const { return m_rows * m_cols; } void resize(size_t width, size_t height); //! \brief Direct access to the raw data - Type* data() { return m_data.data(); } + Type *data() { return m_data.data(); } //! \brief Direct access to the raw data - const Type* data() const { return m_data.data(); } + const Type *data() const { return m_data.data(); } //! \brief fill the entire vector data to the value "value" - void fill(const Type& value); + void fill(const Type &value); //! \brief fill the entire vector data with the default value for \c Type void reset(); //! \brief Swap the content of the current instance with \a other - void swap(self& other); + void swap(self &other); -public: + public: // element/row iterator - typedef typename DataBuffer::iterator iterator; + typedef typename DataBuffer::iterator iterator; typedef typename DataBuffer::const_iterator const_iterator; - iterator begin() - { return m_data.begin(); } - iterator end() - { return m_data.begin() + size(); } - - const_iterator begin() const - { return m_data.begin(); } - const_iterator end() const - { return m_data.begin() + size(); } - - iterator row_begin(size_t r) - { return m_data.begin() + r*m_cols; } - iterator row_end(size_t r) - { return m_data.begin() + (r+1)*m_cols; } - - const_iterator row_begin(size_t r) const - { return m_data.begin() + r*m_cols; } - const_iterator row_end(size_t r) const - { return m_data.begin() + (r+1)*m_cols; } + iterator begin() { return m_data.begin(); } + iterator end() { return m_data.begin() + size(); } + + const_iterator begin() const { return m_data.begin(); } + const_iterator end() const { return m_data.begin() + size(); } + + iterator row_begin(size_t r) { return m_data.begin() + r * m_cols; } + iterator row_end(size_t r) { return m_data.begin() + (r + 1) * m_cols; } + + const_iterator row_begin(size_t r) const { + return m_data.begin() + r * m_cols; + } + const_iterator row_end(size_t r) const { + return m_data.begin() + (r + 1) * m_cols; + } //! \brief subscript operators, returns the row \a n - iterator operator[](size_t n) - { return row_begin(n); } - const_iterator operator[](size_t n) const - { return row_begin(n); } + iterator operator[](size_t n) { return row_begin(n); } + const_iterator operator[](size_t n) const { return row_begin(n); } // column iterator typedef StrideIterator col_iterator; typedef StrideIterator const_col_iterator; - col_iterator col_begin(size_t n) - { return col_iterator(begin() + n, getCols()); } - col_iterator col_end(size_t n) - { return col_begin(n) + getCols(); } - - const_col_iterator col_begin(size_t n) const - { return const_col_iterator(begin() + n, getCols()); } - const_col_iterator col_end(size_t n) const - { return col_begin(n) + getCols(); } + col_iterator col_begin(size_t n) { + return col_iterator(begin() + n, getCols()); + } + col_iterator col_end(size_t n) { return col_begin(n) + getCols(); } + + const_col_iterator col_begin(size_t n) const { + return const_col_iterator(begin() + n, getCols()); + } + const_col_iterator col_end(size_t n) const { + return col_begin(n) + getCols(); + } -private: + private: DataBuffer m_data; - size_t m_cols; - size_t m_rows; + size_t m_cols; + size_t m_rows; }; //! \brief typedef provided for backward compatibility with the old API typedef ::pfs::Array2D Array2Df; -} // namespace pfs +} // namespace pfs -namespace std -{ -template -void swap(::pfs::Array2D& a, ::pfs::Array2D& b) -{ +namespace std { +template +void swap(::pfs::Array2D &a, ::pfs::Array2D &b) { a.swap(b); } -} // namespace std +} // namespace std #include -#endif // PFS_ARRAY2D_H +#endif // PFS_ARRAY2D_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d.hxx luminance-hdr-2.6.0/src/Libpfs/array2d.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/array2d.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/array2d.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -27,8 +27,8 @@ //! \author Davide Anastasia //! \note This class is different then the one in the PFSTOOLS -#include #include +#include #include #include @@ -38,33 +38,22 @@ namespace pfs { template -Array2D::Array2D() - : m_data() - , m_cols(0) - , m_rows(0) -{} +Array2D::Array2D() : m_data(), m_cols(0), m_rows(0) {} template Array2D::Array2D(size_t cols, size_t rows) - : m_data(cols*rows) - , m_cols(cols) - , m_rows(rows) -{ - assert( m_data.size() >= m_cols*m_rows); + : m_data(cols * rows), m_cols(cols), m_rows(rows) { + assert(m_data.size() >= m_cols * m_rows); } template -Array2D::Array2D(const self& rhs) - : m_data(rhs.m_data) - , m_cols(rhs.m_cols) - , m_rows(rhs.m_rows) -{ - assert( m_data.size() >= m_cols*m_rows); +Array2D::Array2D(const self &rhs) + : m_data(rhs.m_data), m_cols(rhs.m_cols), m_rows(rhs.m_rows) { + assert(m_data.size() >= m_cols * m_rows); } template -Array2D& Array2D::operator=(const Array2D& other) -{ +Array2D &Array2D::operator=(const Array2D &other) { using std::swap; Array2D newState(other); @@ -74,79 +63,67 @@ } template -void Array2D::resize(size_t width, size_t height) -{ - m_data.resize( width*height ); +void Array2D::resize(size_t width, size_t height) { + m_data.resize(width * height); m_cols = width; m_rows = height; - assert( m_data.size() >= m_cols*m_rows); + assert(m_data.size() >= m_cols * m_rows); } template -void Array2D::swap(self& other) -{ +void Array2D::swap(self &other) { std::swap(m_cols, other.m_cols); std::swap(m_rows, other.m_rows); std::swap(m_data, other.m_data); } template -inline -Type& Array2D::operator()(size_t cols, size_t rows) -{ +inline Type &Array2D::operator()(size_t cols, size_t rows) { #ifndef NDEBUG - return m_data.at( rows*m_cols + cols ); + return m_data.at(rows * m_cols + cols); #else - return m_data[ rows*m_cols + cols ]; + return m_data[rows * m_cols + cols]; #endif } template -inline -const Type& Array2D::operator()( size_t cols, size_t rows ) const -{ +inline const Type &Array2D::operator()(size_t cols, size_t rows) const { #ifndef NDEBUG - return m_data.at( rows*m_cols + cols ); + return m_data.at(rows * m_cols + cols); #else - return m_data[ rows*m_cols + cols ]; + return m_data[rows * m_cols + cols]; #endif } template -inline -Type& Array2D::operator()( size_t index ) -{ +inline Type &Array2D::operator()(size_t index) { #ifndef NDEBUG - return m_data.at( index ); + return m_data.at(index); #else return m_data[index]; #endif } template -inline -const Type& Array2D::operator()( size_t index ) const -{ +inline const Type &Array2D::operator()(size_t index) const { #ifndef NDEBUG - return m_data.at( index ); + return m_data.at(index); #else return m_data[index]; #endif } template -void Array2D::fill(const Type& value) -{ +void Array2D::fill(const Type &value) { std::fill(m_data.begin(), m_data.end(), value); } template -void Array2D::reset() -{ +void Array2D::reset() { std::fill(m_data.begin(), m_data.end(), Type()); } -} // Libpfs +} // Libpfs -#endif // PFS_ARRAY2D_HXX +#endif // PFS_ARRAY2D_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.cpp luminance-hdr-2.6.0/src/Libpfs/channel.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/channel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -30,16 +30,9 @@ namespace pfs { -Channel::Channel( size_t width, size_t height, const std::string& channelName) - : ChannelData( width, height ) - , m_name( channelName ) - , m_tags() -{} - -Channel::~Channel() -{} - -} // pfs - +Channel::Channel(size_t width, size_t height, const std::string &channelName) + : ChannelData(width, height), m_name(channelName), m_tags() {} +Channel::~Channel() {} +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.h luminance-hdr-2.6.0/src/Libpfs/channel.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/channel.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,9 +27,9 @@ #ifndef PFS_CHANNEL_H #define PFS_CHANNEL_H -#include -#include #include +#include +#include #include #include @@ -38,12 +38,11 @@ //! \brief Channel interface represents a 2D rectangular array with //! associated tags. -class Channel : public Array2D -{ -public: +class Channel : public Array2D { + public: typedef Array2D ChannelData; - Channel(size_t width, size_t height, const std::string& channelName); + Channel(size_t width, size_t height, const std::string &channelName); virtual ~Channel(); @@ -69,19 +68,18 @@ //! Gets name of the channel. //! - const std::string& getName() const; + const std::string &getName() const; -// //! \brief return handler to the underlying data -// inline ChannelData* getChannelData(); -// inline const ChannelData* getChannelData() const; - -private: - std::string m_name; - TagContainer m_tags; + // //! \brief return handler to the underlying data + // inline ChannelData* getChannelData(); + // inline const ChannelData* getChannelData() const; + + private: + std::string m_name; + TagContainer m_tags; }; -} // namespace pfs +} // namespace pfs #include -#endif // PFS_CHANNEL_H - +#endif // PFS_CHANNEL_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.hxx luminance-hdr-2.6.0/src/Libpfs/channel.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/channel.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/channel.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -29,21 +29,16 @@ namespace pfs { -inline const std::string& Channel::getName() const -{ return m_name; } +inline const std::string &Channel::getName() const { return m_name; } -inline size_t Channel::getWidth() const -{ return getCols(); } +inline size_t Channel::getWidth() const { return getCols(); } -inline size_t Channel::getHeight() const -{ return getRows(); } +inline size_t Channel::getHeight() const { return getRows(); } -inline TagContainer& Channel::getTags() -{ return m_tags; } +inline TagContainer &Channel::getTags() { return m_tags; } -inline const TagContainer& Channel::getTags() const -{ return m_tags; } +inline const TagContainer &Channel::getTags() const { return m_tags; } -} // pfs +} // pfs -#endif // PFS_CHANNEL_HXX +#endif // PFS_CHANNEL_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/CMakeLists.txt luminance-hdr-2.6.0/src/Libpfs/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Libpfs/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -11,8 +11,8 @@ ADD_SUBDIRECTORY(colorspace) ADD_SUBDIRECTORY(io) -ADD_LIBRARY(pfs ${LIBPFS_H} ${LIBPFS_HXX} ${LIBPFS_CPP}) -qt5_use_modules(pfs Core Gui Widgets) +ADD_LIBRARY(pfs STATIC ${LIBPFS_H} ${LIBPFS_HXX} ${LIBPFS_CPP}) +TARGET_LINK_LIBRARIES(pfs Qt5::Core Qt5::Gui Qt5::Widgets) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} pfs PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} pfs PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/cmyk.h luminance-hdr-2.6.0/src/Libpfs/colorspace/cmyk.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/cmyk.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/cmyk.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,35 +34,36 @@ struct ConvertInvertedCMYK2RGB { //! \brief template - void operator()(TypeIn c, TypeIn m, TypeIn y, TypeIn k, - TypeOut& r, TypeOut& g, TypeOut& b) const - { + void operator()(TypeIn c, TypeIn m, TypeIn y, TypeIn k, TypeOut &r, + TypeOut &g, TypeOut &b) const { float c_ = ConvertSample()(c); float m_ = ConvertSample()(m); float y_ = ConvertSample()(y); float k_ = ConvertSample()(k); - r = ConvertSample()(c_*k_); - g = ConvertSample()(m_*k_); - b = ConvertSample()(y_*k_); + r = ConvertSample()(c_ * k_); + g = ConvertSample()(m_ * k_); + b = ConvertSample()(y_ * k_); } }; struct ConvertCMYK2RGB { //! \brief template - void operator()(TypeIn c, TypeIn m, TypeIn y, TypeIn k, - TypeOut& r, TypeOut& g, TypeOut& b) const - { + void operator()(TypeIn c, TypeIn m, TypeIn y, TypeIn k, TypeOut &r, + TypeOut &g, TypeOut &b) const { float K = (1.f - ConvertSample()(k)); - r = ConvertSample()((1.f - ConvertSample()(c))*K); - g = ConvertSample()((1.f - ConvertSample()(m))*K); - b = ConvertSample()((1.f - ConvertSample()(y))*K); + r = ConvertSample()( + (1.f - ConvertSample()(c)) * K); + g = ConvertSample()( + (1.f - ConvertSample()(m)) * K); + b = ConvertSample()( + (1.f - ConvertSample()(y)) * K); } }; -} // colorspace -} // pfs +} // colorspace +} // pfs -#endif // PFS_COLORSPACE_CMYK_H +#endif // PFS_COLORSPACE_CMYK_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/colorspace.cpp luminance-hdr-2.6.0/src/Libpfs/colorspace/colorspace.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/colorspace.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/colorspace.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,7 +23,8 @@ * @author Rafal Mantiuk, * * @author Davide Anastasia (2010 10 13) - * Reimplementation of most of the functions (in particular the ones involving RGB and XYZ) + * Reimplementation of most of the functions (in particular the ones involving + * RGB and XYZ) * * $Id: colorspace.cpp,v 1.6 2007/07/18 08:49:25 rafm Exp $ */ @@ -31,18 +32,18 @@ #include "colorspace.h" #include +#include #include #include -#include -#include "Libpfs/pfs.h" #include "Libpfs/array2d.h" +#include "Libpfs/pfs.h" #include "Libpfs/utils/msec_timer.h" -#include "Libpfs/utils/transform.h" #include "Libpfs/colorspace/rgb.h" #include "Libpfs/colorspace/xyz.h" #include "Libpfs/colorspace/yuv.h" +#include "Libpfs/utils/transform.h" #include @@ -54,9 +55,9 @@ //----------------------------------------------------------- // sRGB conversion functions //----------------------------------------------------------- -void transformSRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3) -{ +void transformSRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -68,13 +69,12 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformSRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformSRGB2XYZ() = " << f_timer.get_time() << " msec" + << std::endl; #endif - } -void transformSRGB2Y(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1) -{ +void transformSRGB2Y(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1) { utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), outC1->begin(), colorspace::ConvertSRGB2Y()); } @@ -82,9 +82,9 @@ //----------------------------------------------------------- // RGB conversion functions //----------------------------------------------------------- -void transformRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3) -{ +void transformRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -96,20 +96,20 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformRGB2XYZ() = " << f_timer.get_time() << " msec" + << std::endl; #endif } -void transformRGB2Y(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1) -{ +void transformRGB2Y(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1) { utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), outC1->begin(), colorspace::ConvertRGB2Y()); } -void transformRGB2Yuv(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3) -{ +void transformRGB2Yuv(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -121,13 +121,14 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformRGB2Yuv() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformRGB2Yuv() = " << f_timer.get_time() << " msec" + << std::endl; #endif } -void transformXYZ2SRGB(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3) -{ +void transformXYZ2SRGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -139,13 +140,14 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformXYZ2SRGB() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformXYZ2SRGB() = " << f_timer.get_time() << " msec" + << std::endl; #endif } -void transformXYZ2RGB(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ +void transformXYZ2RGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -157,53 +159,51 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformXYZ2RGB() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformXYZ2RGB() = " << f_timer.get_time() << " msec" + << std::endl; #endif } -void transformXYZ2Yuv( const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ - const int elems = inC1->getRows()*inC1->getCols(); - for ( int idx = 0; idx < elems; idx++ ) - { +void transformXYZ2Yuv(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { + const int elems = inC1->getRows() * inC1->getCols(); + for (int idx = 0; idx < elems; idx++) { const float &X = (*inC1)(idx), Y = (*inC2)(idx), &Z = (*inC3)(idx); float &outY = (*outC1)(idx), &u = (*outC2)(idx), &v = (*outC3)(idx); - float x = X/(X+Y+Z); - float y = Y/(X+Y+Z); + float x = X / (X + Y + Z); + float y = Y / (X + Y + Z); // assert((4.f*nx / (-2.f*nx + 12.f*ny + 3.f)) <= 0.62 ); // assert( (9.f*ny / (-2.f*nx + 12.f*ny + 3.f)) <= 0.62 ); - u = 4.f*x / (-2.f*x + 12.f*y + 3.f); - v = 9.f*y / (-2.f*x + 12.f*y + 3.f); + u = 4.f * x / (-2.f * x + 12.f * y + 3.f); + v = 9.f * y / (-2.f * x + 12.f * y + 3.f); outY = Y; } - } -void transformYuv2XYZ( const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ - const int elems = inC1->getRows()*inC1->getCols(); - for( int idx = 0; idx < elems ; idx++ ) - { +void transformYuv2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { + const int elems = inC1->getRows() * inC1->getCols(); + for (int idx = 0; idx < elems; idx++) { const float Y = (*inC1)(idx), &u = (*inC2)(idx), &v = (*inC3)(idx); float &X = (*outC1)(idx), &outY = (*outC2)(idx), &Z = (*outC3)(idx); - float x = 9.f*u / (6.f*u - 16.f*v + 12.f); - float y = 4.f*v / (6.f*u - 16.f*v + 12.f); + float x = 9.f * u / (6.f * u - 16.f * v + 12.f); + float y = 4.f * v / (6.f * u - 16.f * v + 12.f); - X = x/y * Y; - Z = (1.f-x-y)/y * Y; + X = x / y * Y; + Z = (1.f - x - y) / y * Y; outY = Y; } } -void transformYuv2RGB(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ +void transformYuv2RGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -215,94 +215,93 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "transformYuv2RGB() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "transformYuv2RGB() = " << f_timer.get_time() << " msec" + << std::endl; #endif } -void transformYxy2XYZ( const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ - const int elems = inC1->getRows()*inC1->getCols(); - for( int idx = 0; idx < elems; idx++ ) - { +void transformYxy2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { + const int elems = inC1->getRows() * inC1->getCols(); + for (int idx = 0; idx < elems; idx++) { const float Y = (*inC1)(idx), x = (*inC2)(idx), y = (*inC3)(idx); float &X = (*outC1)(idx), &outY = (*outC2)(idx), &Z = (*outC3)(idx); - X = x/y * Y; - Z = (1.f-x-y)/y * Y; + X = x / y * Y; + Z = (1.f - x - y) / y * Y; outY = Y; } } -void transformXYZ2Yxy( const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ) -{ - const int elems = inC1->getRows()*inC1->getCols(); - for( int idx = 0; idx < elems; idx++ ) - { +void transformXYZ2Yxy(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { + const int elems = inC1->getRows() * inC1->getCols(); + for (int idx = 0; idx < elems; idx++) { const float X = (*inC1)(idx), Y = (*inC2)(idx), Z = (*inC3)(idx); float &outY = (*outC1)(idx), &x = (*outC2)(idx), &y = (*outC3)(idx); - x = X/(X+Y+Z); - y = Y/(X+Y+Z); + x = X / (X + Y + Z); + y = Y / (X + Y + Z); outY = Y; } } -typedef void (*CSTransformFunc)(const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ); +typedef void (*CSTransformFunc)(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, + Array2Df *outC2, Array2Df *outC3); typedef std::pair CSTransformProfile; typedef std::map CSTransformMap; -void transformColorSpace(ColorSpace inCS, const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - ColorSpace outCS, Array2Df *outC1, Array2Df *outC2, Array2Df *outC3) -{ - assert( inC1->getCols() == inC2->getCols() && - inC2->getCols() == inC3->getCols() && - inC3->getCols() == outC1->getCols() && - outC1->getCols() == outC2->getCols() && - outC2->getCols() == outC3->getCols() ); - - assert( inC1->getRows() == inC2->getRows() && - inC2->getRows() == inC3->getRows() && - inC3->getRows() == outC1->getRows() && - outC1->getRows() == outC2->getRows() && - outC2->getRows() == outC3->getRows() ); +void transformColorSpace(ColorSpace inCS, const Array2Df *inC1, + const Array2Df *inC2, const Array2Df *inC3, + ColorSpace outCS, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3) { + assert(inC1->getCols() == inC2->getCols() && + inC2->getCols() == inC3->getCols() && + inC3->getCols() == outC1->getCols() && + outC1->getCols() == outC2->getCols() && + outC2->getCols() == outC3->getCols()); + + assert(inC1->getRows() == inC2->getRows() && + inC2->getRows() == inC3->getRows() && + inC3->getRows() == outC1->getRows() && + outC1->getRows() == outC2->getRows() && + outC2->getRows() == outC3->getRows()); // static dictionary... I already know in advance the subscription I want // to perform, hence this approach is far easier than try to create // automatic subscription to the factory - static CSTransformMap s_csTransformMap = - map_list_of - // XYZ -> * - (CSTransformProfile(CS_XYZ, CS_SRGB), transformXYZ2SRGB) - (CSTransformProfile(CS_XYZ, CS_RGB), transformXYZ2RGB) - (CSTransformProfile(CS_XYZ, CS_YUV), transformXYZ2Yuv) - (CSTransformProfile(CS_XYZ, CS_Yxy), transformXYZ2Yxy) - // sRGB -> * - (CSTransformProfile(CS_SRGB, CS_XYZ), transformSRGB2XYZ) - // RGB -> * - (CSTransformProfile(CS_RGB, CS_XYZ), transformRGB2XYZ) - (CSTransformProfile(CS_RGB, CS_YUV), transformRGB2Yuv) - // Yuv -> * - (CSTransformProfile(CS_YUV, CS_XYZ), transformYuv2XYZ) - (CSTransformProfile(CS_YUV, CS_RGB), transformYuv2RGB) - // Yxy -> * - (CSTransformProfile(CS_Yxy, CS_XYZ), transformYxy2XYZ) - ; + static CSTransformMap s_csTransformMap = map_list_of + // XYZ -> * + (CSTransformProfile(CS_XYZ, CS_SRGB), transformXYZ2SRGB)( + CSTransformProfile(CS_XYZ, CS_RGB), transformXYZ2RGB)( + CSTransformProfile(CS_XYZ, CS_YUV), transformXYZ2Yuv)( + CSTransformProfile(CS_XYZ, CS_Yxy), transformXYZ2Yxy) + // sRGB -> * + (CSTransformProfile(CS_SRGB, CS_XYZ), transformSRGB2XYZ) + // RGB -> * + (CSTransformProfile(CS_RGB, CS_XYZ), transformRGB2XYZ)( + CSTransformProfile(CS_RGB, CS_YUV), transformRGB2Yuv) + // Yuv -> * + (CSTransformProfile(CS_YUV, CS_XYZ), transformYuv2XYZ)( + CSTransformProfile(CS_YUV, CS_RGB), transformYuv2RGB) + // Yxy -> * + (CSTransformProfile(CS_Yxy, CS_XYZ), transformYxy2XYZ); CSTransformMap::const_iterator itTransform = - s_csTransformMap.find( CSTransformProfile(inCS, outCS) ); + s_csTransformMap.find(CSTransformProfile(inCS, outCS)); - if ( itTransform == s_csTransformMap.end() ) - { - throw Exception( "Unsupported color tranform" ); + if (itTransform == s_csTransformMap.end()) { + throw Exception("Unsupported color tranform"); } #ifndef NDEBUG - std::cerr << __FUNCTION__ << ": Found right match for colorspace conversion\n"; + std::cerr << __FUNCTION__ + << ": Found right match for colorspace conversion\n"; #endif // CSTransformFunc func = - (itTransform->second)( inC1, inC2, inC3, outC1, outC2, outC3 ); + (itTransform->second)(inC1, inC2, inC3, outC1, outC2, outC3); } -} // namespace pfs +} // namespace pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/colorspace.h luminance-hdr-2.6.0/src/Libpfs/colorspace/colorspace.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/colorspace.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/colorspace.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,7 +24,8 @@ * @author Rafal Mantiuk, * * @author Davide Anastasia (2010 10 13) - * Reimplementation of most of the functions (in particular the ones involving RGB and XYZ) + * Reimplementation of most of the functions (in particular the ones involving + * RGB and XYZ) * * $Id: colorspace.h,v 1.6 2007/07/18 08:49:25 rafm Exp $ */ @@ -35,57 +36,68 @@ #include #include -namespace pfs -{ +namespace pfs { //! This enum is used to specify color spaces for transformColorSpace function -enum ColorSpace -{ - CS_XYZ = 0, //!< Absolute XYZ space, reference white - D65, Y is calibrated luminance in cd/m^2 - CS_RGB = 1, //!< Absolute RGB space, reference white - D65 - CS_SRGB = 2, //!< sRGB color space for LDR images (see - //!< www.srgb.com). The possible pixel values - //!< for R, G and B channel should be within - //!< range 0-1 (the values above or below this - //!< range will be clamped). Peak luminance - //!< level of the display is 80cd/m^2. - CS_YUV = 3, //!< Perceptually uniform u and v color coordinates, Y is calibrated luminance in cd/m^2 - CS_Yxy = 4 //!< Luminance and normalized chromacities (x=X/(X+Y+Z), y=Y/(X+Y+Z)) +enum ColorSpace { + CS_XYZ = 0, //!< Absolute XYZ space, reference white - D65, Y is calibrated + //! luminance in cd/m^2 + CS_RGB = 1, //!< Absolute RGB space, reference white - D65 + CS_SRGB = 2, //!< sRGB color space for LDR images (see + //!< www.srgb.com). The possible pixel values + //!< for R, G and B channel should be within + //!< range 0-1 (the values above or below this + //!< range will be clamped). Peak luminance + //!< level of the display is 80cd/m^2. + CS_YUV = 3, //!< Perceptually uniform u and v color coordinates, Y is + //! calibrated luminance in cd/m^2 + CS_Yxy = + 4 //!< Luminance and normalized chromacities (x=X/(X+Y+Z), y=Y/(X+Y+Z)) }; // XYZ -> * -void transformXYZ2SRGB(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformXYZ2RGB(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformXYZ2Yxy(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformXYZ2Yuv(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); +void transformXYZ2SRGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformXYZ2RGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformXYZ2Yxy(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformXYZ2Yuv(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); // SRGB -> * -void transformSRGB2XYZ(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformSRGB2Y(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outY); +void transformSRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformSRGB2Y(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outY); // RGB -> * -void transformRGB2XYZ(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformRGB2Y(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1); -void transformRGB2Yuv(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); +void transformRGB2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformRGB2Y(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1); +void transformRGB2Yuv(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); // Yuv -> * -void transformYuv2XYZ(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); -void transformYuv2RGB(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); +void transformYuv2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); +void transformYuv2RGB(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); // Yxy -> * -void transformYxy2XYZ(const Array2Df*inC1, const Array2Df*inC2, const Array2Df*inC3, - Array2Df*outC1, Array2Df*outC2, Array2Df*outC3); +void transformYxy2XYZ(const Array2Df *inC1, const Array2Df *inC2, + const Array2Df *inC3, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); //! \brief Transform color channels from one color space into //! another. Input and output channels may point to the same data @@ -100,11 +112,10 @@ //! \param outC2 second color channel of the output image //! \param outC3 third color channel of the output image //! -void transformColorSpace(ColorSpace inCS, - const Array2Df *inC1, const Array2Df *inC2, const Array2Df *inC3, - ColorSpace outCS, - Array2Df *outC1, Array2Df *outC2, Array2Df *outC3 ); - +void transformColorSpace(ColorSpace inCS, const Array2Df *inC1, + const Array2Df *inC2, const Array2Df *inC3, + ColorSpace outCS, Array2Df *outC1, Array2Df *outC2, + Array2Df *outC3); } -#endif // COLORSPACE_H +#endif // COLORSPACE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/convert.h luminance-hdr-2.6.0/src/Libpfs/colorspace/convert.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/convert.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/convert.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,8 +26,8 @@ #define PFS_COLORSPACE_CONVERT_H #include -#include #include +#include namespace pfs { namespace colorspace { @@ -36,46 +36,40 @@ struct ConvertSample; template -struct ConvertSample -{ - Type operator()(Type vIn) - { return vIn; } +struct ConvertSample { + Type operator()(Type vIn) { return vIn; } }; template <> -struct ConvertSample -{ - float operator()(uint16_t vIn) - { return ((float)vIn)/65535.f; } +struct ConvertSample { + float operator()(uint16_t vIn) { return ((float)vIn) / 65535.f; } }; template <> -struct ConvertSample -{ - float operator()(uint8_t vIn) - { return ((float)vIn)/255.f; } +struct ConvertSample { + float operator()(uint8_t vIn) { return ((float)vIn) / 255.f; } }; template <> -struct ConvertSample -{ - uint8_t operator()(float vIn) - { return static_cast(vIn*255.f + 0.5f); } +struct ConvertSample { + uint8_t operator()(float vIn) { + return static_cast(vIn * 255.f + 0.5f); + } }; template <> struct ConvertSample { - uint16_t operator()(float vIn) - { return static_cast(vIn*65535.f + 0.5f); } + uint16_t operator()(float vIn) { + return static_cast(vIn * 65535.f + 0.5f); + } }; template -TypeOut convertSample(TypeIn vIn) -{ +TypeOut convertSample(TypeIn vIn) { return ConvertSample()(vIn); } -} // colorspace -} // pfs +} // colorspace +} // pfs -#endif // PFS_COLORSPACE_CONVERT_H +#endif // PFS_COLORSPACE_CONVERT_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/copy.h luminance-hdr-2.6.0/src/Libpfs/colorspace/copy.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/copy.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/copy.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,17 +29,15 @@ struct Copy { template - void operator()(TypeIn v1, TypeIn v2, TypeIn v3, - TypeOut& o1, TypeOut& o2, TypeOut& o3) - { + void operator()(TypeIn v1, TypeIn v2, TypeIn v3, TypeOut &o1, TypeOut &o2, + TypeOut &o3) { o1 = ConvertSample()(v1); o2 = ConvertSample()(v2); o3 = ConvertSample()(v3); } }; -} // utils -} // pfs +} // utils +} // pfs - -#endif // PFS_UTILS_CHAIN_H +#endif // PFS_UTILS_CHAIN_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/gamma.h luminance-hdr-2.6.0/src/Libpfs/colorspace/gamma.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/gamma.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/gamma.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,37 +30,31 @@ namespace colorspace { struct Gamma2_2 { - static float gamma() { return 1/2.2f; } + static float gamma() { return 1 / 2.2f; } }; struct Gamma1_8 { - static float gamma() { return 1/1.8f; } + static float gamma() { return 1 / 1.8f; } }; template -struct Gamma -{ +struct Gamma { template - TypeOut operator()(TypeIn sample) const - { + TypeOut operator()(TypeIn sample) const { return ConvertSample()( - std::pow( - convertSample(sample), GammaFactor::gamma() - ) - ); + std::pow(convertSample(sample), GammaFactor::gamma())); } template - void operator()(TypeIn v1, TypeIn v2, TypeIn v3, - TypeOut& o1, TypeOut& o2, TypeOut& o3) - { - o1 = operator ()(v1); - o2 = operator ()(v2); - o3 = operator ()(v3); + void operator()(TypeIn v1, TypeIn v2, TypeIn v3, TypeOut &o1, TypeOut &o2, + TypeOut &o3) { + o1 = operator()(v1); + o2 = operator()(v2); + o3 = operator()(v3); } }; -} // colorspace -} // pfs +} // colorspace +} // pfs -#endif // PFS_COLORSPACE_GAMMA_H +#endif // PFS_COLORSPACE_GAMMA_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/lcms.h luminance-hdr-2.6.0/src/Libpfs/colorspace/lcms.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/lcms.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/lcms.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,61 +25,57 @@ #ifndef PFS_COLORSPACE_LCMS_H #define PFS_COLORSPACE_LCMS_H -#include #include +#include namespace pfs { namespace colorspace { //! \brief Functor 4 -> 3 conversion based on LCMS struct Convert4LCMS3 { - Convert4LCMS3(cmsHTRANSFORM transform) - : transform_(transform) {} + Convert4LCMS3(cmsHTRANSFORM transform) : transform_(transform) {} //! \brief template - void operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeIn i4, - TypeOut& o1, TypeOut& o2, TypeOut& o3) const - { - TypeIn inBuffer[4] = { i1, i2, i3, i4 }; + void operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeIn i4, TypeOut &o1, + TypeOut &o2, TypeOut &o3) const { + TypeIn inBuffer[4] = {i1, i2, i3, i4}; TypeOut outBuffer[3]; - cmsDoTransform(transform_, &inBuffer[0], - &outBuffer[0], 1); + cmsDoTransform(transform_, &inBuffer[0], &outBuffer[0], 1); o1 = outBuffer[0]; o2 = outBuffer[1]; o3 = outBuffer[2]; } -private: + + private: cmsHTRANSFORM transform_; }; //! \brief Functor 4 -> 3 conversion based on LCMS struct Convert3LCMS3 { - Convert3LCMS3(cmsHTRANSFORM transform) - : transform_(transform) {} + Convert3LCMS3(cmsHTRANSFORM transform) : transform_(transform) {} //! \brief template - void operator()(TypeIn i1, TypeIn i2, TypeIn i3, - TypeOut& o1, TypeOut& o2, TypeOut& o3) const - { - TypeIn inBuffer[3] = { i1, i2, i3 }; + void operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeOut &o1, TypeOut &o2, + TypeOut &o3) const { + TypeIn inBuffer[3] = {i1, i2, i3}; TypeOut outBuffer[3]; - cmsDoTransform(transform_, &inBuffer[0], - &outBuffer[0], 1); + cmsDoTransform(transform_, &inBuffer[0], &outBuffer[0], 1); o1 = outBuffer[0]; o2 = outBuffer[1]; o3 = outBuffer[2]; } -private: + + private: cmsHTRANSFORM transform_; }; -} // colorspace -} // pfs +} // colorspace +} // pfs -#endif // PFS_COLORSPACE_CMYK_H +#endif // PFS_COLORSPACE_CMYK_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/normalizer.h luminance-hdr-2.6.0/src/Libpfs/colorspace/normalizer.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/normalizer.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/normalizer.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,36 +29,30 @@ namespace pfs { namespace colorspace { -struct Normalizer -{ - Normalizer(float min, float max) - : m_min(min) - , m_range(max - min) - { +struct Normalizer { + Normalizer(float min, float max) : m_min(min), m_range(max - min) { assert(m_range != 0.f); } - float operator()(float sample) const - { - assert(!boost::math::isnan(sample)); + float operator()(float sample) const { + //assert(!boost::math::isnan(sample)); - return (sample - m_min)/m_range; + return (sample - m_min) / m_range; } - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const - { + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } -private: + private: float m_min; float m_range; }; -} // colorspace -} // pfs +} // colorspace +} // pfs #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.cpp luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,34 +21,30 @@ #include #include +#include "../../sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) namespace pfs { namespace colorspace { -using std::pow; - -float ConvertSRGB2RGB::operator()(float sample) const -{ - if ( sample > 0.04045f ) { - return pow((sample + 0.055f)*(1.f/1.055f), 2.4f); +float ConvertSRGB2RGB::operator()(float sample) const { + if (sample > 0.04045f) { + return pow_F((sample + 0.055f) * (1.f / 1.055f), 2.4f); } - if ( sample >= -0.04045f ) - { - return sample*(1.f/12.92f); + if (sample >= -0.04045f) { + return sample * (1.f / 12.92f); } - return -pow((0.055f - sample)*(1.f/1.055f), 2.4f); + return -pow_F((0.055f - sample) * (1.f / 1.055f), 2.4f); } -float ConvertRGB2SRGB::operator ()(float sample) const -{ - if ( sample > 0.0031308f ) { - return ((1.055f * pow(sample, 1.f/2.4f)) - 0.055f); +float ConvertRGB2SRGB::operator()(float sample) const { + if (sample > 0.0031308f) { + return ((1.055f * pow_F(sample, 1.f / 2.4f)) - 0.055f); } - if ( sample >= -0.0031308f ) { + if (sample >= -0.0031308f) { return (sample * 12.92f); } - return ((0.055f - 1.f)*pow(-sample, 1.f/2.4f) - 0.055f); + return ((0.055f - 1.f) * pow_F(-sample, 1.f / 2.4f) - 0.055f); } - } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.h luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,8 +34,8 @@ float operator()(float sample) const; //! \brief RGB triplet expanding SRGB -> RGB - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; //! \brief Functor RGB -> SRGB conversion @@ -44,12 +44,12 @@ float operator()(float sample) const; //! \brief RGB triplet companding SRGB -> RGB - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; -} // colorspace -} // pfs +} // colorspace +} // pfs -#include // inline functions or template -#endif // PFS_COLORSPACE_RGB_H +#include // inline functions or template +#endif // PFS_COLORSPACE_RGB_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.hxx luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgb.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgb.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -30,25 +30,20 @@ namespace pfs { namespace colorspace { -inline -void ConvertSRGB2RGB::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ +inline void ConvertSRGB2RGB::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } -inline -void ConvertRGB2SRGB::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ +inline void ConvertRGB2SRGB::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } - } } -#endif // PFS_COLORSPACE_RGB_HXX +#endif // PFS_COLORSPACE_RGB_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper.cpp luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -32,52 +32,46 @@ #include #include "arch/math.h" -namespace -{ -const float GAMMA_1_4 = 1.0f/1.4f; -const float GAMMA_1_8 = 1.0f/1.8f; -const float GAMMA_2_2 = 1.0f/2.2f; -const float GAMMA_2_6 = 1.0f/2.6f; -} - -float RemapperBase::toLinear(float sample) -{ return sample; } - -float RemapperBase::toGamma14(float sample) -{ return std::pow(sample, GAMMA_1_4); } - -float RemapperBase::toGamma18(float sample) -{ return std::pow(sample, GAMMA_1_8); } - -float RemapperBase::toGamma22(float sample) -{ return std::pow(sample, GAMMA_2_2); } - -float RemapperBase::toGamma26(float sample) -{ return std::pow(sample, GAMMA_2_6); } - -float RemapperBase::toLog(float sample) -{ return std::pow(sample, 1.f/GAMMA_2_2); } - -const RemapperBase::MappingFunc RemapperBase::s_callbacks[] = -{ - &toLinear, - &toGamma14, - &toGamma18, - &toGamma22, - &toGamma26, - &toLog -}; +namespace { +const float GAMMA_1_4 = 1.0f / 1.4f; +const float GAMMA_1_8 = 1.0f / 1.8f; +const float GAMMA_2_2 = 1.0f / 2.2f; +const float GAMMA_2_6 = 1.0f / 2.6f; +} + +float RemapperBase::toLinear(float sample) { return sample; } + +float RemapperBase::toGamma14(float sample) { + return std::pow(sample, GAMMA_1_4); +} + +float RemapperBase::toGamma18(float sample) { + return std::pow(sample, GAMMA_1_8); +} + +float RemapperBase::toGamma22(float sample) { + return std::pow(sample, GAMMA_2_2); +} + +float RemapperBase::toGamma26(float sample) { + return std::pow(sample, GAMMA_2_6); +} + +float RemapperBase::toLog(float sample) { + return std::pow(sample, 1.f / GAMMA_2_2); +} + +const RemapperBase::MappingFunc RemapperBase::s_callbacks[] = { + &toLinear, &toGamma14, &toGamma18, &toGamma22, &toGamma26, &toLog}; Remapper::Remapper(RGBMappingType mappingMethod) - : m_mappingMethod(mappingMethod) -{ + : m_mappingMethod(mappingMethod) { assert(mappingMethod >= 0); assert(mappingMethod < 6); MappingFunc callback(s_callbacks[mappingMethod]); - for (int idx = 0; idx < 256; ++idx) - { - m_lut[idx] = 255.f * callback(float(idx)/255.f); + for (int idx = 0; idx < 256; ++idx) { + m_lut[idx] = 255.f * callback(float(idx) / 255.f); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper_fwd.h luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper_fwd.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper_fwd.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper_fwd.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,17 +24,16 @@ #ifndef PFS_RGBREMAPPER_FWD_H #define PFS_RGBREMAPPER_FWD_H -enum RGBMappingType -{ - MAP_LINEAR = 0, - MAP_GAMMA1_4 = 1, - MAP_GAMMA1_8 = 2, - MAP_GAMMA2_2 = 3, - MAP_GAMMA2_6 = 4, +enum RGBMappingType { + MAP_LINEAR = 0, + MAP_GAMMA1_4 = 1, + MAP_GAMMA1_8 = 2, + MAP_GAMMA2_2 = 3, + MAP_GAMMA2_6 = 4, MAP_LOGARITHMIC = 5 }; template class Remapper; -#endif // PFS_RGBREMAPPER_FWD_H +#endif // PFS_RGBREMAPPER_FWD_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper.h luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/rgbremapper.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/rgbremapper.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,15 +31,14 @@ #include #include -#include #include +#include #include // takes as template parameter a TypeOut, so that integer optimization can be // performed if TypeOut is an uint8_t or uint16_t -class RemapperBase -{ -protected: +class RemapperBase { + protected: static float toLinear(float sample); static float toGamma14(float sample); static float toGamma18(float sample); @@ -53,22 +52,18 @@ }; template -class Remapper : public RemapperBase -{ -public: +class Remapper : public RemapperBase { + public: Remapper(RGBMappingType mappingMethod = MAP_LINEAR) - : m_mappingMethod(mappingMethod) - , m_callback(s_callbacks[mappingMethod]) - { + : m_mappingMethod(mappingMethod), + m_callback(s_callbacks[mappingMethod]) { assert(mappingMethod >= 0); assert(mappingMethod < 6); } - RGBMappingType getMappingMethod() const - { return m_mappingMethod; } + RGBMappingType getMappingMethod() const { return m_mappingMethod; } - TypeOut operator()(float sample) const - { + TypeOut operator()(float sample) const { assert(sample >= 0.f); assert(sample <= 1.f); @@ -77,48 +72,44 @@ return convertSample(m_callback(sample)); } - void operator()(float i1, float i2, float i3, TypeOut& o1, TypeOut& o2, TypeOut& o3) const - { + void operator()(float i1, float i2, float i3, TypeOut &o1, TypeOut &o2, + TypeOut &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } -private: + private: RGBMappingType m_mappingMethod; MappingFunc m_callback; }; template <> -class Remapper : public RemapperBase -{ -public: +class Remapper : public RemapperBase { + public: Remapper(RGBMappingType mappingMethod = MAP_LINEAR); - RGBMappingType getMappingMethod() const - { return m_mappingMethod; } + RGBMappingType getMappingMethod() const { return m_mappingMethod; } - uint8_t operator()(float sample) const - { + uint8_t operator()(float sample) const { assert(sample >= 0.f); assert(sample <= 1.f); using namespace pfs::colorspace; - return m_lut[ convertSample(sample) ]; + return m_lut[convertSample(sample)]; } - void operator()(float i1, float i2, float i3, uint8_t& o1, uint8_t& o2, uint8_t& o3) const - { + void operator()(float i1, float i2, float i3, uint8_t &o1, uint8_t &o2, + uint8_t &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } -private: + private: RGBMappingType m_mappingMethod; - std::array m_lut; // LUT of 256 bins... + std::array m_lut; // LUT of 256 bins... }; - -#endif // PFS_RGBREMAPPER_H +#endif // PFS_RGBREMAPPER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/saturation.h luminance-hdr-2.6.0/src/Libpfs/colorspace/saturation.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/saturation.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/saturation.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2013 Davide Anastasia + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +//! \brief Saturation enhancement function +//! \author Franco Comida + +#ifndef PFS_COLORSPACE_SATURATION_H +#define PFS_COLORSPACE_SATURATION_H + +namespace pfs { +namespace colorspace { + +struct ChangeSaturation { + ChangeSaturation(float m): multiplier(m) {}; + //! \brief multiply sample saturation by multiplier + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; + float multiplier; +}; + +} // colorspace +} // pfs + +#include // inline functions or template +#endif // PFS_COLORSPACE_SATURATION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/saturation.hxx luminance-hdr-2.6.0/src/Libpfs/colorspace/saturation.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/saturation.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/saturation.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2013 Davide Anastasia + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +//! \brief Saturation enhancement function +//! \author Franco Comida + +#ifndef PFS_COLORSPACE_SATURATION_HXX +#define PFS_COLORSPACE_SATURATION_HXX + +#include +#include + +namespace pfs { +namespace colorspace { + +inline void ChangeSaturation::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { + float h, s, l; + rgb2hsl(i1, i2, i3, h, s, l); + hsl2rgb(h, multiplier*s, l, o1, o2, o3); +} + +} +} + +#endif // PFS_COLORSPACE_SATURATION_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.cpp luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,39 +19,41 @@ * ---------------------------------------------------------------------- */ -#include #include +#include namespace pfs { namespace colorspace { //! \brief Basic matrices for the SRGB <-> XYZ conversion //! \ref http://www.brucelidbloom.com/Eqn_RGB_XYZ_Matrix.html -const float rgb2xyzD65Mat[3][3] = -{ { 0.4124564f, 0.3575761f, 0.1804375f }, - { 0.2126729f, 0.7151522f, 0.0721750f }, - { 0.0193339f, 0.1191920f, 0.9503041f } }; - -const float xyz2rgbD65Mat[3][3] = -{ { 3.2404542f, -1.5371385f, -0.4985314f }, - { -0.9692660f, 1.8760108f, 0.0415560f }, - { 0.0556434f, -0.2040259f, 1.0572252f } }; - -void ConvertRGB2XYZ::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ - o1 = rgb2xyzD65Mat[0][0]*i1 + rgb2xyzD65Mat[0][1]*i2 + rgb2xyzD65Mat[0][2]*i3; - o2 = rgb2xyzD65Mat[1][0]*i1 + rgb2xyzD65Mat[1][1]*i2 + rgb2xyzD65Mat[1][2]*i3; - o3 = rgb2xyzD65Mat[2][0]*i1 + rgb2xyzD65Mat[2][1]*i2 + rgb2xyzD65Mat[2][2]*i3; +const float rgb2xyzD65Mat[3][3] = {{0.4124564f, 0.3575761f, 0.1804375f}, + {0.2126729f, 0.7151522f, 0.0721750f}, + {0.0193339f, 0.1191920f, 0.9503041f}}; + +const float xyz2rgbD65Mat[3][3] = {{3.2404542f, -1.5371385f, -0.4985314f}, + {-0.9692660f, 1.8760108f, 0.0415560f}, + {0.0556434f, -0.2040259f, 1.0572252f}}; + +void ConvertRGB2XYZ::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { + o1 = rgb2xyzD65Mat[0][0] * i1 + rgb2xyzD65Mat[0][1] * i2 + + rgb2xyzD65Mat[0][2] * i3; + o2 = rgb2xyzD65Mat[1][0] * i1 + rgb2xyzD65Mat[1][1] * i2 + + rgb2xyzD65Mat[1][2] * i3; + o3 = rgb2xyzD65Mat[2][0] * i1 + rgb2xyzD65Mat[2][1] * i2 + + rgb2xyzD65Mat[2][2] * i3; } -void ConvertXYZ2RGB::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ - o1 = xyz2rgbD65Mat[0][0]*i1 + xyz2rgbD65Mat[0][1]*i2 + xyz2rgbD65Mat[0][2]*i3; - o2 = xyz2rgbD65Mat[1][0]*i1 + xyz2rgbD65Mat[1][1]*i2 + xyz2rgbD65Mat[1][2]*i3; - o3 = xyz2rgbD65Mat[2][0]*i1 + xyz2rgbD65Mat[2][1]*i2 + xyz2rgbD65Mat[2][2]*i3; +void ConvertXYZ2RGB::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { + o1 = xyz2rgbD65Mat[0][0] * i1 + xyz2rgbD65Mat[0][1] * i2 + + xyz2rgbD65Mat[0][2] * i3; + o2 = xyz2rgbD65Mat[1][0] * i1 + xyz2rgbD65Mat[1][1] * i2 + + xyz2rgbD65Mat[1][2] * i3; + o3 = xyz2rgbD65Mat[2][0] * i1 + xyz2rgbD65Mat[2][1] * i2 + + xyz2rgbD65Mat[2][2] * i3; } -} // colorspace -} // pfs +} // colorspace +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.h luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,36 +32,35 @@ extern const float xyz2rgbD65Mat[3][3]; struct ConvertRGB2XYZ { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; struct ConvertSRGB2XYZ { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; struct ConvertRGB2Y { template - void operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeOut& o) const; + void operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeOut &o) const; }; struct ConvertSRGB2Y { - void operator()(float i1, float i2, float i3, float& o) const; + void operator()(float i1, float i2, float i3, float &o) const; }; struct ConvertXYZ2RGB { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; struct ConvertXYZ2SRGB { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; - } } #include -#endif // PFS_COLORSPACE_XYZ_H +#endif // PFS_COLORSPACE_XYZ_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.hxx luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/xyz.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/xyz.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -25,47 +25,40 @@ //! \brief XYZ conversion functions //! \author Davide Anastasia -#include -#include #include +#include +#include namespace pfs { namespace colorspace { template -void ConvertRGB2Y::operator()(TypeIn i1, TypeIn i2, TypeIn i3, TypeOut& o) const -{ - o = convertSample( - rgb2xyzD65Mat[1][0]*convertSample(i1) + - rgb2xyzD65Mat[1][1]*convertSample(i2) + - rgb2xyzD65Mat[1][2]*convertSample(i3) - ); +void ConvertRGB2Y::operator()(TypeIn i1, TypeIn i2, TypeIn i3, + TypeOut &o) const { + o = convertSample(rgb2xyzD65Mat[1][0] * convertSample(i1) + + rgb2xyzD65Mat[1][1] * convertSample(i2) + + rgb2xyzD65Mat[1][2] * convertSample(i3)); } -inline -void ConvertSRGB2XYZ::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ +inline void ConvertSRGB2XYZ::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { colorspace::ConvertSRGB2RGB()(i1, i2, i3, i1, i2, i3); colorspace::ConvertRGB2XYZ()(i1, i2, i3, o1, o2, o3); } -inline -void ConvertXYZ2SRGB::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ +inline void ConvertXYZ2SRGB::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { colorspace::ConvertXYZ2RGB()(i1, i2, i3, i1, i2, i3); colorspace::ConvertRGB2SRGB()(i1, i2, i3, o1, o2, o3); } -inline -void ConvertSRGB2Y::operator()(float i1, float i2, float i3, float& o) const -{ +inline void ConvertSRGB2Y::operator()(float i1, float i2, float i3, + float &o) const { colorspace::ConvertSRGB2RGB()(i1, i2, i3, i1, i2, i3); colorspace::ConvertRGB2Y()(i1, i2, i3, o); } -} // namespace -} // pfs +} // namespace +} // pfs -#endif // PFS_COLORSPACE_XYZ_H +#endif // PFS_COLORSPACE_XYZ_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/yuv.cpp luminance-hdr-2.6.0/src/Libpfs/colorspace/yuv.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/yuv.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/yuv.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,38 +19,34 @@ * ---------------------------------------------------------------------- */ -#include #include +#include namespace pfs { namespace colorspace { //! \brief Basic matrices for the RGB <-> YUV conversion -const float rgb2yuvMat[3][3] = -{ { 0.299f, 0.587f, 0.144f }, - { -0.299f, -0.587f, 0.886f }, - { 0.701f, -0.587f, -0.114f } }; - -const float yuv2rgbMat[3][3] = -{ { 0.97087f, -0.02913f, 1.0f }, - { 0.97087f, -0.22333f, -0.50937f }, - { 0.97087f, 0.97087f, 0.0f } }; - -void ConvertRGB2YUV::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ - o1 = rgb2yuvMat[0][0]*i1 + rgb2yuvMat[0][1]*i2 + rgb2yuvMat[0][2]*i3; - o2 = rgb2yuvMat[1][0]*i1 + rgb2yuvMat[1][1]*i2 + rgb2yuvMat[1][2]*i3; - o3 = rgb2yuvMat[2][0]*i1 + rgb2yuvMat[2][1]*i2 + rgb2yuvMat[2][2]*i3; +const float rgb2yuvMat[3][3] = {{0.299f, 0.587f, 0.144f}, + {-0.299f, -0.587f, 0.886f}, + {0.701f, -0.587f, -0.114f}}; + +const float yuv2rgbMat[3][3] = {{0.97087f, -0.02913f, 1.0f}, + {0.97087f, -0.22333f, -0.50937f}, + {0.97087f, 0.97087f, 0.0f}}; + +void ConvertRGB2YUV::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { + o1 = rgb2yuvMat[0][0] * i1 + rgb2yuvMat[0][1] * i2 + rgb2yuvMat[0][2] * i3; + o2 = rgb2yuvMat[1][0] * i1 + rgb2yuvMat[1][1] * i2 + rgb2yuvMat[1][2] * i3; + o3 = rgb2yuvMat[2][0] * i1 + rgb2yuvMat[2][1] * i2 + rgb2yuvMat[2][2] * i3; } -void ConvertYUV2RGB::operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const -{ - o1 = yuv2rgbMat[0][0]*i1 + yuv2rgbMat[0][1]*i2 + yuv2rgbMat[0][2]*i3; - o2 = yuv2rgbMat[1][0]*i1 + yuv2rgbMat[1][1]*i2 + yuv2rgbMat[1][2]*i3; - o3 = yuv2rgbMat[2][0]*i1 + yuv2rgbMat[2][1]*i2 + yuv2rgbMat[2][2]*i3; +void ConvertYUV2RGB::operator()(float i1, float i2, float i3, float &o1, + float &o2, float &o3) const { + o1 = yuv2rgbMat[0][0] * i1 + yuv2rgbMat[0][1] * i2 + yuv2rgbMat[0][2] * i3; + o2 = yuv2rgbMat[1][0] * i1 + yuv2rgbMat[1][1] * i2 + yuv2rgbMat[1][2] * i3; + o3 = yuv2rgbMat[2][0] * i1 + yuv2rgbMat[2][1] * i2 + yuv2rgbMat[2][2] * i3; } -} // colorspace -} // pfs +} // colorspace +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/yuv.h luminance-hdr-2.6.0/src/Libpfs/colorspace/yuv.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/colorspace/yuv.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/colorspace/yuv.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,16 +32,15 @@ extern const float yuv2rgbMat[3][3]; struct ConvertRGB2YUV { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; struct ConvertYUV2RGB { - void operator()(float i1, float i2, float i3, - float& o1, float& o2, float& o3) const; + void operator()(float i1, float i2, float i3, float &o1, float &o2, + float &o3) const; }; - } } -#endif // PFS_COLORSPACE_YUV_H +#endif // PFS_COLORSPACE_YUV_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/exception.h luminance-hdr-2.6.0/src/Libpfs/exception.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/exception.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/exception.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,18 +32,12 @@ /** * General exception class used to throw exceptions from pfs library. */ -class Exception : public std::runtime_error -{ -public: - Exception(const std::string& message) - : std::runtime_error(message) - {} +class Exception : public std::runtime_error { + public: + Exception(const std::string &message) : std::runtime_error(message) {} - Exception(const char* message) - : std::runtime_error(message) - {} + Exception(const char *message) : std::runtime_error(message) {} }; - } -#endif // PFS_EXCEPTION_H +#endif // PFS_EXCEPTION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/exif/exifdata.cpp luminance-hdr-2.6.0/src/Libpfs/exif/exifdata.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/exif/exifdata.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/exif/exifdata.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,17 +21,14 @@ #include "exifdata.hpp" -#include #include +#include #include -namespace pfs -{ -namespace exif -{ +namespace pfs { +namespace exif { -namespace -{ +namespace { // reflected-light meter calibration constant const float K = 12.07488f; // default ISO value for camera that do not report io @@ -43,28 +40,18 @@ // default EVCOMP value const float DEFAULT_EVCOMP = 0.0f; -float log_base(float value, float base) -{ - return (std::log(value) / std::log(base)); +float log_base(float value, float base) { + return (std::log(value) / std::log(base)); } - } -ExifData::ExifData() -{ - reset(); -} +ExifData::ExifData() { reset(); } -ExifData::ExifData(const std::string& filename) -{ - fromFile(filename); -} +ExifData::ExifData(const std::string &filename) { fromFile(filename); } -void ExifData::fromFile(const std::string& filename) -{ +void ExifData::fromFile(const std::string &filename) { reset(); - try - { + try { ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); image->readMetadata(); ::Exiv2::ExifData &exifData = image->exifData(); @@ -74,49 +61,45 @@ // Exiv2 iterator in read-only ::Exiv2::ExifData::const_iterator it = exifData.end(); - if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime"))) != exifData.end()) - { + if ((it = exifData.findKey(Exiv2::ExifKey( + "Exif.Photo.ExposureTime"))) != exifData.end()) { m_exposureTime = it->toFloat(); - } - else if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue"))) != exifData.end()) - { + } else if ((it = exifData.findKey(Exiv2::ExifKey( + "Exif.Photo.ShutterSpeedValue"))) != exifData.end()) { long num = 1; long div = 1; float tmp = std::exp(std::log(2.0f) * it->toFloat()); - if (tmp > 1) - { + if (tmp > 1) { div = static_cast(tmp + 0.5f); + } else { + num = static_cast(1.0f / tmp + 0.5f); } - else - { - num = static_cast(1.0f/tmp + 0.5f); - } - m_exposureTime = static_cast(num)/div; + m_exposureTime = static_cast(num) / div; } - - if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber"))) != exifData.end()) - { + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber"))) != + exifData.end()) { m_FNumber = it->toFloat(); - } - else if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue"))) != exifData.end()) - { - m_FNumber = static_cast(expf(logf(2.0f) * it->toFloat() / 2.f)); - } - // some cameras/lens DO print the fnum but with value 0, and this is not allowed for ev computation purposes. - if (m_FNumber == 0.0f) - { + } else if ((it = exifData.findKey(Exiv2::ExifKey( + "Exif.Photo.ApertureValue"))) != exifData.end()) { + m_FNumber = + static_cast(expf(logf(2.0f) * it->toFloat() / 2.f)); + } + // some cameras/lens DO print the fnum but with value 0, and this is not + // allowed for ev computation purposes. + if (m_FNumber == 0.0f) { m_FNumber = INVALID_VALUE; } - //if iso is found use that value, otherwise assume a value of iso=100. (again, some cameras do not print iso in exif). - if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ISOSpeedRatings"))) != exifData.end()) - { + // if iso is found use that value, otherwise assume a value of iso=100. + // (again, some cameras do not print iso in exif). + if ((it = exifData.findKey(Exiv2::ExifKey( + "Exif.Photo.ISOSpeedRatings"))) != exifData.end()) { m_isoSpeed = it->toFloat(); } - if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureBiasValue"))) != exifData.end()) - { + if ((it = exifData.findKey(Exiv2::ExifKey( + "Exif.Photo.ExposureBiasValue"))) != exifData.end()) { m_EVCompensation = it->toFloat(); } @@ -136,110 +119,70 @@ * 8 left side bottom * */ - if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) != exifData.end()) - { + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) != + exifData.end()) { long rotation = it->toLong(); - switch (rotation) - { - case 3: - m_orientation = 180; - break; - case 6: - m_orientation = 90; - break; - case 8: - m_orientation = 270; - break; + switch (rotation) { + case 3: + m_orientation = 180; + break; + case 6: + m_orientation = 90; + break; + case 8: + m_orientation = 270; + break; } } - } - catch (Exiv2::AnyError& e) - { + } catch (Exiv2::AnyError &e) { return; } } -const float& ExifData::getExposureTime() const -{ - return m_exposureTime; -} -bool ExifData::hasExposureTime() const -{ +const float &ExifData::getExposureTime() const { return m_exposureTime; } +bool ExifData::hasExposureTime() const { return (m_exposureTime != INVALID_VALUE); } -void ExifData::setExposureTime(float et) -{ - m_exposureTime = et; -} - -const float& ExifData::getIsoSpeed() const -{ - return m_isoSpeed; -} -bool ExifData::hasIsoSpeed() const -{ - return true; -} -void ExifData::setIsoSpeed(float iso) -{ - m_isoSpeed = iso; -} +void ExifData::setExposureTime(float et) { m_exposureTime = et; } -const float& ExifData::getFNumber() const -{ - return m_FNumber; -} -bool ExifData::hasFNumber() const -{ - return (m_FNumber != INVALID_VALUE); -} -void ExifData::setFNumber(float fnum) -{ - m_FNumber = fnum; -} - -float ExifData::getExposureValue() const -{ - if (hasFNumber() && hasExposureTime()) - { - return log_base((m_FNumber*m_FNumber)/m_exposureTime, 2.0f); +const float &ExifData::getIsoSpeed() const { return m_isoSpeed; } +bool ExifData::hasIsoSpeed() const { return true; } +void ExifData::setIsoSpeed(float iso) { m_isoSpeed = iso; } + +const float &ExifData::getFNumber() const { return m_FNumber; } +bool ExifData::hasFNumber() const { return (m_FNumber != INVALID_VALUE); } +void ExifData::setFNumber(float fnum) { m_FNumber = fnum; } + +float ExifData::getExposureValue() const { + if (hasFNumber() && hasExposureTime()) { + return log_base((m_FNumber * m_FNumber) / m_exposureTime, 2.0f); } return INVALID_EV_VALUE; } -bool ExifData::hasExposureValue() const -{ +bool ExifData::hasExposureValue() const { return (getExposureValue() != INVALID_EV_VALUE); } -const float& ExifData::getExposureValueCompensation() const -{ +const float &ExifData::getExposureValueCompensation() const { return m_EVCompensation; } -bool ExifData::hasExposureValueCompensation() const -{ +bool ExifData::hasExposureValueCompensation() const { return (m_EVCompensation != 0.0f); } -void ExifData::setExposureValueCompensation(float evcomp) -{ +void ExifData::setExposureValueCompensation(float evcomp) { m_EVCompensation = evcomp; } -float ExifData::getAverageSceneLuminance() const -{ - if (hasIsoSpeed() && hasFNumber() && hasExposureTime()) - { - return ( (m_exposureTime * m_isoSpeed) / (m_FNumber*m_FNumber*K) ); +float ExifData::getAverageSceneLuminance() const { + if (hasIsoSpeed() && hasFNumber() && hasExposureTime()) { + return ((m_exposureTime * m_isoSpeed) / (m_FNumber * m_FNumber * K)); } return INVALID_VALUE; } -short ExifData::getOrientationDegree() const -{ - return m_orientation; -} +short ExifData::getOrientationDegree() const { return m_orientation; } -void ExifData::reset() -{ +void ExifData::reset() { // reset internal value m_exposureTime = INVALID_VALUE; m_isoSpeed = DEFAULT_ISO; @@ -248,21 +191,20 @@ m_orientation = 0; } -bool ExifData::isValid() const -{ +bool ExifData::isValid() const { return (hasIsoSpeed() && hasFNumber() && hasExposureTime()); } -std::ostream& operator<<(std::ostream& out, const ExifData& exifData) -{ +std::ostream &operator<<(std::ostream &out, const ExifData &exifData) { out << "Exposure time = " << exifData.m_exposureTime << ", "; out << "F value = " << exifData.m_FNumber << ", "; out << "ISO = " << exifData.m_isoSpeed << ", "; - out << "Exposure value = " << exifData.getExposureValue() << " (" << exifData.m_EVCompensation << "), "; + out << "Exposure value = " << exifData.getExposureValue() << " (" + << exifData.m_EVCompensation << "), "; out << "Average Scene Luminance = " << exifData.getAverageSceneLuminance(); return out; } -} // namespace exif -} // namespace LibHDR +} // namespace exif +} // namespace LibHDR diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/exif/exifdata.hpp luminance-hdr-2.6.0/src/Libpfs/exif/exifdata.hpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/exif/exifdata.hpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/exif/exifdata.hpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,22 +22,19 @@ #ifndef EXIF_DATA_HPP #define EXIF_DATA_HPP -#include -#include #include +#include +#include -namespace pfs -{ +namespace pfs { //! \namespace Contains all the operations based on EXIF data -namespace exif -{ +namespace exif { //! \class exif_data //! \brief Holds Exif Data //! \author Davide Anastasia -class ExifData -{ -public: +class ExifData { + public: //! \brief empty ctor ExifData(); @@ -73,7 +70,8 @@ //! "average scene luminance" is the L (aka B) value mentioned in [1] //! You have to take a log2f of the returned value to get an EV value. //! - //! We are using K=12.07488f and the exif-implied value of N=1/3.125 (see [1]). + //! We are using K=12.07488f and the exif-implied value of N=1/3.125 (see + //! [1]). //! K=12.07488f is the 1.0592f * 11.4f value in pfscalibration's //! pfshdrcalibrate.cpp file. //! Based on [3] we can say that the value can also be 12.5 or even 14. @@ -96,7 +94,6 @@ //! Luminance HDR http://qtpfsgui.sourceforge.net/ float getAverageSceneLuminance() const; - //! \brief This function returns the image rotation to apply in degrees. //! Possible values are 0, 90, 180, 270. short getOrientationDegree() const; @@ -110,7 +107,8 @@ friend std::ostream& operator<<(std::ostream& out, const ExifData& exifdata); -private: + + private: float m_exposureTime; float m_isoSpeed; float m_FNumber; @@ -120,7 +118,7 @@ std::ostream& operator<<(std::ostream& out, const ExifData& exifdata); -} // exif -} // pfs +} // exif +} // pfs -#endif // EXIF_DATA_HPP +#endif // EXIF_DATA_HPP diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/fixedstrideiterator.h luminance-hdr-2.6.0/src/Libpfs/fixedstrideiterator.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/fixedstrideiterator.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/fixedstrideiterator.h 2019-06-09 19:18:38.000000000 +0000 @@ -22,8 +22,8 @@ #ifndef PFS_FIXEDSTRIDEITERATOR_H #define PFS_FIXEDSTRIDEITERATOR_H -#include #include +#include namespace pfs { @@ -33,34 +33,31 @@ //! \ref http://zotu.blogspot.co.uk/2010/01/creating-random-access-iterator.html template class FixedStrideIterator - : public std::iterator< std::random_access_iterator_tag, IterType> -{ -public: + : public std::iterator { + public: // public typedefs typedef FixedStrideIterator self; - typedef typename std::iterator< std::random_access_iterator_tag, IterType> iterator_base; + typedef typename std::iterator + iterator_base; typedef typename std::random_access_iterator_tag iterator_category; typedef typename std::iterator_traits::value_type value_type; typedef typename std::iterator_traits::reference reference; - typedef typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::difference_type + difference_type; typedef typename std::iterator_traits::pointer pointer; // ctors - FixedStrideIterator() - : m_data() - {} - FixedStrideIterator(const self& rhs) - : m_data(rhs.m_data) - {} - FixedStrideIterator(IterType x) - : m_data(x) - {} + FixedStrideIterator() : m_data() {} + FixedStrideIterator(const self &rhs) : m_data(rhs.m_data) {} + FixedStrideIterator(IterType x) : m_data(x) {} // operators //! \brief Prefix increment - self& operator++() - { m_data += StepSize; return *this; } + self &operator++() { + m_data += StepSize; + return *this; + } //! \brief Postfix increment self operator++(int) { @@ -70,18 +67,21 @@ } //! \brief Increment - self& operator+=(const difference_type& n) { + self &operator+=(const difference_type &n) { m_data += (n * StepSize); return *this; } //! \brief Sum - self operator+(const difference_type& n) const - { return self(m_data + n*StepSize); } + self operator+(const difference_type &n) const { + return self(m_data + n * StepSize); + } //! \brief Prefix decrement - self& operator--() - { m_data -= StepSize; return *this; } + self &operator--() { + m_data -= StepSize; + return *this; + } //! \brief Postfix decrement self operator--(int) { @@ -91,100 +91,116 @@ } //! \brief Decrement - self& operator-=(const difference_type& n) { + self &operator-=(const difference_type &n) { m_data -= (n * StepSize); return *this; } //! \brief Difference - self operator-(const difference_type& n) const - { return self(m_data - n*StepSize); } + self operator-(const difference_type &n) const { + return self(m_data - n * StepSize); + } //! \brief dereferencing - reference operator*() const - { return *m_data; } + reference operator*() const { return *m_data; } //! \brief pointer - pointer operator->() const - { return m_data; } + pointer operator->() const { return m_data; } //! \brief subscription - reference operator[](const difference_type& n) - { return m_data[n * StepSize]; } + reference operator[](const difference_type &n) { + return m_data[n * StepSize]; + } // friend operators template - friend bool operator==(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator==(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend bool operator!=(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator!=(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend bool operator<(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator<(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend bool operator<=(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator<=(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend bool operator>(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator>(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend bool operator>=(const FixedStrideIterator& x, const FixedStrideIterator& y); + friend bool operator>=(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend typename FixedStrideIterator::difference_type operator+( - const FixedStrideIterator& x, const FixedStrideIterator& y); + friend typename FixedStrideIterator::difference_type + operator+(const FixedStrideIterator &x, + const FixedStrideIterator &y); template - friend typename FixedStrideIterator::difference_type operator-( - const FixedStrideIterator& x, const FixedStrideIterator& y); + friend typename FixedStrideIterator::difference_type + operator-(const FixedStrideIterator &x, + const FixedStrideIterator &y); -private: + private: IterType m_data; }; template -inline -bool operator==(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data == y.m_data); } +inline bool operator==(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data == y.m_data); +} template -inline -bool operator!=(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data != y.m_data); } +inline bool operator!=(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data != y.m_data); +} template -inline -bool operator<(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data < y.m_data); } +inline bool operator<(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data < y.m_data); +} template -inline -bool operator<=(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data <= y.m_data); } +inline bool operator<=(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data <= y.m_data); +} template -inline -bool operator>(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data > y.m_data); } +inline bool operator>(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data > y.m_data); +} template -inline -bool operator>=(const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data >= y.m_data); } +inline bool operator>=(const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data >= y.m_data); +} template -inline -typename FixedStrideIterator::difference_type operator+( - const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data + y.m_data) / SSize; } +inline typename FixedStrideIterator::difference_type operator+( + const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data + y.m_data) / SSize; +} template -inline -typename FixedStrideIterator::difference_type operator-( - const FixedStrideIterator& x, const FixedStrideIterator& y) -{ return (x.m_data - y.m_data) / SSize; } +inline typename FixedStrideIterator::difference_type operator-( + const FixedStrideIterator &x, + const FixedStrideIterator &y) { + return (x.m_data - y.m_data) / SSize; +} -} // pfs +} // pfs -#endif // PFS_FIXEDSTRIDEITERATOR_H +#endif // PFS_FIXEDSTRIDEITERATOR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/frame.cpp luminance-hdr-2.6.0/src/Libpfs/frame.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/frame.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/frame.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,48 +26,34 @@ * Frame definition split from pfs.cpp */ -#include #include #include +#include -#include "frame.h" #include "channel.h" +#include "frame.h" using namespace std; -namespace pfs -{ -Frame::Frame(size_t width, size_t height ) - : m_width( width ) - , m_height( height ) - , m_X(NULL) - , m_Y(NULL) - , m_Z(NULL) -{} - -namespace -{ -struct ChannelDeleter -{ +namespace pfs { +Frame::Frame(size_t width, size_t height) + : m_width(width), m_height(height), m_X(NULL), m_Y(NULL), m_Z(NULL) {} + +namespace { +struct ChannelDeleter { template - inline - void operator()(T* p) - { + inline void operator()(T *p) { delete p; } }; } -Frame::~Frame() -{ - for_each(m_channels.begin(), - m_channels.end(), - ChannelDeleter()); +Frame::~Frame() { + for_each(m_channels.begin(), m_channels.end(), ChannelDeleter()); } //! \brief Changes the size of the frame -void Frame::resize(size_t width, size_t height) -{ +void Frame::resize(size_t width, size_t height) { for_each(m_channels.begin(), m_channels.end(), boost::bind(&Channel::ChannelData::resize, _1, width, height)); @@ -75,31 +61,27 @@ m_height = height; } -namespace -{ -struct FindChannel -{ - explicit FindChannel(const string& nameChannel) - : nameChannel_(nameChannel) - {} - - inline - bool operator()(const Channel* channel) const - { - return !(channel->getName().compare( nameChannel_ )); +namespace { +struct FindChannel { + explicit FindChannel(const string &nameChannel) + : nameChannel_(nameChannel) {} + + inline bool operator()(const Channel *channel) const { + return !(channel->getName().compare(nameChannel_)); } -private: + private: string nameChannel_; }; } -void Frame::getXYZChannels(const Channel* &X, const Channel* &Y, const Channel* &Z ) const -{ +void Frame::getXYZChannels(const Channel *&X, const Channel *&Y, + const Channel *&Z) const { // find X - if ( m_X == NULL || m_Y == NULL || m_Z == NULL ) - { - X = NULL; Y = NULL; Z = NULL; + if (m_X == NULL || m_Y == NULL || m_Z == NULL) { + X = NULL; + Y = NULL; + Z = NULL; return; } @@ -107,116 +89,102 @@ Y = m_Y; Z = m_Z; -// ChannelContainer::const_iterator it( -// find_if(m_channels.begin(), -// m_channels.end(), -// FindChannel("X")) -// ); -// if ( it == m_channels.end() ) -// { -// X = Y = Z = NULL; -// return; -// } -// X = *it; - -// // find Y -// it = find_if(m_channels.begin(), -// m_channels.end(), -// FindChannel("Y")); -// if ( it == m_channels.end() ) -// { -// X = Y = Z = NULL; -// return; -// } -// Y = *it; - -// // find Y -// it = find_if(m_channels.begin(), -// m_channels.end(), -// FindChannel("Z")); -// if ( it == m_channels.end() ) -// { -// X = Y = Z = NULL; -// return; -// } -// Z = *it; -} - -void Frame::getXYZChannels( Channel* &X, Channel* &Y, Channel* &Z ) -{ - const Channel* X_; - const Channel* Y_; - const Channel* Z_; - - static_cast(*this).getXYZChannels(X_, Y_, Z_); - - X = const_cast(X_); - Y = const_cast(Y_); - Z = const_cast(Z_); + // ChannelContainer::const_iterator it( + // find_if(m_channels.begin(), + // m_channels.end(), + // FindChannel("X")) + // ); + // if ( it == m_channels.end() ) + // { + // X = Y = Z = NULL; + // return; + // } + // X = *it; + + // // find Y + // it = find_if(m_channels.begin(), + // m_channels.end(), + // FindChannel("Y")); + // if ( it == m_channels.end() ) + // { + // X = Y = Z = NULL; + // return; + // } + // Y = *it; + + // // find Y + // it = find_if(m_channels.begin(), + // m_channels.end(), + // FindChannel("Z")); + // if ( it == m_channels.end() ) + // { + // X = Y = Z = NULL; + // return; + // } + // Z = *it; +} + +void Frame::getXYZChannels(Channel *&X, Channel *&Y, Channel *&Z) { + const Channel *X_; + const Channel *Y_; + const Channel *Z_; + + static_cast(*this).getXYZChannels(X_, Y_, Z_); + + X = const_cast(X_); + Y = const_cast(Y_); + Z = const_cast(Z_); } -void Frame::createXYZChannels( Channel* &X, Channel* &Y, Channel* &Z ) -{ +void Frame::createXYZChannels(Channel *&X, Channel *&Y, Channel *&Z) { X = createChannel("X"); Y = createChannel("Y"); Z = createChannel("Z"); } -const Channel* Frame::getChannel(const string &name) const -{ - ChannelContainer::const_iterator it = find_if(m_channels.begin(), - m_channels.end(), - FindChannel(name)); - if ( it == m_channels.end() ) +const Channel *Frame::getChannel(const string &name) const { + ChannelContainer::const_iterator it = + find_if(m_channels.begin(), m_channels.end(), FindChannel(name)); + if (it == m_channels.end()) return NULL; else return *it; } -Channel* Frame::getChannel(const string& name) -{ - return const_cast(static_cast(*this).getChannel(name)); +Channel *Frame::getChannel(const string &name) { + return const_cast( + static_cast(*this).getChannel(name)); } -Channel* Frame::createChannel(const string& name) -{ - Channel* ch = NULL; - ChannelContainer::iterator it = find_if(m_channels.begin(), - m_channels.end(), - FindChannel(name)); - if ( it != m_channels.end() ) - { +Channel *Frame::createChannel(const string &name) { + Channel *ch = NULL; + ChannelContainer::iterator it = + find_if(m_channels.begin(), m_channels.end(), FindChannel(name)); + if (it != m_channels.end()) { ch = *it; - } - else - { - ch = new Channel( m_width, m_height, name ); - m_channels.push_back( ch ); + } else { + ch = new Channel(m_width, m_height, name); + m_channels.push_back(ch); } // update the cache, if necessary - if ( name == "X" ) { + if (name == "X") { m_X = ch; - } - else if ( name == "Y" ) { + } else if (name == "Y") { m_Y = ch; - } - else if ( name == "Z" ) { + } else if (name == "Z") { m_Z = ch; } return ch; } -void Frame::removeChannel(const string& channel) -{ - ChannelContainer::iterator it = find_if(m_channels.begin(), - m_channels.end(), - FindChannel(channel)); - if ( it != m_channels.end() ) - { - Channel* ch = *it; - m_channels.erase( it ); +void Frame::removeChannel(const string &channel) { + ChannelContainer::iterator it = + find_if(m_channels.begin(), m_channels.end(), FindChannel(channel)); + if (it != m_channels.end()) { + Channel *ch = *it; + m_channels.erase(it); delete ch; if (channel == "X") { @@ -229,40 +197,25 @@ } } -ChannelContainer& Frame::getChannels() -{ - return this->m_channels; -} +ChannelContainer &Frame::getChannels() { return this->m_channels; } -const ChannelContainer& Frame::getChannels() const -{ - return this->m_channels; -} +const ChannelContainer &Frame::getChannels() const { return this->m_channels; } -TagContainer& Frame::getTags() -{ - return m_tags; -} +TagContainer &Frame::getTags() { return m_tags; } -const TagContainer& Frame::getTags() const -{ - return m_tags; -} +const TagContainer &Frame::getTags() const { return m_tags; } -void Frame::swap(Frame& other) -{ +void Frame::swap(Frame &other) { using std::swap; swap(m_width, other.m_width); swap(m_height, other.m_height); - m_channels.swap( other.m_channels ); - m_tags.swap( other.m_tags ); + m_channels.swap(other.m_channels); + m_tags.swap(other.m_tags); swap(m_X, other.m_X); swap(m_Y, other.m_Y); swap(m_Z, other.m_Z); } -} // namespace pfs - - +} // namespace pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/frame.h luminance-hdr-2.6.0/src/Libpfs/frame.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/frame.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/frame.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,38 +30,34 @@ #ifndef PFS_FRAME_H #define PFS_FRAME_H +#include #include #include -#include #include #include -namespace pfs -{ +namespace pfs { -typedef std::vector< Channel* > ChannelContainer; +typedef std::vector ChannelContainer; //! Interface representing a single PFS frame. Frame may contain 0 //! or more channels (e.g. color XYZ, depth channel, alpha //! channnel). All the channels are of the same size. Frame can //! also contain additional information in tags (see getTags). -class Frame -{ -public: +class Frame { + public: Frame(size_t width = 0, size_t height = 0); ~Frame(); - bool isValid() const { - return (getWidth() > 0 && getHeight() > 0); - } + bool isValid() const { return (getWidth() > 0 && getHeight() > 0); } //! \return width of the frame (in pixels). - inline size_t getWidth() const { return m_width; } + inline size_t getWidth() const { return m_width; } //! \return height of the frame (in pixels). inline size_t getHeight() const { return m_height; } //! \return height * width - inline size_t size() const { return m_height*m_width; } + inline size_t size() const { return m_height * m_width; } //! \brief Changes the size of the frame void resize(size_t width, size_t height); @@ -74,9 +70,10 @@ //! \param X [out] a pointer to store X channel in //! \param Y [out] a pointer to store Y channel in //! \param Z [out] a pointer to store Z channel in - void getXYZChannels(Channel* &X, Channel* &Y, Channel* &Z); + void getXYZChannels(Channel *&X, Channel *&Y, Channel *&Z); - void getXYZChannels(const Channel* &X, const Channel* &Y, const Channel* &Z) const; + void getXYZChannels(const Channel *&X, const Channel *&Y, + const Channel *&Z) const; //! Creates color channels in XYZ color space. If such channels //! already exists, returns existing channels, rather than @@ -86,15 +83,15 @@ //! \param X [out] a pointer to store X channel in //! \param Y [out] a pointer to store Y channel in //! \param Z [out] a pointer to store Z channel in - void createXYZChannels(Channel* &X, Channel* &Y, Channel* &Z); + void createXYZChannels(Channel *&X, Channel *&Y, Channel *&Z); //! Gets a named channel. //! //! \param name [in] name of the channel. Name must be 8 or less //! character long. //! \return channel or NULL if the channel does not exist - Channel* getChannel(const std::string& name); - const Channel* getChannel(const std::string &name) const; + Channel *getChannel(const std::string &name); + const Channel *getChannel(const std::string &name) const; //! Creates a named channel. If the channel already exists, returns //! existing channel. @@ -106,30 +103,31 @@ //! \param name [in] name of the channel. Name must be 8 or less //! character long. //! \return existing or newly created channel - Channel *createChannel(const std::string& name); + Channel *createChannel(const std::string &name); //! Removes a channel. It is safe to remove the channel pointed by //! the ChannelIterator. //! //! \param channel [in] channel that should be removed. - void removeChannel(const std::string& channel); + void removeChannel(const std::string &channel); - //! \return \c ChannelContainer associated to the internal list of \c Channel - ChannelContainer& getChannels(); + //! \return \c ChannelContainer associated to the internal list of \c + //! Channel + ChannelContainer &getChannels(); - const ChannelContainer& getChannels() const; + const ChannelContainer &getChannels() const; //! \brief Returns TagContainer that can be used to access or modify //! tags associated with this Frame object. - TagContainer& getTags(); + TagContainer &getTags(); //! Returns TagContainer that can be used to access or modify //! tags associated with this Frame object. - const TagContainer& getTags() const; + const TagContainer &getTags() const; - void swap(Frame& other); + void swap(Frame &other); -private: + private: size_t m_width; size_t m_height; @@ -137,13 +135,13 @@ ChannelContainer m_channels; // cache for X Y Z - Channel* m_X; - Channel* m_Y; - Channel* m_Z; + Channel *m_X; + Channel *m_Y; + Channel *m_Z; }; -typedef std::shared_ptr< pfs::Frame > FramePtr; +typedef std::shared_ptr FramePtr; -} // namespace pfs +} // namespace pfs -#endif // PFS_FRAME_H +#endif // PFS_FRAME_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/exrreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/exrreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,12 +25,12 @@ //! \author Davide Anastasia //! Adaptation for Luminance HDR and other small improvements -#include #include +#include #include #include -#include #include +#include #include #include @@ -38,22 +38,20 @@ #include #include -#include #include +#include using namespace Imf; using namespace Imath; using namespace std; namespace { -static string escapeString( const string &src ) -{ +static string escapeString(const string &src) { size_t pos = 0; string ret = src; - while ( pos < ret.size() ) - { - pos = ret.find( "\n", pos ); - if ( pos == string::npos ) break; + while (pos < ret.size()) { + pos = ret.find("\n", pos); + if (pos == string::npos) break; ret.replace(pos, 1, "\\n"); pos += 2; } @@ -65,35 +63,29 @@ namespace io { class EXRReader::EXRReaderData { -public: - explicit EXRReaderData(const string& filename) + public: + explicit EXRReaderData(const string &filename) : file_(filename.c_str()) - // , dw_(file_.header().displayWindow()) - , dtw_(file_.header().dataWindow()) - {} + // , dw_(file_.header().displayWindow()) + , + dtw_(file_.header().dataWindow()) {} Imf::InputFile file_; // Box2i dtw_; Box2i dtw_; }; -EXRReader::EXRReader(const string &filename) - : FrameReader(filename) -{ +EXRReader::EXRReader(const string &filename) : FrameReader(filename) { EXRReader::open(); } -EXRReader::~EXRReader() -{ - close(); -} +EXRReader::~EXRReader() { close(); } -void EXRReader::open() -{ +void EXRReader::open() { // open file and read dimensions - m_data.reset( new EXRReaderData(filename().c_str()) ); + m_data.reset(new EXRReaderData(filename().c_str())); - int width = m_data->dtw_.max.x - m_data->dtw_.min.x + 1; + int width = m_data->dtw_.max.x - m_data->dtw_.min.x + 1; int height = m_data->dtw_.max.y - m_data->dtw_.min.y + 1; assert(width > 0); @@ -104,16 +96,19 @@ bool green = false; bool blue = false; const ChannelList &channels = m_data->file_.header().channels(); - for ( ChannelList::ConstIterator i = channels.begin(), iEnd = channels.end(); - i != iEnd; ++i ) - { - if ( !strcmp(i.name(), "R") ) red = true; - else if ( !strcmp(i.name(), "G") ) green = true; - else if ( !strcmp(i.name(), "B") ) blue = true; + for (ChannelList::ConstIterator i = channels.begin(), iEnd = channels.end(); + i != iEnd; ++i) { + if (!strcmp(i.name(), "R")) + red = true; + else if (!strcmp(i.name(), "G")) + green = true; + else if (!strcmp(i.name(), "B")) + blue = true; } - if ( !(red && green && blue) ) { - throw pfs::io::InvalidHeader("OpenEXR file " + filename() + " does " \ + if (!(red && green && blue)) { + throw pfs::io::InvalidHeader("OpenEXR file " + filename() + + " does " " not contain RGB data"); } @@ -133,58 +128,58 @@ setHeight(height); } -void EXRReader::close() -{ +void EXRReader::close() { m_data.reset(); setWidth(0); setHeight(0); } -void EXRReader::read(Frame & frame, const Params &/*params*/) -{ - if ( !isOpen() ) open(); +void EXRReader::read(Frame &frame, const Params & /*params*/) { + if (!isOpen()) open(); // helpers... - InputFile& file = m_data->file_; - Box2i& dtw = m_data->dtw_; + InputFile &file = m_data->file_; + Box2i &dtw = m_data->dtw_; - pfs::Frame tempFrame( width(), height() ); + pfs::Frame tempFrame(width(), height()); pfs::Channel *X, *Y, *Z; - tempFrame.createXYZChannels( X, Y, Z ); + tempFrame.createXYZChannels(X, Y, Z); FrameBuffer frameBuffer; - frameBuffer.insert( "R", // name - Slice( FLOAT, // type - (char*)(X->data() - dtw.min.x - dtw.min.y * width()), - sizeof(float), // xStride - sizeof(float) * width(), // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - frameBuffer.insert( "G", // name - Slice( FLOAT, // type - (char*)(Y->data() - dtw.min.x - dtw.min.y * width()), - sizeof(float), // xStride - sizeof(float) * width(), // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - frameBuffer.insert( "B", // name - Slice( FLOAT, // type - (char*)(Z->data() - dtw.min.x - dtw.min.y * width()), - sizeof(float), // xStride - sizeof(float) * width(), // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - + frameBuffer.insert( + "R", // name + Slice(FLOAT, // type + (char *)(X->data() - dtw.min.x - dtw.min.y * width()), + sizeof(float), // xStride + sizeof(float) * width(), // yStride + 1, 1, // x/y sampling + 0.0)); // fillValue + + frameBuffer.insert( + "G", // name + Slice(FLOAT, // type + (char *)(Y->data() - dtw.min.x - dtw.min.y * width()), + sizeof(float), // xStride + sizeof(float) * width(), // yStride + 1, 1, // x/y sampling + 0.0)); // fillValue + + frameBuffer.insert( + "B", // name + Slice(FLOAT, // type + (char *)(Z->data() - dtw.min.x - dtw.min.y * width()), + sizeof(float), // xStride + sizeof(float) * width(), // yStride + 1, 1, // x/y sampling + 0.0)); // fillValue // I know I have the channels I need because I have checked that I have the // RGB channels. Hence, I don't load any further that that... /* const ChannelList &channels = file.header().channels(); - for ( ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i ) + for ( ChannelList::ConstIterator i = channels.begin(); i != channels.end(); + ++i ) { if ( !strcmp( i.name(), "R" ) || !strcmp( i.name(), "G" ) || !strcmp( i.name(), "B" ) ) continue; @@ -196,58 +191,57 @@ pfs::Channel *pfsCh = tempFrame.createChannel( channelName ); frameBuffer.insert( i.name(), // name Slice( FLOAT, // type - (char *)(pfsCh->data() - dtw.min.x - dtw.min.y * width()), + (char *)(pfsCh->data() - dtw.min.x - + dtw.min.y + * width()), sizeof(float), // xStride sizeof(float) * width(), // yStride - 1, 1, // x/y sampling + 1, 1, // x/y + sampling 0.0)); // fillValue } */ // Copy attributes to tags - for ( Header::ConstIterator it = file.header().begin(), itEnd = file.header().end(); - it != itEnd; ++it ) - { + for (Header::ConstIterator it = file.header().begin(), + itEnd = file.header().end(); + it != itEnd; ++it) { const char *attribName = it.name(); const StringAttribute *attrib = - file.header().findTypedAttribute(attribName); + file.header().findTypedAttribute(attribName); - if ( attrib == NULL ) continue; // Skip if type is not String + if (attrib == NULL) continue; // Skip if type is not String - // fprintf( stderr, "Tag: %s = %s\n", attribName, attrib->value().c_str() ); + // fprintf( stderr, "Tag: %s = %s\n", attribName, + // attrib->value().c_str() ); - const char *colon = strstr( attribName, ":" ); - if ( colon == NULL ) // frame tag + const char *colon = strstr(attribName, ":"); + if (colon == NULL) // frame tag { - tempFrame.getTags().setTag( attribName, - escapeString(attrib->value()) ); - } - else // channel tag + tempFrame.getTags().setTag(attribName, + escapeString(attrib->value())); + } else // channel tag { - std::string channelName = string( attribName, colon-attribName ); - pfs::Channel *ch = tempFrame.getChannel( channelName ); - if ( ch == NULL ) { - std::cerr << " Warning! Can not set tag for " - << channelName + std::string channelName = string(attribName, colon - attribName); + pfs::Channel *ch = tempFrame.getChannel(channelName); + if (ch == NULL) { + std::cerr << " Warning! Can not set tag for " << channelName << " channel because it does not exist\n"; } else { - ch->getTags().setTag(colon + 1, - escapeString( attrib->value() )); + ch->getTags().setTag(colon + 1, escapeString(attrib->value())); } } } - file.setFrameBuffer( frameBuffer ); - file.readPixels( dtw.min.y, dtw.max.y ); + file.setFrameBuffer(frameBuffer); + file.readPixels(dtw.min.y, dtw.max.y); // Rescale values if WhiteLuminance is present - if ( hasWhiteLuminance( file.header() ) ) - { - float scaleFactor = whiteLuminance( file.header() ); - int pixelCount = tempFrame.getHeight()*tempFrame.getWidth(); + if (hasWhiteLuminance(file.header())) { + float scaleFactor = whiteLuminance(file.header()); + int pixelCount = tempFrame.getHeight() * tempFrame.getWidth(); - for ( int i = 0; i < pixelCount; i++ ) - { + for (int i = 0; i < pixelCount; i++) { (*X)(i) *= scaleFactor; (*Y)(i) *= scaleFactor; (*Z)(i) *= scaleFactor; @@ -257,16 +251,15 @@ // file.header().findTypedAttribute("RELATIVE_LUMINANCE"); std::string luminanceTag = tempFrame.getTags().getTag("LUMINANCE"); - if ( luminanceTag.empty() ) - { + if (luminanceTag.empty()) { tempFrame.getTags().setTag("LUMINANCE", "ABSOLUTE"); } } - tempFrame.getTags().setTag( "FILE_NAME", filename() ); + tempFrame.getTags().setTag("FILE_NAME", filename()); - frame.swap( tempFrame ); + frame.swap(tempFrame); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrreader.h luminance-hdr-2.6.0/src/Libpfs/io/exrreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/exrreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,25 +28,23 @@ namespace io { class EXRReader : public FrameReader { -public: - EXRReader(const std::string& filename); + public: + EXRReader(const std::string &filename); ~EXRReader(); - bool isOpen() const - { return (m_data.get() != NULL); } + bool isOpen() const { return (m_data.get() != NULL); } void close(); void open(); void read(Frame &frame, const Params ¶ms); -protected: + protected: class EXRReaderData; std::unique_ptr m_data; }; -} // io -} // pfs +} // io +} // pfs - -#endif // #ifndef PFS_IO_EXRREADER_H +#endif // #ifndef PFS_IO_EXRREADER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrwriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/exrwriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrwriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/exrwriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -20,15 +20,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- */ -#include #include +#include #include #include -#include #include +#include -#include #include +#include #include #include @@ -42,43 +42,38 @@ namespace pfs { namespace io { -EXRWriter::EXRWriter(const string &filename) - : FrameWriter(filename) -{} +EXRWriter::EXRWriter(const string &filename) : FrameWriter(filename) {} -bool EXRWriter::write(const Frame &frame, const Params &/*params*/) -{ +bool EXRWriter::write(const Frame &frame, const Params & /*params*/) { // Channels are named (X Y Z) but contain (R G B) data const pfs::Channel *R, *G, *B; frame.getXYZChannels(R, G, B); - Header header(frame.getWidth(), - frame.getHeight(), - 1, // aspect ratio - Imath::V2f (0, 0), // screenWindowCenter - 1, // screenWindowWidth - INCREASING_Y, // lineOrder + Header header(frame.getWidth(), frame.getHeight(), + 1, // aspect ratio + Imath::V2f(0, 0), // screenWindowCenter + 1, // screenWindowWidth + INCREASING_Y, // lineOrder PIZ_COMPRESSION); // Copy tags to attributes pfs::TagContainer::const_iterator it = frame.getTags().begin(); pfs::TagContainer::const_iterator itEnd = frame.getTags().end(); - for ( ; it != itEnd; ++it ) { + for (; it != itEnd; ++it) { header.insert(it->first.c_str(), StringAttribute(it->second)); } // Copy all channel tags - const pfs::ChannelContainer& channels = frame.getChannels(); + const pfs::ChannelContainer &channels = frame.getChannels(); for (pfs::ChannelContainer::const_iterator ch = channels.begin(); - ch != channels.end(); ++ch) - { - std::string channelName = (*ch)->getName(); - pfs::TagContainer::const_iterator it = (*ch)->getTags().begin(); + ch != channels.end(); ++ch) { + std::string channelName = (*ch)->getName(); + pfs::TagContainer::const_iterator it = (*ch)->getTags().begin(); pfs::TagContainer::const_iterator itEnd = (*ch)->getTags().end(); - for ( ; it != itEnd; ++it ) { + for (; it != itEnd; ++it) { header.insert(string(channelName + ":" + it->first).c_str(), StringAttribute(it->second)); } @@ -90,25 +85,25 @@ // and // Create channels in FrameBuffer header.channels().insert("R", Imf::Channel(FLOAT)); - frameBuffer.insert("R", // name - Slice( FLOAT, // type - (char*)R->data(), // base - sizeof(float) * 1, // xStride - sizeof(float) * frame.getWidth()) ); // yStride + frameBuffer.insert("R", // name + Slice(FLOAT, // type + (char *)R->data(), // base + sizeof(float) * 1, // xStride + sizeof(float) * frame.getWidth())); // yStride header.channels().insert("G", Imf::Channel(FLOAT)); - frameBuffer.insert("G", // name - Slice( FLOAT, // type - (char*)G->data(), // base - sizeof(float) * 1, // xStride - sizeof(float) * frame.getWidth()) ); // yStride + frameBuffer.insert("G", // name + Slice(FLOAT, // type + (char *)G->data(), // base + sizeof(float) * 1, // xStride + sizeof(float) * frame.getWidth())); // yStride header.channels().insert("B", Imf::Channel(FLOAT)); - frameBuffer.insert("B", // name - Slice( FLOAT, // type - (char*)B->data(), // base - sizeof(float) * 1, // xStride - sizeof(float) * frame.getWidth()) ); // yStride + frameBuffer.insert("B", // name + Slice(FLOAT, // type + (char *)B->data(), // base + sizeof(float) * 1, // xStride + sizeof(float) * frame.getWidth())); // yStride OutputFile file(filename().c_str(), header); file.setFrameBuffer(frameBuffer); @@ -117,5 +112,5 @@ return true; } -} // pfs -} // io +} // pfs +} // io diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrwriter.h luminance-hdr-2.6.0/src/Libpfs/io/exrwriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/exrwriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/exrwriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -36,14 +36,13 @@ namespace io { class EXRWriter : public FrameWriter { -public: - EXRWriter(const std::string& filename); + public: + EXRWriter(const std::string &filename); bool write(const Frame &frame, const Params ¶ms); }; -} // pfs -} // io - -#endif // PFS_IO_EXRWRITER_H +} // pfs +} // io +#endif // PFS_IO_EXRWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/fitsreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/fitsreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/fitsreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/fitsreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,15 +23,16 @@ #include -#include #include +#include -#include #include +#include +#include // include windows.h to avoid TBYTE define clashes with fitsio.h #ifdef Q_OS_WIN -#define _WINSOCKAPI_ // stops windows.h including winsock.h +#define _WINSOCKAPI_ // stops windows.h including winsock.h #include #endif @@ -44,21 +45,13 @@ namespace pfs { namespace io { -class FitsReaderData -{ -public: +class FitsReaderData { + public: FitsReaderData() - : m_format(0) - , m_status(0) - , m_bscale(1.f) - , m_bzero(0.f) - , m_ptr(NULL) - {} - - ~FitsReaderData() - { - if (m_ptr != NULL) - { + : m_format(0), m_status(0), m_bscale(1.f), m_bzero(0.f), m_ptr(NULL) {} + + ~FitsReaderData() { + if (m_ptr != NULL) { fits_close_file(m_ptr, &m_status); } } @@ -68,41 +61,36 @@ float m_bscale; float m_bzero; - fitsfile* m_ptr; + fitsfile *m_ptr; }; -FitsReader::FitsReader(const std::string& filename) - : FrameReader(filename) -{ +FitsReader::FitsReader(const std::string &filename) : FrameReader(filename) { FitsReader::open(); } -FitsReader::~FitsReader() -{} +FitsReader::~FitsReader() {} -void FitsReader::open() -{ +void FitsReader::open() { m_data.reset(new FitsReaderData()); // open stream - if ( fits_open_file(&m_data->m_ptr, filename().c_str(), READONLY, &m_data->m_status) ) - { - throw InvalidFile("Cannot open file " + filename() + - "FITS error " + boost::lexical_cast(m_data->m_status)); + if (fits_open_file(&m_data->m_ptr, filename().c_str(), READONLY, + &m_data->m_status)) { + throw InvalidFile("Cannot open file " + filename() + "FITS error " + + boost::lexical_cast(m_data->m_status)); } // read image size int nfound; long naxes[2]; - if ( fits_read_keys_lng(m_data->m_ptr, "NAXIS", 1, 2, naxes, &nfound, &m_data->m_status) ) - { + if (fits_read_keys_lng(m_data->m_ptr, "NAXIS", 1, 2, naxes, &nfound, + &m_data->m_status)) { fits_close_file(m_data->m_ptr, &m_data->m_status); throw InvalidHeader("Could not find the size of the data range"); } - if (nfound == 0) - { + if (nfound == 0) { fits_close_file(m_data->m_ptr, &m_data->m_status); throw InvalidHeader("No image data array present"); } @@ -116,8 +104,7 @@ char error_string[FLEN_ERRMSG]; fits_read_key_flt(m_data->m_ptr, "BSCALE", &bscale, NULL, &status); - if (status) - { + if (status) { fits_get_errstatus(status, error_string); #ifndef NDEBUG std::cout << "BSCALE: " << error_string << std::endl; @@ -127,8 +114,7 @@ } fits_read_key_flt(m_data->m_ptr, "BZERO", &bzero, NULL, &status); - if (status) - { + if (status) { fits_get_errstatus(status, error_string); #ifndef NDEBUG std::cout << "BZERO: " << error_string << std::endl; @@ -138,8 +124,7 @@ } fits_read_key_lng(m_data->m_ptr, "BITPIX", &bitpix, NULL, &status); - if (status) - { + if (status) { fits_get_errstatus(status, error_string); #ifndef NDEBUG std::cout << "BITPIX: " << error_string << std::endl; @@ -155,28 +140,24 @@ #ifndef NDEBUG std::cout << "Size: w: " << width() << " height = " << height() - << " bitpix = " << bitpix - << " bscale = " << bscale - << " bzero = " << bzero - << " status = " << m_data->m_status << std::endl; + << " bitpix = " << bitpix << " bscale = " << bscale + << " bzero = " << bzero << " status = " << m_data->m_status + << std::endl; #endif } - -void FitsReader::close() -{ +void FitsReader::close() { setWidth(0); setHeight(0); m_data.reset(); } -void FitsReader::read(Frame &frame, const Params&) -{ - if ( !isOpen() ) open(); +void FitsReader::read(Frame &frame, const Params &) { + if (!isOpen()) open(); #ifndef NDEBUG std::cout << "size (" << width() << ", " << height() << ")"; - std::cout << "contents.size (pixels) = " << width()*height() << std::endl; + std::cout << "contents.size (pixels) = " << width() * height() << std::endl; #endif long fpixel = 1; @@ -190,142 +171,132 @@ Channel::iterator it = Xc->begin(); float bscale = m_data->m_bscale; - float bzero = m_data->m_bzero; + float bzero = m_data->m_bzero; - if (m_data->m_format == FLOAT_IMG) - { + if (m_data->m_format == FLOAT_IMG) { std::vector buffer(width()); - float nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { + float nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { if (fits_read_img(m_data->m_ptr, TFLOAT, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + buffer.data(), &anynull, &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("FLOAT: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer.begin(), - [bscale, bzero](float c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer.begin(), + [bscale, bzero](float c) { return bscale * c + bzero; }); it = std::copy(buffer.begin(), buffer.end(), it); - } - } - else if (m_data->m_format == DOUBLE_IMG) - { + } + } else if (m_data->m_format == DOUBLE_IMG) { std::vector buffer(width()); - double nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { + double nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { if (fits_read_img(m_data->m_ptr, TDOUBLE, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + buffer.data(), &anynull, &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("DOUBLE: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer.begin(), - [bscale, bzero](double c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer.begin(), + [bscale, bzero](double c) { return bscale * c + bzero; }); it = std::copy(buffer.begin(), buffer.end(), it); } - } - else if (m_data->m_format == BYTE_IMG) - { + } else if (m_data->m_format == BYTE_IMG) { std::vector buffer(width()); std::vector buffer_flt(width()); - short nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { + short nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { if (fits_read_img(m_data->m_ptr, TINT, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + buffer.data(), &anynull, &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("BYTE: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer_flt.begin(), - [bscale, bzero](short c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer_flt.begin(), + [bscale, bzero](short c) { return bscale * c + bzero; }); it = std::copy(buffer_flt.begin(), buffer_flt.end(), it); } - } - else if (m_data->m_format == SHORT_IMG) - { + } else if (m_data->m_format == SHORT_IMG) { std::vector buffer(width()); std::vector buffer_flt(width()); - int nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { + int nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { if (fits_read_img(m_data->m_ptr, TINT, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + buffer.data(), &anynull, &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("SHORT: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer_flt.begin(), - [bscale, bzero](int c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer_flt.begin(), + [bscale, bzero](int c) { return bscale * c + bzero; }); it = std::copy(buffer_flt.begin(), buffer_flt.end(), it); } - } - else if (m_data->m_format == LONG_IMG) - { + } else if (m_data->m_format == LONG_IMG) { std::vector buffer(width()); std::vector buffer_flt(width()); - long nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { + long nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { if (fits_read_img(m_data->m_ptr, TLONG, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + buffer.data(), &anynull, &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("LONG: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer_flt.begin(), - [bscale, bzero](long c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer_flt.begin(), + [bscale, bzero](long c) { return bscale * c + bzero; }); it = std::copy(buffer_flt.begin(), buffer_flt.end(), it); } - } - else if (m_data->m_format == LONGLONG_IMG) - { + } else if (m_data->m_format == LONGLONG_IMG) { std::vector buffer(width()); std::vector buffer_flt(width()); - long long nullval = 0; // don't check for null values in the image - for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) - { - if (fits_read_img(m_data->m_ptr, TLONGLONG, fpixel, nbuffer, &nullval, - buffer.data(), &anynull, &m_data->m_status) ) - { + long long nullval = 0; // don't check for null values in the image + for (size_t i = 0; i < height(); ++i, fpixel += nbuffer) { + if (fits_read_img(m_data->m_ptr, TLONGLONG, fpixel, nbuffer, + &nullval, buffer.data(), &anynull, + &m_data->m_status)) { char error_string[FLEN_ERRMSG]; fits_get_errstatus(m_data->m_status, error_string); fits_close_file(m_data->m_ptr, &m_data->m_status); throw std::runtime_error("LONG: Cannot read strip " + - boost::lexical_cast(i) + ". " + error_string); + boost::lexical_cast(i) + + ". " + error_string); } - std::transform(buffer.begin(), buffer.end(), buffer_flt.begin(), - [bscale, bzero](long long c) { return bscale * c + bzero; }); + std::transform( + buffer.begin(), buffer.end(), buffer_flt.begin(), + [bscale, bzero](long long c) { return bscale * c + bzero; }); it = std::copy(buffer_flt.begin(), buffer_flt.end(), it); } } #ifndef NDEBUG - std::pair minmax = - boost::minmax_element(Xc->begin(), Xc->end()); + std::pair + minmax = boost::minmax_element(Xc->begin(), Xc->end()); std::cout << "FITS min luminance = " << *minmax.first << std::endl; std::cout << "FITS max luminance = " << *minmax.second << std::endl; #endif @@ -337,5 +308,5 @@ frame.swap(tempFrame); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/fitsreader.h luminance-hdr-2.6.0/src/Libpfs/io/fitsreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/fitsreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/fitsreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,13 +25,12 @@ #ifndef PFS_IO_FITSREADER_H #define PFS_IO_FITSREADER_H -#include #include +#include -#include #include #include - +#include namespace pfs { class Frame; @@ -40,25 +39,23 @@ class FitsReaderData; -class FitsReader : public FrameReader -{ -public: - FitsReader(const std::string& filename); +class FitsReader : public FrameReader { + public: + FitsReader(const std::string &filename); ~FitsReader(); - bool isOpen() const - { return m_data.get(); } + bool isOpen() const { return m_data.get(); } void open(); void close(); void read(Frame &frame, const Params &); -private: + private: std::unique_ptr m_data; }; -} // io -} // pfs +} // io +} // pfs #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereader.cpp luminance-hdr-2.6.0/src/Libpfs/io/framereader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framereader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,39 +22,32 @@ #include #include -#include #include +#include namespace pfs { namespace io { -FrameReader::FrameReader(const std::string& filename) - : m_filename(filename) - , m_width(0) - , m_height(0) -{} +FrameReader::FrameReader(const std::string &filename) + : m_filename(filename), m_width(0), m_height(0) {} -FrameReader::~FrameReader() -{} +FrameReader::~FrameReader() {} -void FrameReader::read(pfs::Frame& frame, const pfs::Params& params) -{ +void FrameReader::read(pfs::Frame &frame, const pfs::Params ¶ms) { pfs::exif::ExifData exifData(m_filename); int rotation = exifData.getOrientationDegree(); - if (rotation == 270 || rotation == 90 || rotation == 180) - { + if (rotation == 270 || rotation == 90 || rotation == 180) { Frame *rotatedHalf = pfs::rotate(&frame, rotation != 270); frame.swap(*rotatedHalf); delete rotatedHalf; } - if (rotation == 180) - { + if (rotation == 180) { Frame *rotatedHalf = pfs::rotate(&frame, true); frame.swap(*rotatedHalf); delete rotatedHalf; } } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereaderfactory.cpp luminance-hdr-2.6.0/src/Libpfs/io/framereaderfactory.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereaderfactory.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framereaderfactory.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,8 +19,8 @@ * ---------------------------------------------------------------------- */ -#include #include +#include using namespace boost::assign; using namespace std; @@ -30,101 +30,92 @@ using pfs::utils::getFormat; -FrameReaderPtr FrameReaderFactory::open(const std::string& filename) -{ +FrameReaderPtr FrameReaderFactory::open(const std::string &filename) { string ext = getFormat(filename); - if ( !ext.empty() ) - { + if (!ext.empty()) { FrameReaderCreatorMap::const_iterator it = sm_registry.find(ext); - if ( it != sm_registry.end() ) - { + if (it != sm_registry.end()) { return (it->second)(filename); } } throw UnsupportedFormat("Cannot find the correct handler for " + filename); } -void FrameReaderFactory::registerFormat(const std::string& format, - FrameReaderFactory::FrameReaderCreator creator) -{ - sm_registry.insert( FrameReaderCreatorMap::value_type(format, creator) ); +void FrameReaderFactory::registerFormat( + const std::string &format, FrameReaderFactory::FrameReaderCreator creator) { + sm_registry.insert(FrameReaderCreatorMap::value_type(format, creator)); } -size_t FrameReaderFactory::numRegisteredFormats() -{ - return sm_registry.size(); -} +size_t FrameReaderFactory::numRegisteredFormats() { return sm_registry.size(); } -bool FrameReaderFactory::isSupported(const std::string& format) -{ +bool FrameReaderFactory::isSupported(const std::string &format) { return sm_registry.count(format); } -} // io -} // pfs - +} // io +} // pfs // Factory subscriptions --------------------------------------------------- +#include #include #include -#include -#include #include +#include #include #ifdef HAVE_CFITSIO - #include +#include #endif namespace pfs { namespace io { template -FrameReaderPtr creator(const std::string& filename) { +FrameReaderPtr creator(const std::string &filename) { return FrameReaderPtr(std::make_shared(filename)); } FrameReaderFactory::FrameReaderCreatorMap FrameReaderFactory::sm_registry = - map_list_of - // LDR formats - ("jpeg", creator) - ("jpg", creator) - // HDR formats - ("pfs", creator) - ("exr", creator) - ("hdr", creator) - // RAW formats - ("crw", creator) - ("cr2", creator) - ("nef", creator) - ("dng", creator) - ("mrw", creator) - ("orf", creator) - ("kdc", creator) - ("dcr", creator) - ("arw", creator) - ("raf", creator) - ("ptx", creator) - ("pef", creator) - ("x3f", creator) - ("raw", creator) - ("sr2", creator) - ("3fr", creator) - ("rw2", creator) - ("mef", creator) - ("mos", creator) - ("erf", creator) - ("nrw", creator) - ("srw", creator) - // tiff - ("tif", creator) - ("tiff", creator) + map_list_of + // LDR formats + ("jpeg", creator) + ("jpg", creator) + // HDR formats + ("pfs", creator) + ("exr", creator) + ("hdr",creator) + // RAW formats + ("crw", creator) + ("cr2", creator) + ("nef", creator) + ("dng", creator) + ("mrw", creator) + ("orf", creator) + ("kdc", creator) + ("dcr", creator) + ("arw", creator) + ("raf", creator) + ("ptx", creator) + ("pef", creator) + ("x3f", creator) + ("raw", creator) + ("sr2", creator) + ("3fr", creator) + ("rw2", creator) + ("mef", creator) + ("mos", creator) + ("erf", creator) + ("nrw", creator) + ("srw", creator) + // tiff + ("tif", creator) + ("tiff", creator) #ifdef HAVE_CFITSIO - // fits - ("fit", creator) - ("fits", creator) + // fits + ("fit", creator) + ("fits", creator) #endif - ; + ; -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereaderfactory.h luminance-hdr-2.6.0/src/Libpfs/io/framereaderfactory.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereaderfactory.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framereaderfactory.h 2019-06-09 19:18:38.000000000 +0000 @@ -19,36 +19,41 @@ * ---------------------------------------------------------------------- */ -//! \brief FrameReaderFactory, creation of FrameReader based on the input filename +//! \brief FrameReaderFactory, creation of FrameReader based on the input +//! filename //! \author Davide Anastasia #ifndef PFS_IO_FRAMEREADERFACTORY_H #define PFS_IO_FRAMEREADERFACTORY_H -#include -#include #include #include #include +#include +#include namespace pfs { namespace io { class FrameReaderFactory { -public: - typedef FrameReaderPtr (*FrameReaderCreator)(const std::string& filename); - typedef std::map FrameReaderCreatorMap; + public: + typedef FrameReaderPtr (*FrameReaderCreator)(const std::string &filename); + typedef std::map + FrameReaderCreatorMap; - static FrameReaderPtr open(const std::string& filename); + static FrameReaderPtr open(const std::string &filename); - static void registerFormat(const std::string& format, FrameReaderCreator creator); + static void registerFormat(const std::string &format, + FrameReaderCreator creator); static size_t numRegisteredFormats(); - static bool isSupported(const std::string& format); -private: + static bool isSupported(const std::string &format); + + private: static FrameReaderCreatorMap sm_registry; }; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_FRAMEREADERFACTORY_H +#endif // PFS_IO_FRAMEREADERFACTORY_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereader.h luminance-hdr-2.6.0/src/Libpfs/io/framereader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framereader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framereader.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,8 +25,8 @@ #ifndef PFS_IO_FRAMEREADER_H #define PFS_IO_FRAMEREADER_H -#include #include +#include #include @@ -35,30 +35,29 @@ namespace io { -class FrameReader -{ -public: - FrameReader(const std::string& filename); +class FrameReader { + public: + FrameReader(const std::string &filename); virtual ~FrameReader(); //! \brief filename of the file being read - const std::string& filename() const { return m_filename; } + const std::string &filename() const { return m_filename; } //! \brief return the width of the file being read - size_t width() const { return m_width; } + size_t width() const { return m_width; } //! \brief return the height of the file being read - size_t height() const { return m_height; } + size_t height() const { return m_height; } virtual void open() = 0; virtual bool isOpen() const = 0; virtual void close() = 0; - virtual void read(pfs::Frame& frame, const pfs::Params& params); + virtual void read(pfs::Frame &frame, const pfs::Params ¶ms); -protected: - void setWidth(size_t width) { m_width = width; } - void setHeight(size_t height) { m_height = height; } + protected: + void setWidth(size_t width) { m_width = width; } + void setHeight(size_t height) { m_height = height; } -private: + private: std::string m_filename; size_t m_width; size_t m_height; @@ -66,7 +65,7 @@ typedef std::shared_ptr FrameReaderPtr; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_FRAMEREADER_H +#endif // PFS_IO_FRAMEREADER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/framewriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framewriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,18 +24,11 @@ namespace pfs { namespace io { -FrameWriter::FrameWriter(const std::string& filename) - : m_filename(filename) -{} +FrameWriter::FrameWriter(const std::string &filename) : m_filename(filename) {} -FrameWriter::FrameWriter() - : m_filename() -{} - -FrameWriter::~FrameWriter() -{} - -} // io -} // pfs +FrameWriter::FrameWriter() : m_filename() {} +FrameWriter::~FrameWriter() {} +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriterfactory.cpp luminance-hdr-2.6.0/src/Libpfs/io/framewriterfactory.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriterfactory.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framewriterfactory.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,8 +19,8 @@ * ---------------------------------------------------------------------- */ -#include #include +#include using namespace ::boost::assign; using namespace std; @@ -30,82 +30,69 @@ using pfs::utils::getFormat; -FrameWriterPtr FrameWriterFactory::open(const std::string& filename, const pfs::Params& params) -{ +FrameWriterPtr FrameWriterFactory::open(const std::string &filename, + const pfs::Params ¶ms) { string ext = getFormat(filename); std::string content; if (params.get("format", content)) { - if (!content.empty()) - { - FrameWriterCreatorMap::const_iterator it = sm_registry.find(content); - if (it != sm_registry.end()) - { + if (!content.empty()) { + FrameWriterCreatorMap::const_iterator it = + sm_registry.find(content); + if (it != sm_registry.end()) { return (it->second)(filename); } } } - if ( !ext.empty() ) - { + if (!ext.empty()) { FrameWriterCreatorMap::const_iterator it = sm_registry.find(ext); - if ( it != sm_registry.end() ) - { + if (it != sm_registry.end()) { return (it->second)(filename); } } throw UnsupportedFormat("Cannot find the correct handler for " + filename); } -void FrameWriterFactory::registerFormat(const std::string& format, - FrameWriterFactory::FrameWriterCreator creator) -{ - sm_registry.insert( FrameWriterCreatorMap::value_type(format, creator) ); +void FrameWriterFactory::registerFormat( + const std::string &format, FrameWriterFactory::FrameWriterCreator creator) { + sm_registry.insert(FrameWriterCreatorMap::value_type(format, creator)); } -size_t FrameWriterFactory::numRegisteredFormats() -{ - return sm_registry.size(); -} +size_t FrameWriterFactory::numRegisteredFormats() { return sm_registry.size(); } -bool FrameWriterFactory::isSupported(const std::string& format) -{ +bool FrameWriterFactory::isSupported(const std::string &format) { return sm_registry.count(format); } -} // io -} // pfs - +} // io +} // pfs // Factory subscriptions --------------------------------------------------- -#include -#include +#include #include #include -#include +#include #include +#include namespace pfs { namespace io { template -FrameWriterPtr creator(const std::string& filename) { +FrameWriterPtr creator(const std::string &filename) { return FrameWriterPtr(std::make_shared(filename)); } FrameWriterFactory::FrameWriterCreatorMap FrameWriterFactory::sm_registry = - map_list_of - // LDR formats - ("jpeg", creator) - ("jpg", creator) - ("png", creator) - // Ibrid formats (can be both, depending on the parameters - ("tiff", creator) - ("tif", creator) - // HDR formats - ("pfs", creator) - ("exr", creator) - ("hdr", creator) - ; + map_list_of + // LDR formats + ("jpeg", creator)( + "jpg", creator)("png", creator) + // Ibrid formats (can be both, depending on the parameters + ("tiff", creator)("tif", creator) + // HDR formats + ("pfs", creator)("exr", creator)("hdr", + creator); -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriterfactory.h luminance-hdr-2.6.0/src/Libpfs/io/framewriterfactory.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriterfactory.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framewriterfactory.h 2019-06-09 19:18:38.000000000 +0000 @@ -19,36 +19,42 @@ * ---------------------------------------------------------------------- */ -//! \brief FrameWriterFactory, creation of FrameWriter based on the input filename +//! \brief FrameWriterFactory, creation of FrameWriter based on the input +//! filename //! \author Davide Anastasia #ifndef PFS_IO_FRAMEWRITERFACTORY_H #define PFS_IO_FRAMEWRITERFACTORY_H -#include -#include #include #include #include +#include +#include namespace pfs { namespace io { class FrameWriterFactory { -public: - typedef FrameWriterPtr (*FrameWriterCreator)(const std::string& filename); - typedef std::map FrameWriterCreatorMap; + public: + typedef FrameWriterPtr (*FrameWriterCreator)(const std::string &filename); + typedef std::map + FrameWriterCreatorMap; - static FrameWriterPtr open(const std::string& filename, const pfs::Params& params); + static FrameWriterPtr open(const std::string &filename, + const pfs::Params ¶ms); - static void registerFormat(const std::string& format, FrameWriterCreator creator); + static void registerFormat(const std::string &format, + FrameWriterCreator creator); static size_t numRegisteredFormats(); - static bool isSupported(const std::string& format); -private: + static bool isSupported(const std::string &format); + + private: static FrameWriterCreatorMap sm_registry; }; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_FRAMEWRITERFACTORY_H +#endif // PFS_IO_FRAMEWRITERFACTORY_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriter.h luminance-hdr-2.6.0/src/Libpfs/io/framewriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/framewriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/framewriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,36 +25,34 @@ #ifndef PFS_IO_FRAMEWRITER_H #define PFS_IO_FRAMEWRITER_H -#include #include +#include -#include #include +#include namespace pfs { class Frame; namespace io { -class FrameWriter -{ -public: - explicit FrameWriter(const std::string& filename); +class FrameWriter { + public: + explicit FrameWriter(const std::string &filename); explicit FrameWriter(); virtual ~FrameWriter(); - virtual bool write(const pfs::Frame& frame, const pfs::Params& params) = 0; + virtual bool write(const pfs::Frame &frame, const pfs::Params ¶ms) = 0; - const std::string& filename() const - { return m_filename; } + const std::string &filename() const { return m_filename; } -private: + private: std::string m_filename; }; typedef std::shared_ptr FrameWriterPtr; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_FRAMEWRITER_H +#endif // PFS_IO_FRAMEWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/ioexception.h luminance-hdr-2.6.0/src/Libpfs/io/ioexception.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/ioexception.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/ioexception.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,47 +27,31 @@ namespace pfs { namespace io { -class InvalidFile : public Exception -{ -public: - InvalidFile(const std::string& message) - : Exception(message) - {} +class InvalidFile : public Exception { + public: + InvalidFile(const std::string &message) : Exception(message) {} }; -class InvalidHeader : public Exception -{ -public: - InvalidHeader(const std::string& message) - : Exception(message) - {} +class InvalidHeader : public Exception { + public: + InvalidHeader(const std::string &message) : Exception(message) {} }; -class ReadException : public Exception -{ -public: - ReadException(const std::string& message) - : Exception(message) - {} +class ReadException : public Exception { + public: + ReadException(const std::string &message) : Exception(message) {} }; -class WriteException : public Exception -{ -public: - WriteException(const std::string& message) - : Exception(message) - {} +class WriteException : public Exception { + public: + WriteException(const std::string &message) : Exception(message) {} }; -class UnsupportedFormat : public Exception -{ -public: - UnsupportedFormat(const std::string& message) - : Exception(message) - {} +class UnsupportedFormat : public Exception { + public: + UnsupportedFormat(const std::string &message) : Exception(message) {} }; - } } -#endif // PFS_IO_IOEXCEPTION_H +#endif // PFS_IO_IOEXCEPTION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/jpegreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/jpegreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,18 +22,18 @@ #include -#include -#include -#include #include +#include #include -#include +#include +#include #include #include +#include +#include #include #include -#include using namespace pfs; @@ -49,66 +49,57 @@ // // -#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ -#define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ -#define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ -#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) - +#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ +#define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ +#define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ +#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) // Prepare for reading an ICC profile -static -void setup_read_icc_profile(j_decompress_ptr cinfo) -{ +static void setup_read_icc_profile(j_decompress_ptr cinfo) { // Tell the library to keep any APP2 data it may find jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); } // Handy subroutine to test whether a saved marker is an ICC profile marker. -static -boolean marker_is_icc(jpeg_saved_marker_ptr marker) -{ - return - marker->marker == ICC_MARKER && - marker->data_length >= ICC_OVERHEAD_LEN && - // verify the identifying string - GETJOCTET(marker->data[0]) == 0x49 && - GETJOCTET(marker->data[1]) == 0x43 && - GETJOCTET(marker->data[2]) == 0x43 && - GETJOCTET(marker->data[3]) == 0x5F && - GETJOCTET(marker->data[4]) == 0x50 && - GETJOCTET(marker->data[5]) == 0x52 && - GETJOCTET(marker->data[6]) == 0x4F && - GETJOCTET(marker->data[7]) == 0x46 && - GETJOCTET(marker->data[8]) == 0x49 && - GETJOCTET(marker->data[9]) == 0x4C && - GETJOCTET(marker->data[10]) == 0x45 && - GETJOCTET(marker->data[11]) == 0x0; -} - -static -boolean read_icc_profile (j_decompress_ptr cinfo, - JOCTET **icc_data_ptr, - unsigned int *icc_data_len) -{ +static boolean marker_is_icc(jpeg_saved_marker_ptr marker) { + return marker->marker == ICC_MARKER && + marker->data_length >= ICC_OVERHEAD_LEN && + // verify the identifying string + GETJOCTET(marker->data[0]) == 0x49 && + GETJOCTET(marker->data[1]) == 0x43 && + GETJOCTET(marker->data[2]) == 0x43 && + GETJOCTET(marker->data[3]) == 0x5F && + GETJOCTET(marker->data[4]) == 0x50 && + GETJOCTET(marker->data[5]) == 0x52 && + GETJOCTET(marker->data[6]) == 0x4F && + GETJOCTET(marker->data[7]) == 0x46 && + GETJOCTET(marker->data[8]) == 0x49 && + GETJOCTET(marker->data[9]) == 0x4C && + GETJOCTET(marker->data[10]) == 0x45 && + GETJOCTET(marker->data[11]) == 0x0; +} + +static boolean read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, + unsigned int *icc_data_len) { jpeg_saved_marker_ptr marker; int num_markers = 0; int seq_no; JOCTET *icc_data; unsigned int total_length; -#define MAX_SEQ_NO 255 /* sufficient since marker numbers are bytes */ - char marker_present[MAX_SEQ_NO+1]; /* 1 if marker found */ - unsigned int data_length[MAX_SEQ_NO+1]; /* size of profile data in marker */ - unsigned int data_offset[MAX_SEQ_NO+1]; /* offset for data in marker */ +#define MAX_SEQ_NO 255 /* sufficient since marker numbers are bytes */ + char marker_present[MAX_SEQ_NO + 1]; /* 1 if marker found */ + unsigned int + data_length[MAX_SEQ_NO + 1]; /* size of profile data in marker */ + unsigned int data_offset[MAX_SEQ_NO + 1]; /* offset for data in marker */ - *icc_data_ptr = NULL; /* avoid confusion if false return */ + *icc_data_ptr = NULL; /* avoid confusion if false return */ *icc_data_len = 0; /* This first pass over the saved markers discovers whether there are * any ICC markers and verifies the consistency of the marker numbering. */ - for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) - marker_present[seq_no] = 0; + for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) marker_present[seq_no] = 0; for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { if (marker_is_icc(marker)) { @@ -116,16 +107,16 @@ num_markers = GETJOCTET(marker->data[13]); else if (num_markers != GETJOCTET(marker->data[13])) { PRINT_DEBUG("inconsistent num_markers fields"); - return false; /* inconsistent num_markers fields */ + return false; /* inconsistent num_markers fields */ } seq_no = GETJOCTET(marker->data[12]); if (seq_no <= 0 || seq_no > num_markers) { PRINT_DEBUG("bogus sequence number"); - return false; /* bogus sequence number */ + return false; /* bogus sequence number */ } if (marker_present[seq_no]) { PRINT_DEBUG("duplicate sequence numbers"); - return false; /* duplicate sequence numbers */ + return false; /* duplicate sequence numbers */ } marker_present[seq_no] = 1; data_length[seq_no] = marker->data_length - ICC_OVERHEAD_LEN; @@ -145,22 +136,21 @@ for (seq_no = 1; seq_no <= num_markers; seq_no++) { if (marker_present[seq_no] == 0) { PRINT_DEBUG("missing sequence number"); - return false; /* missing sequence number */ + return false; /* missing sequence number */ } data_offset[seq_no] = total_length; total_length += data_length[seq_no]; } - //if (total_length <= 0) { // total_length is unsigned + // if (total_length <= 0) { // total_length is unsigned if (total_length == 0) { PRINT_DEBUG("found only empty markers?"); - return false; /* found only empty markers? */ + return false; /* found only empty markers? */ } /* Allocate space for assembled data */ - icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) - return false; /* oops, out of memory */ + icc_data = (JOCTET *)malloc(total_length * sizeof(JOCTET)); + if (icc_data == NULL) return false; /* oops, out of memory */ /* and fill it in */ for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { @@ -189,79 +179,59 @@ // /////////////////////////////////////////////////////////////////////////////// -static -void my_error_handler(j_common_ptr cinfo) -{ +static void my_error_handler(j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message)(cinfo, buffer); - throw pfs::io::ReadException( std::string(buffer) ); + throw pfs::io::ReadException(std::string(buffer)); } -static -void my_output_message(j_common_ptr cinfo) -{ +static void my_output_message(j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message)(cinfo, buffer); - throw pfs::io::ReadException( std::string(buffer) ); + throw pfs::io::ReadException(std::string(buffer)); } namespace pfs { namespace io { -struct JpegReader::JpegReaderData -{ +struct JpegReader::JpegReaderData { struct jpeg_decompress_struct cinfo_; struct jpeg_error_mgr err_; utils::ScopedStdIoFile file_; - inline - j_decompress_ptr cinfo() { - return &cinfo_; - } + inline j_decompress_ptr cinfo() { return &cinfo_; } - inline - FILE* handle() { - return file_.data(); - } + inline FILE *handle() { return file_.data(); } }; -JpegReader::JpegReader(const std::string& filename) - : FrameReader(filename) - , m_data(new JpegReaderData) -{ +JpegReader::JpegReader(const std::string &filename) + : FrameReader(filename), m_data(new JpegReaderData) { JpegReader::open(); } -JpegReader::~JpegReader() -{ - close(); -} +JpegReader::~JpegReader() { close(); } -bool JpegReader::isOpen() const { - return m_data->file_; -} +bool JpegReader::isOpen() const { return m_data->file_; } -void JpegReader::close() -{ +void JpegReader::close() { // destroy decompress structure jpeg_destroy_decompress(m_data->cinfo()); // close open file m_data->file_.reset(); } -void JpegReader::open() -{ - if ( isOpen() ) close(); +void JpegReader::open() { + if (isOpen()) close(); // setup error - m_data->cinfo()->err = jpeg_std_error(&m_data->err_); - m_data->cinfo()->err->error_exit = my_error_handler; - m_data->cinfo()->err->output_message = my_output_message; + m_data->cinfo()->err = jpeg_std_error(&m_data->err_); + m_data->cinfo()->err->error_exit = my_error_handler; + m_data->cinfo()->err->output_message = my_output_message; // open the stream, read the header and setup all the rest :) - m_data->file_.reset( fopen(filename().c_str(), "rb") ); - if ( !(m_data->handle()) ) { + m_data->file_.reset(fopen(filename().c_str(), "rb")); + if (!(m_data->handle())) { throw pfs::io::InvalidFile("Cannot open file " + filename()); } @@ -271,10 +241,10 @@ jpeg_read_header(m_data->cinfo(), true); PRINT_DEBUG("Readed JPEG headers"); - PRINT_DEBUG("cinfo.jpeg_color_space: " << m_data->cinfo()->jpeg_color_space); + PRINT_DEBUG( + "cinfo.jpeg_color_space: " << m_data->cinfo()->jpeg_color_space); - if (m_data->cinfo()->jpeg_color_space == JCS_GRAYSCALE) - { + if (m_data->cinfo()->jpeg_color_space == JCS_GRAYSCALE) { PRINT_DEBUG("Unsupported color space: grayscale"); close(); @@ -292,21 +262,20 @@ setHeight(m_data->cinfo()->image_height); } -static -cmsHTRANSFORM getColorSpaceTransform(j_decompress_ptr cinfo) -{ +static cmsHTRANSFORM getColorSpaceTransform(j_decompress_ptr cinfo) { unsigned int cmsProfileLength; - JOCTET* cmsProfileBuffer; - if ( !read_icc_profile(cinfo, &cmsProfileBuffer, &cmsProfileLength) ) { + JOCTET *cmsProfileBuffer; + if (!read_icc_profile(cinfo, &cmsProfileBuffer, &cmsProfileLength)) { return NULL; } PRINT_DEBUG("Found embedded profile"); - utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - utils::ScopedCmsProfile hIn( cmsOpenProfileFromMem(cmsProfileBuffer, cmsProfileLength) ); + utils::ScopedCmsProfile hsRGB(cmsCreate_sRGBProfile()); + utils::ScopedCmsProfile hIn( + cmsOpenProfileFromMem(cmsProfileBuffer, cmsProfileLength)); free(cmsProfileBuffer); - if ( (!hIn) || (!hsRGB) ) { // one of the two profile is not valid + if ((!hIn) || (!hsRGB)) { // one of the two profile is not valid return NULL; } @@ -321,30 +290,27 @@ PRINT_DEBUG("Image format = LuvK"); #endif - switch (cinfo->jpeg_color_space) - { - case JCS_RGB: - case JCS_YCbCr: - { - PRINT_DEBUG("Transform colorspace = sRGB"); - return cmsCreateTransform(hIn.data(), TYPE_RGB_8, - hsRGB.data(), TYPE_RGB_FLT, /*TYPE_BGRA_8,*/ - INTENT_PERCEPTUAL, 0); - - } break; - case JCS_CMYK: - case JCS_YCCK: - { - PRINT_DEBUG("Transform colorspace = CMYK"); - return cmsCreateTransform(hIn.data(), TYPE_YUVK_8, - hsRGB.data(), TYPE_RGB_FLT, /*TYPE_BGRA_8,*/ - INTENT_PERCEPTUAL, 0); - } break; - default: - // This case should never happen, but at least the compiler - // stops complaining! - return NULL; - break; + switch (cinfo->jpeg_color_space) { + case JCS_RGB: + case JCS_YCbCr: { + PRINT_DEBUG("Transform colorspace = sRGB"); + return cmsCreateTransform(hIn.data(), TYPE_RGB_8, hsRGB.data(), + TYPE_RGB_FLT, /*TYPE_BGRA_8,*/ + INTENT_PERCEPTUAL, 0); + + } break; + case JCS_CMYK: + case JCS_YCCK: { + PRINT_DEBUG("Transform colorspace = CMYK"); + return cmsCreateTransform(hIn.data(), TYPE_YUVK_8, hsRGB.data(), + TYPE_RGB_FLT, /*TYPE_BGRA_8,*/ + INTENT_PERCEPTUAL, 0); + } break; + default: + // This case should never happen, but at least the compiler + // stops complaining! + return NULL; + break; } return NULL; @@ -352,120 +318,116 @@ //! \brief read from a 3 components (RGB) input JPEG file template -static -void read3Components(j_decompress_ptr cinfo, Frame& frame, const Converter& conv) -{ - Channel* red; - Channel* green; - Channel* blue; +static void read3Components(j_decompress_ptr cinfo, Frame &frame, + const Converter &conv) { + Channel *red; + Channel *green; + Channel *blue; frame.createXYZChannels(red, green, blue); - std::vector scanLineBuffer(cinfo->image_width * cinfo->num_components); - JSAMPROW scanLineBufferArray[1] = { scanLineBuffer.data() }; + std::vector scanLineBuffer((size_t) cinfo->image_width * + cinfo->num_components); + JSAMPROW scanLineBufferArray[1] = {scanLineBuffer.data()}; - for (int i = 0; cinfo->output_scanline < cinfo->output_height; ++i) - { + for (int i = 0; cinfo->output_scanline < cinfo->output_height; ++i) { jpeg_read_scanlines(cinfo, scanLineBufferArray, 1); - utils::transform(FixedStrideIterator(scanLineBuffer.data()), - FixedStrideIterator(scanLineBuffer.data() + cinfo->image_width*3), - FixedStrideIterator(scanLineBuffer.data() + 1), - FixedStrideIterator(scanLineBuffer.data() + 2), - red->row_begin(i), green->row_begin(i), blue->row_begin(i), - conv); + utils::transform( + FixedStrideIterator(scanLineBuffer.data()), + FixedStrideIterator(scanLineBuffer.data() + + cinfo->image_width * 3), + FixedStrideIterator(scanLineBuffer.data() + 1), + FixedStrideIterator(scanLineBuffer.data() + 2), + red->row_begin(i), green->row_begin(i), blue->row_begin(i), conv); } } //! \brief read from a 4 components (CMYK) input JPEG file template -static -void read4Components(j_decompress_ptr cinfo, Frame& frame, const Converter& conv) -{ - Channel* red; - Channel* green; - Channel* blue; +static void read4Components(j_decompress_ptr cinfo, Frame &frame, + const Converter &conv) { + Channel *red; + Channel *green; + Channel *blue; frame.createXYZChannels(red, green, blue); - std::vector scanLineBuffer(cinfo->image_width * cinfo->num_components); - JSAMPROW scanLineBufferArray[1] = { scanLineBuffer.data() }; + std::vector scanLineBuffer((size_t) cinfo->image_width * + cinfo->num_components); + JSAMPROW scanLineBufferArray[1] = {scanLineBuffer.data()}; - for (int i = 0; cinfo->output_scanline < cinfo->output_height; ++i) - { + for (int i = 0; cinfo->output_scanline < cinfo->output_height; ++i) { jpeg_read_scanlines(cinfo, scanLineBufferArray, 1); - utils::transform(FixedStrideIterator(scanLineBuffer.data()), // C - FixedStrideIterator(scanLineBuffer.data() + cinfo->image_width*4), // end C - FixedStrideIterator(scanLineBuffer.data() + 1), // M - FixedStrideIterator(scanLineBuffer.data() + 2), // Y - FixedStrideIterator(scanLineBuffer.data() + 3), // K - red->row_begin(i), green->row_begin(i), blue->row_begin(i), // R G B - conv); + utils::transform( + FixedStrideIterator(scanLineBuffer.data()), // C + FixedStrideIterator(scanLineBuffer.data() + + cinfo->image_width * 4), // end C + FixedStrideIterator(scanLineBuffer.data() + 1), // M + FixedStrideIterator(scanLineBuffer.data() + 2), // Y + FixedStrideIterator(scanLineBuffer.data() + 3), // K + red->row_begin(i), green->row_begin(i), + blue->row_begin(i), // R G B + conv); } } -void JpegReader::read(Frame &frame, const Params ¶ms) -{ - try - { +void JpegReader::read(Frame &frame, const Params ¶ms) { + try { Frame tempFrame(width(), height()); jpeg_start_decompress(m_data->cinfo()); - assert( m_data->cinfo()->image_height != 0 ); - assert( m_data->cinfo()->image_width != 0 ); - assert( m_data->cinfo()->output_height != 0 ); - assert( m_data->cinfo()->output_width != 0 ); - assert( m_data->cinfo()->image_height == m_data->cinfo()->output_height ); - assert( m_data->cinfo()->image_width == m_data->cinfo()->output_width ); - - utils::ScopedCmsTransform xform( getColorSpaceTransform(m_data->cinfo()) ); - - switch (m_data->cinfo()->jpeg_color_space) - { - case JCS_RGB: - case JCS_YCbCr: - { - if ( xform ) { - PRINT_DEBUG("Use LCMS RGB"); - read3Components(m_data->cinfo(), tempFrame, - colorspace::Convert3LCMS3(xform.data())); - } else { - read3Components(m_data->cinfo(), tempFrame, - colorspace::Copy()); - } - } break; - case JCS_CMYK: - case JCS_YCCK: - { - if ( xform ) { - PRINT_DEBUG("Use LCMS CMYK"); - read4Components(m_data->cinfo(), tempFrame, - colorspace::Convert4LCMS3(xform.data())); - } else { - read4Components(m_data->cinfo(), tempFrame, - colorspace::ConvertInvertedCMYK2RGB()); - } - } break; - default: - // This case should never happen, but at least the compiler - // stops complaining! - break; + assert(m_data->cinfo()->image_height != 0); + assert(m_data->cinfo()->image_width != 0); + assert(m_data->cinfo()->output_height != 0); + assert(m_data->cinfo()->output_width != 0); + assert(m_data->cinfo()->image_height == m_data->cinfo()->output_height); + assert(m_data->cinfo()->image_width == m_data->cinfo()->output_width); + + utils::ScopedCmsTransform xform( + getColorSpaceTransform(m_data->cinfo())); + + switch (m_data->cinfo()->jpeg_color_space) { + case JCS_RGB: + case JCS_YCbCr: { + if (xform) { + PRINT_DEBUG("Use LCMS RGB"); + read3Components(m_data->cinfo(), tempFrame, + colorspace::Convert3LCMS3(xform.data())); + } else { + read3Components(m_data->cinfo(), tempFrame, + colorspace::Copy()); + } + } break; + case JCS_CMYK: + case JCS_YCCK: { + if (xform) { + PRINT_DEBUG("Use LCMS CMYK"); + read4Components(m_data->cinfo(), tempFrame, + colorspace::Convert4LCMS3(xform.data())); + } else { + read4Components(m_data->cinfo(), tempFrame, + colorspace::ConvertInvertedCMYK2RGB()); + } + } break; + default: + // This case should never happen, but at least the compiler + // stops complaining! + break; } jpeg_finish_decompress(m_data->cinfo()); jpeg_destroy_decompress(m_data->cinfo()); FrameReader::read(tempFrame, params); - frame.swap( tempFrame ); - } - catch (...) - { + frame.swap(tempFrame); + } catch (...) { close(); throw; } } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegreader.h luminance-hdr-2.6.0/src/Libpfs/io/jpegreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/jpegreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,17 +28,16 @@ #ifndef PFS_IO_JPEGREADER_H #define PFS_IO_JPEGREADER_H -#include #include #include +#include namespace pfs { namespace io { -class JpegReader : public FrameReader -{ -public: - JpegReader(const std::string& filename); +class JpegReader : public FrameReader { + public: + JpegReader(const std::string &filename); ~JpegReader(); void open(); @@ -46,13 +45,13 @@ void close(); void read(Frame &frame, const Params ¶ms); -private: + private: struct JpegReaderData; std::unique_ptr m_data; }; -} // io -} // pfs +} // io +} // pfs #endif // PFS_IO_JPEGREADER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegwriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/jpegwriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegwriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/jpegwriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,27 +21,34 @@ * */ +#ifndef FALSE + #define FALSE 0 +#endif +#ifndef TRUE + #define TRUE 1 +#endif + #include -#include -#include #include #include #include +#include +#include -#include -#include #include +#include +#include -#include -#include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include +#include +#include using namespace std; using namespace pfs; @@ -65,11 +72,10 @@ // rather than assuming that the APP2 markers appear in the correct sequence. // -#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ -#define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ -#define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ -#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) - +#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ +#define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ +#define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ +#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) // This routine writes the given ICC profile data into a JPEG file. // It *must* be called AFTER calling jpeg_start_compress() and BEFORE @@ -77,18 +83,15 @@ // (This ordering ensures that the APP2 marker(s) will appear after the // SOI and JFIF or Adobe markers, but before all else.) -static -void write_icc_profile (j_compress_ptr cinfo, const JOCTET *icc_data_ptr, - unsigned int icc_data_len) -{ - 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 +static void write_icc_profile(j_compress_ptr cinfo, const JOCTET *icc_data_ptr, + unsigned int icc_data_len) { + 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; - if (num_markers * MAX_DATA_BYTES_IN_MARKER != icc_data_len) - num_markers++; + if (num_markers * MAX_DATA_BYTES_IN_MARKER != icc_data_len) num_markers++; while (icc_data_len > 0) { // length of profile to put in this marker @@ -99,7 +102,7 @@ // Write the JPEG marker header (APP2 code and marker length) jpeg_write_m_header(cinfo, ICC_MARKER, - (unsigned int) (length + ICC_OVERHEAD_LEN)); + (unsigned int)(length + ICC_OVERHEAD_LEN)); // Write the marker identifying string "ICC_PROFILE" (null-terminated). // We code it in this less-than-transparent way so that the code works @@ -119,7 +122,7 @@ // Add the sequencing info jpeg_write_m_byte(cinfo, cur_marker); - jpeg_write_m_byte(cinfo, (int) num_markers); + jpeg_write_m_byte(cinfo, (int)num_markers); // Add the profile data while (length--) { @@ -135,50 +138,43 @@ // /////////////////////////////////////////////////////////////////////////////// -static -void my_writer_error_handler(j_common_ptr cinfo) -{ +static void my_writer_error_handler(j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message) (cinfo, buffer); - throw std::runtime_error( std::string(buffer) ); + (*cinfo->err->format_message)(cinfo, buffer); + throw std::runtime_error(std::string(buffer)); } -static -void my_writer_output_message(j_common_ptr cinfo) -{ +static void my_writer_output_message(j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message) (cinfo, buffer); - throw std::runtime_error( std::string(buffer) ); + (*cinfo->err->format_message)(cinfo, buffer); + throw std::runtime_error(std::string(buffer)); } -struct JpegWriterParams -{ +struct JpegWriterParams { JpegWriterParams() - : quality_(100) - , minLuminance_(0.f) - , maxLuminance_(1.f) - , luminanceMapping_(MAP_LINEAR) - {} - - void parse(const Params& params) - { - for ( Params::const_iterator it = params.begin(), itEnd = params.end(); - it != itEnd; ++it ) - { - if ( it->first == "quality" ) { + : quality_(100), + minLuminance_(0.f), + maxLuminance_(1.f), + luminanceMapping_(MAP_LINEAR) {} + + void parse(const Params ¶ms) { + for (Params::const_iterator it = params.begin(), itEnd = params.end(); + it != itEnd; ++it) { + if (it->first == "quality") { quality_ = it->second.as(quality_); continue; } - if ( it->first == "min_luminance" ) { + if (it->first == "min_luminance") { minLuminance_ = it->second.as(minLuminance_); continue; } - if ( it->first == "max_luminance" ) { + if (it->first == "max_luminance") { maxLuminance_ = it->second.as(maxLuminance_); continue; } - if ( it->first == "mapping_method" ) { - luminanceMapping_ = it->second.as(luminanceMapping_); + if (it->first == "mapping_method") { + luminanceMapping_ = + it->second.as(luminanceMapping_); continue; } } @@ -190,8 +186,7 @@ RGBMappingType luminanceMapping_; }; -ostream& operator<<(ostream& out, const JpegWriterParams& params) -{ +ostream &operator<<(ostream &out, const JpegWriterParams ¶ms) { stringstream ss; ss << "JpegWriterParams: ["; ss << "quality: " << params.quality_ << ", "; @@ -202,96 +197,95 @@ return (out << ss.str()); } -class JpegWriterImpl -{ -public: +class JpegWriterImpl { + public: JpegWriterImpl() {} virtual ~JpegWriterImpl() {} - virtual void setupJpegDest(j_compress_ptr cinfo, const std::string& filename) = 0; + virtual void setupJpegDest(j_compress_ptr cinfo, + const std::string &filename) = 0; virtual void close() = 0; virtual size_t getFileSize() const = 0; - bool write(const pfs::Frame &frame, const JpegWriterParams& params, - const std::string& filename) - { + bool write(const pfs::Frame &frame, const JpegWriterParams ¶ms, + const std::string &filename) { cmsUInt32Number cmsProfileSize = 0; - utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); + utils::ScopedCmsProfile hsRGB(cmsCreate_sRGBProfile()); - cmsSaveProfileToMem(hsRGB.data(), NULL, &cmsProfileSize); // get the size + cmsSaveProfileToMem(hsRGB.data(), NULL, + &cmsProfileSize); // get the size std::vector cmsOutputProfile(cmsProfileSize); - cmsSaveProfileToMem(hsRGB.data(), cmsOutputProfile.data(), &cmsProfileSize); + cmsSaveProfileToMem(hsRGB.data(), cmsOutputProfile.data(), + &cmsProfileSize); struct jpeg_compress_struct cinfo; struct jpeg_error_mgr errorHandler; jpeg_create_compress(&cinfo); - cinfo.err = jpeg_std_error(&errorHandler); - errorHandler.error_exit = my_writer_error_handler; - errorHandler.output_message = my_writer_output_message; - - cinfo.image_width = frame.getWidth(); // image width and height, in pixels - cinfo.image_height = frame.getHeight(); - cinfo.input_components = cinfo.num_components = 3; // # of color components per pixel - cinfo.in_color_space = JCS_RGB; // colorspace of input image - cinfo.jpeg_color_space = JCS_YCbCr; - cinfo.density_unit = 1; // dots/inch - cinfo.X_density = cinfo.Y_density = 72; + cinfo.err = jpeg_std_error(&errorHandler); + errorHandler.error_exit = my_writer_error_handler; + errorHandler.output_message = my_writer_output_message; + + cinfo.image_width = + frame.getWidth(); // image width and height, in pixels + cinfo.image_height = frame.getHeight(); + cinfo.input_components = cinfo.num_components = + 3; // # of color components per pixel + cinfo.in_color_space = JCS_RGB; // colorspace of input image + cinfo.jpeg_color_space = JCS_YCbCr; + cinfo.density_unit = 1; // dots/inch + cinfo.X_density = cinfo.Y_density = 72; jpeg_set_defaults(&cinfo); jpeg_set_colorspace(&cinfo, JCS_YCbCr); // avoid subsampling on high quality factor jpeg_set_quality(&cinfo, params.quality_, 1); - if ( params.quality_ >= 70 ) { + if (params.quality_ >= 70) { for (int i = 0; i < cinfo.num_components; i++) { cinfo.comp_info[i].h_samp_factor = 1; cinfo.comp_info[i].v_samp_factor = 1; } } - try - { + try { setupJpegDest(&cinfo, filename); jpeg_start_compress(&cinfo, true); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); write_icc_profile(&cinfo, cmsOutputProfile.data(), cmsProfileSize); - // If an exception is raised, this buffer gets automatically destructed! - std::vector scanLineOut(cinfo.image_width * cinfo.num_components); - JSAMPROW scanLineOutArray[1] = { scanLineOut.data() }; + // If an exception is raised, this buffer gets automatically + // destructed! + std::vector scanLineOut((size_t) cinfo.image_width * + cinfo.num_components); + JSAMPROW scanLineOutArray[1] = {scanLineOut.data()}; - while (cinfo.next_scanline < cinfo.image_height) - { + while (cinfo.next_scanline < cinfo.image_height) { // copy line from Frame into scanLineOut utils::transform( - rChannel->row_begin(cinfo.next_scanline), - rChannel->row_end(cinfo.next_scanline), - gChannel->row_begin(cinfo.next_scanline), - bChannel->row_begin(cinfo.next_scanline), - FixedStrideIterator(scanLineOut.data()), - FixedStrideIterator(scanLineOut.data() + 1), - FixedStrideIterator(scanLineOut.data() + 2), - utils::chain( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::CLAMP_F32, - Remapper(params.luminanceMapping_) - ) - ); + rChannel->row_begin(cinfo.next_scanline), + rChannel->row_end(cinfo.next_scanline), + gChannel->row_begin(cinfo.next_scanline), + bChannel->row_begin(cinfo.next_scanline), + FixedStrideIterator(scanLineOut.data()), + FixedStrideIterator(scanLineOut.data() + 1), + FixedStrideIterator(scanLineOut.data() + 2), + utils::chain(colorspace::Normalizer(params.minLuminance_, + params.maxLuminance_), + utils::CLAMP_F32, + Remapper(params.luminanceMapping_))); jpeg_write_scanlines(&cinfo, scanLineOutArray, 1); } - } - catch (const std::runtime_error& err) - { + } catch (const std::runtime_error &err) { std::clog << err.what() << std::endl; jpeg_destroy_compress(&cinfo); @@ -308,40 +302,36 @@ } }; -//! \ref http://www.andrewewhite.net/wordpress/2010/04/07/simple-cc-jpeg-writer-part-2-write-to-buffer-in-memory/ +//! \ref +//! http://www.andrewewhite.net/wordpress/2010/04/07/simple-cc-jpeg-writer-part-2-write-to-buffer-in-memory/ typedef std::vector JpegBuffer; -struct JpegWriterImplMemory : public JpegWriterImpl -{ - typedef std::map JpegRegistry; - - JpegWriterImplMemory() - : JpegWriterImpl() - , m_cinfo(NULL) - , m_buffer(0) - {} +struct JpegWriterImplMemory : public JpegWriterImpl { + typedef std::map JpegRegistry; + + JpegWriterImplMemory() : JpegWriterImpl(), m_cinfo(NULL), m_buffer(0) {} ~JpegWriterImplMemory() { close(); } // implementation below! - void setupJpegDest(j_compress_ptr cinfo, const std::string& filename); + void setupJpegDest(j_compress_ptr cinfo, const std::string &filename); void close() { sm_registry.erase(m_cinfo); m_cinfo->dest = NULL; } - size_t getFileSize() const { return (m_buffer.size()*sizeof(JOCTET)); } + size_t getFileSize() const { return (m_buffer.size() * sizeof(JOCTET)); } - static - JpegBuffer& getBuffer(j_compress_ptr cinfo) { + static JpegBuffer &getBuffer(j_compress_ptr cinfo) { JpegRegistry::iterator it = sm_registry.find(cinfo); - if ( it != sm_registry.end() ) { + if (it != sm_registry.end()) { return *it->second; } - throw pfs::io::WriteException("Cannot find a valid buffer for the current writer"); + throw pfs::io::WriteException( + "Cannot find a valid buffer for the current writer"); } -private: + private: struct jpeg_destination_mgr m_dmgr; j_compress_ptr m_cinfo; JpegBuffer m_buffer; @@ -353,20 +343,16 @@ #define BLOCK_SIZE 16384 -static -void my_init_destination(j_compress_ptr cinfo) -{ - JpegBuffer& myBuffer = JpegWriterImplMemory::getBuffer(cinfo); +static void my_init_destination(j_compress_ptr cinfo) { + JpegBuffer &myBuffer = JpegWriterImplMemory::getBuffer(cinfo); myBuffer.resize(BLOCK_SIZE); cinfo->dest->next_output_byte = &myBuffer[0]; cinfo->dest->free_in_buffer = myBuffer.size(); } -static -boolean my_empty_output_buffer(j_compress_ptr cinfo) -{ - JpegBuffer& myBuffer = JpegWriterImplMemory::getBuffer(cinfo); +static boolean my_empty_output_buffer(j_compress_ptr cinfo) { + JpegBuffer &myBuffer = JpegWriterImplMemory::getBuffer(cinfo); size_t oldsize = myBuffer.size(); myBuffer.resize(oldsize + BLOCK_SIZE); @@ -375,21 +361,19 @@ return true; } -static -void my_term_destination(j_compress_ptr cinfo) -{ - JpegBuffer& myBuffer = JpegWriterImplMemory::getBuffer(cinfo); +static void my_term_destination(j_compress_ptr cinfo) { + JpegBuffer &myBuffer = JpegWriterImplMemory::getBuffer(cinfo); myBuffer.resize(myBuffer.size() - cinfo->dest->free_in_buffer); } #undef BLOCK_SIZE -void JpegWriterImplMemory::setupJpegDest(j_compress_ptr cinfo, const string &/*filename*/) -{ +void JpegWriterImplMemory::setupJpegDest(j_compress_ptr cinfo, + const string & /*filename*/) { // remember the j_compress_struct ... it will be necessary in the dtor! m_cinfo = cinfo; // add entry into registry! - sm_registry.insert( JpegRegistry::value_type(cinfo, &m_buffer) ); + sm_registry.insert(JpegRegistry::value_type(cinfo, &m_buffer)); // update destinations... m_dmgr.init_destination = my_init_destination; @@ -400,51 +384,41 @@ } //! \brief Writer to file basic implementation -struct JpegWriterImplFile : public JpegWriterImpl -{ - JpegWriterImplFile() - : JpegWriterImpl() - , m_handle() - {} +struct JpegWriterImplFile : public JpegWriterImpl { + JpegWriterImplFile() : JpegWriterImpl(), m_handle() {} - void setupJpegDest(j_compress_ptr cinfo, const std::string& filename) { + void setupJpegDest(j_compress_ptr cinfo, const std::string &filename) { open(filename); jpeg_stdio_dest(cinfo, handle()); } - void close() { m_handle.reset(); } - size_t getFileSize() const { return 0; } + void close() { m_handle.reset(); } + size_t getFileSize() const { return 0; } -private: - void open(const std::string& filename) { - m_handle.reset( fopen(filename.c_str(), "wb") ); - if ( !m_handle ) { - throw pfs::io::InvalidFile( "Cannot open the output file " + filename ); + private: + void open(const std::string &filename) { + m_handle.reset(fopen(filename.c_str(), "wb")); + if (!m_handle) { + throw pfs::io::InvalidFile("Cannot open the output file " + + filename); } } - FILE* handle() { return m_handle.data(); } + FILE *handle() { return m_handle.data(); } utils::ScopedStdIoFile m_handle; }; - -JpegWriter::JpegWriter() - : m_impl(new JpegWriterImplMemory()) -{} +JpegWriter::JpegWriter() : m_impl(new JpegWriterImplMemory()) {} JpegWriter::JpegWriter(const std::string &filename) - : FrameWriter(filename) - , m_impl(new JpegWriterImplFile()) -{} + : FrameWriter(filename), m_impl(new JpegWriterImplFile()) {} -JpegWriter::~JpegWriter() -{} +JpegWriter::~JpegWriter() {} -bool JpegWriter::write(const pfs::Frame& frame, const Params& params) -{ +bool JpegWriter::write(const pfs::Frame &frame, const Params ¶ms) { JpegWriterParams p; - p.parse( params ); + p.parse(params); #ifndef NDEBUG cout << p << endl << flush; @@ -453,10 +427,7 @@ return m_impl->write(frame, p, filename()); } -size_t JpegWriter::getFileSize() const -{ - return m_impl->getFileSize(); -} +size_t JpegWriter::getFileSize() const { return m_impl->getFileSize(); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegwriter.h luminance-hdr-2.6.0/src/Libpfs/io/jpegwriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/jpegwriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/jpegwriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,12 +30,12 @@ #ifndef PFS_IO_JPEGWRITER_H #define PFS_IO_JPEGWRITER_H -#include #include +#include -#include -#include #include +#include +#include namespace pfs { class Frame; @@ -44,24 +44,23 @@ class JpegWriterImpl; -class JpegWriter : public FrameWriter -{ -public: - JpegWriter(const std::string& filename); +class JpegWriter : public FrameWriter { + public: + JpegWriter(const std::string &filename); JpegWriter(); ~JpegWriter(); //! \brief write a pfs::Frame into file or memory - bool write(const pfs::Frame& frame, const pfs::Params& params); + bool write(const pfs::Frame &frame, const pfs::Params ¶ms); //! \brief return size in bytes of the file written size_t getFileSize() const; -private: + private: std::unique_ptr m_impl; }; -} // io -} // pfs +} // io +} // pfs #endif // PFS_IO_JPEGWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfscommon.h luminance-hdr-2.6.0/src/Libpfs/io/pfscommon.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfscommon.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pfscommon.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,4 +33,4 @@ #define MAX_TAG_STRING 1024 #define MAX_CHANNEL_COUNT 1024 -#endif // PFS_IO_PFSCOMMON_H +#endif // PFS_IO_PFSCOMMON_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfsreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/pfsreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfsreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pfsreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,9 +19,9 @@ * ---------------------------------------------------------------------- */ -#include -#include #include +#include +#include #include @@ -30,19 +30,18 @@ static const char *PFSFILEID = "PFS1\x0a"; -void readTags(TagContainer& tags, FILE *in) -{ +void readTags(TagContainer &tags, FILE *in) { int tagCount = -1; - int readItems = fscanf( in, "%d" PFSEOL, &tagCount ); - if ( readItems != 1 || tagCount < 0 || tagCount > 1024 ) { - throw Exception( "Corrupted PFS tag section: missing or wrong number of tags" ); + int readItems = fscanf(in, "%d" PFSEOL, &tagCount); + if (readItems != 1 || tagCount < 0 || tagCount > 1024) { + throw Exception( + "Corrupted PFS tag section: missing or wrong number of tags"); } - char buf[MAX_TAG_STRING+1]; - for ( int i = 0; i < tagCount; i++ ) - { - if ( !fgets( buf, MAX_TAG_STRING, in ) ) { - throw Exception( "Corrupted PFS tag section: missing tag" ); + char buf[MAX_TAG_STRING + 1]; + for (int i = 0; i < tagCount; i++) { + if (!fgets(buf, MAX_TAG_STRING, in)) { + throw Exception("Corrupted PFS tag section: missing tag"); } std::string data(buf); size_t found = data.find_first_of("="); @@ -52,121 +51,116 @@ << data.substr(found + 1, data.size()) << std::endl; #endif - tags.setTag( data.substr(0, found), - data.substr(found + 1, data.size()) ); + tags.setTag(data.substr(0, found), + data.substr(found + 1, data.size())); } else { - throw Exception( "Corrupted PFS tag section ('=' sign missing)" ); + throw Exception("Corrupted PFS tag section ('=' sign missing)"); } } } -PfsReader::PfsReader(const std::string& filename) - : FrameReader(filename) - , m_channelCount(0) -{ +PfsReader::PfsReader(const std::string &filename) + : FrameReader(filename), m_channelCount(0) { PfsReader::open(); } -void PfsReader::open() -{ - m_file.reset( fopen(filename().c_str(), "rb") ); - if ( !m_file ) { +void PfsReader::open() { + m_file.reset(fopen(filename().c_str(), "rb")); + if (!m_file) { throw InvalidFile("Cannot open file " + filename()); } #ifdef HAVE_SETMODE // Needed under MS windows (text translation IO for stdin/out) - int old_mode = setmode( fileno( inputStream ), _O_BINARY ); + int old_mode = setmode(fileno(inputStream), _O_BINARY); #endif char buf[5]; - size_t read = fread( buf, 1, 5, m_file.data() ); - if ( read == 0 ) { + size_t read = fread(buf, 1, 5, m_file.data()); + if (read == 0) { throw InvalidHeader("empty file!"); } - if ( memcmp( buf, PFSFILEID, 5 ) ) { - throw InvalidHeader( "Incorrect PFS file header" ); + if (memcmp(buf, PFSFILEID, 5)) { + throw InvalidHeader("Incorrect PFS file header"); } int width, height; - read = fscanf( m_file.data(), "%d %d" PFSEOL, &width, &height ); - if ( read != 2 || width <= 0 || width > MAX_RES || height <= 0 || height > MAX_RES ) - { - throw InvalidHeader( "Corrupted PFS file: missing or wrong 'width', 'height' tags" ); + read = fscanf(m_file.data(), "%d %d" PFSEOL, &width, &height); + if (read != 2 || width <= 0 || width > MAX_RES || height <= 0 || + height > MAX_RES) { + throw InvalidHeader( + "Corrupted PFS file: missing or wrong 'width', 'height' tags"); } setWidth(width); setHeight(height); int channelCount; - read = fscanf( m_file.data(), "%d" PFSEOL, &channelCount ); - if ( read != 1 || channelCount < 0 || channelCount > MAX_CHANNEL_COUNT ) - { - throw InvalidHeader( "Corrupted PFS file: missing or wrong 'channelCount' tag" ); + read = fscanf(m_file.data(), "%d" PFSEOL, &channelCount); + if (read != 1 || channelCount < 0 || channelCount > MAX_CHANNEL_COUNT) { + throw InvalidHeader( + "Corrupted PFS file: missing or wrong 'channelCount' tag"); } m_channelCount = channelCount; } -void PfsReader::close() -{ +void PfsReader::close() { setWidth(0); setHeight(0); m_file.reset(); m_channelCount = 0; } -void PfsReader::read(Frame &frame, const Params &/*params*/) -{ - if ( !isOpen() ) open(); +void PfsReader::read(Frame &frame, const Params & /*params*/) { + if (!isOpen()) open(); Frame tempFrame(width(), height()); readTags(tempFrame.getTags(), m_file.data()); // read channel IDs and tags - std::list orderedChannel; - for ( size_t i = 0; i < m_channelCount; i++ ) - { - char channelName[MAX_CHANNEL_NAME+1], *rs; - rs = fgets( channelName, MAX_CHANNEL_NAME, m_file.data() ); - if ( rs == NULL ) { - throw ReadException( "Corrupted PFS file: missing channel name" ); + std::list orderedChannel; + for (size_t i = 0; i < m_channelCount; i++) { + char channelName[MAX_CHANNEL_NAME + 1], *rs; + rs = fgets(channelName, MAX_CHANNEL_NAME, m_file.data()); + if (rs == NULL) { + throw ReadException("Corrupted PFS file: missing channel name"); } - size_t len = strlen( channelName ); + size_t len = strlen(channelName); // fprintf( stderr, "s = '%s' len = %d\n", channelName, len ); - if ( len < 1 || channelName[len-1] != PFSEOLCH ) { - throw ReadException( "Corrupted PFS file: bad channel name" ); + if (len < 1 || channelName[len - 1] != PFSEOLCH) { + throw ReadException("Corrupted PFS file: bad channel name"); } - channelName[len-1] = 0; - Channel *ch = tempFrame.createChannel( channelName ); + channelName[len - 1] = 0; + Channel *ch = tempFrame.createChannel(channelName); readTags(ch->getTags(), m_file.data()); - orderedChannel.push_back( ch ); + orderedChannel.push_back(ch); } char buf[5]; - size_t read = fread( buf, 1, 4, m_file.data() ); - if ( read == 0 || memcmp( buf, "ENDH", 4 ) ) { - throw ReadException( "Corrupted PFS file: missing end of header (ENDH) token" ); + size_t read = fread(buf, 1, 4, m_file.data()); + if (read == 0 || memcmp(buf, "ENDH", 4)) { + throw ReadException( + "Corrupted PFS file: missing end of header (ENDH) token"); } - //Read channels - std::list::iterator it; - for ( it = orderedChannel.begin(); it != orderedChannel.end(); ++it ) - { + // Read channels + std::list::iterator it; + for (it = orderedChannel.begin(); it != orderedChannel.end(); ++it) { Channel *ch = *it; - unsigned int size = tempFrame.getWidth()*tempFrame.getHeight(); - read = fread( ch->data(), sizeof( float ), size, m_file.data() ); - if ( read != size ) { - throw ReadException( "Corrupted PFS file: missing channel data" ); + unsigned int size = tempFrame.getWidth() * tempFrame.getHeight(); + read = fread(ch->data(), sizeof(float), size, m_file.data()); + if (read != size) { + throw ReadException("Corrupted PFS file: missing channel data"); } } #ifdef HAVE_SETMODE - setmode( fileno( inputStream ), old_mode ); + setmode(fileno(inputStream), old_mode); #endif - frame.swap( tempFrame ); + frame.swap(tempFrame); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfsreader.h luminance-hdr-2.6.0/src/Libpfs/io/pfsreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfsreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pfsreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,35 +26,33 @@ #ifndef PFS_IO_PFSREADER_H #define PFS_IO_PFSREADER_H -#include -#include #include #include +#include #include +#include namespace pfs { class Frame; namespace io { -class PfsReader : public FrameReader -{ -public: - PfsReader(const std::string& filename); +class PfsReader : public FrameReader { + public: + PfsReader(const std::string &filename); - bool isOpen() const - { return m_file; } + bool isOpen() const { return m_file; } void open(); void close(); void read(pfs::Frame &frame, const pfs::Params &); -private: + private: utils::ScopedStdIoFile m_file; size_t m_channelCount; }; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_PFSREADER_H +#endif // PFS_IO_PFSREADER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfswriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/pfswriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfswriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pfswriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,9 +23,9 @@ #include #include -#include -#include #include +#include +#include #include namespace pfs { @@ -33,22 +33,18 @@ static const char *PFSFILEID = "PFS1\x0a"; -void writeTags(const TagContainer& tags, FILE *out) -{ - fprintf( out, "%d" PFSEOL, (int)tags.size()); - for (TagContainer::const_iterator it = tags.begin(); it != tags.end(); ++it) - { - fprintf( out, "%s", std::string(it->first + "=" + it->second).c_str() ); - fprintf( out, PFSEOL ); +void writeTags(const TagContainer &tags, FILE *out) { + fprintf(out, "%d" PFSEOL, (int)tags.size()); + for (TagContainer::const_iterator it = tags.begin(); it != tags.end(); + ++it) { + fprintf(out, "%s", std::string(it->first + "=" + it->second).c_str()); + fprintf(out, PFSEOL); } } -PfsWriter::PfsWriter(const std::string &filename) - : FrameWriter(filename) -{} +PfsWriter::PfsWriter(const std::string &filename) : FrameWriter(filename) {} -bool PfsWriter::write(const Frame &frame, const Params &/*params*/) -{ +bool PfsWriter::write(const Frame &frame, const Params & /*params*/) { utils::ScopedStdIoFile outputStream(fopen(filename().c_str(), "wb")); if (!outputStream) { throw pfs::io::InvalidFile("PfsWriter: cannot open " + filename()); @@ -56,47 +52,43 @@ #ifdef HAVE_SETMODE // Needed under MS windows (text translation IO for stdin/out) - int old_mode = setmode( fileno( outputStream.data() ), _O_BINARY ); + int old_mode = setmode(fileno(outputStream.data()), _O_BINARY); #endif // Write header ID - fwrite( PFSFILEID, 1, 5, outputStream.data() ); + fwrite(PFSFILEID, 1, 5, outputStream.data()); - const ChannelContainer& channels = frame.getChannels(); + const ChannelContainer &channels = frame.getChannels(); - fprintf(outputStream.data(), "%d %d" PFSEOL, - (int)frame.getWidth(), (int)frame.getHeight()); + fprintf(outputStream.data(), "%d %d" PFSEOL, (int)frame.getWidth(), + (int)frame.getHeight()); fprintf(outputStream.data(), "%d" PFSEOL, (int)channels.size()); writeTags(frame.getTags(), outputStream.data()); // Write channel IDs and tags for (ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { + it != channels.end(); ++it) { fprintf(outputStream.data(), "%s" PFSEOL, (*it)->getName().c_str()); writeTags((*it)->getTags(), outputStream.data()); } - fprintf( outputStream.data(), "ENDH"); + fprintf(outputStream.data(), "ENDH"); // Write channels for (ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { - int size = frame.getWidth()*frame.getHeight(); - fwrite( (*it)->data(), sizeof( float ), size, outputStream.data() ); + it != channels.end(); ++it) { + int size = frame.getWidth() * frame.getHeight(); + fwrite((*it)->data(), sizeof(float), size, outputStream.data()); } // Very important for pfsoutavi !!! - fflush( outputStream.data() ); + fflush(outputStream.data()); #ifdef HAVE_SETMODE - setmode( fileno( outputStream.data() ), old_mode ); + setmode(fileno(outputStream.data()), old_mode); #endif return true; } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfswriter.h luminance-hdr-2.6.0/src/Libpfs/io/pfswriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pfswriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pfswriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,10 +26,10 @@ #ifndef PFS_IO_PFSWRITER_H #define PFS_IO_PFSWRITER_H -#include -#include -#include #include +#include +#include +#include namespace pfs { class Frame; @@ -37,13 +37,13 @@ namespace io { class PfsWriter : public FrameWriter { -public: - PfsWriter(const std::string& filename); + public: + PfsWriter(const std::string &filename); - bool write(const pfs::Frame& frame, const pfs::Params& params); + bool write(const pfs::Frame &frame, const pfs::Params ¶ms); }; -} // io -} // pfs +} // io +} // pfs -#endif // PFS_IO_PFSWRITER_H +#endif // PFS_IO_PFSWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pngwriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/pngwriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pngwriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pngwriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,24 +22,24 @@ #include "pngwriter.h" -#include +#include #include #include -#include +#include #include -#include #include +#include -#include -#include #include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include using namespace std; using namespace pfs; @@ -47,41 +47,38 @@ namespace pfs { namespace io { -struct PngWriterParams -{ +struct PngWriterParams { PngWriterParams() - : quality_(100) - , minLuminance_(0.f) - , maxLuminance_(1.f) - , luminanceMapping_(MAP_LINEAR) - {} - - void parse(const Params& params) - { - for ( Params::const_iterator it = params.begin(), itEnd = params.end(); - it != itEnd; ++it ) - { - if ( it->first == "quality" ) { + : quality_(100), + minLuminance_(0.f), + maxLuminance_(1.f), + luminanceMapping_(MAP_LINEAR) {} + + void parse(const Params ¶ms) { + for (Params::const_iterator it = params.begin(), itEnd = params.end(); + it != itEnd; ++it) { + if (it->first == "quality") { quality_ = it->second.as(quality_); continue; } - if ( it->first == "min_luminance" ) { + if (it->first == "min_luminance") { minLuminance_ = it->second.as(minLuminance_); continue; } - if ( it->first == "max_luminance" ) { + if (it->first == "max_luminance") { maxLuminance_ = it->second.as(maxLuminance_); continue; } - if ( it->first == "mapping_method" ) { - luminanceMapping_ = it->second.as(luminanceMapping_); + if (it->first == "mapping_method") { + luminanceMapping_ = + it->second.as(luminanceMapping_); continue; } } } int compressionLevel() const { - int compLevel = (9 - (int)((float)quality_/11.11111f + 0.5f)); + int compLevel = (9 - (int)((float)quality_ / 11.11111f + 0.5f)); assert(compLevel >= 0); assert(compLevel <= 9); @@ -95,8 +92,7 @@ RGBMappingType luminanceMapping_; }; -ostream& operator<<(ostream& out, const PngWriterParams& params) -{ +ostream &operator<<(ostream &out, const PngWriterParams ¶ms) { stringstream ss; ss << "PngWriterParams: ["; ss << "compression_level: " << params.compressionLevel() << ", "; @@ -107,12 +103,10 @@ return (out << ss.str()); } -static -void png_write_icc_profile(png_structp png_ptr, png_infop info_ptr) -{ +static void png_write_icc_profile(png_structp png_ptr, png_infop info_ptr) { cmsUInt32Number profileSize = 0; cmsHPROFILE hsRGB = cmsCreate_sRGBProfile(); - cmsSaveProfileToMem(hsRGB, NULL, &profileSize); // get the size + cmsSaveProfileToMem(hsRGB, NULL, &profileSize); // get the size #if PNG_LIBPNG_VER_MINOR < 5 std::vector profileBuffer(profileSize); @@ -130,30 +124,28 @@ profileBuffer.data(), (png_uint_32)profileSize); } -class PngWriterImpl -{ -public: +class PngWriterImpl { + public: PngWriterImpl() : m_filesize(0) {} - virtual ~PngWriterImpl() {} + virtual ~PngWriterImpl() {} - virtual void setupPngDest(png_structp png_ptr, const std::string& filename) = 0; + virtual void setupPngDest(png_structp png_ptr, + const std::string &filename) = 0; virtual void close() = 0; virtual void computeSize() = 0; - size_t getFileSize() { return m_filesize; } - void setFileSize(size_t size) { m_filesize = size; } + size_t getFileSize() { return m_filesize; } + void setFileSize(size_t size) { m_filesize = size; } - bool write(const pfs::Frame &frame, const PngWriterParams& params, - const std::string& filename) - { + bool write(const pfs::Frame &frame, const PngWriterParams ¶ms, + const std::string &filename) { png_uint_32 width = frame.getWidth(); png_uint_32 height = frame.getHeight(); png_structp png_ptr = - png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - { + png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) { close(); throw io::WriteException("PNG: Failed to create write struct"); @@ -161,8 +153,7 @@ } png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { + if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp)NULL); close(); @@ -170,8 +161,7 @@ return false; } - if (setjmp(png_jmpbuf(png_ptr))) - { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_write_struct(&png_ptr, &info_ptr); close(); @@ -181,38 +171,34 @@ setupPngDest(png_ptr, filename); - png_set_IHDR(png_ptr, info_ptr, width, height, - 8, /*PNG_COLOR_TYPE_RGB_ALPHA*/ PNG_COLOR_TYPE_RGB, + png_set_IHDR(png_ptr, info_ptr, width, height, 8, + /*PNG_COLOR_TYPE_RGB_ALPHA*/ PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_compression_level(png_ptr, params.compressionLevel()); png_set_bgr(png_ptr); - png_write_icc_profile(png_ptr, info_ptr); // user defined function, see above + png_write_icc_profile(png_ptr, + info_ptr); // user defined function, see above png_write_info(png_ptr, info_ptr); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); - std::vector scanLineOut( width * 3 ); - for (png_uint_32 row = 0; row < height; ++row) - { + std::vector scanLineOut(width * 3); + for (png_uint_32 row = 0; row < height; ++row) { utils::transform( - rChannel->row_begin(row), - rChannel->row_end(row), - gChannel->row_begin(row), - bChannel->row_begin(row), - FixedStrideIterator(scanLineOut.data() + 2), - FixedStrideIterator(scanLineOut.data() + 1), - FixedStrideIterator(scanLineOut.data()), - utils::chain( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::CLAMP_F32, - Remapper(params.luminanceMapping_) - ) - ); + rChannel->row_begin(row), rChannel->row_end(row), + gChannel->row_begin(row), bChannel->row_begin(row), + FixedStrideIterator(scanLineOut.data() + 2), + FixedStrideIterator(scanLineOut.data() + 1), + FixedStrideIterator(scanLineOut.data()), + utils::chain(colorspace::Normalizer(params.minLuminance_, + params.maxLuminance_), + utils::CLAMP_F32, + Remapper(params.luminanceMapping_))); png_write_row(png_ptr, scanLineOut.data()); } @@ -225,31 +211,27 @@ return true; } -protected: + protected: size_t m_filesize; }; -struct PngWriterImplFile : public PngWriterImpl -{ - PngWriterImplFile() - : PngWriterImpl() - , m_handle() - {} +struct PngWriterImplFile : public PngWriterImpl { + PngWriterImplFile() : PngWriterImpl(), m_handle() {} - void setupPngDest(png_structp png_ptr, const std::string& filename) { + void setupPngDest(png_structp png_ptr, const std::string &filename) { open(filename); png_init_io(png_ptr, handle()); } - void close() { m_handle.reset(); } - void computeSize() { m_filesize = 0; } + void close() { m_handle.reset(); } + void computeSize() { m_filesize = 0; } -private: - FILE* handle() { return m_handle.data(); } + private: + FILE *handle() { return m_handle.data(); } - void open(const std::string& filename) { - m_handle.reset( fopen(filename.c_str(), "wb") ); - if ( !m_handle ) { + void open(const std::string &filename) { + m_handle.reset(fopen(filename.c_str(), "wb")); + if (!m_handle) { throw io::InvalidFile("Cannot open file " + filename); } } @@ -259,10 +241,9 @@ typedef std::vector PngBuffer; -static -void my_png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - PngBuffer* buffer = (PngBuffer*)png_get_io_ptr(png_ptr); +static void my_png_write_data(png_structp png_ptr, png_bytep data, + png_size_t length) { + PngBuffer *buffer = (PngBuffer *)png_get_io_ptr(png_ptr); size_t newSize = buffer->size() + length; buffer->resize(newSize); @@ -270,45 +251,30 @@ std::copy(data, data + length, buffer->end() - length); } -struct PngWriterImplMemory : public PngWriterImpl -{ - PngWriterImplMemory() - : PngWriterImpl() - , m_buffer() - {} +struct PngWriterImplMemory : public PngWriterImpl { + PngWriterImplMemory() : PngWriterImpl(), m_buffer() {} - void setupPngDest(png_structp png_ptr, const std::string&) - { + void setupPngDest(png_structp png_ptr, const std::string &) { png_set_write_fn(png_ptr, &m_buffer, my_png_write_data, NULL); } - void close() { m_buffer.clear(); } - void computeSize() { setFileSize(m_buffer.size()); } + void close() { m_buffer.clear(); } + void computeSize() { setFileSize(m_buffer.size()); } -private: + private: PngBuffer m_buffer; }; -PngWriter::PngWriter() - : FrameWriter() - , m_impl(new PngWriterImplMemory) -{} +PngWriter::PngWriter() : FrameWriter(), m_impl(new PngWriterImplMemory) {} PngWriter::PngWriter(const string &filename) - : FrameWriter(filename) - , m_impl(new PngWriterImplFile()) -{} - + : FrameWriter(filename), m_impl(new PngWriterImplFile()) {} -PngWriter::~PngWriter() -{ - m_impl->close(); -} +PngWriter::~PngWriter() { m_impl->close(); } -bool PngWriter::write(const pfs::Frame& frame, const Params& params) -{ +bool PngWriter::write(const pfs::Frame &frame, const Params ¶ms) { PngWriterParams p; - p.parse( params ); + p.parse(params); #ifndef NDEBUG cout << p << endl << flush; @@ -317,10 +283,7 @@ return m_impl->write(frame, p, filename()); } -size_t PngWriter::getFileSize() const -{ - return m_impl->getFileSize(); -} +size_t PngWriter::getFileSize() const { return m_impl->getFileSize(); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pngwriter.h luminance-hdr-2.6.0/src/Libpfs/io/pngwriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/pngwriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/pngwriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,34 +30,33 @@ #ifndef PNGWRITER_H #define PNGWRITER_H -#include #include +#include -#include -#include #include +#include +#include namespace pfs { namespace io { class PngWriterImpl; -class PngWriter : public FrameWriter -{ -public: - explicit PngWriter(const std::string& filename); +class PngWriter : public FrameWriter { + public: + explicit PngWriter(const std::string &filename); PngWriter(); ~PngWriter(); - bool write(const pfs::Frame& frame, const pfs::Params& params); + bool write(const pfs::Frame &frame, const pfs::Params ¶ms); size_t getFileSize() const; -private: + private: std::unique_ptr m_impl; }; -} // io -} // pfs +} // io +} // pfs #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rawreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/rawreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rawreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/rawreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,22 +22,22 @@ * */ -#include #include #include #include +#include +#include +#include +#include #include #include #include -#include -#include -#include using namespace pfs; #ifndef NDEBUG -#define PRINT_DEBUG(str) std::cerr << "TiffReader: " << str << std::endl +#define PRINT_DEBUG(str) std::cerr << "RAWReader: " << str << std::endl #else #define PRINT_DEBUG(str) #endif @@ -45,7 +45,8 @@ namespace pfs { namespace io { -/**************************** From UFRAW sourcecode ******************************** +/**************************** From UFRAW sourcecode + * ******************************** * * Convert between Temperature and RGB. * Base on information from http://www.brucelindbloom.com/ @@ -53,156 +54,162 @@ * The generalization to 2000K < T < 4000K and the blackbody fits * are my own and should be taken with a grain of salt. */ -static const double XYZ_to_RGB[3][3] = { - { 3.24071, -0.969258, 0.0556352 }, - {-1.53726, 1.87599, -0.203996 }, - {-0.498571, 0.0415557, 1.05707 } }; - -static -void temperatureToRGB(double T, double RGB[3]) -{ +static const double XYZ_to_RGB[3][3] = {{3.24071, -0.969258, 0.0556352}, + {-1.53726, 1.87599, -0.203996}, + {-0.498571, 0.0415557, 1.05707}}; + +static void temperatureToRGB(double T, double RGB[3]) { int c; double xD, yD, X, Y, Z, max; // Fit for CIE Daylight illuminant - if (T<= 4000) { - xD = 0.27475e9/(T*T*T) - 0.98598e6/(T*T) + 1.17444e3/T + 0.145986; - } else if (T<= 7000) { - xD = -4.6070e9/(T*T*T) + 2.9678e6/(T*T) + 0.09911e3/T + 0.244063; + if (T <= 4000) { + xD = 0.27475e9 / (T * T * T) - 0.98598e6 / (T * T) + 1.17444e3 / T + + 0.145986; + } else if (T <= 7000) { + xD = -4.6070e9 / (T * T * T) + 2.9678e6 / (T * T) + 0.09911e3 / T + + 0.244063; } else { - xD = -2.0064e9/(T*T*T) + 1.9018e6/(T*T) + 0.24748e3/T + 0.237040; + xD = -2.0064e9 / (T * T * T) + 1.9018e6 / (T * T) + 0.24748e3 / T + + 0.237040; } - yD = -3*xD*xD + 2.87*xD - 0.275; + yD = -3 * xD * xD + 2.87 * xD - 0.275; // Fit for Blackbody using CIE standard observer function at 2 degrees - //xD = -1.8596e9/(T*T*T) + 1.37686e6/(T*T) + 0.360496e3/T + 0.232632; - //yD = -2.6046*xD*xD + 2.6106*xD - 0.239156; + // xD = -1.8596e9/(T*T*T) + 1.37686e6/(T*T) + 0.360496e3/T + 0.232632; + // yD = -2.6046*xD*xD + 2.6106*xD - 0.239156; // Fit for Blackbody using CIE standard observer function at 10 degrees - //xD = -1.98883e9/(T*T*T) + 1.45155e6/(T*T) + 0.364774e3/T + 0.231136; - //yD = -2.35563*xD*xD + 2.39688*xD - 0.196035; + // xD = -1.98883e9/(T*T*T) + 1.45155e6/(T*T) + 0.364774e3/T + 0.231136; + // yD = -2.35563*xD*xD + 2.39688*xD - 0.196035; - X = xD/yD; + X = xD / yD; Y = 1; - Z = (1-xD-yD)/yD; + Z = (1 - xD - yD) / yD; max = 0; - for (c=0; c<3; c++) - { - RGB[c] = X*XYZ_to_RGB[0][c] + Y*XYZ_to_RGB[1][c] + Z*XYZ_to_RGB[2][c]; - if (RGB[c]>max) max = RGB[c]; + for (c = 0; c < 3; c++) { + RGB[c] = + X * XYZ_to_RGB[0][c] + Y * XYZ_to_RGB[1][c] + Z * XYZ_to_RGB[2][c]; + if (RGB[c] > max) max = RGB[c]; } - for (c=0; c<3; c++) - { - RGB[c] = RGB[c]/max; + for (c = 0; c < 3; c++) { + RGB[c] = RGB[c] / max; } } -/*********** END UFRAW CODE *****************************************************/ +/*********** END UFRAW CODE + * *****************************************************/ #ifdef DEMOSAICING_GPL3 -#define USER_QUALITY 10 // using AMaZE interpolation +#define USER_QUALITY 10 // using AMaZE interpolation #elif DEMOSAICING_GPL2 -#define USER_QUALITY 5 // using AHDv2 +#define USER_QUALITY 5 // using AHDv2 #else -#define USER_QUALITY 3 // using AHD +#define USER_QUALITY 3 // using AHD #endif -struct RAWReaderParams -{ +struct RAWReaderParams { RAWReaderParams() - : gamma0_(1.f/2.4), gamma1_(12.92) - , fourColorRGB_(0) - , useFujiRotate_(-1) - , userQuality_(USER_QUALITY), medPasses_(0) - , wbMethod_(1), wbTemperature_(6500), wbGreen_(1.0f) - , highlightsMethod_(2) // blend - , highlightsRebuildMethod_(0) - , blackLevel_(std::numeric_limits::min()) - , saturation_(std::numeric_limits::min()) - , autoBrightness_(false), autoBrightnessThreshold_(0.001f) - , brightness_(1.f) - , noiseReductionThreshold_(-std::numeric_limits::max()) - , chromaAberation_(false) - , chroma0_(1.0), chroma1_(1.0), chroma2_(1.0), chroma3_(1.0) - , cameraProfile_() - {} + : gamma0_(1.f / 2.4), + gamma1_(12.92), + fourColorRGB_(0), + useFujiRotate_(-1), + userQuality_(USER_QUALITY), + medPasses_(0), + wbMethod_(1), + wbTemperature_(6500), + wbGreen_(1.0f), + highlightsMethod_(2) // blend + , + highlightsRebuildMethod_(0), + blackLevel_(std::numeric_limits::min()), + saturation_(std::numeric_limits::min()), + autoBrightness_(false), + autoBrightnessThreshold_(0.001f), + brightness_(1.f), + noiseReductionThreshold_(-std::numeric_limits::max()), + chromaAberation_(false), + chroma0_(1.0), + chroma1_(1.0), + chroma2_(1.0), + chroma3_(1.0), + cameraProfile_() {} - void parse(const Params ¶ms) - { + void parse(const Params ¶ms) { int tempInt; float tempFloat; bool tempBool; double tempDouble; // general settings - if ( params.get("raw.four_color", tempInt) ) { + if (params.get("raw.four_color", tempInt)) { fourColorRGB_ = tempInt; } - if ( params.get("raw.fuji_rotate", tempInt) ) { + if (params.get("raw.fuji_rotate", tempInt)) { useFujiRotate_ = tempInt; } - if ( params.get("raw.user_quality", tempInt) ) { + if (params.get("raw.user_quality", tempInt)) { userQuality_ = tempInt; } - if ( params.get("raw.med_passes", tempInt) ) { + if (params.get("raw.med_passes", tempInt)) { medPasses_ = tempInt; } // white balance - if ( params.get("raw.wb_method", tempInt) ) { + if (params.get("raw.wb_method", tempInt)) { wbMethod_ = tempInt; } - if ( params.get("raw.wb_temperature", tempInt) ) { + if (params.get("raw.wb_temperature", tempInt)) { wbTemperature_ = tempInt; } - if ( params.get("raw.wb_green", tempFloat) ) { + if (params.get("raw.wb_green", tempFloat)) { wbGreen_ = tempFloat; } // highlight handling - if ( params.get("raw.highlights", tempInt) ) { + if (params.get("raw.highlights", tempInt)) { highlightsMethod_ = tempInt; } - if ( params.get("raw.highlights_rebuild", tempInt) ) { + if (params.get("raw.highlights_rebuild", tempInt)) { highlightsRebuildMethod_ = tempInt; } // color - if ( params.get("raw.black_level", tempInt) ) { + if (params.get("raw.black_level", tempInt)) { blackLevel_ = tempInt; } - if ( params.get("raw.saturation", tempInt) ) { + if (params.get("raw.saturation", tempInt)) { saturation_ = tempInt; } - if ( params.get("raw.auto_brightness", tempBool) ) { + if (params.get("raw.auto_brightness", tempBool)) { autoBrightness_ = tempBool; } - if ( params.get("raw.auto_brightness_threshold", tempFloat) ) { + if (params.get("raw.auto_brightness_threshold", tempFloat)) { autoBrightnessThreshold_ = tempFloat; } - if ( params.get("raw.brightness", tempFloat) ) { + if (params.get("raw.brightness", tempFloat)) { brightness_ = tempFloat; } - if ( params.get("raw.noise_reduction_threshold", tempFloat) ) { + if (params.get("raw.noise_reduction_threshold", tempFloat)) { noiseReductionThreshold_ = tempFloat; } - if ( params.get("raw.chroma_aber", tempBool)) { + if (params.get("raw.chroma_aber", tempBool)) { chromaAberation_ = tempBool; - if ( tempBool ) { - if ( params.get("raw.chroma_aber_0", tempDouble)) { + if (tempBool) { + if (params.get("raw.chroma_aber_0", tempDouble)) { chroma0_ = tempDouble; } - if ( params.get("raw.chroma_aber_1", tempDouble)) { + if (params.get("raw.chroma_aber_1", tempDouble)) { chroma1_ = tempDouble; } - if ( params.get("raw.chroma_aber_2", tempDouble)) { + if (params.get("raw.chroma_aber_2", tempDouble)) { chroma2_ = tempDouble; } - if ( params.get("raw.chroma_aber_3", tempDouble)) { + if (params.get("raw.chroma_aber_3", tempDouble)) { chroma3_ = tempDouble; } } } std::string tempString; - if ( params.get("raw.camera_profile", tempString) ) { - if ( !tempString.empty() ) { - cameraProfile_.swap( tempString ); + if (params.get("raw.camera_profile", tempString)) { + if (!tempString.empty()) { + cameraProfile_.swap(tempString); } } } @@ -216,46 +223,46 @@ } bool isNoiseReduction() const { - return (noiseReductionThreshold_ != (-std::numeric_limits::max())); + return (noiseReductionThreshold_ != + (-std::numeric_limits::max())); } -public: - float gamma0_; - float gamma1_; + public: + float gamma0_; + float gamma1_; - int fourColorRGB_; - int useFujiRotate_; + int fourColorRGB_; + int useFujiRotate_; - int userQuality_; - int medPasses_; + int userQuality_; + int medPasses_; // 1: camera, 2: auto, 3: custom - int wbMethod_; - int wbTemperature_; - float wbGreen_; - - int highlightsMethod_; - int highlightsRebuildMethod_; - - int blackLevel_; - int saturation_; // white point - bool autoBrightness_; - float autoBrightnessThreshold_; - float brightness_; - - float noiseReductionThreshold_; - - bool chromaAberation_; - double chroma0_; - double chroma1_; - double chroma2_; - double chroma3_; + int wbMethod_; + int wbTemperature_; + float wbGreen_; + + int highlightsMethod_; + int highlightsRebuildMethod_; + + int blackLevel_; + int saturation_; // white point + bool autoBrightness_; + float autoBrightnessThreshold_; + float brightness_; + + float noiseReductionThreshold_; + + bool chromaAberation_; + double chroma0_; + double chroma1_; + double chroma2_; + double chroma3_; std::string cameraProfile_; }; -ostream& operator<<(ostream& out, const RAWReaderParams& p) -{ +ostream &operator<<(ostream &out, const RAWReaderParams &p) { stringstream ss; ss << "[gamma0: " << p.gamma0_ << ", gamma1: " << p.gamma1_; ss << ", 4-Color RGB: " << p.fourColorRGB_; @@ -297,74 +304,64 @@ return (out << ss.str()); } -const char* embbededProfile = "embed"; +const char *embbededProfile = "embed"; + +static void setParams(LibRaw &processor, const RAWReaderParams ¶ms) { + libraw_output_params_t &outParams = processor.imgdata.params; -static -void setParams(LibRaw& processor, const RAWReaderParams& params) -{ - libraw_output_params_t& outParams = processor.imgdata.params; - - outParams.output_bps = 16; - outParams.output_color = 1; // sRGB - outParams.gamm[0] = params.gamma0_; // outParams.gamm[0] = 1/2.4; //sRGB - outParams.gamm[1] = params.gamma1_; // outParams.gamm[1] = 12.92; //sRGB + outParams.output_bps = 16; + outParams.output_color = 1; // sRGB + outParams.gamm[0] = params.gamma0_; // outParams.gamm[0] = 1/2.4; //sRGB + outParams.gamm[1] = params.gamma1_; // outParams.gamm[1] = 12.92; //sRGB // use 4-color demosaicing algorithm - outParams.four_color_rgb = params.fourColorRGB_; + outParams.four_color_rgb = params.fourColorRGB_; // do not rotate or strech pixels on fuji cameras - default = 1 (rotate) - outParams.use_fuji_rotate = params.useFujiRotate_; + outParams.use_fuji_rotate = params.useFujiRotate_; // demosaicing parameters - outParams.user_qual = params.userQuality_; - outParams.med_passes = params.medPasses_; - outParams.user_flip = 0; // exif orientation is done afterwards - + outParams.user_qual = params.userQuality_; + outParams.med_passes = params.medPasses_; + outParams.user_flip = 0; // exif orientation is done afterwards switch (params.wbMethod_) { - case 1: // camera - { - outParams.use_camera_wb = 1; - } break; - case 3: // custom - { - double temperature = params.wbTemperature_; - double RGB[3]; + case 1: // camera + { + outParams.use_camera_wb = 1; + } break; + case 3: // custom + { + double temperature = params.wbTemperature_; + double RGB[3]; - temperatureToRGB(temperature, RGB); + temperatureToRGB(temperature, RGB); - RGB[1] = RGB[1] / params.wbGreen_; + RGB[1] = RGB[1] / params.wbGreen_; - bool identify = true; - if (processor.adjust_sizes_info_only() != LIBRAW_SUCCESS) - { - identify = false; - } + bool identify = true; + if (processor.adjust_sizes_info_only() != LIBRAW_SUCCESS) { + identify = false; + } - if (identify && processor.imgdata.idata.colors >= 3) - { - RGB[0] = processor.imgdata.color.pre_mul[0] / RGB[0]; - RGB[1] = processor.imgdata.color.pre_mul[1] / RGB[1]; - RGB[2] = processor.imgdata.color.pre_mul[2] / RGB[2]; - } - else - { - RGB[0] = 1.0 / RGB[0]; - RGB[1] = 1.0 / RGB[1]; - RGB[2] = 1.0 / RGB[2]; - } - - outParams.user_mul[0] = RGB[0]; - outParams.user_mul[1] = RGB[1]; - outParams.user_mul[2] = RGB[2]; - outParams.user_mul[3] = RGB[1]; - } break; - case 2: // auto - default: { - outParams.use_auto_wb = 1; - } break; + if (identify && processor.imgdata.idata.colors >= 3) { + RGB[0] = processor.imgdata.color.pre_mul[0] / RGB[0]; + RGB[1] = processor.imgdata.color.pre_mul[1] / RGB[1]; + RGB[2] = processor.imgdata.color.pre_mul[2] / RGB[2]; + } else { + RGB[0] = 1.0 / RGB[0]; + RGB[1] = 1.0 / RGB[1]; + RGB[2] = 1.0 / RGB[2]; + } + + outParams.user_mul[0] = RGB[0]; + outParams.user_mul[1] = RGB[1]; + outParams.user_mul[2] = RGB[2]; + outParams.user_mul[3] = RGB[1]; + } break; + case 2: // auto + default: { outParams.use_auto_wb = 1; } break; } - outParams.highlight = params.highlightsMethod_; - if (params.highlightsMethod_ >= 3) - { + outParams.highlight = params.highlightsMethod_; + if (params.highlightsMethod_ >= 3) { outParams.highlight += params.highlightsRebuildMethod_; } @@ -372,13 +369,18 @@ outParams.auto_bright_thr = params.autoBrightnessThreshold_; outParams.bright = params.brightness_; - if ( params.isBlackLevel() ) { outParams.user_black = params.blackLevel_; } - if ( params.isSaturation() ) { outParams.user_sat = params.saturation_; } - if ( params.isNoiseReduction() ) { outParams.threshold = params.noiseReductionThreshold_; } + if (params.isBlackLevel()) { + outParams.user_black = params.blackLevel_; + } + if (params.isSaturation()) { + outParams.user_sat = params.saturation_; + } + if (params.isNoiseReduction()) { + outParams.threshold = params.noiseReductionThreshold_; + } // chromatic aberation - if (params.chromaAberation_) - { + if (params.chromaAberation_) { outParams.aber[0] = params.chroma0_; // outParams.aber[1] = params.chroma1_; outParams.aber[2] = params.chroma2_; @@ -386,13 +388,10 @@ } // camera profile - if (params.cameraProfile_.empty()) - { - outParams.camera_profile = (char*)embbededProfile; - } - else - { - outParams.camera_profile = (char*)params.cameraProfile_.c_str(); + if (params.cameraProfile_.empty()) { + outParams.camera_profile = (char *)embbededProfile; + } else { + outParams.camera_profile = (char *)params.cameraProfile_.c_str(); } } @@ -403,62 +402,38 @@ #define P2 m_processor.imgdata.other #define OUT m_processor.imgdata.params -RAWReader::RAWReader(const std::string& filename) - : FrameReader(filename) -{ +RAWReader::RAWReader(const std::string &filename) : FrameReader(filename) { RAWReader::open(); } -RAWReader::~RAWReader() -{ - RAWReader::close(); -} +RAWReader::~RAWReader() { RAWReader::close(); } -void RAWReader::open() -{ +void RAWReader::open() { RAWReader::close(); - if (m_processor.open_file(filename().c_str()) != LIBRAW_SUCCESS) - { + if (m_processor.open_file(filename().c_str()) != LIBRAW_SUCCESS) { throw pfs::io::InvalidFile("RAWReader: cannot open file " + filename()); } setWidth(S.width); setHeight(S.height); } -bool RAWReader::isOpen() const -{ - return true; -} +bool RAWReader::isOpen() const { return true; } -void RAWReader::close() -{ - m_processor.recycle(); -} +void RAWReader::close() { m_processor.recycle(); } -void RAWReader::read(Frame &frame, const Params ¶ms) -{ +void RAWReader::read(Frame &frame, const Params ¶ms) { RAWReaderParams p; p.parse(params); - //std::cout << p << std::endl; - setParams(m_processor, p); - // m_processor.set_progress_handler(cb, callback_data); open(); - if (m_processor.unpack() != LIBRAW_SUCCESS) - { + if (m_processor.unpack() != LIBRAW_SUCCESS) { m_processor.recycle(); throw pfs::io::ReadException("Error Unpacking RAW File"); } - if (m_processor.dcraw_process() != LIBRAW_SUCCESS) - { - m_processor.recycle(); - throw pfs::io::ReadException("Error Processing RAW File"); - } - #ifndef NDEBUG PRINT_DEBUG("Width: " << S.width << " Height: " << S.height); PRINT_DEBUG("iWidth: " << S.iwidth << " iHeight: " << S.iheight); @@ -470,9 +445,14 @@ PRINT_DEBUG("Focal Length: " << P2.focal_len); #endif + if (m_processor.dcraw_process() != LIBRAW_SUCCESS) { + m_processor.recycle(); + throw pfs::io::ReadException("Error Processing RAW File"); + } + libraw_processed_image_t *image = m_processor.dcraw_make_mem_image(); - if (!image) // ret != LIBRAW_SUCCESS || + if (!image) // ret != LIBRAW_SUCCESS || { PRINT_DEBUG("Memory Error in processing RAW File"); m_processor.recycle(); @@ -482,29 +462,31 @@ int W = image->width; int H = image->height; - assert(image->data_size == W*H*3*sizeof(uint16_t)); + assert(image->data_size == W * H * 3 * sizeof(uint16_t)); - pfs::Frame tempFrame( W, H ); + pfs::Frame tempFrame(W, H); pfs::Channel *Xc, *Yc, *Zc; - tempFrame.createXYZChannels( Xc, Yc, Zc ); + tempFrame.createXYZChannels(Xc, Yc, Zc); - const uint16_t* raw_data = reinterpret_cast(image->data); - utils::transform(FixedStrideIterator(raw_data), - FixedStrideIterator(raw_data + H*W*3), - FixedStrideIterator(raw_data + 1), - FixedStrideIterator(raw_data + 2), - Xc->begin(), Yc->begin(), Zc->begin(), - colorspace::Gamma()); + const uint16_t *raw_data = reinterpret_cast(image->data); + utils::transform( + FixedStrideIterator(raw_data), + FixedStrideIterator(raw_data + H * W * 3), + FixedStrideIterator(raw_data + 1), + FixedStrideIterator(raw_data + 2), Xc->begin(), + Yc->begin(), Zc->begin(), + colorspace::Gamma()); - PRINT_DEBUG("Data size: " << image->data_size << " " << W*H*3*sizeof(uint16_t)); + PRINT_DEBUG("Data size: " << image->data_size << " " + << W * H * 3 * sizeof(uint16_t)); PRINT_DEBUG("W: " << W << " H: " << H); LibRaw::dcraw_clear_mem(image); m_processor.recycle(); FrameReader::read(tempFrame, params); - frame.swap( tempFrame ); + frame.swap(tempFrame); } #undef P1 @@ -514,5 +496,5 @@ #undef P2 #undef OUT -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rawreader.h luminance-hdr-2.6.0/src/Libpfs/io/rawreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rawreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/rawreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -43,8 +43,8 @@ namespace io { class RAWReader : public FrameReader { -public: - RAWReader(const std::string& filename); + public: + RAWReader(const std::string &filename); ~RAWReader(); void open(); @@ -53,11 +53,11 @@ void read(Frame &frame, const Params ¶ms); -private: + private: LibRaw m_processor; }; -} // io -} // pfs +} // io +} // pfs #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbecommon.h luminance-hdr-2.6.0/src/Libpfs/io/rgbecommon.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbecommon.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/rgbecommon.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,12 +37,11 @@ typedef unsigned char Trgbe; //! \name RGB values and their exponent -struct Trgbe_pixel -{ +struct Trgbe_pixel { Trgbe r; Trgbe g; Trgbe b; Trgbe e; }; -#endif // PFS_IO_RGBECOMMON_H +#endif // PFS_IO_RGBECOMMON_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbereader.cpp luminance-hdr-2.6.0/src/Libpfs/io/rgbereader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbereader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/rgbereader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,40 +21,39 @@ * ---------------------------------------------------------------------- */ -#include -#include #include +#include #include +#include -#include #include -#include -#include #include +#include +#include +#include using namespace std; namespace pfs { namespace io { -void rgbe2rgb(const Trgbe_pixel& rgbe, float exposure, float &r, float &g, float &b) -{ - if ( rgbe.e != 0 ) // a non-zero pixel +void rgbe2rgb(const Trgbe_pixel &rgbe, float exposure, float &r, float &g, + float &b) { + if (rgbe.e != 0) // a non-zero pixel { - int e = rgbe.e - int(128+8); - double f = ldexp( 1.0, e ) * WHITE_EFFICACY / exposure; + int e = rgbe.e - int(128 + 8); + double f = ldexp(1.0, e) /*WHITE_EFFICACY */ / exposure; r = (float)(rgbe.r * f); g = (float)(rgbe.g * f); b = (float)(rgbe.b * f); - } - else + } else r = g = b = 0.f; } // Reading RGBE files -void readRadianceHeader(FILE *file, int &width, int &height, float &exposure, Colorspace &colorspace) -{ +void readRadianceHeader(FILE *file, int &width, int &height, float &exposure, + Colorspace &colorspace) { // DEBUG_STR << "RGBE: reading header..." << endl; // read header information @@ -63,61 +62,57 @@ int format = 0; exposure = 1.0f; - while ( !feof(file) ) - { - if ( fgets(head, 200, file) == NULL ) { + while (!feof(file)) { + if (fgets(head, 200, file) == NULL) { throw pfs::io::InvalidHeader("RGBE: invalid header"); } - if ( strcmp(head, "\n")==0 ) break; - if ( strcmp(head, "#?RADIANCE\n") == 0 ) { + if (strcmp(head, "\n") == 0) break; + if (strcmp(head, "#?RADIANCE\n") == 0) { // format specifier found format = 1; } - if ( strcmp(head, "#?RGBE\n") == 0 ) { + if (strcmp(head, "#?RGBE\n") == 0) { // format specifier found format = 1; } - if ( strcmp(head, "#?AUTOPANO\n") == 0 ) { + if (strcmp(head, "#?AUTOPANO\n") == 0) { // format specifier found - format=1; + format = 1; } - if ( head[0]=='#' ) { + if (head[0] == '#') { // comment found - skip continue; } - if ( strcmp(head, "FORMAT=32-bit_rle_rgbe\n") == 0 ) { + if (strcmp(head, "FORMAT=32-bit_rle_rgbe\n") == 0) { // header found colorspace = RGB; continue; } - if ( strcmp(head, "FORMAT=32-bit_rle_xyze\n") == 0 ) { + if (strcmp(head, "FORMAT=32-bit_rle_xyze\n") == 0) { // header found colorspace = XYZ; continue; } - if ( sscanf(head, "EXPOSURE=%f", &fval) == 1 ) - { + if (sscanf(head, "EXPOSURE=%f", &fval) == 1) { // exposure value exposure *= fval; } } // ignore wierd exposure adjustments - if ( exposure > 1e12 || exposure < 1e-12 ) { + if (exposure > 1e12 || exposure < 1e-12) { exposure = 1.0f; } - if ( !format ) - { - throw pfs::Exception( "RGBE: no format specifier found" ); + if (!format) { + throw pfs::Exception("RGBE: no format specifier found"); } // image size char xbuf[4], ybuf[4]; - if ( fgets(head, sizeof(head)/sizeof(head[0]), file) == NULL || - sscanf(head, "%3s %d %3s %d", ybuf, &height, xbuf, &width) != 4 ) - { - throw pfs::Exception( "RGBE: unknown image size" ); + if (fgets(head, sizeof(head) / sizeof(head[0]), file) == NULL || + sscanf(head, "%3s %d %3s %d", ybuf, &height, xbuf, &width) != 4) { + throw pfs::Exception("RGBE: unknown image size"); } assert(height > 0); @@ -129,79 +124,69 @@ width = height - width; height = height - width; } -*/ + */ // DEBUG_STR << "RGBE: image size " << width << "x" << height << endl; } -void RLERead(FILE* file, Trgbe* scanline, int size) -{ +void RLERead(FILE *file, Trgbe *scanline, int size) { int peek = 0; - while ( peek < size ) - { + while (peek < size) { Trgbe p[2]; - if ( fread(p, sizeof(p), 1, file) == 0) { + if (fread(p, sizeof(p), 1, file) == 0) { throw pfs::io::ReadException("RGBE: Invalid data size"); } - if ( p[0]>128 ) - { + if (p[0] > 128) { // a run - int run_len = p[0]-128; + int run_len = p[0] - 128; - while ( run_len > 0 ) - { + while (run_len > 0) { scanline[peek++] = p[1]; run_len--; } - } - else - { + } else { // a non-run scanline[peek++] = p[1]; - int nonrun_len = p[0]-1; - if ( nonrun_len > 0 ) - { - if ( fread(scanline+peek, sizeof(*scanline), nonrun_len, file) == 0) { + int nonrun_len = p[0] - 1; + if (nonrun_len > 0) { + if (fread(scanline + peek, sizeof(*scanline), nonrun_len, + file) == 0) { throw pfs::io::ReadException("RGBE: Invalid data size"); - } - else { + } else { peek += nonrun_len; } } } } - if ( peek != size ) - { - throw pfs::io::ReadException( "RGBE: difference in size while reading RLE scanline"); + if (peek != size) { + throw pfs::io::ReadException( + "RGBE: difference in size while reading RLE scanline"); } - } - void readRadiance(FILE *file, int width, int height, float exposure, - pfs::Array2Df &X, pfs::Array2Df &Y, pfs::Array2Df &Z) -{ + pfs::Array2Df &X, pfs::Array2Df &Y, pfs::Array2Df &Z) { // read image // depending on format read either rle or normal (note: only rle supported) - std::vector scanline(width*4); + std::vector scanline(width * 4); - for (int y = 0; y < height; ++y) - { + for (int y = 0; y < height; ++y) { // read rle header Trgbe header[4]; - if ( fread(header, sizeof(header), 1, file) == sizeof(header) ) { + if (fread(header, sizeof(header), 1, file) == sizeof(header)) { throw pfs::io::ReadException("RGBE: invalid data size"); } - if ( header[0] != 2 || header[1] != 2 || (header[2]<<8) + header[3] != width ) - { + if (header[0] != 2 || header[1] != 2 || + (header[2] << 8) + header[3] != width) { //--- simple scanline (not rle) - size_t rez = fread(scanline.data()+4, sizeof(Trgbe), 4*width-4, file); - if ( rez != (size_t)4*width-4 ) - { + size_t rez = + fread(scanline.data() + 4, sizeof(Trgbe), 4 * width - 4, file); + if (rez != (size_t)4 * width - 4) { // DEBUG_STR << "RGBE: scanline " << y // << "(" << (int)rez << "/" << width << ")" < -#include #include +#include +#include -#include #include +#include -#include #include +#include #include using namespace std; @@ -37,110 +37,97 @@ namespace pfs { namespace io { -int RLEWrite(FILE* file, Trgbe* scanline, int size) -{ - Trgbe* scanend = scanline + size; - while ( scanline < scanend ) - { - int run_start = 0; - int peek = 0; - int run_len = 0; - while ( run_len <= 4 && peek < 128 && ((scanline + peek) < scanend) ) - { - run_start = peek; - run_len = 0; - while ( (run_len < 127) && - (run_start + run_len < 128) && - (scanline + peek < scanend) && - (scanline[run_start] == scanline[peek]) ) - { +int RLEWrite(FILE *file, Trgbe *scanline, int size) { + Trgbe *scanend = scanline + size; + while (scanline < scanend) { + int run_start = 0; + int peek = 0; + int run_len = 0; + while (run_len <= 4 && peek < 128 && ((scanline + peek) < scanend)) { + run_start = peek; + run_len = 0; + while ((run_len < 127) && (run_start + run_len < 128) && + (scanline + peek < scanend) && + (scanline[run_start] == scanline[peek])) { peek++; run_len++; } } - if ( run_len > 4 ) - { + if (run_len > 4) { // write a non run: scanline[0] to scanline[run_start] - if ( run_start > 0 ) - { - std::vector buf(run_start+1); + if (run_start > 0) { + std::vector buf(run_start + 1); buf[0] = run_start; - for ( int i=0 ; i < run_start ; i++ ) { - buf[i+1] = scanline[i]; + for (int i = 0; i < run_start; i++) { + buf[i + 1] = scanline[i]; } fwrite(buf.data(), sizeof(Trgbe), run_start + 1, file); } // write a run: scanline[run_start], run_len Trgbe buf[2]; - buf[0] = 128+run_len; + buf[0] = 128 + run_len; buf[1] = scanline[run_start]; fwrite(buf, sizeof(*buf), 2, file); - } - else - { + } else { // write a non run: scanline[0] to scanline[peek] - std::vector buf(peek+1); + std::vector buf(peek + 1); buf[0] = peek; - for ( int i=0 ; i scanlineB(width); std::vector scanlineE(width); - for ( size_t y=0 ; y> 8;; + header[2] = width >> 8; + ; header[3] = width & 0xFF; fwrite(header, sizeof(header), 1, file); // each channel is encoded separately - for ( size_t x=0 ; x < width ; x++ ) - { + for (size_t x = 0; x < width; x++) { Trgbe_pixel p; - rgb2rgbe( X(x,y), Y(x,y), Z(x,y), p ); + rgb2rgbe(X(x, y), Y(x, y), Z(x, y), p); scanlineR[x] = p.r; scanlineG[x] = p.g; scanlineB[x] = p.b; @@ -187,18 +173,15 @@ } } -RGBEWriter::RGBEWriter(const std::string &filename) - : FrameWriter(filename) -{} +RGBEWriter::RGBEWriter(const std::string &filename) : FrameWriter(filename) {} -bool RGBEWriter::write(const Frame &frame, const Params &/*params*/) -{ +bool RGBEWriter::write(const Frame &frame, const Params & /*params*/) { utils::ScopedStdIoFile outputStream(fopen(filename().c_str(), "wb")); if (!outputStream) { throw pfs::io::InvalidFile("RGBEWriter: cannot open " + filename()); } - const pfs::Channel *X, *Y, *Z; // X Y Z Channels contain R G B data + const pfs::Channel *X, *Y, *Z; // X Y Z Channels contain R G B data frame.getXYZChannels(X, Y, Z); writeRadiance(outputStream.data(), *X, *Y, *Z); @@ -206,5 +189,5 @@ return true; } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbewriter.h luminance-hdr-2.6.0/src/Libpfs/io/rgbewriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/rgbewriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/rgbewriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,23 +31,21 @@ #ifndef PFS_IO_RGBEWRITER_H #define PFS_IO_RGBEWRITER_H -#include -#include -#include #include +#include +#include +#include namespace pfs { namespace io { -class RGBEWriter : public FrameWriter -{ -public: - RGBEWriter(const std::string& filename); +class RGBEWriter : public FrameWriter { + public: + RGBEWriter(const std::string &filename); bool write(const pfs::Frame &frame, const pfs::Params ¶ms); }; - } } -#endif // PFS_IO_RGBEWRITER_H +#endif // PFS_IO_RGBEWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffcommon.h luminance-hdr-2.6.0/src/Libpfs/io/tiffcommon.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffcommon.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/tiffcommon.h 2019-06-09 19:18:38.000000000 +0000 @@ -22,15 +22,13 @@ #ifndef TIFFCOMMON_H #define TIFFCOMMON_H -#include -#include #include +#include +#include -struct CleanUpTiffFile -{ - static inline - void cleanup(TIFF* profile) { - if ( profile ) { +struct CleanUpTiffFile { + static inline void cleanup(TIFF *profile) { + if (profile) { #ifndef NDEBUG std::clog << "CleanUpTiffFile::cleanup()\n"; #endif @@ -40,4 +38,4 @@ }; typedef pfs::utils::ResourceHandler ScopedTiffFile; -#endif // TIFFCOMMON_H +#endif // TIFFCOMMON_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffreader.cpp luminance-hdr-2.6.0/src/Libpfs/io/tiffreader.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffreader.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/tiffreader.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -19,35 +19,35 @@ * ---------------------------------------------------------------------- */ -#include #include +#include -#include #include +#include #include -#include #include -#include #include +#include +#include #include #include #include +#include #include #include -#include #include -#include #include +#include #include #include +#include #include #include -#include using namespace pfs; using namespace pfs::utils; @@ -61,16 +61,14 @@ //! \brief This code is taken from tificc.c from libcms distribution and //! sligthly modified -//! \ref http://svn.ghostscript.com/ghostscript/trunk/gs/lcms2/utils/tificc/tificc.c -static -cmsHPROFILE GetTIFFProfile(TIFF* in, uint16 bps) -{ +//! \ref +//! http://svn.ghostscript.com/ghostscript/trunk/gs/lcms2/utils/tificc/tificc.c +static cmsHPROFILE GetTIFFProfile(TIFF *in, uint16 bps) { cmsHPROFILE hProfile; - void* iccProfilePtr; + void *iccProfilePtr; cmsUInt32Number iccProfileSize; - if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &iccProfileSize, &iccProfilePtr)) - { + if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &iccProfileSize, &iccProfilePtr)) { PRINT_DEBUG("iccProfileSize: " << iccProfileSize); hProfile = cmsOpenProfileFromMem(iccProfilePtr, iccProfileSize); @@ -82,18 +80,18 @@ // Try to see if "colorimetric" tiff.data() cmsCIExyYTRIPLE primaries; cmsCIExyY whitePoint; - cmsToneCurve* curve[3]; + cmsToneCurve *curve[3]; - cmsFloat32Number* chr; - if ( !TIFFGetField(in, TIFFTAG_PRIMARYCHROMATICITIES, &chr) ) { + cmsFloat32Number *chr; + if (!TIFFGetField(in, TIFFTAG_PRIMARYCHROMATICITIES, &chr)) { return 0; } - primaries.Red.x = chr[0]; - primaries.Red.y = chr[1]; - primaries.Green.x = chr[2]; - primaries.Green.y = chr[3]; - primaries.Blue.x = chr[4]; - primaries.Blue.y = chr[5]; + primaries.Red.x = chr[0]; + primaries.Red.y = chr[1]; + primaries.Green.x = chr[2]; + primaries.Green.y = chr[3]; + primaries.Blue.x = chr[4]; + primaries.Blue.y = chr[5]; PRINT_DEBUG(primaries.Red.x); PRINT_DEBUG(primaries.Red.y); @@ -104,8 +102,8 @@ primaries.Red.Y = primaries.Green.Y = primaries.Blue.Y = 1.0; - cmsFloat32Number* wp; - if (!TIFFGetField (in, TIFFTAG_WHITEPOINT, &wp)) { + cmsFloat32Number *wp; + if (!TIFFGetField(in, TIFFTAG_WHITEPOINT, &wp)) { return 0; } @@ -117,25 +115,26 @@ PRINT_DEBUG(whitePoint.y); // Transferfunction is a bit harder.... - //cmsUInt16Number gmr[1 << bps]; - //cmsUInt16Number gmg[1 << bps]; - //cmsUInt16Number gmb[1 << bps]; + // cmsUInt16Number gmr[1 << bps]; + // cmsUInt16Number gmg[1 << bps]; + // cmsUInt16Number gmb[1 << bps]; std::vector gmr(1 << bps); std::vector gmg(1 << bps); std::vector gmb(1 << bps); - //TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, gmr, gmg, gmb); - TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, gmr.data(), gmg.data(), gmb.data()); - - //curve[0] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmr); - //curve[1] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmg); - //curve[2] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmb); + // TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, gmr, gmg, gmb); + TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, gmr.data(), gmg.data(), + gmb.data()); + + // curve[0] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmr); + // curve[1] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmg); + // curve[2] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmb); curve[0] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmr.data()); curve[1] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmg.data()); curve[2] = cmsBuildTabulatedToneCurve16(NULL, 1 << bps, gmb.data()); - hProfile = cmsCreateRGBProfile (&whitePoint, &primaries, curve); + hProfile = cmsCreateRGBProfile(&whitePoint, &primaries, curve); cmsFreeToneCurve(curve[0]); cmsFreeToneCurve(curve[1]); @@ -150,17 +149,17 @@ struct TiffReaderParams {}; -struct TiffReaderData -{ +struct TiffReaderData { // < photometric type, bits per sample > - typedef boost::function Callback; + typedef boost::function + Callback; TiffReaderData() - : hasAlpha_(false) - , stonits_(1.0) - , currentCallback_( boost::bind(&TiffReaderData::doNothing, _1, _2, _3) ) - , hsRGB_( cmsCreate_sRGBProfile() ) - {} + : hasAlpha_(false), + stonits_(1.0), + currentCallback_(boost::bind(&TiffReaderData::doNothing, _1, _2, _3)), + hsRGB_(cmsCreate_sRGBProfile()) {} // public members... ScopedTiffFile file_; @@ -168,205 +167,215 @@ uint32 height_; uint32 width_; - uint16 compressionType_; // compression type - uint16 photometricType_; // type of photometric data + uint16 compressionType_; // compression type + uint16 photometricType_; // type of photometric data - uint16 bitsPerSample_; // bits per sample - uint16 samplesPerPixel_; // number of channels in tiff file (only 1-3 are used) - bool hasAlpha_; + uint16 bitsPerSample_; // bits per sample + uint16 samplesPerPixel_; // number of channels in tiff file (only 1-3 are + // used) + bool hasAlpha_; - double stonits_; // scale factor to get nit values + double stonits_; // scale factor to get nit values Callback currentCallback_; - ScopedCmsProfile hsRGB_; // ( ); - ScopedCmsProfile hIn_; // ( GetTIFFProfile(tif) ); + ScopedCmsProfile hsRGB_; // ( ); + ScopedCmsProfile hIn_; // ( GetTIFFProfile(tif) ); // public functions - inline - TIFF* handle() { return file_.data(); } + inline TIFF *handle() { return file_.data(); } - void read(Frame &frame, const Params& /*params*/) - { + void read(Frame &frame, const Params & /*params*/) { currentCallback_(this, frame, TiffReaderParams()); } - void initReader() - { + void initReader() { typedef std::pair RegistryKey; typedef std::map Registry; /*static*/ Registry sm_registry = map_list_of - // (RegistryKey(PHOTOMETRIC_LOGLUV, 32), boost::bind(&TiffReaderData::readLogLuv, _1, _2, _3)) // < - (RegistryKey(PHOTOMETRIC_LOGLUV, 16), boost::bind(&TiffReaderData::readLogLuv, _1, _2, _3)) - (RegistryKey(PHOTOMETRIC_SEPARATED, 8), boost::bind(&TiffReaderData::readCMYK, _1, _2, _3)) - (RegistryKey(PHOTOMETRIC_SEPARATED, 16), boost::bind(&TiffReaderData::readCMYK, _1, _2, _3)) - // (RegistryKey(PHOTOMETRIC_SEPARATED, 32), boost::bind(&TiffReaderData::readCMYK, _1, _2, _3)) - (RegistryKey(PHOTOMETRIC_RGB, 8), boost::bind(&TiffReaderData::readRGB, _1, _2, _3)) - (RegistryKey(PHOTOMETRIC_RGB, 16), boost::bind(&TiffReaderData::readRGB, _1, _2, _3)) - (RegistryKey(PHOTOMETRIC_RGB, 32), boost::bind(&TiffReaderData::readRGB, _1, _2, _3)) - ; - - Registry::iterator it = sm_registry.find(RegistryKey(photometricType_, bitsPerSample_)); - if ( it == sm_registry.end() ) { - throw pfs::io::InvalidHeader(std::string("TiffReader: cannot find the right function to parse the data ") + - "bits per sample: " + boost::lexical_cast(bitsPerSample_) + - " photometric type: " + boost::lexical_cast(photometricType_)); + // (RegistryKey(PHOTOMETRIC_LOGLUV, 32), + // boost::bind(&TiffReaderData::readLogLuv, _1, _2, _3)) // < + (RegistryKey(PHOTOMETRIC_LOGLUV, 16), + boost::bind(&TiffReaderData::readLogLuv, _1, _2, _3))( + RegistryKey(PHOTOMETRIC_SEPARATED, 8), + boost::bind(&TiffReaderData::readCMYK, _1, _2, _3))( + RegistryKey(PHOTOMETRIC_SEPARATED, 16), + boost::bind(&TiffReaderData::readCMYK, _1, _2, _3)) + // (RegistryKey(PHOTOMETRIC_SEPARATED, 32), + // boost::bind(&TiffReaderData::readCMYK, _1, _2, _3)) + (RegistryKey(PHOTOMETRIC_RGB, 8), + boost::bind(&TiffReaderData::readRGB, _1, _2, _3))( + RegistryKey(PHOTOMETRIC_RGB, 16), + boost::bind(&TiffReaderData::readRGB, _1, _2, _3))( + RegistryKey(PHOTOMETRIC_RGB, 32), + boost::bind(&TiffReaderData::readRGB, _1, _2, _3)); + + Registry::iterator it = + sm_registry.find(RegistryKey(photometricType_, bitsPerSample_)); + if (it == sm_registry.end()) { + throw pfs::io::InvalidHeader( + std::string("TiffReader: cannot find the right function to " + "parse the data ") + + "bits per sample: " + + boost::lexical_cast(bitsPerSample_) + + " photometric type: " + + boost::lexical_cast(photometricType_)); } currentCallback_ = it->second; } // private stuff... -private: - cmsHTRANSFORM getColorSpaceTransform() - { - if ( !hIn_ ) { + private: + cmsHTRANSFORM getColorSpaceTransform() { + if (!hIn_) { PRINT_DEBUG("No available input profile"); return NULL; } PRINT_DEBUG("Available ICC Profile, building LCMS Transform"); - cmsUInt32Number cmsInputFormat = TYPE_RGB_8; + cmsUInt32Number cmsInputFormat = TYPE_RGB_8; cmsUInt32Number cmsOutputFormat = TYPE_RGB_FLT; - cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; + cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; - switch ( photometricType_ ) { - case PHOTOMETRIC_RGB: { - switch (bitsPerSample_) { - case 32: { - if (hasAlpha_) { - cmsInputFormat = TYPE_RGBA_FLT; - } else { - cmsInputFormat = TYPE_RGB_FLT; - } + switch (photometricType_) { + case PHOTOMETRIC_RGB: { + switch (bitsPerSample_) { + case 32: { + if (hasAlpha_) { + cmsInputFormat = TYPE_RGBA_FLT; + } else { + cmsInputFormat = TYPE_RGB_FLT; + } + } break; + case 16: { + if (hasAlpha_) { + cmsInputFormat = TYPE_RGBA_16; + } else { + cmsInputFormat = TYPE_RGB_16; + } + } break; + default: + case 8: { + if (hasAlpha_) { + cmsInputFormat = TYPE_RGBA_8; + } else { + cmsInputFormat = TYPE_RGB_8; + } + } + } // switch } break; - case 16: { - if (hasAlpha_) { - cmsInputFormat = TYPE_RGBA_16; - } else { - cmsInputFormat = TYPE_RGB_16; - } - } break; - default: - case 8: { - if (hasAlpha_) { - cmsInputFormat = TYPE_RGBA_8; - } else { - cmsInputFormat = TYPE_RGB_8; - } - } - } // switch - } break; - case PHOTOMETRIC_SEPARATED : { - switch (bitsPerSample_) { - case 32: { - cmsInputFormat = TYPE_CMYK_FLT; + case PHOTOMETRIC_SEPARATED: { + switch (bitsPerSample_) { + case 32: { + cmsInputFormat = TYPE_CMYK_FLT; + } break; + case 16: { + cmsInputFormat = TYPE_CMYK_16; + } break; + default: + case 8: { + cmsInputFormat = TYPE_CMYK_8; + } + } // switch } break; - case 16: { - cmsInputFormat = TYPE_CMYK_16; - } break; - default: - case 8: { - cmsInputFormat = TYPE_CMYK_8; - } - } // switch - } break; } - return cmsCreateTransform (hIn_.data(), cmsInputFormat, - hsRGB_.data(), cmsOutputFormat, - cmsIntent, 0); + return cmsCreateTransform(hIn_.data(), cmsInputFormat, hsRGB_.data(), + cmsOutputFormat, cmsIntent, 0); } - void doNothing(Frame &/*frame*/, const TiffReaderParams& /*params*/) {} + void doNothing(Frame & /*frame*/, const TiffReaderParams & /*params*/) {} template - void read3Components(Frame& frame, const TiffReaderParams& /*params*/, - const Converter& conv) - { + void read3Components(Frame &frame, const TiffReaderParams & /*params*/, + const Converter &conv) { assert(samplesPerPixel_ >= 3); Frame tempFrame(width_, height_); - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; + pfs::Channel *Xc; + pfs::Channel *Yc; + pfs::Channel *Zc; tempFrame.createXYZChannels(Xc, Yc, Zc); - std::vector tempBuffer(width_*samplesPerPixel_); - for (uint32 row = 0; row < height_; row++) - { + std::vector tempBuffer((size_t) width_ * samplesPerPixel_); + for (uint32 row = 0; row < height_; row++) { TIFFReadScanline(handle(), tempBuffer.data(), row); - utils::transform(StrideIterator(tempBuffer.data(), samplesPerPixel_), - StrideIterator(tempBuffer.data() + width_*samplesPerPixel_, samplesPerPixel_), - StrideIterator(tempBuffer.data() + 1, samplesPerPixel_), - StrideIterator(tempBuffer.data() + 2, samplesPerPixel_), - Xc->row_begin(row), - Yc->row_begin(row), - Zc->row_begin(row), - conv); + utils::transform(StrideIterator(tempBuffer.data(), + samplesPerPixel_), + StrideIterator( + tempBuffer.data() + width_ * samplesPerPixel_, + samplesPerPixel_), + StrideIterator( + tempBuffer.data() + 1, samplesPerPixel_), + StrideIterator( + tempBuffer.data() + 2, samplesPerPixel_), + Xc->row_begin(row), Yc->row_begin(row), + Zc->row_begin(row), conv); } tempFrame.swap(frame); } template - void read4Components(Frame& frame, const TiffReaderParams& /*params*/, - const Converter& conv) - { + void read4Components(Frame &frame, const TiffReaderParams & /*params*/, + const Converter &conv) { assert(samplesPerPixel_ >= 4); Frame tempFrame(width_, height_); - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; + pfs::Channel *Xc; + pfs::Channel *Yc; + pfs::Channel *Zc; tempFrame.createXYZChannels(Xc, Yc, Zc); - std::vector tempBuffer(width_*samplesPerPixel_); - for (uint32 row = 0; row < height_; row++) - { + std::vector tempBuffer((size_t) width_ * samplesPerPixel_); + for (uint32 row = 0; row < height_; row++) { TIFFReadScanline(handle(), tempBuffer.data(), row); - utils::transform(StrideIterator(tempBuffer.data(), samplesPerPixel_), - StrideIterator(tempBuffer.data() + width_*samplesPerPixel_, samplesPerPixel_), - StrideIterator(tempBuffer.data() + 1, samplesPerPixel_), - StrideIterator(tempBuffer.data() + 2, samplesPerPixel_), - StrideIterator(tempBuffer.data() + 3, samplesPerPixel_), - Xc->row_begin(row), - Yc->row_begin(row), - Zc->row_begin(row), - conv); + utils::transform(StrideIterator(tempBuffer.data(), + samplesPerPixel_), + StrideIterator( + tempBuffer.data() + width_ * samplesPerPixel_, + samplesPerPixel_), + StrideIterator( + tempBuffer.data() + 1, samplesPerPixel_), + StrideIterator( + tempBuffer.data() + 2, samplesPerPixel_), + StrideIterator( + tempBuffer.data() + 3, samplesPerPixel_), + Xc->row_begin(row), Yc->row_begin(row), + Zc->row_begin(row), conv); } tempFrame.swap(frame); } - template //, typename ConversionOperator> - void readRGB(Frame & frame, const TiffReaderParams& params) - { + template //, typename ConversionOperator> + void readRGB(Frame &frame, const TiffReaderParams ¶ms) { #ifndef NDEBUG - std::cout << BOOST_CURRENT_FUNCTION << typeid(InputDataType).name() << std::endl; + std::cout << BOOST_CURRENT_FUNCTION << typeid(InputDataType).name() + << std::endl; assert(samplesPerPixel_ >= 3); #endif - ScopedCmsTransform xform( getColorSpaceTransform() ); - if ( xform ) { + ScopedCmsTransform xform(getColorSpaceTransform()); + if (xform) { PRINT_DEBUG("ICC Profile Available"); - if ( hasAlpha_ ) { - read4Components(frame, params, - colorspace::Convert4LCMS3(xform.data())); + if (hasAlpha_) { + read4Components( + frame, params, colorspace::Convert4LCMS3(xform.data())); } else { - read3Components(frame, params, - colorspace::Convert3LCMS3(xform.data())); + read3Components( + frame, params, colorspace::Convert3LCMS3(xform.data())); } } else { read3Components(frame, params, colorspace::Copy()); } } - void readLogLuv(Frame &frame, const TiffReaderParams& params) - { + void readLogLuv(Frame &frame, const TiffReaderParams ¶ms) { #ifndef NDEBUG std::cout << BOOST_CURRENT_FUNCTION << std::endl; assert(samplesPerPixel_ == 3); @@ -376,19 +385,19 @@ } template - void readCMYK(Frame & frame, const TiffReaderParams& params) - { + void readCMYK(Frame &frame, const TiffReaderParams ¶ms) { #ifndef NDEBUG - std::cout << BOOST_CURRENT_FUNCTION << typeid(InputDataType).name() << std::endl; + std::cout << BOOST_CURRENT_FUNCTION << typeid(InputDataType).name() + << std::endl; assert(samplesPerPixel_ == 4); #endif - ScopedCmsTransform xform( getColorSpaceTransform() ); - if ( xform ) { + ScopedCmsTransform xform(getColorSpaceTransform()); + if (xform) { PRINT_DEBUG("ICC Profile Available"); - read4Components(frame, params, - colorspace::Convert4LCMS3(xform.data())); + read4Components( + frame, params, colorspace::Convert4LCMS3(xform.data())); } else { read4Components(frame, params, @@ -398,54 +407,51 @@ }; TiffReader::TiffReader(const string &filename) - : FrameReader(filename) - , m_data(new TiffReaderData) -{ + : FrameReader(filename), m_data(new TiffReaderData) { TiffReader::open(); } -TiffReader::~TiffReader() { - TiffReader::close(); -} +TiffReader::~TiffReader() { TiffReader::close(); } -bool TiffReader::isOpen() const { - return m_data->file_; -} +bool TiffReader::isOpen() const { return m_data->file_; } -void TiffReader::close() { - m_data.reset(new TiffReaderData); -} +void TiffReader::close() { m_data.reset(new TiffReaderData); } -void TiffReader::open() -{ +void TiffReader::open() { m_data->file_.reset(TIFFOpen(filename().c_str(), "r")); - if ( !m_data->file_ ) { - throw pfs::io::InvalidFile("TiffReader: cannot open file " + filename()); + if (!m_data->file_) { + throw pfs::io::InvalidFile("TiffReader: cannot open file " + + filename()); } TIFFGetField(m_data->handle(), TIFFTAG_IMAGEWIDTH, &m_data->width_); TIFFGetField(m_data->handle(), TIFFTAG_IMAGELENGTH, &m_data->height_); - if ( m_data->width_ <= 0 || m_data->height_ <= 0 ) { + if (m_data->width_ <= 0 || m_data->height_ <= 0) { throw pfs::io::InvalidHeader("TiffReader: invalid image size"); } setWidth(m_data->width_); setHeight(m_data->height_); - // check if planar... maybe in the future we can add support for tiled images? + // check if planar... maybe in the future we can add support for tiled + // images? uint16 planarConfig; TIFFGetField(m_data->handle(), TIFFTAG_PLANARCONFIG, &planarConfig); - if ( planarConfig != PLANARCONFIG_CONTIG ) { - throw pfs::io::InvalidHeader("TiffReader: Unsopported planar configuration"); + if (planarConfig != PLANARCONFIG_CONTIG) { + throw pfs::io::InvalidHeader( + "TiffReader: Unsopported planar configuration"); } // compression type - if (!TIFFGetField(m_data->handle(), TIFFTAG_COMPRESSION, &m_data->compressionType_)) { + if (!TIFFGetField(m_data->handle(), TIFFTAG_COMPRESSION, + &m_data->compressionType_)) { m_data->compressionType_ = COMPRESSION_NONE; } // photometric type - if (!TIFFGetFieldDefaulted(m_data->handle(), TIFFTAG_PHOTOMETRIC, &m_data->photometricType_)) { - throw pfs::io::InvalidHeader("TiffReader: unspecified photometric type"); + if (!TIFFGetFieldDefaulted(m_data->handle(), TIFFTAG_PHOTOMETRIC, + &m_data->photometricType_)) { + throw pfs::io::InvalidHeader( + "TiffReader: unspecified photometric type"); } if (!TIFFGetField(m_data->handle(), TIFFTAG_STONITS, &m_data->stonits_)) { @@ -453,67 +459,77 @@ } // bits per sample - if (!TIFFGetField(m_data->handle(), TIFFTAG_BITSPERSAMPLE, &m_data->bitsPerSample_) ) { + if (!TIFFGetField(m_data->handle(), TIFFTAG_BITSPERSAMPLE, + &m_data->bitsPerSample_)) { throw pfs::io::InvalidHeader("TiffReader: unspecified bits per sample"); } - if ( m_data->bitsPerSample_ != 8 && m_data->bitsPerSample_ != 16 && m_data->bitsPerSample_ != 32) { - throw pfs::io::InvalidHeader("TiffReader: invalid bits per sample (read: " + - boost::lexical_cast(m_data->bitsPerSample_) + - ")"); + if (m_data->bitsPerSample_ != 8 && m_data->bitsPerSample_ != 16 && + m_data->bitsPerSample_ != 32) { + throw pfs::io::InvalidHeader( + "TiffReader: invalid bits per sample (read: " + + boost::lexical_cast(m_data->bitsPerSample_) + ")"); } // samples per pixel - if (!TIFFGetField(m_data->handle(), TIFFTAG_SAMPLESPERPIXEL, &m_data->samplesPerPixel_) ) { - throw pfs::io::InvalidHeader("TiffReader: unspecified samples per pixel"); + if (!TIFFGetField(m_data->handle(), TIFFTAG_SAMPLESPERPIXEL, + &m_data->samplesPerPixel_)) { + throw pfs::io::InvalidHeader( + "TiffReader: unspecified samples per pixel"); } // parse photometric type - switch ( m_data->photometricType_ ) { - case PHOTOMETRIC_LOGLUV: { - if (m_data->compressionType_ != COMPRESSION_SGILOG && + switch (m_data->photometricType_) { + case PHOTOMETRIC_LOGLUV: { + if (m_data->compressionType_ != COMPRESSION_SGILOG && m_data->compressionType_ != COMPRESSION_SGILOG24) { - throw pfs::io::InvalidHeader("TiffReader: only support SGILOG compressed LogLuv data"); - } - TIFFSetField(m_data->handle(), TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - } break; - case PHOTOMETRIC_RGB: { - uint16 *extraSamplesTypes = 0; - uint16 extraSamplesPerPixel = 0; - - // read extra samples (# of alpha channels) - if (!TIFFGetField(m_data->handle(), TIFFTAG_EXTRASAMPLES, &extraSamplesPerPixel, &extraSamplesTypes)) { - if (m_data->samplesPerPixel_ == 4) - { - extraSamplesPerPixel = 1; + throw pfs::io::InvalidHeader( + "TiffReader: only support SGILOG compressed LogLuv data"); } - } - uint16 colorSamples = m_data->samplesPerPixel_ - extraSamplesPerPixel; - m_data->hasAlpha_ = (extraSamplesPerPixel == 1); - if (colorSamples != 3) { - throw pfs::io::InvalidHeader("TIFF: unsupported samples per pixel for RGB"); - } - } break; - case PHOTOMETRIC_SEPARATED: { - if ( m_data->samplesPerPixel_ != 4 ) { - throw pfs::io::InvalidHeader("TIFF: unsupported samples per pixel for CMYK"); - } - } break; - default: { - throw pfs::io::InvalidHeader("TiffReader: unsupported photometric type"); - } break; + TIFFSetField(m_data->handle(), TIFFTAG_SGILOGDATAFMT, + SGILOGDATAFMT_FLOAT); + } break; + case PHOTOMETRIC_RGB: { + uint16 *extraSamplesTypes = 0; + uint16 extraSamplesPerPixel = 0; + + // read extra samples (# of alpha channels) + if (!TIFFGetField(m_data->handle(), TIFFTAG_EXTRASAMPLES, + &extraSamplesPerPixel, &extraSamplesTypes)) { + if (m_data->samplesPerPixel_ == 4) { + extraSamplesPerPixel = 1; + } + } + uint16 colorSamples = + m_data->samplesPerPixel_ - extraSamplesPerPixel; + m_data->hasAlpha_ = (extraSamplesPerPixel == 1); + if (colorSamples != 3) { + throw pfs::io::InvalidHeader( + "TIFF: unsupported samples per pixel for RGB"); + } + } break; + case PHOTOMETRIC_SEPARATED: { + if (m_data->samplesPerPixel_ != 4) { + throw pfs::io::InvalidHeader( + "TIFF: unsupported samples per pixel for CMYK"); + } + } break; + default: { + throw pfs::io::InvalidHeader( + "TiffReader: unsupported photometric type"); + } break; } // ...based on photometric type and bits per samples, will make ready the // right callback to read the data m_data->initReader(); - m_data->hIn_.reset( GetTIFFProfile(m_data->handle(), m_data->bitsPerSample_) ); + m_data->hIn_.reset( + GetTIFFProfile(m_data->handle(), m_data->bitsPerSample_)); } -#define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) +#define CALL_MEMBER_FN(object, ptrToMember) ((object).*(ptrToMember)) -void TiffReader::read(Frame &frame, const Params ¶ms) -{ - if ( !isOpen() ) { +void TiffReader::read(Frame &frame, const Params ¶ms) { + if (!isOpen()) { open(); } @@ -521,5 +537,5 @@ FrameReader::read(frame, params); } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffreader.h luminance-hdr-2.6.0/src/Libpfs/io/tiffreader.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffreader.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/tiffreader.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,10 +34,9 @@ // sort of private implementation for TiffReader struct TiffReaderData; -class TiffReader : public FrameReader -{ -public: - TiffReader(const std::string& filename); +class TiffReader : public FrameReader { + public: + TiffReader(const std::string &filename); ~TiffReader(); void open(); @@ -46,11 +45,11 @@ void read(Frame &frame, const Params ¶ms); -private: + private: std::unique_ptr m_data; }; -} // io -} // pfs +} // io +} // pfs #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffwriter.cpp luminance-hdr-2.6.0/src/Libpfs/io/tiffwriter.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffwriter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/tiffwriter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -31,34 +31,34 @@ //! \author Davide Anastasia //! Complete rewrite/refactoring -#include #include +#include #include +#include +#include +#include #include #include +#include #include -#include #include -#include -#include -#include -#include +#include -#include #include +#include -#include -#include +#include +#include #include #include -#include +#include +#include +#include #include #include -#include -#include -#include +#include using namespace std; using namespace boost; @@ -73,45 +73,43 @@ namespace pfs { namespace io { -struct TiffWriterParams -{ +struct TiffWriterParams { TiffWriterParams() - : quality_(100) - , minLuminance_(0.f) - , maxLuminance_(1.f) - , luminanceMapping_(MAP_LINEAR) - , tiffWriterMode_(0) // 8bit uint by default - , deflateCompression_(true) - {} - - void parse(const Params& params) - { - for ( Params::const_iterator it = params.begin(), itEnd = params.end(); - it != itEnd; ++it ) - { - if ( it->first == "quality" ) { + : quality_(100), + minLuminance_(0.f), + maxLuminance_(1.f), + luminanceMapping_(MAP_LINEAR), + tiffWriterMode_(0) // 8bit uint by default + , + deflateCompression_(true) {} + + void parse(const Params ¶ms) { + for (Params::const_iterator it = params.begin(), itEnd = params.end(); + it != itEnd; ++it) { + if (it->first == "quality") { quality_ = it->second.as(quality_); continue; } - if ( it->first == "min_luminance" ) { + if (it->first == "min_luminance") { minLuminance_ = it->second.as(minLuminance_); continue; } - if ( it->first == "max_luminance" ) { + if (it->first == "max_luminance") { maxLuminance_ = it->second.as(maxLuminance_); continue; } - if ( it->first == "mapping_method" ) { - luminanceMapping_ = it->second.as(luminanceMapping_); + if (it->first == "mapping_method") { + luminanceMapping_ = + it->second.as(luminanceMapping_); continue; } - if ( it->first == "tiff_mode" ) { + if (it->first == "tiff_mode") { tiffWriterMode_ = it->second.as(tiffWriterMode_); continue; } - if ( it->first == "deflateCompression" ) { + if (it->first == "deflateCompression") { deflateCompression_ = it->second.as(deflateCompression_); - //continue; + // continue; } } } @@ -124,8 +122,7 @@ bool deflateCompression_; }; -ostream& operator<<(ostream& out, const TiffWriterParams& params) -{ +ostream &operator<<(ostream &out, const TiffWriterParams ¶ms) { stringstream ss; ss << "TiffWriterParams: ["; ss << "mode: " << params.tiffWriterMode_ << ", "; @@ -138,28 +135,26 @@ return (out << ss.str()); } -void writeCommonHeader(TIFF* tif, uint32_t width, uint32_t height) -{ +void writeCommonHeader(TIFF *tif, uint32_t width, uint32_t height) { TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32_t)width); TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32_t)height); TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, (uint32_t)1); TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); } -void writeSRGBProfile(TIFF* tif) -{ - utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); +void writeSRGBProfile(TIFF *tif) { + utils::ScopedCmsProfile hsRGB(cmsCreate_sRGBProfile()); cmsUInt32Number profileSize = 0; - cmsSaveProfileToMem(hsRGB.data(), NULL, &profileSize); // get the size + cmsSaveProfileToMem(hsRGB.data(), NULL, &profileSize); // get the size std::vector embedBuffer(profileSize); cmsSaveProfileToMem(hsRGB.data(), - reinterpret_cast(embedBuffer.data()), + reinterpret_cast(embedBuffer.data()), &profileSize); TIFFSetField(tif, TIFFTAG_ICCPROFILE, profileSize, - reinterpret_cast(embedBuffer.data()) ); + reinterpret_cast(embedBuffer.data())); } // Info: if you want to write the alpha channel, please use this! @@ -167,8 +162,7 @@ // TIFFSetField (tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)4); // TIFFSetField (tif, TIFFTAG_EXTRASAMPLES, (uint16_t)1, &extras); -bool writeUint8(TIFF* tif, const Frame& frame, const TiffWriterParams& params) -{ +bool writeUint8(TIFF *tif, const Frame &frame, const TiffWriterParams ¶ms) { #ifndef NDEBUG cout << BOOST_CURRENT_FUNCTION << endl; #endif @@ -185,38 +179,34 @@ TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, (uint16_t)8*(uint16_t)sizeof(uint8_t)); - TIFFSetField (tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)3); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, + (uint16_t)8 * (uint16_t)sizeof(uint8_t)); + TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)3); tsize_t stripSize = TIFFStripSize(tif); - assert( width*3 == stripSize ); + assert(width * 3 == stripSize); tstrip_t stripsNum = TIFFNumberOfStrips(tif); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); - std::vector stripBuffer( stripSize ); - for (tstrip_t s = 0; s < stripsNum; s++) - { + std::vector stripBuffer(stripSize); + for (tstrip_t s = 0; s < stripsNum; s++) { utils::transform( - rChannel->row_begin(s), - rChannel->row_end(s), - gChannel->row_begin(s), - bChannel->row_begin(s), - FixedStrideIterator(stripBuffer.data()), - FixedStrideIterator(stripBuffer.data() + 1), - FixedStrideIterator(stripBuffer.data() + 2), - utils::chain( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::CLAMP_F32, - Remapper(params.luminanceMapping_) - ) - ); + rChannel->row_begin(s), rChannel->row_end(s), + gChannel->row_begin(s), bChannel->row_begin(s), + FixedStrideIterator(stripBuffer.data()), + FixedStrideIterator(stripBuffer.data() + 1), + FixedStrideIterator(stripBuffer.data() + 2), + utils::chain(colorspace::Normalizer(params.minLuminance_, + params.maxLuminance_), + utils::CLAMP_F32, + Remapper(params.luminanceMapping_))); - if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) - { + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != + stripSize) { throw pfs::io::WriteException("TiffWriter: Error writing strip " + boost::lexical_cast(s)); return false; @@ -225,8 +215,8 @@ return true; } -bool writeUint16(TIFF* tif, const Frame& frame, const TiffWriterParams& params) -{ +bool writeUint16(TIFF *tif, const Frame &frame, + const TiffWriterParams ¶ms) { #ifndef NDEBUG cout << BOOST_CURRENT_FUNCTION << endl; #endif @@ -238,50 +228,45 @@ writeCommonHeader(tif, width, height); writeSRGBProfile(tif); - if (params.deflateCompression_) - { + if (params.deflateCompression_) { TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); } TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, (uint16_t)8*(uint16_t)sizeof(uint16_t)); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, + (uint16_t)8 * (uint16_t)sizeof(uint16_t)); TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)3); tsize_t stripSize = TIFFStripSize(tif); - assert( width*3*2 == stripSize ); + assert(width * 3 * 2 == stripSize); tstrip_t stripsNum = TIFFNumberOfStrips(tif); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); - std::vector stripBuffer( width*3 ); + std::vector stripBuffer(width * 3); - typedef utils::Chain< - colorspace::Normalizer, - utils::Chain< - utils::Clamp, - Remapper - >> TiffRemapper; + typedef utils::Chain, Remapper>> + TiffRemapper; TiffRemapper remapper( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::Chain< - utils::Clamp, - Remapper - >(utils::Clamp(0.f, 1.f), Remapper(params.luminanceMapping_))); - for (tstrip_t s = 0; s < stripsNum; s++) - { - utils::transform(rChannel->row_begin(s), rChannel->row_end(s), - gChannel->row_begin(s), - bChannel->row_begin(s), - FixedStrideIterator(stripBuffer.data()), - FixedStrideIterator(stripBuffer.data() + 1), - FixedStrideIterator(stripBuffer.data() + 2), - remapper); - if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) - { + colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), + utils::Chain, Remapper>( + utils::Clamp(0.f, 1.f), + Remapper(params.luminanceMapping_))); + for (tstrip_t s = 0; s < stripsNum; s++) { + utils::transform( + rChannel->row_begin(s), rChannel->row_end(s), + gChannel->row_begin(s), bChannel->row_begin(s), + FixedStrideIterator(stripBuffer.data()), + FixedStrideIterator(stripBuffer.data() + 1), + FixedStrideIterator(stripBuffer.data() + 2), + remapper); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != + stripSize) { throw pfs::io::WriteException("TiffWriter: Error writing strip " + boost::lexical_cast(s)); return false; @@ -292,8 +277,8 @@ } // write 32 bit float Tiff from pfs::Frame ... to finish! -bool writeFloat32(TIFF* tif, const Frame& frame, const TiffWriterParams& params) -{ +bool writeFloat32(TIFF *tif, const Frame &frame, + const TiffWriterParams ¶ms) { #ifndef NDEBUG cout << BOOST_CURRENT_FUNCTION << endl; #endif @@ -305,47 +290,42 @@ writeCommonHeader(tif, width, height); // writeSRGBProfile(tif); - if (params.deflateCompression_) - { + if (params.deflateCompression_) { TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); } TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, (uint16_t)8*(uint16_t)sizeof(float)); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, + (uint16_t)8 * (uint16_t)sizeof(float)); TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)3); tsize_t stripSize = TIFFStripSize(tif); - assert( (tsize_t)sizeof(float)*width*3 == stripSize ); + assert((tsize_t)sizeof(float) * width * 3 == stripSize); tstrip_t stripsNum = TIFFNumberOfStrips(tif); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); PRINT_DEBUG(params.minLuminance_); PRINT_DEBUG(params.maxLuminance_); - std::vector stripBuffer( width*3 ); - typedef utils::Chain< - colorspace::Normalizer, - utils::Clamp - > TiffRemapper; + std::vector stripBuffer(width * 3); + typedef utils::Chain> + TiffRemapper; // Mapping is linear, so I avoid to call the Remapper class TiffRemapper remapper( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::Clamp(0.f, 1.f)); - for (tstrip_t s = 0; s < stripsNum; s++) - { - utils::transform(rChannel->row_begin(s), rChannel->row_end(s), - gChannel->row_begin(s), - bChannel->row_begin(s), - FixedStrideIterator(stripBuffer.data()), - FixedStrideIterator(stripBuffer.data() + 1), - FixedStrideIterator(stripBuffer.data() + 2), - remapper); - if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) == 0) - { + colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), + utils::Clamp(0.f, 1.f)); + for (tstrip_t s = 0; s < stripsNum; s++) { + utils::transform( + rChannel->row_begin(s), rChannel->row_end(s), + gChannel->row_begin(s), bChannel->row_begin(s), + FixedStrideIterator(stripBuffer.data()), + FixedStrideIterator(stripBuffer.data() + 1), + FixedStrideIterator(stripBuffer.data() + 2), remapper); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) == 0) { throw pfs::io::WriteException("TiffWriter: Error writing strip " + boost::lexical_cast(s)); @@ -357,8 +337,8 @@ } // write LogLUv Tiff from pfs::Frame -bool writeLogLuv(TIFF* tif, const Frame& frame, const TiffWriterParams& params) -{ +bool writeLogLuv(TIFF *tif, const Frame &frame, + const TiffWriterParams ¶ms) { #ifndef NDEBUG cout << BOOST_CURRENT_FUNCTION << endl; #endif @@ -372,49 +352,44 @@ TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_SGILOG); TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_LOGLUV); TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, (uint16_t)8*(uint16_t)sizeof(float)); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, + (uint16_t)8 * (uint16_t)sizeof(float)); TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)3); TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - TIFFSetField(tif, TIFFTAG_STONITS, 1.); /* not known */ + TIFFSetField(tif, TIFFTAG_STONITS, 1.); /* not known */ tsize_t stripSize = TIFFStripSize(tif); - assert( (tsize_t)sizeof(float)*width*3 == stripSize ); + assert((tsize_t)sizeof(float) * width * 3 == stripSize); tstrip_t stripsNum = TIFFNumberOfStrips(tif); - const Channel* rChannel; - const Channel* gChannel; - const Channel* bChannel; + const Channel *rChannel; + const Channel *gChannel; + const Channel *bChannel; frame.getXYZChannels(rChannel, gChannel, bChannel); - std::vector stripBuffer( width*3 ); + std::vector stripBuffer(width * 3); // remap to [0, 1] + transform to colorspace XYZ // no gamma curve applied typedef utils::Chain< - colorspace::Normalizer, - utils::Chain< - utils::Clamp, - colorspace::ConvertRGB2XYZ - >> TiffRemapper; + colorspace::Normalizer, + utils::Chain, colorspace::ConvertRGB2XYZ>> + TiffRemapper; TiffRemapper remapper( - colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), - utils::Chain< - utils::Clamp, - colorspace::ConvertRGB2XYZ - >(utils::Clamp(0.f, 1.f), colorspace::ConvertRGB2XYZ())); - - for (tstrip_t s = 0; s < stripsNum; s++) - { - utils::transform(rChannel->row_begin(s), rChannel->row_end(s), - gChannel->row_begin(s), - bChannel->row_begin(s), - FixedStrideIterator(stripBuffer.data()), - FixedStrideIterator(stripBuffer.data() + 1), - FixedStrideIterator(stripBuffer.data() + 2), - remapper); - if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) - { + colorspace::Normalizer(params.minLuminance_, params.maxLuminance_), + utils::Chain, colorspace::ConvertRGB2XYZ>( + utils::Clamp(0.f, 1.f), colorspace::ConvertRGB2XYZ())); + + for (tstrip_t s = 0; s < stripsNum; s++) { + utils::transform( + rChannel->row_begin(s), rChannel->row_end(s), + gChannel->row_begin(s), bChannel->row_begin(s), + FixedStrideIterator(stripBuffer.data()), + FixedStrideIterator(stripBuffer.data() + 1), + FixedStrideIterator(stripBuffer.data() + 2), remapper); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != + stripSize) { throw pfs::io::WriteException("TiffWriter: Error writing strip " + boost::lexical_cast(s)); @@ -425,15 +400,11 @@ return true; } -TiffWriter::TiffWriter(const std::string& filename) - : FrameWriter(filename) -{} +TiffWriter::TiffWriter(const std::string &filename) : FrameWriter(filename) {} -TiffWriter::~TiffWriter() -{} +TiffWriter::~TiffWriter() {} -bool TiffWriter::write(const pfs::Frame& frame, const pfs::Params& params) -{ +bool TiffWriter::write(const pfs::Frame &frame, const pfs::Params ¶ms) { TiffWriterParams p; p.parse(params); @@ -441,30 +412,30 @@ cout << p << endl; #endif - ScopedTiffFile tif( TIFFOpen (filename().c_str(), "w") ); - if ( !tif ) { + ScopedTiffFile tif(TIFFOpen(filename().c_str(), "w")); + if (!tif) { throw pfs::io::InvalidFile("TiffWriter: cannot open " + filename()); } bool status = true; switch (p.tiffWriterMode_) { - case 1: - status = writeUint16(tif.data(), frame, p); - break; - case 2: - status = writeFloat32(tif.data(), frame, p); - break; - case 3: - status = writeLogLuv(tif.data(), frame, p); - break; - case 0: - default: - status = writeUint8(tif.data(), frame, p); - break; + case 1: + status = writeUint16(tif.data(), frame, p); + break; + case 2: + status = writeFloat32(tif.data(), frame, p); + break; + case 3: + status = writeLogLuv(tif.data(), frame, p); + break; + case 0: + default: + status = writeUint8(tif.data(), frame, p); + break; } return status; } -} // io -} // pfs +} // io +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffwriter.h luminance-hdr-2.6.0/src/Libpfs/io/tiffwriter.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/io/tiffwriter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/io/tiffwriter.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,31 +34,31 @@ #ifndef PFS_TIFFWRITER_H #define PFS_TIFFWRITER_H -#include -#include #include +#include +#include namespace pfs { namespace io { //! \brief Writer class for TIFF files -class TiffWriter : public FrameWriter -{ -public: - TiffWriter(const std::string& filename); +class TiffWriter : public FrameWriter { + public: + TiffWriter(const std::string &filename); ~TiffWriter(); //! \brief write a pfs::Frame into a properly formatted TIFF file //! \c params can take: - //! tiff_mode (int): 0 = 8bit uint, 1 = 16bit uint, 2 = 32bit float, 3 = logluv + //! tiff_mode (int): 0 = 8bit uint, 1 = 16bit uint, 2 = 32bit float, 3 = + //! logluv //! min_luminance (float): minimum luminance to consider trusthworthy //! max_luminance (float): maximum luminance to consider trusthworthy //! mapping_method (int): RGB mapping methodo choosen between //! RGBMappingType in rgbremapper.h - bool write(const pfs::Frame& frame, const pfs::Params& params); + bool write(const pfs::Frame &frame, const pfs::Params ¶ms); }; -} // io -} // pfs +} // io +} // pfs #endif // PFS_TIFFWRITER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.cpp luminance-hdr-2.6.0/src/Libpfs/manip/copy.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/copy.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,29 +29,25 @@ #include -namespace pfs -{ +namespace pfs { using namespace utils; -pfs::Frame *copy(const pfs::Frame *inFrame) -{ +pfs::Frame *copy(const pfs::Frame *inFrame) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif - const int outWidth = inFrame->getWidth(); - const int outHeight = inFrame->getHeight(); + const int outWidth = inFrame->getWidth(); + const int outHeight = inFrame->getHeight(); pfs::Frame *outFrame = new pfs::Frame(outWidth, outHeight); - const ChannelContainer& channels = inFrame->getChannels(); + const ChannelContainer &channels = inFrame->getChannels(); - for ( ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { - const pfs::Channel* inCh = *it; + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); ++it) { + const pfs::Channel *inCh = *it; pfs::Channel *outCh = outFrame->createChannel(inCh->getName()); @@ -67,5 +63,4 @@ return outFrame; } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.h luminance-hdr-2.6.0/src/Libpfs/manip/copy.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/copy.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,22 +27,21 @@ #include "Libpfs/array2d_fwd.h" -namespace pfs -{ +namespace pfs { class Frame; -pfs::Frame* copy(const pfs::Frame *inFrame); +pfs::Frame *copy(const pfs::Frame *inFrame); //! \brief Copy data from one Array2D to another. //! Dimensions of the arrays must be the same. //! //! \param from array to copy from //! \param to array to copy to -template +template void copy(const Array2D *from, Array2D *to); -} // pfs +} // pfs #include "copy.hxx" -#endif // #ifndef PFS_COPY_H +#endif // #ifndef PFS_COPY_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.hxx luminance-hdr-2.6.0/src/Libpfs/manip/copy.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/copy.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/copy.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -27,20 +27,18 @@ #include "copy.h" -#include #include +#include -namespace pfs -{ +namespace pfs { template -void copy(const Array2D *from, Array2D *to) -{ - assert( from->getRows() == to->getRows() ); - assert( from->getCols() == to->getCols() ); +void copy(const Array2D *from, Array2D *to) { + assert(from->getRows() == to->getRows()); + assert(from->getCols() == to->getCols()); std::copy(from->begin(), from->end(), to->begin()); } } -#endif // #ifndef PFS_COPY_HXX +#endif // #ifndef PFS_COPY_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.cpp luminance-hdr-2.6.0/src/Libpfs/manip/cut.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/cut.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,23 +29,19 @@ #include "cut.h" -#include +#include #include +#include #include #include -#include -#include "Libpfs/utils/msec_timer.h" #include "Libpfs/frame.h" +#include "Libpfs/utils/msec_timer.h" -namespace pfs -{ - - +namespace pfs { -pfs::Frame *cut(const pfs::Frame *inFrame, - size_t x_ul, size_t y_ul, size_t x_br, size_t y_br) -{ +pfs::Frame *cut(const pfs::Frame *inFrame, size_t x_ul, size_t y_ul, + size_t x_br, size_t y_br) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -58,20 +54,17 @@ if (y_br > inFrame->getHeight()) y_br = inFrame->getHeight(); // ----- - pfs::Frame *outFrame = new pfs::Frame((x_br-x_ul), (y_br-y_ul)); + pfs::Frame *outFrame = new pfs::Frame((x_br - x_ul), (y_br - y_ul)); - const ChannelContainer& channels = inFrame->getChannels(); + const ChannelContainer &channels = inFrame->getChannels(); - for ( ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { - const pfs::Channel* inCh = *it; + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); ++it) { + const pfs::Channel *inCh = *it; pfs::Channel *outCh = outFrame->createChannel(inCh->getName()); - cut(inCh, outCh, - x_ul, y_ul, x_br, y_br); + cut(inCh, outCh, x_ul, y_ul, x_br, y_br); } pfs::copyTags(inFrame, outFrame); @@ -79,12 +72,12 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); std::cout << "pfscut("; - std::cout << "[" << x_ul <<", " << y_ul <<"],"; - std::cout << "[" << x_br << ", " << y_br <<"]"; + std::cout << "[" << x_ul << ", " << y_ul << "],"; + std::cout << "[" << x_br << ", " << y_br << "]"; std::cout << ") = " << f_timer.get_time() << " msec" << std::endl; #endif return outFrame; } -} // pfs +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.h luminance-hdr-2.6.0/src/Libpfs/manip/cut.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/cut.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,23 +24,22 @@ #ifndef PFS_CUT_H #define PFS_CUT_H -#include #include +#include //! \brief Cut a rectangle out of images in PFS stream //! \author Franco Comida //! \author Davide Anastasia -namespace pfs -{ +namespace pfs { class Frame; -Frame *cut(const Frame *inFrame, - size_t x_ul, size_t y_ul, size_t x_br, size_t y_br); +Frame *cut(const Frame *inFrame, size_t x_ul, size_t y_ul, size_t x_br, + size_t y_br); template -void cut(const Array2D *from, Array2D *to, - size_t x_ul, size_t y_ul, size_t x_br, size_t y_br); +void cut(const Array2D *from, Array2D *to, size_t x_ul, size_t y_ul, + size_t x_br, size_t y_br); } #include "cut.hxx" diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.hxx luminance-hdr-2.6.0/src/Libpfs/manip/cut.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/cut.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/cut.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -27,40 +27,38 @@ #include "cut.h" -#include #include +#include -namespace pfs -{ +namespace pfs { template -void cut(const Array2D *from, Array2D *to, - size_t x_ul, size_t y_ul, size_t x_br, size_t y_br) -{ - //assert( x_ul >= 0 ); // must be obvious... so obvious that x_ul is unsigned - //assert( y_ul >= 0 ); // must be obvious... so obvious that y_ul is unsigned - assert( x_br <= from->getCols() ); - assert( y_br <= from->getRows() ); - assert( to->getRows() <= from->getRows() ); - assert( to->getRows() <= from->getRows() ); +void cut(const Array2D *from, Array2D *to, size_t x_ul, size_t y_ul, + size_t x_br, size_t y_br) { + // assert( x_ul >= 0 ); // must be obvious... so obvious that x_ul is + // unsigned + // assert( y_ul >= 0 ); // must be obvious... so obvious that y_ul is + // unsigned + assert(x_br <= from->getCols()); + assert(y_br <= from->getRows()); + assert(to->getRows() <= from->getRows()); + assert(to->getRows() <= from->getRows()); // if ( x_ul < 0 ) x_ul = 0; // unsigned // if ( y_ul < 0 ) y_ul = 0; // unsigned - if ( x_br > from->getCols() ) x_br = from->getCols(); - if ( y_br > from->getRows() ) y_br = from->getRows(); + if (x_br > from->getCols()) x_br = from->getCols(); + if (y_br > from->getRows()) y_br = from->getRows(); // update right border x_br = from->getCols() - x_br; int rEnd = (int)to->getRows(); #pragma omp parallel for shared(rEnd) - for (int r = 0; r < rEnd; r++) - { + for (int r = 0; r < rEnd; r++) { std::copy(from->row_begin(r + y_ul) + x_ul, - from->row_end(r + y_ul) - x_br, - to->row_begin(r)); + from->row_end(r + y_ul) - x_br, to->row_begin(r)); } } -} // pfs +} // pfs -#endif // PFS_CUT_HXX +#endif // PFS_CUT_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma.cpp luminance-hdr-2.6.0/src/Libpfs/manip/gamma.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/gamma.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,61 +26,69 @@ #include "gamma.h" -#include -#include #include +#include +#include #include "Libpfs/array2d.h" -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" #include "Libpfs/utils/msec_timer.h" +#include "opthelper.h" +#include "sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) -namespace pfs -{ +namespace pfs { -void applyGamma(pfs::Frame* frame, float gamma) -{ - float multiplier = 1.0f; +void applyGamma(pfs::Frame *frame, float gamma) { - if ( gamma == 1.0f ) return; + if (gamma == 1.0f) return; pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); + frame->getXYZChannels(X, Y, Z); - applyGamma(X, 1.0f/gamma, multiplier); - applyGamma(Y, 1.0f/gamma, multiplier); - applyGamma(Z, 1.0f/gamma, multiplier); + applyGamma(X, 1.0f / gamma); + applyGamma(Y, 1.0f / gamma); + applyGamma(Z, 1.0f / gamma); } +void applyGamma(pfs::Array2Df *array, const float exponent) { -void applyGamma(pfs::Array2Df *array, const float exponent, const float multiplier) -{ #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif - float* Vin = array->data(); - - int V_ELEMS = array->getRows()*array->getCols(); -#pragma omp parallel for - for (int idx = 0; idx < V_ELEMS; idx++) + const int h = array->getRows(); + const int w = array->getCols(); + #pragma omp parallel { - if (Vin[idx] > 0.0f) - { - Vin[idx] = powf(Vin[idx]*multiplier, exponent); - } - else - { - Vin[idx] = 0.0f; +#ifdef __SSE2__ + const vfloat exponentv = F2V(exponent); +#endif + #pragma omp for + for (int i = 0; i < h; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + const vfloat Vinv = LVFU((*array)(j, i)); + STVFU((*array)(j, i), vselfzero(vmaskf_gt(Vinv, ZEROV), pow_F(Vinv, exponentv))); + } +#endif + for (; j < w; ++j) { + if ((*array)(j, i) > 0.0f) { + (*array)(j, i) = pow_F((*array)(j, i), exponent); + } else { + (*array)(j, i) = 0.0f; + } + } } } #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "applyGamma() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "applyGamma() = " << f_timer.get_time() << " msec" + << std::endl; #endif } - } - diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma.h luminance-hdr-2.6.0/src/Libpfs/manip/gamma.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/gamma.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,16 +29,14 @@ //! \author Rafal Mantiuk //! \author Davide Anastasia -namespace pfs -{ +namespace pfs { class Frame; //! \brief Apply \c gamma on the input \c frame -void applyGamma(pfs::Frame* frame, float gamma); +void applyGamma(pfs::Frame *frame, float gamma); //! \brief Apply gamma on the input \c array -void applyGamma(pfs::Array2Df *array, float exponent, float multiplier = 1.0f); - +void applyGamma(pfs::Array2Df *array, float exponent); } -#endif // PFSGAMMA_H +#endif // PFSGAMMA_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma_levels.cpp luminance-hdr-2.6.0/src/Libpfs/manip/gamma_levels.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma_levels.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/gamma_levels.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,28 +25,27 @@ #include #include -#include "Libpfs/frame.h" #include "Libpfs/channel.h" +#include "Libpfs/frame.h" #include "Libpfs/utils/msec_timer.h" -namespace -{ +namespace { template -inline T clamp(const T& v, const T& lower_bound, const T& upper_bound) -{ - if ( v <= lower_bound ) return lower_bound; - if ( v >= upper_bound ) return upper_bound; +inline T clamp(const T &v, const T &lower_bound, const T &upper_bound) { + if (v <= lower_bound) return lower_bound; + if (v >= upper_bound) return upper_bound; return v; } ////! \note I assume that *in* contains only value between [0,1] -//void gamma_levels_array(const pfs::Array2D* in, pfs::Array2D* out, +// void gamma_levels_array(const pfs::Array2D* in, pfs::Array2D* out, // float black_in, float white_in, // float black_out, float white_out, float gamma) //{ // // same formula used inside GammaAndLevels::refreshLUT() -// //float value = powf( ( ((float)(i)/255.0f) - bin ) / (win-bin), expgamma); +// //float value = powf( ( ((float)(i)/255.0f) - bin ) / (win-bin), +// expgamma); // //LUT[i] = clamp(blackout+value*(whiteout-blackout),0,255); // const float* in_vector = in->getRawData(); @@ -81,17 +80,12 @@ // } // } //} - } -namespace pfs -{ +namespace pfs { -void gammaAndLevels(pfs::Frame* inFrame, - float black_in, float white_in, - float black_out, float white_out, - float gamma) -{ +void gammaAndLevels(pfs::Frame *inFrame, float black_in, float white_in, + float black_out, float white_out, float gamma) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); @@ -100,36 +94,33 @@ #ifndef NDEBUG std::cerr << "Black in = " << black_in << ", Black out = " << black_out << ", White in = " << white_in << ", White out = " << white_out - << ", Gamma = " << gamma - << std::endl; + << ", Gamma = " << gamma << std::endl; #endif - const int outWidth = inFrame->getWidth(); - const int outHeight = inFrame->getHeight(); + const int outWidth = inFrame->getWidth(); + const int outHeight = inFrame->getHeight(); pfs::Channel *Xc, *Yc, *Zc; - inFrame->getXYZChannels( Xc, Yc, Zc ); - assert( Xc != NULL && Yc != NULL && Zc != NULL ); + inFrame->getXYZChannels(Xc, Yc, Zc); + assert(Xc != NULL && Yc != NULL && Zc != NULL); - const float* R_i = Xc->data(); - const float* G_i = Yc->data(); - const float* B_i = Zc->data(); - - float* R_o = Xc->data(); - float* G_o = Yc->data(); - float* B_o = Zc->data(); + const float *R_i = Xc->data(); + const float *G_i = Yc->data(); + const float *B_i = Zc->data(); + + float *R_o = Xc->data(); + float *G_o = Yc->data(); + float *B_o = Zc->data(); - // float exp_gamma = 1.f/gamma; +// float exp_gamma = 1.f/gamma; #pragma omp parallel for - for (int idx = 0; idx < outWidth*outHeight; ++idx) - { + for (int idx = 0; idx < outWidth * outHeight; ++idx) { float red = R_i[idx]; float green = G_i[idx]; float blue = B_i[idx]; - float L = 0.2126f * red - + 0.7152f * green - + 0.0722f * blue; // number between [0..1] + float L = 0.2126f * red + 0.7152f * green + + 0.0722f * blue; // number between [0..1] float c = powf(L, gamma - 1.0f); @@ -149,8 +140,8 @@ #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "gamma_levels() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "gamma_levels() = " << f_timer.get_time() << " msec" + << std::endl; #endif } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma_levels.h luminance-hdr-2.6.0/src/Libpfs/manip/gamma_levels.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/gamma_levels.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/gamma_levels.h 2019-06-09 19:18:38.000000000 +0000 @@ -22,13 +22,14 @@ //! \brief apply gamma and black/white point to the input frame //! \author Davide Anastasia -namespace pfs -{ -class Frame; +#ifndef LIBPFS_GAMMA_LEVELS_H +#define LIBPFS_GAMMA_LEVELS_H -void gammaAndLevels(pfs::Frame* in, - float black_in, float white_in, - float black_out, float white_out, - float gamma = 1.0f); +namespace pfs { +class Frame; +void gammaAndLevels(pfs::Frame *in, float black_in, float white_in, + float black_out, float white_out, float gamma = 1.0f); } + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/projection.cpp luminance-hdr-2.6.0/src/Libpfs/manip/projection.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/projection.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/projection.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -34,7 +34,6 @@ #include "Libpfs/array2d.h" #include "arch/math.h" - using namespace std; ProjectionFactory ProjectionFactory::singleton(true); @@ -44,111 +43,95 @@ AngularProjection AngularProjection::singleton(true); MirrorBallProjection MirrorBallProjection::singleton(true); -const double EPSILON=1e-7; +const double EPSILON = 1e-7; + +class Vector3D { + public: + double x, y, z; + + Vector3D(double phi, double theta) { + x = cos(phi) * sin(theta); + y = sin(phi) * sin(theta); + z = cos(theta); + } + + Vector3D(double x, double y, double z) { + this->x = x; + this->y = y; + this->z = z; + + normalize(); + } + + double magnitude(void) { return sqrt(x * x + y * y + z * z); } + + void normalize(void) { + double len = magnitude(); + + x = x / len; + y = y / len; + z = z / len; + } + + double dot(Vector3D *v) { return x * v->x + y * v->y + z * v->z; } + + // TODO: optimize rotations by precomputing sines and cosines + void rotateX(double angle) { + angle *= boost::math::double_constants::degree; + + double c = cos(angle); + double s = sin(angle); + + double y2 = c * y + -s * z; + double z2 = s * y + c * z; + + y = y2; + z = z2; + } + + void rotateY(double angle) { + angle *= boost::math::double_constants::degree; + + double c = cos(angle); + double s = sin(angle); + + double x2 = c * x + s * z; + double z2 = -s * x + c * z; + + x = x2; + z = z2; + } + + void rotateZ(double angle) { + angle *= boost::math::double_constants::degree; + + double c = cos(angle); + double s = sin(angle); -class Vector3D -{ - public: - double x, y, z; - - Vector3D(double phi, double theta) - { - x = cos(phi) * sin(theta); - y = sin(phi) * sin(theta); - z = cos(theta); - } - - Vector3D(double x, double y, double z) - { - this->x = x; - this->y = y; - this->z = z; - - normalize(); - } - - double magnitude(void) - { - return sqrt( x * x + y * y + z * z ); - } - - void normalize(void) - { - double len = magnitude(); - - x = x / len; - y = y / len; - z = z / len; - } - - double dot(Vector3D *v) - { - return x * v->x + y * v->y + z * v->z; - } - - //TODO: optimize rotations by precomputing sines and cosines - void rotateX(double angle) - { - angle *= boost::math::double_constants::degree; - - double c = cos(angle); - double s = sin(angle); - - double y2 = c * y + -s * z; - double z2 = s * y + c * z; - - y = y2; - z = z2; - } - - void rotateY(double angle) - { - angle *= boost::math::double_constants::degree; - - double c = cos(angle); - double s = sin(angle); - - double x2 = c * x + s * z; - double z2 = -s * x + c * z; - - x = x2; - z = z2; - } - - void rotateZ(double angle) - { - angle *= boost::math::double_constants::degree; - - double c = cos(angle); - double s = sin(angle); - - double x2 = c * x + -s * y; - double y2 = s * x + c * y; - - x = x2; - y = y2; - } + double x2 = c * x + -s * y; + double y2 = s * x + c * y; + + x = x2; + y = y2; + } }; -class Point2D -{ - public: +class Point2D { + public: double x, y; - Point2D(double x, double y) - { - this->x = x; - this->y = y; - } + Point2D(double x, double y) { + this->x = x; + this->y = y; + } }; +/// PROJECTIONFACTORY +ProjectionFactory::ProjectionFactory(bool) {} -///PROJECTIONFACTORY -ProjectionFactory::ProjectionFactory(bool ) { -} - -void ProjectionFactory::registerProjection(const char *name, ProjectionCreator ptr) { - singleton.projections[ string( name ) ] = ptr; +void ProjectionFactory::registerProjection(const char *name, + ProjectionCreator ptr) { + singleton.projections[string(name)] = ptr; } // TODO: check this function @@ -156,114 +139,103 @@ char *opts; Projection *projection = NULL; - if( (opts = strchr(name, '/')) ) - { + if ((opts = strchr(name, '/'))) { *opts++ = '\0'; - } - + } - ProjectionCreator projectionCreator = singleton.projections.find(string(name))->second; + ProjectionCreator projectionCreator = + singleton.projections.find(string(name))->second; - if(projectionCreator != NULL) - { + if (projectionCreator != NULL) { projection = projectionCreator(); - if(opts != NULL) - projection->setOptions(opts); - } + if (opts != NULL) projection->setOptions(opts); + } - return projection; + return projection; } -//FIXME: Lame. Should return an iterator over the names. No time for this now. :/ +// FIXME: Lame. Should return an iterator over the names. No time for this now. +// :/ void ProjectionFactory::listProjectionNames(void) { map::iterator i = singleton.projections.begin(); - while(i != singleton.projections.end()) - { - fprintf( stderr, "%s\n", (*i).first.c_str()); - ++i; + while (i != singleton.projections.end()) { + fprintf(stderr, "%s\n", (*i).first.c_str()); + ++i; } } -///END PROJECTIONFACTORY - +/// END PROJECTIONFACTORY -///MIRRORBALL +/// MIRRORBALL MirrorBallProjection::MirrorBallProjection(bool initialization) { name = "mirrorball"; - if(initialization) - ProjectionFactory::registerProjection(name, this->create); + if (initialization) + ProjectionFactory::registerProjection(name, this->create); } -Projection* MirrorBallProjection::create() { +Projection *MirrorBallProjection::create() { return new MirrorBallProjection(false); } -const char *MirrorBallProjection::getName(void) { - return name; -} +const char *MirrorBallProjection::getName(void) { return name; } -double MirrorBallProjection::getSizeRatio(void) { - return 1; -} +double MirrorBallProjection::getSizeRatio(void) { return 1; } bool MirrorBallProjection::isValidPixel(double u, double v) { // check if we are not in a boundary region (outside a circle) - if((u - 0.5) * (u - 0.5) + (v - 0.5) * (v - 0.5) > 0.25) - return false; + if ((u - 0.5) * (u - 0.5) + (v - 0.5) * (v - 0.5) > 0.25) + return false; else - return true; + return true; } -Vector3D* MirrorBallProjection::uvToDirection(double u, double v) { +Vector3D *MirrorBallProjection::uvToDirection(double u, double v) { u = 2 * u - 1; v = 2 * v - 1; - double phi = atan2( v, u ); - double theta = 2 * asin( sqrt( u * u + v * v ) ); + double phi = atan2(v, u); + double theta = 2 * asin(sqrt(u * u + v * v)); Vector3D *direction = new Vector3D(phi, theta); -// double t; + // double t; direction->y = -direction->y; return direction; } -Point2D* MirrorBallProjection::directionToUV(Vector3D *direction) { +Point2D *MirrorBallProjection::directionToUV(Vector3D *direction) { double u, v; direction->y = -direction->y; - if(fabs(direction->x) > 0 || fabs(direction->y) > 0) - { - double distance = sqrt(direction->x * direction->x + direction->y * direction->y); - - double r = 0.5 * (sin(acos(direction->z) / 2)) / distance; - - u = direction->x * r + 0.5; - v = direction->y * r + 0.5; - } - else - { - u = v = 0.5; + if (fabs(direction->x) > 0 || fabs(direction->y) > 0) { + double distance = + sqrt(direction->x * direction->x + direction->y * direction->y); + + double r = 0.5 * (sin(acos(direction->z) / 2)) / distance; + + u = direction->x * r + 0.5; + v = direction->y * r + 0.5; + } else { + u = v = 0.5; } return new Point2D(u, v); } -///END MIRRORBALL +/// END MIRRORBALL - -///ANGULAR +/// ANGULAR AngularProjection::AngularProjection(bool initialization) { name = "angular"; totalAngle = 360; - if(initialization) - ProjectionFactory::registerProjection(name, this->create); + if (initialization) + ProjectionFactory::registerProjection(name, this->create); } -Projection* AngularProjection::create() { +Projection *AngularProjection::create() { AngularProjection *p = new AngularProjection(false); p->totalAngle = 360; @@ -274,103 +246,93 @@ char *delimiter; static const char *OPTION_ANGLE = "angle"; - while(*opts) - { - //fprintf(stderr,"option: %s\n", opts); - //if(delimiter = strchr(name, '/')) + while (*opts) { + // fprintf(stderr,"option: %s\n", opts); + // if(delimiter = strchr(name, '/')) //*delimiter++ = '\0'; - - if(strncmp(opts, OPTION_ANGLE, strlen(OPTION_ANGLE)) == 0) - { - totalAngle = strtod(opts + strlen(OPTION_ANGLE) + 1, &delimiter); - // fprintf(stderr,"angle: %g\n", totalAngle); - - if(0 >= totalAngle || totalAngle > 360) - { - throw "error: angular projection: angle must be in (0,360] degrees range.\n"; + if (strncmp(opts, OPTION_ANGLE, strlen(OPTION_ANGLE)) == 0) { + totalAngle = strtod(opts + strlen(OPTION_ANGLE) + 1, &delimiter); + // fprintf(stderr,"angle: %g\n", totalAngle); + + if (0 >= totalAngle || totalAngle > 360) { + throw "error: angular projection: angle must be in (0,360] " + "degrees range.\n"; + } + } else { + throw " error: angular projection: unknown option.\n"; } - } - else - { - throw " error: angular projection: unknown option.\n"; - } - opts = delimiter + 1; + opts = delimiter + 1; } } -const char *AngularProjection::getName(void) { - return name; -} +const char *AngularProjection::getName(void) { return name; } -double AngularProjection::getSizeRatio(void) { - return 1; -} +double AngularProjection::getSizeRatio(void) { return 1; } bool AngularProjection::isValidPixel(double u, double v) { // check if we are not in a boundary region (outside a circle) - if((u - 0.5) * (u - 0.5) + (v - 0.5) * (v - 0.5) > 0.25) - return false; + if ((u - 0.5) * (u - 0.5) + (v - 0.5) * (v - 0.5) > 0.25) + return false; else - return true; + return true; } -Vector3D* AngularProjection::uvToDirection(double u, double v) { +Vector3D *AngularProjection::uvToDirection(double u, double v) { u = 2 * u - 1; v = 2 * v - 1; u *= totalAngle / 360; v *= totalAngle / 360; - double phi = atan2( v, u ); - double theta = boost::math::double_constants::pi * sqrt( u * u + v * v ); + double phi = atan2(v, u); + double theta = boost::math::double_constants::pi * sqrt(u * u + v * v); Vector3D *direction = new Vector3D(phi, theta); -// double t; + // double t; direction->y = -direction->y; return direction; } -Point2D* AngularProjection::directionToUV(Vector3D *direction) { +Point2D *AngularProjection::directionToUV(Vector3D *direction) { double u, v; direction->y = -direction->y; - if(fabs(direction->x) > 0 || fabs(direction->y) > 0) - { - double distance = sqrt(direction->x * direction->x + direction->y * direction->y); - - double r = (boost::math::double_constants::one_div_two_pi) * acos(direction->z) / distance; - - u = direction->x * r + 0.5; - v = direction->y * r + 0.5; - } - else - { - u = v = 0.5; + if (fabs(direction->x) > 0 || fabs(direction->y) > 0) { + double distance = + sqrt(direction->x * direction->x + direction->y * direction->y); + + double r = + (boost::math::double_constants::one_div_two_pi)*acos(direction->z) / + distance; + + u = direction->x * r + 0.5; + v = direction->y * r + 0.5; + } else { + u = v = 0.5; } return new Point2D(u, v); } -///END ANGULAR - +/// END ANGULAR -///CYLINDRICAL +/// CYLINDRICAL CylindricalProjection::CylindricalProjection(bool initialization) { name = "cylindrical"; - if(initialization) - ProjectionFactory::registerProjection(name, this->create); + if (initialization) + ProjectionFactory::registerProjection(name, this->create); pole = new Vector3D(0, 1, 0); equator = new Vector3D(0, 0, -1); cross = new Vector3D(1, 0, 0); } -Projection* CylindricalProjection::create() { +Projection *CylindricalProjection::create() { return new CylindricalProjection(false); } @@ -380,20 +342,18 @@ delete cross; } -double CylindricalProjection::getSizeRatio(void) { - return 2; -} +double CylindricalProjection::getSizeRatio(void) { return 2; } bool CylindricalProjection::isValidPixel(double /*u*/, double /*v*/) { return true; } -Vector3D* CylindricalProjection::uvToDirection(double u, double v) { +Vector3D *CylindricalProjection::uvToDirection(double u, double v) { u = 0.75 - u; u *= boost::math::double_constants::two_pi; - v = acos( 1 - 2 * v ); + v = acos(1 - 2 * v); Vector3D *direction = new Vector3D(u, v); @@ -404,61 +364,55 @@ return direction; } -Point2D* CylindricalProjection::directionToUV(Vector3D *direction) { +Point2D *CylindricalProjection::directionToUV(Vector3D *direction) { double u, v; double lat = direction->dot(pole); - v = ( 1 - lat ) / 2; + v = (1 - lat) / 2; - if(v < EPSILON || fabs(1 - v) < EPSILON) - u = 0; - else - { - double ratio = equator->dot( direction ) / sin( acos( lat ) ); + if (v < EPSILON || fabs(1 - v) < EPSILON) + u = 0; + else { + double ratio = equator->dot(direction) / sin(acos(lat)); - if(ratio < -1) - ratio = -1; - else - if(ratio > 1) - ratio = 1; - - double lon = acos(ratio) / (boost::math::double_constants::two_pi); - - if(cross->dot(direction) < 0) - u = lon; - else - u = 1 - lon; + if (ratio < -1) + ratio = -1; + else if (ratio > 1) + ratio = 1; - if(u == 1) - u = 0; + double lon = acos(ratio) / (boost::math::double_constants::two_pi); - if(v == 1) - v = 0; + if (cross->dot(direction) < 0) + u = lon; + else + u = 1 - lon; + + if (u == 1) u = 0; + + if (v == 1) v = 0; } - // if ( 0 > v || v >= 1 ) fprintf(stderr, "u: %f (%f,%f,%f)\n", v, direction->x, direction->y, direction->z); - // assert ( -0. <= u && u < 1 ); - // assert ( -0. <= v && v < 1 ); + // if ( 0 > v || v >= 1 ) fprintf(stderr, "u: %f (%f,%f,%f)\n", v, + // direction->x, direction->y, direction->z); + // assert ( -0. <= u && u < 1 ); + // assert ( -0. <= v && v < 1 ); return new Point2D(u, v); } -///END CYLINDRICAL - +/// END CYLINDRICAL -///POLAR +/// POLAR PolarProjection::PolarProjection(bool initialization) { name = "polar"; - if(initialization) - ProjectionFactory::registerProjection(name, this->create); + if (initialization) + ProjectionFactory::registerProjection(name, this->create); pole = new Vector3D(0, 1, 0); equator = new Vector3D(0, 0, -1); cross = new Vector3D(1, 0, 0); } -Projection* PolarProjection::create() { - return new PolarProjection(false); -} +Projection *PolarProjection::create() { return new PolarProjection(false); } PolarProjection::~PolarProjection() { delete pole; @@ -466,15 +420,11 @@ delete cross; } -double PolarProjection::getSizeRatio(void) { - return 2; -} +double PolarProjection::getSizeRatio(void) { return 2; } -bool PolarProjection::isValidPixel(double /*u*/, double /*v*/) { - return true; -} +bool PolarProjection::isValidPixel(double /*u*/, double /*v*/) { return true; } -Vector3D* PolarProjection::uvToDirection(double u, double v) { +Vector3D *PolarProjection::uvToDirection(double u, double v) { u = 0.75 - u; u *= boost::math::double_constants::two_pi; @@ -489,140 +439,129 @@ return direction; } -Point2D* PolarProjection::directionToUV(Vector3D *direction) { +Point2D *PolarProjection::directionToUV(Vector3D *direction) { double u, v; double lat = acos(direction->dot(pole)); v = lat * (1 / boost::math::double_constants::pi); - if(v < EPSILON || fabs(1 - v) < EPSILON) - u = 0; - else - { - double ratio = equator->dot(direction) / sin(lat); - - if(ratio < -1) - ratio = -1; - else - if(ratio > 1) - ratio = 1; - - double lon = acos(ratio) / (boost::math::double_constants::two_pi); - - if(cross->dot(direction) < 0) - u = lon; - else - u = 1 - lon; - - if(u == 1) + if (v < EPSILON || fabs(1 - v) < EPSILON) u = 0; + else { + double ratio = equator->dot(direction) / sin(lat); - if(v == 1) - v = 0; - } - - // if ( 0 > v || v >= 1 ) fprintf(stderr, "u: %f (%f,%f,%f)\n", v, direction->x, direction->y, direction->z); - // assert ( -0. <= u && u < 1 ); - // assert ( -0. <= v && v < 1 ); - return new Point2D(u, v); -} -///END POLAR - - -void transformArray( const pfs::Array2Df *in, pfs::Array2Df *out, TransformInfo *transformInfo) -{ - const double delta = 1. / transformInfo->oversampleFactor; - const double offset = 0.5 / transformInfo->oversampleFactor; - const double scaler = 1. / ( transformInfo->oversampleFactor * transformInfo->oversampleFactor ); - - const int outRows = out->getRows(); - const int outCols = out->getCols(); + if (ratio < -1) + ratio = -1; + else if (ratio > 1) + ratio = 1; - const int inRows = in->getRows(); - const int inCols = in->getCols(); + double lon = acos(ratio) / (boost::math::double_constants::two_pi); + if (cross->dot(direction) < 0) + u = lon; + else + u = 1 - lon; - for( int y = 0; y < outRows; y++ ) - for( int x = 0; x < outCols; x++ ) { - double pixVal = 0; + if (u == 1) u = 0; - if( transformInfo->dstProjection->isValidPixel(( x + 0.5 ) / outCols, ( y + 0.5 ) / outCols ) == true ) - { - for( double sy = 0, oy = 0; oy < transformInfo->oversampleFactor; sy += delta, oy++ ) - for( double sx = 0, ox = 0; ox < transformInfo->oversampleFactor; sx += delta, ox++ ) - { - Vector3D *direction = transformInfo->dstProjection->uvToDirection( - ( x + offset + sx ) / outCols, ( y + offset + sy ) / outRows ); - - if(direction == NULL) - continue; - - // angles below are negated, because we want to rotate - // the environment around us, not us within the environment. - if( transformInfo->xRotate != 0 ) - direction->rotateX( -transformInfo->xRotate ); - - if( transformInfo->yRotate != 0 ) - direction->rotateY( -transformInfo->yRotate ); - - if( transformInfo->zRotate != 0 ) - direction->rotateZ( -transformInfo->zRotate ); - - Point2D *p = transformInfo->srcProjection->directionToUV( direction ); - - p->x *= inCols; - p->y *= inRows; - - if( transformInfo->interpolate == true ) - { - int ix = (int)floor( p->x ); - int iy = (int)floor( p->y ); - - double i = p->x - ix; - double j = p->y - iy; - - // compute pixel weights for interpolation - double w1 = i * j; - double w2 = (1 - i) * j; - double w3 = (1 - i) * (1 - j); - double w4 = i * (1 - j); - - int dx = ix + 1; - if(dx >= inCols) - dx = inCols - 1; + if (v == 1) v = 0; + } - int dy = iy + 1; - if(dy >= inRows) - dy = inRows - 1; + // if ( 0 > v || v >= 1 ) fprintf(stderr, "u: %f (%f,%f,%f)\n", v, + // direction->x, direction->y, direction->z); + // assert ( -0. <= u && u < 1 ); + // assert ( -0. <= v && v < 1 ); + return new Point2D(u, v); +} +/// END POLAR - pixVal += w3 * (*in)(ix, iy) + - w4 * (*in)(dx, iy) + - w1 * (*in)(dx, dy) + - w2 * (*in)(ix, dy); - } - else - { - int ix = (int)floor(p->x + 0.5); - int iy = (int)floor(p->y + 0.5); +void transformArray(const pfs::Array2Df *in, pfs::Array2Df *out, + TransformInfo *transformInfo) { + const double delta = 1. / transformInfo->oversampleFactor; + const double offset = 0.5 / transformInfo->oversampleFactor; + const double scaler = 1. / (transformInfo->oversampleFactor * + transformInfo->oversampleFactor); + + const int outRows = out->getRows(); + const int outCols = out->getCols(); + + const int inRows = in->getRows(); + const int inCols = in->getCols(); + + for (int y = 0; y < outRows; y++) + for (int x = 0; x < outCols; x++) { + double pixVal = 0; + + if (transformInfo->dstProjection->isValidPixel( + (x + 0.5) / outCols, (y + 0.5) / outCols) == true) { + for (double sy = 0, oy = 0; + oy < transformInfo->oversampleFactor; sy += delta, oy++) + for (double sx = 0, ox = 0; + ox < transformInfo->oversampleFactor; + sx += delta, ox++) { + Vector3D *direction = + transformInfo->dstProjection->uvToDirection( + (x + offset + sx) / outCols, + (y + offset + sy) / outRows); + + if (direction == NULL) continue; + + // angles below are negated, because we want to rotate + // the environment around us, not us within the + // environment. + if (transformInfo->xRotate != 0) + direction->rotateX(-transformInfo->xRotate); + + if (transformInfo->yRotate != 0) + direction->rotateY(-transformInfo->yRotate); + + if (transformInfo->zRotate != 0) + direction->rotateZ(-transformInfo->zRotate); + + Point2D *p = + transformInfo->srcProjection->directionToUV( + direction); + + p->x *= inCols; + p->y *= inRows; + + if (transformInfo->interpolate == true) { + int ix = (int)floor(p->x); + int iy = (int)floor(p->y); + + double i = p->x - ix; + double j = p->y - iy; + + // compute pixel weights for interpolation + double w1 = i * j; + double w2 = (1 - i) * j; + double w3 = (1 - i) * (1 - j); + double w4 = i * (1 - j); + + int dx = ix + 1; + if (dx >= inCols) dx = inCols - 1; + + int dy = iy + 1; + if (dy >= inRows) dy = inRows - 1; + + pixVal += w3 * (*in)(ix, iy) + w4 * (*in)(dx, iy) + + w1 * (*in)(dx, dy) + w2 * (*in)(ix, dy); + } else { + int ix = (int)floor(p->x + 0.5); + int iy = (int)floor(p->y + 0.5); + + if (ix >= inCols) ix = inCols - 1; + + if (iy >= inRows) iy = inRows - 1; - if(ix >= inCols) - ix = inCols - 1; + pixVal += (*in)(ix, iy); + } - if(iy >= inRows) - iy = inRows - 1; + delete direction; + delete p; - pixVal += (*in)(ix, iy); + (*out)(x, y) = pixVal * scaler; + } } - - - delete direction; - delete p; - - (*out)(x,y) = pixVal * scaler; - } - } - } + } } - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/projection.h luminance-hdr-2.6.0/src/Libpfs/manip/projection.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/projection.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/projection.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,127 +37,114 @@ class Vector3D; class Point2D; -class Projection -{ - protected: - const char *name; - public: +class Projection { + protected: + const char *name; + public: virtual Vector3D *uvToDirection(double u, double v) = 0; virtual Point2D *directionToUV(Vector3D *direction) = 0; virtual bool isValidPixel(double u, double v) = 0; virtual double getSizeRatio(void) = 0; - virtual ~Projection() - { - } + virtual ~Projection() {} - virtual void setOptions(char *) - { - } + virtual void setOptions(char *) {} - virtual const char *getName(void) - { - return name; - } + virtual const char *getName(void) { return name; } }; - - -typedef Projection*(*ProjectionCreator)(void); -class ProjectionFactory -{ +typedef Projection *(*ProjectionCreator)(void); +class ProjectionFactory { static ProjectionFactory singleton; - explicit ProjectionFactory(bool ); - public: - std::map < std::string, ProjectionCreator > projections; + explicit ProjectionFactory(bool); + + public: + std::map projections; static void registerProjection(const char *name, ProjectionCreator ptr); static Projection *getProjection(char *name); static void listProjectionNames(void); }; -class MirrorBallProjection : public Projection -{ - explicit MirrorBallProjection(bool initialization); - public: - static MirrorBallProjection singleton; - static Projection* create(); - const char *getName(void); - double getSizeRatio(void); - bool isValidPixel(double u, double v); - Vector3D* uvToDirection(double u, double v); - Point2D* directionToUV(Vector3D *direction); -}; - -class AngularProjection : public Projection -{ - double totalAngle; - explicit AngularProjection(bool initialization); - public: - static AngularProjection singleton; - static Projection* create(); - void setOptions(char *opts); - const char *getName(void); - double getSizeRatio(void); - bool isValidPixel(double u, double v); - Vector3D* uvToDirection(double u, double v); - Point2D* directionToUV(Vector3D *direction); - void setAngle(double v) {totalAngle=v;} -}; - - -class CylindricalProjection : public Projection -{ - Vector3D *pole; - Vector3D *equator; - Vector3D *cross; - explicit CylindricalProjection(bool initialization); - public: - static CylindricalProjection singleton; - static Projection* create(); - ~CylindricalProjection(); - double getSizeRatio(void); - bool isValidPixel(double /*u*/, double /*v*/); - Vector3D* uvToDirection(double u, double v); - Point2D* directionToUV(Vector3D *direction); -}; - -class PolarProjection : public Projection -{ - Vector3D *pole; - Vector3D *equator; - Vector3D *cross; - explicit PolarProjection(bool initialization); - public: - static PolarProjection singleton; - static Projection* create(); - ~PolarProjection(); - double getSizeRatio(void); - bool isValidPixel(double /*u*/, double /*v*/); - Vector3D* uvToDirection(double u, double v); - Point2D* directionToUV(Vector3D *direction); -}; - - -class TransformInfo -{ - public: - double xRotate; - double yRotate; - double zRotate; - int oversampleFactor; - bool interpolate; - Projection *srcProjection; - Projection *dstProjection; - - TransformInfo() - { - xRotate = yRotate = zRotate = 0; - oversampleFactor = 1; - interpolate = true; - srcProjection = dstProjection = NULL; - } +class MirrorBallProjection : public Projection { + explicit MirrorBallProjection(bool initialization); + + public: + static MirrorBallProjection singleton; + static Projection *create(); + const char *getName(void); + double getSizeRatio(void); + bool isValidPixel(double u, double v); + Vector3D *uvToDirection(double u, double v); + Point2D *directionToUV(Vector3D *direction); +}; + +class AngularProjection : public Projection { + double totalAngle; + explicit AngularProjection(bool initialization); + + public: + static AngularProjection singleton; + static Projection *create(); + void setOptions(char *opts); + const char *getName(void); + double getSizeRatio(void); + bool isValidPixel(double u, double v); + Vector3D *uvToDirection(double u, double v); + Point2D *directionToUV(Vector3D *direction); + void setAngle(double v) { totalAngle = v; } +}; + +class CylindricalProjection : public Projection { + Vector3D *pole; + Vector3D *equator; + Vector3D *cross; + explicit CylindricalProjection(bool initialization); + + public: + static CylindricalProjection singleton; + static Projection *create(); + ~CylindricalProjection(); + double getSizeRatio(void); + bool isValidPixel(double /*u*/, double /*v*/); + Vector3D *uvToDirection(double u, double v); + Point2D *directionToUV(Vector3D *direction); +}; + +class PolarProjection : public Projection { + Vector3D *pole; + Vector3D *equator; + Vector3D *cross; + explicit PolarProjection(bool initialization); + + public: + static PolarProjection singleton; + static Projection *create(); + ~PolarProjection(); + double getSizeRatio(void); + bool isValidPixel(double /*u*/, double /*v*/); + Vector3D *uvToDirection(double u, double v); + Point2D *directionToUV(Vector3D *direction); +}; + +class TransformInfo { + public: + double xRotate; + double yRotate; + double zRotate; + int oversampleFactor; + bool interpolate; + Projection *srcProjection; + Projection *dstProjection; + + TransformInfo() { + xRotate = yRotate = zRotate = 0; + oversampleFactor = 1; + interpolate = true; + srcProjection = dstProjection = NULL; + } }; -void transformArray( const pfs::Array2Df *in, pfs::Array2Df *out, TransformInfo *transformInfo); +void transformArray(const pfs::Array2Df *in, pfs::Array2Df *out, + TransformInfo *transformInfo); -#endif // PFS_PROJECTION_H +#endif // PFS_PROJECTION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.cpp luminance-hdr-2.6.0/src/Libpfs/manip/resize.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/resize.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,12 +24,11 @@ //! \author Rafal Mantiuk, //! \author Davide Anastasia -#include +#include #include +#include #include -#include #include -#include #include "resize.h" @@ -37,39 +36,36 @@ #include "Libpfs/frame.h" -namespace pfs -{ - +namespace pfs { -Frame* resize(Frame* frame, int xSize, InterpolationMethod m) -{ +Frame *resize(Frame *frame, int xSize, InterpolationMethod m) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif int new_x = xSize; - int new_y = (int)((float)frame->getHeight() * (float)xSize / (float)frame->getWidth()); + int new_y = (int)((float)frame->getHeight() * (float)xSize / + (float)frame->getWidth()); - pfs::Frame *resizedFrame = new pfs::Frame( new_x, new_y ); + pfs::Frame *resizedFrame = new pfs::Frame(new_x, new_y); - const ChannelContainer& channels = frame->getChannels(); - for ( ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { - pfs::Channel* newCh = resizedFrame->createChannel( (*it)->getName() ); + const ChannelContainer &channels = frame->getChannels(); + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); ++it) { + pfs::Channel *newCh = resizedFrame->createChannel((*it)->getName()); resize(*it, newCh, m); } - pfs::copyTags( frame, resizedFrame ); + pfs::copyTags(frame, resizedFrame); #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "resizeFrame() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "resizeFrame() = " << f_timer.get_time() << " msec" + << std::endl; #endif return resizedFrame; } -} // pfs +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.h luminance-hdr-2.6.0/src/Libpfs/manip/resize.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/resize.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,23 +31,23 @@ #include "Common/global.h" #include "Libpfs/array2d.h" -namespace pfs -{ +namespace pfs { // forward declaration class Frame; -Frame* resize(Frame* frame, int xSize, InterpolationMethod m); +Frame *resize(Frame *frame, int xSize, InterpolationMethod m); template -void resize(const Array2D *from, Array2D *to, InterpolationMethod m); +void resize(const Array2D *from, Array2D *to, + InterpolationMethod m); template -void resize(const Array2D& from, Array2D& to, InterpolationMethod m) { +void resize(const Array2D &from, Array2D &to, + InterpolationMethod m) { resize(&from, &to, m); } - } #include "resize.hxx" -#endif // PFS_RESIZE_H +#endif // PFS_RESIZE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.hxx luminance-hdr-2.6.0/src/Libpfs/manip/resize.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/resize.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/resize.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -23,110 +23,70 @@ #define PFS_RESIZE_HXX #include -#include "resize.h" #include "copy.h" +#include "resize.h" +#include "../../sleef.c" -#define PI4_Af 0.78515625f -#define PI4_Bf 0.00024127960205078125f -#define PI4_Cf 6.3329935073852539062e-07f -#define PI4_Df 4.9604681473525147339e-10f - -namespace pfs -{ -namespace detail -{ +namespace pfs { +namespace detail { //! \author Franco Comida //! \note Code derived from RawTherapee //! https://github.com/Beep6581/RawTherapee/blob/dev/rtengine/ipresize.cc - const float RT_1_PI = 2.0f*(float)boost::math::double_constants::one_div_two_pi; - - inline float xrintf(float x) { return x < 0 ? (int)(x - 0.5f) : (int)(x + 0.5f); } - - inline float mlaf(float x, float y, float z) { return x * y + z; } - - inline float xsinf(float d) { - int q; - float u, s; - - q = (int)xrintf(d * RT_1_PI); - - d = mlaf(q, -PI4_Af*4, d); - d = mlaf(q, -PI4_Bf*4, d); - d = mlaf(q, -PI4_Cf*4, d); - d = mlaf(q, -PI4_Df*4, d); - - s = d * d; - - if ((q & 1) != 0) d = -d; - - u = 2.6083159809786593541503e-06f; - u = mlaf(u, s, -0.0001981069071916863322258f); - u = mlaf(u, s, 0.00833307858556509017944336f); - u = mlaf(u, s, -0.166666597127914428710938f); - - u = mlaf(s, u * d, d); - - return u; -} -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 (boost::math::double_constants::pi) * x; - return a * xsinf (x) * xsinf (x / a) / (x * x); + x = static_cast(boost::math::double_constants::pi) * x; + return a * xsinf(x) * xsinf(x / a) / (x * x); } } template -void Lanczos (const Type* src, Type* dst, - int W, int H, int W2, int H2) +void Lanczos(const Type *src, Type *dst, int W, int H, int W2, int H2) { - - const float scale = static_cast(W2)/static_cast(W); + const float scale = static_cast(W2) / static_cast(W); const float delta = 1.0f / scale; const float a = 3.0f; - const float sc = std::min (scale, 1.0f); - const int support = static_cast (2.0f * a / sc) + 1; + const float sc = std::min(scale, 1.0f); + const int support = static_cast(2.0f * a / sc) + 1; - const Type zero = static_cast (0); + const Type zero = static_cast(0); - #pragma omp parallel +#pragma omp parallel { // storage for precomputed parameters for horisontal interpolation - float * wwh = new float[support * W2]; - int * jj0 = new int[W2]; - int * jj1 = new int[W2]; + float *wwh = new float[support * W2]; + int *jj0 = new int[W2]; + int *jj1 = new int[W2]; // temporal storage for vertically-interpolated row of pixels - float * l = new float[W]; + float *l = new float[W]; // Phase 1: precompute coefficients for horisontal interpolation for (int j = 0; j < W2; 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; + float *w = wwh + j * support; // sum of weights used for normalization - float ws = 0.0f; + float ws = 0.0f; - jj0[j] = std::max (0, static_cast (floorf (x0 - a / sc)) + 1); - jj1[j] = std::min (W, static_cast (floorf (x0 + a / sc)) + 1); + jj0[j] = std::max(0, static_cast(floorf(x0 - a / sc)) + 1); + jj1[j] = std::min(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]; } @@ -139,23 +99,22 @@ // Phase 2: do actual interpolation // weights for interpolation in y direction float *w = new float[support]; - #pragma omp for +#pragma omp for for (int i = 0; i < H2; 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 = std::max (0, static_cast (floorf (y0 - a / sc)) + 1); - int ii1 = std::min (H, static_cast (floorf (y0 + a / sc)) + 1); + int ii0 = std::max(0, static_cast(floorf(y0 - a / sc)) + 1); + int ii1 = std::min(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]; } @@ -166,13 +125,12 @@ // Do vertical interpolation. Store results. for (int j = 0; j < W; j++) { - float o = 0.0f; for (int ii = ii0; ii < ii1; ii++) { int k = ii - ii0; - o += w[k] * static_cast(src[ii*W + j]); + o += w[k] * static_cast(src[ii * W + j]); } l[j] = o; @@ -180,8 +138,7 @@ // Do horizontal interpolation for (int j = 0; j < W2; j++) { - - float * wh = wwh + support * j; + float *wh = wwh + support * j; float o = 0.0f; @@ -191,7 +148,9 @@ o += wh[k] * l[jj]; } - dst[i*W2 + j] = max(zero, min(static_cast(o), boost::numeric::bounds::highest())); + dst[i * W2 + j] = + max(zero, min(static_cast(o), + boost::numeric::bounds::highest())); } } @@ -210,11 +169,10 @@ //! http://tech-algorithm.com/articles/bilinear-image-scaling/ //! with added OpenMP support and block based resampling template -void resizeBilinearGray(const Type* pixels, Type* output, - size_t w, size_t h, size_t w2, size_t h2) -{ - const float x_ratio = static_cast(w - 1)/w2; - const float y_ratio = static_cast(h - 1)/h2; +void resizeBilinearGray(const Type *pixels, Type *output, size_t w, size_t h, + size_t w2, size_t h2) { + const float x_ratio = static_cast(w - 1) / w2; + const float y_ratio = static_cast(h - 1) / h2; Type A, B, C, D; Type outputPixel; @@ -225,30 +183,23 @@ float x_diff = 0.0f; float y_diff = 0.0f; -#pragma omp parallel \ - shared(pixels, output, w, h, w2, h2) \ - private(x_diff, y_diff, x, y, index, outputPixel, A, B, C, D) +#pragma omp parallel shared(pixels, output, w, h, w2, h2) private( \ + x_diff, y_diff, x, y, index, outputPixel, A, B, C, D) { #pragma omp for schedule(static, 1) - for ( int iO = 0; iO < static_cast(h2); iO += BLOCK_FACTOR ) - { - for ( int jO = 0; jO < static_cast(w2); jO += BLOCK_FACTOR ) - { + for (int iO = 0; iO < static_cast(h2); iO += BLOCK_FACTOR) { + for (int jO = 0; jO < static_cast(w2); jO += BLOCK_FACTOR) { for (size_t i = iO, iEnd = std::min(iO + BLOCK_FACTOR, h2); - i < iEnd; - i++) - { + i < iEnd; i++) { y = static_cast(y_ratio * i); y_diff = (y_ratio * i) - y; for (size_t j = jO, jEnd = std::min(jO + BLOCK_FACTOR, w2); - j < jEnd; - j++) - { + j < jEnd; j++) { x = static_cast(x_ratio * j); x_diff = (x_ratio * j) - x; - index = y*w + x; + index = y * w + x; A = pixels[index]; B = pixels[index + 1]; @@ -257,53 +208,46 @@ // Y = A(1-w)(1-h) + B(w)(1-h) + C(h)(1-w) + D(w)(h) outputPixel = - static_cast( - A*(1-x_diff)*(1-y_diff) + - B*(x_diff)*(1-y_diff) + - C*(y_diff)*(1-x_diff) + - D*(x_diff*y_diff) ); + static_cast(A * (1 - x_diff) * (1 - y_diff) + + B * (x_diff) * (1 - y_diff) + + C * (y_diff) * (1 - x_diff) + + D * (x_diff * y_diff)); - output[i*w2 + j] = outputPixel; + output[i * w2 + j] = outputPixel; } } } } - } // end parallel region + } // end parallel region } template -void resample(const ::pfs::Array2D *in, ::pfs::Array2D *out, InterpolationMethod m) -{ - switch ( m ) - { +void resample(const ::pfs::Array2D *in, ::pfs::Array2D *out, + InterpolationMethod m) { + switch (m) { case LanczosInterp: - Lanczos(in->data(), out->data(), - in->getCols(), in->getRows(), - out->getCols(), out->getRows()); + Lanczos(in->data(), out->data(), in->getCols(), in->getRows(), + out->getCols(), out->getRows()); break; case BilinearInterp: - resizeBilinearGray(in->data(), out->data(), - in->getCols(), in->getRows(), - out->getCols(), out->getRows()); + resizeBilinearGray(in->data(), out->data(), in->getCols(), + in->getRows(), out->getCols(), out->getRows()); break; } } -} // anonymous +} // anonymous template -void resize(const Array2D *in, Array2D *out, InterpolationMethod m) -{ - if ( in->getCols() == out->getCols() && in->getRows() == out->getRows() ) - { +void resize(const Array2D *in, Array2D *out, + InterpolationMethod m) { + if (in->getCols() == out->getCols() && in->getRows() == out->getRows()) { pfs::copy(in, out); - } - else - { + } else { detail::resample(in, out, m); } } -} // pfs +} // pfs -#endif // PFS_RESIZE_HXX +#endif // PFS_RESIZE_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.cpp luminance-hdr-2.6.0/src/Libpfs/manip/rotate.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/rotate.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -36,38 +36,35 @@ #include "Libpfs/utils/msec_timer.h" -namespace pfs -{ +namespace pfs { -pfs::Frame* rotate(const pfs::Frame* frame, bool clock_wise) -{ +pfs::Frame *rotate(const pfs::Frame *frame, bool clock_wise) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif - pfs::Frame *resizedFrame = new pfs::Frame( frame->getHeight(), - frame->getWidth() ); + pfs::Frame *resizedFrame = + new pfs::Frame(frame->getHeight(), frame->getWidth()); - const ChannelContainer& channels = frame->getChannels(); + const ChannelContainer &channels = frame->getChannels(); - for ( ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); ++it) { pfs::Channel *newCh = resizedFrame->createChannel((*it)->getName()); rotate(*it, newCh, clock_wise); } - pfs::copyTags( frame, resizedFrame ); + pfs::copyTags(frame, resizedFrame); #ifdef TIMER_PROFILING f_timer.stop_and_update(); - std::cout << "rotateFrame() = " << f_timer.get_time() << " msec" << std::endl; + std::cout << "rotateFrame() = " << f_timer.get_time() << " msec" + << std::endl; #endif return resizedFrame; } -} // pfs +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.h luminance-hdr-2.6.0/src/Libpfs/manip/rotate.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/rotate.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,20 +28,18 @@ #include "Libpfs/array2d_fwd.h" -namespace pfs -{ +namespace pfs { class Frame; //! \brief rotate frame into a newly created one -pfs::Frame* rotate(const pfs::Frame* frame, bool clock_wise); +pfs::Frame *rotate(const pfs::Frame *frame, bool clock_wise); //! \brief rotate \c in inside \c out //! \param[in] clockwise true if clockwise rotation, false if counter clockwise template void rotate(const Array2D *in, Array2D *out, bool clockwise); - } #include "rotate.hxx" -#endif // PFSROTATE_H +#endif // PFSROTATE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.hxx luminance-hdr-2.6.0/src/Libpfs/manip/rotate.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/rotate.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/rotate.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -24,45 +24,36 @@ #include "rotate.h" -namespace pfs -{ +namespace pfs { template -void rotate(const pfs::Array2D *in, pfs::Array2D *out, bool clockwise) -{ - const Type* Vin = in->data(); - Type* Vout = out->data(); +void rotate(const pfs::Array2D *in, pfs::Array2D *out, + bool clockwise) { + const Type *Vin = in->data(); + Type *Vout = out->data(); - const int I_ROWS = in->getRows(); - const int I_COLS = in->getCols(); + const int I_ROWS = in->getRows(); + const int I_COLS = in->getCols(); - //const int O_ROWS = out->getRows(); + // const int O_ROWS = out->getRows(); const int O_COLS = out->getCols(); - if (clockwise) - { + if (clockwise) { #pragma omp parallel for - for (int j = 0; j < I_ROWS; j++) - { - for (int i = 0; i < I_COLS; i++) - { - Vout[(i+1)*O_COLS - 1 - j] = Vin[j*I_COLS + i]; + for (int j = 0; j < I_ROWS; j++) { + for (int i = 0; i < I_COLS; i++) { + Vout[(i + 1) * O_COLS - 1 - j] = Vin[j * I_COLS + i]; } } - } - else - { + } else { #pragma omp parallel for - for (int j = 0; j < I_ROWS; j++) - { - for (int i = 0; i < I_COLS; i++) - { - Vout[(I_COLS - i - 1)*O_COLS + j] = Vin[j*I_COLS + i]; + for (int j = 0; j < I_ROWS; j++) { + for (int i = 0; i < I_COLS; i++) { + Vout[(I_COLS - i - 1) * O_COLS + j] = Vin[j * I_COLS + i]; } } } } - } -#endif // #ifndef PFS_ROTATE_HXX +#endif // #ifndef PFS_ROTATE_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/saturation.cpp luminance-hdr-2.6.0/src/Libpfs/manip/saturation.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/saturation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/saturation.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,71 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2012 Davide Anastasia + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + */ + +//! \brief Apply saturation correction the the pfs stream +//! \author Rafal Mantiuk, + +#include "saturation.h" + +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/colorspace/saturation.h" +#include "Libpfs/utils/transform.h" +#include "Libpfs/frame.h" +#include "Libpfs/utils/msec_timer.h" + +using namespace pfs; +using namespace colorspace; +using namespace utils; + +namespace pfs { + +void applySaturation(pfs::Frame *frame, float multiplier) { + + if (multiplier == 1.0f) return; + + pfs::Channel *X, *Y, *Z; + frame->getXYZChannels(X, Y, Z); + + applySaturation(X, Y, Z, multiplier); +} + +void applySaturation(pfs::Array2Df *R, pfs::Array2Df *G, pfs::Array2Df *B, + const float multiplier) { +#ifdef TIMER_PROFILING + msec_timer f_timer; + f_timer.start(); +#endif + + utils::transform(R->begin(), R->end(), G->begin(), B->begin(), R->begin(), G->begin(), B->begin(), ChangeSaturation(multiplier)); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "applySaturation() = " << f_timer.get_time() << " msec" + << std::endl; +#endif +} +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/saturation.h luminance-hdr-2.6.0/src/Libpfs/manip/saturation.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/saturation.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/saturation.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2012 Davide Anastasia + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_SATURATION_H +#define PFS_SATURATION_H + +#include "Libpfs/array2d_fwd.h" + +//! \brief Apply saturation correction the the pfs stream +//! \author Rafal Mantiuk +//! \author Davide Anastasia + +namespace pfs { +class Frame; + +//! \brief Apply \c saturation correction on the input \c frame +void applySaturation(pfs::Frame *frame, float multiplier); + +//! \brief Apply saturation correction on the input \c array +void applySaturation(pfs::Array2Df *R, pfs::Array2Df *G, pfs::Array2Df *B, float multiplier); +} + +#endif // PFS_SATURATION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.cpp luminance-hdr-2.6.0/src/Libpfs/manip/shift.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/shift.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,27 +23,25 @@ namespace pfs { -Frame* shift(const Frame& frame, int dx, int dy) -{ +Frame *shift(const Frame &frame, int dx, int dy) { #ifdef TIMER_PROFILING msec_timer f_timer; f_timer.start(); #endif - pfs::Frame *shiftedFrame = new pfs::Frame( frame.getWidth(), frame.getHeight() ); + pfs::Frame *shiftedFrame = + new pfs::Frame(frame.getWidth(), frame.getHeight()); - const ChannelContainer& channels = frame.getChannels(); + const ChannelContainer &channels = frame.getChannels(); - for ( ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); ++it) { pfs::Channel *newCh = shiftedFrame->createChannel((*it)->getName()); shift(**it, -dx, -dy, *newCh); } - pfs::copyTags( &frame, shiftedFrame ); + pfs::copyTags(&frame, shiftedFrame); #ifdef TIMER_PROFILING f_timer.stop_and_update(); @@ -52,5 +50,4 @@ return shiftedFrame; } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.h luminance-hdr-2.6.0/src/Libpfs/manip/shift.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/shift.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,19 +25,18 @@ #include #include -namespace pfs -{ +namespace pfs { //! \brief shift \c Array2D by \a dx \a dy template -void shift(const Array2D& in, int dx, int dy, Array2D& out); +void shift(const Array2D &in, int dx, int dy, Array2D &out); //! \brief shift image by \a dx \a dy -pfs::Frame* shift(const pfs::Frame& in, int dx, int dy); +pfs::Frame *shift(const pfs::Frame &in, int dx, int dy); // template // pfs::Array2D* shift(const pfs::Array2D& in, int dx, int dy); -} // pfs +} // pfs #include -#endif // PFS_SHIFT_H +#endif // PFS_SHIFT_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.hxx luminance-hdr-2.6.0/src/Libpfs/manip/shift.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/manip/shift.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/manip/shift.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -22,21 +22,19 @@ #ifndef PFS_SHIFT_HXX #define PFS_SHIFT_HXX -#include #include +#include #include -#include #include +#include #include #include -namespace pfs -{ +namespace pfs { template -void shift(const Array2D& in, int dx, int dy, Array2D& out) -{ +void shift(const Array2D &in, int dx, int dy, Array2D &out) { typedef Array2D Array2DType; using namespace std; @@ -47,18 +45,14 @@ #endif // fill first row... if any! - for (int idx = 0; idx < -dy; idx++) - { + for (int idx = 0; idx < -dy; idx++) { fill(out.row_begin(idx), out.row_end(idx), Type()); } // fill middle portion - if ( dx < 0 ) - { + if (dx < 0) { for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); - row < rowEnd; - row++) - { + row < rowEnd; row++) { // Begin output line typename Array2DType::iterator itBegin = out.row_begin(row); // Pivot iterator @@ -67,30 +61,20 @@ // fill zero at the begin of the line fill(itBegin, itTh, Type()); // copy data - copy(in.row_begin(row + dy), - in.row_end(row + dy) + dx, - itTh); + copy(in.row_begin(row + dy), in.row_end(row + dy) + dx, itTh); } - } - else if (dx > 0) - { + } else if (dx > 0) { for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); - row < rowEnd; - row++) - { + row < rowEnd; row++) { // copy data copy(in.row_begin(row + dy) + dx, in.row_end(row + dy), out.row_begin(row)); // fill zero fill(out.row_end(row) - dx, out.row_end(row), Type()); } - } - else - { + } else { for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); - row < rowEnd; - row++) - { + row < rowEnd; row++) { // copy data copy(in.row_begin(row + dy), in.row_end(row + dy), out.row_begin(row)); @@ -98,19 +82,18 @@ } // fill last rows... if any! - for (int idx = dy; idx > 0; idx--) - { + for (int idx = dy; idx > 0; idx--) { fill(out.row_begin(out.getRows() - idx), - out.row_end(out.getRows() - idx), - Type()); + out.row_end(out.getRows() - idx), Type()); } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "shift Array2D = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "shift Array2D = " << stop_watch.get_time() << " msec" + << std::endl; #endif } -} // pfs +} // pfs -#endif // PFS_SHIFT_HXX +#endif // PFS_SHIFT_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/params.h luminance-hdr-2.6.0/src/Libpfs/params.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/params.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/params.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,34 +25,28 @@ #ifndef LIBPFS_PARAMS_H #define LIBPFS_PARAMS_H +#include #include -#include #include +#include #include -#include #include namespace pfs { -struct Param -{ - Param() - : value_() {} - Param(const boost::any& value) - : value_(value) {} +struct Param { + Param() : value_() {} + Param(const boost::any &value) : value_(value) {} template - Param(const Type& value) - : value_(value) {} + Param(const Type &value) : value_(value) {} template - const Type& as(const Type& defaultValue) const { + const Type &as(const Type &defaultValue) const { try { - return boost::any_cast(value_); - } - catch (const boost::bad_any_cast & ex) - { + return boost::any_cast(value_); + } catch (const boost::bad_any_cast &ex) { #ifndef NDEBUG std::cerr << ex.what() << std::endl; #endif @@ -62,71 +56,64 @@ //! \throws boost::::bad_any_cast template - const Type& as() const { - return boost::any_cast(value_); + const Type &as() const { + return boost::any_cast(value_); } - operator const boost::any& () const { - return value_; - } + operator const boost::any &() const { return value_; } -private: + private: boost::any value_; }; - -class Params -{ -public: - typedef std::map< std::string, Param, utils::StringUnsensitiveComp > ParamsHolder; +class Params { + public: + typedef std::map + ParamsHolder; typedef ParamsHolder::iterator iterator; typedef ParamsHolder::const_iterator const_iterator; //! \brief empty parameters holder ctor - Params() - : holder_() {} + Params() : holder_() {} //! \brief copy ctor - Params(const ParamsHolder& params) - : holder_(params) {} + Params(const ParamsHolder ¶ms) : holder_(params) {} //! \brief single key,value pair ctor - Params(const std::string& key, const Param& value) - : holder_() - { set(key, value); } + Params(const std::string &key, const Param &value) : holder_() { + set(key, value); + } // pfs::Params()(key, value)(key, value)( ... ) // or // pfs::Params(key, value)(key, value)( ... ) - Params& operator()(const std::string& key, const Param& value) { + Params &operator()(const std::string &key, const Param &value) { return set(key, value); } - Params& set(const std::string& key, const Param& value) { + Params &set(const std::string &key, const Param &value) { holder_[key] = value; return *this; } - ParamsHolder::size_type count(const std::string& key) const { + ParamsHolder::size_type count(const std::string &key) const { return holder_.count(key); } template - bool get(const std::string& key, Type& value) const { + bool get(const std::string &key, Type &value) const { ParamsHolder::const_iterator it = holder_.find(key); - if ( it == holder_.end() ) { + if (it == holder_.end()) { return false; } try { value = it->second.as(); return true; - } catch ( boost::bad_any_cast& ex ) { + } catch (boost::bad_any_cast &ex) { return false; } } - operator const ParamsHolder& () { - return holder_; - } + operator const ParamsHolder &() { return holder_; } iterator begin() { return holder_.begin(); } iterator end() { return holder_.end(); } @@ -134,10 +121,10 @@ const_iterator begin() const { return holder_.begin(); } const_iterator end() const { return holder_.end(); } -private: + private: ParamsHolder holder_; }; -} // pfs +} // pfs -#endif // LIBPFS_PARAMS_H +#endif // LIBPFS_PARAMS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/pfs.h luminance-hdr-2.6.0/src/Libpfs/pfs.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/pfs.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/pfs.h 2019-06-09 19:18:38.000000000 +0000 @@ -54,10 +54,6 @@ /** * All classes and function from PFS library reside in pfs namespace. */ -namespace pfs -{ - - -} +namespace pfs {} #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/progress.cpp luminance-hdr-2.6.0/src/Libpfs/progress.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/progress.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/progress.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,60 +24,29 @@ #include "progress.h" -namespace pfs -{ +namespace pfs { Progress::Progress() - : m_maximum(0) - , m_minimum(0) - , m_value(0) - , m_canceled(false) -{} - -void Progress::setMaximum(int maximum) -{ - m_maximum = maximum; -} + : m_maximum(0), m_minimum(0), m_value(0), m_canceled(false) {} -void Progress::setMinimum(int minimum) -{ - m_minimum = minimum; -} +void Progress::setMaximum(int maximum) { m_maximum = maximum; } + +void Progress::setMinimum(int minimum) { m_minimum = minimum; } -void Progress::setRange(int minimum, int maximum) -{ +void Progress::setRange(int minimum, int maximum) { setMinimum(minimum); setMaximum(maximum); } -int Progress::maximum() const -{ - return m_maximum; -} -int Progress::minimum() const -{ - return m_minimum; -} +int Progress::maximum() const { return m_maximum; } +int Progress::minimum() const { return m_minimum; } -void Progress::setValue(int value) -{ - m_value = value; -} +void Progress::setValue(int value) { m_value = value; } // int Progress::next(); -int Progress::value() const -{ - return m_value; -} - -void Progress::cancel(bool b) -{ - m_canceled = b; -} -bool Progress::canceled() const -{ - return m_canceled; -} +int Progress::value() const { return m_value; } +void Progress::cancel(bool b) { m_canceled = b; } +bool Progress::canceled() const { return m_canceled; } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/progress.h luminance-hdr-2.6.0/src/Libpfs/progress.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/progress.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/progress.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,8 +25,7 @@ #ifndef LIBPFS_PROGRESS_H #define LIBPFS_PROGRESS_H -namespace pfs -{ +namespace pfs { //! \brief This class is a virtual interface for a status callback. It allows //! to decouple the interface from the actual implementation (which can be, for @@ -34,9 +33,8 @@ //! \note All the functions have an empty implementation, so it not necessary //! to pass a concrete instance to routine that require the presence of this //! class -class Progress -{ -public: +class Progress { + public: Progress(); //! \brief virtual dtor, enable derivation @@ -61,7 +59,7 @@ virtual void cancel(bool b = true); virtual bool canceled() const; -private: + private: int m_maximum; int m_minimum; @@ -69,7 +67,6 @@ bool m_canceled; }; - } -#endif // LIBPFS_PROGRESS_H +#endif // LIBPFS_PROGRESS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/rt_algo.cpp luminance-hdr-2.6.0/src/Libpfs/rt_algo.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/rt_algo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/rt_algo.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,185 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on 29 March 2018 + * + * Copyright (c) Ingo Weyrich +*/ + +#include +#include +#include +#include +#include + +#ifdef _OPENMP +#include +#endif + +#include "rt_algo.h" +#include "rt_math.h" + +namespace lhdrengine +{ + +void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multithread) +{ + // Copyright (c) 2017 Ingo Weyrich + // We need to find the (minPrct*size) smallest value and the (maxPrct*size) smallest value in data. + // We use a histogram based search for speed and to reduce memory usage. + // Memory usage of this method is histoSize * sizeof(uint32_t) * (t + 1) byte, + // where t is the number of threads and histoSize is in [1;65536]. + // Processing time is O(n) where n is size of the input array. + // It scales well with multiple threads if the size of the input array is large. + // The current implementation is not guaranteed to work correctly if size > 2^32 (4294967296). + + assert(minPrct <= maxPrct); + + if (size == 0) { + return; + } + + size_t numThreads = 1; +#ifdef _OPENMP + // Because we have an overhead in the critical region of the main loop for each thread + // we make a rough calculation to reduce the number of threads for small data size. + // This also works fine for the minmax loop. + if (multithread) { + const size_t maxThreads = omp_get_max_threads(); + while (size > numThreads * numThreads * 16384 && numThreads < maxThreads) { + ++numThreads; + } + } +#endif + + // We need min and max value of data to calculate the scale factor for the histogram + float minVal = data[0]; + float maxVal = data[0]; +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minVal) reduction(max:maxVal) num_threads(numThreads) +#endif + for (size_t i = 1; i < size; ++i) { + minVal = std::min(minVal, data[i]); + maxVal = std::max(maxVal, data[i]); + } + + if (std::fabs(maxVal - minVal) == 0.f) { // fast exit, also avoids division by zero in calculation of scale factor + minOut = maxOut = minVal; + return; + } + + // Caution: Currently this works correctly only for histoSize in range[1;65536]. + // For small data size (i.e. thumbnails) we reduce the size of the histogram to the size of data. + const unsigned int histoSize = std::min(65536, size); + + // calculate scale factor to use full range of histogram + const float scale = (histoSize - 1) / (maxVal - minVal); + + // We need one main histogram + std::vector histo(histoSize, 0); + + if (numThreads == 1) { + // just one thread => use main histogram + for (size_t i = 0; i < size; ++i) { + // we have to subtract minVal and multiply with scale to get the data in [0;histosize] range + histo[static_cast(scale * (data[i] - minVal))]++; + } + } else { +#ifdef _OPENMP + #pragma omp parallel num_threads(numThreads) +#endif + { + // We need one histogram per thread + std::vector histothr(histoSize, 0); + +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t i = 0; i < size; ++i) { + // we have to subtract minVal and multiply with scale to get the data in [0;histosize] range + histothr[static_cast(scale * (data[i] - minVal))]++; + } + +#ifdef _OPENMP + #pragma omp critical +#endif + { + // add per thread histogram to main histogram +#ifdef _OPENMP + #pragma omp simd +#endif + + for (size_t i = 0; i < histoSize; ++i) { + histo[i] += histothr[i]; + } + } + } + } + + size_t k = 0; + size_t count = 0; + + // find (minPrct*size) smallest value + const float threshmin = minPrct * size; + while (count < threshmin) { + count += histo[k++]; + } + + if (k > 0) { // interpolate + const size_t count_ = count - histo[k - 1]; + const float c0 = count - threshmin; + const float c1 = threshmin - count_; + minOut = (c1 * k + c0 * (k - 1)) / (c0 + c1); + } else { + minOut = k; + } + // go back to original range + minOut /= scale; + minOut += minVal; + minOut = lhdrengine::LIM(minOut, minVal, maxVal); + + // find (maxPrct*size) smallest value + const float threshmax = maxPrct * size; + while (count < threshmax) { + count += histo[k++]; + } + + if (k > 0) { // interpolate + const size_t count_ = count - histo[k - 1]; + const float c0 = count - threshmax; + const float c1 = threshmax - count_; + maxOut = (c1 * k + c0 * (k - 1)) / (c0 + c1); + } else { + maxOut = k; + } + // go back to original range + maxOut /= scale; + maxOut += minVal; + maxOut = lhdrengine::LIM(maxOut, minVal, maxVal); +} + +float accumulate(const float *array, size_t size, bool multithread) { + double summation = 0.0; // use double precision for summations +#ifdef _OPENMP + #pragma omp parallel for reduction(+:summation) if(multithread) +#endif + for (size_t i = 0; i < size; ++i) { + summation += array[i]; + } + return summation; +} + +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/rt_algo.h luminance-hdr-2.6.0/src/Libpfs/rt_algo.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/rt_algo.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/rt_algo.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on 29 March 2018 + * + * Copyright (c) Ingo Weyrich +*/ + +#pragma once + +#include + +namespace lhdrengine +{ + +void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multiThread = true); +float accumulate(const float *array, size_t size, bool multithread = true); + +} diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/strideiterator.h luminance-hdr-2.6.0/src/Libpfs/strideiterator.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/strideiterator.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/strideiterator.h 2019-06-09 19:18:38.000000000 +0000 @@ -22,8 +22,8 @@ #ifndef PFS_STRIDE_ITERATOR_H #define PFS_STRIDE_ITERATOR_H -#include #include +#include namespace pfs { @@ -33,34 +33,32 @@ //! \ref http://zotu.blogspot.co.uk/2010/01/creating-random-access-iterator.html template class StrideIterator - : public std::iterator< std::random_access_iterator_tag, IterType> -{ -public: + : public std::iterator { + public: // public typedefs typedef StrideIterator self; - typedef typename std::iterator< std::random_access_iterator_tag, IterType> iterator_base; + typedef typename std::iterator + iterator_base; typedef typename std::random_access_iterator_tag iterator_category; typedef typename std::iterator_traits::value_type value_type; typedef typename std::iterator_traits::reference reference; - typedef typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::difference_type + difference_type; typedef typename std::iterator_traits::pointer pointer; // ctors - StrideIterator() - : m_data(), m_step() - {} - StrideIterator(const self& rhs) - : m_data(rhs.m_data), m_step(rhs.m_step) - {} + StrideIterator() : m_data(), m_step() {} + StrideIterator(const self &rhs) : m_data(rhs.m_data), m_step(rhs.m_step) {} StrideIterator(IterType x, difference_type step) - : m_data(x), m_step(step) - {} + : m_data(x), m_step(step) {} // operators //! \brief Prefix increment - self& operator++() - { m_data += m_step; return *this; } + self &operator++() { + m_data += m_step; + return *this; + } //! \brief Postfix increment self operator++(int) { @@ -70,18 +68,21 @@ } //! \brief Increment - self& operator+=(const difference_type& n) { + self &operator+=(const difference_type &n) { m_data += (n * m_step); return *this; } //! \brief Sum - self operator+(const difference_type& n) const - { return self(m_data + n*m_step, m_step); } + self operator+(const difference_type &n) const { + return self(m_data + n * m_step, m_step); + } //! \brief Prefix decrement - self& operator--() - { m_data -= m_step; return *this; } + self &operator--() { + m_data -= m_step; + return *this; + } //! \brief Postfix decrement self operator--(int) { @@ -91,108 +92,120 @@ } //! \brief Decrement - self& operator-=(const difference_type& n) { + self &operator-=(const difference_type &n) { m_data -= (n * m_step); return *this; } //! \brief Difference - self operator-(const difference_type& n) const - { return self(m_data - n*m_step, m_step); } + self operator-(const difference_type &n) const { + return self(m_data - n * m_step, m_step); + } //! \brief dereferencing - reference operator*() const - { return *m_data; } + reference operator*() const { return *m_data; } //! \brief pointer - pointer operator->() const - { return m_data; } + pointer operator->() const { return m_data; } //! \brief subscription - reference operator[](const difference_type& n) - { return m_data[n * m_step]; } + reference operator[](const difference_type &n) { + return m_data[n * m_step]; + } // friend operators template - friend bool operator==(const StrideIterator& x, const StrideIterator& y); + friend bool operator==(const StrideIterator &x, + const StrideIterator &y); template - friend bool operator!=(const StrideIterator& x, const StrideIterator& y); + friend bool operator!=(const StrideIterator &x, + const StrideIterator &y); template - friend bool operator<(const StrideIterator& x, const StrideIterator& y); + friend bool operator<(const StrideIterator &x, + const StrideIterator &y); template - friend bool operator<=(const StrideIterator& x, const StrideIterator& y); + friend bool operator<=(const StrideIterator &x, + const StrideIterator &y); template - friend bool operator>(const StrideIterator& x, const StrideIterator& y); + friend bool operator>(const StrideIterator &x, + const StrideIterator &y); template - friend bool operator>=(const StrideIterator& x, const StrideIterator& y); + friend bool operator>=(const StrideIterator &x, + const StrideIterator &y); template friend typename StrideIterator::difference_type operator+( - const StrideIterator& x, const StrideIterator& y); + const StrideIterator &x, const StrideIterator &y); template friend typename StrideIterator::difference_type operator-( - const StrideIterator& x, const StrideIterator& y); + const StrideIterator &x, const StrideIterator &y); -private: + private: IterType m_data; difference_type m_step; }; template -inline bool operator==(const StrideIterator& x, const StrideIterator& y) { +inline bool operator==(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data == y.m_data); } template -inline bool operator!=(const StrideIterator& x, const StrideIterator& y) { +inline bool operator!=(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data != y.m_data); } template -inline bool operator<(const StrideIterator& x, const StrideIterator& y) { +inline bool operator<(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data < y.m_data); } template -inline bool operator<=(const StrideIterator& x, const StrideIterator& y) { +inline bool operator<=(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data <= y.m_data); } template -inline bool operator>(const StrideIterator& x, const StrideIterator& y) { +inline bool operator>(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data > y.m_data); } template -inline bool operator>=(const StrideIterator& x, const StrideIterator& y) { +inline bool operator>=(const StrideIterator &x, + const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data >= y.m_data); } template inline typename StrideIterator::difference_type operator+( - const StrideIterator& x, const StrideIterator& y) { + const StrideIterator &x, const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data + y.m_data) / x.m_step; } template inline typename StrideIterator::difference_type operator-( - const StrideIterator& x, const StrideIterator& y) { + const StrideIterator &x, const StrideIterator &y) { assert(x.m_step == y.m_step); return (x.m_data - y.m_data) / x.m_step; } -} // pfs +} // pfs -#endif // PFS_STRIDE_ITERATOR_H +#endif // PFS_STRIDE_ITERATOR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/tag.cpp luminance-hdr-2.6.0/src/Libpfs/tag.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/tag.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/tag.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,39 +25,33 @@ * @author Davide Anastasia */ -#include #include +#include -#include -#include #include +#include #include +#include using namespace std; -namespace pfs -{ +namespace pfs { -std::string TagContainer::getTag(const string &tagName) const -{ +std::string TagContainer::getTag(const string &tagName) const { TagList::const_iterator it = m_tags.find(tagName); - if ( it != m_tags.end() ) - return it->second; + if (it != m_tags.end()) return it->second; return std::string(); } -void TagContainer::removeTag(const std::string& tagName) -{ +void TagContainer::removeTag(const std::string &tagName) { m_tags.erase(tagName); } -void TagContainer::setTag(const string &tagName, const string &tagValue) -{ +void TagContainer::setTag(const string &tagName, const string &tagValue) { m_tags[tagName] = tagValue; } -std::ostream& operator<<(std::ostream& out, const TagContainer& tags) -{ +std::ostream &operator<<(std::ostream &out, const TagContainer &tags) { if (tags.size() == 0) return out; TagContainer::const_iterator itEnd = tags.end(); @@ -66,39 +60,33 @@ std::stringstream ss; - for ( ; it != itEnd; ++it) - { + for (; it != itEnd; ++it) { ss << it->first << "=" << it->second << " "; } ss << it->first << "=" << it->second; return (out << ss.str()); } -void copyTags(const TagContainer& f, TagContainer& t) -{ +void copyTags(const TagContainer &f, TagContainer &t) { t.clear(); t = f; } -void copyTags(const Frame *from, Frame *to) -{ - copyTags( from->getTags(), to->getTags() ); +void copyTags(const Frame *from, Frame *to) { + copyTags(from->getTags(), to->getTags()); - const ChannelContainer& channels = from->getChannels(); + const ChannelContainer &channels = from->getChannels(); for (ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); - ++it) - { + it != channels.end(); ++it) { const pfs::Channel *fromCh = *it; - pfs::Channel *toCh = to->getChannel( fromCh->getName() ); + pfs::Channel *toCh = to->getChannel(fromCh->getName()); // Skip if there is no corresponding channel - if ( toCh != NULL ) - { + if (toCh != NULL) { copyTags(fromCh->getTags(), toCh->getTags()); } } } -} // pfs +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/tag.h luminance-hdr-2.6.0/src/Libpfs/tag.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/tag.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/tag.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,61 +31,51 @@ #include #include -namespace pfs -{ +namespace pfs { class Frame; -class TagContainer -{ -public: +class TagContainer { + public: typedef std::map TagList; - TagContainer() - : m_tags() - {} + TagContainer() : m_tags() {} - size_t size() const - { return m_tags.size(); } + size_t size() const { return m_tags.size(); } //! \brief Set or add a string tagValue of the name tagName. //! \param tagName name of the tag to add or set //! \param tagValue value of the tag - void setTag(const std::string& tagName, const std::string& tagValue); + void setTag(const std::string &tagName, const std::string &tagValue); //! \brief Get a string tag of the name tagName from the TagContainer. //! \param tagName name of the tag to retrieve //! \return tag value or empty string if tag was not found - std::string getTag(const std::string& tagName) const; + std::string getTag(const std::string &tagName) const; - //! \brief Removes (if exists) a tag of the name tagName from the TagContainer. + //! \brief Removes (if exists) a tag of the name tagName from the + //! TagContainer. //! \param tagName name of the tag to remove - void removeTag(const std::string& tagName); + void removeTag(const std::string &tagName); - void clear() - { m_tags.clear(); } + void clear() { m_tags.clear(); } - void swap(TagContainer& other) - { m_tags.swap( other.m_tags ); } + void swap(TagContainer &other) { m_tags.swap(other.m_tags); } // iterators typedef TagList::iterator iterator; typedef TagList::const_iterator const_iterator; - iterator begin() - { return m_tags.begin(); } - iterator end() - { return m_tags.end(); } - - const_iterator begin() const - { return m_tags.begin(); } - const_iterator end() const - { return m_tags.end(); } + iterator begin() { return m_tags.begin(); } + iterator end() { return m_tags.end(); } -private: + const_iterator begin() const { return m_tags.begin(); } + const_iterator end() const { return m_tags.end(); } + + private: TagList m_tags; }; -std::ostream& operator<<(std::ostream& out, const TagContainer& tags); +std::ostream &operator<<(std::ostream &out, const TagContainer &tags); //! Copy all tags from both the frame and its channels to the //! destination frame. If there is no corresponding destination @@ -100,10 +90,8 @@ //! tags in the destination channel will be removed before //! copying. Therefore after this operation, the destination will //! contain exactly the same tags as the source. -void copyTags(const TagContainer& from, TagContainer& to); - -} // pfs - -#endif // PFS_TAG_H +void copyTags(const TagContainer &from, TagContainer &to); +} // pfs +#endif // PFS_TAG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/tm/TonemapOperator.cpp luminance-hdr-2.6.0/src/Libpfs/tm/TonemapOperator.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/tm/TonemapOperator.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/tm/TonemapOperator.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,333 +23,365 @@ * @author Giuseppe Rota * Improvements, bugfixing * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread + * Refactory of TMThread.h class to TonemapOperator in order to remove + * dependency from QObject and QThread * @author Davide Anastasia * * */ -#include #include #include +#include #include "TonemappingOperators/pfstmo.h" -#include "Libpfs/frame.h" #include "Libpfs/channel.h" #include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" #include "Libpfs/tm/TonemapOperator.h" using namespace boost::assign; template -struct TonemapOperatorRegister : public TonemapOperator -{ - static TonemapOperator* create() - { - return new ConcreteClass(); - } +struct TonemapOperatorRegister : public TonemapOperator { + static TonemapOperator *create() { return new ConcreteClass(); } - TMOperator getType() const - { - return Key; - } + TMOperator getType() const { return Key; } }; class TonemapOperatorMantiuk06 - : public TonemapOperatorRegister -{ -public: - void tonemapFrame(pfs::Frame& workingFrame, TonemappingOptions* opts, pfs::Progress& ph) - { - ph.setMaximum(100); - - try - { - pfstmo_mantiuk06(workingFrame, - opts->operator_options.mantiuk06options.contrastfactor, - opts->operator_options.mantiuk06options.saturationfactor, - opts->operator_options.mantiuk06options.detailfactor, - opts->operator_options.mantiuk06options.contrastequalization, - ph); - } - catch (...) - { - throw std::runtime_error("Tonemap Failed"); + : public TonemapOperatorRegister { + public: + void tonemapFrame(pfs::Frame &workingFrame, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); + + try { + pfstmo_mantiuk06( + workingFrame, + opts->operator_options.mantiuk06options.contrastfactor, + opts->operator_options.mantiuk06options.saturationfactor, + opts->operator_options.mantiuk06options.detailfactor, + opts->operator_options.mantiuk06options.contrastequalization, + ph); + } catch (...) { + throw std::runtime_error("Mantiuk06: Tonemap Failed"); } } - }; struct TonemapOperatorMantiuk08 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); // Convert to CS_XYZ: tm operator now use this colorspace pfs::Channel *X, *Y, *Z; - workingframe.getXYZChannels( X, Y, Z ); - pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, - pfs::CS_XYZ, X, Y, Z); - - pfstmo_mantiuk08(workingframe, - opts->operator_options.mantiuk08options.colorsaturation, - opts->operator_options.mantiuk08options.contrastenhancement, - opts->operator_options.mantiuk08options.luminancelevel, - opts->operator_options.mantiuk08options.setluminance, - ph); + workingframe.getXYZChannels(X, Y, Z); + pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, pfs::CS_XYZ, X, Y, Z); + + try { + pfstmo_mantiuk08( + workingframe, + opts->operator_options.mantiuk08options.colorsaturation, + opts->operator_options.mantiuk08options.contrastenhancement, + opts->operator_options.mantiuk08options.luminancelevel, + opts->operator_options.mantiuk08options.setluminance, ph); + } catch (...) { + throw std::runtime_error("Mantiuk08: Tonemap Failed"); + } - pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, - pfs::CS_RGB, X, Y, Z); + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, X, Y, Z); } }; struct TonemapOperatorFattal02 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); int detail_level = 0; if (opts->xsize > 0) { float ratio = (float)opts->origxsize / (float)opts->xsize; - if ( ratio < 2 ) + if (ratio < 2) detail_level = 3; - else if ( ratio < 4 ) + else if (ratio < 4) detail_level = 2; - else if ( ratio < 8 ) + else if (ratio < 8) detail_level = 1; else detail_level = 0; - } - else + } else detail_level = 3; - pfstmo_fattal02(workingframe, - opts->operator_options.fattaloptions.alpha, - opts->operator_options.fattaloptions.beta, - opts->operator_options.fattaloptions.color, - opts->operator_options.fattaloptions.noiseredux, - opts->operator_options.fattaloptions.newfattal, - opts->operator_options.fattaloptions.fftsolver, - detail_level, - ph); + try { + pfstmo_fattal02(workingframe, + opts->operator_options.fattaloptions.alpha, + opts->operator_options.fattaloptions.beta, + opts->operator_options.fattaloptions.color, + opts->operator_options.fattaloptions.noiseredux, + opts->operator_options.fattaloptions.newfattal, + opts->operator_options.fattaloptions.fftsolver, + detail_level, ph); + } catch (...) { + throw std::runtime_error("Fattal: Tonemap Failed"); + } } }; struct TonemapOperatorFerradans11 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); - m_mutex.lock(); - pfstmo_ferradans11(workingframe, - opts->operator_options.ferradansoptions.rho, - opts->operator_options.ferradansoptions.inv_alpha, - ph); - m_mutex.unlock(); + try { + pfstmo_ferradans11( + workingframe, opts->operator_options.ferradansoptions.rho, + opts->operator_options.ferradansoptions.inv_alpha, ph); + } catch (...) { + throw std::runtime_error("Ferradans: Tonemap Failed"); + } } - -private: - static boost::mutex m_mutex; }; -boost::mutex TonemapOperatorFerradans11::m_mutex; - struct TonemapOperatorMai11 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); - pfstmo_mai11(workingframe, ph); + try { + pfstmo_mai11(workingframe, ph); + } catch (...) { + throw std::runtime_error("Mai: Tonemap Failed"); + } } }; struct TonemapOperatorDrago03 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { - ph.setMaximum(100); // this guy should not be here! - - pfstmo_drago03(workingframe, - opts->operator_options.dragooptions.bias, - ph); + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); // this guy should not be here! + + try { + pfstmo_drago03(workingframe, + opts->operator_options.dragooptions.bias, ph); + } catch (...) { + throw std::runtime_error("Drago: Tonemap Failed"); + } } }; class TonemapOperatorDurand02 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); - // pfstmo_durand02 not reentrant - m_mutex.lock(); - try - { + try { pfstmo_durand02(workingframe, opts->operator_options.durandoptions.spatial, opts->operator_options.durandoptions.range, - opts->operator_options.durandoptions.base, - ph); - } - catch (...) - { - m_mutex.unlock(); - throw std::runtime_error("Tonemap Failed"); + opts->operator_options.durandoptions.base, ph); + } catch (...) { + throw std::runtime_error("Durand: Tonemap Failed"); } - m_mutex.unlock(); } - -private: - static boost::mutex m_mutex; }; -boost::mutex TonemapOperatorDurand02::m_mutex; - - struct TonemapOperatorReinhard02 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); // Convert to CS_XYZ: tm operator now use this colorspace pfs::Channel *X, *Y, *Z; - workingframe.getXYZChannels( X, Y, Z ); - pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, - pfs::CS_XYZ, X, Y, Z); + workingframe.getXYZChannels(X, Y, Z); + pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, pfs::CS_XYZ, X, Y, Z); - m_mutex.lock(); try { - pfstmo_reinhard02(workingframe, - opts->operator_options.reinhard02options.key, - opts->operator_options.reinhard02options.phi, - opts->operator_options.reinhard02options.range, - opts->operator_options.reinhard02options.lower, - opts->operator_options.reinhard02options.upper, - opts->operator_options.reinhard02options.scales, - ph); - } - catch (...) { - m_mutex.unlock(); - throw std::runtime_error("Tonemap Failed"); + pfstmo_reinhard02( + workingframe, opts->operator_options.reinhard02options.key, + opts->operator_options.reinhard02options.phi, + opts->operator_options.reinhard02options.range, + opts->operator_options.reinhard02options.lower, + opts->operator_options.reinhard02options.upper, + opts->operator_options.reinhard02options.scales, ph); + } catch (...) { + throw std::runtime_error("Reinhard02: Tonemap Failed"); } - m_mutex.unlock(); - pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, - pfs::CS_SRGB, X, Y, Z); + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, X, Y, Z); } - -private: - static boost::mutex m_mutex; }; -boost::mutex TonemapOperatorReinhard02::m_mutex; - struct TonemapOperatorReinhard05 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); - pfstmo_reinhard05(workingframe, - opts->operator_options.reinhard05options.brightness, - opts->operator_options.reinhard05options.chromaticAdaptation, - opts->operator_options.reinhard05options.lightAdaptation, - ph); + try { + pfstmo_reinhard05( + workingframe, + opts->operator_options.reinhard05options.brightness, + opts->operator_options.reinhard05options.chromaticAdaptation, + opts->operator_options.reinhard05options.lightAdaptation, ph); + } catch (...) { + throw std::runtime_error("Reinhard05: Tonemap Failed"); + } } }; struct TonemapOperatorAshikhmin02 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); - pfstmo_ashikhmin02(workingframe, - opts->operator_options.ashikhminoptions.simple, - opts->operator_options.ashikhminoptions.lct, - (opts->operator_options.ashikhminoptions.eq2 ? 2 : 4), - ph); + try { + pfstmo_ashikhmin02( + workingframe, opts->operator_options.ashikhminoptions.simple, + opts->operator_options.ashikhminoptions.lct, + (opts->operator_options.ashikhminoptions.eq2 ? 2 : 4), ph); + } catch (...) { + throw std::runtime_error("Ashikhmin: Tonemap Failed"); + } } }; struct TonemapOperatorPattanaik00 - : public TonemapOperatorRegister -{ - void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) - { + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { ph.setMaximum(100); // Convert to CS_XYZ: tm operator now use this colorspace pfs::Channel *X, *Y, *Z; - workingframe.getXYZChannels( X, Y, Z ); - pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, - pfs::CS_XYZ, X, Y, Z); + workingframe.getXYZChannels(X, Y, Z); + pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, pfs::CS_XYZ, X, Y, Z); - pfstmo_pattanaik00(workingframe, - opts->operator_options.pattanaikoptions.local, - opts->operator_options.pattanaikoptions.multiplier, - opts->operator_options.pattanaikoptions.cone*1000, - opts->operator_options.pattanaikoptions.rod*1000, - opts->operator_options.pattanaikoptions.autolum, - ph); + try { + pfstmo_pattanaik00( + workingframe, opts->operator_options.pattanaikoptions.local, + opts->operator_options.pattanaikoptions.multiplier, + opts->operator_options.pattanaikoptions.cone, // * 1000, + opts->operator_options.pattanaikoptions.rod, // * 1000, + opts->operator_options.pattanaikoptions.autolum, ph); + } catch (...) { + throw std::runtime_error("Pattanaik: Tonemap Failed"); + } + + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, X, Y, Z); + } +}; +struct TonemapOperatorFerwerda96 + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); + + try { + pfstmo_ferwerda96( + workingframe, opts->operator_options.ferwerdaoptions.multiplier, + opts->operator_options.ferwerdaoptions.adaptationluminance, + ph); + } catch (...) { + throw std::runtime_error("Ferwerda: Tonemap Failed"); + } + } +}; + +struct TonemapOperatorKimKautz08 + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); - pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, - pfs::CS_RGB, X, Y, Z); + try { + pfstmo_kimkautz08( + workingframe, + opts->operator_options.kimkautzoptions.c1, + opts->operator_options.kimkautzoptions.c2, + ph); + } catch (...) { + throw std::runtime_error("KimKautz: Tonemap Failed"); + } + } +}; + +struct TonemapOperatorVanHateren06 + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); + + try { + pfstmo_vanhateren06( + workingframe, + opts->operator_options.vanhaterenoptions.pupil_area, + ph); + } catch (...) { + throw std::runtime_error("VanHateren: Tonemap Failed"); + } + } +}; + +struct TonemapOperatorLischinski06 + : public TonemapOperatorRegister { + void tonemapFrame(pfs::Frame &workingframe, TonemappingOptions *opts, + pfs::Progress &ph) { + ph.setMaximum(100); + + try { + pfstmo_lischinski06( + workingframe, opts->operator_options.lischinskioptions.alpha, + ph); + } catch (...) { + throw std::runtime_error("Lischinski: Tonemap Failed"); + } } }; -typedef TonemapOperator* (*TonemapOperatorCreator)(); +typedef TonemapOperator *(*TonemapOperatorCreator)(); typedef std::map TonemapOperatorCreatorMap; -inline -const TonemapOperatorCreatorMap& registry() -{ - static TonemapOperatorCreatorMap reg = - map_list_of - // XYZ -> * - (mantiuk06, TonemapOperatorRegister::create) - (mantiuk08, TonemapOperatorRegister::create) - (fattal, TonemapOperatorRegister::create) - (ferradans, TonemapOperatorRegister::create) - (mai, TonemapOperatorRegister::create) - (drago, TonemapOperatorRegister::create) - (durand, TonemapOperatorRegister::create) - (reinhard02, TonemapOperatorRegister::create) - (reinhard05, TonemapOperatorRegister::create) - (ashikhmin, TonemapOperatorRegister::create) - (pattanaik, TonemapOperatorRegister::create) - ; +inline const TonemapOperatorCreatorMap ®istry() { + static TonemapOperatorCreatorMap reg = map_list_of + // XYZ -> * + (mantiuk06, TonemapOperatorRegister::create) + (mantiuk08, TonemapOperatorRegister::create) + (fattal, TonemapOperatorRegister::create) + (ferradans, TonemapOperatorRegister::create) + (mai, TonemapOperatorRegister::create) + (drago, TonemapOperatorRegister::create) + (durand, TonemapOperatorRegister::create) + (reinhard02, TonemapOperatorRegister::create) + (reinhard05, TonemapOperatorRegister::create) + (ashikhmin, TonemapOperatorRegister::create) + (pattanaik, TonemapOperatorRegister::create) + (ferwerda, TonemapOperatorRegister::create) + (kimkautz, TonemapOperatorRegister::create) + (vanhateren, TonemapOperatorRegister::create) + (lischinski, TonemapOperatorRegister::create); return reg; } -TonemapOperator::TonemapOperator() -{} +TonemapOperator::TonemapOperator() {} -TonemapOperator::~TonemapOperator() -{} +TonemapOperator::~TonemapOperator() {} -TonemapOperator* TonemapOperator::getTonemapOperator(const TMOperator tmo) -{ +TonemapOperator *TonemapOperator::getTonemapOperator(const TMOperator tmo) { TonemapOperatorCreatorMap::const_iterator it = registry().find(tmo); - if ( it != registry().end() ) - { + if (it != registry().end()) { return (it->second)(); } throw std::runtime_error("Invalid TMOperator"); diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/tm/TonemapOperator.h luminance-hdr-2.6.0/src/Libpfs/tm/TonemapOperator.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/tm/TonemapOperator.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/tm/TonemapOperator.h 2019-06-09 19:18:38.000000000 +0000 @@ -23,7 +23,8 @@ * @author Giuseppe Rota * Improvements, bugfixing * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread + * Refactory of TMThread.h class to TonemapOperator in order to remove + * dependency from QObject and QThread * @author Davide Anastasia * */ @@ -36,16 +37,14 @@ #include "Core/TonemappingOptions.h" // Forward declaration -namespace pfs -{ +namespace pfs { class Progress; class Frame; } -class TonemapOperator -{ -public: - static TonemapOperator* getTonemapOperator(const TMOperator tmo); +class TonemapOperator { + public: + static TonemapOperator *getTonemapOperator(const TMOperator tmo); virtual ~TonemapOperator(); //! @@ -58,10 +57,11 @@ //! \note input frame is MODIFIED //! If you want to keep the original frame, make a copy before //! - virtual void tonemapFrame(pfs::Frame&, TonemappingOptions*, pfs::Progress& ph) = 0; + virtual void tonemapFrame(pfs::Frame &, TonemappingOptions *, + pfs::Progress &ph) = 0; -protected: + protected: TonemapOperator(); }; -#endif // TONEMAPOPERATOR_H +#endif // TONEMAPOPERATOR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/chain.h luminance-hdr-2.6.0/src/Libpfs/utils/chain.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/chain.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/chain.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,50 +26,43 @@ namespace utils { template -struct Chain -{ +struct Chain { typedef Func1 F1; typedef Func2 F2; - Chain(const Func1& func1, const Func2& func2) - : func1_(func1) - , func2_(func2) - {} + Chain(const Func1 &func1, const Func2 &func2) + : func1_(func1), func2_(func2) {} template - void operator()(TypeIn v1, TypeIn v2, TypeIn v3, - TypeOut& o1, TypeOut& o2, TypeOut& o3) const - { + void operator()(TypeIn v1, TypeIn v2, TypeIn v3, TypeOut &o1, TypeOut &o2, + TypeOut &o3) const { func1_(v1, v2, v3, v1, v2, v3); func2_(v1, v2, v3, o1, o2, o3); } template - Type operator()(Type v1) const - { + Type operator()(Type v1) const { return func2_(func1_(v1)); } -private: + private: Func1 func1_; Func2 func2_; }; template -Chain chain(const Func1& func1, const Func2& func2) -{ +Chain chain(const Func1 &func1, const Func2 &func2) { return Chain(func1, func2); } template -Chain > chain(const Func1& func1, const Func2& func2, const Func3& func3) -{ - return Chain >(func1, Chain(func2, func3)); +Chain> chain(const Func1 &func1, const Func2 &func2, + const Func3 &func3) { + return Chain>(func1, + Chain(func2, func3)); } +} // utils +} // pfs -} // utils -} // pfs - - -#endif // PFS_UTILS_CHAIN_H +#endif // PFS_UTILS_CHAIN_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/clamp.h luminance-hdr-2.6.0/src/Libpfs/utils/clamp.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/clamp.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/clamp.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,29 +26,23 @@ namespace utils { template -struct Clamp -{ - Clamp(Type min, Type max) - : m_min(min) - , m_max(max) - {} +struct Clamp { + Clamp(Type min, Type max) : m_min(min), m_max(max) {} - Type operator()(Type in) const - { + Type operator()(Type in) const { if (in < m_min) return m_min; if (in > m_max) return m_max; return in; } - void operator()(Type i1, Type i2, Type i3, - Type& o1, Type& o2, Type& o3) const - { + void operator()(Type i1, Type i2, Type i3, Type &o1, Type &o2, + Type &o3) const { o1 = (*this)(i1); o2 = (*this)(i2); o3 = (*this)(i3); } -private: + private: Type m_min; Type m_max; }; @@ -58,7 +52,7 @@ // default float clamp between 0 and 1.f (very common) static const ClampF32 CLAMP_F32(0.f, 1.f); -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_UTILS_CLAMP_H +#endif // PFS_UTILS_CLAMP_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/dotproduct.h luminance-hdr-2.6.0/src/Libpfs/utils/dotproduct.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/dotproduct.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/dotproduct.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,17 +37,17 @@ //! output = \sum_{i=0}^{n}{v1[i] * v2[i]} // v1 . v2 template -_Type dotProduct(const _Type* v1, const _Type* v2, size_t N); +_Type dotProduct(const _Type *v1, const _Type *v2, size_t N); //! \brief Perform the dotProduct element-wise of the vector \c v1 //! output = \sum_{i=0}^{n}{v1[i] * v1[i]} //! \note this version is slightly more optimized of the binary version // v1 . v1 template -_Type dotProduct(const _Type* v1, size_t N); +_Type dotProduct(const _Type *v1, size_t N); -} // utils -} // pfs +} // utils +} // pfs #include -#endif // PFS_UTILS_DOTPRODUCT_H +#endif // PFS_UTILS_DOTPRODUCT_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/dotproduct.hxx luminance-hdr-2.6.0/src/Libpfs/utils/dotproduct.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/dotproduct.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/dotproduct.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -30,30 +30,26 @@ namespace utils { template -_Type dotProduct(const _Type* v1, const _Type* v2, size_t N) -{ +_Type dotProduct(const _Type *v1, const _Type *v2, size_t N) { double dotProd = _Type(); -#pragma omp parallel for reduction(+:dotProd) - for (int idx = 0; idx < static_cast(N); idx++) - { +#pragma omp parallel for reduction(+ : dotProd) + for (int idx = 0; idx < static_cast(N); idx++) { dotProd = dotProd + (v1[idx] * v2[idx]); } return static_cast<_Type>(dotProd); } template -_Type dotProduct(const _Type* v1, size_t N) -{ +_Type dotProduct(const _Type *v1, size_t N) { double dotProd = _Type(); -#pragma omp parallel for reduction(+:dotProd) - for (int idx = 0; idx < static_cast(N); idx++) - { +#pragma omp parallel for reduction(+ : dotProd) + for (int idx = 0; idx < static_cast(N); idx++) { dotProd = dotProd + (v1[idx] * v1[idx]); } return static_cast<_Type>(dotProd); } -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_UTILS_DOTPRODUCT_HXX +#endif // PFS_UTILS_DOTPRODUCT_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/minmax.h luminance-hdr-2.6.0/src/Libpfs/utils/minmax.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/minmax.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/minmax.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,18 +28,18 @@ namespace utils { template -_Type minElement(const _Type* data, size_t size); +_Type minElement(const _Type *data, size_t size); template -_Type maxElement(const _Type* data, size_t size); +_Type maxElement(const _Type *data, size_t size); //! \brief computes the maximum and the minumum between 3 samples using the //! least amount of compares template -void minmax(Type i1, Type i2, Type i3, Type& min, Type& max); +void minmax(Type i1, Type i2, Type i3, Type &min, Type &max); -} // utils -} // pfs +} // utils +} // pfs #include -#endif // PFS_UTILS_MINMAX_H +#endif // PFS_UTILS_MINMAX_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/minmax.hxx luminance-hdr-2.6.0/src/Libpfs/utils/minmax.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/minmax.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/minmax.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -30,26 +30,23 @@ namespace pfs { namespace utils { -template -_Type minElement(const _Type* vector, size_t vectorSize) -{ +template +_Type minElement(const _Type *vector, size_t vectorSize) { return *std::min_element(vector, vector + vectorSize); } -template -_Type maxElement(const _Type* vector, size_t vectorSize) -{ +template +_Type maxElement(const _Type *vector, size_t vectorSize) { return *std::max_element(vector, vector + vectorSize); } template -void minmax(Type i1, Type i2, Type i3, Type& min, Type& max) -{ - if ( i1 > i2 ) { - if ( i1 > i3 ) { +void minmax(Type i1, Type i2, Type i3, Type &min, Type &max) { + if (i1 > i2) { + if (i1 > i3) { // i1 > b and i1 > g max = i1; - if ( i3 > i2 ) { + if (i3 > i2) { min = i2; } else { min = i3; @@ -61,13 +58,13 @@ } } else { // i2 >= i1 - if ( i3 > i2 ) { + if (i3 > i2) { max = i3; min = i1; } else { // i2 >= i3 max = i2; - if ( i3 < i1 ) { + if (i3 < i1) { min = i3; } else { min = i1; @@ -76,7 +73,7 @@ } } -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_UTILS_MINMAX_HXX +#endif // PFS_UTILS_MINMAX_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/msec_timer.cpp luminance-hdr-2.6.0/src/Libpfs/utils/msec_timer.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/msec_timer.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/msec_timer.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,102 +25,97 @@ #include "msec_timer.h" -//costructor -msec_timer::msec_timer(): +// costructor +msec_timer::msec_timer() + : #ifdef WIN_TIMER -wrk_time(0.0) + wrk_time(0.0) #elif __APPLE__ -start_t(0), stop_t(0), wrk_time(0), conversion(1.0) + start_t(0), + stop_t(0), + wrk_time(0), + conversion(1.0) #else -wrk_time(0.0) + wrk_time(0.0) #endif { #ifdef WIN_TIMER - QueryPerformanceFrequency(&freq); + QueryPerformanceFrequency(&freq); #elif __APPLE__ - mach_timebase_info_data_t info; - kern_return_t err = mach_timebase_info( &info ); + mach_timebase_info_data_t info; + kern_return_t err = mach_timebase_info(&info); - //Convert the timebase into seconds - if ( err == 0 ) conversion = (1e-9 * (double) info.numer / (double) info.denom); + // Convert the timebase into seconds + if (err == 0) conversion = (1e-9 * (double)info.numer / (double)info.denom); #else #endif } -msec_timer::~msec_timer() // destructor +msec_timer::~msec_timer() // destructor { - // nothing to do + // nothing to do } -void msec_timer::start() -{ +void msec_timer::start() { #ifdef WIN_TIMER - QueryPerformanceCounter(&start_t); + QueryPerformanceCounter(&start_t); #elif __APPLE__ - start_t = mach_absolute_time(); + start_t = mach_absolute_time(); #else - gettimeofday(&start_t, NULL); + gettimeofday(&start_t, NULL); #endif } -void msec_timer::stop() -{ +void msec_timer::stop() { #ifdef WIN_TIMER - QueryPerformanceCounter(&stop_t); + QueryPerformanceCounter(&stop_t); #elif __APPLE__ - stop_t = mach_absolute_time(); + stop_t = mach_absolute_time(); #else - gettimeofday(&stop_t, NULL); + gettimeofday(&stop_t, NULL); #endif } -void msec_timer::update() -{ +void msec_timer::update() { #ifdef WIN_TIMER - wrk_time += ((double)(stop_t.QuadPart - start_t.QuadPart)); + wrk_time += ((double)(stop_t.QuadPart - start_t.QuadPart)); #elif __APPLE__ - wrk_time += stop_t - start_t; + wrk_time += stop_t - start_t; #else - wrk_time += (((stop_t.tv_sec - start_t.tv_sec)*1000.0) + (stop_t.tv_usec - start_t.tv_usec)/1000.0); + wrk_time += (((stop_t.tv_sec - start_t.tv_sec) * 1000.0) + + (stop_t.tv_usec - start_t.tv_usec) / 1000.0); #endif } -void msec_timer::stop_and_update() -{ - stop(); - update(); +void msec_timer::stop_and_update() { + stop(); + update(); } -void msec_timer::reset() -{ - wrk_time = 0.0; -} +void msec_timer::reset() { wrk_time = 0.0; } -double msec_timer::get_time() -{ +double msec_timer::get_time() { #ifdef WIN_TIMER - return (wrk_time * 1000.0 / freq.QuadPart); + return (wrk_time * 1000.0 / freq.QuadPart); #elif __APPLE__ - return (conversion * (double) wrk_time * 1000.0); + return (conversion * (double)wrk_time * 1000.0); #else - return wrk_time; + return wrk_time; #endif } -void msec_timer::get_timer_type() -{ +void msec_timer::get_timer_type() { #ifdef WIN_TIMER - printf(" QueryPerformanceCounter()\n"); + printf(" QueryPerformanceCounter()\n"); #elif __APPLE__ - printf(" mach_absolute_time()\n"); + printf(" mach_absolute_time()\n"); #else - // clock_gettime(3) - printf(" gettimeofday()\n"); + // clock_gettime(3) + printf(" gettimeofday()\n"); #endif } -double convert_to_gigaflops(double msec_time, double scale_factor) -{ - return ( (double)scale_factor / (msec_time*1000.0)); +double convert_to_gigaflops(double msec_time, double scale_factor) { + return ((double)scale_factor / (msec_time * 1000.0)); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/msec_timer.h luminance-hdr-2.6.0/src/Libpfs/utils/msec_timer.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/msec_timer.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/msec_timer.h 2019-06-09 19:18:38.000000000 +0000 @@ -43,47 +43,47 @@ // TIMER ----- #ifdef WIN_TIMER -#define _WINSOCKAPI_ // stops windows.h including winsock.h +#define _WINSOCKAPI_ // stops windows.h including winsock.h #include -#elif __APPLE__ -#include +#elif defined(__APPLE__) #include +#include #else //#include #include #endif class msec_timer { -private: + private: #ifdef WIN_TIMER - LARGE_INTEGER start_t; - LARGE_INTEGER stop_t; - double wrk_time; - LARGE_INTEGER freq; -#elif __APPLE__ - uint64_t start_t; - uint64_t stop_t; - uint64_t wrk_time; - double conversion; + LARGE_INTEGER start_t; + LARGE_INTEGER stop_t; + double wrk_time; + LARGE_INTEGER freq; +#elif defined(__APPLE__) + uint64_t start_t; + uint64_t stop_t; + uint64_t wrk_time; + double conversion; #else - timeval start_t; - timeval stop_t; - double wrk_time; + timeval start_t; + timeval stop_t; + double wrk_time; #endif -public: - msec_timer(); - ~msec_timer(); - void start(); - void stop(); - void update(); - void stop_and_update(); - void reset(); - double get_time(); + public: + msec_timer(); + ~msec_timer(); + void start(); + void stop(); + void update(); + void stop_and_update(); + void reset(); + double get_time(); - void get_timer_type(); + void get_timer_type(); }; double convert_to_gigaflops(double, double); -#endif // MSEC_TIMER_H +#endif // MSEC_TIMER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/numeric.h luminance-hdr-2.6.0/src/Libpfs/utils/numeric.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/numeric.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/numeric.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,9 +25,9 @@ //! \brief This file contains a series of extensions for vector operations //! \author Davide Anastasia +#include #include #include -#include namespace pfs { namespace utils { @@ -35,30 +35,44 @@ namespace numeric { //! \brief Extension of std::plus to compute A + s*B template -struct vadds -{ - vadds(const T& s) - : s_(s) {} - T - operator()(const T& t1, const T& t2) const - { return (t1 + (s_*t2)); } -private: +struct vadds { + vadds(const T &s) : s_(s) {} + T operator()(const T &t1, const T &t2) const { return (t1 + (s_ * t2)); } + + private: + T s_; +}; + +//! \brief Extension of std::plus to compute A + s +template +struct vsadd { + vsadd(const T &s) : s_(s) {} + T operator()(const T &t1) const { return (t1 + s_ ); } + + private: T s_; }; +//! \brief Extension of std::multiply to compute A * s +template +struct vsmul { + vsmul(const Ts &s) : s_(s) {} + T operator()(const T &t1) const { return (t1 * s_ ); } + + private: + Ts s_; +}; + //! \brief Extension of std::minus to compute A - s*B template -struct vsubs -{ - vsubs(const T& s) - : s_(s) {} - T - operator()(const T& t1, const T& t2) const - { return (t1 - (s_*t2)); } -private: +struct vsubs { + vsubs(const T &s) : s_(s) {} + T operator()(const T &t1, const T &t2) const { return (t1 - (s_ * t2)); } + + private: T s_; }; -} // numeric +} // numeric //! \brief multiplies element-wise \c A and \c B and stores into \c C //! C[i] = A[i] * B[i] @@ -68,53 +82,48 @@ //! \param[in] N size of the vectors //! \note caller is in charge of properly allocate all the vectors template -void vmul(const _Type* A, const _Type* B, _Type* C, size_t size); +void vmul(const _Type *A, const _Type *B, _Type *C, size_t size); //! \brief divides element-wise \c A and \c B and stores into \c C //! C[i] = A[i] / B[i] template -void vdiv(const _Type* A, const _Type* B, _Type* C, size_t size); - +void vdiv(const _Type *A, const _Type *B, _Type *C, size_t size); //! \brief sum element-wise \c A and \c B and stores into \c C //! C[i] = A[i] + B[i] template -void vadd(const _Type* A, const _Type* B, _Type* C, size_t size); +void vadd(const _Type *A, const _Type *B, _Type *C, size_t size); //! \brief sum element-wise \c s to \c A and stores into \c B //! B[i] = A[i] + s template -void vsadd(const _Type* A, const float s, _Type* B, size_t size); +void vsadd(const _Type *A, const _Type &s, _Type *B, size_t size); -//! \brief multiplies element-wise \c s and \c B, sum it to \c A and stores into \c C +//! \brief multiplies element-wise \c s and \c B, sum it to \c A and stores into +//! \c C //! C[i] = A[i] + (s * B[i]) template -void vadds(const _Type* A, const _Type& s, const _Type* B, _Type* C, size_t size); +void vadds(const _Type *A, const _Type &s, const _Type *B, _Type *C, + size_t size); //! \brief subtract element-wise \c A and \c B and stores into \c C //! C[i] = A[i] - B[i] template -void vsub(const _Type* A, const _Type* B, _Type* C, size_t size); +void vsub(const _Type *A, const _Type *B, _Type *C, size_t size); -//! \brief multiplies element-wise \c s and \c B, subtract it from \c A and stores into \c C +//! \brief multiplies element-wise \c s and \c B, subtract it from \c A and +//! stores into \c C //! C[i] = A[i] - (s * B[i]) template -void vsubs(const _Type* A, const _Type& s, const _Type* B, _Type* C, size_t size); +void vsubs(const _Type *A, const _Type &s, const _Type *B, _Type *C, + size_t size); //! // O[i] = c * I[i] -template -void vsmul(const _Type* I, const float c, _Type* O, size_t size); +template +void vsmul(const _Type *I, const _Type_c &c, _Type *O, size_t size); -template -void vsum_scalar(const _Type* I, const float c, _Type* O, size_t size); - -template -void vmul_scalar(const _Type* I, const float c, _Type* O, size_t size); - -template -void vdiv_scalar(const _Type* I, float c, _Type* O, size_t size); -} // utils -} // pfs +} // utils +} // pfs #include -#endif // PFS_UTILS_NUMERIC_H +#endif // PFS_UTILS_NUMERIC_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/numeric.hxx luminance-hdr-2.6.0/src/Libpfs/utils/numeric.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/numeric.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/numeric.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -25,125 +25,76 @@ #include #include -#include #include +#include namespace pfs { namespace utils { namespace detail { -template -inline -void op(const _Type* A, const _Type* B, _Type* C, size_t size, const _Op& currOp) -{ +template +inline void op(const _Type *A, const _Type *B, _Type *C, size_t size, + const _Op &currOp) { #pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { + for (size_t idx = 0; idx < size; idx++) { C[idx] = currOp(A[idx], B[idx]); } } -} // detail - -template -void vmul(const _Type* A, const _Type* B, _Type* C, size_t size) -{ - //detail::op(A, B, C, size, std::multiplies<_Type>()); +template +inline void op(const _Type *A, _Type *B, size_t size, + const _Op &currOp) { #pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - (*C)(idx) = (*A)(idx) * (*B)(idx); + for (size_t idx = 0; idx < size; idx++) { + B[idx] = currOp(A[idx]); } } +} // detail template -void vdiv(const _Type* A, const _Type* B, _Type* C, size_t size) -{ +void vmul(const _Type *A, const _Type *B, _Type *C, size_t size) { + detail::op(A, B, C, size, std::multiplies<_Type>()); +} + +template +void vdiv(const _Type *A, const _Type *B, _Type *C, size_t size) { detail::op(A, B, C, size, std::divides<_Type>()); } template -void vadd(const _Type* A, const _Type* B, _Type* C, size_t size) -{ - //detail::op(A, B, C, size, std::plus<_Type>()); -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - (*C)(idx) = (*A)(idx) + (*B)(idx); - } +void vadd(const _Type *A, const _Type *B, _Type *C, size_t size) { + detail::op(A, B, C, size, std::plus<_Type>()); } template -void vsadd(const _Type* A, const float s, _Type* B, size_t size) -{ -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - B[idx] = A[idx] + s; - } +void vsadd(const _Type *A, const _Type &s, _Type *B, size_t size) { + detail::op(A, B, size, numeric::vsadd<_Type>(s)); } template -void vadds(const _Type* A, const _Type& s, const _Type* B, _Type* C, size_t size) -{ +void vadds(const _Type *A, const _Type &s, const _Type *B, _Type *C, + size_t size) { detail::op(A, B, C, size, numeric::vadds<_Type>(s)); } template -void vsub(const _Type* A, const _Type* B, _Type* C, size_t size) -{ +void vsub(const _Type *A, const _Type *B, _Type *C, size_t size) { detail::op(A, B, C, size, std::minus<_Type>()); } template -void vsubs(const _Type* A, const _Type& s, const _Type* B, _Type* C, size_t size) -{ +void vsubs(const _Type *A, const _Type &s, const _Type *B, _Type *C, + size_t size) { detail::op(A, B, C, size, numeric::vsubs<_Type>(s)); } - -template -void vsmul(const _Type* I, const float c, _Type* O, size_t size) -{ -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - O[idx] = c*I[idx]; - } -} - -template -void vsum_scalar(const _Type* I, const float c, _Type* O, size_t size) -{ -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - (*O)(idx) = c+(*I)(idx); - } -} - -template -void vmul_scalar(const _Type* I, const float c, _Type* O, size_t size) -{ -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - (*O)(idx) = c*(*I)(idx); - } -} - -template -void vdiv_scalar(const _Type* I, const float c, _Type* O, size_t size) -{ -#pragma omp parallel for - for (int idx = 0; idx < static_cast(size); idx++) - { - (*O)(idx) = c/(*I)(idx); - } +template +void vsmul(const _Type *I, const _Type_s &c, _Type *O, size_t size) { + detail::op(I, O, size, numeric::vsmul<_Type, _Type_s>(c)); } -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_NUMERIC_HXX +#endif // PFS_NUMERIC_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandler.h luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandler.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandler.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandler.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,27 +25,20 @@ namespace pfs { namespace utils { -template +template struct ResourceHandlerTraits { - static inline - void cleanup(T* p) { - delete p; - } + static inline void cleanup(T *p) { delete p; } }; //! \brief This class resemble QScopedPointer or boost::scoped_ptr //! however, it doesn't provide and operator*(), which allow to store //! a pointer to void -template > -class ResourceHandler -{ -public: - ResourceHandler(T* p = 0): - p_(p) - {} +template > +class ResourceHandler { + public: + ResourceHandler(T *p = 0) : p_(p) {} - inline - void reset(T* p = 0) { + inline void reset(T *p = 0) { if (p == p_) return; if (p_ != 0) { Traits::cleanup(p_); @@ -53,39 +46,34 @@ p_ = p; } - inline - ~ResourceHandler() { + inline ~ResourceHandler() { T *oldD = this->p_; Traits::cleanup(oldD); this->p_ = 0; } - inline T* data() - { return p_; } + inline T *data() { return p_; } - inline const T* data() const - { return p_; } + inline const T *data() const { return p_; } - inline T* take() { - T* old_p = p_; + inline T *take() { + T *old_p = p_; p_ = 0; return old_p; } - inline operator bool() const - { return p_; } + inline operator bool() const { return p_; } - inline bool operator!() const - { return !p_; } + inline bool operator!() const { return !p_; } -private: - ResourceHandler(const ResourceHandler&); - ResourceHandler& operator=(const ResourceHandler&); + private: + ResourceHandler(const ResourceHandler &); + ResourceHandler &operator=(const ResourceHandler &); - T* p_; + T *p_; }; -} // utils -} // pfs +} // utils +} // pfs -#endif // RESOURCEHANDLER_H +#endif // RESOURCEHANDLER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandlerlcms.h luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandlerlcms.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandlerlcms.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandlerlcms.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,17 +30,15 @@ #include -#include #include +#include namespace pfs { namespace utils { -struct CleanUpCmsProfile -{ - static inline - void cleanup(cmsHPROFILE profile) { - if ( profile ) { +struct CleanUpCmsProfile { + static inline void cleanup(cmsHPROFILE profile) { + if (profile) { #ifndef NDEBUG std::clog << "CleanUpCmsProfile::cleanup()\n"; #endif @@ -50,11 +48,9 @@ }; typedef ResourceHandler ScopedCmsProfile; -struct CleanUpCmsTransform -{ - static inline - void cleanup(cmsHTRANSFORM transform) { - if ( transform ) { +struct CleanUpCmsTransform { + static inline void cleanup(cmsHTRANSFORM transform) { + if (transform) { #ifndef NDEBUG std::clog << "CleanUpCmsTransform::cleanup()\n"; #endif @@ -64,7 +60,7 @@ }; typedef ResourceHandler ScopedCmsTransform; -} // utils -} // pfs +} // utils +} // pfs #endif // RESOURCEHANDLERLCMS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandlerstdio.h luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandlerstdio.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/resourcehandlerstdio.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/resourcehandlerstdio.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,17 +29,15 @@ //! \since 2.3.0-beta1 #include -#include #include +#include namespace pfs { namespace utils { -struct CleanUpStdIoFile -{ - static inline - void cleanup(FILE* p) { - if ( p ) { +struct CleanUpStdIoFile { + static inline void cleanup(FILE *p) { + if (p) { fclose(p); } } @@ -47,7 +45,7 @@ typedef ResourceHandler ScopedStdIoFile; -} // utils -} // pfs +} // utils +} // pfs -#endif // RESOURCEHANDLERSTDIO_H +#endif // RESOURCEHANDLERSTDIO_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/sse.cpp luminance-hdr-2.6.0/src/Libpfs/utils/sse.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/sse.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/sse.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,93 +29,105 @@ #ifdef LUMINANCE_USE_SSE -/* Implementation lifted from http://jrfonseca.blogspot.com/2008/09/fast-sse2-pow-tables-or-polynomials.html */ +/* Implementation lifted from + * http://jrfonseca.blogspot.com/2008/09/fast-sse2-pow-tables-or-polynomials.html + */ #define EXP_POLY_DEGREE 5 #define POLY0(x, c0) _mm_set1_ps(c0) -#define POLY1(x, c0, c1) _mm_add_ps(_mm_mul_ps(POLY0(x, c1), x), _mm_set1_ps(c0)) -#define POLY2(x, c0, c1, c2) _mm_add_ps(_mm_mul_ps(POLY1(x, c1, c2), x), _mm_set1_ps(c0)) -#define POLY3(x, c0, c1, c2, c3) _mm_add_ps(_mm_mul_ps(POLY2(x, c1, c2, c3), x), _mm_set1_ps(c0)) -#define POLY4(x, c0, c1, c2, c3, c4) _mm_add_ps(_mm_mul_ps(POLY3(x, c1, c2, c3, c4), x), _mm_set1_ps(c0)) -#define POLY5(x, c0, c1, c2, c3, c4, c5) _mm_add_ps(_mm_mul_ps(POLY4(x, c1, c2, c3, c4, c5), x), _mm_set1_ps(c0)) - -v4sf _mm_exp2_ps(v4sf x) -{ - __m128i ipart; - v4sf fpart, expipart, expfpart; - - x = _mm_min_ps(x, _mm_set1_ps( 129.00000f)); - x = _mm_max_ps(x, _mm_set1_ps(-126.99999f)); - - /* ipart = int(x - 0.5) */ - ipart = _mm_cvtps_epi32(_mm_sub_ps(x, _mm_set1_ps(0.5f))); +#define POLY1(x, c0, c1) \ + _mm_add_ps(_mm_mul_ps(POLY0(x, c1), x), _mm_set1_ps(c0)) +#define POLY2(x, c0, c1, c2) \ + _mm_add_ps(_mm_mul_ps(POLY1(x, c1, c2), x), _mm_set1_ps(c0)) +#define POLY3(x, c0, c1, c2, c3) \ + _mm_add_ps(_mm_mul_ps(POLY2(x, c1, c2, c3), x), _mm_set1_ps(c0)) +#define POLY4(x, c0, c1, c2, c3, c4) \ + _mm_add_ps(_mm_mul_ps(POLY3(x, c1, c2, c3, c4), x), _mm_set1_ps(c0)) +#define POLY5(x, c0, c1, c2, c3, c4, c5) \ + _mm_add_ps(_mm_mul_ps(POLY4(x, c1, c2, c3, c4, c5), x), _mm_set1_ps(c0)) + +v4sf _mm_exp2_ps(v4sf x) { + __m128i ipart; + v4sf fpart, expipart, expfpart; + + x = _mm_min_ps(x, _mm_set1_ps(129.00000f)); + x = _mm_max_ps(x, _mm_set1_ps(-126.99999f)); + + /* ipart = int(x - 0.5) */ + ipart = _mm_cvtps_epi32(_mm_sub_ps(x, _mm_set1_ps(0.5f))); + + /* fpart = x - ipart */ + fpart = _mm_sub_ps(x, _mm_cvtepi32_ps(ipart)); + + /* expipart = (float) (1 << ipart) */ + expipart = _mm_castsi128_ps( + _mm_slli_epi32(_mm_add_epi32(ipart, _mm_set1_epi32(127)), 23)); - /* fpart = x - ipart */ - fpart = _mm_sub_ps(x, _mm_cvtepi32_ps(ipart)); - - /* expipart = (float) (1 << ipart) */ - expipart = _mm_castsi128_ps(_mm_slli_epi32(_mm_add_epi32(ipart, _mm_set1_epi32(127)), 23)); - - /* minimax polynomial fit of 2**x, in range [-0.5, 0.5[ */ +/* minimax polynomial fit of 2**x, in range [-0.5, 0.5[ */ #if EXP_POLY_DEGREE == 5 - expfpart = POLY5(fpart, 9.9999994e-1f, 6.9315308e-1f, 2.4015361e-1f, 5.5826318e-2f, 8.9893397e-3f, 1.8775767e-3f); + expfpart = POLY5(fpart, 9.9999994e-1f, 6.9315308e-1f, 2.4015361e-1f, + 5.5826318e-2f, 8.9893397e-3f, 1.8775767e-3f); #elif EXP_POLY_DEGREE == 4 - expfpart = POLY4(fpart, 1.0000026f, 6.9300383e-1f, 2.4144275e-1f, 5.2011464e-2f, 1.3534167e-2f); + expfpart = POLY4(fpart, 1.0000026f, 6.9300383e-1f, 2.4144275e-1f, + 5.2011464e-2f, 1.3534167e-2f); #elif EXP_POLY_DEGREE == 3 - expfpart = POLY3(fpart, 9.9992520e-1f, 6.9583356e-1f, 2.2606716e-1f, 7.8024521e-2f); + expfpart = POLY3(fpart, 9.9992520e-1f, 6.9583356e-1f, 2.2606716e-1f, + 7.8024521e-2f); #elif EXP_POLY_DEGREE == 2 - expfpart = POLY2(fpart, 1.0017247f, 6.5763628e-1f, 3.3718944e-1f); + expfpart = POLY2(fpart, 1.0017247f, 6.5763628e-1f, 3.3718944e-1f); #else #error #endif - return _mm_mul_ps(expipart, expfpart); + return _mm_mul_ps(expipart, expfpart); } #define LOG_POLY_DEGREE 5 -v4sf _mm_log2_ps(v4sf x) -{ - __m128i exp = _mm_set1_epi32(0x7F800000); - __m128i mant = _mm_set1_epi32(0x007FFFFF); +v4sf _mm_log2_ps(v4sf x) { + __m128i exp = _mm_set1_epi32(0x7F800000); + __m128i mant = _mm_set1_epi32(0x007FFFFF); - v4sf one = _mm_set1_ps(1.0f); + v4sf one = _mm_set1_ps(1.0f); - __m128i i = _mm_castps_si128(x); + __m128i i = _mm_castps_si128(x); - v4sf e = _mm_cvtepi32_ps(_mm_sub_epi32(_mm_srli_epi32(_mm_and_si128(i, exp), 23), _mm_set1_epi32(127))); + v4sf e = _mm_cvtepi32_ps(_mm_sub_epi32( + _mm_srli_epi32(_mm_and_si128(i, exp), 23), _mm_set1_epi32(127))); - v4sf m = _mm_or_ps(_mm_castsi128_ps(_mm_and_si128(i, mant)), one); + v4sf m = _mm_or_ps(_mm_castsi128_ps(_mm_and_si128(i, mant)), one); - v4sf p; + v4sf p; - /* Minimax polynomial fit of log2(x)/(x - 1), for x in range [1, 2[ */ +/* Minimax polynomial fit of log2(x)/(x - 1), for x in range [1, 2[ */ #if LOG_POLY_DEGREE == 6 - p = POLY5( m, 3.1157899f, -3.3241990f, 2.5988452f, -1.2315303f, 3.1821337e-1f, -3.4436006e-2f); + p = POLY5(m, 3.1157899f, -3.3241990f, 2.5988452f, -1.2315303f, + 3.1821337e-1f, -3.4436006e-2f); #elif LOG_POLY_DEGREE == 5 - p = POLY4(m, 2.8882704548164776201f, -2.52074962577807006663f, 1.48116647521213171641f, -0.465725644288844778798f, 0.0596515482674574969533f); + p = POLY4(m, 2.8882704548164776201f, -2.52074962577807006663f, + 1.48116647521213171641f, -0.465725644288844778798f, + 0.0596515482674574969533f); #elif LOG_POLY_DEGREE == 4 - p = POLY3(m, 2.61761038894603480148f, -1.75647175389045657003f, 0.688243882994381274313f, -0.107254423828329604454f); + p = POLY3(m, 2.61761038894603480148f, -1.75647175389045657003f, + 0.688243882994381274313f, -0.107254423828329604454f); #elif LOG_POLY_DEGREE == 3 - p = POLY2(m, 2.28330284476918490682f, -1.04913055217340124191f, 0.204446009836232697516f); + p = POLY2(m, 2.28330284476918490682f, -1.04913055217340124191f, + 0.204446009836232697516f); #else #error #endif - /* This effectively increases the polynomial degree by one, but ensures that log2(1) == 0*/ - p = _mm_mul_ps(p, _mm_sub_ps(m, one)); - - return _mm_add_ps(p, e); -} + /* This effectively increases the polynomial degree by one, but ensures that + * log2(1) == 0*/ + p = _mm_mul_ps(p, _mm_sub_ps(m, one)); -v4sf _mm_pow_ps(v4sf x, v4sf y) -{ - return _mm_exp2_ps(_mm_log2_ps(x) * y); + return _mm_add_ps(p, e); } +v4sf _mm_pow_ps(v4sf x, v4sf y) { return _mm_exp2_ps(_mm_log2_ps(x) * y); } -#endif // LUMINANCE_USE_SSE +#endif // LUMINANCE_USE_SSE -} // utils -} // pfs +} // utils +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/sse.h luminance-hdr-2.6.0/src/Libpfs/utils/sse.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/sse.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/sse.h 2019-06-09 19:18:38.000000000 +0000 @@ -36,7 +36,6 @@ // #define LUMINANCE_USE_SSE #include #include -#include //#include //#include @@ -44,7 +43,7 @@ #error unsupported architecture #endif -#endif // __SSE__ +#endif // __SSE__ #ifdef LUMINANCE_USE_SSE typedef __v4sf v4sf; @@ -53,7 +52,7 @@ v4sf _mm_pow_ps(v4sf, v4sf); #endif -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_UTILS_SSE_H +#endif // PFS_UTILS_SSE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/string.cpp luminance-hdr-2.6.0/src/Libpfs/utils/string.cpp --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/string.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/string.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,8 +21,8 @@ #include -#include #include +#include using namespace std; @@ -30,42 +30,37 @@ namespace utils { // Utility functions for case insensitive string compare -static -int charDiff(char c1, char c2) -{ - if ( tolower(c1) < tolower(c2) ) return -1; - if ( tolower(c1) == tolower(c2) ) return 0; +static int charDiff(char c1, char c2) { + if (tolower(c1) < tolower(c2)) return -1; + if (tolower(c1) == tolower(c2)) return 0; return 1; } -static -int stringCompare(const string& str1, const string& str2) -{ +static int stringCompare(const string &str1, const string &str2) { int diff = 0; size_t size = std::min(str1.size(), str2.size()); - for (size_t idx = 0; idx < size && diff == 0; ++idx) - { + for (size_t idx = 0; idx < size && diff == 0; ++idx) { diff = charDiff(str1[idx], str2[idx]); } - if ( diff != 0 ) return diff; + if (diff != 0) return diff; - if ( str2.length() == str1.length() ) return 0; - if ( str2.length() > str1.length() ) return 1; + if (str2.length() == str1.length()) return 0; + if (str2.length() > str1.length()) return 1; return -1; } -bool StringUnsensitiveComp::operator()(const std::string& str1, const std::string& str2) const { - return ( stringCompare(str1, str2) == -1 ); +bool StringUnsensitiveComp::operator()(const std::string &str1, + const std::string &str2) const { + return (stringCompare(str1, str2) == -1); } -string getFormat(const string &filename) -{ +string getFormat(const string &filename) { size_t i = filename.rfind('.', filename.length()); - if ( i != string::npos ) { - return filename.substr(i+1, filename.length()-i); + if (i != string::npos) { + return filename.substr(i + 1, filename.length() - i); } return string(); } -} // utils -} // pfs +} // utils +} // pfs diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/string.h luminance-hdr-2.6.0/src/Libpfs/utils/string.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/string.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/string.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,13 +28,13 @@ namespace utils { struct StringUnsensitiveComp { - bool operator()(const std::string& str1, const std::string& str2) const; + bool operator()(const std::string &str1, const std::string &str2) const; }; //! \brief return extension from filename -std::string getFormat(const std::string& filename); +std::string getFormat(const std::string &filename); -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_UTILS_STRING_H +#endif // PFS_UTILS_STRING_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/transform.h luminance-hdr-2.6.0/src/Libpfs/utils/transform.h --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/transform.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/transform.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,27 +31,29 @@ //! \brief 3 components to 3 components transform function template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp); +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out1, OutputIterator out2, + OutputIterator out3, ConversionOperator convOp); //! \brief 4 components to 3 components transform function //! useful for CMYK to RGB conversion (or RGBA to RGB) template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, InputIterator in4, - OutputIterator out1, OutputIterator out2, OutputIterator out3, +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, InputIterator in4, OutputIterator out1, + OutputIterator out2, OutputIterator out3, ConversionOperator convOp); //! \brief 3 components to 1 component transform function //! useful for channel stripping or RGB to Y conversion template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out1, ConversionOperator convOp); +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out1, + ConversionOperator convOp); -} // utils -} // pfs +} // utils +} // pfs #include -#endif // PFS_COLORSPACE_TRANSFORM_H +#endif // PFS_COLORSPACE_TRANSFORM_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/transform.hxx luminance-hdr-2.6.0/src/Libpfs/utils/transform.hxx --- luminance-hdr-2.5.1+dfsg/src/Libpfs/utils/transform.hxx 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Libpfs/utils/transform.hxx 2019-06-09 19:18:38.000000000 +0000 @@ -26,9 +26,9 @@ #define PFS_COLORSPACE_TRANSFORM_HXX #include -#include #include #include +#include namespace pfs { namespace utils { @@ -37,15 +37,13 @@ // transform for generic iterators template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp, - InputIteratorTag, OutputIteratorTag) -{ - while ( in1 != in1End ) - { + typename ConversionOperator, typename InputIteratorTag, + typename OutputIteratorTag> +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out1, OutputIterator out2, + OutputIterator out3, ConversionOperator convOp, InputIteratorTag, + OutputIteratorTag) { + while (in1 != in1End) { convOp(*in1++, *in2++, *in3++, *out1++, *out2++, *out3++); } } @@ -53,47 +51,44 @@ // transform for random_access_iterator_tag, so we can use OpenMP (optimized) template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp, - std::random_access_iterator_tag, std::random_access_iterator_tag) -{ - typename std::iterator_traits::difference_type - numElem = (in1End - in1); +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out1, OutputIterator out2, + OutputIterator out3, ConversionOperator &convOp, + std::random_access_iterator_tag, + std::random_access_iterator_tag) { + typename std::iterator_traits::difference_type numElem = + (in1End - in1); #pragma omp parallel for - for ( int idx = 0; idx < numElem; ++idx) { - convOp(in1[idx], in2[idx], in3[idx], - out1[idx], out2[idx], out3[idx]); + for (int idx = 0; idx < numElem; ++idx) { + convOp(in1[idx], in2[idx], in3[idx], out1[idx], out2[idx], out3[idx]); } } -} // detail +} // detail template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp) -{ +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out1, OutputIterator out2, + OutputIterator out3, ConversionOperator convOp) { // dispatch to best implementation! - detail::transform(in1, in1End, in2, in3, out1, out2, out3, convOp, - typename std::iterator_traits::iterator_category(), - typename std::iterator_traits::iterator_category()); + detail::transform( + in1, in1End, in2, in3, out1, out2, out3, convOp, + typename std::iterator_traits::iterator_category(), + typename std::iterator_traits::iterator_category()); } namespace detail { // transform for generic iterators template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, InputIterator in4, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp, - InputIteratorTag, OutputIteratorTag) -{ - while ( in1 != in1End ) - { + typename ConversionOperator, typename InputIteratorTag, + typename OutputIteratorTag> +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, InputIterator in4, OutputIterator out1, + OutputIterator out2, OutputIterator out3, + ConversionOperator convOp, InputIteratorTag, OutputIteratorTag) { + while (in1 != in1End) { convOp(*in1++, *in2++, *in3++, *in4++, *out1++, *out2++, *out3++); } } @@ -101,47 +96,45 @@ // transform for random_access_iterator_tag, so we can use OpenMP (optimized) template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, InputIterator in4, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp, - std::random_access_iterator_tag, std::random_access_iterator_tag) -{ - typename std::iterator_traits::difference_type - numElem = (in1End - in1); +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, InputIterator in4, OutputIterator out1, + OutputIterator out2, OutputIterator out3, + ConversionOperator convOp, std::random_access_iterator_tag, + std::random_access_iterator_tag) { + typename std::iterator_traits::difference_type numElem = + (in1End - in1); #pragma omp parallel for - for ( int idx = 0; idx < numElem; ++idx) { - convOp(in1[idx], in2[idx], in3[idx], in4[idx], - out1[idx], out2[idx], out3[idx]); + for (int idx = 0; idx < numElem; ++idx) { + convOp(in1[idx], in2[idx], in3[idx], in4[idx], out1[idx], out2[idx], + out3[idx]); } } -} // detail +} // detail template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, InputIterator in4, - OutputIterator out1, OutputIterator out2, OutputIterator out3, - ConversionOperator convOp) -{ +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, InputIterator in4, OutputIterator out1, + OutputIterator out2, OutputIterator out3, + ConversionOperator convOp) { // dispatch to best implementation! - detail::transform(in1, in1End, in2, in3, in4, out1, out2, out3, convOp, - typename std::iterator_traits::iterator_category(), - typename std::iterator_traits::iterator_category()); + detail::transform( + in1, in1End, in2, in3, in4, out1, out2, out3, convOp, + typename std::iterator_traits::iterator_category(), + typename std::iterator_traits::iterator_category()); } - namespace detail { // transform for generic iterators template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out, ConversionOperator convOp, - InputIteratorTag, OutputIteratorTag) -{ - while ( in1 != in1End ) - { + typename ConversionOperator, typename InputIteratorTag, + typename OutputIteratorTag> +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out, ConversionOperator &convOp, + InputIteratorTag, OutputIteratorTag) { + while (in1 != in1End) { convOp(*in1++, *in2++, *in3++, *out++); } } @@ -149,32 +142,33 @@ // transform for random_access_iterator_tag, so we can use OpenMP (optimized) template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out, ConversionOperator convOp, - std::random_access_iterator_tag, std::random_access_iterator_tag) -{ - typename std::iterator_traits::difference_type - numElem = (in1End - in1); +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out, ConversionOperator &convOp, + std::random_access_iterator_tag, + std::random_access_iterator_tag) { + typename std::iterator_traits::difference_type numElem = + (in1End - in1); #pragma omp parallel for - for ( int idx = 0; idx < numElem; ++idx) { + for (int idx = 0; idx < numElem; ++idx) { convOp(in1[idx], in2[idx], in3[idx], out[idx]); } } -} // detail +} // detail template -void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, - OutputIterator out, ConversionOperator convOp) -{ +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, + InputIterator in3, OutputIterator out, + ConversionOperator convOp) { // dispatch to best implementation! - detail::transform(in1, in1End, in2, in3, out, convOp, - typename std::iterator_traits::iterator_category(), - typename std::iterator_traits::iterator_category()); + detail::transform( + in1, in1End, in2, in3, out, convOp, + typename std::iterator_traits::iterator_category(), + typename std::iterator_traits::iterator_category()); } -} // utils -} // pfs +} // utils +} // pfs -#endif // PFS_COLORSPACE_TRANSFORM_HXX +#endif // PFS_COLORSPACE_TRANSFORM_HXX diff -Nru luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/CMakeLists.txt luminance-hdr-2.6.0/src/LibpfsAdditions/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/LibpfsAdditions/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -9,8 +9,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(pfsadditions ${FILES_H} ${FILES_HPP} ${FILES_CPP} ${FILES_MOC}) -qt5_use_modules(pfsadditions Core Gui Widgets) +ADD_LIBRARY(pfsadditions STATIC ${FILES_H} ${FILES_HPP} ${FILES_CPP} ${FILES_MOC}) +TARGET_LINK_LIBRARIES(pfsadditions Qt5::Core Qt5::Gui Qt5::Widgets) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} pfsadditions PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} pfsadditions PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/formathelper.cpp luminance-hdr-2.6.0/src/LibpfsAdditions/formathelper.cpp --- luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/formathelper.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/LibpfsAdditions/formathelper.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,40 +23,29 @@ //! @author Daniel Kaneider #include "formathelper.h" +#include "Common/config.h" -#include "UI/TiffModeDialog.h" #include +#include "UI/TiffModeDialog.h" -#define KEY_EXPORT_FORMAT "FileFormats/Format" -#define KEY_EXPORT_TIFF_MODE "FileFormats/TiffMode" -#define KEY_EXPORT_QUALITY "FileFormats/Quality" - -namespace pfsadditions -{ +namespace pfsadditions { FormatHelper::FormatHelper() - : QObject() - , m_comboBox(NULL) - , m_settingsButton(NULL) - , m_hdr(false) -{} + : QObject(), m_comboBox(NULL), m_settingsButton(NULL), m_hdr(false) {} -void FormatHelper::initConnection(QComboBox* comboBox, QAbstractButton* settingsButton, bool hdr) -{ +void FormatHelper::initConnection(QComboBox *comboBox, + QAbstractButton *settingsButton, bool hdr) { m_comboBox = comboBox; m_settingsButton = settingsButton; m_hdr = hdr; - if (hdr) - { + if (hdr) { // FrameWriterFactory::sm_registry comboBox->addItem(QObject::tr("HDR"), QVariant(0)); comboBox->addItem(QObject::tr("EXR"), QVariant(1)); comboBox->addItem(QObject::tr("TIFF"), QVariant(2)); comboBox->addItem(QObject::tr("PFS"), QVariant(3)); - } - else - { + } else { comboBox->addItem(QObject::tr("TIFF"), QVariant(20)); comboBox->addItem(QObject::tr("JPEG"), QVariant(21)); comboBox->addItem(QObject::tr("PNG"), QVariant(22)); @@ -65,199 +54,181 @@ comboBox->addItem(QObject::tr("PBM"), QVariant(25)); } - connect(comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxIndexChanged(int))); - connect(settingsButton, SIGNAL(pressed()), this, SLOT(buttonPressed())); + connect(comboBox, static_cast( + &QComboBox::currentIndexChanged), + this, &FormatHelper::comboBoxIndexChanged); + connect(settingsButton, &QAbstractButton::pressed, this, + &FormatHelper::buttonPressed); const int format = hdr ? 0 : 20; setDefaultParams(format); updateButton(format); } -QString FormatHelper::getFileExtension() -{ +QString FormatHelper::getFileExtension() { int format = m_comboBox->currentData().toInt(); return getFileExtensionForFormat(format); } -QString FormatHelper::getFileExtensionForFormat(int format) -{ - switch (format) - { - case 0: - return ("hdr"); - case 1: - return ("exr"); - case 2: - return ("tiff"); - case 3: - return ("pfs"); - case 20: - return ("tiff"); - case 21: - return ("jpg"); - case 22: - return ("png"); - case 23: - return ("bmp"); - case 24: - return ("ppm"); - case 25: - return ("pbm"); +QString FormatHelper::getFileExtensionForFormat(int format) { + switch (format) { + case 0: + return ("hdr"); + case 1: + return ("exr"); + case 2: + return ("tiff"); + case 3: + return ("pfs"); + case 20: + return ("tiff"); + case 21: + return ("jpg"); + case 22: + return ("png"); + case 23: + return ("bmp"); + case 24: + return ("ppm"); + case 25: + return ("pbm"); } - return "tiff"; + return QStringLiteral("tiff"); } -void FormatHelper::setDefaultParams(int format) -{ +void FormatHelper::setDefaultParams(int format) { m_params = getParamsForFormat(format); } -pfs::Params FormatHelper::getParamsForFormat(int format) -{ +pfs::Params FormatHelper::getParamsForFormat(int format) { pfs::Params params; - switch (format) - { - case 0: - params.set("format", std::string("hdr")); - break; - case 1: - params.set("format", std::string("exr")); - break; - case 2: - params.set("format", std::string("tiff")); - break; - case 3: - params.set("format", std::string("pfs")); - break; - case 20: - params.set("format", std::string("tiff")); - break; - case 21: - params.set("format", std::string("jpg")); - params.set("quality", 100); - break; - case 22: - params.set("format", std::string("png")); - params.set("quality", 100); - break; - case 23: - case 24: - case 25: - // default params - break; - default: - break; + switch (format) { + case 0: + params.set("format", std::string("hdr")); + break; + case 1: + params.set("format", std::string("exr")); + break; + case 2: + params.set("format", std::string("tiff")); + break; + case 3: + params.set("format", std::string("pfs")); + break; + case 20: + params.set("format", std::string("tiff")); + break; + case 21: + params.set("format", std::string("jpg")); + params.set("quality", 100); + break; + case 22: + params.set("format", std::string("png")); + params.set("quality", 100); + break; + case 23: + case 24: + case 25: + // default params + break; + default: + break; } params.set("fileextension", getFileExtensionForFormat(format)); return params; } -void FormatHelper::comboBoxIndexChanged(int idx) -{ +void FormatHelper::comboBoxIndexChanged(int idx) { int format = m_comboBox->currentData().toInt(); setDefaultParams(format); updateButton(format); } -void FormatHelper::buttonPressed() -{ +void FormatHelper::buttonPressed() { int format = m_comboBox->currentData().toInt(); - switch (format) - { - case 2: - case 20: - { - int tiffMode; - if (!m_params.get("tiff_mode", tiffMode)) - tiffMode = -1; - - TiffModeDialog t(format == 2, tiffMode, m_settingsButton); - if (t.exec() == QDialog::Accepted) - { - m_params.set("tiff_mode", t.getTiffWriterMode()); - } - } - break; - case 21: - case 22: - { - size_t quality; - int qual = -1; - if (m_params.get("quality", quality)) - qual = quality; - - ImageQualityDialog d(NULL, format == 21 ? "png" : "jpg", qual, m_settingsButton); - if (d.exec() == QDialog::Accepted) - { - size_t quality = d.getQuality(); - m_params.set("quality", quality); - } - - } - break; - case 3: - m_params.set("format", std::string("pfs")); - break; - default: - break; + switch (format) { + case 2: + case 20: { + int tiffMode; + if (!m_params.get("tiff_mode", tiffMode)) tiffMode = -1; + + TiffModeDialog t(format == 2, tiffMode, m_settingsButton); + if (t.exec() == QDialog::Accepted) { + m_params.set("tiff_mode", t.getTiffWriterMode()); + } + } break; + case 21: + case 22: { + size_t quality; + int qual = -1; + if (m_params.get("quality", quality)) qual = quality; + + ImageQualityDialog d(NULL, format == 21 ? "png" : "jpg", qual, + m_settingsButton); + if (d.exec() == QDialog::Accepted) { + size_t quality = d.getQuality(); + m_params.set("quality", quality); + } + + } break; + case 3: + m_params.set("format", std::string("pfs")); + break; + default: + break; } } -void FormatHelper::updateButton(int format) -{ - bool enabled = format == 2 // tiff - || format == 20 // tiff-dr - || format == 21 // jpg - || format == 22; // png +void FormatHelper::updateButton(int format) { + bool enabled = format == 2 // tiff + || format == 20 // tiff-dr + || format == 21 // jpg + || format == 22; // png m_settingsButton->setEnabled(enabled); } -pfs::Params FormatHelper::getParams() -{ - return m_params; -} +pfs::Params FormatHelper::getParams() { return m_params; } -void FormatHelper::loadFromSettings(const LuminanceOptions& options, QString prefix) -{ - - int format = options.value(prefix + "/" + KEY_EXPORT_FORMAT, m_hdr ? 0 : 20).toInt(); +void FormatHelper::loadFromSettings(const QString prefix) { + int format = LuminanceOptions() + .value(prefix + "/" + KEY_EXPORT_FORMAT, m_hdr ? 0 : 20) + .toInt(); m_comboBox->setCurrentIndex(m_comboBox->findData(format)); - m_params = FormatHelper::getParamsFromSettings(options, prefix, m_hdr); + m_params = FormatHelper::getParamsFromSettings(prefix, m_hdr); } -void FormatHelper::writeSettings(LuminanceOptions& options, QString prefix) -{ - options.setValue(prefix + "/" + KEY_EXPORT_FORMAT, m_comboBox->currentData().toInt()); +void FormatHelper::writeSettings(const QString prefix) { + LuminanceOptions().setValue(prefix + "/" + KEY_EXPORT_FORMAT, + m_comboBox->currentData().toInt()); int tiffMode; - if (m_params.get("tiff_mode", tiffMode)) - { - options.setValue(prefix + "/" + KEY_EXPORT_TIFF_MODE, tiffMode); + if (m_params.get("tiff_mode", tiffMode)) { + LuminanceOptions().setValue(prefix + "/" + KEY_EXPORT_TIFF_MODE, + tiffMode); } size_t quality; - if (m_params.get("quality", quality)) - { + if (m_params.get("quality", quality)) { int qual = quality; - options.setValue(prefix + "/" + KEY_EXPORT_QUALITY, qual); + LuminanceOptions().setValue(prefix + "/" + KEY_EXPORT_QUALITY, qual); } - } -pfs::Params FormatHelper::getParamsFromSettings(const LuminanceOptions& options, QString prefix, bool hdr) -{ - int format = options.value(prefix + "/" + KEY_EXPORT_FORMAT, hdr ? 0 : 20).toInt(); +pfs::Params FormatHelper::getParamsFromSettings(const QString prefix, + bool hdr) { + int format = LuminanceOptions() + .value(prefix + "/" + KEY_EXPORT_FORMAT, hdr ? 0 : 20) + .toInt(); pfs::Params params = FormatHelper::getParamsForFormat(format); - int tiffMode = options.value(prefix + "/" + KEY_EXPORT_TIFF_MODE, -1).toInt(); - if (tiffMode >= 0) - params.set("tiff_mode", tiffMode); - int quality = options.value(prefix + "/" + KEY_EXPORT_QUALITY, -1).toInt(); - if (quality >= 0) - { + int tiffMode = LuminanceOptions() + .value(prefix + "/" + KEY_EXPORT_TIFF_MODE, -1) + .toInt(); + if (tiffMode >= 0) params.set("tiff_mode", tiffMode); + int quality = + LuminanceOptions().value(prefix + "/" + KEY_EXPORT_QUALITY, -1).toInt(); + if (quality >= 0) { size_t qual = quality; params.set("quality", qual); } return params; } - - } diff -Nru luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/formathelper.h luminance-hdr-2.6.0/src/LibpfsAdditions/formathelper.h --- luminance-hdr-2.5.1+dfsg/src/LibpfsAdditions/formathelper.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/LibpfsAdditions/formathelper.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,58 +25,54 @@ #ifndef LIBPFSADDITIONS_FORMATHELPER_H #define LIBPFSADDITIONS_FORMATHELPER_H +#include +#include +#include #include #include -#include -#include -#include #include "Common/LuminanceOptions.h" #include -namespace pfsadditions -{ - - class FormatHelper : public QObject - { - Q_OBJECT +namespace pfsadditions { - public: - FormatHelper(); +class FormatHelper : public QObject { + Q_OBJECT - //! \brief virtual dtor, enable derivation - ~FormatHelper() {} + public: + FormatHelper(); - void initConnection(QComboBox* comboBox, QAbstractButton* settingsButton, bool hdr); - pfs::Params getParams(); - QString getFileExtension(); + //! \brief virtual dtor, enable derivation + ~FormatHelper() {} - void loadFromSettings(const LuminanceOptions& options, QString prefix); - void writeSettings(LuminanceOptions& options, QString prefix); + void initConnection(QComboBox *comboBox, QAbstractButton *settingsButton, + bool hdr); + pfs::Params getParams(); + QString getFileExtension(); - static pfs::Params getParamsFromSettings(const LuminanceOptions& options, QString prefix, bool hdr); + void loadFromSettings(const QString prefix); + void writeSettings(const QString prefix); - protected: - void setDefaultParams(int format); + static pfs::Params getParamsFromSettings(const QString prefix, bool hdr); - void updateButton(int format); + protected: + void setDefaultParams(int format); - static pfs::Params getParamsForFormat(int format); - static QString getFileExtensionForFormat(int format); + void updateButton(int format); - protected slots: - void comboBoxIndexChanged(int idx); - void buttonPressed(); + static pfs::Params getParamsForFormat(int format); + static QString getFileExtensionForFormat(int format); - private: - - QComboBox* m_comboBox; - QAbstractButton* m_settingsButton; - pfs::Params m_params; - bool m_hdr; + protected slots: + void comboBoxIndexChanged(int idx); + void buttonPressed(); + private: + QComboBox *m_comboBox; + QAbstractButton *m_settingsButton; + pfs::Params m_params; + bool m_hdr; }; - } -#endif // LIBPFSADDITIONS_FORMATHELPER_H +#endif // LIBPFSADDITIONS_FORMATHELPER_H diff -Nru luminance-hdr-2.5.1+dfsg/src/MainCli/CMakeLists.txt luminance-hdr-2.6.0/src/MainCli/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/MainCli/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainCli/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -9,9 +9,9 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(main_cli ${FILES_H} ${FILES_HPP} ${FILES_CPP} ${FILES_MOC}) -#qt5_use_modules(main_cli Core Gui Widgets) -qt5_use_modules(main_cli Core Gui) +ADD_LIBRARY(main_cli STATIC ${FILES_H} ${FILES_HPP} ${FILES_CPP} ${FILES_MOC}) +#TARGET_LINK_LIBRARIES(main_cli Qt5::Core Qt5::Gui Qt5::Widgets) +TARGET_LINK_LIBRARIES(main_cli Qt5::Core Qt5::Gui) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/MainCli/commandline.cpp luminance-hdr-2.6.0/src/MainCli/commandline.cpp --- luminance-hdr-2.5.1+dfsg/src/MainCli/commandline.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainCli/commandline.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,238 +25,412 @@ * */ -#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "commandline.h" -#include "Common/GitSHA1.h" -#include "Common/config.h" -#include "Common/LuminanceOptions.h" -#include "Common/CommonFunctions.h" -#include "Fileformat/pfsoutldrimage.h" - -#include "Exif/ExifOperations.h" - -#include "Core/IOWorker.h" -#include "Core/TMWorker.h" - -#include "Libpfs/tm/TonemapOperator.h" -#include "Libpfs/manip/gamma_levels.h" - -#include - #if defined(_MSC_VER) #include #include #endif -#include "HdrHTML/pfsouthdrhtml.h" - using namespace libhdr::fusion; -namespace -{ - -void printIfVerbose(const QString& str, bool verbose) -{ - if ( verbose ) - { - #if defined(_MSC_VER) - // if the filemode isn't restored afterwards, a normal std::cout segfaults - int oldMode = _setmode(_fileno(stdout), _O_U16TEXT); - std::wcout << qPrintable(str) << std::endl; - if (oldMode >= 0) - _setmode(_fileno(stdout), oldMode); - #else - std::cout << qPrintable(str) << std::endl; - #endif +namespace { +void printIfVerbose(const QString &str, bool verbose) { + if (verbose) { +#if defined(_MSC_VER) + // if the filemode isn't restored afterwards, a normal std::cout + // segfaults + int oldMode = _setmode(_fileno(stdout), _O_U16TEXT); + std::wcout << qPrintable(str) << std::endl; + if (oldMode >= 0) _setmode(_fileno(stdout), oldMode); +#else + std::cout << qPrintable(str) << std::endl; +#endif } } -void printErrorAndExit(const QString& error_str) -{ +void printErrorAndExit(const QString &error_str) { printIfVerbose(error_str, true); exit(-1); } -float toFloatWithErrMsg(const QString &str) -{ +float toFloatWithErrMsg(const QString &str) { bool ok; float ret = str.toFloat(&ok); - if (!ok) - { + if (!ok) { printErrorAndExit(QObject::tr("Cannot convert %1 to a float").arg(str)); } return ret; } - } -CommandLineInterfaceManager::CommandLineInterfaceManager(const int argc, char **argv): - argc(argc), - argv(argv), - operationMode(UNKNOWN_MODE), - alignMode(NO_ALIGN), - tmopts(TMOptionsOperations::getDefaultTMOptions()), - tmofileparams(new pfs::Params()), - verbose(false), - oldValue(0), - maximum(100), - started(false), - threshold(0.0f), - isAutolevels(false), - isHtml(false), - isHtmlDone(false), - htmlQuality(2), - pageName(), - imagesDir(), - saveAlignedImagesPrefix("") -{ - +CommandLineInterfaceManager::CommandLineInterfaceManager(const int argc, + char **argv) + : argc(argc), + argv(argv), + operationMode(UNKNOWN_MODE), + alignMode(NO_ALIGN), + tmopts(TMOptionsOperations::getDefaultTMOptions()), + tmofileparams(new pfs::Params()), + verbose(false), + oldValue(0), + maximum(100), + started(false), + threshold(0.0f), + isAutolevels(false), + isHtml(false), + isHtmlDone(false), + htmlQuality(2), + isProposedLdrName(false), + isProposedHdrName(false), + pageName(), + imagesDir(), + saveAlignedImagesPrefix(QLatin1String("")) { hdrcreationconfig.weightFunction = WEIGHT_TRIANGULAR; hdrcreationconfig.responseCurve = RESPONSE_LINEAR; hdrcreationconfig.fusionOperator = DEBEVEC; tmofileparams->set("quality", (size_t)100); + validLdrExtensions << "jpg" + << "jpeg" + << "png" + << "tif" + << "tiff" + << "pnm" + << "bmp" + << "pgm" + << "xpm" + << "xbm"; + validHdrExtensions << "exr" + << "hdr" + << "tif" + << "tiff" + << "pfs"; } -int CommandLineInterfaceManager::execCommandLineParams() -{ +int CommandLineInterfaceManager::execCommandLineParams() { // Declare the supported options. namespace po = boost::program_options; po::variables_map vm; - po::options_description desc(tr("Usage: %1 [OPTIONS]... [INPUTFILES]...").arg(argv[0]).toUtf8().constData()); - desc.add_options() - ("help,h", tr("Display this help.").toUtf8().constData()) + po::options_description desc(tr("Usage: %1 [OPTIONS]... [INPUTFILES]...") + .arg(argv[0]) + .toUtf8() + .constData()); + desc.add_options()("help,h", tr("Display this help.").toUtf8().constData()) ("version,V", tr("Display program version.").toUtf8().constData()) ("verbose,v", tr("Print more messages during execution.").toUtf8().constData()) ("cameras,c", tr("Print a list of all supported cameras.").toUtf8().constData()) - ("align,a", po::value(), tr("[AIS|MTB] Align Engine to use during HDR creation (default: no alignment).").toUtf8().constData()) - ("ev,e", po::value(), tr("EV1,EV2,... Specify numerical EV values (as many as INPUTFILES).").toUtf8().constData()) - ("savealigned,d", po::value(), tr("prefix Save aligned images to files which names start with prefix").toUtf8().constData()) + ("align,a", po::value(), tr("[AIS|MTB] Align Engine to use during HDR creation (default: no " + "alignment).").toUtf8().constData()) + ("ev,e", po::value(), tr("EV1,EV2,... Specify numerical EV values (as many as INPUTFILES).") + .toUtf8().constData()) + ("savealigned,d", po::value(), tr("prefix Save aligned images to files which names start with prefix") + .toUtf8().constData()) // - ("load,l", po::value(), tr("HDR_FILE Load an HDR instead of creating a new one.").toUtf8().constData()) - ("save,s", po::value(), tr("HDR_FILE Save to a HDR file format. (default: don't save)").toUtf8().constData()) - ("gamma,g", po::value(&tmopts->pregamma), tr("VALUE Gamma value to use during tone mapping. (default: 1) ").toUtf8().constData()) - ("resize,r", po::value(&tmopts->xsize), tr("VALUE Width you want to resize your HDR to (resized before gamma and tone mapping)").toUtf8().constData()) - - ("output,o", po::value(), tr("LDR_FILE File name you want to save your tone mapped LDR to.").toUtf8().constData()) - ("autoag,t", po::value(&threshold), tr("THRESHOLD Enable auto anti-ghosting with given threshold. (0.0-1.0)").toUtf8().constData()) + ("load,l", po::value(), tr("HDR_FILE Load an HDR instead of creating a new one.") + .toUtf8().constData()) + ("save,s", po::value(), tr("HDR_FILE Save to a HDR file format. (default: don't save)") + .toUtf8().constData()) + ("gamma,g", po::value(&tmopts->pregamma), + tr("VALUE Gamma value to use during tone mapping. (default: 1) ").toUtf8().constData()) + ("saturation,S", po::value(&tmopts->postsaturation), + tr("VALUE Saturation value to use after tone mapping. (default: 1) ").toUtf8().constData()) + ("postgamma,G", po::value(&tmopts->postgamma), + tr("VALUE Gamma value to use after tone mapping. (default: 1) ").toUtf8().constData()) + ("resize,r", po::value(&tmopts->xsize), tr("VALUE Width you want to resize your HDR to (resized " + "before gamma and tone mapping)").toUtf8().constData()) + + ("output,o", po::value(), tr("LDR_FILE File name you want to save your tone mapped LDR to.") + .toUtf8().constData())("autoag,t", po::value(&threshold), tr("THRESHOLD Enable auto anti-ghosting with " + "given threshold. (0.0-1.0)").toUtf8().constData()) ("autolevels,b", tr("Apply autolevels correction after tonemapping.").toUtf8().constData()) ("createwebpage,w", tr("Enable generation of a webpage with embedded HDR viewer.").toUtf8().constData()) - ; - - po::options_description hdr_desc(tr("HDR creation parameters - you must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR").toUtf8().constData()); - hdr_desc.add_options() - ("hdrWeight", po::value(), tr("weight = triangular|gaussian|plateau|flat (Default is triangular)").toUtf8().constData()) - ("hdrResponseCurve", po::value(), tr("response curve = from_file|linear|gamma|log|srgb (Default is linear)").toUtf8().constData()) - ("hdrModel", po::value(), tr("model: robertson|robertsonauto|debevec (Default is debevec)").toUtf8().constData()) - ("hdrCurveFilename", po::value(), tr("curve filename = your_file_here.m").toUtf8().constData()) - ; - - po::options_description ldr_desc(tr("LDR output parameters").toUtf8().constData()); - ldr_desc.add_options() - ("ldrQuality,q", po::value(), tr("VALUE Quality of the saved tone mapped file (1-100).").toUtf8().constData()) - ("ldrTiff", po::value(), tr("Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b)").toUtf8().constData()) - ("ldrTiffDeflate", po::value(), tr("Tiff deflate compression. true|false (Default is true)").toUtf8().constData()) - ; - - po::options_description html_desc(tr("HTML output parameters").toUtf8().constData()); - html_desc.add_options() - ("htmlQuality,k", po::value(), tr("VALUE Quality of the interpolated exposures, from the worst (1) to the best\ + ("proposedldrname,p", po::value(&ldrExtension), + tr("FILE_EXTENSION Save LDR file with a name of the form " + "first-last_tmparameters.extension.").toUtf8().constData()) + ("proposedhdrname,z", po::value(&hdrExtension), tr("FILE_EXTENSION Save HDR file with a name of the form " + "first-last_HdrCreationModel.extension.").toUtf8().constData()); + + po::options_description hdr_desc( + tr("HDR creation parameters - you must either load an existing HDR " + "file " + "(via the -l option) " + "or specify INPUTFILES to create a new HDR") + .toUtf8() + .constData()); + hdr_desc.add_options()( + "hdrWeight", po::value(), + tr("weight = triangular|gaussian|plateau|flat (Default is triangular)") + .toUtf8() + .constData())("hdrResponseCurve", po::value(), + tr("response curve = from_file|linear|gamma|log|srgb " + "(Default is linear)") + .toUtf8() + .constData())( + "hdrModel", po::value(), + tr("model: robertson|robertsonauto|debevec (Default is debevec)") + .toUtf8() + .constData())( + "hdrCurveFilename", po::value(), + tr("curve filename = your_file_here.m").toUtf8().constData()); + + po::options_description ldr_desc( + tr("LDR output parameters").toUtf8().constData()); + ldr_desc.add_options()( + "ldrQuality,q", po::value(), + tr("VALUE Quality of the saved tone mapped file (1-100).") + .toUtf8() + .constData())( + "ldrTiff", po::value(), + tr("Tiff format. Legal values are [8b|16b|32b|logluv] (Default is 8b)") + .toUtf8() + .constData())( + "ldrTiffDeflate", po::value(), + tr("Tiff deflate compression. true|false (Default is true)") + .toUtf8() + .constData()); + + po::options_description html_desc( + tr("HTML output parameters").toUtf8().constData()); + html_desc.add_options()( + "htmlQuality,k", po::value(), + tr("VALUE Quality of the interpolated exposures, from the worst (1) to the best\ (4). Higher quality will introduce less distortions in the \ brightest and the darkest tones, but will also generate more \ images. More images means that there is more data that needs to be \ transferred to the web-browser, making HDR viewer less responsive. \ -(Default is 2, which is sufficient for most applications)").toUtf8().constData()) - ("pageName", po::value(), tr("Specifies the file name, of \ +(Default is 2, which is sufficient for most applications)") + .toUtf8() + .constData())( + "pageName", po::value(), tr("Specifies the file name, of \ the web page to be generated. If is missing, the \ file name of the first image with .html extension will be used. \ -(Default is first image name)").toUtf8().constData()) - ("imagesDir", po::value(), tr("Specify where to store the resulting image files. Links to images in \ +(Default is first image name)").toUtf8().constData())( + "imagesDir", po::value(), + tr("Specify where to store the resulting image files. Links to images in \ HTML will be updated accordingly. This must be a relative path and the \ directory must exist. Useful to avoid clutter in the current directory. \ -(Default is current working directory)").toUtf8().constData()) - ; - - po::options_description tmo_desc(tr("Tone mapping parameters - no tonemapping is performed unless -o is specified").toUtf8().constData()); - tmo_desc.add_options() - ("tmo", po::value(), tr("Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|pattanaik|reinhard02|reinhard05|mai|mantiuk06|mantiuk08] (Default is mantiuk06)").toUtf8().constData()) - ("tmofile", po::value(), tr("SETTING_FILE Load an existing setting file containing pre-gamma and all TMO settings").toUtf8().constData()) - ; +(Default is current working directory)") + .toUtf8() + .constData()); + + po::options_description tmo_desc(tr("Tone mapping parameters - no " + "tonemapping is performed unless -o is " + "specified") + .toUtf8() + .constData()); + tmo_desc.add_options()( + "tmo", po::value(), + tr("Tone mapping operator. Legal values are: [ashikhmin|drago|durand|fattal|ferradans|\nferwerda|kimkautz|pattanaik|\ +reinhard02|\nreinhard05|mai|mantiuk06|mantiuk08|\nvanhateren|lischinski] (Default is mantiuk06)") + .toUtf8() + .constData())("tmofile", po::value(), + tr("SETTING_FILE Load an existing setting file " + "containing pre-gamma and all TMO settings") + .toUtf8() + .constData()); po::options_description tmo_fattal(tr(" Fattal").toUtf8().constData()); - tmo_fattal.add_options() - ("tmoFatAlpha", po::value(&tmopts->operator_options.fattaloptions.alpha), tr("alpha FLOAT").toUtf8().constData()) - ("tmoFatBeta", po::value(&tmopts->operator_options.fattaloptions.beta), tr("beta FLOAT").toUtf8().constData()) - ("tmoFatColor", po::value(&tmopts->operator_options.fattaloptions.color), tr("color FLOAT").toUtf8().constData()) - ("tmoFatNoise", po::value(&tmopts->operator_options.fattaloptions.noiseredux), tr("noise FLOAT").toUtf8().constData()) - ("tmoFatNew", po::value(&tmopts->operator_options.fattaloptions.fftsolver), tr("new true|false").toUtf8().constData()) - ; - po::options_description tmo_ferradans(tr(" Ferradans").toUtf8().constData()); - tmo_ferradans.add_options() - ("tmoFerRho", po::value(&tmopts->operator_options.ferradansoptions.rho), tr("rho FLOAT").toUtf8().constData()) - ("tmoFerInvAlpha", po::value(&tmopts->operator_options.ferradansoptions.inv_alpha), tr("inv_alpha FLOAT").toUtf8().constData()) - ; - po::options_description tmo_mantiuk06(tr(" Mantiuk 06").toUtf8().constData()); - tmo_mantiuk06.add_options() - ("tmoM06Contrast", po::value(&tmopts->operator_options.mantiuk06options.contrastfactor), tr("contrast FLOAT").toUtf8().constData()) - ("tmoM06Saturation", po::value(&tmopts->operator_options.mantiuk06options.saturationfactor), tr("saturation FLOAT").toUtf8().constData()) - ("tmoM06Detail", po::value(&tmopts->operator_options.mantiuk06options.detailfactor), tr("detail FLOAT").toUtf8().constData()) - ("tmoM06ContrastEqual", po::value(&tmopts->operator_options.mantiuk06options.contrastequalization), tr("equalization true|false").toUtf8().constData()) - ; - po::options_description tmo_mantiuk08(tr(" Mantiuk 08").toUtf8().constData()); - tmo_mantiuk08.add_options() - ("tmoM08ColorSaturation", po::value(&tmopts->operator_options.mantiuk08options.colorsaturation), tr("color saturation FLOAT").toUtf8().constData()) - ("tmoM08ConstrastEnh", po::value(&tmopts->operator_options.mantiuk08options.contrastenhancement), tr("contrast enhancement FLOAT").toUtf8().constData()) - ("tmoM08LuminanceLvl", po::value(&tmopts->operator_options.mantiuk08options.luminancelevel), tr("luminance level FLOAT").toUtf8().constData()) - ("tmoM08SetLuminance", po::value(&tmopts->operator_options.mantiuk08options.setluminance), tr("enable luminance level true|false").toUtf8().constData()) - ; + tmo_fattal.add_options()( + "tmoFatAlpha", + po::value(&tmopts->operator_options.fattaloptions.alpha), + tr("alpha FLOAT").toUtf8().constData())( + "tmoFatBeta", + po::value(&tmopts->operator_options.fattaloptions.beta), + tr("beta FLOAT").toUtf8().constData())( + "tmoFatColor", + po::value(&tmopts->operator_options.fattaloptions.color), + tr("color FLOAT").toUtf8().constData())( + "tmoFatNoise", + po::value(&tmopts->operator_options.fattaloptions.noiseredux), + tr("noise FLOAT").toUtf8().constData())( + "tmoFatNew", + po::value(&tmopts->operator_options.fattaloptions.fftsolver), + tr("new true|false").toUtf8().constData()); + po::options_description tmo_ferradans( + tr(" Ferradans").toUtf8().constData()); + tmo_ferradans.add_options()( + "tmoFerRho", + po::value(&tmopts->operator_options.ferradansoptions.rho), + tr("rho FLOAT").toUtf8().constData())( + "tmoFerInvAlpha", + po::value(&tmopts->operator_options.ferradansoptions.inv_alpha), + tr("inv_alpha FLOAT").toUtf8().constData()); + po::options_description tmo_ferwerda( + tr(" Ferwerda").toUtf8().constData()); + tmo_ferwerda.add_options()( + "tmoFerwerdaMul", + po::value(&tmopts->operator_options.ferwerdaoptions.multiplier), + tr("mul FLOAT").toUtf8().constData())( + "tmoFerwerdaAdaptLum", + po::value(&tmopts->operator_options.ferwerdaoptions.adaptationluminance), + tr("adapt_lum FLOAT").toUtf8().constData()); + po::options_description tmo_kimkautz( + tr(" KimKautz").toUtf8().constData()); + tmo_kimkautz.add_options() + ( + "tmoKimKautzC1", + po::value(&tmopts->operator_options.kimkautzoptions.c1), + tr("c1 FLOAT").toUtf8().constData() + ) + ( + "tmoKimKautzC2", + po::value(&tmopts->operator_options.kimkautzoptions.c2), + tr("c2 FLOAT").toUtf8().constData()); + po::options_description tmo_mantiuk06( + tr(" Mantiuk 06").toUtf8().constData()); + tmo_mantiuk06.add_options()( + "tmoM06Contrast", + po::value( + &tmopts->operator_options.mantiuk06options.contrastfactor), + tr("contrast FLOAT").toUtf8().constData())( + "tmoM06Saturation", + po::value( + &tmopts->operator_options.mantiuk06options.saturationfactor), + tr("saturation FLOAT").toUtf8().constData())( + "tmoM06Detail", + po::value( + &tmopts->operator_options.mantiuk06options.detailfactor), + tr("detail FLOAT").toUtf8().constData())( + "tmoM06ContrastEqual", + po::value( + &tmopts->operator_options.mantiuk06options.contrastequalization), + tr("equalization true|false").toUtf8().constData()); + po::options_description tmo_mantiuk08( + tr(" Mantiuk 08").toUtf8().constData()); + tmo_mantiuk08.add_options()( + "tmoM08ColorSaturation", + po::value( + &tmopts->operator_options.mantiuk08options.colorsaturation), + tr("color saturation FLOAT").toUtf8().constData())( + "tmoM08ConstrastEnh", + po::value( + &tmopts->operator_options.mantiuk08options.contrastenhancement), + tr("contrast enhancement FLOAT").toUtf8().constData())( + "tmoM08LuminanceLvl", + po::value( + &tmopts->operator_options.mantiuk08options.luminancelevel), + tr("luminance level FLOAT").toUtf8().constData())( + "tmoM08SetLuminance", + po::value( + &tmopts->operator_options.mantiuk08options.setluminance), + tr("enable luminance level true|false").toUtf8().constData()); po::options_description tmo_durand(tr(" Durand").toUtf8().constData()); - tmo_durand.add_options() - ("tmoDurSigmaS", po::value(&tmopts->operator_options.durandoptions.spatial), tr("spatial kernel sigma FLOAT").toUtf8().constData()) - ("tmoDurSigmaR", po::value(&tmopts->operator_options.durandoptions.range), tr("range kernel sigma FLOAT").toUtf8().constData()) - ("tmoDurBase", po::value(&tmopts->operator_options.durandoptions.base), tr("base contrast FLOAT").toUtf8().constData()) - ; + tmo_durand.add_options()( + "tmoDurSigmaS", + po::value(&tmopts->operator_options.durandoptions.spatial), + tr("spatial kernel sigma FLOAT").toUtf8().constData())( + "tmoDurSigmaR", + po::value(&tmopts->operator_options.durandoptions.range), + tr("range kernel sigma FLOAT").toUtf8().constData())( + "tmoDurBase", + po::value(&tmopts->operator_options.durandoptions.base), + tr("base contrast FLOAT").toUtf8().constData()); po::options_description tmo_drago(tr(" Drago").toUtf8().constData()); - tmo_drago.add_options() - ("tmoDrgBias", po::value(&tmopts->operator_options.dragooptions.bias), tr("bias FLOAT").toUtf8().constData()) - ; - po::options_description tmo_reinhard02(tr(" Reinhard 02").toUtf8().constData()); - tmo_reinhard02.add_options() - ("tmoR02Key", po::value(&tmopts->operator_options.reinhard02options.key), tr("key value FLOAT").toUtf8().constData()) - ("tmoR02Phi", po::value(&tmopts->operator_options.reinhard02options.phi), tr("phi FLOAT").toUtf8().constData()) - ("tmoR02Scales", po::value(&tmopts->operator_options.reinhard02options.scales), tr("use scales true|false").toUtf8().constData()) - ("tmoR02Num", po::value(&tmopts->operator_options.reinhard02options.range), tr("range FLOAT").toUtf8().constData()) - ("tmoR02Low", po::value(&tmopts->operator_options.reinhard02options.lower), tr("lower scale FLOAT").toUtf8().constData()) - ("tmoR02High", po::value(&tmopts->operator_options.reinhard02options.upper), tr("upper scale FLOAT").toUtf8().constData()) - ; - po::options_description tmo_reinhard05(tr(" Reinhard 05").toUtf8().constData()); - tmo_reinhard05.add_options() - ("tmoR05Brightness", po::value(&tmopts->operator_options.reinhard05options.brightness), tr("Brightness FLOAT").toUtf8().constData()) - ("tmoR05Chroma", po::value(&tmopts->operator_options.reinhard05options.chromaticAdaptation), tr("Chroma adaption FLOAT").toUtf8().constData()) - ("tmoR05Lightness", po::value(&tmopts->operator_options.reinhard05options.lightAdaptation), tr("Light adaption FLOAT").toUtf8().constData()) - ; + tmo_drago.add_options()( + "tmoDrgBias", + po::value(&tmopts->operator_options.dragooptions.bias), + tr("bias FLOAT").toUtf8().constData()); + po::options_description tmo_reinhard02( + tr(" Reinhard 02").toUtf8().constData()); + tmo_reinhard02.add_options()( + "tmoR02Key", + po::value(&tmopts->operator_options.reinhard02options.key), + tr("key value FLOAT").toUtf8().constData())( + "tmoR02Phi", + po::value(&tmopts->operator_options.reinhard02options.phi), + tr("phi FLOAT").toUtf8().constData())( + "tmoR02Scales", + po::value(&tmopts->operator_options.reinhard02options.scales), + tr("use scales true|false").toUtf8().constData())( + "tmoR02Num", + po::value(&tmopts->operator_options.reinhard02options.range), + tr("range FLOAT").toUtf8().constData())( + "tmoR02Low", + po::value(&tmopts->operator_options.reinhard02options.lower), + tr("lower scale FLOAT").toUtf8().constData())( + "tmoR02High", + po::value(&tmopts->operator_options.reinhard02options.upper), + tr("upper scale FLOAT").toUtf8().constData()); + po::options_description tmo_reinhard05( + tr(" Reinhard 05").toUtf8().constData()); + tmo_reinhard05.add_options()( + "tmoR05Brightness", + po::value( + &tmopts->operator_options.reinhard05options.brightness), + tr("Brightness FLOAT").toUtf8().constData())( + "tmoR05Chroma", + po::value( + &tmopts->operator_options.reinhard05options.chromaticAdaptation), + tr("Chroma adaption FLOAT").toUtf8().constData())( + "tmoR05Lightness", + po::value( + &tmopts->operator_options.reinhard05options.lightAdaptation), + tr("Light adaption FLOAT").toUtf8().constData()); po::options_description tmo_ash(tr(" Ashikmin").toUtf8().constData()); - tmo_ash.add_options() - ("tmoAshEq2", po::value(&tmopts->operator_options.ashikhminoptions.eq2), tr("Equation number 2 true|false").toUtf8().constData()) - ("tmoAshSimple", po::value(&tmopts->operator_options.ashikhminoptions.simple), tr("Simple true|false").toUtf8().constData()) - ("tmoAshLocal", po::value(&tmopts->operator_options.ashikhminoptions.lct), tr("Local threshold FLOAT").toUtf8().constData()) - ; + tmo_ash.add_options()( + "tmoAshEq2", + po::value(&tmopts->operator_options.ashikhminoptions.eq2), + tr("Equation number 2 true|false").toUtf8().constData())( + "tmoAshSimple", + po::value(&tmopts->operator_options.ashikhminoptions.simple), + tr("Simple true|false").toUtf8().constData())( + "tmoAshLocal", + po::value(&tmopts->operator_options.ashikhminoptions.lct), + tr("Local threshold FLOAT").toUtf8().constData()); po::options_description tmo_patt(tr(" Pattanaik").toUtf8().constData()); - tmo_patt.add_options() - ("tmoPatMultiplier", po::value(&tmopts->operator_options.pattanaikoptions.multiplier), tr("multiplier FLOAT").toUtf8().constData()) - ("tmoPatLocal", po::value(&tmopts->operator_options.pattanaikoptions.local), tr("Local tone mapping true|false").toUtf8().constData()) - ("tmoPatAutoLum", po::value(&tmopts->operator_options.pattanaikoptions.autolum), tr("Auto luminance true|false").toUtf8().constData()) - ("tmoPatCone", po::value(&tmopts->operator_options.pattanaikoptions.cone), tr("cone level FLOAT").toUtf8().constData()) - ("tmoPatRod", po::value(&tmopts->operator_options.pattanaikoptions.rod), tr("rod level FLOAT").toUtf8().constData()) - ; + tmo_patt.add_options()( + "tmoPatMultiplier", + po::value(&tmopts->operator_options.pattanaikoptions.multiplier), + tr("multiplier FLOAT").toUtf8().constData())( + "tmoPatLocal", + po::value(&tmopts->operator_options.pattanaikoptions.local), + tr("Local tone mapping true|false").toUtf8().constData())( + "tmoPatAutoLum", + po::value(&tmopts->operator_options.pattanaikoptions.autolum), + tr("Auto luminance true|false").toUtf8().constData())( + "tmoPatCone", + po::value(&tmopts->operator_options.pattanaikoptions.cone), + tr("cone level FLOAT").toUtf8().constData())( + "tmoPatRod", + po::value(&tmopts->operator_options.pattanaikoptions.rod), + tr("rod level FLOAT").toUtf8().constData()); + po::options_description tmo_vanhateren( + tr(" VanHateren").toUtf8().constData()); + tmo_vanhateren.add_options() + ( + "tmoVanHaterenPupilArea", + po::value(&tmopts->operator_options.vanhaterenoptions.pupil_area), + tr("pupil_area FLOAT").toUtf8().constData()); + po::options_description tmo_lischinski( + tr(" Lischinski").toUtf8().constData()); + tmo_lischinski.add_options() + ( + "tmoLischinskiAlpha", + po::value(&tmopts->operator_options.lischinskioptions.alpha), + tr("alpha FLOAT").toUtf8().constData()); tmo_desc.add(tmo_fattal); tmo_desc.add(tmo_ferradans); + tmo_desc.add(tmo_ferwerda); + tmo_desc.add(tmo_kimkautz); tmo_desc.add(tmo_mantiuk06); tmo_desc.add(tmo_mantiuk08); tmo_desc.add(tmo_durand); @@ -265,25 +439,34 @@ tmo_desc.add(tmo_reinhard05); tmo_desc.add(tmo_ash); tmo_desc.add(tmo_patt); - + tmo_desc.add(tmo_vanhateren); + tmo_desc.add(tmo_lischinski); po::options_description hidden("Hidden options"); - hidden.add_options() - ("input-file", po::value< vector >(), "input file") - ; + hidden.add_options()("input-file", po::value>(), + "input file"); po::positional_options_description p; p.add("input-file", -1); po::options_description cmdline_options; - cmdline_options.add(desc).add(hdr_desc).add(ldr_desc).add(html_desc).add(tmo_desc).add(hidden); + cmdline_options.add(desc) + .add(hdr_desc) + .add(ldr_desc) + .add(html_desc) + .add(tmo_desc) + .add(hidden); po::options_description cmdvisible_options; - cmdvisible_options.add(desc).add(hdr_desc).add(ldr_desc).add(html_desc).add(tmo_desc); + cmdvisible_options.add(desc).add(hdr_desc).add(ldr_desc).add(html_desc).add( + tmo_desc); - try - { - po::store(po::command_line_parser(argc, argv).options(cmdline_options).positional(p).run(), vm); + try { + po::store(po::command_line_parser(argc, argv) + .options(cmdline_options) + .positional(p) + .run(), + vm); po::notify(vm); if (vm.count("help")) { @@ -291,20 +474,23 @@ return 1; } if (vm.count("version")) { - cout << tr("Luminance HDR version ").toStdString() + LUMINANCEVERSION + - " [Build " + QString(g_GIT_SHA1).left(6).toStdString() + "]" << endl; + cout << tr("Luminance HDR version ").toStdString() + + LUMINANCEVERSION + " [Build " + + QString(g_GIT_SHA1).left(6).toStdString() + "]" + << endl; return 1; } if (vm.count("verbose")) { verbose = true; } if (vm.count("cameras")) { - cout << tr("With LibRaw version ").toStdString() << LibRaw::version() << endl; - cout << LibRaw::cameraCount() << tr(" models listed").toStdString() << endl; + cout << tr("With LibRaw version ").toStdString() + << LibRaw::version() << endl; + cout << LibRaw::cameraCount() << tr(" models listed").toStdString() + << endl; cout << endl; const char **list = LibRaw::cameraList(); - while (*list) - cout << *list++ << endl; + while (*list) cout << *list++ << endl; return 1; } if (vm.count("autolevels")) { @@ -313,10 +499,23 @@ if (vm.count("createwebpage")) { isHtml = true; } + if (vm.count("proposedldrname")) { + isProposedLdrName = true; + if (!validLdrExtensions.contains( + QString::fromStdString(ldrExtension), Qt::CaseInsensitive)) + printErrorAndExit(tr("Error: Unsupported LDR file type.")); + } + if (vm.count("proposedhdrname")) { + isProposedHdrName = true; + if (!validHdrExtensions.contains( + QString::fromStdString(hdrExtension), Qt::CaseInsensitive)) + printErrorAndExit(tr("Error: Unsupported HDR file type.")); + } if (vm.count("htmlQuality")) { htmlQuality = vm["htmlQuality"].as(); if (htmlQuality < 1 || htmlQuality > 4) - printErrorAndExit(tr("Error: htmlQuality must be in the range [1..4].")); + printErrorAndExit( + tr("Error: htmlQuality must be in the range [1..4].")); } if (vm.count("pageName")) { pageName = vm["pageName"].as(); @@ -325,117 +524,143 @@ imagesDir = vm["imagesDir"].as(); } if (vm.count("align")) { - const char* value = vm["align"].as().c_str(); - if (strcmp(value,"AIS")==0) + const char *value = vm["align"].as().c_str(); + if (strcmp(value, "AIS") == 0) alignMode = AIS_ALIGN; - else if (strcmp(value,"MTB")==0) + else if (strcmp(value, "MTB") == 0) alignMode = MTB_ALIGN; else - printErrorAndExit(tr("Error: Alignment engine not recognized.")); + printErrorAndExit( + tr("Error: Alignment engine not recognized.")); } if (vm.count("ev")) { - QStringList evstringlist=QString::fromStdString(vm["ev"].as()).split(","); - for (int i=0; i()) + .split(QStringLiteral(",")); + for (int i = 0; i < evstringlist.count(); i++) ev.append(toFloatWithErrMsg(evstringlist.at(i))); } if (vm.count("hdrWeight")) { - const char* value = vm["hdrWeight"].as().c_str(); - if (strcmp(value,"triangular")==0) + const char *value = vm["hdrWeight"].as().c_str(); + if (strcmp(value, "triangular") == 0) hdrcreationconfig.weightFunction = WEIGHT_TRIANGULAR; - else if (strcmp(value,"gaussian")==0) + else if (strcmp(value, "gaussian") == 0) hdrcreationconfig.weightFunction = WEIGHT_GAUSSIAN; - else if (strcmp(value,"plateau")==0) + else if (strcmp(value, "plateau") == 0) hdrcreationconfig.weightFunction = WEIGHT_PLATEAU; - else if (strcmp(value,"flat")==0) + else if (strcmp(value, "flat") == 0) hdrcreationconfig.weightFunction = WEIGHT_FLAT; else - printErrorAndExit(tr("Error: Unknown weight function specified.")); + printErrorAndExit( + tr("Error: Unknown weight function specified.")); } if (vm.count("hdrResponseCurve")) { - const char* value = vm["hdrResponseCurve"].as().c_str(); - if (strcmp(value,"from_file")==0) + const char *value = + vm["hdrResponseCurve"].as().c_str(); + if (strcmp(value, "from_file") == 0) hdrcreationconfig.responseCurve = RESPONSE_CUSTOM; - else if (strcmp(value,"linear")==0) + else if (strcmp(value, "linear") == 0) hdrcreationconfig.responseCurve = RESPONSE_LINEAR; - else if (strcmp(value,"gamma")==0) + else if (strcmp(value, "gamma") == 0) hdrcreationconfig.responseCurve = RESPONSE_GAMMA; - else if (strcmp(value,"log")==0) + else if (strcmp(value, "log") == 0) hdrcreationconfig.responseCurve = RESPONSE_LOG10; - else if (strcmp(value,"srgb")==0) + else if (strcmp(value, "srgb") == 0) hdrcreationconfig.responseCurve = RESPONSE_SRGB; else - printErrorAndExit(tr("Error: Unknown response curve specified.")); + printErrorAndExit( + tr("Error: Unknown response curve specified.")); } if (vm.count("hdrModel")) { - const char* value = vm["hdrModel"].as().c_str(); - if (strcmp(value,"robertson")==0) + const char *value = vm["hdrModel"].as().c_str(); + if (strcmp(value, "robertson") == 0) hdrcreationconfig.fusionOperator = ROBERTSON; - else if (strcmp(value,"robertsonauto")==0) + else if (strcmp(value, "robertsonauto") == 0) hdrcreationconfig.fusionOperator = ROBERTSON_AUTO; - else if (strcmp(value,"debevec")==0) + else if (strcmp(value, "debevec") == 0) hdrcreationconfig.fusionOperator = DEBEVEC; else - printErrorAndExit(tr("Error: Unknown HDR creation model specified.")); + printErrorAndExit( + tr("Error: Unknown HDR creation model specified.")); } if (vm.count("hdrCurveFilename")) - hdrcreationconfig.inputResponseCurveFilename = QString::fromStdString(vm["hdrCurveFilename"].as()); + hdrcreationconfig.inputResponseCurveFilename = + QString::fromStdString( + vm["hdrCurveFilename"].as()); if (vm.count("tmo")) { - const char* value = vm["tmo"].as().c_str(); - if (strcmp(value,"ashikhmin")==0) - tmopts->tmoperator=ashikhmin; - else if (strcmp(value,"drago")==0) - tmopts->tmoperator=drago; - else if (strcmp(value,"durand")==0) - tmopts->tmoperator=durand; - else if (strcmp(value,"fattal")==0) - tmopts->tmoperator=fattal; - else if (strcmp(value,"ferradans")==0) - tmopts->tmoperator=ferradans; - else if (strcmp(value,"mai")==0) - tmopts->tmoperator=mai; - else if (strcmp(value,"pattanaik")==0) - tmopts->tmoperator=pattanaik; - else if (strcmp(value,"reinhard02")==0) - tmopts->tmoperator=reinhard02; - else if (strcmp(value,"reinhard05")==0) - tmopts->tmoperator=reinhard05; - else if (strcmp(value,"mantiuk06")==0) - tmopts->tmoperator=mantiuk06; - else if (strcmp(value,"mantiuk08")==0) - tmopts->tmoperator=mantiuk08; + const char *value = vm["tmo"].as().c_str(); + if (strcmp(value, "ashikhmin") == 0) + tmopts->tmoperator = ashikhmin; + else if (strcmp(value, "drago") == 0) + tmopts->tmoperator = drago; + else if (strcmp(value, "durand") == 0) + tmopts->tmoperator = durand; + else if (strcmp(value, "fattal") == 0) + tmopts->tmoperator = fattal; + else if (strcmp(value, "ferradans") == 0) + tmopts->tmoperator = ferradans; + else if (strcmp(value, "ferwerda") == 0) + tmopts->tmoperator = ferwerda; + else if (strcmp(value, "kimkautz") == 0) + tmopts->tmoperator = kimkautz; + else if (strcmp(value, "mai") == 0) + tmopts->tmoperator = mai; + else if (strcmp(value, "pattanaik") == 0) + tmopts->tmoperator = pattanaik; + else if (strcmp(value, "reinhard02") == 0) + tmopts->tmoperator = reinhard02; + else if (strcmp(value, "reinhard05") == 0) + tmopts->tmoperator = reinhard05; + else if (strcmp(value, "mantiuk06") == 0) + tmopts->tmoperator = mantiuk06; + else if (strcmp(value, "mantiuk08") == 0) + tmopts->tmoperator = mantiuk08; + else if (strcmp(value, "vanhateren") == 0) + tmopts->tmoperator = vanhateren; + else if (strcmp(value, "lischinski") == 0) + tmopts->tmoperator = lischinski; else - printErrorAndExit(tr("Error: Unknown tone mapping operator specified.")); + printErrorAndExit( + tr("Error: Unknown tone mapping operator specified.")); } if (vm.count("tmofile")) { - QString settingFile = QString::fromStdString(vm["tmofile"].as()); - printIfVerbose(QObject::tr("Loading TMO settings from file: %1").arg(settingFile), verbose); - try - { - TonemappingOptions* options = TMOptionsOperations::parseFile(settingFile); + QString settingFile = + QString::fromStdString(vm["tmofile"].as()); + printIfVerbose(QObject::tr("Loading TMO settings from file: %1") + .arg(settingFile), + verbose); + try { + TonemappingOptions *options = + TMOptionsOperations::parseFile(settingFile); if (options != NULL) tmopts.reset(options); else - printErrorAndExit(tr("Error: The specified file with TMO settings could not be parsed!")); - } - catch (QString &error) - { - printErrorAndExit(tr("Error: The specified file with TMO settings could not be parsed!: %1").arg(error)); - } - catch (...) - { - printErrorAndExit(tr("Error: The specified file with TMO settings could not be parsed!")); + printErrorAndExit( + tr("Error: The specified file with TMO " + "settings could not be " + "parsed!")); + } catch (QString &error) { + printErrorAndExit( + tr("Error: The specified file with TMO settings " + "could not be parsed!: %1") + .arg(error)); + } catch (...) { + printErrorAndExit(tr( + "Error: The specified file with TMO settings could not be " + "parsed!")); } } if (vm.count("ldrQuality")) { int quality = vm["ldrQuality"].as(); if (quality < 1 || quality > 100) - printErrorAndExit(tr("Error: Quality must be in the range [1..100].")); + printErrorAndExit( + tr("Error: Quality must be in the range [1..100].")); else tmofileparams->set("quality", (size_t)quality); } if (vm.count("ldrTiff")) { - const char* value = vm["ldrTiff"].as().c_str(); + const char *value = vm["ldrTiff"].as().c_str(); if (strcmp(value, "8b") == 0) tmofileparams->set("tiff_mode", (int)0); else if (strcmp(value, "16b") == 0) @@ -448,246 +673,321 @@ printErrorAndExit(tr("Error: Unknown tiff format.")); } if (vm.count("ldrTiffDeflate")) - tmofileparams->set("deflateCompression", vm["ldrTiffDeflate"].as()); + tmofileparams->set("deflateCompression", + vm["ldrTiffDeflate"].as()); if (vm.count("load")) - loadHdrFilename = QString::fromStdString(vm["load"].as()); - if (vm.count("save")) - saveHdrFilename = QString::fromStdString(vm["save"].as()); - if (vm.count("output")) - saveLdrFilename = QString::fromStdString(vm["output"].as()); + loadHdrFilename = + QString::fromStdString(vm["load"].as()); + if (vm.count("save")) { + saveHdrFilename = + QString::fromStdString(vm["save"].as()); + // let's determine file extension + int counter = saveHdrFilename.count("."); + QString fileExtension = saveHdrFilename.section(".", counter); + if (!validHdrExtensions.contains(fileExtension, + Qt::CaseInsensitive)) + printErrorAndExit(tr("Error: Unsupported HDR file type.")); + } + if (vm.count("output")) { + saveLdrFilename = + QString::fromStdString(vm["output"].as()); + // let's determine file extension + int counter = saveLdrFilename.count("."); + QString fileExtension = saveLdrFilename.section(".", counter); + if (!validLdrExtensions.contains(fileExtension, + Qt::CaseInsensitive)) + printErrorAndExit(tr("Error: Unsupported LDR file type.")); + } if (vm.count("savealigned")) - saveAlignedImagesPrefix = QString::fromStdString(vm["savealigned"].as()); + saveAlignedImagesPrefix = + QString::fromStdString(vm["savealigned"].as()); if (threshold < 0.0f || threshold > 1.0f) - printErrorAndExit(tr("Error: Threshold must be in the range [0..1].")); + printErrorAndExit( + tr("Error: Threshold must be in the range [0..1].")); - } - catch(boost::program_options::required_option& e) - { - std::cerr << "ERROR: " << e.what() << std::endl << std::endl; - return 1; - } - catch(boost::program_options::error& e) - { - std::cerr << "ERROR: " << e.what() << std::endl << std::endl; - return 1; + } catch (boost::program_options::required_option &e) { + std::cerr << "ERROR: " << e.what() << std::endl << std::endl; + return 1; + } catch (boost::program_options::error &e) { + std::cerr << "ERROR: " << e.what() << std::endl << std::endl; + return 1; } - if (vm.count("input-file")) - { - vector options = vm["input-file"].as< vector >(); - for (int i = 0, size = options.size(); i < size; i++) - { + if (vm.count("input-file")) { + vector options = vm["input-file"].as>(); + for (int i = 0, size = options.size(); i < size; i++) { inputFiles << QString::fromStdString(options[i]); - printIfVerbose( QObject::tr("Input file %1").arg(QString::fromStdString(options[i])) , verbose); - //cout << options[i] << "\n"; + printIfVerbose(QObject::tr("Input file %1") + .arg(QString::fromStdString(options[i])), + verbose); + // cout << options[i] << "\n"; } } - if (loadHdrFilename.isEmpty() && inputFiles.size() == 0) - { + if (loadHdrFilename.isEmpty() && inputFiles.size() == 0) { cout << cmdvisible_options << endl; - return 1; + exit(0); // Exit here instead of returning to main complicating main code } - QTimer::singleShot(0, this, SLOT(execCommandLineParamsSlot())); - return 0; + QTimer::singleShot(0, this, + &CommandLineInterfaceManager::execCommandLineParamsSlot); + return EXIT_SUCCESS; } -void CommandLineInterfaceManager::execCommandLineParamsSlot() -{ - if (!ev.isEmpty() && ev.count()!=inputFiles.count()) - { - printErrorAndExit(tr("Error: The number of EV values specified is different from the number of input files.")); - } - //now validate operation mode. - if ( inputFiles.size()!=0 && loadHdrFilename.isEmpty() ) - { +void CommandLineInterfaceManager::execCommandLineParamsSlot() { + if (!ev.isEmpty() && ev.count() != inputFiles.count()) { + printErrorAndExit( + tr("Error: The number of EV values specified is different from the " + "number of input files.")); + } + // now validate operation mode. + if (inputFiles.size() != 0 && loadHdrFilename.isEmpty()) { operationMode = CREATE_HDR_MODE; printIfVerbose(QObject::tr("Running in HDR-creation mode."), verbose); - } - else if (!loadHdrFilename.isEmpty() && inputFiles.size()==0 ) - { + } else if (!loadHdrFilename.isEmpty() && inputFiles.size() == 0) { operationMode = LOAD_HDR_MODE; printIfVerbose(QObject::tr("Running in Load-HDR mode."), verbose); - } - else - { + } else { exit(-1); } - if (operationMode == CREATE_HDR_MODE) - { - if (verbose) - { + if (operationMode == CREATE_HDR_MODE) { + if (verbose) { LuminanceOptions luminance_options; - printIfVerbose(QObject::tr("Temporary directory: %1").arg(luminance_options.getTempDir()), verbose); - printIfVerbose(QObject::tr("Using %n threads.", "", luminance_options.getNumThreads()), verbose); - } - hdrCreationManager.reset( new HdrCreationManager(true) ); - connect(hdrCreationManager.data(), SIGNAL(finishedLoadingFiles()), this, SLOT(finishedLoadingInputFiles())); - connect(hdrCreationManager.data(), SIGNAL(finishedAligning(int)), this, SLOT(createHDR(int))); - connect(hdrCreationManager.data(), SIGNAL(ais_failed(QProcess::ProcessError)), this, SLOT(ais_failed(QProcess::ProcessError))); - connect(hdrCreationManager.data(), SIGNAL(errorWhileLoading(QString)),this, SLOT(errorWhileLoading(QString))); - connect(hdrCreationManager.data(), SIGNAL(aisDataReady(QByteArray)),this, SLOT(readData(QByteArray))); + printIfVerbose(QObject::tr("Temporary directory: %1") + .arg(luminance_options.getTempDir()), + verbose); + printIfVerbose(QObject::tr("Using %n thread(s).", "", + luminance_options.getNumThreads()), + verbose); + } + hdrCreationManager.reset(new HdrCreationManager(true)); + connect(hdrCreationManager.data(), + &HdrCreationManager::finishedLoadingFiles, this, + &CommandLineInterfaceManager::finishedLoadingInputFiles); + connect(hdrCreationManager.data(), + &HdrCreationManager::finishedAligning, this, + &CommandLineInterfaceManager::createHDR); + connect(hdrCreationManager.data(), &HdrCreationManager::ais_failed, + this, &CommandLineInterfaceManager::ais_failed); + connect(hdrCreationManager.data(), + &HdrCreationManager::errorWhileLoading, this, + &CommandLineInterfaceManager::errorWhileLoading); + connect(hdrCreationManager.data(), &HdrCreationManager::aisDataReady, + this, &CommandLineInterfaceManager::readData); - try - { + try { hdrCreationManager->setConfig(hdrcreationconfig); hdrCreationManager->loadFiles(inputFiles); - } - catch(std::runtime_error &e) - { + } catch (std::runtime_error &e) { printErrorAndExit(e.what()); + } catch (...) { + printErrorAndExit(QStringLiteral("Catched unhandled exception")); } - catch(...) - { - printErrorAndExit("Catched unhandled exception"); - } - } - else - { - printIfVerbose(QObject::tr("Loading file %1").arg(loadHdrFilename), verbose); - - HDR.reset( IOWorker().read_hdr_frame(loadHdrFilename) ); - - if ( HDR != NULL ) - { - printIfVerbose(QObject::tr("Successfully loaded file %1.").arg(loadHdrFilename), verbose); + } else { + printIfVerbose(QObject::tr("Loading file %1").arg(loadHdrFilename), + verbose); + + try { + HDR.reset(IOWorker().read_hdr_frame(loadHdrFilename)); + } catch (...) { + printErrorAndExit(QStringLiteral("Catched unhandled exception")); + } + + if (HDR != NULL) { + printIfVerbose(QObject::tr("Successfully loaded file %1.") + .arg(loadHdrFilename), + verbose); saveHDR(); - } - else - { + } else { printErrorAndExit(tr("Load file %1 failed").arg(loadHdrFilename)); } } } -void CommandLineInterfaceManager::finishedLoadingInputFiles() -{ +void CommandLineInterfaceManager::finishedLoadingInputFiles() { QStringList filesLackingExif = hdrCreationManager->getFilesWithoutExif(); - if (filesLackingExif.size() !=0 && ev.isEmpty()) - { - printErrorAndExit(tr("Error: Exif data missing in images and EV values not specified on the commandline, bailing out.")); + if (filesLackingExif.size() != 0 && ev.isEmpty()) { + printErrorAndExit(tr( + "Error: Exif data missing in images and EV values not specified on " + "the commandline, bailing out.")); } - if (!ev.isEmpty()) - { + if (!ev.isEmpty()) { for (int i = 0; i < ev.size(); i++) hdrCreationManager->getFile(i).setEV(ev.at(i)); - printIfVerbose( tr("EV values have been assigned.") , verbose); + printIfVerbose(tr("EV values have been assigned."), verbose); } - //hdrCreationManager->checkEVvalues(); - if (alignMode == AIS_ALIGN) - { - printIfVerbose( tr("Starting aligning...") , verbose); + // hdrCreationManager->checkEVvalues(); + if (alignMode == AIS_ALIGN) { + printIfVerbose(tr("Starting aligning..."), verbose); hdrCreationManager->align_with_ais(); - } - else if (alignMode == MTB_ALIGN) - { - printIfVerbose( tr("Starting aligning...") , verbose); + } else if (alignMode == MTB_ALIGN) { + printIfVerbose(tr("Starting aligning..."), verbose); hdrCreationManager->align_with_mtb(); - } - else if (alignMode == NO_ALIGN) - { + } else if (alignMode == NO_ALIGN) { createHDR(0); } } -void CommandLineInterfaceManager::ais_failed(QProcess::ProcessError) -{ - printErrorAndExit( tr("Failed executing align_image_stack")); +void CommandLineInterfaceManager::ais_failed(QProcess::ProcessError) { + printErrorAndExit(tr("Failed executing align_image_stack")); } -void CommandLineInterfaceManager::createHDR(int errorcode) -{ - if (errorcode != 0) - printIfVerbose( tr("Failed aligning images.") , verbose); +void CommandLineInterfaceManager::createHDR(int errorcode) { + if (errorcode != 0) printIfVerbose(tr("Failed aligning images."), verbose); - printIfVerbose( tr("Creating (in memory) the HDR.") , verbose); + printIfVerbose(tr("Creating (in memory) the HDR."), verbose); - if (errorcode == 0 && alignMode != NO_ALIGN && saveAlignedImagesPrefix != "") { + if (errorcode == 0 && alignMode != NO_ALIGN && + saveAlignedImagesPrefix != QLatin1String("")) { hdrCreationManager->saveImages(saveAlignedImagesPrefix); } if (threshold > 0) { - QList > dummyOffset; + QList> dummyOffset; QStringList::ConstIterator it = inputFiles.begin(); - while( it != inputFiles.end() ) { - dummyOffset.append(qMakePair(0,0)); + while (it != inputFiles.constEnd()) { + dummyOffset.append(qMakePair(0, 0)); ++it; } ProgressHelper ph; bool patches[agGridSize][agGridSize]; float patchesPercent; - int h0 = hdrCreationManager->computePatches(threshold, patches, patchesPercent, dummyOffset); - HDR.reset( hdrCreationManager->doAntiGhosting(patches, h0, false, &ph) ); // false means auto anti-ghosting - } - else { - HDR.reset( hdrCreationManager->createHdr() ); + int h0 = hdrCreationManager->computePatches( + threshold, patches, patchesPercent, dummyOffset); + HDR.reset(hdrCreationManager->doAntiGhosting( + patches, h0, false, &ph)); // false means auto anti-ghosting + } else { + HDR.reset(hdrCreationManager->createHdr()); } saveHDR(); } -void CommandLineInterfaceManager::saveHDR() -{ - if (!saveHdrFilename.isEmpty()) - { - printIfVerbose( tr("Saving to file %1.").arg(saveHdrFilename) , verbose); - - // write_hdr_frame by default saves to EXR, if it doesn't find a supported file type - if ( IOWorker().write_hdr_frame(HDR.data(), saveHdrFilename) ) - { - printIfVerbose( tr("Image %1 saved successfully").arg(saveHdrFilename) , verbose); - } - else - { - printIfVerbose( tr("Could not save %1").arg(saveHdrFilename) , verbose); +void CommandLineInterfaceManager::saveHDR() { + if (!saveHdrFilename.isEmpty() || isProposedHdrName) { + QString fileExtension; + QString caption; + + if (inputFiles.isEmpty()) { + if (isProposedHdrName) { + QFileInfo fi(loadHdrFilename); + saveHdrFilename = fi.completeBaseName(); + saveHdrFilename.append("." + + QString::fromStdString(hdrExtension)); + } + } else { + if (isProposedHdrName) { + caption = QString( + QObject::tr("Weights= ") + + getQString( + hdrCreationManager->getWeightFunction().getType()) + + QObject::tr(" - Response curve= ") + + getQString( + hdrCreationManager->getResponseCurve().getType()) + + QObject::tr(" - Model= ") + + getQString(hdrCreationManager->getFusionOperator())); + + QFileInfo fi1(inputFiles.first()); + + if (inputFiles.first() != inputFiles.last()) { + QFileInfo fi2(inputFiles.last()); + + saveHdrFilename = + fi1.completeBaseName() + "-" + fi2.completeBaseName(); + } + else { + saveHdrFilename = fi1.completeBaseName(); + } + saveHdrFilename.append("_" + caption); + saveHdrFilename.append("." + QString::fromStdString(hdrExtension)); + } } - } - else - { - printIfVerbose( tr("NOT Saving HDR image to file. %1").arg(saveHdrFilename) , verbose); + + printIfVerbose(tr("Saving to file %1.").arg(saveHdrFilename), verbose); + + // write_hdr_frame by default saves to EXR, if it doesn't find a + // supported + // file type + if (IOWorker().write_hdr_frame(HDR.data(), saveHdrFilename)) { + printIfVerbose( + tr("Image %1 saved successfully").arg(saveHdrFilename), + verbose); + } else { + printIfVerbose(tr("Could not save %1").arg(saveHdrFilename), + verbose); + } + } else { + printIfVerbose( + tr("NOT Saving HDR image to file. %1").arg(saveHdrFilename), + verbose); } if (isHtml && !isHtmlDone) { - printIfVerbose( tr("Exporting to HTML"), verbose); + printIfVerbose(tr("Exporting to HTML"), verbose); generateHTML(); } startTonemap(); } - -void CommandLineInterfaceManager::generateHTML() -{ +void CommandLineInterfaceManager::generateHTML() { if (operationMode == LOAD_HDR_MODE) { - if (pageName.empty()) - pageName = loadHdrFilename.toStdString(); - } - else { - if (pageName.empty()) - pageName = inputFiles.at(0).toStdString(); + if (pageName.empty()) pageName = loadHdrFilename.toStdString(); + } else { + if (pageName.empty()) pageName = inputFiles.at(0).toStdString(); } if (!imagesDir.empty()) { - QFileInfo qfi = QFileInfo(QDir::currentPath() + "/" + QString::fromStdString(imagesDir)); + QFileInfo qfi = QFileInfo(QDir::currentPath() + "/" + + QString::fromStdString(imagesDir)); if (!qfi.isDir()) - printErrorAndExit( tr("ERROR: directory %1 must exist").arg(QString::fromStdString(imagesDir) )); + printErrorAndExit(tr("ERROR: directory %1 must exist") + .arg(QString::fromStdString(imagesDir))); } - generate_hdrhtml(HDR.data(), pageName, "", imagesDir, "", "", htmlQuality, verbose); + generate_hdrhtml(HDR.data(), pageName, "", imagesDir, "", "", htmlQuality, + verbose); isHtmlDone = true; } -void CommandLineInterfaceManager::startTonemap() -{ - if (!saveLdrFilename.isEmpty()) - { - printIfVerbose( tr("Tonemapping requested, saving to file %1.").arg(saveLdrFilename) , verbose); +void CommandLineInterfaceManager::startTonemap() { + if (!saveLdrFilename.isEmpty() || isProposedLdrName) { + QString + inputfname; // to copy EXIF tags from 1st input image to saved LDR + if (inputFiles.isEmpty()) { + inputfname = QLatin1String("FromHdrFile"); + if (isProposedLdrName) { + QFileInfo fi(loadHdrFilename); + saveLdrFilename = fi.completeBaseName(); + saveLdrFilename.append("_" + tmopts->getPostfix()); + saveLdrFilename.append("." + + QString::fromStdString(ldrExtension)); + } + } else { + inputfname = inputFiles.first(); + if (isProposedLdrName) { + QFileInfo fi1(inputFiles.first()); + QFileInfo fi2(inputFiles.last()); + + saveLdrFilename = + fi1.completeBaseName() + "-" + fi2.completeBaseName(); + saveLdrFilename.append("_" + tmopts->getPostfix()); + saveLdrFilename.append("." + + QString::fromStdString(ldrExtension)); + } + } - //now check if user wants to resize (create thread with either -2 or true original size as first argument in ctor, see options.cpp). - //TODO + printIfVerbose(tr("Tonemapping requested, saving to file %1.") + .arg(saveLdrFilename), + verbose); + + // now check if user wants to resize (create thread with either -2 or + // true + // original size as first argument in ctor, + // see options.cpp). + // TODO tmopts->origxsize = HDR->getWidth(); #ifdef QT_DEBUG qDebug() << "XSIZE:" << tmopts->xsize; @@ -695,57 +995,63 @@ if (tmopts->xsize == -2) tmopts->xsize = HDR->getWidth(); else - printIfVerbose( tr("Resizing to width %1.").arg(tmopts->xsize) , verbose); + printIfVerbose(tr("Resizing to width %1.").arg(tmopts->xsize), + verbose); - if(tmopts->pregamma != 1) - printIfVerbose( tr("Applying gamma %1.").arg(tmopts->pregamma) , verbose); + if (tmopts->pregamma != 1) + printIfVerbose(tr("Applying gamma %1.").arg(tmopts->pregamma), + verbose); // Build TMWorker TMWorker tm_worker; - connect(&tm_worker, SIGNAL(tonemapSetMaximum(int)), this, SLOT(setProgressBar(int))); - connect(&tm_worker, SIGNAL(tonemapSetValue(int)), this, SLOT(updateProgressBar(int))); + connect(&tm_worker, &TMWorker::tonemapSetMaximum, this, + &CommandLineInterfaceManager::setProgressBar); + connect(&tm_worker, &TMWorker::tonemapSetValue, this, + &CommandLineInterfaceManager::updateProgressBar); + connect(&tm_worker, &TMWorker::tonemapFailed, this, + &CommandLineInterfaceManager::tonemapFailed); // Build a new TM frame // The scoped pointer will free the memory automatically later on - QScopedPointer tm_frame( tm_worker.computeTonemap(HDR.data(), tmopts.data(), BilinearInterp) ); + QScopedPointer tm_frame(tm_worker.computeTonemap( + HDR.data(), tmopts.data(), BilinearInterp)); - QString inputfname; // to copy EXIF tags from 1st input image to saved LDR - if (inputFiles.isEmpty()) - inputfname = ""; - else - inputfname = inputFiles.first(); - - //Autolevels - if (isAutolevels) - { + // Autolevels + if (isAutolevels) { float minL, maxL, gammaL; - QScopedPointer temp_qimage( fromLDRPFStoQImage(tm_frame.data()) ); + QScopedPointer temp_qimage( + fromLDRPFStoQImage(tm_frame.data())); computeAutolevels(temp_qimage.data(), 0.985f, minL, maxL, gammaL); pfs::gammaAndLevels(tm_frame.data(), minL, maxL, 0.f, 1.f, gammaL); } + if (tmopts->postsaturation != 1) + printIfVerbose(tr("\nApplying saturation enhancement %1.").arg(tmopts->postsaturation), + verbose); + if (tmopts->postgamma != 1) + printIfVerbose(tr("\nApplying post-gamma %1.").arg(tmopts->postgamma), + verbose); + // Create an ad-hoc IOWorker to save the file - if ( IOWorker().write_ldr_frame(tm_frame.data(), saveLdrFilename, - inputfname, - hdrCreationManager.data() ? hdrCreationManager->getExpotimes(): QVector(), - tmopts.data(), - *tmofileparams ) ) - { + if (IOWorker().write_ldr_frame( + tm_frame.data(), saveLdrFilename, inputfname, + hdrCreationManager.data() ? hdrCreationManager->getExpotimes() + : QVector(), + tmopts.data(), *tmofileparams)) { // File save successful - printIfVerbose( tr("\nImage %1 successfully saved").arg(saveLdrFilename) , verbose); - } - else - { + printIfVerbose( + tr("\nImage %1 successfully saved").arg(saveLdrFilename), + verbose); + } else { // File save failed - printErrorAndExit( tr("\nERROR: Cannot save to file: %1").arg(saveLdrFilename) ); + printErrorAndExit( + tr("\nERROR: Cannot save to file: %1").arg(saveLdrFilename)); } if (isHtml && !isHtmlDone) { generateHTML(); } emit finishedParsing(); - } - else - { - printIfVerbose( tr("Tonemapping NOT requested."), verbose); + } else { + printIfVerbose(tr("Tonemapping NOT requested."), verbose); if (isHtml && !isHtmlDone) { generateHTML(); } @@ -753,48 +1059,46 @@ } } -void CommandLineInterfaceManager::errorWhileLoading(QString errormessage) { - printErrorAndExit( tr("Failed loading images")); +void CommandLineInterfaceManager::errorWhileLoading( + const QString &errormessage) { + printErrorAndExit(tr("Failed loading images: %1").arg(errormessage)); } -void CommandLineInterfaceManager::setProgressBar(int max) -{ +void CommandLineInterfaceManager::setProgressBar(int max) { maximum = max; oldValue = 0; progressBar.reset(); progressBar.n = max; - if (verbose) - std::cout << std::endl; + if (verbose) std::cout << std::endl; started = true; } -void CommandLineInterfaceManager::updateProgressBar(int value) -{ +void CommandLineInterfaceManager::updateProgressBar(int value) { if (verbose) { if (value < 0) return; if (value < oldValue) { - //progressBar.reset(); - //progressBar.n = maximum; - //progressBar.start(); + // progressBar.reset(); + // progressBar.n = maximum; + // progressBar.start(); progressBar.cur = value; - progressBar.setPct( ((float)value)/maximum ); + progressBar.setPct(((float)value) / maximum); } if (started) { started = false; progressBar.start(); } - for (int i = 0; i < value - oldValue; i++) - ++progressBar; + for (int i = 0; i < value - oldValue; i++) ++progressBar; oldValue = value; - //if (value == progressBar.n) { + // if (value == progressBar.n) { // std::cout << std::endl; //} } } -void CommandLineInterfaceManager::readData(QByteArray data) -{ - if (verbose) - std::cout << data.constData() << std::endl; +void CommandLineInterfaceManager::readData(const QByteArray &data) { + if (verbose) std::cout << data.constData() << std::endl; } +void CommandLineInterfaceManager::tonemapFailed(const QString &e) { + printErrorAndExit(e); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/MainCli/commandline.h luminance-hdr-2.6.0/src/MainCli/commandline.h --- luminance-hdr-2.5.1+dfsg/src/MainCli/commandline.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainCli/commandline.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,25 +28,25 @@ #ifndef COMMANDLINE_H #define COMMANDLINE_H -#include -#include #include +#include #include +#include +#include -#include "Core/TonemappingOptions.h" -#include "HdrWizard/HdrCreationManager.h" -#include "Libpfs/frame.h" -#include "Libpfs/params.h" +#include +#include +#include +#include #include "ezETAProgressBar.hpp" -class CommandLineInterfaceManager : public QObject -{ +class CommandLineInterfaceManager : public QObject { Q_OBJECT -public: + public: CommandLineInterfaceManager(const int argc, char **argv); int execCommandLineParams(); -private: + private: const int argc; char **argv; @@ -56,11 +56,7 @@ UNKNOWN_MODE } operationMode; - enum align_mode { - AIS_ALIGN, - MTB_ALIGN, - NO_ALIGN - } alignMode; + enum align_mode { AIS_ALIGN, MTB_ALIGN, NO_ALIGN } alignMode; QList ev; QScopedPointer hdrCreationManager; @@ -84,24 +80,31 @@ bool isHtml; bool isHtmlDone; int htmlQuality; + bool isProposedLdrName; + bool isProposedHdrName; std::string pageName; std::string imagesDir; + std::string ldrExtension; + std::string hdrExtension; QString saveAlignedImagesPrefix; + QStringList validLdrExtensions; + QStringList validHdrExtensions; void generateHTML(); void startTonemap(); -private slots: + private slots: void finishedLoadingInputFiles(); void ais_failed(QProcess::ProcessError); - void errorWhileLoading(QString); + void errorWhileLoading(const QString &); void createHDR(int); void execCommandLineParamsSlot(); void setProgressBar(int); void updateProgressBar(int); - void readData(QByteArray); + void readData(const QByteArray &); + void tonemapFailed(const QString &); -signals: + signals: void finishedParsing(); }; diff -Nru luminance-hdr-2.5.1+dfsg/src/MainCli/ezETAProgressBar.hpp luminance-hdr-2.6.0/src/MainCli/ezETAProgressBar.hpp --- luminance-hdr-2.5.1+dfsg/src/MainCli/ezETAProgressBar.hpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainCli/ezETAProgressBar.hpp 2019-06-09 19:18:38.000000000 +0000 @@ -28,148 +28,150 @@ #ifndef EZ_ETAPROGRESSBAR_H #define EZ_ETAPROGRESSBAR_H -#include -#include +#include #include #include -#include +#include +#include #ifdef WIN32 -#define _WINSOCKAPI_ // stops windows.h including winsock.h +#define _WINSOCKAPI_ // stops windows.h including winsock.h #include #else -#include #include +#include #endif namespace ez { -// One-line refreshing progress bar inspired by wget that shows ETA (time remaining). +// One-line refreshing progress bar inspired by wget that shows ETA (time +// remaining). // 90% [################################################## ] ETA 12d 23h 56s class ezETAProgressBar { -public: - ezETAProgressBar(unsigned int p_n=0) : n(p_n), pct(0), cur(0), width(80), startTime(0), endTime(0) {} - void reset() { pct = 0; cur = 0; } - void start() { - #ifdef WIN32 - assert(QueryPerformanceFrequency(&g_llFrequency) != 0); - #endif - startTime = osQueryPerfomance(); - setPct(0); - } - - void operator++() { - if (cur >= n) return; - ++cur; - - setPct( ((float)cur)/n ); - }; - - // http://stackoverflow.com/questions/3283804/c-get-milliseconds-since-some-date - long long osQueryPerfomance() { - #ifdef WIN32 - LARGE_INTEGER llPerf = {0}; - QueryPerformanceCounter(&llPerf); - return llPerf.QuadPart * 1000ll / ( g_llFrequency.QuadPart / 1000ll); - #else - struct timeval stTimeVal; - gettimeofday(&stTimeVal, NULL); - return stTimeVal.tv_sec * 1000000ll + stTimeVal.tv_usec; - #endif - } - - std::string secondsToString(long long t) { - int days = t/86400; - long long sec = t-days*86400; - int hours = sec/3600; - sec -= hours*3600; - int mins = sec/60; - sec -= mins*60; - char tmp[8]; - std::string out; - - if (days) { - sprintf(tmp, "%dd ", days); - out += tmp; - } - - if (hours >= 1) { - sprintf(tmp, "%dh ", hours); - out += tmp; - } - - if (mins >= 1) { - sprintf(tmp, "%dm ", mins); - out += tmp; - } - - if (sec >= 1) { - sprintf(tmp, "%ds", (int)sec); - out += tmp; - } - - if (out.empty()) - out = "0s"; - - return out; - } - - // Set 0.0-1.0, where 1.0 equals 100%. - void setPct(float Pct) { - endTime = osQueryPerfomance(); - char pctstr[5]; - sprintf(pctstr, "%3d%%", (int)(100*Pct)); - // Compute how many tics we can display. - int nticsMax = (width-27); - int ntics = (int)(nticsMax*Pct); - std::string out(pctstr); - out.append(" ["); - out.append(ntics,'#'); - out.append(nticsMax-ntics,' '); - out.append("] "); - out.append((Pct<1.0) ? "ETA " : "in "); - // Seconds. - long long dt = (long long)((endTime-startTime)/1000000.0); - std::string tstr; - if (Pct >= 1.0) { - // Print overall time and newline. - tstr = secondsToString(dt); - out.append(tstr); - if (out.size() < width) - out.append(width-out.size(),' '); - - out.append("\n"); - std::cout << out; - return; - } else { - float eta=999999.; - if (Pct > 0.0) - eta = dt*(1.0-Pct)/Pct; - - if (eta > 604800.0) - out.append("> 1 week"); - else { - tstr = secondsToString((long long)eta); - out.append(tstr); - } - } - - // Pad end with spaces to overwrite previous string that may have been longer. - if (out.size() < width) - out.append(width-out.size(),' '); - - out.append("\r"); - std::cout << out; - std::cout.flush(); - } - - unsigned int n; - unsigned short pct; // Stored as 0-1000, so 2.5% is encoded as 25. - unsigned int cur; - unsigned char width; // How many chars the entire line can be. - long long startTime, endTime; - #ifdef WIN32 - LARGE_INTEGER g_llFrequency; - #endif + public: + ezETAProgressBar(unsigned int p_n = 0) + : n(p_n), pct(0), cur(0), width(80), startTime(0), endTime(0) {} + void reset() { + pct = 0; + cur = 0; + } + void start() { +#ifdef WIN32 + assert(QueryPerformanceFrequency(&g_llFrequency) != 0); +#endif + startTime = osQueryPerfomance(); + setPct(0); + } + + void operator++() { + if (cur >= n) return; + ++cur; + + setPct(((float)cur) / n); + }; + + // http://stackoverflow.com/questions/3283804/c-get-milliseconds-since-some-date + long long osQueryPerfomance() { +#ifdef WIN32 + LARGE_INTEGER llPerf = {0}; + QueryPerformanceCounter(&llPerf); + return llPerf.QuadPart * 1000ll / (g_llFrequency.QuadPart / 1000ll); +#else + struct timeval stTimeVal; + gettimeofday(&stTimeVal, NULL); + return stTimeVal.tv_sec * 1000000ll + stTimeVal.tv_usec; +#endif + } + + std::string secondsToString(long long t) { + int days = t / 86400; + long long sec = t - days * 86400; + int hours = sec / 3600; + sec -= hours * 3600; + int mins = sec / 60; + sec -= mins * 60; + char tmp[16]; + std::string out; + + if (days) { + sprintf(tmp, "%dd ", days); + out += tmp; + } + + if (hours >= 1) { + sprintf(tmp, "%dh ", hours); + out += tmp; + } + + if (mins >= 1) { + sprintf(tmp, "%dm ", mins); + out += tmp; + } + + if (sec >= 1) { + sprintf(tmp, "%ds", (int)sec); + out += tmp; + } + + if (out.empty()) out = "0s"; + + return out; + } + + // Set 0.0-1.0, where 1.0 equals 100%. + void setPct(float Pct) { + endTime = osQueryPerfomance(); + char pctstr[5]; + sprintf(pctstr, "%3d%%", (int)(100 * Pct)); + // Compute how many tics we can display. + int nticsMax = (width - 27); + int ntics = (int)(nticsMax * Pct); + std::string out(pctstr); + out.append(" ["); + out.append(ntics, '#'); + out.append(nticsMax - ntics, ' '); + out.append("] "); + out.append((Pct < 1.0) ? "ETA " : "in "); + // Seconds. + long long dt = (long long)((endTime - startTime) / 1000000.0); + std::string tstr; + if (Pct >= 1.0) { + // Print overall time and newline. + tstr = secondsToString(dt); + out.append(tstr); + if (out.size() < width) out.append(width - out.size(), ' '); + + out.append("\n"); + std::cout << out; + return; + } else { + float eta = 999999.; + if (Pct > 0.0) eta = dt * (1.0 - Pct) / Pct; + + if (eta > 604800.0) + out.append("> 1 week"); + else { + tstr = secondsToString((long long)eta); + out.append(tstr); + } + } + + // Pad end with spaces to overwrite previous string that may have been + // longer. + if (out.size() < width) out.append(width - out.size(), ' '); + + out.append("\r"); + std::cout << out; + std::cout.flush(); + } + + unsigned int n; + unsigned short pct; // Stored as 0-1000, so 2.5% is encoded as 25. + unsigned int cur; + unsigned char width; // How many chars the entire line can be. + long long startTime, endTime; +#ifdef WIN32 + LARGE_INTEGER g_llFrequency; +#endif }; } -#endif // EZ_ETAPROGRESSBAR_H +#endif // EZ_ETAPROGRESSBAR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/MainCli/main.cpp luminance-hdr-2.6.0/src/MainCli/main.cpp --- luminance-hdr-2.5.1+dfsg/src/MainCli/main.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainCli/main.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,36 +23,30 @@ #include -#include "Common/config.h" -#include "Common/TranslatorManager.h" #include "Common/LuminanceOptions.h" +#include "Common/TranslatorManager.h" +#include "Common/config.h" #include "MainCli/commandline.h" - -int main( int argc, char ** argv ) -{ +int main(int argc, char **argv) { QCoreApplication::setApplicationName(LUMINANCEAPPLICATION); QCoreApplication::setOrganizationName(LUMINANCEORGANIZATION); - QCoreApplication application( argc, argv ); + QCoreApplication application(argc, argv); LuminanceOptions lumOpts; - TranslatorManager::setLanguage( lumOpts.getGuiLang(), false ); + TranslatorManager::setLanguage(lumOpts.getGuiLang(), false); - CommandLineInterfaceManager cli( argc, argv ); + CommandLineInterfaceManager cli(argc, argv); - try - { + try { int result = cli.execCommandLineParams(); - if (result != 0) - return result; - } - catch(...) - { + if (result != 0) return result; + } catch (...) { return -1; } - application.connect(&cli, SIGNAL(finishedParsing()), &application, SLOT(quit())); + application.connect(&cli, SIGNAL(finishedParsing()), &application, + SLOT(quit())); return application.exec(); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/MainGui/CMakeLists.txt luminance-hdr-2.6.0/src/MainGui/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/MainGui/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainGui/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -5,8 +5,8 @@ #QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(main_gui ${FILES_CPP}) # ${FILES_H} ${FILES_MOC} -qt5_use_modules(main_gui Core Gui Widgets) +ADD_LIBRARY(main_gui STATIC ${FILES_CPP}) # ${FILES_H} ${FILES_MOC} +TARGET_LINK_LIBRARIES(main_gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} PARENT_SCOPE) # ${FILES_H} SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} main_gui PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/MainGui/main.cpp luminance-hdr-2.6.0/src/MainGui/main.cpp --- luminance-hdr-2.5.1+dfsg/src/MainGui/main.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainGui/main.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,101 +24,132 @@ */ #include -#include #include #include +#include +#include +#include #include #include +#include -#include "Common/global.h" -#include "Common/config.h" +#include "BatchHDR/BatchHDRDialog.h" +#include "BatchTM/BatchTMDialog.h" #include "Common/TranslatorManager.h" -#include "MainWindow/MainWindow.h" +#include "Common/config.h" +#include "Common/global.h" #include "MainWindow/DonationDialog.h" +#include "MainWindow/MainWindow.h" -namespace -{ -QStringList getCliFiles(const QStringList& arguments) -{ +namespace { +QStringList getCliFiles(const QStringList &arguments) { // empty QStringList; QStringList fileList; // check if any of the parameters is a proper file on the file system - // I skip the first value of the list because it is the name of the executable + // I skip the first value of the list because it is the name of the + // executable for (int i = 1; i < arguments.size(); ++i) { - QFile file( arguments.at(i).toLocal8Bit() ); + QFile file(arguments.at(i).toLocal8Bit()); - if ( file.exists() ) { - fileList.push_back( arguments.at(i).toLocal8Bit() ); + if (file.exists()) { + fileList.push_back(arguments.at(i).toLocal8Bit()); } } return fileList; } + +bool check_db() { + LuminanceOptions options; + + QSqlDatabase db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE")); + db.setDatabaseName(options.getDatabaseFileName()); + db.setHostName(QStringLiteral("localhost")); + bool ok = db.open(); + if (!ok) { + QTextStream out(stdout); + out << QObject::tr( + "The database used for saving TM parameters cannot " + "be opened.\n" + "Error: %1") + .arg(db.lastError().databaseText()); + } + return ok; +} } -#if defined(WIN32) || defined(__APPLE__) -void customMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg) -{ +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) +void customMessageHandler(QtMsgType type, const QMessageLogContext &context, + const QString &msg) { QString txt; switch (type) { - case QtDebugMsg: - txt = QString("Debug: %1").arg(msg); - break; - case QtWarningMsg: - txt = QString("Warning: %1").arg(msg); - break; - case QtCriticalMsg: - txt = QString("Critical: %1").arg(msg); - break; - case QtFatalMsg: - txt = QString("Fatal: %1").arg(msg); - abort(); + case QtDebugMsg: + txt = QString("Debug: %1").arg(msg); + break; + case QtWarningMsg: + txt = QString("Warning: %1").arg(msg); + break; + case QtCriticalMsg: + txt = QString("Critical: %1").arg(msg); + break; + case QtFatalMsg: + txt = QString("Fatal: %1").arg(msg); + abort(); } QFile outFile("debuglog.txt"); - if (outFile.open(QIODevice::WriteOnly | QIODevice::Append)) - { + if (outFile.open(QIODevice::WriteOnly | QIODevice::Append)) { QTextStream ts(&outFile); ts << txt << endl; } } #endif -int main( int argc, char ** argv ) -{ +int main(int argc, char **argv) { QCoreApplication::setApplicationName(LUMINANCEAPPLICATION); QCoreApplication::setOrganizationName(LUMINANCEORGANIZATION); -#ifdef WIN32 //TODO: there are problems with HiDPI on X11, let's enable this only on Windows by now +#ifdef Q_OS_WIN // TODO: there are problems with HiDPI on X11, let's enable this + // only on Windows by now QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif +#endif Q_INIT_RESOURCE(icons); - QApplication application( argc, argv ); - + QApplication application(argc, argv); -#ifdef WIN32 - //qInstallMessageHandler(customMessageHandler); +#ifdef Q_OS_WIN + // qInstallMessageHandler(customMessageHandler); - QIcon::setThemeSearchPaths( QStringList() << QGuiApplication::applicationDirPath() + QString("/icons/luminance-hdr") ); + QIcon::setThemeSearchPaths(QStringList() + << QGuiApplication::applicationDirPath() + + QString("/icons/luminance-hdr")); QIcon::setThemeName("luminance-hdr"); #endif -#ifdef __APPLE__ - QIcon::setThemeSearchPaths( QStringList() << QCoreApplication::applicationDirPath() + QString("/../Resources/icons/luminance-hdr") ); +#ifdef Q_OS_MACOS + QIcon::setThemeSearchPaths( + QStringList() << QCoreApplication::applicationDirPath() + + QString("/../Resources/icons/luminance-hdr")); QIcon::setThemeName("luminance-hdr"); #endif LuminanceOptions::isCurrentPortableMode = - QDir(QGuiApplication::applicationDirPath()).exists("PortableMode.txt"); +#ifdef Q_OS_MACOS + QDir(QGuiApplication::applicationDirPath()) + .exists(QStringLiteral("../../../.LuminanceHDR/PortableMode.txt")); +#else + QDir(QGuiApplication::applicationDirPath()) + .exists(QStringLiteral("PortableMode.txt")); +#endif LuminanceOptions::checkHomeFolder(); - if (LuminanceOptions::isCurrentPortableMode) - { + if (LuminanceOptions::isCurrentPortableMode) { QSettings::setDefaultFormat(QSettings::IniFormat); - QSettings::setPath(QSettings::IniFormat, - QSettings::UserScope, QDir::currentPath()); + QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, + QGuiApplication::applicationDirPath()); } LuminanceOptions::conditionallyDoUpgrade(); @@ -126,15 +157,54 @@ LuminanceOptions().applyTheme(true); - DonationDialog::showDonationDialog(); + QStringList arguments = application.arguments(); - // TODO: create update checker... - // TODO: pass update checker to MainWindow - MainWindow* mainWindow = new MainWindow; + QString appname = arguments.at(0); - mainWindow->show(); - mainWindow->openFiles( getCliFiles( application.arguments() ) ); + bool isBatchHDR = false; + bool isBatchTM = false; - return application.exec(); -} + foreach (QString arg, arguments) { + if (arg.startsWith("--batchhdr")) isBatchHDR = true; + if (arg.startsWith("--batchtm")) isBatchTM = true; + } + + if (appname.contains("luminance-hdr") && (!isBatchHDR) && (!isBatchTM)) { + +// If extra demosicing packs are not present warn the user and change settings if one of the missing methods is selected. +#ifndef DEMOSAICING_GPL2 + if (LuminanceOptions().getRawUserQuality() > 3) { + LuminanceOptions().setRawUserQuality( 3 ); + QMessageBox::warning(NULL, "", QObject::tr("This version of Luminance HDR has been compiled without support for extra "\ + "demosaicing algorithms.\nYour preferences were set to use one of the missing algorithms "\ + "and are now been changed to use the supported AHD method.\nTo change this " + "go to Tools->Preferences->Raw Conversion->Quality"), QMessageBox::Ok); + } +#endif + + DonationDialog::showDonationDialog(); + + // TODO: create update checker... + // TODO: pass update checker to MainWindow + MainWindow *mainWindow = new MainWindow; + + mainWindow->show(); + mainWindow->openFiles(getCliFiles(application.arguments())); + return application.exec(); + } else if (appname.contains("batch-tonemapping") || isBatchTM) { + if (!check_db()) return EXIT_FAILURE; + + BatchTMDialog *tmdialog = new BatchTMDialog; + + tmdialog->exec(); + } else if (appname.contains("batch-hdr") || isBatchHDR) { + if (!check_db()) return EXIT_FAILURE; + + BatchHDRDialog *hdrdialog = new BatchHDRDialog; + + hdrdialog->exec(); + } + + return EXIT_SUCCESS; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/CMakeLists.txt luminance-hdr-2.6.0/src/MainWindow/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/MainWindow/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -21,8 +21,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(mainwindow ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(mainwindow Core Gui Widgets Xml Network Concurrent) +ADD_LIBRARY(mainwindow STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(mainwindow Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml Qt5::Network Qt5::Concurrent) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} mainwindow PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/DnDOption.cpp luminance-hdr-2.6.0/src/MainWindow/DnDOption.cpp --- luminance-hdr-2.5.1+dfsg/src/MainWindow/DnDOption.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/DnDOption.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,12 +24,11 @@ #include "Common/global.h" #include "MainWindow/DnDOption.h" -#include "ui_DnDOption.h" +#include "MainWindow/ui_DnDOption.h" -DnDOptionDialog::DnDOptionDialog(QWidget *p, QStringList files, bool areAllHDRs, bool areAllLDRs): - QDialog(p), - ui(new Ui::DnDOption) -{ +DnDOptionDialog::DnDOptionDialog(QWidget *p, QStringList files, bool areAllHDRs, + bool areAllLDRs) + : QDialog(p), ui(new Ui::DnDOption) { ui->setupUi(this); result = ACTION_INVALID; ui->btnCreateNewHDR->setEnabled(areAllLDRs); @@ -40,12 +39,9 @@ activateWindow(); } -DnDOptionDialog::~DnDOptionDialog() { -} +DnDOptionDialog::~DnDOptionDialog() {} -void DnDOptionDialog::on_btnCancel_clicked() { - QDialog::accept(); -} +void DnDOptionDialog::on_btnCancel_clicked() { QDialog::accept(); } void DnDOptionDialog::on_btnCreateNewHDR_clicked() { result = ACTION_NEW_HDR; @@ -60,12 +56,12 @@ int DnDOptionDialog::showDndDialog(QWidget *parent, QStringList files) { bool areAllHDRs = true; bool areAllLDRs = true; - foreach (QString file, files) { + foreach (const QString &file, files) { areAllHDRs = areAllHDRs && matchesHdrFilename(file); areAllLDRs = areAllLDRs && matchesLdrFilename(file); } if (areAllHDRs && files.size() == 1) - return ACTION_OPEN_HDR; // just open the files without dialog + return ACTION_OPEN_HDR; // just open the files without dialog else { DnDOptionDialog dndOption(parent, files, areAllHDRs, areAllLDRs); dndOption.exec(); diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/DnDOption.h luminance-hdr-2.6.0/src/MainWindow/DnDOption.h --- luminance-hdr-2.5.1+dfsg/src/MainWindow/DnDOption.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/DnDOption.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,30 +28,31 @@ // forward declaration namespace Ui { - class DnDOption; +class DnDOption; } -class DnDOptionDialog : public QDialog -{ -Q_OBJECT - -public: - static const int ACTION_INVALID = 0; - static const int ACTION_NEW_HDR = 1; - static const int ACTION_OPEN_HDR = 2; +class DnDOptionDialog : public QDialog { + Q_OBJECT - static int showDndDialog(QWidget *parent, QStringList files); // 1=newHDR, 2=openHDR + public: + static const int ACTION_INVALID = 0; + static const int ACTION_NEW_HDR = 1; + static const int ACTION_OPEN_HDR = 2; - DnDOptionDialog(QWidget *parent, QStringList files, bool allHdrs, bool allLdrs); + static int showDndDialog(QWidget *parent, + QStringList files); // 1=newHDR, 2=openHDR + + DnDOptionDialog(QWidget *parent, QStringList files, bool allHdrs, + bool allLdrs); ~DnDOptionDialog(); -protected slots: + protected slots: void on_btnCancel_clicked(); void on_btnCreateNewHDR_clicked(); void on_btnOpenHDR_clicked(); -private: - QScopedPointer ui; - int result; // 1=newHDR, 2=openHDR + private: + QScopedPointer ui; + int result; // 1=newHDR, 2=openHDR }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/DonationDialog.cpp luminance-hdr-2.6.0/src/MainWindow/DonationDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/MainWindow/DonationDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/DonationDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,52 +26,49 @@ #include #include -#include "ui_DonationDialog.h" +#include "MainWindow/ui_DonationDialog.h" #include "Common/LuminanceOptions.h" +#include "ui_DonationDialog.h" -namespace -{ -static const QString DONATION_DIALOG_KEY = "DonationDialogShow"; +namespace { +static const QString DONATION_DIALOG_KEY = QStringLiteral("DonationDialogShow"); } -DonationDialog::DonationDialog(QWidget* parent) - : QDialog(parent) - , m_ui(new Ui::DonationDialog) -{ +DonationDialog::DonationDialog(QWidget *parent) + : QDialog(parent), m_ui(new Ui::DonationDialog) { m_ui->setupUi(this); - connect(m_ui->yesButton, SIGNAL(clicked()), this, SLOT(onYesButtonClicked())); - connect(m_ui->noButton, SIGNAL(clicked()), this, SLOT(onNoButtonClicked())); - connect(m_ui->askMeLaterButton, SIGNAL(clicked()), this, SLOT(close())); + connect(m_ui->yesButton, &QAbstractButton::clicked, this, + &DonationDialog::onYesButtonClicked); + connect(m_ui->noButton, &QAbstractButton::clicked, this, + &DonationDialog::onNoButtonClicked); + connect(m_ui->askMeLaterButton, &QAbstractButton::clicked, this, + &QWidget::close); } -void DonationDialog::onYesButtonClicked() -{ +void DonationDialog::onYesButtonClicked() { openDonationPage(); emit close(); } -void DonationDialog::onNoButtonClicked() -{ +void DonationDialog::onNoButtonClicked() { LuminanceOptions().setValue(DONATION_DIALOG_KEY, false); emit close(); } -DonationDialog::~DonationDialog() -{ -} +DonationDialog::~DonationDialog() {} -void DonationDialog::showDonationDialog() -{ - if (LuminanceOptions().value(DONATION_DIALOG_KEY, true).toBool()) - { +void DonationDialog::showDonationDialog() { + if (LuminanceOptions().value(DONATION_DIALOG_KEY, true).toBool()) { QScopedPointer dd(new DonationDialog); dd->exec(); } } -void DonationDialog::openDonationPage() -{ - QDesktopServices::openUrl(QUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=77BSTWEH7447C")); //davideanastasia +void DonationDialog::openDonationPage() { + QDesktopServices::openUrl( + QUrl(QStringLiteral("https://www.paypal.com/cgi-bin/\ + webscr?cmd=_s-xclick&hosted_button_id=\ + 10037712"))); // Franco Comida } diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/DonationDialog.h luminance-hdr-2.6.0/src/MainWindow/DonationDialog.h --- luminance-hdr-2.5.1+dfsg/src/MainWindow/DonationDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/DonationDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,29 +27,27 @@ #include #include -namespace Ui -{ - class DonationDialog; +namespace Ui { +class DonationDialog; } -class DonationDialog : public QDialog -{ +class DonationDialog : public QDialog { Q_OBJECT -public: + public: static void showDonationDialog(); static void openDonationPage(); -private: + private: QScopedPointer m_ui; - explicit DonationDialog(QWidget* parent = 0); + explicit DonationDialog(QWidget *parent = 0); -private slots: + private slots: void onYesButtonClicked(); void onNoButtonClicked(); -public: + public: ~DonationDialog(); }; -#endif // DONATIONDIALOG_H +#endif // DONATIONDIALOG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/MainWindow.cpp luminance-hdr-2.6.0/src/MainWindow/MainWindow.cpp --- luminance-hdr-2.5.1+dfsg/src/MainWindow/MainWindow.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/MainWindow.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -32,267 +32,236 @@ * */ -#include "MainWindow/MainWindow.h" - #ifdef QT_DEBUG #include #endif -#include +#include #include +#include #include #include #include -#include #include +#include #include -#include #include -#include +#include #include #include -#include "ui_MainWindow.h" +#include "MainWindow/ui_MainWindow.h" -#include "MainWindow/DnDOption.h" -#include "MainWindow/UpdateChecker.h" -#include "MainWindow/DonationDialog.h" - -#include "Libpfs/frame.h" -#include "Libpfs/params.h" -#include "Libpfs/manip/cut.h" -#include "Libpfs/manip/copy.h" -#include "Libpfs/manip/rotate.h" -#include "Libpfs/manip/gamma_levels.h" -#include "Fileformat/pfsoutldrimage.h" - -#include "Common/archs.h" -#include "Common/config.h" -#include "Common/global.h" -#include "Common/CommonFunctions.h" -#include "OsIntegration/osintegration.h" -#include "BatchHDR/BatchHDRDialog.h" -#include "BatchTM/BatchTMDialog.h" - -#include "TransplantExif/TransplantExifDialog.h" -#include "Viewers/HdrViewer.h" -#include "Viewers/LuminanceRangeWidget.h" -#include "Viewers/LdrViewer.h" -#include "UI/ImageQualityDialog.h" -#include "UI/TiffModeDialog.h" -#include "UI/UMessageBox.h" -#include "UI/GammaAndLevels.h" -#include "UI/ExportToHtmlDialog.h" -#include "UI/SupportedCamerasDialog.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include #ifdef HAVE_CFITSIO -#include "UI/FitsImporter.h" +#include #endif -#include "PreviewPanel/PreviewPanel.h" -#include "HelpBrowser/helpbrowser.h" -#include "TonemappingPanel/TMOProgressIndicator.h" -#include "TonemappingPanel/TonemappingPanel.h" -#include "HdrWizard/HdrWizard.h" -#include "Resize/ResizeDialog.h" -#include "Projection/ProjectionsDialog.h" -#include "Preferences/PreferencesDialog.h" -#include "Core/IOWorker.h" -#include "Core/TMWorker.h" -#include "TonemappingPanel/TMOProgressIndicator.h" -#include "HdrWizard/AutoAntighosting.h" -#include "HdrWizard/WhiteBalance.h" -#include "LibpfsAdditions/formathelper.h" - -namespace -{ -QString getLdrFileNameFromSaveDialog(const QString& suggestedFileName, QWidget* parent = 0) -{ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +QString getLdrFileNameFromSaveDialog(const QString &suggestedFileName, + QWidget *parent = 0) { QString filetypes = QObject::tr("All LDR formats"); - filetypes += " (*.jpg *.jpeg *.png *.ppm *.pbm *.bmp *.JPG *.JPEG *.PNG *.PPM *.PBM *.BMP);;"; - filetypes += "JPEG (*.jpg *.jpeg *.JPG *.JPEG);;" ; - filetypes += "PNG (*.png *.PNG);;"; - filetypes += "PPM PBM (*.ppm *.pbm *.PPM *.PBM);;"; - filetypes += "BMP (*.bmp *.BMP);;"; - filetypes += "TIFF (*.tif *.tiff *.TIF *.TIFF)"; + filetypes += QLatin1String( + " (*.jpg *.jpeg *.png *.ppm *.pbm *.bmp *.JPG *.JPEG *.PNG *.PPM *.PBM " + "*.BMP);;"); + filetypes += QLatin1String("JPEG (*.jpg *.jpeg *.JPG *.JPEG);;"); + filetypes += QLatin1String("PNG (*.png *.PNG);;"); + filetypes += QLatin1String("PPM PBM (*.ppm *.pbm *.PPM *.PBM);;"); + filetypes += QLatin1String("BMP (*.bmp *.BMP);;"); + filetypes += QLatin1String("TIFF (*.tif *.tiff *.TIF *.TIFF)"); QFileInfo qfi(suggestedFileName); - QString outputFilename = - QFileDialog::getSaveFileName(parent, - QObject::tr("Save the LDR image as..."), - LuminanceOptions().getDefaultPathLdrOut() + QDir::separator() + qfi.completeBaseName(), - filetypes); + QString outputFilename = QFileDialog::getSaveFileName( + parent, QObject::tr("Save the LDR image as..."), + LuminanceOptions().getDefaultPathLdrOut() + QDir::separator() + + qfi.completeBaseName() + "." + qfi.suffix(), + filetypes); - if ( !outputFilename.isEmpty() ) - { + if (!outputFilename.isEmpty()) { QFileInfo qfi(outputFilename); - LuminanceOptions().setDefaultPathLdrOut( qfi.path() ); + LuminanceOptions().setDefaultPathLdrOut(qfi.path()); } return outputFilename; } -QString getHdrFileNameFromSaveDialog(const QString& suggestedFileName, QWidget* parent = 0) -{ +QString getHdrFileNameFromSaveDialog(const QString &suggestedFileName, + QWidget *parent = 0) { #ifdef QT_DEBUG - qDebug() << "MainWindow::getHdrFileNameFromSaveDialog(" << suggestedFileName << ")"; + qDebug() << "MainWindow::getHdrFileNameFromSaveDialog(" << suggestedFileName + << ")"; #endif - static const QString filetypes = - "OpenEXR (*.exr *.EXR);;" - "HDR TIFF (*.tiff *.tif *.TIFF *.TIF);;" - "Radiance RGBE (*.hdr *.pic *.HDR *.PIC);;" - "PFS Stream (*.pfs *.PFS)"; + + QStringList validHdrExtensions; + validHdrExtensions << "exr" + << "hdr" + << "tif" + << "tiff" + << "pfs"; + + QString filetypes = QObject::tr("All HDR formats"); + filetypes += QLatin1String( + " (*.exr *.EXR *.tiff *.TIFF *.hdr *.HDR *.pic *.PIC *.pfs *.PFS);;"); + filetypes += QLatin1String("OpenEXR (*.exr *.EXR);;"); + filetypes += QLatin1String("HDR TIFF (*.tiff *.tif *.TIFF *.TIT);;"); + filetypes += QLatin1String("Radiance RGBE (*.hdr *.pic *.HDR *.PIC);;"); + filetypes += QLatin1String("PFS Stream (*.pfs *.PFS);;"); QFileInfo qfi(suggestedFileName); - QString outputFilename = - QFileDialog::getSaveFileName(parent, - QObject::tr("Save the HDR image as..."), - LuminanceOptions().getDefaultPathHdrOut() + QDir::separator() + qfi.completeBaseName(), - filetypes); + QString suffix = qfi.suffix(); - if ( !outputFilename.isEmpty() ) - { + if (suffix.isEmpty()) { + suffix = "exr"; + } + + if (!validHdrExtensions.contains(suffix, Qt::CaseInsensitive)) { + suffix = "exr"; + } + + QString outputFilename = QFileDialog::getSaveFileName( + parent, QObject::tr("Save the HDR image as..."), + LuminanceOptions().getDefaultPathLdrIn() + QDir::separator() + + qfi.completeBaseName() + "." + suffix, + filetypes); + + if (!outputFilename.isEmpty()) { QFileInfo qfi(outputFilename); - LuminanceOptions().setDefaultPathHdrOut( qfi.path() ); + LuminanceOptions().setDefaultPathHdrOut(qfi.path()); } return outputFilename; } -void getCropCoords(GenericViewer* gv, int& x_ul, int& y_ul, int& x_br, int& y_br) -{ - assert( gv != NULL ); +void getCropCoords(GenericViewer *gv, int &x_ul, int &y_ul, int &x_br, + int &y_br) { + assert(gv != nullptr); QRect cropRect = gv->getSelectionRect().normalized(); cropRect.getCoords(&x_ul, &y_ul, &x_br, &y_br); } -GenericViewer::ViewerMode getCurrentViewerMode(const QTabWidget& curr_tab_widget) -{ - if (curr_tab_widget.count() <= 0) - { +GenericViewer::ViewerMode getCurrentViewerMode( + const QTabWidget &curr_tab_widget) { + if (curr_tab_widget.count() <= 0) { return GenericViewer::FIT_WINDOW; - } - else - { - GenericViewer* g_v = (GenericViewer*)curr_tab_widget.currentWidget(); + } else { + GenericViewer *g_v = qobject_cast(curr_tab_widget.currentWidget()); return g_v->getViewerMode(); } } - - } // static members! int MainWindow::sm_NumMainWindows = 0; int MainWindow::sm_counter = 0; -QMap MainWindow::sm_mainWindowMap = QMap(); +QMap MainWindow::sm_mainWindowMap = + QMap(); QScopedPointer MainWindow::sm_updateChecker; +HelpBrowser *MainWindow::sm_helpBrowser = nullptr; MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent) - , m_Ui(new Ui::MainWindow) - , m_exportQueueSize(0) - , m_interpolationMethod(BilinearInterp) - , m_firstWindow(0) - , m_winId(0) -{ + : QMainWindow(parent), + m_Ui(new Ui::MainWindow), + m_isFullscreenViewer(false), + m_exportQueueSize(0), + m_interpolationMethod(BilinearInterp), + m_firstWindow(0), + m_winId(0) { init(); } -MainWindow::MainWindow(pfs::Frame* curr_frame, const QString& new_file, - const QStringList& inputFileNames, - bool needSaving, QWidget *parent) - : QMainWindow(parent) - , m_Ui(new Ui::MainWindow) - , m_exportQueueSize(0) - , m_interpolationMethod(BilinearInterp) - , m_firstWindow(0) - , m_winId(0) -{ +MainWindow::MainWindow(pfs::Frame *curr_frame, const QString &new_file, + const QStringList &inputFileNames, bool needSaving, + QWidget *parent) + : QMainWindow(parent), + m_Ui(new Ui::MainWindow), + m_isFullscreenViewer(false), + m_exportQueueSize(0), + m_interpolationMethod(BilinearInterp), + m_firstWindow(0), + m_winId(0) { init(); emit load_success(curr_frame, new_file, inputFileNames, needSaving); } -MainWindow::~MainWindow() -{ - sm_NumMainWindows--; - -#ifdef QT_DEBUG - qDebug() << "MainWindow::~MainWindow() = " << sm_NumMainWindows; -#endif - - if ( sm_NumMainWindows == 0 ) - { - // Last MainWindow is dead... - luminance_options->setValue("MainWindowState", saveState()); - luminance_options->setValue("MainWindowGeometry", saveGeometry()); - luminance_options->setValue("MainWindowSplitterState", m_centralwidget_splitter->saveState()); - luminance_options->setValue("MainWindowSplitterGeometry", m_centralwidget_splitter->saveGeometry()); - luminance_options->setValue("MainWindowBottomSplitterState", m_bottom_splitter->saveState()); - luminance_options->setValue("MainWindowBottomSplitterGeometry", m_bottom_splitter->saveGeometry()); - - - sm_updateChecker.reset(); - } - else - { - sm_mainWindowMap.take(m_winId); - int winId = sm_mainWindowMap.firstKey(); - MainWindow *p = sm_mainWindowMap[winId]; - disconnect(sm_updateChecker.data(), SIGNAL(updateAvailable()), p, SLOT(onUpdateAvailable())); - sm_updateChecker->setParent(p); - connect(sm_updateChecker.data(), SIGNAL(updateAvailable()), p, SLOT(onUpdateAvailable())); - } - - // Let's close all threads - m_IOThread->quit(); // should be idle, quit() ok - m_IOThread->wait(); - if ( !m_TMProgressBar->isTerminated() ) // MainWindow closed while tonemapping is running - { - m_TMProgressBar->requestTermination(); - } - m_TMThread->quit(); - m_TMThread->wait(); - m_QueueThread->quit(); // should be idle, quit() ok - m_QueueThread->wait(); - - clearRecentFileActions(); - delete luminance_options; +MainWindow::~MainWindow() { } -void MainWindow::init() -{ - luminance_options = new LuminanceOptions(); - +void MainWindow::init() { sm_NumMainWindows++; sm_counter++; m_winId = sm_counter; sm_mainWindowMap.insert(m_winId, this); m_firstWindow = 0; - helpBrowser = NULL; num_ldr_generated = 0; curr_num_ldr_open = 0; splash = 0; m_processingAWB = false; - if ( sm_NumMainWindows == 1 ) - { + if (sm_NumMainWindows == 1) { // Register symbols on the first activation! qRegisterMetaType("QImage"); - qRegisterMetaType("pfs::Frame*"); + qRegisterMetaType("pfs::Frame*"); qRegisterMetaType("TonemappingOptions"); - qRegisterMetaType("TonemappingOptions*"); - qRegisterMetaType("HdrViewer*"); - qRegisterMetaType("LdrViewer*"); - qRegisterMetaType("GenericViewer*"); - qRegisterMetaType >("QVector"); + qRegisterMetaType("TonemappingOptions*"); + qRegisterMetaType("HdrViewer*"); + qRegisterMetaType("LdrViewer*"); + qRegisterMetaType("GenericViewer*"); + qRegisterMetaType>("QVector"); qRegisterMetaType("pfs::Params"); - qRegisterMetaType("pfs::Params*"); + qRegisterMetaType("pfs::Params*"); qRegisterMetaType("InterpolationMethod"); } @@ -309,40 +278,41 @@ OsIntegration::getInstance().init(this); - if ( sm_NumMainWindows == 1 ) { - if (OsIntegration::getInstance().isRunningOnSameCpuPlatform()) - { + if (sm_NumMainWindows == 1) { + if (OsIntegration::getInstance().isRunningOnSameCpuPlatform()) { sm_updateChecker.reset(new UpdateChecker(this)); - connect(sm_updateChecker.data(), SIGNAL(updateAvailable()), this, SLOT(onUpdateAvailable())); + connect(sm_updateChecker.data(), &UpdateChecker::updateAvailable, + this, &MainWindow::onUpdateAvailable); m_firstWindow = 2; - } - else + } else m_firstWindow = 1; } - } -void MainWindow::createUI() -{ +void MainWindow::createUI() { m_Ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); - restoreState(luminance_options->value("MainWindowState").toByteArray()); - restoreGeometry(luminance_options->value("MainWindowGeometry").toByteArray()); + restoreState(LuminanceOptions() + .value(QStringLiteral("MainWindowState")) + .toByteArray()); + restoreGeometry(LuminanceOptions() + .value(QStringLiteral("MainWindowGeometry")) + .toByteArray()); - if(isFullScreen()) m_Ui->actionShow_Full_Screen->setChecked(true); + if (isFullScreen()) m_Ui->actionShow_Full_Screen->setChecked(true); setAcceptDrops(true); setWindowModified(false); - setWindowTitle(QString("Luminance HDR " LUMINANCEVERSION " [*]")); // + " " + g_GIT_SHA1); + setWindowTitle(QString("Luminance HDR " LUMINANCEVERSION + " [*]")); // + " " + g_GIT_SHA1); } -void MainWindow::createCentralWidget() -{ +void MainWindow::createCentralWidget() { // Central Widget Area - m_centralwidget_splitter = new QSplitter; //(this); - m_bottom_splitter = new QSplitter; //(this); + m_centralwidget_splitter = new QSplitter; //(this); + m_bottom_splitter = new QSplitter; //(this); m_bottom_splitter->setOrientation(Qt::Vertical); setCentralWidget(m_centralwidget_splitter); @@ -350,13 +320,15 @@ m_PreviewPanel = new PreviewPanel(); // create tonemapping panel - m_tonemapPanel = new TonemappingPanel(sm_NumMainWindows, m_PreviewPanel); //(m_centralwidget_splitter); + m_tonemapPanel = new TonemappingPanel( + sm_NumMainWindows, m_PreviewPanel); //(m_centralwidget_splitter); - connect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), m_tonemapPanel, SLOT(setRealtimePreviews(bool))); - connect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), luminance_options, SLOT(setRealtimePreviewsActive(bool))); - m_tonemapPanel->setRealtimePreviews(luminance_options->isRealtimePreviewsActive()); + connect(m_Ui->actionRealtimePreviews, &QAction::toggled, m_tonemapPanel, + &TonemappingPanel::setRealtimePreviews); + connect(m_Ui->actionRealtimePreviews, &QAction::toggled, this, + &MainWindow::setRealtimePreviewsActive); - m_tabwidget = new QTabWidget; //(m_centralwidget_splitter); + m_tabwidget = new QTabWidget; //(m_centralwidget_splitter); m_tabwidget->setDocumentMode(true); m_tabwidget->setTabsClosable(true); @@ -379,43 +351,60 @@ m_centralwidget_splitter->addWidget(m_PreviewscrollArea); m_centralwidget_splitter->setCollapsible(2, false); - if (luminance_options->getPreviewPanelMode()) { + if (LuminanceOptions().getPreviewPanelMode()) { showPreviewsOnTheBottom(); - } - else { + } else { showPreviewsOnTheRight(); } - connect(m_tabwidget, SIGNAL(tabCloseRequested(int)), this, SLOT(removeTab(int))); - connect(m_tabwidget, SIGNAL(currentChanged(int)), this, SLOT(updateActions(int))); - connect(m_tabwidget, SIGNAL(currentChanged(int)), this, SLOT(updateSoftProofing(int))); - connect(m_tonemapPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); - connect(m_tonemapPanel, SIGNAL(startExport(TonemappingOptions*)), this, SLOT(exportImage(TonemappingOptions*))); - connect(this, SIGNAL(updatedHDR(pfs::Frame*)), m_tonemapPanel, SLOT(updatedHDR(pfs::Frame*))); - connect(this, SIGNAL(destroyed()), m_PreviewPanel, SLOT(deleteLater())); - - m_centralwidget_splitter->restoreState(luminance_options->value("MainWindowSplitterState").toByteArray()); - m_centralwidget_splitter->restoreGeometry(luminance_options->value("MainWindowSplitterGeometry").toByteArray()); - m_bottom_splitter->restoreState(luminance_options->value("MainWindowBottomSplitterState").toByteArray()); - m_bottom_splitter->restoreGeometry(luminance_options->value("MainWindowBottomSplitterGeometry").toByteArray()); + connect(m_tabwidget, &QTabWidget::tabCloseRequested, this, + &MainWindow::removeTab); + connect(m_tabwidget, &QTabWidget::currentChanged, this, + &MainWindow::updateActions); + connect(m_tabwidget, &QTabWidget::currentChanged, this, + &MainWindow::updateSoftProofing); + connect(m_tonemapPanel, &TonemappingPanel::startTonemapping, this, + &MainWindow::tonemapImage); + connect(m_tonemapPanel, &TonemappingPanel::startExport, this, + &MainWindow::exportImage); + connect(this, &MainWindow::updatedHDR, m_tonemapPanel, + &TonemappingPanel::updatedHDR); + connect(this, &QObject::destroyed, m_PreviewPanel, &QObject::deleteLater); + + m_centralwidget_splitter->restoreState( + LuminanceOptions() + .value(QStringLiteral("MainWindowSplitterState")) + .toByteArray()); + m_centralwidget_splitter->restoreGeometry( + LuminanceOptions() + .value(QStringLiteral("MainWindowSplitterGeometry")) + .toByteArray()); + m_bottom_splitter->restoreState( + LuminanceOptions() + .value(QStringLiteral("MainWindowBottomSplitterState")) + .toByteArray()); + m_bottom_splitter->restoreGeometry( + LuminanceOptions() + .value(QStringLiteral("MainWindowBottomSplitterGeometry")) + .toByteArray()); QPalette pal = m_tabwidget->palette(); pal.setColor(QPalette::Dark, Qt::darkGray); m_tabwidget->setPalette(pal); m_tabwidget->setBackgroundRole(QPalette::Dark); - m_tabwidget->setAutoFillBackground( true ); + m_tabwidget->setAutoFillBackground(true); // replace with ->tabBar() one day, or subclass - QTabBar* tabBar = m_tabwidget->findChild(QLatin1String("qt_tabwidget_tabbar")); - tabBar->setAutoFillBackground( true ); + QTabBar *tabBar = m_tabwidget->findChild( + QStringLiteral("qt_tabwidget_tabbar")); + tabBar->setAutoFillBackground(true); tabBar->setBackgroundRole(QPalette::Window); m_PreviewscrollArea->hide(); } -void MainWindow::createToolBar() -{ +void MainWindow::createToolBar() { // main toolbars setup QActionGroup *toolBarOptsGroup = new QActionGroup(this); toolBarOptsGroup->addAction(m_Ui->actionText_Under_Icons); @@ -424,65 +413,85 @@ toolBarOptsGroup->addAction(m_Ui->actionText_Only); m_Ui->menuToolbars->addAction(m_Ui->toolBar->toggleViewAction()); - connect(m_Ui->actionText_Under_Icons,SIGNAL(triggered()),this,SLOT(Text_Under_Icons())); - connect(m_Ui->actionIcons_Only,SIGNAL(triggered()),this,SLOT(Icons_Only())); - connect(m_Ui->actionText_Alongside_Icons,SIGNAL(triggered()),this,SLOT(Text_Alongside_Icons())); - connect(m_Ui->actionText_Only,SIGNAL(triggered()),this,SLOT(Text_Only())); + connect(m_Ui->actionText_Under_Icons, &QAction::triggered, this, + &MainWindow::Text_Under_Icons); + connect(m_Ui->actionIcons_Only, &QAction::triggered, this, + &MainWindow::Icons_Only); + connect(m_Ui->actionText_Alongside_Icons, &QAction::triggered, this, + &MainWindow::Text_Alongside_Icons); + connect(m_Ui->actionText_Only, &QAction::triggered, this, + &MainWindow::Text_Only); // Preview Panel QActionGroup *previewPanelOptsGroup = new QActionGroup(this); previewPanelOptsGroup->addAction(m_Ui->actionShow_on_the_right); previewPanelOptsGroup->addAction(m_Ui->actionShow_on_the_bottom); - connect(m_Ui->actionShow_on_the_right, SIGNAL(triggered()), this, SLOT(showPreviewsOnTheRight())); - connect(m_Ui->actionShow_on_the_bottom, SIGNAL(triggered()), this, SLOT(showPreviewsOnTheBottom())); + connect(m_Ui->actionShow_on_the_right, &QAction::triggered, this, + &MainWindow::showPreviewsOnTheRight); + connect(m_Ui->actionShow_on_the_bottom, &QAction::triggered, this, + &MainWindow::showPreviewsOnTheBottom); } -void MainWindow::createMenus() -{ +void MainWindow::createMenus() { // icons (missing icons in some icon-theme) - if ( !QIcon::hasThemeIcon("document-save-all") ) - m_Ui->fileSaveAllAction->setIcon(QIcon(":/program-icons/document-save-all")); - if ( !QIcon::hasThemeIcon("zoom") ) + if (!QIcon::hasThemeIcon(QStringLiteral("document-save-all"))) + m_Ui->fileSaveAllAction->setIcon( + QIcon(":/program-icons/document-save-all")); + if (!QIcon::hasThemeIcon(QStringLiteral("zoom"))) m_Ui->fitToWindowAct->setIcon(QIcon(":/program-icons/zoom")); - if ( !QIcon::hasThemeIcon("whitebalance") ) - m_Ui->actionWhite_Balance->setIcon(QIcon(":/program-icons/whitebalance")); - if ( !QIcon::hasThemeIcon("transform-crop") ) - m_Ui->cropToSelectionAction->setIcon(QIcon(":/program-icons/transform-crop")); - if ( !QIcon::hasThemeIcon("edit-selection-none") ) - m_Ui->removeSelectionAction->setIcon(QIcon(":/program-icons/edit-select-none")); - if ( !QIcon::hasThemeIcon("globe") ) + if (!QIcon::hasThemeIcon(QStringLiteral("whitebalance"))) + m_Ui->actionWhite_Balance->setIcon( + QIcon(":/program-icons/whitebalance")); + if (!QIcon::hasThemeIcon(QStringLiteral("transform-crop"))) + m_Ui->cropToSelectionAction->setIcon( + QIcon(":/program-icons/transform-crop")); + if (!QIcon::hasThemeIcon(QStringLiteral("edit-selection-none"))) + m_Ui->removeSelectionAction->setIcon( + QIcon(":/program-icons/edit-select-none")); + if (!QIcon::hasThemeIcon(QStringLiteral("globe"))) m_Ui->actionExportToHTML->setIcon(QIcon(":/program-icons/globe")); - if ( !QIcon::hasThemeIcon("selection-move-to-layer-below") ) - m_Ui->Transplant_Exif_Data_action->setIcon(QIcon(":/program-icons/selection-move-to-layer-below")); - if ( !QIcon::hasThemeIcon("tab-close") ) + if (!QIcon::hasThemeIcon(QStringLiteral("selection-move-to-layer-below"))) + m_Ui->Transplant_Exif_Data_action->setIcon( + QIcon(":/program-icons/selection-move-to-layer-below")); + if (!QIcon::hasThemeIcon(QStringLiteral("tab-close"))) m_Ui->actionRemove_Tab->setIcon(QIcon(":/program-icons/tab-close")); - if ( !QIcon::hasThemeIcon("help-donate") ) + if (!QIcon::hasThemeIcon(QStringLiteral("help-donate"))) m_Ui->actionDonate->setIcon(QIcon(":/program-icons/help-donate")); - if ( !QIcon::hasThemeIcon("document-save-as-template") ) - m_Ui->actionSave_Hdr_Preview->setIcon(QIcon(":/program-icons/document-save-as-template")); - if ( !QIcon::hasThemeIcon("help-whatsthis") ) - m_Ui->actionWhat_s_This->setIcon(QIcon(":/program-icons/help-whatsthis")); + if (!QIcon::hasThemeIcon(QStringLiteral("document-save-as-template"))) + m_Ui->actionSave_Hdr_Preview->setIcon( + QIcon(":/program-icons/document-save-as-template")); + if (!QIcon::hasThemeIcon(QStringLiteral("help-whatsthis"))) + m_Ui->actionWhat_s_This->setIcon( + QIcon(":/program-icons/help-whatsthis")); // About(s) - connect(m_Ui->actionAbout_Qt,SIGNAL(triggered()),qApp,SLOT(aboutQt())); - connect(m_Ui->actionWhat_s_This,SIGNAL(triggered()),this,SLOT(enterWhatsThis())); + connect(m_Ui->actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + connect(m_Ui->actionWhat_s_This, &QAction::triggered, this, + &MainWindow::enterWhatsThis); // I/O - connect(m_Ui->fileExitAction, SIGNAL(triggered()), this, SLOT(close())); + connect(m_Ui->fileExitAction, &QAction::triggered, this, &QWidget::close); // Crop & Rotation - connect(m_Ui->cropToSelectionAction, SIGNAL(triggered()), this, SLOT(cropToSelection())); + connect(m_Ui->cropToSelectionAction, &QAction::triggered, this, + &MainWindow::cropToSelection); m_Ui->cropToSelectionAction->setEnabled(false); - connect(m_Ui->removeSelectionAction, SIGNAL(triggered()), this, SLOT(disableCrop())); + connect(m_Ui->removeSelectionAction, &QAction::triggered, this, + &MainWindow::disableCrop); - connect(m_Ui->menuWindows, SIGNAL(aboutToShow()), this, SLOT(updateWindowMenu())); - connect(m_Ui->actionMinimize, SIGNAL(triggered()), this, SLOT(showMinimized())); - connect(m_Ui->actionMaximize, SIGNAL(triggered()), this, SLOT(showMaximized())); - connect(m_Ui->actionShowPreviewPanel, SIGNAL(toggled(bool)), this, SLOT(showPreviewPanel(bool))); - connect(m_Ui->actionShowPreviewPanel, SIGNAL(toggled(bool)), luminance_options, SLOT(setPreviewPanelActive(bool))); + connect(m_Ui->menuWindows, &QMenu::aboutToShow, this, + &MainWindow::updateWindowMenu); + connect(m_Ui->actionMinimize, &QAction::triggered, this, + &QWidget::showMinimized); + connect(m_Ui->actionMaximize, &QAction::triggered, this, + &QWidget::showMaximized); + connect(m_Ui->actionShowPreviewPanel, &QAction::toggled, this, + &MainWindow::showPreviewPanel); + connect(m_Ui->actionShowPreviewPanel, &QAction::toggled, this, + &MainWindow::setPreviewPanelActive); - //recent files + // recent files initRecentFileActions(); updateRecentFileActions(); @@ -491,232 +500,257 @@ #endif } -void MainWindow::createStatusBar() -{ - statusBar()->showMessage(tr("Ready. Now open an existing HDR image or create a new one!"), 10000); +void MainWindow::createStatusBar() { + statusBar()->showMessage( + tr("Ready. Now open an existing HDR image or create a new one!"), + 10000); } -void MainWindow::createConnections() -{ +void MainWindow::createConnections() { windowMapper = new QSignalMapper(this); - connect(windowMapper, SIGNAL(mapped(QWidget*)), this, SLOT(setActiveMainWindow(QWidget*))); - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(whiteBalanceDone())); -} - -void MainWindow::loadOptions() -{ - //load from settings the path where hdrs have been previously opened/loaded - - //load from settings the main toolbar visualization mode - switch ( luminance_options->getMainWindowToolBarMode() ) { - case Qt::ToolButtonIconOnly: - Icons_Only(); - m_Ui->actionIcons_Only->setChecked(true); - break; - case Qt::ToolButtonTextOnly: - Text_Only(); - m_Ui->actionText_Only->setChecked(true); - break; - case Qt::ToolButtonTextBesideIcon: - Text_Alongside_Icons(); - m_Ui->actionText_Alongside_Icons->setChecked(true); - break; - case Qt::ToolButtonTextUnderIcon: - Text_Under_Icons(); - m_Ui->actionText_Under_Icons->setChecked(true); - break; - } - m_Ui->actionShowPreviewPanel->setChecked(luminance_options->isPreviewPanelActive()); - m_Ui->actionRealtimePreviews->setChecked(luminance_options->isRealtimePreviewsActive()); + connect(windowMapper, static_cast( + &QSignalMapper::mapped), + this, &MainWindow::setActiveMainWindow); + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &MainWindow::whiteBalanceDone); +} + +void MainWindow::loadOptions() { + // load from settings the path where hdrs have been previously opened/loaded + + // load from settings the main toolbar visualization mode + switch (LuminanceOptions().getMainWindowToolBarMode()) { + case Qt::ToolButtonIconOnly: + Icons_Only(); + m_Ui->actionIcons_Only->setChecked(true); + break; + case Qt::ToolButtonTextOnly: + Text_Only(); + m_Ui->actionText_Only->setChecked(true); + break; + case Qt::ToolButtonTextBesideIcon: + Text_Alongside_Icons(); + m_Ui->actionText_Alongside_Icons->setChecked(true); + break; + case Qt::ToolButtonTextUnderIcon: + Text_Under_Icons(); + m_Ui->actionText_Under_Icons->setChecked(true); + break; + } + m_Ui->actionShowPreviewPanel->setChecked( + LuminanceOptions().isPreviewPanelActive()); + m_Ui->actionRealtimePreviews->setChecked( + LuminanceOptions().isRealtimePreviewsActive()); + m_Ui->actionRealtimePreviews->setEnabled( + LuminanceOptions().isPreviewPanelActive()); - bool isPreviewPanelRight = luminance_options->getPreviewPanelMode() == 0; + bool isPreviewPanelRight = LuminanceOptions().getPreviewPanelMode() == 0; m_Ui->actionShow_on_the_bottom->setChecked(!isPreviewPanelRight); m_Ui->actionShow_on_the_right->setChecked(isPreviewPanelRight); } -void MainWindow::on_actionDonate_triggered() -{ +void MainWindow::on_actionDonate_triggered() { DonationDialog::openDonationPage(); } -void MainWindow::on_fileNewAction_triggered() -{ - createNewHdr(QStringList()); // redirect on createNewHdr-method to avoid moc warning +void MainWindow::on_fileNewAction_triggered() { + createNewHdr( + QStringList()); // redirect on createNewHdr-method to avoid moc warning } -void MainWindow::createNewHdr(const QStringList& files) -{ - QScopedPointer wizard( new HdrWizard(this, files, m_inputFilesName, m_inputExpoTimes) ); - if (wizard->exec() == QDialog::Accepted) - { - emit load_success(wizard->getPfsFrameHDR(), wizard->getCaptionTEXT(), wizard->getInputFilesNames(), true); +void MainWindow::createNewHdr(const QStringList &files) { + QScopedPointer wizard( + new HdrWizard(this, files, m_inputFilesName, m_inputExpoTimes, + QSqlDatabase::database(m_tonemapPanel->getDatabaseConnection()))); + if (wizard->exec() == QDialog::Accepted) { + emit load_success(wizard->getPfsFrameHDR(), wizard->getCaptionTEXT(), + wizard->getInputFilesNames(), true); } } -void MainWindow::on_fileOpenAction_triggered() -{ +void MainWindow::on_fileOpenAction_triggered() { QString filetypes = tr("All HDR formats "); QStringList hdrExtensionsList = getAllHdrFileExtensions(); - filetypes += "("; - foreach(QString s, hdrExtensionsList) - { + filetypes += QLatin1String("("); + foreach (const QString &s, hdrExtensionsList) { filetypes += "*" + s + " "; } - filetypes += ");;" ; - filetypes += "OpenEXR (*.exr *.EXR);;" ; - filetypes += "Radiance RGBE (*.hdr *.pic *.HDR *.PIC);;"; - filetypes += "TIFF images (*.TIFF *.TIF *.tiff *.tif);;"; + filetypes += QLatin1String(");;"); + filetypes += QLatin1String("OpenEXR (*.exr *.EXR);;"); + filetypes += QLatin1String("Radiance RGBE (*.hdr *.pic *.HDR *.PIC);;"); + filetypes += QLatin1String("TIFF images (*.TIFF *.TIF *.tiff *.tif);;"); #if HAVE_CFITSIO - filetypes += "FITS (*.fit *.FIT *.fits *.FITS);;"; + filetypes += QLatin1String("FITS (*.fit *.FIT *.fits *.FITS);;"); #endif - filetypes += "RAW images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.rw2 *.sr2 *.3fr *.mef *.mos *.erf *.nrw *.mef *.mos *.erf *.nrw *.srw"; - filetypes += "*.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.RW2 *.SR2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);;"; - filetypes += "PFS stream (*.pfs *.PFS)"; - - QStringList files = QFileDialog::getOpenFileNames(this, - tr("Load one or more HDR images..."), - luminance_options->getDefaultPathHdrIn(), - filetypes ); + filetypes += QLatin1String( + "RAW images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw " + "*.raf " + "*.ptx *.pef *.x3f *.raw " + "*.rw2 *.sr2 *.3fr *.mef *.mos *.erf *.nrw *.mef *.mos *.erf *.nrw " + "*.srw"); + filetypes += QLatin1String( + "*.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC " + "*.DCR *.ARW *.RAF *.PTX *.PEF " + "*.X3F *.RAW *.RW2 *.SR2 " + "*.3FR *.MEF *.MOS *.ERF *.NRW *.SRW);;"); + filetypes += QLatin1String("PFS stream (*.pfs *.PFS)"); + + QStringList files = QFileDialog::getOpenFileNames( + this, tr("Load one or more HDR images..."), + LuminanceOptions().getDefaultPathHdrIn(), filetypes); - if ( files.isEmpty() ) return; + if (files.isEmpty()) return; // Update working folder - // All the files are in the same folder, so I pick the first as reference to update the settings + // All the files are in the same folder, so I pick the first as reference to + // update the settings QFileInfo qfi(files.first()); - luminance_options->setDefaultPathHdrIn(qfi.absolutePath()); + LuminanceOptions().setDefaultPathHdrIn(qfi.absolutePath()); - foreach (const QString& filename, files) - { + foreach (const QString &filename, files) { // emit open_hdr_frame(filename); - QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", Qt::QueuedConnection, + QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", + Qt::QueuedConnection, Q_ARG(QString, filename)); } } -void MainWindow::on_fileSaveAllAction_triggered() -{ +void MainWindow::on_fileSaveAllAction_triggered() { if (m_tabwidget->count() <= 0) return; QString dir = QFileDialog::getExistingDirectory( - this, - tr("Save files in"), - luminance_options->getDefaultPathLdrOut() - ); + this, tr("Save files in"), LuminanceOptions().getDefaultPathLdrOut()); - if (!dir.isEmpty()) - { - luminance_options->setDefaultPathLdrOut(dir); + if (!dir.isEmpty()) { + LuminanceOptions().setDefaultPathLdrOut(dir); - for (int i = 0; i < m_tabwidget->count(); i++) - { + for (int i = 0; i < m_tabwidget->count(); i++) { QWidget *wgt = m_tabwidget->widget(i); - GenericViewer *g_v = (GenericViewer *)wgt; + GenericViewer *g_v = qobject_cast(wgt); - if ( !g_v->isHDR() ) - { - LdrViewer *l_v = dynamic_cast(g_v); + if (!g_v->isHDR()) { + LdrViewer *l_v = qobject_cast(g_v); QString ldr_name = QFileInfo(getCurrentHDRName()).baseName(); - QString outfname = luminance_options->getDefaultPathLdrOut() - + "/" + ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg"; - - QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, - Q_ARG(GenericViewer*, l_v), - Q_ARG(QString, outfname), - Q_ARG(QString, QString()), - Q_ARG(QVector, QVector()), - Q_ARG(TonemappingOptions*, NULL), - Q_ARG(pfs::Params, pfs::Params("quality", 100u))); + QString outfname = LuminanceOptions().getDefaultPathLdrOut() + + "/" + ldr_name + "_" + + l_v->getFileNamePostFix() + ".jpg"; + + QString inputfname; + if (!m_inputFilesName.isEmpty()) { + inputfname = m_inputFilesName.first(); + } else { + inputfname = "FromHdrFile"; + } + + QMetaObject::invokeMethod( + m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, + Q_ARG(GenericViewer *, l_v), Q_ARG(QString, outfname), + Q_ARG(QString, inputfname), + Q_ARG(QVector, QVector()), + Q_ARG(TonemappingOptions *, l_v->getTonemappingOptions()), + Q_ARG(pfs::Params, pfs::Params("quality", 100u))); } } } } -void MainWindow::on_fileSaveAsAction_triggered() -{ +void MainWindow::on_fileSaveAsAction_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - if ( g_v->isHDR() ) { + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + if (g_v->isHDR()) { // In this case I'm saving an HDR - QString fname = getHdrFileNameFromSaveDialog(g_v->getFileName(), this); + QString separator = ""; + if (!m_HdrCaption.isEmpty()) { + separator = "-"; + } + QString fname = getHdrFileNameFromSaveDialog( + g_v->getFileName() + separator + m_HdrCaption , this); - if ( fname.isEmpty() ) return; + if (fname.isEmpty()) return; QFileInfo qfi(fname); QString format = qfi.suffix(); pfs::Params p; - if ( format == "tif" || format == "tiff" ) - { + if (format == QLatin1String("tif") || format == QLatin1String("tiff")) { TiffModeDialog t(true, -1, this); - if ( t.exec() == QDialog::Rejected ) return; + if (t.exec() == QDialog::Rejected) return; p.set("tiff_mode", t.getTiffWriterMode()); } - // CALL m_IOWorker->write_hdr_frame(dynamic_cast(g_v), fname); - QMetaObject::invokeMethod(m_IOWorker, "write_hdr_frame", - Qt::QueuedConnection, - Q_ARG(GenericViewer*, dynamic_cast(g_v)), - Q_ARG(QString, fname), - Q_ARG(pfs::Params, p)); - } - else { + // CALL m_IOWorker->write_hdr_frame(qobject_cast(g_v), + // fname); + QMetaObject::invokeMethod( + m_IOWorker, "write_hdr_frame", Qt::QueuedConnection, + Q_ARG(GenericViewer *, qobject_cast(g_v)), + Q_ARG(QString, fname), Q_ARG(pfs::Params, p)); + } else { // In this case I'm saving an LDR - LdrViewer* l_v = dynamic_cast(g_v); + LdrViewer *l_v = qobject_cast(g_v); - if ( l_v == NULL ) return; + if (l_v == nullptr) return; QString ldr_name = QFileInfo(getCurrentHDRName()).baseName(); - QString outputFilename = getLdrFileNameFromSaveDialog(ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg", this); + QString proposedFileName = + ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg"; + + // QString outputFilename = getLdrFileNameFromSaveDialog(ldr_name + "_" + // + + // l_v->getFileNamePostFix() + ".jpg", this); + QString outputFilename = + getLdrFileNameFromSaveDialog(proposedFileName, this); - if ( outputFilename.isEmpty() ) return; + if (outputFilename.isEmpty()) return; QString format = QFileInfo(outputFilename).suffix(); - if ( format.isEmpty() ) { // default as JPG - format = "jpg"; - outputFilename += ".jpg"; + if (format.isEmpty()) { // default as JPG + format = QStringLiteral("jpg"); + outputFilename += QLatin1String(".jpg"); } pfs::Params p; - if ( format == "png" || format == "jpg" ) - { - ImageQualityDialog savedFileQuality(l_v->getFrame(), format, -1, this); - savedFileQuality.setWindowTitle( QObject::tr("Save as...") + format.toUpper() ); - if ( savedFileQuality.exec() == QDialog::Rejected ) return; + if (format == QLatin1String("png") || format == QLatin1String("jpg")) { + ImageQualityDialog savedFileQuality(l_v->getFrame(), format, -1, + this); + savedFileQuality.setWindowTitle(QObject::tr("Save as...") + + format.toUpper()); + if (savedFileQuality.exec() == QDialog::Rejected) return; p.set("quality", (size_t)savedFileQuality.getQuality()); } - if ( format == "tif" || format == "tiff" ) - { + if (format == QLatin1String("tif") || format == QLatin1String("tiff")) { TiffModeDialog t(false, -1, this); - if ( t.exec() == QDialog::Rejected ) return; + if (t.exec() == QDialog::Rejected) return; p.set("tiff_mode", t.getTiffWriterMode()); } QString inputfname; - if ( ! m_inputFilesName.isEmpty() ) inputfname = m_inputFilesName.first(); - - QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, - Q_ARG(GenericViewer*, l_v), - Q_ARG(QString, outputFilename), - Q_ARG(QString, inputfname), - Q_ARG(QVector, m_inputExpoTimes), - Q_ARG(TonemappingOptions*, l_v->getTonemappingOptions()), - Q_ARG(pfs::Params, p)); + if (!m_inputFilesName.isEmpty()) { + inputfname = m_inputFilesName.first(); + } else { + inputfname = "FromHdrFile"; + } + QMetaObject::invokeMethod( + m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, + Q_ARG(GenericViewer *, l_v), Q_ARG(QString, outputFilename), + Q_ARG(QString, inputfname), Q_ARG(QVector, m_inputExpoTimes), + Q_ARG(TonemappingOptions *, l_v->getTonemappingOptions()), + Q_ARG(pfs::Params, p)); } } -void MainWindow::save_hdr_success(GenericViewer* saved_hdr, const QString& fname) -{ +void MainWindow::save_hdr_success(GenericViewer *saved_hdr, + const QString &fname) { QFileInfo qfi(fname); setCurrentFile(qfi.absoluteFilePath()); @@ -726,70 +760,78 @@ m_tabwidget->setTabText(m_tabwidget->indexOf(saved_hdr), qfi.fileName()); } -void MainWindow::save_hdr_failed(const QString &fname) -{ +void MainWindow::save_hdr_failed(const QString &fname) { // TODO give some kind of feedback to the user! - // TODO pass the name of the file, so the user know which file didn't save correctly + // TODO pass the name of the file, so the user know which file didn't save + // correctly // DONE!!! Once again, use unified style? - QMessageBox::warning(0,"", tr("Failed to save %1").arg(fname), QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::warning(0, QLatin1String(""), + tr("Failed to save %1").arg(fname), QMessageBox::Ok, + QMessageBox::NoButton); } -void MainWindow::save_ldr_success(GenericViewer* saved_ldr, const QString& fname) -{ - if ( !saved_ldr->isHDR() ) - m_tabwidget->setTabText(m_tabwidget->indexOf(saved_ldr), QFileInfo(fname).fileName()); +void MainWindow::save_ldr_success(GenericViewer *saved_ldr, + const QString &fname) { + if (!saved_ldr->isHDR()) + m_tabwidget->setTabText(m_tabwidget->indexOf(saved_ldr), + QFileInfo(fname).fileName()); } -void MainWindow::save_ldr_failed(const QString &fname) -{ +void MainWindow::save_ldr_failed(const QString &fname) { // TODO give some kind of feedback to the user! - // TODO pass the name of the file, so the user know which file didn't save correctly + // TODO pass the name of the file, so the user know which file didn't save + // correctly // DONE!!! Once again, use unified style? - QMessageBox::warning(0,"", tr("Failed to save %1").arg(fname), QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::warning(0, QLatin1String(""), + tr("Failed to save %1").arg(fname), QMessageBox::Ok, + QMessageBox::NoButton); } -void MainWindow::on_actionSave_Hdr_Preview_triggered() -{ +void MainWindow::on_actionSave_Hdr_Preview_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); if (!g_v->isHDR()) return; - try - { + try { QString ldr_name = QFileInfo(getCurrentHDRName()).baseName(); - QString outfname = getLdrFileNameFromSaveDialog(ldr_name + "_" + g_v->getFileNamePostFix() + ".jpg", this); + QString outfname = getLdrFileNameFromSaveDialog( + ldr_name + "_" + g_v->getFileNamePostFix() + ".jpg", this); - if ( outfname.isEmpty() ) return; + if (outfname.isEmpty()) return; - QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, - Q_ARG(GenericViewer*, g_v), - Q_ARG(QString, outfname), - Q_ARG(QString, QString()), - Q_ARG(QVector, QVector()), - Q_ARG(TonemappingOptions*, NULL), - Q_ARG(pfs::Params, pfs::Params("quality", 100u)) ); - } - catch (...) - { + QString inputfname; + if (!m_inputFilesName.isEmpty()) { + inputfname = m_inputFilesName.first(); + } else { + inputfname = "FromHdrFile"; + } + + QMetaObject::invokeMethod( + m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, + Q_ARG(GenericViewer *, g_v), Q_ARG(QString, outfname), + Q_ARG(QString, inputfname), Q_ARG(QVector, QVector()), + Q_ARG(TonemappingOptions *, nullptr), + Q_ARG(pfs::Params, pfs::Params("quality", 100u))); + } catch (...) { return; } } -void MainWindow::updateActions( int w ) -{ +void MainWindow::updateActions(int w) { #ifdef QT_DEBUG qDebug() << "MainWindow::updateActions(" << w << ")"; #endif bool hasImage = w >= 0; - GenericViewer* g_v = hasImage ? (GenericViewer*)m_tabwidget->widget(w) : 0; + GenericViewer *g_v = hasImage ? qobject_cast(m_tabwidget->widget(w)) : 0; bool isHdr = g_v ? g_v->isHDR() : false; bool isLdr = g_v ? !g_v->isHDR() : false; LuminanceOptions luminance_opts; - bool hasPrinterProfile = !luminance_opts.getPrinterProfileFileName().isEmpty(); + bool hasPrinterProfile = + !luminance_opts.getPrinterProfileFileName().isEmpty(); - updateMagnificationButtons(g_v); // g_v ? g_v : 0 + updateMagnificationButtons(g_v); // g_v ? g_v : 0 m_Ui->fileSaveAsAction->setEnabled(hasImage); m_Ui->actionRemove_Tab->setEnabled(hasImage); @@ -816,7 +858,8 @@ m_Ui->actionSoft_Proofing->setEnabled(isLdr && hasPrinterProfile); m_Ui->actionGamut_Check->setEnabled(isLdr && hasPrinterProfile); - bool hasCropping = isHdr && tm_status.curr_tm_frame && tm_status.curr_tm_frame->hasSelection(); + bool hasCropping = isHdr && tm_status.curr_tm_frame && + tm_status.curr_tm_frame->hasSelection(); m_Ui->cropToSelectionAction->setEnabled(hasCropping); m_Ui->removeSelectionAction->setEnabled(hasCropping); @@ -824,31 +867,23 @@ m_Ui->actionShow_Image_Full_Screen->setEnabled(hasImage); } -void MainWindow::on_rotateccw_triggered() -{ - dispatchrotate(false); -} +void MainWindow::on_rotateccw_triggered() { dispatchrotate(false); } -void MainWindow::on_rotatecw_triggered() -{ - dispatchrotate(true); -} +void MainWindow::on_rotatecw_triggered() { dispatchrotate(true); } -void MainWindow::dispatchrotate(bool clockwise) -{ +void MainWindow::dispatchrotate(bool clockwise) { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); m_Ui->rotateccw->setEnabled(false); m_Ui->rotatecw->setEnabled(false); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); pfs::Frame *rotated = pfs::rotate(curr_g_v->getFrame(), clockwise); curr_g_v->setFrame(rotated); - if ( !curr_g_v->needsSaving() ) - { + if (!curr_g_v->needsSaving()) { curr_g_v->setNeedsSaving(true); int index = m_tabwidget->indexOf(curr_g_v); @@ -864,20 +899,17 @@ m_Ui->rotatecw->setEnabled(true); } -void MainWindow::on_actionResizeHDR_triggered() -{ +void MainWindow::on_actionResizeHDR_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); ResizeDialog *resizedialog = new ResizeDialog(this, curr_g_v->getFrame()); - if (resizedialog->exec() == QDialog::Accepted) - { - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + if (resizedialog->exec() == QDialog::Accepted) { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); curr_g_v->setFrame(resizedialog->getResizedFrame()); - if (! curr_g_v->needsSaving()) - { + if (!curr_g_v->needsSaving()) { curr_g_v->setNeedsSaving(true); int index = m_tabwidget->indexOf(curr_g_v); @@ -892,39 +924,36 @@ delete resizedialog; } -void MainWindow::on_actionExportToHTML_triggered() -{ +void MainWindow::on_actionExportToHTML_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); - ExportToHtmlDialog *exportDialog = new ExportToHtmlDialog(this, curr_g_v->getFrame()); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); + ExportToHtmlDialog *exportDialog = + new ExportToHtmlDialog(this, curr_g_v->getFrame()); exportDialog->exec(); delete exportDialog; } -void MainWindow::on_actionSupported_Cameras_triggered() -{ +void MainWindow::on_actionSupported_Cameras_triggered() { SupportedCamerasDialog *supportedDialog = new SupportedCamerasDialog(this); supportedDialog->exec(); delete supportedDialog; } -void MainWindow::on_action_Projective_Transformation_triggered() -{ +void MainWindow::on_action_Projective_Transformation_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); - ProjectionsDialog *projTranfsDialog = new ProjectionsDialog(this, curr_g_v->getFrame()); - if (projTranfsDialog->exec() == QDialog::Accepted) - { - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + ProjectionsDialog *projTranfsDialog = + new ProjectionsDialog(this, curr_g_v->getFrame()); + if (projTranfsDialog->exec() == QDialog::Accepted) { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); curr_g_v->setFrame(projTranfsDialog->getTranformedFrame()); - if ( !curr_g_v->needsSaving() ) - { + if (!curr_g_v->needsSaving()) { curr_g_v->setNeedsSaving(true); int index = m_tabwidget->indexOf(curr_g_v); @@ -939,150 +968,130 @@ delete projTranfsDialog; } -void MainWindow::on_Decrease_exposure_triggered() -{ +void MainWindow::on_Decrease_exposure_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->decreaseExposure(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->decreaseExposure(); } -void MainWindow::on_Extend_dynamic_range_triggered() -{ +void MainWindow::on_Extend_dynamic_range_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->extendRange(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->extendRange(); } -void MainWindow::on_Fit_to_dynamic_range_triggered() -{ +void MainWindow::on_Fit_to_dynamic_range_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->fitToDynamicRange(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->fitToDynamicRange(); } -void MainWindow::on_Increase_exposure_triggered() -{ +void MainWindow::on_Increase_exposure_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->increaseExposure(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->increaseExposure(); } -void MainWindow::on_Shrink_dynamic_range_triggered() -{ +void MainWindow::on_Shrink_dynamic_range_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->shrinkRange(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->shrinkRange(); } -void MainWindow::on_Low_dynamic_range_triggered() -{ +void MainWindow::on_Low_dynamic_range_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - HdrViewer* curr_hdr_v = dynamic_cast(g_v); - if ( curr_hdr_v != NULL ) - curr_hdr_v->lumRange()->lowDynamicRange(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); + HdrViewer *curr_hdr_v = qobject_cast(g_v); + if (curr_hdr_v != nullptr) curr_hdr_v->lumRange()->lowDynamicRange(); } // Zoom = Viewers (START) -void MainWindow::on_zoomInAct_triggered() -{ +void MainWindow::on_zoomInAct_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); g_v->zoomIn(); - //updateMagnificationButtons(g_v); } -void MainWindow::on_zoomOutAct_triggered() -{ +void MainWindow::on_zoomOutAct_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); g_v->zoomOut(); - //updateMagnificationButtons(g_v); } -void MainWindow::on_fitToWindowAct_triggered() -{ +void MainWindow::on_fitToWindowAct_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); g_v->fitToWindow(); - //updateMagnificationButtons(g_v); } -void MainWindow::on_actionFill_to_Window_triggered() -{ +void MainWindow::on_actionFill_to_Window_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); g_v->fillToWindow(); - //updateMagnificationButtons(g_v); } -void MainWindow::on_normalSizeAct_triggered() -{ +void MainWindow::on_normalSizeAct_triggered() { if (m_tabwidget->count() <= 0) return; - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *g_v = qobject_cast(m_tabwidget->currentWidget()); g_v->normalSize(); - //updateMagnificationButtons(g_v); } // Zoom = Viewers (END) - -void MainWindow::on_documentationAction_triggered() -{ - helpBrowser = new HelpBrowser(this,"Luminance HDR Help"); - helpBrowser->setAttribute(Qt::WA_DeleteOnClose); - connect(helpBrowser, SIGNAL(closed()), this, SLOT(helpBrowserClosed())); - helpBrowser->show(); +void MainWindow::on_documentationAction_triggered() { + if (sm_helpBrowser == nullptr) { + sm_helpBrowser = + new HelpBrowser(0, QStringLiteral("Luminance HDR Help")); + sm_helpBrowser->setAttribute(Qt::WA_DeleteOnClose); + connect(sm_helpBrowser, &QObject::destroyed, sm_helpBrowser, + &QObject::deleteLater); + connect(sm_helpBrowser, &HelpBrowser::closed, this, + &MainWindow::helpBrowserClosed); + sm_helpBrowser->show(); + } else { + sm_helpBrowser->show(); + sm_helpBrowser->activateWindow(); + sm_helpBrowser->raise(); + } } -void MainWindow::helpBrowserClosed() -{ - helpBrowser = NULL; +void MainWindow::helpBrowserClosed() { + sm_helpBrowser = nullptr; } -void MainWindow::enterWhatsThis() -{ - QWhatsThis::enterWhatsThisMode(); -} +void MainWindow::enterWhatsThis() { QWhatsThis::enterWhatsThisMode(); } -void MainWindow::openRecentFile() -{ +void MainWindow::openRecentFile() { QAction *action = qobject_cast(sender()); - if (action) - { - //emit open_hdr_frame(action->data().toString()); - QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", Qt::QueuedConnection, + if (action) { + // emit open_hdr_frame(action->data().toString()); + QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", + Qt::QueuedConnection, Q_ARG(QString, action->data().toString())); } } -void MainWindow::setupIO() -{ +void MainWindow::setupIO() { // progress bar m_ProgressBar = new QProgressBar(this); m_ProgressBar->hide(); @@ -1095,47 +1104,52 @@ m_IOWorker->moveToThread(m_IOThread); // Memory Management - connect(this, SIGNAL(destroyed()), m_IOWorker, SLOT(deleteLater())); - connect(m_IOWorker, SIGNAL(destroyed()), m_IOThread, SLOT(deleteLater())); + connect(this, &QObject::destroyed, m_IOWorker, &QObject::deleteLater); + connect(m_IOWorker, &QObject::destroyed, m_IOThread, &QObject::deleteLater); // Open - //connect(this, SIGNAL(open_hdr_frame(QString)), m_IOWorker, SLOT(read_hdr_frame(QString))); - connect(m_IOWorker, SIGNAL(read_hdr_success(pfs::Frame*, QString)), this, SLOT(load_success(pfs::Frame*, QString))); - connect(m_IOWorker, SIGNAL(read_hdr_failed(QString)), this, SLOT(load_failed(QString))); + connect(m_IOWorker, SIGNAL(read_hdr_success(pfs::Frame *, const QString &)), + this, SLOT(load_success(pfs::Frame *, const QString &))); + connect(m_IOWorker, &IOWorker::read_hdr_failed, this, + &MainWindow::load_failed); // Save HDR - //connect(this, SIGNAL(save_hdr_frame(HdrViewer*, QString)), m_IOWorker, SLOT(write_hdr_frame(HdrViewer*, QString))); - connect(m_IOWorker, SIGNAL(write_hdr_success(GenericViewer*, QString)), this, SLOT(save_hdr_success(GenericViewer*, QString))); - connect(m_IOWorker, SIGNAL(write_hdr_failed(QString)), this, SLOT(save_hdr_failed(QString))); + connect(m_IOWorker, + SIGNAL(write_hdr_success(GenericViewer *, const QString &)), this, + SLOT(save_hdr_success(GenericViewer *, const QString &))); + connect(m_IOWorker, &IOWorker::write_hdr_failed, this, + &MainWindow::save_hdr_failed); // Save LDR - //connect(this, SIGNAL(save_ldr_frame(LdrViewer*, QString, int)), m_IOWorker, SLOT(write_ldr_frame(LdrViewer*, QString, int))); - connect(m_IOWorker, SIGNAL(write_ldr_success(GenericViewer*, QString)), this, SLOT(save_ldr_success(GenericViewer*, QString))); - connect(m_IOWorker, SIGNAL(write_ldr_failed(QString)), this, SLOT(save_ldr_failed(QString))); + connect(m_IOWorker, + SIGNAL(write_ldr_success(GenericViewer *, const QString &)), this, + SLOT(save_ldr_success(GenericViewer *, const QString &))); + connect(m_IOWorker, &IOWorker::write_ldr_failed, this, + &MainWindow::save_ldr_failed); // progress bar handling - connect(m_IOWorker, SIGNAL(setValue(int)), m_ProgressBar, SLOT(setValue(int))); - connect(m_IOWorker, SIGNAL(setMaximum(int)), m_ProgressBar, SLOT(setMaximum(int))); - connect(m_IOWorker, SIGNAL(IO_init()), this, SLOT(ioBegin())); - connect(m_IOWorker, SIGNAL(IO_finish()), this, SLOT(ioEnd())); + connect(m_IOWorker, &IOWorker::setValue, m_ProgressBar, + &QProgressBar::setValue); + connect(m_IOWorker, &IOWorker::setMaximum, m_ProgressBar, + &QProgressBar::setMaximum); + connect(m_IOWorker, &IOWorker::IO_init, this, &MainWindow::ioBegin); + connect(m_IOWorker, &IOWorker::IO_finish, this, &MainWindow::ioEnd); // start thread waiting for signals (I/O requests) m_IOThread->start(); } -void MainWindow::ioBegin() -{ +void MainWindow::ioBegin() { statusBar()->clearMessage(); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // statusBar()->addWidget(m_ProgressBar); m_ProgressBar->setMaximum(0); m_ProgressBar->show(); } -void MainWindow::ioEnd() -{ - //statusBar()->removeWidget(m_ProgressBar); +void MainWindow::ioEnd() { + // statusBar()->removeWidget(m_ProgressBar); m_ProgressBar->reset(); m_ProgressBar->hide(); @@ -1144,8 +1158,7 @@ statusBar()->showMessage(tr("Done!"), 800); } -void MainWindow::load_failed(const QString& errorMessage) -{ +void MainWindow::load_failed(const QString &errorMessage) { m_ProgressBar->reset(); m_ProgressBar->hide(); @@ -1156,55 +1169,64 @@ QMessageBox::Ok, QMessageBox::NoButton); } -void MainWindow::load_success(pfs::Frame* new_hdr_frame, - const QString& new_fname, const QStringList& inputFileNames, bool needSaving) -{ - if ( tm_status.is_hdr_ready ) - { - MainWindow *other = new MainWindow(new_hdr_frame, new_fname, inputFileNames, needSaving); +void MainWindow::load_success(pfs::Frame *new_hdr_frame, + const QString &new_fname, + const QStringList &inputFileNames, + bool needSaving) { + if (tm_status.is_hdr_ready) { + MainWindow *other = new MainWindow(new_hdr_frame, new_fname, + inputFileNames, needSaving); other->move(x() + 40, y() + 40); other->show(); - } - else - { + } else { #ifdef QT_DEBUG qDebug() << "Filename: " << new_fname; #endif - - HdrViewer* newhdr = new HdrViewer(new_hdr_frame, this, needSaving); + HdrViewer *newhdr = new HdrViewer(new_hdr_frame, this, needSaving); newhdr->setAttribute(Qt::WA_DeleteOnClose); - connect(newhdr, SIGNAL(selectionReady(bool)), - this, SLOT(enableCrop(bool))); - connect(newhdr, SIGNAL(changed(GenericViewer*)), - this, SLOT(syncViewers(GenericViewer*))); - connect(newhdr, SIGNAL(changed(GenericViewer*)), - this, SLOT(updateMagnificationButtons(GenericViewer*))); - connect(newhdr, SIGNAL(reparent(GenericViewer*)), - this, SLOT(reparentViewer(GenericViewer*))); - connect(newhdr, SIGNAL(goNext(GenericViewer*)), - this, SLOT(showNextViewer(GenericViewer*))); - connect(newhdr, SIGNAL(goPrevious(GenericViewer*)), - this, SLOT(showPreviousViewer(GenericViewer*))); - connect(newhdr, SIGNAL(syncViewers(GenericViewer*)), - this, SLOT(setSyncViewers(GenericViewer*))); + connect(newhdr, &GenericViewer::selectionReady, this, + &MainWindow::enableCrop); + connect(newhdr, &GenericViewer::changed, this, + &MainWindow::syncViewers); + connect(newhdr, &GenericViewer::changed, this, + &MainWindow::updateMagnificationButtons); + connect(newhdr, &GenericViewer::reparent, this, + &MainWindow::reparentViewer); + connect(newhdr, &GenericViewer::goNext, this, + &MainWindow::showNextViewer); + connect(newhdr, &GenericViewer::goPrevious, this, + &MainWindow::showPreviousViewer); + connect(newhdr, &GenericViewer::syncViewers, this, + &MainWindow::setSyncViewers); - newhdr->setViewerMode( getCurrentViewerMode(*m_tabwidget) ); + newhdr->setViewerMode(getCurrentViewerMode(*m_tabwidget)); QFileInfo qfileinfo(new_fname); - if ( !qfileinfo.exists() ) - { + if (!qfileinfo.exists()) { // it doesn't exist on the file system, so I have just got back a // file from some creational operation (new hdr, crop...) + m_inputFilesName = inputFileNames; + QFileInfo fi1(m_inputFilesName.first()); - newhdr->setFileName(QString(tr("Untitled"))); + if (m_inputFilesName.first() != m_inputFilesName.last()) { + QFileInfo fi2(m_inputFilesName.last()); + + m_outputFileNamePrefix = + fi1.completeBaseName() + "-" + fi2.completeBaseName(); + } + else { + m_outputFileNamePrefix = fi1.completeBaseName(); + } + // newhdr->setFileName(QString(tr("Untitled"))); + newhdr->setFileName(m_outputFileNamePrefix); m_tabwidget->addTab(newhdr, QString(new_fname).prepend("(*) ")); + m_HdrCaption = new_fname; setWindowModified(true); - } - else - { + } else { + m_outputFileNamePrefix = new_fname; // the new file exists on the file system, so I can use this value // to set captions and so on newhdr->setFileName(new_fname); @@ -1214,8 +1236,6 @@ setWindowModified(needSaving); } - m_inputFilesName = inputFileNames; - tm_status.is_hdr_ready = true; tm_status.curr_tm_frame = newhdr; @@ -1232,129 +1252,102 @@ } } -void MainWindow::on_OptionsAction_triggered() -{ +void MainWindow::on_OptionsAction_triggered() { PreferencesDialog *opts = new PreferencesDialog(this); opts->setAttribute(Qt::WA_DeleteOnClose); - if (opts->exec() == QDialog::Accepted) - { - m_Ui->actionShowPreviewPanel->setChecked(luminance_options->isPreviewPanelActive()); + if (opts->exec() == QDialog::Accepted) { + m_Ui->actionShowPreviewPanel->setChecked( + LuminanceOptions().isPreviewPanelActive()); } } -void MainWindow::on_Transplant_Exif_Data_action_triggered() -{ - TransplantExifDialog *transplant=new TransplantExifDialog(this); +void MainWindow::on_Transplant_Exif_Data_action_triggered() { + TransplantExifDialog *transplant = new TransplantExifDialog(this); transplant->setAttribute(Qt::WA_DeleteOnClose); transplant->exec(); } -void MainWindow::dragEnterEvent(QDragEnterEvent *event) -{ +void MainWindow::dragEnterEvent(QDragEnterEvent *event) { event->acceptProposedAction(); } -void MainWindow::dropEvent(QDropEvent *event) -{ - if (event->mimeData()->hasUrls()) - { +void MainWindow::dropEvent(QDropEvent *event) { + if (event->mimeData()->hasUrls()) { openFiles(convertUrlListToFilenameList(event->mimeData()->urls())); } event->acceptProposedAction(); } -void MainWindow::openFile(const QString& filename) -{ +void MainWindow::openFile(const QString &filename) { QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", - Qt::QueuedConnection, - Q_ARG(QString, filename)); + Qt::QueuedConnection, Q_ARG(QString, filename)); } -void MainWindow::openFiles(const QStringList& files) -{ - if (files.size() > 0) - { - switch (DnDOptionDialog::showDndDialog(this, files)) - { - case DnDOptionDialog::ACTION_NEW_HDR: - { - createNewHdr(files); - } break; - case DnDOptionDialog::ACTION_OPEN_HDR: - { - foreach (const QString& filename, files) - { - openFile(filename); - } - } break; +void MainWindow::openFiles(const QStringList &files) { + if (files.size() > 0) { + switch (DnDOptionDialog::showDndDialog(this, files)) { + case DnDOptionDialog::ACTION_NEW_HDR: { + createNewHdr(files); + } break; + case DnDOptionDialog::ACTION_OPEN_HDR: { + foreach (const QString &filename, files) { openFile(filename); } + } break; } } } -void MainWindow::Text_Under_Icons() -{ +void MainWindow::Text_Under_Icons() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextUnderIcon); + LuminanceOptions().setMainWindowToolBarMode(Qt::ToolButtonTextUnderIcon); } -void MainWindow::Icons_Only() -{ +void MainWindow::Icons_Only() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); - luminance_options->setMainWindowToolBarMode(Qt::ToolButtonIconOnly); + LuminanceOptions().setMainWindowToolBarMode(Qt::ToolButtonIconOnly); } -void MainWindow::Text_Alongside_Icons() -{ +void MainWindow::Text_Alongside_Icons() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextBesideIcon); + LuminanceOptions().setMainWindowToolBarMode(Qt::ToolButtonTextBesideIcon); } -void MainWindow::Text_Only() -{ +void MainWindow::Text_Only() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextOnly); - luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextOnly); + LuminanceOptions().setMainWindowToolBarMode(Qt::ToolButtonTextOnly); } -void MainWindow::onUpdateAvailable() -{ +void MainWindow::onUpdateAvailable() { m_Ui->actionUpdateAvailable->setVisible(true); } -void MainWindow::on_actionUpdateAvailable_triggered() -{ - if (sm_updateChecker) - { +void MainWindow::on_actionUpdateAvailable_triggered() { + if (sm_updateChecker) { sm_updateChecker->trayMessageClicked(); } } -void MainWindow::on_actionAbout_Luminance_triggered() -{ - UMessageBox::about(); -} +void MainWindow::on_actionAbout_Luminance_triggered() { UMessageBox::about(); } /* * Window Menu Display and Functionalities */ -void MainWindow::updateWindowMenu() -{ +void MainWindow::updateWindowMenu() { // Remove current elements inside the menuWindows - foreach (QAction* Action_MW, openMainWindows) - { + foreach (QAction *Action_MW, openMainWindows) { openMainWindows.removeAll(Action_MW); - m_Ui->menuWindows->removeAction( Action_MW ); + m_Ui->menuWindows->removeAction(Action_MW); delete Action_MW; } - foreach (QWidget *widget, QApplication::topLevelWidgets()) - { + foreach (QWidget *widget, QApplication::topLevelWidgets()) { MainWindow *MW = qobject_cast(widget); - if (MW != NULL) - { - QAction *action = m_Ui->menuWindows->addAction( MW->getCurrentHDRName() ); + if (MW != nullptr) { + QAction *action = + m_Ui->menuWindows->addAction(MW->getCurrentHDRName()); action->setCheckable(true); action->setChecked(MW == this); + // connect(action, SIGNAL(triggered()), windowMapper, SLOT(map())); connect(action, SIGNAL(triggered()), windowMapper, SLOT(map())); windowMapper->setMapping(action, MW); @@ -1367,168 +1360,212 @@ * This function sets the active Main Window * when the file name is selected inside the "Window" menu */ -void MainWindow::setActiveMainWindow(QWidget* w) -{ +void MainWindow::setActiveMainWindow(QWidget *w) { MainWindow *MW = qobject_cast(w); - if ( MW == NULL ) return; + if (MW == nullptr) return; MW->raise(); MW->activateWindow(); return; } -void MainWindow::on_actionBring_All_to_Front_triggered() -{ - foreach (QWidget *widget, QApplication::topLevelWidgets()) - { +void MainWindow::on_actionBring_All_to_Front_triggered() { + foreach (QWidget *widget, QApplication::topLevelWidgets()) { MainWindow *MW = qobject_cast(widget); - if (MW != NULL) - { + if (MW != nullptr) { MW->raise(); } } } -void MainWindow::on_actionBatch_HDR_triggered() -{ - BatchHDRDialog *batch_hdr_dialog = new BatchHDRDialog(this); +void MainWindow::on_actionBatch_HDR_triggered() { + BatchHDRDialog *batch_hdr_dialog = new BatchHDRDialog(this, QSqlDatabase::database(m_tonemapPanel->getDatabaseConnection())); batch_hdr_dialog->exec(); delete batch_hdr_dialog; } -void MainWindow::on_actionBatch_Tone_Mapping_triggered() -{ - BatchTMDialog *batchdialog = new BatchTMDialog(this); +void MainWindow::on_actionBatch_Tone_Mapping_triggered() { + BatchTMDialog *batchdialog = new BatchTMDialog(this, QSqlDatabase::database(m_tonemapPanel->getDatabaseConnection())); batchdialog->exec(); delete batchdialog; } -void MainWindow::cropToSelection() -{ +void MainWindow::cropToSelection() { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); - if ( !curr_g_v->isHDR() ) return; - if ( !curr_g_v->hasSelection() ) return; + if (!curr_g_v->isHDR()) return; + if (!curr_g_v->hasSelection()) return; QRect cropRect = curr_g_v->getSelectionRect(); int x_ul, y_ul, x_br, y_br; cropRect.getCoords(&x_ul, &y_ul, &x_br, &y_br); disableCrop(); pfs::Frame *original_frame = curr_g_v->getFrame(); - pfs::Frame *cropped_frame = pfs::cut(original_frame, x_ul, y_ul, x_br, y_br); + pfs::Frame *cropped_frame = + pfs::cut(original_frame, x_ul, y_ul, x_br, y_br); - emit load_success(cropped_frame, QString(tr("Cropped Image")), m_inputFilesName, true); + emit load_success(cropped_frame, QString(tr("Cropped Image")), + m_inputFilesName, true); curr_g_v->removeSelection(); } -void MainWindow::enableCrop(bool isReady) -{ +void MainWindow::enableCrop(bool isReady) { m_Ui->cropToSelectionAction->setEnabled(isReady); m_Ui->removeSelectionAction->setEnabled(isReady); } -void MainWindow::disableCrop() -{ +void MainWindow::disableCrop() { if (m_tabwidget->count() <= 0) return; - GenericViewer* curr_g_v = (GenericViewer*)m_tabwidget->currentWidget(); + GenericViewer *curr_g_v = qobject_cast(m_tabwidget->currentWidget()); - if ( !curr_g_v->isHDR() ) return; + if (!curr_g_v->isHDR()) return; curr_g_v->removeSelection(); m_Ui->cropToSelectionAction->setEnabled(false); m_Ui->removeSelectionAction->setEnabled(false); } -void MainWindow::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) - { - m_Ui->retranslateUi(this); +void MainWindow::changeEvent(QEvent *event) { + if (event->type() == QEvent::LanguageChange) { + m_Ui->retranslateUi(this); setWindowTitle(QString("Luminance HDR " LUMINANCEVERSION " [*]")); } QWidget::changeEvent(event); } -void MainWindow::closeEvent( QCloseEvent *event ) -{ - if ( maybeSave() ) - { - event->accept(); +void MainWindow::closeEvent(QCloseEvent *event) { + if (!maybeSave()) { + event->ignore(); + return; + } + if (m_isFullscreenViewer) { + reparentViewer(m_g_v_fullscreen); } - else + sm_NumMainWindows--; + if (sm_NumMainWindows == 0) { + if (sm_helpBrowser) { + sm_helpBrowser->close(); + } + } + + if (sm_NumMainWindows == 0) { + // Last MainWindow is dead... + LuminanceOptions().setValue(QStringLiteral("MainWindowState"), + saveState()); + LuminanceOptions().setValue(QStringLiteral("MainWindowGeometry"), + saveGeometry()); + LuminanceOptions().setValue(QStringLiteral("MainWindowSplitterState"), + m_centralwidget_splitter->saveState()); + LuminanceOptions().setValue( + QStringLiteral("MainWindowSplitterGeometry"), + m_centralwidget_splitter->saveGeometry()); + LuminanceOptions().setValue( + QStringLiteral("MainWindowBottomSplitterState"), + m_bottom_splitter->saveState()); + LuminanceOptions().setValue( + QStringLiteral("MainWindowBottomSplitterGeometry"), + m_bottom_splitter->saveGeometry()); + + sm_updateChecker.reset(); + } else { + sm_mainWindowMap.take(m_winId); + int winId = sm_mainWindowMap.firstKey(); + MainWindow *p = sm_mainWindowMap[winId]; + disconnect(sm_updateChecker.data(), &UpdateChecker::updateAvailable, p, + &MainWindow::onUpdateAvailable); + sm_updateChecker->setParent(p); + connect(sm_updateChecker.data(), &UpdateChecker::updateAvailable, p, + &MainWindow::onUpdateAvailable); + } + + // Let's close all threads + m_IOThread->quit(); // should be idle, quit() ok + m_IOThread->wait(); + if (!m_TMProgressBar->isTerminated()) // MainWindow closed while + // tonemapping is running { - event->ignore(); + m_TMProgressBar->requestTermination(); } + m_TMThread->quit(); + m_TMThread->wait(); + m_QueueThread->quit(); // should be idle, quit() ok + m_QueueThread->wait(); + + clearRecentFileActions(); + QMainWindow::closeEvent(event); } -bool MainWindow::event(QEvent* event) -{ +bool MainWindow::event(QEvent *event) { bool result = QMainWindow::event(event); - if (event->type() == QEvent::WindowActivate && m_firstWindow == 1) - { + if (event->type() == QEvent::WindowActivate && m_firstWindow == 1) { m_firstWindow = 2; - if (luminance_options->doShowWindowsOnWindows64Message()) - { - QMessageBox::warning(this, "Luminance HDR 32-bit on 64-bit", tr("It appears that you are running the 32-bit version Luminance HDR on a 64-bit system.
Please download the 64-bit version from http://qtpfsgui.sourceforge.net to get the best Luminance HDR experience!"), QMessageBox::Ok, QMessageBox::NoButton); + if (LuminanceOptions().doShowWindowsOnWindows64Message()) { + QMessageBox::warning( + this, QStringLiteral("Luminance HDR 32-bit on 64-bit"), + tr("It appears that you are running the 32-bit version " + "Luminance HDR on a 64-bit system.
" + "Please download the 64-bit version from " + "http://" + "qtpfsgui.sourceforge.net " + "to get the best Luminance HDR experience!"), + QMessageBox::Ok, QMessageBox::NoButton); } } return result; } -bool MainWindow::maybeSave() -{ +bool MainWindow::maybeSave() { // if no HDR is open, return true - if ( !tm_status.is_hdr_ready ) return true; + if (!tm_status.is_hdr_ready) return true; - if ( tm_status.curr_tm_frame->needsSaving() ) - { + if (tm_status.curr_tm_frame->needsSaving()) { int ret = UMessageBox::saveDialog( - tr("Unsaved changes..."), - tr("This HDR image has unsaved changes.
Do you want to save it?"), - this); - switch(ret) - { - case QMessageBox::Save: { - // if save == success return true; - // else return false; - QString fname = getHdrFileNameFromSaveDialog(QString("Untitled"), this); - - if ( !fname.isEmpty() ) - { - // TODO : can I launch a signal and wait that it gets executed fully? - return m_IOWorker->write_hdr_frame( - dynamic_cast(tm_status.curr_tm_frame), - fname); - } - else - { - return false; - } - } break; - case QMessageBox::Discard: { - return true; - } break; - case QMessageBox::Cancel: - default: { - return false; - } break; + tr("Unsaved changes..."), tr("This HDR image has unsaved " + "changes.
Do you want to save it?"), + this); + switch (ret) { + case QMessageBox::Save: { + // if save == success return true; + // else return false; + // QString fname = + // getHdrFileNameFromSaveDialog(QStringLiteral("Untitled"), + // this); + QString fname = getHdrFileNameFromSaveDialog( + m_outputFileNamePrefix + "-" + m_HdrCaption, this); + + if (!fname.isEmpty()) { + // TODO : can I launch a signal and wait that it gets + // executed + // fully? + return m_IOWorker->write_hdr_frame( + qobject_cast(tm_status.curr_tm_frame), + fname); + } else { + return false; + } + } break; + case QMessageBox::Discard: { + return true; + } break; + case QMessageBox::Cancel: + default: { return false; } break; } - } - else return true; + } else + return true; } -void MainWindow::setupTM() -{ +void MainWindow::setupTM() { // TODO: Building TM Thread tm_status.is_hdr_ready = false; - tm_status.curr_tm_frame = NULL; - tm_status.curr_tm_options = NULL; + tm_status.curr_tm_frame = nullptr; + tm_status.curr_tm_options = nullptr; m_tonemapPanel->setEnabled(false); @@ -1536,7 +1573,7 @@ m_TMProgressBar->hide(); statusBar()->addWidget(m_TMProgressBar); - connect(this, SIGNAL(destroyed()), m_TMProgressBar, SLOT(deleteLater())); + connect(this, &QObject::destroyed, m_TMProgressBar, &QObject::deleteLater); m_TMWorker = new TMWorker; m_TMThread = new QThread; @@ -1544,35 +1581,40 @@ m_TMWorker->moveToThread(m_TMThread); // Memory Management - connect(this, SIGNAL(destroyed()), m_TMWorker, SLOT(deleteLater())); - connect(m_TMWorker, SIGNAL(destroyed()), m_TMThread, SLOT(deleteLater())); + connect(this, &QObject::destroyed, m_TMWorker, &QObject::deleteLater); + connect(m_TMWorker, &QObject::destroyed, m_TMThread, &QObject::deleteLater); // get back result! - connect(m_TMWorker, SIGNAL(tonemapSuccess(pfs::Frame*,TonemappingOptions*)), - this, SLOT(addLdrFrame(pfs::Frame*, TonemappingOptions*))); - connect(m_TMWorker, SIGNAL(tonemapFailed(QString)), - this, SLOT(tonemapFailed(QString))); + connect(m_TMWorker, &TMWorker::tonemapSuccess, this, + &MainWindow::addLdrFrame); + connect(m_TMWorker, SIGNAL(tonemapFailed(QString)), this, + SLOT(tonemapFailed(QString))); // progress bar handling - connect(m_TMWorker, SIGNAL(tonemapBegin()), this, SLOT(tonemapBegin())); - connect(m_TMWorker, SIGNAL(tonemapEnd()), this, SLOT(tonemapEnd())); - - connect(m_TMWorker, SIGNAL(tonemapSetValue(int)), m_TMProgressBar, SLOT(setValue(int))); - connect(m_TMWorker, SIGNAL(tonemapSetMaximum(int)), m_TMProgressBar, SLOT(setMaximum(int))); - connect(m_TMWorker, SIGNAL(tonemapSetMinimum(int)), m_TMProgressBar, SLOT(setMinimum(int))); - connect(m_TMProgressBar, SIGNAL(terminate()), m_TMWorker, SIGNAL(tonemapRequestTermination()), Qt::DirectConnection); + connect(m_TMWorker, &TMWorker::tonemapBegin, this, + &MainWindow::tonemapBegin); + connect(m_TMWorker, &TMWorker::tonemapEnd, this, &MainWindow::tonemapEnd); + + connect(m_TMWorker, &TMWorker::tonemapSetValue, m_TMProgressBar, + &TMOProgressIndicator::setValue); + connect(m_TMWorker, &TMWorker::tonemapSetMaximum, m_TMProgressBar, + &TMOProgressIndicator::setMaximum); + connect(m_TMWorker, &TMWorker::tonemapSetMinimum, m_TMProgressBar, + &TMOProgressIndicator::setMinimum); + connect(m_TMProgressBar, &TMOProgressIndicator::terminate, m_TMWorker, + &TMWorker::tonemapRequestTermination, Qt::DirectConnection); // start thread waiting for signals (I/O requests) m_TMThread->start(); } -void MainWindow::setupQueue() -{ +void MainWindow::setupQueue() { m_QueueProgressBar = new TMOProgressIndicator; m_QueueProgressBar->hide(); statusBar()->addWidget(m_QueueProgressBar); - connect(this, SIGNAL(destroyed()), m_QueueProgressBar, SLOT(deleteLater())); + connect(this, &QObject::destroyed, m_QueueProgressBar, + &QObject::deleteLater); m_QueueWorker = new TMWorker; m_QueueThread = new QThread; @@ -1580,92 +1622,88 @@ m_QueueWorker->moveToThread(m_QueueThread); // Memory Management - connect(this, SIGNAL(destroyed()), m_QueueWorker, SLOT(deleteLater())); - connect(m_QueueWorker, SIGNAL(destroyed()), m_QueueThread, SLOT(deleteLater())); + connect(this, &QObject::destroyed, m_QueueWorker, &QObject::deleteLater); + connect(m_QueueWorker, &QObject::destroyed, m_QueueThread, + &QObject::deleteLater); // get back result! - //connect(m_QueueWorker, SIGNAL(tonemapSuccess(pfs::Frame*, TonemappingOptions*)), + // connect(m_QueueWorker, SIGNAL(tonemapSuccess(pfs::Frame*, + // TonemappingOptions*)), // this, SLOT(addLdrFrame(pfs::Frame*, TonemappingOptions*))); - connect(m_QueueWorker, SIGNAL(tonemapFailed(QString)), - this, SLOT(tonemapFailed(QString))); + connect(m_QueueWorker, SIGNAL(tonemapFailed(QString)), this, + SLOT(tonemapFailed(QString))); // progress bar handling - connect(m_QueueWorker, SIGNAL(tonemapBegin()), this, SLOT(exportBegin())); - connect(m_QueueWorker, SIGNAL(tonemapEnd()), this, SLOT(exportEnd())); - - connect(m_QueueWorker, SIGNAL(tonemapSetValue(int)), m_QueueProgressBar, SLOT(setValue(int))); - connect(m_QueueWorker, SIGNAL(tonemapSetMaximum(int)), m_QueueProgressBar, SLOT(setMaximum(int))); - connect(m_QueueWorker, SIGNAL(tonemapSetMinimum(int)), m_QueueProgressBar, SLOT(setMinimum(int))); - connect(m_QueueProgressBar, SIGNAL(terminate()), m_QueueWorker, SIGNAL(tonemapRequestTermination()), Qt::DirectConnection); + connect(m_QueueWorker, &TMWorker::tonemapBegin, this, + &MainWindow::exportBegin); + connect(m_QueueWorker, &TMWorker::tonemapEnd, this, &MainWindow::exportEnd); + + connect(m_QueueWorker, &TMWorker::tonemapSetValue, m_QueueProgressBar, + &TMOProgressIndicator::setValue); + connect(m_QueueWorker, &TMWorker::tonemapSetMaximum, m_QueueProgressBar, + &TMOProgressIndicator::setMaximum); + connect(m_QueueWorker, &TMWorker::tonemapSetMinimum, m_QueueProgressBar, + &TMOProgressIndicator::setMinimum); + connect(m_QueueProgressBar, &TMOProgressIndicator::terminate, m_QueueWorker, + &TMWorker::tonemapRequestTermination, Qt::DirectConnection); // start thread waiting for signals (I/O requests) m_QueueThread->start(); } -void MainWindow::tonemapBegin() -{ +void MainWindow::tonemapBegin() { // statusBar()->addWidget(m_TMProgressBar); m_TMProgressBar->setMaximum(0); m_TMProgressBar->show(); } -void MainWindow::tonemapEnd() -{ +void MainWindow::tonemapEnd() { // statusBar()->removeWidget(m_TMProgressBar); m_TMProgressBar->hide(); m_TMProgressBar->reset(); } -void MainWindow::exportBegin() -{ +void MainWindow::exportBegin() { m_QueueProgressBar->setMaximum(0); m_QueueProgressBar->show(); } -void MainWindow::exportEnd() -{ +void MainWindow::exportEnd() { m_tonemapPanel->setExportQueueSize(--m_exportQueueSize); m_QueueProgressBar->hide(); m_QueueProgressBar->reset(); } - -void MainWindow::tonemapImage(TonemappingOptions *opts) -{ +void MainWindow::tonemapImage(TonemappingOptions *opts) { #ifdef QT_DEBUG qDebug() << "Start Tone Mapping"; #endif // Warning when using size dependent TMOs with smaller sizes - if ( (opts->tmoperator == fattal) && - (opts->operator_options.fattaloptions.fftsolver == false) && - (opts->xsize != opts->origxsize) && - (luminance_options->isShowFattalWarning()) ) - { + if ((opts->tmoperator == fattal) && + (opts->operator_options.fattaloptions.fftsolver == false) && + (opts->xsize != opts->origxsize) && + (LuminanceOptions().isShowFattalWarning())) { UMessageBox warningDialog(this); - warningDialog.setText( tr("Fattal Warning") ); - warningDialog.setInformativeText( tr("This tonemapping operator depends on the size of the input "\ - " image. Applying this operator on the full size image will "\ - "most probably result in a different image. "\ - "\n\nDo you want to continue?") ); - warningDialog.setStandardButtons(QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No); + warningDialog.setText(tr("Fattal Warning")); + warningDialog.setInformativeText( + tr("This tonemapping operator depends on the size of the input " + " image. Applying this operator on the full size image will " + "most probably result in a different image. " + "\n\nDo you want to continue?")); + warningDialog.setStandardButtons( + QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No); warningDialog.setDefaultButton(QMessageBox::No); warningDialog.setIcon(QMessageBox::Warning); - - switch ( warningDialog.exec() ) - { - case QMessageBox::Yes : - {} break; - case QMessageBox::YesAll : - { - luminance_options->setShowFattalWarning(false); - } break; - case QMessageBox::No : - default: - { - return; - } + switch (warningDialog.exec()) { + case QMessageBox::Yes: { + } break; + case QMessageBox::YesAll: { + LuminanceOptions().setShowFattalWarning(false); + } break; + case QMessageBox::No: + default: { return; } } } @@ -1673,98 +1711,90 @@ tm_status.curr_tm_options = opts; - if ( tm_status.curr_tm_frame->hasSelection() ) - { + if (tm_status.curr_tm_frame->hasSelection()) { opts->tonemapSelection = true; - getCropCoords(tm_status.curr_tm_frame, - opts->selection_x_up_left, - opts->selection_y_up_left, - opts->selection_x_bottom_right, + getCropCoords(tm_status.curr_tm_frame, opts->selection_x_up_left, + opts->selection_y_up_left, opts->selection_x_bottom_right, opts->selection_y_bottom_right); - } - else + } else opts->tonemapSelection = false; - HdrViewer* hdr_viewer = dynamic_cast(tm_status.curr_tm_frame); - if ( hdr_viewer ) - { + HdrViewer *hdr_viewer = qobject_cast(tm_status.curr_tm_frame); + if (hdr_viewer) { #ifdef QT_DEBUG qDebug() << "MainWindow(): emit getTonemappedFrame()"; #endif - //CALL m_TMWorker->getTonemappedFrame(hdr_viewer->getHDRPfsFrame(), opts); - QMetaObject::invokeMethod(m_TMWorker, "computeTonemap", Qt::QueuedConnection, - Q_ARG(pfs::Frame*, hdr_viewer->getFrame()), Q_ARG(TonemappingOptions*,opts), - Q_ARG(InterpolationMethod, m_interpolationMethod)); + // CALL m_TMWorker->getTonemappedFrame(hdr_viewer->getHDRPfsFrame(), + // opts); + QMetaObject::invokeMethod( + m_TMWorker, "computeTonemap", Qt::QueuedConnection, + Q_ARG(pfs::Frame *, hdr_viewer->getFrame()), + Q_ARG(TonemappingOptions *, opts), + Q_ARG(InterpolationMethod, m_interpolationMethod)); } } -void MainWindow::exportImage(TonemappingOptions *opts) -{ - HdrViewer* hdr_viewer = dynamic_cast(tm_status.curr_tm_frame); - if ( hdr_viewer ) - { - Params params = pfsadditions::FormatHelper::getParamsFromSettings(*luminance_options, KEY_FILEFORMAT_QUEUE, false); +void MainWindow::exportImage(TonemappingOptions *opts) { + HdrViewer *hdr_viewer = qobject_cast(tm_status.curr_tm_frame); + if (hdr_viewer) { + Params params = pfsadditions::FormatHelper::getParamsFromSettings( + KEY_FILEFORMAT_QUEUE, false); QString hdrName = QFileInfo(getCurrentHDRName()).baseName(); QString inputfname; - if ( ! m_inputFilesName.isEmpty() ) - inputfname = m_inputFilesName.first(); + if (!m_inputFilesName.isEmpty()) inputfname = m_outputFileNamePrefix; - QString exportDir = luminance_options->getExportDir(); + QString exportDir = LuminanceOptions().getExportDir(); m_tonemapPanel->setExportQueueSize(++m_exportQueueSize); - QMetaObject::invokeMethod(m_QueueWorker, "computeTonemapAndExport", Qt::QueuedConnection, - Q_ARG(pfs::Frame*, hdr_viewer->getFrame()), - Q_ARG(TonemappingOptions*,opts), - Q_ARG(pfs::Params,params), - Q_ARG(QString, exportDir), - Q_ARG(QString, hdrName), - Q_ARG(QString, inputfname), - Q_ARG(QVector, m_inputExpoTimes), - Q_ARG(InterpolationMethod, m_interpolationMethod) - ); + QMetaObject::invokeMethod( + m_QueueWorker, "computeTonemapAndExport", Qt::QueuedConnection, + Q_ARG(pfs::Frame *, hdr_viewer->getFrame()), + Q_ARG(TonemappingOptions *, opts), Q_ARG(pfs::Params, params), + Q_ARG(QString, exportDir), Q_ARG(QString, hdrName), + Q_ARG(QString, inputfname), Q_ARG(QVector, m_inputExpoTimes), + Q_ARG(InterpolationMethod, m_interpolationMethod)); } } - -void MainWindow::addLdrFrame(pfs::Frame *frame, TonemappingOptions* tm_options) -{ +void MainWindow::addLdrFrame(pfs::Frame *frame, + TonemappingOptions *tm_options) { if (m_tonemapPanel->doAutoLevels()) { float threshold, minL, maxL, gammaL; threshold = m_tonemapPanel->getAutoLevelsThreshold(); - QScopedPointer temp_qimage( fromLDRPFStoQImage(frame) ); + QScopedPointer temp_qimage(fromLDRPFStoQImage(frame)); computeAutolevels(temp_qimage.data(), threshold, minL, maxL, gammaL); pfs::gammaAndLevels(frame, minL, maxL, 0.f, 1.f, gammaL); } - GenericViewer *n = static_cast(m_tabwidget->currentWidget()); - if (m_tonemapPanel->replaceLdr() && n != NULL && !n->isHDR()) - { + GenericViewer *n = + static_cast(m_tabwidget->currentWidget()); + if (m_tonemapPanel->replaceLdr() && n != nullptr && !n->isHDR()) { n->setFrame(frame, tm_options); - } - else - { + } else { curr_num_ldr_open++; num_ldr_generated++; n = new LdrViewer(frame, tm_options, this, true); - connect(n, SIGNAL(changed(GenericViewer *)), this, SLOT(syncViewers(GenericViewer *))); - connect(n, SIGNAL(changed(GenericViewer*)), this, SLOT(updateMagnificationButtons(GenericViewer*))); - connect(n, SIGNAL(reparent(GenericViewer*)), this, SLOT(reparentViewer(GenericViewer*))); - connect(n, SIGNAL(goNext(GenericViewer*)), this, SLOT(showNextViewer(GenericViewer*))); - connect(n, SIGNAL(goPrevious(GenericViewer*)), this, SLOT(showPreviousViewer(GenericViewer*))); - connect(n, SIGNAL(syncViewers(GenericViewer*)), this, SLOT(setSyncViewers(GenericViewer*))); + connect(n, &GenericViewer::changed, this, &MainWindow::syncViewers); + connect(n, &GenericViewer::changed, this, + &MainWindow::updateMagnificationButtons); + connect(n, &GenericViewer::reparent, this, &MainWindow::reparentViewer); + connect(n, &GenericViewer::goNext, this, &MainWindow::showNextViewer); + connect(n, &GenericViewer::goPrevious, this, + &MainWindow::showPreviousViewer); + connect(n, &GenericViewer::syncViewers, this, + &MainWindow::setSyncViewers); if (num_ldr_generated == 1) m_tabwidget->addTab(n, tr("Untitled")); else m_tabwidget->addTab(n, tr("Untitled %1").arg(num_ldr_generated)); - n->setViewerMode( getCurrentViewerMode( *m_tabwidget ) ); - + n->setViewerMode(getCurrentViewerMode(*m_tabwidget)); } m_tabwidget->setCurrentWidget(n); @@ -1773,20 +1803,17 @@ if (m_Ui->actionSoft_Proofing->isChecked()) { LdrViewer *viewer = static_cast(n); viewer->doSoftProofing(false); - } - else if (m_Ui->actionGamut_Check->isChecked()) { + } else if (m_Ui->actionGamut_Check->isChecked()) { LdrViewer *viewer = static_cast(n); viewer->doSoftProofing(true); } } -void MainWindow::tonemapFailed(const QString& error_msg) -{ - if (error_msg != "Canceled") - { +void MainWindow::tonemapFailed(const QString &error_msg) { + if (error_msg != QLatin1String("Canceled")) { QMessageBox::critical(this, tr("Luminance HDR"), - tr("Error: %1").arg(error_msg), - QMessageBox::Ok, QMessageBox::NoButton); + tr("Error: %1").arg(error_msg), QMessageBox::Ok, + QMessageBox::NoButton); } m_tonemapPanel->setEnabled(true); m_PreviewPanel->setEnabled(true); @@ -1796,79 +1823,70 @@ /* * Lock Handling */ -void MainWindow::on_actionLock_toggled(bool /*toggled*/) -{ - if (m_Ui->actionLock->isChecked() && m_tabwidget->count()) - { - syncViewers((GenericViewer*)m_tabwidget->currentWidget()); +void MainWindow::on_actionLock_toggled(bool /*toggled*/) { + if (m_Ui->actionLock->isChecked() && m_tabwidget->count()) { + syncViewers(qobject_cast(m_tabwidget->currentWidget())); } } -void MainWindow::syncViewers(GenericViewer *sender) -{ - if (sender == NULL) return; +void MainWindow::syncViewers(GenericViewer *sender) { + if (sender == nullptr) return; if (!m_Ui->actionLock->isChecked()) return; - for (int idx = 0; idx < m_tabwidget->count(); idx++) - { - GenericViewer *viewer = (GenericViewer*)m_tabwidget->widget(idx); - if (viewer == NULL) return; //this happens when a tab is removed and sync viewers is active, fixes a crash - if (sender != viewer) - { + for (int idx = 0; idx < m_tabwidget->count(); idx++) { + GenericViewer *viewer = qobject_cast(m_tabwidget->widget(idx)); + if (viewer == nullptr) + return; // this happens when a tab is removed and sync viewers is + // active, + // fixes a crash + if (sender != viewer) { viewer->blockSignals(true); - //disconnect(viewer,SIGNAL(changed(GenericViewer *)),this,SLOT(syncViewers(GenericViewer *))); viewer->syncViewer(sender); - //connect(viewer,SIGNAL(changed(GenericViewer *)),this,SLOT(syncViewers(GenericViewer *))); viewer->blockSignals(false); } } } -void MainWindow::showPreviewPanel(bool b) -{ +void MainWindow::showPreviewPanel(bool b) { m_Ui->actionRealtimePreviews->setEnabled(b); - if (b) - { - if (tm_status.is_hdr_ready) - { + m_tonemapPanel->setRealtimePreviews(b && LuminanceOptions().isRealtimePreviewsActive()); + if (b) { + if (tm_status.is_hdr_ready) { m_PreviewscrollArea->show(); - if (m_Ui->actionRealtimePreviews->isChecked()) - { - connect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), m_tonemapPanel, SLOT(setRealtimePreviews(bool))); - m_tonemapPanel->setRealtimePreviews(true); - } - // ask panel to refresh itself - m_PreviewPanel->setAutolevels(m_tonemapPanel->doAutoLevels(), m_tonemapPanel->getAutoLevelsThreshold()); + m_PreviewPanel->setAutolevels( + m_tonemapPanel->doAutoLevels(), + m_tonemapPanel->getAutoLevelsThreshold()); m_PreviewPanel->updatePreviews(tm_status.curr_tm_frame->getFrame()); // connect signals - connect(this, SIGNAL(updatedHDR(pfs::Frame*)), m_PreviewPanel, SLOT(updatePreviews(pfs::Frame*))); - connect(m_PreviewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); - connect(m_PreviewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), m_tonemapPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); - connect(m_tonemapPanel, SIGNAL(autoLevels(bool, float)), this, SLOT(updatePreviews(bool, float))); + connect(this, SIGNAL(updatedHDR(pfs::Frame *)), m_PreviewPanel, + SLOT(updatePreviews(pfs::Frame *))); + connect(m_PreviewPanel, &PreviewPanel::startTonemapping, this, + &MainWindow::tonemapImage); + connect(m_PreviewPanel, &PreviewPanel::startTonemapping, + m_tonemapPanel, &TonemappingPanel::updateTonemappingParams); + connect(m_tonemapPanel, SIGNAL(autoLevels(bool, float)), this, + SLOT(updatePreviews(bool, float))); } - } - else - { + } else { m_PreviewscrollArea->hide(); - m_tonemapPanel->setRealtimePreviews(false); // disconnect signals - disconnect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), m_tonemapPanel, SLOT(setRealtimePreviews(bool))); - disconnect(this, SIGNAL(updatedHDR(pfs::Frame*)), m_PreviewPanel, SLOT(updatePreviews(pfs::Frame*))); - disconnect(m_PreviewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); - disconnect(m_PreviewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), m_tonemapPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); - disconnect(m_tonemapPanel, SIGNAL(autoLevels(bool, float)), this, SLOT(updatePreviews(bool, float))); + disconnect(this, SIGNAL(updatedHDR(pfs::Frame *)), m_PreviewPanel, + SLOT(updatePreviews(pfs::Frame *))); + disconnect(m_PreviewPanel, &PreviewPanel::startTonemapping, this, + &MainWindow::tonemapImage); + disconnect(m_PreviewPanel, &PreviewPanel::startTonemapping, + m_tonemapPanel, &TonemappingPanel::updateTonemappingParams); + disconnect(m_tonemapPanel, SIGNAL(autoLevels(bool, float)), this, + SLOT(updatePreviews(bool, float))); } } -void MainWindow::updatePreviews(bool b, float th) -{ - if (m_Ui->actionShowPreviewPanel->isChecked()) - { - if (tm_status.is_hdr_ready) - { +void MainWindow::updatePreviews(bool b, float th) { + if (m_Ui->actionShowPreviewPanel->isChecked()) { + if (tm_status.is_hdr_ready) { m_PreviewPanel->setAutolevels(b, th); // ask panel to refresh itself m_PreviewPanel->updatePreviews(tm_status.curr_tm_frame->getFrame()); @@ -1876,49 +1894,45 @@ } } -void MainWindow::updateMagnificationButtons(GenericViewer* c_v) -{ - bool hasImage = c_v != NULL; - bool isNormalSize = c_v && c_v->isNormalSize(); - bool isFilledToWindow = c_v && c_v->isFilledToWindow(); - bool isFittedToWindow = c_v && c_v->isFittedToWindow(); - - m_Ui->zoomInAct->setEnabled(hasImage && (isFilledToWindow || isFittedToWindow)); - m_Ui->zoomOutAct->setEnabled(hasImage && !isFittedToWindow); - - m_Ui->normalSizeAct->setChecked(hasImage && isNormalSize); - m_Ui->normalSizeAct->setEnabled(hasImage && !isNormalSize); - m_Ui->fitToWindowAct->setChecked(hasImage && isFittedToWindow); - m_Ui->fitToWindowAct->setEnabled(hasImage && !isFittedToWindow); - m_Ui->actionFill_to_Window->setChecked(hasImage && isFilledToWindow); - m_Ui->actionFill_to_Window->setEnabled(hasImage && !isFilledToWindow); +void MainWindow::updateMagnificationButtons(GenericViewer *c_v) { + if (c_v == nullptr) return; + bool isNormalSize = c_v->isNormalSize(); + bool isFilledToWindow = c_v->isFilledToWindow(); + bool isFittedToWindow = c_v->isFittedToWindow(); + + m_Ui->zoomInAct->setChecked(isFilledToWindow || isFittedToWindow); + m_Ui->zoomInAct->setEnabled(isFilledToWindow || isFittedToWindow); + m_Ui->zoomOutAct->setChecked(isFittedToWindow); + m_Ui->zoomOutAct->setEnabled(!isFittedToWindow); + + m_Ui->normalSizeAct->setChecked(isNormalSize); + m_Ui->normalSizeAct->setEnabled(!isNormalSize); + m_Ui->fitToWindowAct->setChecked(isFittedToWindow); + m_Ui->fitToWindowAct->setEnabled(!isFittedToWindow); + m_Ui->actionFill_to_Window->setChecked(isFilledToWindow); + m_Ui->actionFill_to_Window->setEnabled(!isFilledToWindow); } -void MainWindow::on_actionRemove_Tab_triggered() -{ +void MainWindow::on_actionRemove_Tab_triggered() { removeTab(m_tabwidget->currentIndex()); } -void MainWindow::removeTab(int t) -{ +void MainWindow::removeTab(int t) { #ifdef QT_DEBUG - qDebug() << "MainWindow::remove_image("<< t <<")"; + qDebug() << "MainWindow::remove_image(" << t << ")"; #endif if (t < 0) return; - GenericViewer* w = (GenericViewer*)m_tabwidget->widget(t); + GenericViewer *w = qobject_cast(m_tabwidget->widget(t)); w->blockSignals(true); - if (w->isHDR()) - { + if (w->isHDR()) { bool doClose = false; #ifdef QT_DEBUG - qDebug() << "Remove HDR from MainWindow"; + qDebug() << "Remove HDR from MainWindow"; #endif - if ( w->needsSaving() ) - { - if ( maybeSave() ) - { + if (w->needsSaving()) { + if (maybeSave()) { // if discard OR saved doClose = true; } @@ -1928,20 +1942,19 @@ else { w->blockSignals(false); } - } - else + } else doClose = true; if (doClose) { m_tabwidget->removeTab(t); - w->deleteLater(); // delete yourself whenever you want + w->deleteLater(); // delete yourself whenever you want showPreviewPanel(false); setWindowModified(false); tm_status.is_hdr_ready = false; - tm_status.curr_tm_frame = NULL; - tm_status.curr_tm_options = NULL; + tm_status.curr_tm_frame = nullptr; + tm_status.curr_tm_options = nullptr; m_tonemapPanel->setEnabled(false); @@ -1950,44 +1963,31 @@ m_PreviewscrollArea->hide(); } - } - else - { + } else { curr_num_ldr_open--; m_tabwidget->removeTab(t); - w->deleteLater(); // delete yourself whenever you want + w->deleteLater(); // delete yourself whenever you want - if (curr_num_ldr_open == 1) - m_Ui->fileSaveAllAction->setEnabled(false); + if (curr_num_ldr_open == 1) m_Ui->fileSaveAllAction->setEnabled(false); } } -QString MainWindow::getCurrentHDRName() -{ - if (tm_status.is_hdr_ready) - { +QString MainWindow::getCurrentHDRName() { + if (tm_status.is_hdr_ready) { return tm_status.curr_tm_frame->getFileName(); - } - else - { + } else { return QString(tr("Untitled HDR")); } } -void MainWindow::setMainWindowModified(bool b) -{ - if (b) - { - if ( tm_status.is_hdr_ready ) - { +void MainWindow::setMainWindowModified(bool b) { + if (b) { + if (tm_status.is_hdr_ready) { tm_status.curr_tm_frame->setNeedsSaving(true); setWindowModified(true); } - } - else - { - if ( tm_status.is_hdr_ready ) - { + } else { + if (tm_status.is_hdr_ready) { tm_status.curr_tm_frame->setNeedsSaving(false); } setWindowModified(false); @@ -1997,98 +1997,87 @@ /* * Recent File Handling */ -void MainWindow::setCurrentFile(const QString &fileName) -{ - QStringList files = luminance_options->value(KEY_RECENT_FILES).toStringList(); +void MainWindow::setCurrentFile(const QString &fileName) { + QStringList files = + LuminanceOptions().value(KEY_RECENT_FILES).toStringList(); files.removeAll(fileName); files.prepend(fileName); - while (files.size() > MAX_RECENT_FILES) - { + while (files.size() > MAX_RECENT_FILES) { files.removeLast(); } - luminance_options->setValue(KEY_RECENT_FILES, files); + LuminanceOptions().setValue(KEY_RECENT_FILES, files); // Update ALL MainWindow - foreach (QWidget *widget, QApplication::topLevelWidgets()) - { + foreach (QWidget *widget, QApplication::topLevelWidgets()) { MainWindow *mainWin = qobject_cast(widget); - if (mainWin) - mainWin->updateRecentFileActions(); + if (mainWin) mainWin->updateRecentFileActions(); } OsIntegration::getInstance().addRecentFile(fileName); - } -void MainWindow::updateRecentFileActions() -{ - QStringList files = luminance_options->value(KEY_RECENT_FILES).toStringList(); +void MainWindow::updateRecentFileActions() { + QStringList files = + LuminanceOptions().value(KEY_RECENT_FILES).toStringList(); int numRecentFiles = qMin(files.size(), (int)MAX_RECENT_FILES); separatorRecentFiles->setVisible(numRecentFiles > 0); - for (int i = 0; i < numRecentFiles; ++i) - { - QString text = QString("&%1 %2").arg(i + 1).arg(QFileInfo(files[i]).fileName()); + for (int i = 0; i < numRecentFiles; ++i) { + QString text = QStringLiteral("&%1 %2").arg(i + 1).arg( + QFileInfo(files[i]).fileName()); recentFileActs[i]->setText(text); recentFileActs[i]->setData(files[i]); recentFileActs[i]->setVisible(true); } - for (int j = numRecentFiles; j < MAX_RECENT_FILES; ++j) - { + for (int j = numRecentFiles; j < MAX_RECENT_FILES; ++j) { recentFileActs[j]->setVisible(false); } } -void MainWindow::initRecentFileActions() -{ +void MainWindow::initRecentFileActions() { separatorRecentFiles = m_Ui->menuFile->addSeparator(); - for (int i = 0; i < MAX_RECENT_FILES; ++i) - { + for (int i = 0; i < MAX_RECENT_FILES; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); m_Ui->menuFile->addAction(recentFileActs[i]); - connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); + connect(recentFileActs[i], &QAction::triggered, this, + &MainWindow::openRecentFile); } } -void MainWindow::clearRecentFileActions() -{ - for (int i = 0; i < MAX_RECENT_FILES; ++i) - { +void MainWindow::clearRecentFileActions() { + for (int i = 0; i < MAX_RECENT_FILES; ++i) { delete recentFileActs[i]; } } -void MainWindow::on_actionFix_Histogram_toggled(bool checked) -{ - if (checked) - { - GenericViewer* current = (GenericViewer*) m_tabwidget->currentWidget(); - if ( current==NULL ) return; - if ( current->isHDR() ) return; +void MainWindow::on_actionFix_Histogram_toggled(bool checked) { + if (checked) { + GenericViewer *current = qobject_cast(m_tabwidget->currentWidget()); + if (current == nullptr) return; + if (current->isHDR()) return; - QScopedPointer g_n_l( new GammaAndLevels(this, current->getQImage()) ); + QScopedPointer g_n_l( + new GammaAndLevels(this, current->getQImage())); m_Ui->actionFix_Histogram->setDisabled(true); - connect(g_n_l.data(), SIGNAL(updateQImage(QImage)), current, SLOT(setQImage(QImage))); + connect(g_n_l.data(), SIGNAL(updateQImage(QImage)), current, + SLOT(setQImage(QImage))); int exit_status = g_n_l->exec(); - if ( exit_status == 1 ) - { + if (exit_status == 1) { #ifdef QT_DEBUG qDebug() << "GammaAndLevels accepted!"; #endif // pfs::Frame * frame = current->getFrame(); - pfs::gammaAndLevels(current->getFrame(), - g_n_l->getBlackPointInput(), - g_n_l->getWhitePointInput(), - g_n_l->getBlackPointOutput(), - g_n_l->getWhitePointOutput(), - g_n_l->getGamma()); + pfs::gammaAndLevels( + current->getFrame(), g_n_l->getBlackPointInput(), + g_n_l->getWhitePointInput(), g_n_l->getBlackPointOutput(), + g_n_l->getWhitePointOutput(), g_n_l->getGamma()); // current->setFrame(frame); } else { @@ -2103,25 +2092,20 @@ } } -void MainWindow::on_actionWhite_Balance_triggered() -{ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); +void MainWindow::on_actionWhite_Balance_triggered() { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_Ui->actionWhite_Balance->setEnabled(false); m_processingAWB = true; - m_viewerToProcess = (GenericViewer*) m_tabwidget->currentWidget(); + m_viewerToProcess = qobject_cast(m_tabwidget->currentWidget()); m_tabwidget->setTabEnabled(m_tabwidget->currentIndex(), false); Frame *frame = m_viewerToProcess->getFrame(); - m_futureWatcher.setFuture( - QtConcurrent::run( - boost::bind(whiteBalance, boost::ref(*frame), WB_COLORBALANCE) - ) - ); + m_futureWatcher.setFuture(QtConcurrent::run( + boost::bind(whiteBalance, boost::ref(*frame), WB_COLORBALANCE))); } -void MainWindow::whiteBalanceDone() -{ +void MainWindow::whiteBalanceDone() { QApplication::restoreOverrideCursor(); m_processingAWB = false; m_Ui->actionWhite_Balance->setEnabled(true); @@ -2135,12 +2119,11 @@ } } -void MainWindow::on_actionSoft_Proofing_toggled(bool doProof) -{ - GenericViewer* current = (GenericViewer*) m_tabwidget->currentWidget(); - if ( current == NULL ) return; - if ( current->isHDR() ) return; - LdrViewer *viewer = (LdrViewer *) current; +void MainWindow::on_actionSoft_Proofing_toggled(bool doProof) { + GenericViewer *current = qobject_cast(m_tabwidget->currentWidget()); + if (current == nullptr) return; + if (current->isHDR()) return; + LdrViewer *viewer = static_cast(current); if (doProof) { #ifdef QT_DEBUG qDebug() << "MainWindow:: do soft proofing"; @@ -2148,8 +2131,7 @@ if (m_Ui->actionGamut_Check->isChecked()) m_Ui->actionGamut_Check->setChecked(false); viewer->doSoftProofing(false); - } - else { + } else { #ifdef QT_DEBUG qDebug() << "MainWindow:: undo soft proofing"; #endif @@ -2157,12 +2139,11 @@ } } -void MainWindow::on_actionGamut_Check_toggled(bool doGamut) -{ - GenericViewer* current = (GenericViewer*) m_tabwidget->currentWidget(); - if ( current == NULL ) return; - if ( current->isHDR() ) return; - LdrViewer *viewer = (LdrViewer *) current; +void MainWindow::on_actionGamut_Check_toggled(bool doGamut) { + GenericViewer *current = qobject_cast(m_tabwidget->currentWidget()); + if (current == nullptr) return; + if (current->isHDR()) return; + LdrViewer *viewer = static_cast(current); if (doGamut) { #ifdef QT_DEBUG qDebug() << "MainWindow:: do gamut check"; @@ -2170,8 +2151,7 @@ if (m_Ui->actionSoft_Proofing->isChecked()) m_Ui->actionSoft_Proofing->setChecked(false); viewer->doSoftProofing(true); - } - else { + } else { #ifdef QT_DEBUG qDebug() << "MainWindow:: undo gamut check"; #endif @@ -2179,85 +2159,74 @@ } } -void MainWindow::updateSoftProofing(int i) -{ +void MainWindow::updateSoftProofing(int i) { QWidget *wgt = m_tabwidget->widget(i); - GenericViewer *g_v = (GenericViewer *)wgt; + GenericViewer *g_v = qobject_cast(wgt); - if (g_v == NULL) return; - if ( !g_v->isHDR() ) - { - LdrViewer *l_v = static_cast(g_v); - if ( !m_Ui->actionSoft_Proofing->isChecked() && - !m_Ui->actionGamut_Check->isChecked()) - { + if (g_v == nullptr) return; + if (!g_v->isHDR()) { + LdrViewer *l_v = static_cast(g_v); + if (!m_Ui->actionSoft_Proofing->isChecked() && + !m_Ui->actionGamut_Check->isChecked()) { l_v->undoSoftProofing(); - } - else if (m_Ui->actionSoft_Proofing->isChecked()) - { + } else if (m_Ui->actionSoft_Proofing->isChecked()) { l_v->doSoftProofing(false); - } - else if (m_Ui->actionGamut_Check->isChecked()) - { + } else if (m_Ui->actionGamut_Check->isChecked()) { l_v->doSoftProofing(true); } } } -void MainWindow::showPreviewsOnTheRight() -{ +void MainWindow::showPreviewsOnTheRight() { m_PreviewscrollArea->setParent(m_centralwidget_splitter); - luminance_options->setPreviewPanelMode(0); + LuminanceOptions().setPreviewPanelMode(0); } -void MainWindow::showPreviewsOnTheBottom() -{ +void MainWindow::showPreviewsOnTheBottom() { m_PreviewscrollArea->setParent(m_bottom_splitter); - luminance_options->setPreviewPanelMode(1); + LuminanceOptions().setPreviewPanelMode(1); } -void MainWindow::on_actionFits_Importer_triggered() -{ +void MainWindow::on_actionFits_Importer_triggered() { #ifdef HAVE_CFITSIO FitsImporter importer; - if (importer.exec() == QDialog::Accepted) - { - pfs::Frame *frame = importer.getFrame(); - emit load_success(frame, tr("FITS Image"), QStringList(), true); + if (importer.exec() == QDialog::Accepted) { + emit load_success(importer.getFrame(), tr("FITS Image"), importer.getFilenames(), true); } #endif } -void MainWindow::on_actionShow_Full_Screen_toggled(bool b) -{ +void MainWindow::on_actionShow_Full_Screen_toggled(bool b) { b ? this->showFullScreen() : this->showMaximized(); } -void MainWindow::on_actionShow_Image_Full_Screen_triggered() -{ - m_viewerIndex = m_tabwidget->currentIndex(); - m_tabText = m_tabwidget->tabText(m_viewerIndex); - GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - g_v->setParent(0); - g_v->showFullScreen(); +void MainWindow::on_actionShow_Image_Full_Screen_triggered() { + if (m_isFullscreenViewer) { + return; + } + m_isFullscreenViewer = true; + m_fullscreenViewerIndex = m_tabwidget->currentIndex(); + m_tabText = m_tabwidget->tabText(m_fullscreenViewerIndex); + m_g_v_fullscreen = qobject_cast(m_tabwidget->currentWidget()); + m_g_v_fullscreen->setParent(0); + m_g_v_fullscreen->showFullScreen(); } -void MainWindow::reparentViewer(GenericViewer *g_v) -{ - m_tabwidget->insertTab(m_viewerIndex, g_v, m_tabText); - m_tabwidget->setCurrentIndex(m_viewerIndex); +void MainWindow::reparentViewer(GenericViewer *g_v, bool close) { + m_tabwidget->insertTab(m_fullscreenViewerIndex, g_v, m_tabText); + m_tabwidget->setCurrentIndex(m_fullscreenViewerIndex); g_v->showNormal(); + m_isFullscreenViewer = false; + if (close) { + on_actionRemove_Tab_triggered(); + } } -void MainWindow::showNextViewer(GenericViewer *g_v) -{ +void MainWindow::showNextViewer(GenericViewer *g_v) { int count = m_tabwidget->count(); - if (count >= 1) - { - m_tabwidget->insertTab(m_viewerIndex, g_v, m_tabText); - m_tabwidget->setCurrentIndex(m_viewerIndex); - //g_v->showNormal(); + if (count >= 1) { + reparentViewer(g_v); int idx = m_tabwidget->currentIndex(); int next = (idx + 1) % (count + 1); m_tabwidget->setCurrentIndex(next); @@ -2265,22 +2234,15 @@ } } -void MainWindow::showPreviousViewer(GenericViewer *g_v) -{ +void MainWindow::showPreviousViewer(GenericViewer *g_v) { int count = m_tabwidget->count(); - if (count >= 1) - { - m_tabwidget->insertTab(m_viewerIndex, g_v, m_tabText); - m_tabwidget->setCurrentIndex(m_viewerIndex); - //g_v->showNormal(); + if (count >= 1) { + reparentViewer(g_v); int idx = m_tabwidget->currentIndex(); int previous; - if (idx == 0) - { + if (idx == 0) { previous = count; - } - else - { + } else { previous = (idx - 1) % (count + 1); } m_tabwidget->setCurrentIndex(previous); @@ -2288,31 +2250,37 @@ } } -void MainWindow::setSyncViewers(GenericViewer *g_v) -{ +void MainWindow::setSyncViewers(GenericViewer *g_v) { + if (g_v == nullptr) return; m_Ui->actionLock->setChecked(!m_Ui->actionLock->isChecked()); - if (m_Ui->actionLock->isChecked() && (m_tabwidget->count() - 1)) - { + if (m_Ui->actionLock->isChecked() && (m_tabwidget->count() - 1)) { syncViewers(g_v); } } -void MainWindow::on_actionSelect_Interpolation_Method_toggled(bool b) -{ - m_interpolationMethod = b ? LanczosInterp: BilinearInterp; +void MainWindow::on_actionSelect_Interpolation_Method_toggled(bool b) { + m_interpolationMethod = b ? LanczosInterp : BilinearInterp; +} + +void MainWindow::on_actionOnline_Documentation_triggered() { + QDesktopServices::openUrl( + QUrl(QStringLiteral("http://luminancehdr.readthedocs.io/en/latest/"))); +} + +void MainWindow::on_actionDevelopers_Website_triggered() { + QDesktopServices::openUrl( + QUrl(QStringLiteral("https://github.com/LuminanceHDR/"))); } -void MainWindow::on_actionOnline_Documentation_triggered() -{ - QDesktopServices::openUrl(QUrl("http://luminancehdr.readthedocs.io/en/latest/")); +void MainWindow::on_actionLuminance_HDR_Website_triggered() { + QDesktopServices::openUrl( + QUrl(QStringLiteral("http://qtpfsgui.sourceforge.net/"))); } -void MainWindow::on_actionDevelopers_Website_triggered() -{ - QDesktopServices::openUrl(QUrl("https://github.com/LuminanceHDR/")); +void MainWindow::setRealtimePreviewsActive(bool b) { + LuminanceOptions().setRealtimePreviewsActive(b); } -void MainWindow::on_actionLuminance_HDR_Website_triggered() -{ - QDesktopServices::openUrl(QUrl("http://qtpfsgui.sourceforge.net/")); +void MainWindow::setPreviewPanelActive(bool b) { + LuminanceOptions().setPreviewPanelActive(b); } diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/MainWindow.h luminance-hdr-2.6.0/src/MainWindow/MainWindow.h --- luminance-hdr-2.5.1+dfsg/src/MainWindow/MainWindow.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/MainWindow.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,85 +34,86 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#include +#include #include #include -#include -#include +#include +#include +#include #include #include +#include +#include #include -#include #include -#include -#include -#include -#include -#include "Common/global.h" #include "Common/LuminanceOptions.h" +#include "Common/global.h" #define MAX_RECENT_FILES (5) // Forward declaration namespace Ui { - class MainWindow; +class MainWindow; } namespace pfs { - class Frame; // #include "Libpfs/frame.h" +class Frame; // #include "Libpfs/frame.h" } -class IOWorker; // #include "Core/IOWorker.h" +class IOWorker; // #include "Core/IOWorker.h" class GenericViewer; class LdrViewer; class HdrViewer; -class PreviewPanel; // #include "PreviewPanel/PreviewPanel.h" -class HelpBrowser; // #include "HelpBrowser/helpbrowser.h" -class TMOProgressIndicator; // #include "TonemappingPanel/TMOProgressIndicator.h" -class TonemappingPanel; // #include "TonemappingPanel/TonemappingPanel.h" -class TonemappingOptions; // #include "Core/TonemappingOptions.h" +class PreviewPanel; // #include "PreviewPanel/PreviewPanel.h" +class HelpBrowser; // #include "HelpBrowser/helpbrowser.h" +class TMOProgressIndicator; // #include + // "TonemappingPanel/TMOProgressIndicator.h" +class TonemappingPanel; // #include "TonemappingPanel/TonemappingPanel.h" +class TonemappingOptions; // #include "Core/TonemappingOptions.h" class TMWorker; +class UpdateChecker; // #include "MainWindow/UpdateChecker.h" -class UpdateChecker; // #include "MainWindow/UpdateChecker.h" - -class MainWindow: public QMainWindow -{ +class MainWindow : public QMainWindow { Q_OBJECT -public: + public: MainWindow(QWidget *parent = 0); // Constructor loading file inside - MainWindow(pfs::Frame* curr_frame, const QString& new_fname, - const QStringList& inputFileNames, bool needSaving = false, QWidget *parent = 0); + MainWindow(pfs::Frame *curr_frame, const QString &new_fname, + const QStringList &inputFileNames, bool needSaving = false, + QWidget *parent = 0); ~MainWindow(); -public Q_SLOTS: + public Q_SLOTS: // I/O - void save_hdr_success(GenericViewer* saved_hdr, const QString& fname); - void save_hdr_failed(const QString& fname); - void save_ldr_success(GenericViewer* saved_ldr, const QString& fname); - void save_ldr_failed(const QString& fname); - - void load_failed(const QString&); - void load_success(pfs::Frame* new_hdr_frame, const QString& new_fname, - const QStringList& inputFileNames = QStringList(), bool needSaving = false); + void save_hdr_success(GenericViewer *saved_hdr, const QString &fname); + void save_hdr_failed(const QString &fname); + void save_ldr_success(GenericViewer *saved_ldr, const QString &fname); + void save_ldr_failed(const QString &fname); + + void load_failed(const QString &); + void load_success(pfs::Frame *new_hdr_frame, const QString &new_fname, + const QStringList &inputFileNames = QStringList(), + bool needSaving = false); void ioBegin(); void ioEnd(); void setMainWindowModified(bool b); - void openFile(const QString& file); - void openFiles(const QStringList& files); + void openFile(const QString &file); + void openFiles(const QStringList &files); -protected Q_SLOTS: + protected Q_SLOTS: void on_fileNewAction_triggered(); - void createNewHdr(const QStringList& files); + void createNewHdr(const QStringList &files); - //for File->Open, it then calls loadFile() + // for File->Open, it then calls loadFile() void on_fileOpenAction_triggered(); void on_fileSaveAsAction_triggered(); void on_fileSaveAllAction_triggered(); @@ -143,7 +144,7 @@ void on_fitToWindowAct_triggered(); void on_actionFill_to_Window_triggered(); void on_normalSizeAct_triggered(); - void updateMagnificationButtons(GenericViewer*); + void updateMagnificationButtons(GenericViewer *); void on_documentationAction_triggered(); void enterWhatsThis(); @@ -173,7 +174,7 @@ void on_actionAbout_Luminance_triggered(); void updateActions(int w); - void setActiveMainWindow(QWidget* w); + void setActiveMainWindow(QWidget *w); void cropToSelection(); void enableCrop(bool); @@ -190,9 +191,9 @@ void tonemapEnd(); void tonemapImage(TonemappingOptions *opts); void exportImage(TonemappingOptions *opts); - void addLdrFrame(pfs::Frame*, TonemappingOptions*); - //void addLDRResult(QImage*, quint16*); - void tonemapFailed(const QString&); + void addLdrFrame(pfs::Frame *, TonemappingOptions *); + // void addLDRResult(QImage*, quint16*); + void tonemapFailed(const QString &); // Export queue void exportBegin(); @@ -200,7 +201,7 @@ // lock functionalities void on_actionLock_toggled(bool); - void syncViewers(GenericViewer*); + void syncViewers(GenericViewer *); void showPreviewPanel(bool b); @@ -220,44 +221,49 @@ void updatePreviews(bool, float); - void reparentViewer(GenericViewer *g_v); + void reparentViewer(GenericViewer *g_vi, bool = false); void showNextViewer(GenericViewer *g_v); void showPreviousViewer(GenericViewer *g_v); - void setSyncViewers(GenericViewer*); + void setSyncViewers(GenericViewer *); // Online Docs, Website, GitHub void on_actionOnline_Documentation_triggered(); void on_actionDevelopers_Website_triggered(); void on_actionLuminance_HDR_Website_triggered(); -Q_SIGNALS: + Q_SIGNALS: // update HDR - void updatedHDR(pfs::Frame*); + void updatedHDR(pfs::Frame *); -protected: + protected: QSplitter *m_centralwidget_splitter; QSplitter *m_bottom_splitter; QTabWidget *m_tabwidget; - QString m_tabText; - int m_viewerIndex; QSignalMapper *windowMapper; - LuminanceOptions *luminance_options; QDialog *splash; // Recent Files Management - QAction* recentFileActs[MAX_RECENT_FILES]; + QAction *recentFileActs[MAX_RECENT_FILES]; QAction *separatorRecentFiles; // Open MainWindows Handling - QList openMainWindows; - - HelpBrowser* helpBrowser; + QList openMainWindows; //! \brief contains the file names of the images loaded by the wizard, //! they are used to copy EXIF tags to saved LDR images QStringList m_inputFilesName; + + //! \brief contain output file name prefix in the form 1st bracketed file + //! name + //! "-" last bracketed file name + QString m_outputFileNamePrefix; + + //! \brief contain Hdr creation model to use as suffix in HDR output file + //! name + QString m_HdrCaption; + //! \brief this contains the exposure times of the images to write to LDR //! as EXIF comment QVector m_inputExpoTimes; @@ -265,9 +271,9 @@ //! \group Event handler virtual void dragEnterEvent(QDragEnterEvent *); virtual void dropEvent(QDropEvent *); - virtual void changeEvent(QEvent* event); + virtual void changeEvent(QEvent *event); virtual void closeEvent(QCloseEvent *); - virtual bool event(QEvent * event); + virtual bool event(QEvent *event); //! void dispatchrotate(bool clockwise); @@ -278,8 +284,8 @@ struct { bool is_hdr_ready; - GenericViewer* curr_tm_frame; - TonemappingOptions* curr_tm_options; + GenericViewer *curr_tm_frame; + TonemappingOptions *curr_tm_options; } tm_status; int num_ldr_generated; int curr_num_ldr_open; @@ -302,32 +308,40 @@ bool maybeSave(); + void setRealtimePreviewsActive(bool); + void setPreviewPanelActive(bool b); + // Preview Panel QScrollArea *m_PreviewscrollArea; PreviewPanel *m_PreviewPanel; - -private: + private: // UI declaration QScopedPointer m_Ui; + // keep track of fullscreen image viewer + QString m_tabText; + int m_fullscreenViewerIndex; + bool m_isFullscreenViewer; + GenericViewer *m_g_v_fullscreen; + // Tone Mapping Panel TonemappingPanel *m_tonemapPanel; // I/O QThread *m_IOThread; IOWorker *m_IOWorker; - QProgressBar* m_ProgressBar; + QProgressBar *m_ProgressBar; // TM thread - QThread* m_TMThread; - TMWorker* m_TMWorker; - TMOProgressIndicator* m_TMProgressBar; + QThread *m_TMThread; + TMWorker *m_TMWorker; + TMOProgressIndicator *m_TMProgressBar; // Export queue - QThread* m_QueueThread; - TMWorker* m_QueueWorker; - TMOProgressIndicator* m_QueueProgressBar; + QThread *m_QueueThread; + TMWorker *m_QueueWorker; + TMOProgressIndicator *m_QueueProgressBar; int m_exportQueueSize; @@ -338,12 +352,14 @@ GenericViewer *m_viewerToProcess; bool m_processingAWB; int m_firstWindow; - int m_winId; // unique MainWindow identifier + int m_winId; // unique MainWindow identifier - static int sm_NumMainWindows; //number of active MainWindows - static int sm_counter; // Always increases + static int sm_NumMainWindows; // number of active MainWindows + static int sm_counter; // Always increases static QScopedPointer sm_updateChecker; - static QMap sm_mainWindowMap; //maps m_winId with MainWindow "this" ponter + static QMap + sm_mainWindowMap; // maps m_winId with MainWindow "this" ponter + static HelpBrowser *sm_helpBrowser; }; -#endif // MAINWINDOW_H +#endif // MAINWINDOW_H diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/UpdateChecker.cpp luminance-hdr-2.6.0/src/MainWindow/UpdateChecker.cpp --- luminance-hdr-2.5.1+dfsg/src/MainWindow/UpdateChecker.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/UpdateChecker.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -20,32 +20,42 @@ * @author Daniel Kaneider */ +#include #include -#include #include +#include #include -#include "Common/global.h" -#include "Common/config.h" #include "Common/LuminanceOptions.h" +#include "Common/config.h" +#include "Common/global.h" #include "UI/UMessageBox.h" #include "UpdateChecker.h" -UpdateChecker::UpdateChecker(QWidget *parent) //, QNetworkAccessManager* networkManager) - : QObject(parent) - , m_tray(new QSystemTrayIcon(parent->windowIcon())) - , m_networkManager(new QNetworkAccessManager()) -{ +UpdateChecker::UpdateChecker( + QWidget *parent) //, QNetworkAccessManager* networkManager) + : QObject(parent), + m_tray(new QSystemTrayIcon(parent->windowIcon())), + m_networkManager(new QNetworkAccessManager()) { LuminanceOptions options; - if (options.checkForUpdate()) - { - connect(this, SIGNAL(updateAvailable()), parent, SLOT(onUpdateAvailable())); - connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); - connect(m_tray, SIGNAL(messageClicked()), this, SLOT(trayMessageClicked())); - connect(m_tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayMessageClicked())); - - QNetworkRequest request = QNetworkRequest(QUrl(QString("http://qtpfsgui.sourceforge.net/updater/get.php?c=%1").arg(LUMINANCEVERSION_NUM))); - request.setRawHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36"); + if (options.checkForUpdate()) { + connect(this, SIGNAL(updateAvailable()), parent, + SLOT(onUpdateAvailable())); + connect(m_networkManager, &QNetworkAccessManager::finished, this, + &UpdateChecker::requestFinished); + connect(m_tray, &QSystemTrayIcon::messageClicked, this, + &UpdateChecker::trayMessageClicked); + connect(m_tray, &QSystemTrayIcon::activated, this, + &UpdateChecker::trayMessageClicked); + + QNetworkRequest request = QNetworkRequest( + QUrl(QStringLiteral( + "http://qtpfsgui.sourceforge.net/updater/get.php?c=%1") + .arg(LUMINANCEVERSION_NUM))); + request.setRawHeader("User-Agent", + "Mozilla/5.0 (Windows NT 6.2; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/32.0.1667.0 Safari/537.36"); m_networkManager->get(request); } } @@ -56,16 +66,13 @@ delete m_networkManager; } -void UpdateChecker::trayMessageClicked() const -{ +void UpdateChecker::trayMessageClicked() const { QDesktopServices::openUrl(QUrl(m_latestUrl)); m_tray->hide(); } -void UpdateChecker::requestFinished(QNetworkReply* reply) -{ - if (reply->error() == QNetworkReply::NoError) - { +void UpdateChecker::requestFinished(QNetworkReply *reply) { + if (reply->error() == QNetworkReply::NoError) { LuminanceOptions options; options.setUpdateChecked(); @@ -79,12 +86,12 @@ // QDomNode nodeRoot = document.documentElement(); - if (!nodeRoot.isNull()) - { - QDomNode nodeVersion = nodeRoot.firstChildElement("version"); - QDomNode nodeUrl = nodeRoot.firstChildElement("url"); - if (!nodeVersion.isNull() && !nodeUrl.isNull()) - { + if (!nodeRoot.isNull()) { + QDomNode nodeVersion = + nodeRoot.firstChildElement(QStringLiteral("version")); + QDomNode nodeUrl = + nodeRoot.firstChildElement(QStringLiteral("url")); + if (!nodeVersion.isNull() && !nodeUrl.isNull()) { m_version = nodeVersion.toElement().text(); m_latestUrl = nodeUrl.toElement().text(); @@ -92,35 +99,36 @@ qDebug() << m_version; - QString msgTitle = QString("Luminance HDR %1").arg(m_version); + QString msgTitle = + QStringLiteral("Luminance HDR %1").arg(m_version); QString msgContent = tr("A new release is ready for download!"); - QWidget* widgetP = (QWidget*)parent(); + QWidget *widgetP = (QWidget *)parent(); emit updateAvailable(); -#if defined(Q_OS_MAC) || defined(Q_OS_X11) - if ( UMessageBox::question(msgTitle, msgContent + "\n\n" + - tr("Do you want to open the webpage for download now?"), - widgetP) - == QMessageBox::Yes ) - { +#if defined(Q_OS_MACOS) || defined(Q_OS_X11) + if (UMessageBox::question( + msgTitle, + msgContent + "\n\n" + tr("Do you want to open the " + "webpage for download now?"), + widgetP) == QMessageBox::Yes) { trayMessageClicked(); } #else - if (QSystemTrayIcon::supportsMessages()) - { + if (QSystemTrayIcon::supportsMessages()) { m_tray->setToolTip(widgetP->windowTitle()); m_tray->show(); - m_tray->showMessage(msgTitle, msgContent + "\n" + - tr("Click to download, or select Help->Update!")); - } - else - { - if ( UMessageBox::question(msgTitle, msgContent + "\n\n" + - tr("Do you want to open the webpage for download now?"), - widgetP) - == QMessageBox::Yes ) - { + m_tray->showMessage( + msgTitle, + msgContent + "\n" + + tr("Click to download, or select Help->Update!")); + } else { + if (UMessageBox::question( + msgTitle, + msgContent + "\n\n" + + tr("Do you want to open the webpage for " + "download now?"), + widgetP) == QMessageBox::Yes) { trayMessageClicked(); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/MainWindow/UpdateChecker.h luminance-hdr-2.6.0/src/MainWindow/UpdateChecker.h --- luminance-hdr-2.5.1+dfsg/src/MainWindow/UpdateChecker.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/MainWindow/UpdateChecker.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,30 +24,29 @@ #define UPDATECHECKER_IMPL_H #include -#include -#include #include #include +#include +#include -class UpdateChecker : public QObject -{ +class UpdateChecker : public QObject { Q_OBJECT -public: + public: explicit UpdateChecker(QWidget *parent); virtual ~UpdateChecker(); -public slots: + public slots: void trayMessageClicked() const; -protected slots: - void requestFinished(QNetworkReply*); + protected slots: + void requestFinished(QNetworkReply *); -signals: + signals: void updateAvailable(); -private: - QSystemTrayIcon* m_tray; - QNetworkAccessManager* m_networkManager; + private: + QSystemTrayIcon *m_tray; + QNetworkAccessManager *m_networkManager; QString m_latestUrl; QString m_version; diff -Nru luminance-hdr-2.5.1+dfsg/src/mytime.h luminance-hdr-2.6.0/src/mytime.h --- luminance-hdr-2.5.1+dfsg/src/mytime.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/mytime.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on , commit . + * + * Copyright (c) 2004-2010 Gabor Horvath +*/ + +#ifndef _MYTIME_ +#define _MYTIME_ + +#ifdef WIN32 +#include +#elif defined __APPLE__ +#include +#else +#include +#endif + +class MyTime +{ + +public: +#ifndef WIN32 + timespec t; +#else + LONGLONG t; + LONGLONG baseFrequency; + MyTime() + { + LARGE_INTEGER ulf; + QueryPerformanceFrequency(&ulf); + baseFrequency = ulf.QuadPart; + QueryPerformanceCounter(&ulf); + t = ulf.QuadPart; + } +#endif + + void set () + { +#ifdef WIN32 + LARGE_INTEGER ulf; + QueryPerformanceCounter(&ulf); + t = ulf.QuadPart; +#elif defined __APPLE__ + struct timeval tv; + gettimeofday(&tv, NULL); + t.tv_sec = tv.tv_sec; + t.tv_nsec = tv.tv_usec * 1000; +#else + clock_gettime (CLOCK_REALTIME, &t); +#endif + } + + int etime (MyTime a) + { +#ifndef WIN32 + return (t.tv_sec - a.t.tv_sec) * 1000000 + (t.tv_nsec - a.t.tv_nsec) / 1000; +#else + return (t - a.t) * 1000 / (baseFrequency / 1000); +#endif + } +}; + + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/noncopyable.h luminance-hdr-2.6.0/src/noncopyable.h --- luminance-hdr-2.5.1+dfsg/src/noncopyable.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/noncopyable.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on 23 Nov 2017, commit d61df9d + * + * Copyright (c) 2016 Flössie +*/ + +#pragma once + +namespace lhdrengine +{ + +class NonCopyable +{ +public: + NonCopyable() = default; + + explicit NonCopyable(const NonCopyable&) = delete; + NonCopyable& operator =(const NonCopyable&) = delete; +}; + +} diff -Nru luminance-hdr-2.5.1+dfsg/src/opthelper.h luminance-hdr-2.6.0/src/opthelper.h --- luminance-hdr-2.5.1+dfsg/src/opthelper.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/opthelper.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,72 @@ +//////////////////////////////////////////////////////////////// +// +// opthelper.h includes some #defines which help to make optimizations easier and better readable +// +// copyright (c) 2013 Ingo Weyrich +// +// this 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 . +// +//////////////////////////////////////////////////////////////// + +#ifndef OPTHELPER_H + #define OPTHELPER_H + + #ifdef __SSE2__ + #include "sleefsseavx.c" + #ifdef __GNUC__ + #if defined(WIN32) && !defined( __x86_64__ ) + // needed for actual versions of GCC with 32-Bit Windows + #define SSEFUNCTION __attribute__((force_align_arg_pointer)) + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #else + #ifdef __SSE__ + #ifdef __GNUC__ + #if defined(WIN32) && !defined( __x86_64__ ) + // needed for actual versions of GCC with 32-Bit Windows + #define SSEFUNCTION __attribute__((force_align_arg_pointer)) + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #endif + + #ifdef __GNUC__ + #define RESTRICT __restrict__ + #define LIKELY(x) __builtin_expect (!!(x), 1) + #define UNLIKELY(x) __builtin_expect (!!(x), 0) + #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 + #define ALIGNED64 + #define ALIGNED16 + #endif + #else + #define RESTRICT + #define LIKELY(x) (x) + #define UNLIKELY(x) (x) + #define ALIGNED64 + #define ALIGNED16 + #endif +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/OsIntegration/CMakeLists.txt luminance-hdr-2.6.0/src/OsIntegration/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/OsIntegration/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/OsIntegration/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,7 +10,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/osintegration.cpp ) -IF(MSVC) +IF(WIN32) SET(FILES_H ${FILES_H} ${CMAKE_CURRENT_SOURCE_DIR}/ecwin7.h @@ -26,10 +26,10 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) # QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(osintegration ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(osintegration Core Gui Widgets) +ADD_LIBRARY(osintegration STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} +TARGET_LINK_LIBRARIES(osintegration Qt5::Core Qt5::Gui Qt5::Widgets) IF(WIN32) -qt5_use_modules(osintegration WinExtras) +TARGET_LINK_LIBRARIES(osintegration Qt5::WinExtras) ENDIF() SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} diff -Nru luminance-hdr-2.5.1+dfsg/src/OsIntegration/ecwin7.cpp luminance-hdr-2.6.0/src/OsIntegration/ecwin7.cpp --- luminance-hdr-2.5.1+dfsg/src/OsIntegration/ecwin7.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/OsIntegration/ecwin7.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,23 +1,21 @@ #include "ecwin7.h" -#include +#include #include +#include #include -#include #include "Common/global.h" // Constructor: variabiles initialization -EcWin7::EcWin7() -{ +EcWin7::EcWin7() { taskbarButton = 0; taskbarProgress = 0; jumplist = 0; } // Init taskbar communication -void EcWin7::init(QWidget* widget) -{ +void EcWin7::init(QWidget *widget) { taskbarButton = new QWinTaskbarButton(widget); taskbarButton->setWindow(widget->windowHandle()); @@ -28,14 +26,12 @@ jumplist->recent()->setVisible(true); } -void EcWin7::addRecentFile(const QString& filename) -{ +void EcWin7::addRecentFile(const QString &filename) { jumplist->recent()->addDestination(filename); } // Set progress bar current value -void EcWin7::setProgressValue(int value, int max) -{ +void EcWin7::setProgressValue(int value, int max) { if (!taskbarProgress) return; if (value < 0) { @@ -49,17 +45,18 @@ taskbarProgress->setValue(value); } -void EcWin7::associateFileTypes(const QStringList &fileTypes) -{ +void EcWin7::associateFileTypes(const QStringList &fileTypes) { QString displayName = QGuiApplication::applicationDisplayName(); QString filePath = QCoreApplication::applicationFilePath(); QString fileName = QFileInfo(filePath).fileName(); - QSettings settings("HKEY_CURRENT_USER\\Software\\Classes\\Applications\\" + fileName, QSettings::NativeFormat); + QSettings settings( + "HKEY_CURRENT_USER\\Software\\Classes\\Applications\\" + fileName, + QSettings::NativeFormat); settings.setValue("FriendlyAppName", displayName); settings.beginGroup("SupportedTypes"); - foreach (const QString& fileType, fileTypes) + foreach (const QString &fileType, fileTypes) settings.setValue(fileType, QString()); settings.endGroup(); @@ -67,5 +64,7 @@ settings.beginGroup("open"); settings.setValue("FriendlyAppName", displayName); settings.beginGroup("Command"); - settings.setValue(".", QChar('"') + QDir::toNativeSeparators(filePath) + QString("\" \"%1\"")); + settings.setValue( + ".", + QChar('"') + QDir::toNativeSeparators(filePath) + QString("\" \"%1\"")); } \ No newline at end of file diff -Nru luminance-hdr-2.5.1+dfsg/src/OsIntegration/ecwin7.h luminance-hdr-2.6.0/src/OsIntegration/ecwin7.h --- luminance-hdr-2.5.1+dfsg/src/OsIntegration/ecwin7.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/OsIntegration/ecwin7.h 2019-06-09 19:18:38.000000000 +0000 @@ -1,31 +1,29 @@ #ifndef ECWIN7_H #define ECWIN7_H -#include #include +#include -#include -#include #include #include +#include +#include -class EcWin7 -{ -public: - +class EcWin7 { + public: // Initialization methods EcWin7(); - void init(QWidget* wid); - void addRecentFile(const QString& filename); + void init(QWidget *wid); + void addRecentFile(const QString &filename); void setProgressValue(int value, int max); -private: + private: void associateFileTypes(const QStringList &fileTypes); - QWinTaskbarButton* taskbarButton; - QWinTaskbarProgress* taskbarProgress; - QWinJumpList* jumplist; + QWinTaskbarButton *taskbarButton; + QWinTaskbarProgress *taskbarProgress; + QWinJumpList *jumplist; }; -#endif // ECWIN7_H +#endif // ECWIN7_H diff -Nru luminance-hdr-2.5.1+dfsg/src/OsIntegration/osintegration.cpp luminance-hdr-2.6.0/src/OsIntegration/osintegration.cpp --- luminance-hdr-2.5.1+dfsg/src/OsIntegration/osintegration.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/OsIntegration/osintegration.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,26 +21,28 @@ * @author Daniel Kaneider */ +#include #include "osintegration.h" #include #ifdef Q_OS_WIN -#define _WINSOCKAPI_ // stops windows.h including winsock.h +#define _WINSOCKAPI_ // stops windows.h including winsock.h #include -typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); +typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL); LPFN_ISWOW64PROCESS fnIsWow64Process; #endif -OsIntegration* OsIntegration::instance = 0; +OsIntegration *OsIntegration::instance = 0; OsIntegration::OsIntegration() - : QObject() - , m_progressMin(0) - , m_progressMax(100) + : QObject(), + m_progressMin(0), + m_progressMax(100) #ifdef Q_OS_WIN - , m_winProgressbar(0) + , + m_winProgressbar(0) #endif { #ifdef Q_OS_WIN @@ -49,90 +51,76 @@ #endif } -OsIntegration::~OsIntegration() -{ +OsIntegration::~OsIntegration() { #ifdef Q_OS_WIN if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) delete m_winProgressbar; #endif } -OsIntegration& OsIntegration::getInstance() -{ - if (!instance) - { +OsIntegration &OsIntegration::getInstance() { + if (!instance) { instance = new OsIntegration(); } return *instance; } -OsIntegration* OsIntegration::getInstancePtr() -{ - if (!instance) - { +OsIntegration *OsIntegration::getInstancePtr() { + if (!instance) { instance = new OsIntegration(); } return instance; } -void OsIntegration::init(QWidget* mainWindow) -{ +void OsIntegration::init(QWidget *mainWindow) { #ifdef Q_OS_WIN - if (m_winProgressbar) - { + if (m_winProgressbar) { m_winProgressbar->init(mainWindow); } #endif } -void OsIntegration::setProgress(int value, int max) -{ +void OsIntegration::setProgress(int value, int max) { #ifdef Q_OS_WIN - if (m_winProgressbar) - { + if (m_winProgressbar) { m_winProgressbar->setProgressValue(value, max); } #endif } -void OsIntegration::setProgressValue(int value) -{ +void OsIntegration::setProgressValue(int value) { #ifdef Q_OS_WIN - if (m_winProgressbar) - { - m_winProgressbar->setProgressValue(value, m_progressMax - m_progressMin); + if (m_winProgressbar) { + m_winProgressbar->setProgressValue(value, + m_progressMax - m_progressMin); } #endif } -void OsIntegration::setProgressRange(int min, int max) -{ +void OsIntegration::setProgressRange(int min, int max) { m_progressMin = min; m_progressMax = max; } -void OsIntegration::addRecentFile(const QString& filename) -{ +void OsIntegration::addRecentFile(const QString &filename) { #ifdef Q_OS_WIN - if (m_winProgressbar) - { + if (m_winProgressbar) { m_winProgressbar->addRecentFile(filename); } #endif } -bool OsIntegration::isRunningOnSameCpuPlatform() -{ -#if defined(_WIN32) +bool OsIntegration::isRunningOnSameCpuPlatform() { +#if defined(Q_OS_WIN) // 32-bit programs run on both 32-bit and 64-bit Windows // so must sniff BOOL f64 = true; LPFN_ISWOW64PROCESS fnIsWow64Process; - fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(GetModuleHandle(TEXT("kernel32")),"IsWow64Process"); - if (NULL != fnIsWow64Process) - { - return !(fnIsWow64Process(GetCurrentProcess(),&f64) && f64); + fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress( + GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); + if (NULL != fnIsWow64Process) { + return !(fnIsWow64Process(GetCurrentProcess(), &f64) && f64); } return true; #else diff -Nru luminance-hdr-2.5.1+dfsg/src/OsIntegration/osintegration.h luminance-hdr-2.6.0/src/OsIntegration/osintegration.h --- luminance-hdr-2.5.1+dfsg/src/OsIntegration/osintegration.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/OsIntegration/osintegration.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,48 +24,46 @@ #ifndef OSINTEGRATION_H #define OSINTEGRATION_H +#include #include -#include #include -#include +#include #ifdef Q_OS_WIN #include "ecwin7.h" #endif -class OsIntegration : public QObject -{ +class OsIntegration : public QObject { Q_OBJECT -public: - static OsIntegration& getInstance(); - static OsIntegration* getInstancePtr(); + public: + static OsIntegration &getInstance(); + static OsIntegration *getInstancePtr(); - void init(QWidget* mainWindow); + void init(QWidget *mainWindow); void setProgress(int value, int max = 100); ~OsIntegration(); bool isRunningOnSameCpuPlatform(); - void addRecentFile(const QString& filename); + void addRecentFile(const QString &filename); -public Q_SLOTS: + public Q_SLOTS: void setProgressValue(int value); void setProgressRange(int min, int max); -private: + private: OsIntegration(); - OsIntegration(const OsIntegration&); - OsIntegration& operator=(const OsIntegration&); + OsIntegration(const OsIntegration &); + OsIntegration &operator=(const OsIntegration &); - static OsIntegration* instance; + static OsIntegration *instance; int m_progressMin; int m_progressMax; #ifdef Q_OS_WIN - EcWin7* m_winProgressbar; + EcWin7 *m_winProgressbar; #endif - }; -#endif // OSINTEGRATION_H +#endif // OSINTEGRATION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Preferences/CMakeLists.txt luminance-hdr-2.6.0/src/Preferences/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Preferences/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Preferences/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(preferencesdialog ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(preferencesdialog Core Gui Widgets) +ADD_LIBRARY(preferencesdialog STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(preferencesdialog Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} preferencesdialog PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.cpp luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,129 +24,112 @@ * */ +#include #include +#include #include -#include #include -#include #include +#include -#include #include +#include -#include "Common/global.h" -#include "Common/config.h" #include "Common/LuminanceOptions.h" #include "Common/TranslatorManager.h" +#include "Common/config.h" +#include "Common/global.h" #include "Preferences/PreferencesDialog.h" - // UI -#include "ui_PreferencesDialog.h" +#include "Preferences/ui_PreferencesDialog.h" -#define KEY_USER_QUAL_TOOLBUTTON "preference_dialog/user_qual_toolButton" -#define KEY_MED_PASSES_TOOLBUTTON "preference_dialog/med_passes_toolButton" -#define KEY_WB_METHOD_TOOLBUTTON "preference_dialog/wb_method_toolButton" -#define KEY_TK_TOOLBUTTON "preference_dialog/TK_toolButton" -#define KEY_MULTIPLIERS_TOOLBUTTON "preference_dialog/multipliers_toolButton" -#define KEY_HIGHLIGHTS_TOOLBUTTON "preference_dialog/highlights_toolButton" -#define KEY_LEVEL_TOOLBUTTON "preference_dialog/level_toolButton" -#define KEY_BRIGHTNESS_TOOLBUTTON "preference_dialog/brightness_toolButton" -#define KEY_USER_BLACK_TOOLBUTTON "preference_dialog/user_black_toolButton" -#define KEY_USER_SAT_TOOLBUTTON "preference_dialog/user_sat_toolButton" -#define KEY_THRESHOLD_TOOLBUTTON "preference_dialog/threshold_toolButton" -#define KEY_RED_TOOLBUTTON "preference_dialog/red_toolButton" -#define KEY_BLUE_TOOLBUTTON "preference_dialog/blue_toolButton" -#define KEY_GREEN_TOOLBUTTON "preference_dialog/green_toolButton" - -#ifdef WIN32 - #define ICC_PATH "C:\\WINDOWS\\system32\\spool\\drivers\\color" -#elif defined __APPLE__ - #define ICC_PATH "/Library/ColorSync/Profiles/" +#ifdef Q_OS_WIN +#define ICC_PATH "C:\\WINDOWS\\system32\\spool\\drivers\\color" +#elif defined Q_OS_MACOS +#define ICC_PATH "/Library/ColorSync/Profiles/" #else - #define ICC_PATH "/usr/share/color/icc" +#define ICC_PATH "/usr/share/color/icc" #endif -namespace -{ -inline double pos2value(int pos, int minpos, int maxpos, double minv, double maxv) -{ - double x = (pos - minpos)/( (double) (maxpos - minpos)); - return minv*exp(log(maxv/minv)*x ); +namespace { +inline double pos2value(int pos, int minpos, int maxpos, double minv, + double maxv) { + double x = (pos - minpos) / ((double)(maxpos - minpos)); + return minv * exp(log(maxv / minv) * x); } -inline int value2pos(double value, int minpos, int maxpos, double minv, double maxv) -{ - double y = (log(value)-log(minv))/(log(maxv)-log(minv)); - return (int) ((maxpos - minpos)*y) + minpos; +inline int value2pos(double value, int minpos, int maxpos, double minv, + double maxv) { + double y = (log(value) - log(minv)) / (log(maxv) - log(minv)); + return (int)((maxpos - minpos) * y) + minpos; } - } -PreferencesDialog::PreferencesDialog(QWidget *p, int tab): - QDialog(p), - m_Ui(new Ui::PreferencesDialog) -{ +PreferencesDialog::PreferencesDialog(QWidget *p, int tab) + : QDialog(p), m_Ui(new Ui::PreferencesDialog) { m_Ui->setupUi(this); - if ( !QIcon::hasThemeIcon("color-management") ) + if (!QIcon::hasThemeIcon(QStringLiteral("color-management"))) m_Ui->toolButtonCMS->setIcon(QIcon(":/program-icons/color-management")); - if ( !QIcon::hasThemeIcon("preferences-system-windows") ) - m_Ui->toolButtonInterface->setIcon(QIcon(":/program-icons/preferences-system-windows")); + if (!QIcon::hasThemeIcon(QStringLiteral("preferences-system-windows"))) + m_Ui->toolButtonInterface->setIcon( + QIcon(":/program-icons/preferences-system-windows")); - connect(m_Ui->themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(on_themeChanged())); + connect(m_Ui->themeComboBox, SIGNAL(currentIndexChanged(int)), this, + SLOT(on_themeChanged())); #ifdef DEMOSAICING_GPL2 qDebug() << "PreferencesDialog: Found demosaicing pack GPL2"; - m_Ui->user_qual_comboBox->addItem("DCB"); - m_Ui->user_qual_comboBox->addItem("AHD v2"); - m_Ui->user_qual_comboBox->addItem("AFD"); - m_Ui->user_qual_comboBox->addItem("VCD"); - m_Ui->user_qual_comboBox->addItem("VCD & AHD"); - m_Ui->user_qual_comboBox->addItem("LMMSE"); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("DCB")); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("AHD v2")); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("AFD")); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("VCD")); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("VCD & AHD")); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("LMMSE")); #endif #ifdef DEMOSAICING_GPL3 qDebug() << "PreferencesDialog: Found AMaZE"; - m_Ui->user_qual_comboBox->addItem("AMaZE"); + m_Ui->user_qual_comboBox->addItem(QStringLiteral("AMaZE")); #endif - fromIso639ToGuiIndex["cs"]= 0; - fromIso639ToGuiIndex["da"]= 1; - fromIso639ToGuiIndex["de"]= 2; - fromIso639ToGuiIndex["en"]= 3; - fromIso639ToGuiIndex["es"]= 4; - fromIso639ToGuiIndex["fr"]= 5; - fromIso639ToGuiIndex["id"]= 6; - fromIso639ToGuiIndex["it"]= 7; - fromIso639ToGuiIndex["hu"]= 8; - fromIso639ToGuiIndex["pl"]= 9; - fromIso639ToGuiIndex["pt_BR"]= 10; - fromIso639ToGuiIndex["ru"]=11; - fromIso639ToGuiIndex["ro"]=12; - fromIso639ToGuiIndex["fi"]=13; - fromIso639ToGuiIndex["tr"]=14; - fromIso639ToGuiIndex["zh"]=15; - - fromGuiIndexToIso639[ 0]="cs"; - fromGuiIndexToIso639[ 1]="da"; - fromGuiIndexToIso639[ 2]="de"; - fromGuiIndexToIso639[ 3]="en"; - fromGuiIndexToIso639[ 4]="es"; - fromGuiIndexToIso639[ 5]="fr"; - fromGuiIndexToIso639[ 6]="id"; - fromGuiIndexToIso639[ 7]="it"; - fromGuiIndexToIso639[ 8]="hu"; - fromGuiIndexToIso639[ 9]="pl"; - fromGuiIndexToIso639[10]="pt_BR"; - fromGuiIndexToIso639[11]="ru"; - fromGuiIndexToIso639[12]="ro"; - fromGuiIndexToIso639[13]="fi"; - fromGuiIndexToIso639[14]="tr"; - fromGuiIndexToIso639[15]="zh"; - - for (QString style : QStyleFactory::keys()) - { -#ifdef Q_OS_MAC + fromIso639ToGuiIndex[QStringLiteral("cs")] = 0; + fromIso639ToGuiIndex[QStringLiteral("da")] = 1; + fromIso639ToGuiIndex[QStringLiteral("de")] = 2; + fromIso639ToGuiIndex[QStringLiteral("en")] = 3; + fromIso639ToGuiIndex[QStringLiteral("es")] = 4; + fromIso639ToGuiIndex[QStringLiteral("fr")] = 5; + fromIso639ToGuiIndex[QStringLiteral("id")] = 6; + fromIso639ToGuiIndex[QStringLiteral("it")] = 7; + fromIso639ToGuiIndex[QStringLiteral("hu")] = 8; + fromIso639ToGuiIndex[QStringLiteral("pl")] = 9; + fromIso639ToGuiIndex[QStringLiteral("pt_BR")] = 10; + fromIso639ToGuiIndex[QStringLiteral("ru")] = 11; + fromIso639ToGuiIndex[QStringLiteral("ro")] = 12; + fromIso639ToGuiIndex[QStringLiteral("fi")] = 13; + fromIso639ToGuiIndex[QStringLiteral("tr")] = 14; + fromIso639ToGuiIndex[QStringLiteral("zh")] = 15; + + fromGuiIndexToIso639[0] = QStringLiteral("cs"); + fromGuiIndexToIso639[1] = QStringLiteral("da"); + fromGuiIndexToIso639[2] = QStringLiteral("de"); + fromGuiIndexToIso639[3] = QStringLiteral("en"); + fromGuiIndexToIso639[4] = QStringLiteral("es"); + fromGuiIndexToIso639[5] = QStringLiteral("fr"); + fromGuiIndexToIso639[6] = QStringLiteral("id"); + fromGuiIndexToIso639[7] = QStringLiteral("it"); + fromGuiIndexToIso639[8] = QStringLiteral("hu"); + fromGuiIndexToIso639[9] = QStringLiteral("pl"); + fromGuiIndexToIso639[10] = QStringLiteral("pt_BR"); + fromGuiIndexToIso639[11] = QStringLiteral("ru"); + fromGuiIndexToIso639[12] = QStringLiteral("ro"); + fromGuiIndexToIso639[13] = QStringLiteral("fi"); + fromGuiIndexToIso639[14] = QStringLiteral("tr"); + fromGuiIndexToIso639[15] = QStringLiteral("zh"); + + // for (const QString &style : QStyleFactory::keys()) + foreach (const QString &style, QStyleFactory::keys()) { +#ifdef Q_OS_MACOS if (style == "Windows") { continue; } @@ -155,60 +138,54 @@ m_Ui->themeComboBox->addItem(style); } - m_formatHelper.initConnection(m_Ui->exportFormatCombo, m_Ui->exportFormatToolbutton, false); + m_formatHelper.initConnection(m_Ui->exportFormatCombo, + m_Ui->exportFormatToolbutton, false); - from_options_to_gui(); //update the gui in order to show the options + from_options_to_gui(); // update the gui in order to show the options toolButtonMapper = new QSignalMapper(this); - connect(toolButtonMapper, SIGNAL(mapped(int)), this, SLOT(toolButton_clicked(int))); + connect(toolButtonMapper, SIGNAL(mapped(int)), this, + SLOT(toolButton_clicked(int))); - QObject* tabEntries[] = { - m_Ui->toolButtonInterface, - m_Ui->toolButtonQueue, - m_Ui->toolButtonTM, - m_Ui->toolButtonRAW, - m_Ui->toolButtonCMS, - m_Ui->toolButtonExtTool - }; - for (int i = 0; i < 6; i++) - { + QObject *tabEntries[] = { + m_Ui->toolButtonInterface, m_Ui->toolButtonQueue, + m_Ui->toolButtonTM, m_Ui->toolButtonRAW, + m_Ui->toolButtonCMS, m_Ui->toolButtonExtTool}; + for (int i = 0; i < 6; i++) { toolButtonMapper->setMapping(tabEntries[i], i); - connect(tabEntries[i], SIGNAL(clicked()), toolButtonMapper, SLOT(map())); + connect(tabEntries[i], SIGNAL(clicked()), toolButtonMapper, + SLOT(map())); } toolButton_clicked(tab); } -PreferencesDialog::~PreferencesDialog() -{ - delete toolButtonMapper; -} +PreferencesDialog::~PreferencesDialog() { delete toolButtonMapper; } -void PreferencesDialog::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) - { - m_Ui->retranslateUi(this); +void PreferencesDialog::changeEvent(QEvent *event) { + if (event->type() == QEvent::LanguageChange) { + m_Ui->retranslateUi(this); } QWidget::changeEvent(event); } -void PreferencesDialog::on_okButton_clicked() -{ +void PreferencesDialog::on_okButton_clicked() { bool restartNeeded = false; LuminanceOptions luminance_options; - if (luminance_options.getGuiLang() != fromGuiIndexToIso639[m_Ui->languageComboBox->currentIndex()]) - { - luminance_options.setGuiLang( fromGuiIndexToIso639[m_Ui->languageComboBox->currentIndex()] ); - TranslatorManager::setLanguage( luminance_options.getGuiLang() ); + if (luminance_options.getGuiLang() != + fromGuiIndexToIso639[m_Ui->languageComboBox->currentIndex()]) { + luminance_options.setGuiLang( + fromGuiIndexToIso639[m_Ui->languageComboBox->currentIndex()]); + TranslatorManager::setLanguage(luminance_options.getGuiLang()); } - if (luminance_options.getGuiTheme() != m_Ui->themeComboBox->currentText() || luminance_options.isGuiDarkMode() != m_Ui->chkDarkMode->isChecked()) - { - if (luminance_options.isGuiDarkMode() != m_Ui->chkDarkMode->isChecked() && !m_Ui->chkDarkMode->isChecked()) - { + if (luminance_options.getGuiTheme() != m_Ui->themeComboBox->currentText() || + luminance_options.isGuiDarkMode() != m_Ui->chkDarkMode->isChecked()) { + if (luminance_options.isGuiDarkMode() != + m_Ui->chkDarkMode->isChecked() && + !m_Ui->chkDarkMode->isChecked()) { restartNeeded = true; } luminance_options.setGuiTheme(m_Ui->themeComboBox->currentText()); @@ -216,113 +193,128 @@ luminance_options.applyTheme(false); } - luminance_options.setTempDir( m_Ui->lineEditTempPath->text() ); + luminance_options.setTempDir(m_Ui->lineEditTempPath->text()); - luminance_options.setPreviewWidth( m_Ui->previewsWidthSpinBox->value() ); - luminance_options.setPreviewPanelActive( m_Ui->checkBoxTMOWindowsPreviewPanel->isChecked() ); + luminance_options.setPreviewWidth(m_Ui->previewsWidthSpinBox->value()); + luminance_options.setPreviewPanelActive( + m_Ui->checkBoxTMOWindowsPreviewPanel->isChecked()); - if (m_Ui->chkPortableMode->isChecked() != LuminanceOptions::isCurrentPortableMode) - { + if (m_Ui->chkPortableMode->isChecked() != + LuminanceOptions::isCurrentPortableMode) { restartNeeded = true; luminance_options.setPortableMode(m_Ui->chkPortableMode->isChecked()); } // --- Batch TM - luminance_options.setBatchTmNumThreads( m_Ui->numThreadspinBox->value() ); + luminance_options.setBatchTmNumThreads(m_Ui->numThreadspinBox->value()); // --- Other Parameters - QStringList ais_options = m_Ui->aisParamsLineEdit->text().split(" ",QString::SkipEmptyParts); + QStringList ais_options = m_Ui->aisParamsLineEdit->text().split( + QStringLiteral(" "), QString::SkipEmptyParts); luminance_options.setAlignImageStackOptions(ais_options, true); // --- RAW parameters - luminance_options.setRawFourColorRGB( m_Ui->four_color_rgb_CB->isChecked() ); - luminance_options.setRawDoNotUseFujiRotate( m_Ui->do_not_use_fuji_rotate_CB->isChecked() ); - QString user_qual = m_Ui->user_qual_comboBox->itemText( m_Ui->user_qual_comboBox->currentIndex() ); - if (user_qual == "Bilinear" || - user_qual == "VNG" || - user_qual == "PPG" || - user_qual == "AHD") - luminance_options.setRawUserQuality( m_Ui->user_qual_comboBox->currentIndex() ); - else if(user_qual == "DCB") - luminance_options.setRawUserQuality( 4 ); - else if(user_qual == "AHD v2") - luminance_options.setRawUserQuality( 5 ); - else if(user_qual == "AFD") - luminance_options.setRawUserQuality( 6 ); - else if(user_qual == "VCD") - luminance_options.setRawUserQuality( 7 ); - else if(user_qual == "VCD & AHD") - luminance_options.setRawUserQuality( 8 ); - else if(user_qual == "LMMSE") - luminance_options.setRawUserQuality( 9 ); - else if(user_qual == "AMaZE") - luminance_options.setRawUserQuality( 10 ); - luminance_options.setRawMedPasses( m_Ui->med_passes_spinBox->value() ); - luminance_options.setRawWhiteBalanceMethod( m_Ui->wb_method_comboBox->currentIndex() ); - luminance_options.setRawTemperatureKelvin( m_Ui->TK_spinBox->value() ); - luminance_options.setRawGreen( m_Ui->green_doubleSpinBox->value() ); - luminance_options.setRawHighlightsMode( m_Ui->highlights_comboBox->currentIndex() ); - luminance_options.setRawLevel( m_Ui->level_spinBox->value() ); - luminance_options.setRawAutoBrightness( m_Ui->auto_bright_CB->isChecked() ); - luminance_options.setRawBrightness( m_Ui->brightness_doubleSpinBox->value() ); - luminance_options.setRawUseBlack( m_Ui->use_black_CB->isChecked() ); - luminance_options.setRawUseSaturation( m_Ui->use_sat_CB->isChecked() ); - luminance_options.setRawUseNoiseReduction( m_Ui->use_noise_CB->isChecked() ); - luminance_options.setRawUseChromaAber( m_Ui->use_chroma_CB->isChecked() ); - luminance_options.setRawNoiseReductionThreshold( m_Ui->threshold_spinBox->value() ); - luminance_options.setRawUserBlack( m_Ui->user_black_spinBox->value() ); - luminance_options.setRawUserSaturation( m_Ui->user_sat_spinBox->value() ); - luminance_options.setRawAber0( m_Ui->red_doubleSpinBox->value() ); - luminance_options.setRawAber2( m_Ui->blue_doubleSpinBox->value() ); + luminance_options.setRawFourColorRGB(m_Ui->four_color_rgb_CB->isChecked()); + luminance_options.setRawDoNotUseFujiRotate( + m_Ui->do_not_use_fuji_rotate_CB->isChecked()); + QString user_qual = m_Ui->user_qual_comboBox->itemText( + m_Ui->user_qual_comboBox->currentIndex()); + if (user_qual == QLatin1String("Bilinear") || + user_qual == QLatin1String("VNG") || + user_qual == QLatin1String("PPG") || user_qual == QLatin1String("AHD")) + luminance_options.setRawUserQuality( + m_Ui->user_qual_comboBox->currentIndex()); + else if (user_qual == QLatin1String("DCB")) + luminance_options.setRawUserQuality(4); + else if (user_qual == QLatin1String("AHD v2")) + luminance_options.setRawUserQuality(5); + else if (user_qual == QLatin1String("AFD")) + luminance_options.setRawUserQuality(6); + else if (user_qual == QLatin1String("VCD")) + luminance_options.setRawUserQuality(7); + else if (user_qual == QLatin1String("VCD & AHD")) + luminance_options.setRawUserQuality(8); + else if (user_qual == QLatin1String("LMMSE")) + luminance_options.setRawUserQuality(9); + else if (user_qual == QLatin1String("AMaZE")) + luminance_options.setRawUserQuality(10); + luminance_options.setRawMedPasses(m_Ui->med_passes_spinBox->value()); + luminance_options.setRawWhiteBalanceMethod( + m_Ui->wb_method_comboBox->currentIndex()); + luminance_options.setRawTemperatureKelvin(m_Ui->TK_spinBox->value()); + luminance_options.setRawGreen(m_Ui->green_doubleSpinBox->value()); + luminance_options.setRawHighlightsMode( + m_Ui->highlights_comboBox->currentIndex()); + luminance_options.setRawLevel(m_Ui->level_spinBox->value()); + luminance_options.setRawAutoBrightness(m_Ui->auto_bright_CB->isChecked()); + luminance_options.setRawBrightness(m_Ui->brightness_doubleSpinBox->value()); + luminance_options.setRawUseBlack(m_Ui->use_black_CB->isChecked()); + luminance_options.setRawUseSaturation(m_Ui->use_sat_CB->isChecked()); + luminance_options.setRawUseNoiseReduction(m_Ui->use_noise_CB->isChecked()); + luminance_options.setRawUseChromaAber(m_Ui->use_chroma_CB->isChecked()); + luminance_options.setRawNoiseReductionThreshold( + m_Ui->threshold_spinBox->value()); + luminance_options.setRawUserBlack(m_Ui->user_black_spinBox->value()); + luminance_options.setRawUserSaturation(m_Ui->user_sat_spinBox->value()); + luminance_options.setRawAber0(m_Ui->red_doubleSpinBox->value()); + luminance_options.setRawAber2(m_Ui->blue_doubleSpinBox->value()); // --- Color Management - luminance_options.setCameraProfileFileName( m_Ui->camera_lineEdit->text() ); - luminance_options.setMonitorProfileFileName( m_Ui->monitor_lineEdit->text() ); - luminance_options.setPrinterProfileFileName( m_Ui->printer_lineEdit->text() ); + luminance_options.setCameraProfileFileName(m_Ui->camera_lineEdit->text()); + luminance_options.setMonitorProfileFileName(m_Ui->monitor_lineEdit->text()); + luminance_options.setPrinterProfileFileName(m_Ui->printer_lineEdit->text()); // ---- temporary... this rubbish must go away! - luminance_options.setValue(KEY_USER_QUAL_TOOLBUTTON, m_Ui->user_qual_toolButton->isEnabled()); - luminance_options.setValue(KEY_MED_PASSES_TOOLBUTTON, m_Ui->med_passes_toolButton->isEnabled()); - luminance_options.setValue(KEY_WB_METHOD_TOOLBUTTON, m_Ui->wb_method_toolButton->isEnabled()); - luminance_options.setValue(KEY_TK_TOOLBUTTON, m_Ui->TK_toolButton->isEnabled()); - luminance_options.setValue(KEY_HIGHLIGHTS_TOOLBUTTON, m_Ui->highlights_toolButton->isEnabled()); - luminance_options.setValue(KEY_LEVEL_TOOLBUTTON, m_Ui->level_toolButton->isEnabled()); - luminance_options.setValue(KEY_BRIGHTNESS_TOOLBUTTON, m_Ui->brightness_toolButton->isEnabled()); - luminance_options.setValue(KEY_USER_BLACK_TOOLBUTTON, m_Ui->user_black_toolButton->isEnabled()); - luminance_options.setValue(KEY_USER_SAT_TOOLBUTTON, m_Ui->user_sat_toolButton->isEnabled()); - luminance_options.setValue(KEY_THRESHOLD_TOOLBUTTON, m_Ui->threshold_toolButton->isEnabled()); - luminance_options.setValue(KEY_RED_TOOLBUTTON, m_Ui->red_toolButton->isEnabled()); - luminance_options.setValue(KEY_BLUE_TOOLBUTTON, m_Ui->blue_toolButton->isEnabled()); - luminance_options.setValue(KEY_GREEN_TOOLBUTTON, m_Ui->green_toolButton->isEnabled()); + luminance_options.setValue(KEY_USER_QUAL_TOOLBUTTON, + m_Ui->user_qual_toolButton->isEnabled()); + luminance_options.setValue(KEY_MED_PASSES_TOOLBUTTON, + m_Ui->med_passes_toolButton->isEnabled()); + luminance_options.setValue(KEY_WB_METHOD_TOOLBUTTON, + m_Ui->wb_method_toolButton->isEnabled()); + luminance_options.setValue(KEY_TK_TOOLBUTTON, + m_Ui->TK_toolButton->isEnabled()); + luminance_options.setValue(KEY_HIGHLIGHTS_TOOLBUTTON, + m_Ui->highlights_toolButton->isEnabled()); + luminance_options.setValue(KEY_LEVEL_TOOLBUTTON, + m_Ui->level_toolButton->isEnabled()); + luminance_options.setValue(KEY_BRIGHTNESS_TOOLBUTTON, + m_Ui->brightness_toolButton->isEnabled()); + luminance_options.setValue(KEY_USER_BLACK_TOOLBUTTON, + m_Ui->user_black_toolButton->isEnabled()); + luminance_options.setValue(KEY_USER_SAT_TOOLBUTTON, + m_Ui->user_sat_toolButton->isEnabled()); + luminance_options.setValue(KEY_THRESHOLD_TOOLBUTTON, + m_Ui->threshold_toolButton->isEnabled()); + luminance_options.setValue(KEY_RED_TOOLBUTTON, + m_Ui->red_toolButton->isEnabled()); + luminance_options.setValue(KEY_BLUE_TOOLBUTTON, + m_Ui->blue_toolButton->isEnabled()); + luminance_options.setValue(KEY_GREEN_TOOLBUTTON, + m_Ui->green_toolButton->isEnabled()); luminance_options.setExportDir(m_Ui->exportDirectoryEdit->text()); - m_formatHelper.writeSettings(luminance_options, KEY_FILEFORMAT_QUEUE); + m_formatHelper.writeSettings(KEY_FILEFORMAT_QUEUE); - if (restartNeeded) - { - QMessageBox::information(this, tr("Restart"), tr("For the settings to take effect, please restart the application!")); + if (restartNeeded) { + QMessageBox::information(this, tr("Restart"), + tr("For the settings to take effect, please " + "restart the application!")); } accept(); } -void PreferencesDialog::on_cancelButton_clicked() -{ - reject(); -} +void PreferencesDialog::on_cancelButton_clicked() { reject(); } -void PreferencesDialog::on_user_qual_comboBox_currentIndexChanged(int value) -{ +void PreferencesDialog::on_user_qual_comboBox_currentIndexChanged(int value) { m_Ui->user_qual_toolButton->setEnabled(value != 0); } -void PreferencesDialog::on_med_passes_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_med_passes_spinBox_valueChanged(int value) { m_Ui->med_passes_toolButton->setEnabled(value != 0); } -void PreferencesDialog::on_wb_method_comboBox_currentIndexChanged(int i) -{ +void PreferencesDialog::on_wb_method_comboBox_currentIndexChanged(int i) { bool isManualWb = i == 3; m_Ui->TK_label->setEnabled(isManualWb); m_Ui->TK_horizontalSlider->setEnabled(isManualWb); @@ -334,38 +326,31 @@ m_Ui->wb_method_toolButton->setEnabled(i != 1); } -void PreferencesDialog::on_TK_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_TK_spinBox_valueChanged(int value) { m_Ui->TK_toolButton->setEnabled(value != false); } -void PreferencesDialog::on_highlights_comboBox_currentIndexChanged(int i) -{ +void PreferencesDialog::on_highlights_comboBox_currentIndexChanged(int i) { m_Ui->highlights_toolButton->setEnabled(i != 0); } -void PreferencesDialog::on_level_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_level_spinBox_valueChanged(int value) { m_Ui->level_toolButton->setEnabled(value != 0); } -void PreferencesDialog::on_user_black_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_user_black_spinBox_valueChanged(int value) { m_Ui->user_black_toolButton->setEnabled(value != 0); } -void PreferencesDialog::on_user_sat_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_user_sat_spinBox_valueChanged(int value) { m_Ui->user_sat_toolButton->setEnabled(value != 20000); } -void PreferencesDialog::on_threshold_spinBox_valueChanged(int value) -{ +void PreferencesDialog::on_threshold_spinBox_valueChanged(int value) { m_Ui->threshold_toolButton->setEnabled(value != 100); } -void PreferencesDialog::on_use_black_CB_stateChanged(int) -{ +void PreferencesDialog::on_use_black_CB_stateChanged(int) { bool checked = m_Ui->use_black_CB->isChecked(); m_Ui->user_black_horizontalSlider->setEnabled(checked); m_Ui->user_black_spinBox->setEnabled(checked); @@ -377,8 +362,7 @@ m_Ui->user_sat_spinBox->setEnabled(checked); } -void PreferencesDialog::on_use_noise_CB_stateChanged(int) -{ +void PreferencesDialog::on_use_noise_CB_stateChanged(int) { bool checked = m_Ui->use_noise_CB->isChecked(); m_Ui->threshold_label->setEnabled(checked); m_Ui->threshold_horizontalSlider->setEnabled(checked); @@ -386,8 +370,7 @@ m_Ui->threshold_toolButton->setEnabled(checked); } -void PreferencesDialog::on_use_chroma_CB_stateChanged(int) -{ +void PreferencesDialog::on_use_chroma_CB_stateChanged(int) { bool checked = m_Ui->use_chroma_CB->isChecked(); m_Ui->red_label->setEnabled(checked); m_Ui->red_horizontalSlider->setEnabled(checked); @@ -397,235 +380,226 @@ m_Ui->blue_doubleSpinBox->setEnabled(checked); } -void PreferencesDialog::on_brightness_horizontalSlider_valueChanged(int value) -{ - m_Ui->brightness_doubleSpinBox->setValue(((double) value)/m_Ui->brightness_doubleSpinBox->maximum()); +void PreferencesDialog::on_brightness_horizontalSlider_valueChanged(int value) { + m_Ui->brightness_doubleSpinBox->setValue( + ((double)value) / m_Ui->brightness_doubleSpinBox->maximum()); } -void PreferencesDialog::on_brightness_doubleSpinBox_valueChanged(double value) -{ - m_Ui->brightness_horizontalSlider->setValue((int) (value*m_Ui->brightness_doubleSpinBox->maximum())); +void PreferencesDialog::on_brightness_doubleSpinBox_valueChanged(double value) { + m_Ui->brightness_horizontalSlider->setValue( + (int)(value * m_Ui->brightness_doubleSpinBox->maximum())); m_Ui->brightness_toolButton->setEnabled(fabs(value - 1.0) >= 1e-4); } -void PreferencesDialog::on_red_horizontalSlider_valueChanged(int pos) -{ +void PreferencesDialog::on_red_horizontalSlider_valueChanged(int pos) { int minpos = m_Ui->red_horizontalSlider->minimum(); int maxpos = m_Ui->red_horizontalSlider->maximum(); double minv = m_Ui->red_doubleSpinBox->minimum(); double maxv = m_Ui->red_doubleSpinBox->maximum(); - m_Ui->red_doubleSpinBox->setValue( pos2value(pos, minpos, maxpos, minv, maxv) ); + m_Ui->red_doubleSpinBox->setValue( + pos2value(pos, minpos, maxpos, minv, maxv)); } -void PreferencesDialog::on_red_doubleSpinBox_valueChanged(double value) -{ +void PreferencesDialog::on_red_doubleSpinBox_valueChanged(double value) { int minpos = m_Ui->red_horizontalSlider->minimum(); int maxpos = m_Ui->red_horizontalSlider->maximum(); double minv = m_Ui->red_doubleSpinBox->minimum(); double maxv = m_Ui->red_doubleSpinBox->maximum(); - m_Ui->red_horizontalSlider->setValue( value2pos(value, minpos, maxpos, minv, maxv) ); + m_Ui->red_horizontalSlider->setValue( + value2pos(value, minpos, maxpos, minv, maxv)); m_Ui->red_toolButton->setEnabled(fabs(value - 1.0) >= 1e-4); } -void PreferencesDialog::on_blue_horizontalSlider_valueChanged(int pos) -{ +void PreferencesDialog::on_blue_horizontalSlider_valueChanged(int pos) { int minpos = m_Ui->blue_horizontalSlider->minimum(); int maxpos = m_Ui->blue_horizontalSlider->maximum(); double minv = m_Ui->blue_doubleSpinBox->minimum(); double maxv = m_Ui->blue_doubleSpinBox->maximum(); - m_Ui->blue_doubleSpinBox->setValue( pos2value(pos, minpos, maxpos, minv, maxv) ); + m_Ui->blue_doubleSpinBox->setValue( + pos2value(pos, minpos, maxpos, minv, maxv)); } -void PreferencesDialog::on_blue_doubleSpinBox_valueChanged(double value) -{ +void PreferencesDialog::on_blue_doubleSpinBox_valueChanged(double value) { int minpos = m_Ui->blue_horizontalSlider->minimum(); int maxpos = m_Ui->blue_horizontalSlider->maximum(); double minv = m_Ui->blue_doubleSpinBox->minimum(); double maxv = m_Ui->blue_doubleSpinBox->maximum(); - m_Ui->blue_horizontalSlider->setValue( value2pos(value, minpos, maxpos, minv, maxv) ); + m_Ui->blue_horizontalSlider->setValue( + value2pos(value, minpos, maxpos, minv, maxv)); m_Ui->blue_toolButton->setEnabled(fabs(value - 1.0) >= 1e-4); } -void PreferencesDialog::on_green_horizontalSlider_valueChanged( int pos) -{ +void PreferencesDialog::on_green_horizontalSlider_valueChanged(int pos) { int minpos = m_Ui->green_horizontalSlider->minimum(); int maxpos = m_Ui->green_horizontalSlider->maximum(); double minv = m_Ui->green_doubleSpinBox->minimum(); double maxv = m_Ui->green_doubleSpinBox->maximum(); - m_Ui->green_doubleSpinBox->setValue( pos2value(pos, minpos, maxpos, minv, maxv) ); + m_Ui->green_doubleSpinBox->setValue( + pos2value(pos, minpos, maxpos, minv, maxv)); } -void PreferencesDialog::on_green_doubleSpinBox_valueChanged( double value) -{ +void PreferencesDialog::on_green_doubleSpinBox_valueChanged(double value) { int minpos = m_Ui->green_horizontalSlider->minimum(); int maxpos = m_Ui->green_horizontalSlider->maximum(); double minv = m_Ui->green_doubleSpinBox->minimum(); double maxv = m_Ui->green_doubleSpinBox->maximum(); - m_Ui->blue_horizontalSlider->setValue( value2pos(value, minpos, maxpos, minv, maxv) ); + m_Ui->blue_horizontalSlider->setValue( + value2pos(value, minpos, maxpos, minv, maxv)); m_Ui->green_toolButton->setEnabled(fabs(value - 1.0) >= 1e-4); } -void PreferencesDialog::on_user_qual_toolButton_clicked() -{ +void PreferencesDialog::on_user_qual_toolButton_clicked() { m_Ui->user_qual_comboBox->setCurrentIndex(0); } -void PreferencesDialog::on_med_passes_toolButton_clicked() -{ +void PreferencesDialog::on_med_passes_toolButton_clicked() { m_Ui->med_passes_horizontalSlider->setValue(0); m_Ui->med_passes_spinBox->setValue(0); m_Ui->med_passes_toolButton->setEnabled(false); } -void PreferencesDialog::on_wb_method_toolButton_clicked() -{ +void PreferencesDialog::on_wb_method_toolButton_clicked() { m_Ui->wb_method_comboBox->setCurrentIndex(1); m_Ui->wb_method_toolButton->setEnabled(false); } -void PreferencesDialog::on_TK_toolButton_clicked() -{ +void PreferencesDialog::on_TK_toolButton_clicked() { m_Ui->TK_horizontalSlider->setValue(6500); m_Ui->TK_spinBox->setValue(6500); m_Ui->TK_toolButton->setEnabled(false); } -void PreferencesDialog::on_highlights_toolButton_clicked() -{ +void PreferencesDialog::on_highlights_toolButton_clicked() { m_Ui->highlights_comboBox->setCurrentIndex(0); m_Ui->highlights_toolButton->setEnabled(false); } -void PreferencesDialog::on_level_toolButton_clicked() -{ +void PreferencesDialog::on_level_toolButton_clicked() { m_Ui->level_horizontalSlider->setValue(0); m_Ui->level_spinBox->setValue(0); m_Ui->level_toolButton->setEnabled(false); } -void PreferencesDialog::on_brightness_toolButton_clicked() -{ +void PreferencesDialog::on_brightness_toolButton_clicked() { m_Ui->brightness_horizontalSlider->setValue(10); m_Ui->brightness_doubleSpinBox->setValue(1.0); m_Ui->brightness_toolButton->setEnabled(false); } -void PreferencesDialog::on_user_black_toolButton_clicked() -{ +void PreferencesDialog::on_user_black_toolButton_clicked() { m_Ui->user_black_horizontalSlider->setValue(0); m_Ui->user_black_spinBox->setValue(0); m_Ui->user_black_toolButton->setEnabled(false); } -void PreferencesDialog::on_user_sat_toolButton_clicked() -{ +void PreferencesDialog::on_user_sat_toolButton_clicked() { m_Ui->user_sat_horizontalSlider->setValue(20000); m_Ui->user_sat_spinBox->setValue(20000); m_Ui->user_sat_toolButton->setEnabled(false); } -void PreferencesDialog::on_threshold_toolButton_clicked() -{ +void PreferencesDialog::on_threshold_toolButton_clicked() { m_Ui->use_noise_CB->setChecked(true); m_Ui->threshold_horizontalSlider->setValue(100); m_Ui->threshold_spinBox->setValue(100); m_Ui->threshold_toolButton->setEnabled(false); } -void PreferencesDialog::on_red_toolButton_clicked() -{ +void PreferencesDialog::on_red_toolButton_clicked() { int minpos = m_Ui->red_horizontalSlider->minimum(); int maxpos = m_Ui->red_horizontalSlider->maximum(); double minv = m_Ui->red_doubleSpinBox->minimum(); double maxv = m_Ui->red_doubleSpinBox->maximum(); - m_Ui->red_horizontalSlider->setValue( value2pos(1.0, minpos, maxpos, minv, maxv) ); + m_Ui->red_horizontalSlider->setValue( + value2pos(1.0, minpos, maxpos, minv, maxv)); m_Ui->red_doubleSpinBox->setValue(1.0); m_Ui->red_toolButton->setEnabled(false); } -void PreferencesDialog::on_blue_toolButton_clicked() -{ +void PreferencesDialog::on_blue_toolButton_clicked() { int minpos = m_Ui->blue_horizontalSlider->minimum(); int maxpos = m_Ui->blue_horizontalSlider->maximum(); double minv = m_Ui->blue_doubleSpinBox->minimum(); double maxv = m_Ui->blue_doubleSpinBox->maximum(); - m_Ui->blue_horizontalSlider->setValue( value2pos(1.0, minpos, maxpos, minv, maxv) ); + m_Ui->blue_horizontalSlider->setValue( + value2pos(1.0, minpos, maxpos, minv, maxv)); m_Ui->blue_doubleSpinBox->setValue(1.0); m_Ui->blue_toolButton->setEnabled(false); } -void PreferencesDialog::on_green_toolButton_clicked() -{ +void PreferencesDialog::on_green_toolButton_clicked() { int minpos = m_Ui->green_horizontalSlider->minimum(); int maxpos = m_Ui->green_horizontalSlider->maximum(); double minv = m_Ui->green_doubleSpinBox->minimum(); double maxv = m_Ui->green_doubleSpinBox->maximum(); - m_Ui->green_horizontalSlider->setValue( value2pos(1.0, minpos, maxpos, minv, maxv) ); + m_Ui->green_horizontalSlider->setValue( + value2pos(1.0, minpos, maxpos, minv, maxv)); m_Ui->green_doubleSpinBox->setValue(1.0); m_Ui->green_toolButton->setEnabled(false); } -void PreferencesDialog::toolButton_clicked(int index) -{ - QObject* tabEntries[] = { - m_Ui->toolButtonInterface, - m_Ui->toolButtonQueue, - m_Ui->toolButtonTM, - m_Ui->toolButtonRAW, - m_Ui->toolButtonCMS, - m_Ui->toolButtonExtTool - }; +void PreferencesDialog::toolButton_clicked(int index) { + QObject *tabEntries[] = { + m_Ui->toolButtonInterface, m_Ui->toolButtonQueue, + m_Ui->toolButtonTM, m_Ui->toolButtonRAW, + m_Ui->toolButtonCMS, m_Ui->toolButtonExtTool}; m_Ui->stackedPagesWidget->setCurrentIndex(index); QToolButton *tb = dynamic_cast(tabEntries[index]); tb->setFocus(); } -void PreferencesDialog::from_options_to_gui() -{ +void PreferencesDialog::from_options_to_gui() { LuminanceOptions luminance_options; - //language: if by any chance luminance_options.gui_lang does NOT contain one of the valid 2 chars - //codes which are key for the fromIso639ToGuiIndex QMap, provide the default "en" - if (!fromIso639ToGuiIndex.contains(luminance_options.getGuiLang())) - { - luminance_options.setGuiLang("en"); + // language: if by any chance luminance_options.gui_lang does NOT contain + // one + // of the valid 2 chars + // codes which are key for the fromIso639ToGuiIndex QMap, provide the + // default + // "en" + if (!fromIso639ToGuiIndex.contains(luminance_options.getGuiLang())) { + luminance_options.setGuiLang(QStringLiteral("en")); } - m_Ui->languageComboBox->setCurrentIndex(fromIso639ToGuiIndex.value(luminance_options.getGuiLang())); + m_Ui->languageComboBox->setCurrentIndex( + fromIso639ToGuiIndex.value(luminance_options.getGuiLang())); m_Ui->themeComboBox->setCurrentText(luminance_options.getGuiTheme()); m_Ui->chkDarkMode->setChecked(luminance_options.isGuiDarkMode()); // Temp directory m_Ui->lineEditTempPath->setText(luminance_options.getTempDir()); + m_Ui->numThreadspinBox->setValue(luminance_options.getBatchTmNumThreads()); - m_Ui->numThreadspinBox->setValue( luminance_options.getBatchTmNumThreads() ); - - m_Ui->aisParamsLineEdit->setText( luminance_options.getAlignImageStackOptions().join(" ") ); + m_Ui->aisParamsLineEdit->setText( + luminance_options.getAlignImageStackOptions().join( + QStringLiteral(" "))); - m_Ui->previewsWidthSpinBox->setValue( luminance_options.getPreviewWidth() ); + m_Ui->previewsWidthSpinBox->setValue(luminance_options.getPreviewWidth()); - m_Ui->checkBoxTMOWindowsPreviewPanel->setChecked(luminance_options.isPreviewPanelActive()); + m_Ui->checkBoxTMOWindowsPreviewPanel->setChecked( + luminance_options.isPreviewPanelActive()); m_Ui->chkPortableMode->setChecked(LuminanceOptions::isCurrentPortableMode); - QFile file(QDir(QApplication::applicationDirPath()).filePath(".write")); + QFile file(QDir(QApplication::applicationDirPath()) + .filePath(QStringLiteral(".write"))); bool dirWritable = file.open(QIODevice::ReadWrite); - if (dirWritable) - file.remove(); + if (dirWritable) file.remove(); m_Ui->chkPortableMode->setEnabled(dirWritable); // RAW Processing m_Ui->four_color_rgb_CB->setChecked(luminance_options.isRawFourColorRGB()); - m_Ui->do_not_use_fuji_rotate_CB->setChecked(luminance_options.isRawDoNotUseFujiRotate()); + m_Ui->do_not_use_fuji_rotate_CB->setChecked( + luminance_options.isRawDoNotUseFujiRotate()); #ifdef DEMOSAICING_GPL2 bool GPL2 = true; @@ -640,39 +614,51 @@ int user_quality = luminance_options.getRawUserQuality(); if (user_quality < 4) - m_Ui->user_qual_comboBox->setCurrentIndex( user_quality ); - else if ((GPL2 && GPL3) || (GPL2 && !GPL3)) // We have both demosaicing packs or only GPL2 - m_Ui->user_qual_comboBox->setCurrentIndex( user_quality ); - else // We have only GPL3 - m_Ui->user_qual_comboBox->setCurrentIndex( 4 ); - - m_Ui->user_qual_comboBox->setCurrentIndex(luminance_options.getRawUserQuality()); - m_Ui->med_passes_horizontalSlider->setValue(luminance_options.getRawMedPasses()); + m_Ui->user_qual_comboBox->setCurrentIndex(user_quality); + else if ((GPL2 && GPL3) || + (GPL2 && !GPL3)) // We have both demosaicing packs or only GPL2 + m_Ui->user_qual_comboBox->setCurrentIndex(user_quality); + else // We have only GPL3 + m_Ui->user_qual_comboBox->setCurrentIndex(4); + + m_Ui->user_qual_comboBox->setCurrentIndex( + luminance_options.getRawUserQuality()); + m_Ui->med_passes_horizontalSlider->setValue( + luminance_options.getRawMedPasses()); m_Ui->med_passes_spinBox->setValue(luminance_options.getRawMedPasses()); - m_Ui->wb_method_comboBox->setCurrentIndex(luminance_options.getRawWhiteBalanceMethod()); + m_Ui->wb_method_comboBox->setCurrentIndex( + luminance_options.getRawWhiteBalanceMethod()); - m_Ui->TK_horizontalSlider->setValue(luminance_options.getRawTemperatureKelvin()); + m_Ui->TK_horizontalSlider->setValue( + luminance_options.getRawTemperatureKelvin()); m_Ui->TK_spinBox->setValue(luminance_options.getRawTemperatureKelvin()); - m_Ui->highlights_comboBox->setCurrentIndex(luminance_options.getRawHighlightsMode()); + m_Ui->highlights_comboBox->setCurrentIndex( + luminance_options.getRawHighlightsMode()); m_Ui->level_horizontalSlider->setValue(luminance_options.getRawLevel()); m_Ui->level_spinBox->setValue(luminance_options.getRawLevel()); - //m_Ui->false_colors_CB->setChecked(luminance_options.false_colors); + // m_Ui->false_colors_CB->setChecked(luminance_options.false_colors); m_Ui->auto_bright_CB->setChecked(luminance_options.isRawAutoBrightness()); - m_Ui->brightness_horizontalSlider->setValue((int) 10.0*luminance_options.getRawBrightness()); - m_Ui->brightness_doubleSpinBox->setValue(luminance_options.getRawBrightness()); + m_Ui->brightness_horizontalSlider->setValue( + (int)10.0 * luminance_options.getRawBrightness()); + m_Ui->brightness_doubleSpinBox->setValue( + luminance_options.getRawBrightness()); m_Ui->use_black_CB->setChecked(luminance_options.isRawUseBlack()); - m_Ui->user_black_horizontalSlider->setValue(luminance_options.getRawUserBlack()); + m_Ui->user_black_horizontalSlider->setValue( + luminance_options.getRawUserBlack()); m_Ui->user_black_spinBox->setValue(luminance_options.getRawUserBlack()); m_Ui->use_sat_CB->setChecked(luminance_options.isRawUseSaturation()); - m_Ui->user_sat_horizontalSlider->setValue(luminance_options.getRawUserSaturation()); + m_Ui->user_sat_horizontalSlider->setValue( + luminance_options.getRawUserSaturation()); m_Ui->user_sat_spinBox->setValue(luminance_options.getRawUserSaturation()); m_Ui->use_noise_CB->setChecked(luminance_options.isRawUseNoiseReduction()); - m_Ui->threshold_horizontalSlider->setValue( luminance_options.getRawNoiseReductionThreshold() ); - m_Ui->threshold_spinBox->setValue( luminance_options.getRawNoiseReductionThreshold() ); - m_Ui->use_chroma_CB->setChecked( luminance_options.isRawUseChromaAber() ); + m_Ui->threshold_horizontalSlider->setValue( + luminance_options.getRawNoiseReductionThreshold()); + m_Ui->threshold_spinBox->setValue( + luminance_options.getRawNoiseReductionThreshold()); + m_Ui->use_chroma_CB->setChecked(luminance_options.isRawUseChromaAber()); double r_minv = m_Ui->red_doubleSpinBox->minimum(); double r_maxv = m_Ui->red_doubleSpinBox->maximum(); @@ -687,100 +673,98 @@ double g_minpos = m_Ui->green_horizontalSlider->minimum(); double g_maxpos = m_Ui->green_horizontalSlider->maximum(); - m_Ui->red_horizontalSlider->setValue(value2pos(luminance_options.getRawAber0(), r_minpos, r_maxpos, r_minv, r_maxv)); + m_Ui->red_horizontalSlider->setValue(value2pos( + luminance_options.getRawAber0(), r_minpos, r_maxpos, r_minv, r_maxv)); m_Ui->red_doubleSpinBox->setValue(luminance_options.getRawAber0()); - m_Ui->blue_horizontalSlider->setValue(value2pos(luminance_options.getRawAber2(), b_minpos, b_maxpos, b_minv, b_maxv)); + m_Ui->blue_horizontalSlider->setValue(value2pos( + luminance_options.getRawAber2(), b_minpos, b_maxpos, b_minv, b_maxv)); m_Ui->blue_doubleSpinBox->setValue(luminance_options.getRawAber2()); - m_Ui->green_horizontalSlider->setValue(value2pos(luminance_options.getRawGreen(), g_minpos, g_maxpos, g_minv, g_maxv)); + m_Ui->green_horizontalSlider->setValue(value2pos( + luminance_options.getRawGreen(), g_minpos, g_maxpos, g_minv, g_maxv)); m_Ui->green_doubleSpinBox->setValue(luminance_options.getRawGreen()); - m_Ui->user_qual_toolButton->setEnabled( luminance_options.value(KEY_USER_QUAL_TOOLBUTTON).toBool()); - m_Ui->med_passes_toolButton->setEnabled( luminance_options.value(KEY_MED_PASSES_TOOLBUTTON).toBool()); - m_Ui->wb_method_toolButton->setEnabled( luminance_options.value(KEY_WB_METHOD_TOOLBUTTON).toBool()); - m_Ui->TK_toolButton->setEnabled( luminance_options.value(KEY_TK_TOOLBUTTON).toBool()); - m_Ui->highlights_toolButton->setEnabled( luminance_options.value(KEY_HIGHLIGHTS_TOOLBUTTON).toBool()); - m_Ui->level_toolButton->setEnabled( luminance_options.value(KEY_LEVEL_TOOLBUTTON).toBool()); - m_Ui->brightness_toolButton->setEnabled( luminance_options.value(KEY_BRIGHTNESS_TOOLBUTTON).toBool()); - m_Ui->user_black_toolButton->setEnabled( luminance_options.value(KEY_USER_BLACK_TOOLBUTTON).toBool()); - m_Ui->user_sat_toolButton->setEnabled( luminance_options.value(KEY_USER_SAT_TOOLBUTTON).toBool()); - m_Ui->threshold_toolButton->setEnabled( luminance_options.value(KEY_THRESHOLD_TOOLBUTTON).toBool()); - m_Ui->red_toolButton->setEnabled( luminance_options.value(KEY_RED_TOOLBUTTON).toBool()); - m_Ui->blue_toolButton->setEnabled( luminance_options.value(KEY_BLUE_TOOLBUTTON).toBool()); - m_Ui->green_toolButton->setEnabled( luminance_options.value(KEY_GREEN_TOOLBUTTON).toBool()); - - m_Ui->camera_lineEdit->setText( luminance_options.getCameraProfileFileName() ); - m_Ui->monitor_lineEdit->setText( luminance_options.getMonitorProfileFileName() ); - m_Ui->printer_lineEdit->setText( luminance_options.getPrinterProfileFileName() ); - - m_Ui->exportDirectoryEdit->setText( luminance_options.getExportDir() ); - m_formatHelper.loadFromSettings(luminance_options, KEY_FILEFORMAT_QUEUE); -} - -void PreferencesDialog::on_chooseCachePathButton_clicked() -{ - QString dir = QFileDialog::getExistingDirectory(this, - tr("Choose a directory"), - QDir::currentPath(), - QFileDialog::ShowDirsOnly|QFileDialog::DontResolveSymlinks - ); - if (!dir.isEmpty()) - { + m_Ui->user_qual_toolButton->setEnabled( + luminance_options.value(KEY_USER_QUAL_TOOLBUTTON).toBool()); + m_Ui->med_passes_toolButton->setEnabled( + luminance_options.value(KEY_MED_PASSES_TOOLBUTTON).toBool()); + m_Ui->wb_method_toolButton->setEnabled( + luminance_options.value(KEY_WB_METHOD_TOOLBUTTON).toBool()); + m_Ui->TK_toolButton->setEnabled( + luminance_options.value(KEY_TK_TOOLBUTTON).toBool()); + m_Ui->highlights_toolButton->setEnabled( + luminance_options.value(KEY_HIGHLIGHTS_TOOLBUTTON).toBool()); + m_Ui->level_toolButton->setEnabled( + luminance_options.value(KEY_LEVEL_TOOLBUTTON).toBool()); + m_Ui->brightness_toolButton->setEnabled( + luminance_options.value(KEY_BRIGHTNESS_TOOLBUTTON).toBool()); + m_Ui->user_black_toolButton->setEnabled( + luminance_options.value(KEY_USER_BLACK_TOOLBUTTON).toBool()); + m_Ui->user_sat_toolButton->setEnabled( + luminance_options.value(KEY_USER_SAT_TOOLBUTTON).toBool()); + m_Ui->threshold_toolButton->setEnabled( + luminance_options.value(KEY_THRESHOLD_TOOLBUTTON).toBool()); + m_Ui->red_toolButton->setEnabled( + luminance_options.value(KEY_RED_TOOLBUTTON).toBool()); + m_Ui->blue_toolButton->setEnabled( + luminance_options.value(KEY_BLUE_TOOLBUTTON).toBool()); + m_Ui->green_toolButton->setEnabled( + luminance_options.value(KEY_GREEN_TOOLBUTTON).toBool()); + + m_Ui->camera_lineEdit->setText( + luminance_options.getCameraProfileFileName()); + m_Ui->monitor_lineEdit->setText( + luminance_options.getMonitorProfileFileName()); + m_Ui->printer_lineEdit->setText( + luminance_options.getPrinterProfileFileName()); + + m_Ui->exportDirectoryEdit->setText(luminance_options.getExportDir()); + m_formatHelper.loadFromSettings(KEY_FILEFORMAT_QUEUE); +} + +void PreferencesDialog::on_chooseCachePathButton_clicked() { + QString dir = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), QDir::currentPath(), + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + if (!dir.isEmpty()) { m_Ui->lineEditTempPath->setText(dir); } } -void PreferencesDialog::enterWhatsThis() -{ - QWhatsThis::enterWhatsThisMode(); -} +void PreferencesDialog::enterWhatsThis() { QWhatsThis::enterWhatsThisMode(); } -void PreferencesDialog::on_camera_toolButton_clicked() -{ +void PreferencesDialog::on_camera_toolButton_clicked() { openColorProfile(m_Ui->camera_lineEdit); } -void PreferencesDialog::on_monitor_toolButton_clicked() -{ +void PreferencesDialog::on_monitor_toolButton_clicked() { openColorProfile(m_Ui->monitor_lineEdit); } -void PreferencesDialog::on_printer_toolButton_clicked() -{ +void PreferencesDialog::on_printer_toolButton_clicked() { openColorProfile(m_Ui->printer_lineEdit); } -void PreferencesDialog::openColorProfile(QLineEdit* lineEdit) -{ - QString fileName = QFileDialog::getOpenFileName(this, tr("Open ICC Profile"), - ICC_PATH, - tr("Color profile (*.icc *.ICC *.icm *.ICM)") - ); - if (!fileName.isEmpty()) - lineEdit->setText(fileName); -} - -void PreferencesDialog::on_exportFileButton_clicked() -{ - QString dir = QFileDialog::getExistingDirectory(this, - tr("Choose a directory"), - QDir::homePath(), - QFileDialog::ShowDirsOnly|QFileDialog::DontResolveSymlinks - ); - if (!dir.isEmpty()) - { +void PreferencesDialog::openColorProfile(QLineEdit *lineEdit) { + QString fileName = QFileDialog::getOpenFileName( + this, tr("Open ICC Profile"), ICC_PATH, + tr("Color profile (*.icc *.ICC *.icm *.ICM)")); + if (!fileName.isEmpty()) lineEdit->setText(fileName); +} + +void PreferencesDialog::on_exportFileButton_clicked() { + QString dir = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), QDir::homePath(), + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + if (!dir.isEmpty()) { m_Ui->exportDirectoryEdit->setText(dir); } } -void PreferencesDialog::on_themeChanged() -{ - if (m_Ui->themeComboBox->currentText() == "Macintosh") - { +void PreferencesDialog::on_themeChanged() { + if (m_Ui->themeComboBox->currentText() == QLatin1String("Macintosh")) { m_Ui->chkDarkMode->setCheckState(Qt::Unchecked); m_Ui->chkDarkMode->setDisabled(true); - } - else - { + } else { m_Ui->chkDarkMode->setEnabled(true); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.h luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.h --- luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,41 +25,39 @@ #define OPTIONS_IMPL_H #include -#include #include +#include #include #include "LibpfsAdditions/formathelper.h" -namespace Ui -{ - class PreferencesDialog; +namespace Ui { +class PreferencesDialog; } -class PreferencesDialog : public QDialog -{ +class PreferencesDialog : public QDialog { Q_OBJECT -private: + private: QScopedPointer m_Ui; -public: + public: PreferencesDialog(QWidget *parent, int tab = 0); ~PreferencesDialog(); -private: + + private: void from_options_to_gui(); QColor infnancolor, negcolor; QMap fromIso639ToGuiIndex; QMap fromGuiIndexToIso639; - QSignalMapper* toolButtonMapper; + QSignalMapper *toolButtonMapper; pfsadditions::FormatHelper m_formatHelper; + protected: + virtual void changeEvent(QEvent *event); -protected: - virtual void changeEvent(QEvent* event); - -private Q_SLOTS: + private Q_SLOTS: void on_okButton_clicked(); void on_cancelButton_clicked(); void on_chooseCachePathButton_clicked(); @@ -109,7 +107,7 @@ void toolButton_clicked(int); - void openColorProfile(QLineEdit* lineEdit); + void openColorProfile(QLineEdit *lineEdit); void on_themeChanged(); }; diff -Nru luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.ui luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.ui --- luminance-hdr-2.5.1+dfsg/src/Preferences/PreferencesDialog.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Preferences/PreferencesDialog.ui 2019-06-09 19:18:38.000000000 +0000 @@ -813,7 +813,7 @@ - 0 + 1 @@ -1405,13 +1405,13 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highlights</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select here the highlight clipping method:</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Solid white</span>: clip all highlights to solid white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Unclip</span>: leave highlights unclipped in various shades of pink</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Blend</span>: Blend clipped and unclipped values together for a gradual fade to white</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rebuild</span>: reconstruct highlights using a level value</p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Highlights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt;">Select here the highlight clipping method:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Solid White</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: clip all highlights to solid white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Do not transform</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: leave highlights unclipped in various shades of pink</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Blend</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: Blend clipped and unclipped values together for a gradual fade to white</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600;">Reconstruct</span><span style=" font-family:'Sans Serif'; font-size:10pt;">: reconstruct highlights using a level value</span></p></body></html>
diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewPanel/CMakeLists.txt luminance-hdr-2.6.0/src/PreviewPanel/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/PreviewPanel/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewPanel/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -9,8 +9,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(previewpanel ${FILES_H} ${FILES_CPP} ${FILES_MOC}) -qt5_use_modules(previewpanel Core Concurrent Gui Widgets) +ADD_LIBRARY(previewpanel STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC}) +TARGET_LINK_LIBRARIES(previewpanel Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} previewpanel PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewLabel.cpp luminance-hdr-2.6.0/src/PreviewPanel/PreviewLabel.cpp --- luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewLabel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewPanel/PreviewLabel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,62 +25,44 @@ #include "PreviewLabel.h" -PreviewLabel::PreviewLabel(QWidget *parent, TMOperator tm_operator): - QLabel(parent), - m_TMOptions(new TonemappingOptions), - m_index(-1), - m_isFromPanel(true) -{ +PreviewLabel::PreviewLabel(QWidget *parent, TMOperator tm_operator) + : QLabel(parent), + m_TMOptions(new TonemappingOptions), + m_index(-1), + m_isFromPanel(true) { m_TMOptions->tmoperator = tm_operator; } -PreviewLabel::PreviewLabel(QWidget *parent, TonemappingOptions *tonemappingOptions, int index): - QLabel(parent), - m_TMOptions(tonemappingOptions), - m_index(index), - m_isFromPanel(false) -{ -} +PreviewLabel::PreviewLabel(QWidget *parent, + TonemappingOptions *tonemappingOptions, int index) + : QLabel(parent), + m_TMOptions(tonemappingOptions), + m_index(index), + m_isFromPanel(false) {} -PreviewLabel::~PreviewLabel() -{ - delete m_TMOptions; -} +PreviewLabel::~PreviewLabel() { delete m_TMOptions; } -void PreviewLabel::mousePressEvent(QMouseEvent *event) -{ +void PreviewLabel::mousePressEvent(QMouseEvent *event) { if (event->buttons() == Qt::LeftButton) { (m_isFromPanel) ? emit clicked(m_TMOptions) : emit clicked(m_index); - } - else if (event->buttons() == Qt::RightButton) { + } else if (event->buttons() == Qt::RightButton) { QMenu menu(this); menu.addActions(actions()); menu.exec(event->globalPos()); } } -void PreviewLabel::mouseDoubleClickEvent(QMouseEvent *event) -{ +void PreviewLabel::mouseDoubleClickEvent(QMouseEvent *event) { emit clicked(m_TMOptions); } -void PreviewLabel::assignNewQImage(QSharedPointer new_qimage) -{ - setPixmap( QPixmap::fromImage(*new_qimage) ); +void PreviewLabel::assignNewQImage(QSharedPointer new_qimage) { + setPixmap(QPixmap::fromImage(*new_qimage)); adjustSize(); } -void PreviewLabel::setComment(QString comment) -{ - m_comment = comment; -} +void PreviewLabel::setComment(QString comment) { m_comment = comment; } -QString PreviewLabel::getComment() -{ - return m_comment; -} +QString PreviewLabel::getComment() { return m_comment; } -void PreviewLabel::setIndex(int index) -{ - m_index = index; -} +void PreviewLabel::setIndex(int index) { m_index = index; } diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewLabel.h luminance-hdr-2.6.0/src/PreviewPanel/PreviewLabel.h --- luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewLabel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewPanel/PreviewLabel.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,54 +24,51 @@ #ifndef PREVIEWLABEL_IMPL_H #define PREVIEWLABEL_IMPL_H +#include #include #include -#include #include "Core/TonemappingOptions.h" -class PreviewLabel : public QLabel -{ +class PreviewLabel : public QLabel { Q_OBJECT -public: + public: PreviewLabel(QWidget *parent = 0, TMOperator tm_operator = mantiuk06); - PreviewLabel(QWidget *parent = 0, TonemappingOptions *tonemappingOptions = 0, int index = -1); + PreviewLabel(QWidget *parent = 0, + TonemappingOptions *tonemappingOptions = 0, int index = -1); ~PreviewLabel(); void setTonemappingOptions(TonemappingOptions *); - TonemappingOptions* getTonemappingOptions(); + TonemappingOptions *getTonemappingOptions(); void setComment(QString); QString getComment(); void setIndex(int); -public Q_SLOTS: + public Q_SLOTS: void assignNewQImage(QSharedPointer new_qimage); -protected: + protected: void mousePressEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); -signals: - void clicked(TonemappingOptions*); + signals: + void clicked(TonemappingOptions *); void clicked(int); -private: - TonemappingOptions* m_TMOptions; + private: + TonemappingOptions *m_TMOptions; int m_index; QString m_comment; bool m_isFromPanel; }; -inline TonemappingOptions* PreviewLabel::getTonemappingOptions() -{ +inline TonemappingOptions *PreviewLabel::getTonemappingOptions() { return m_TMOptions; } -inline void PreviewLabel::setTonemappingOptions(TonemappingOptions *tmopts) -{ - if (m_TMOptions) - delete m_TMOptions; +inline void PreviewLabel::setTonemappingOptions(TonemappingOptions *tmopts) { + if (m_TMOptions) delete m_TMOptions; m_TMOptions = new TonemappingOptions(*tmopts); } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewPanel.cpp luminance-hdr-2.6.0/src/PreviewPanel/PreviewPanel.cpp --- luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewPanel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewPanel/PreviewPanel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,15 +22,15 @@ */ #include -#include #include +#include #include "PreviewPanel.h" #include "Libpfs/frame.h" #include "Libpfs/manip/copy.h" -#include "Libpfs/manip/resize.h" #include "Libpfs/manip/gamma_levels.h" +#include "Libpfs/manip/resize.h" #include "Core/TMWorker.h" #include "Libpfs/tm/TonemapOperator.h" @@ -38,201 +38,289 @@ #include "Fileformat/pfsoutldrimage.h" #include "PreviewPanel/PreviewLabel.h" -#include "Common/LuminanceOptions.h" #include "Common/CommonFunctions.h" +#include "Common/LuminanceOptions.h" #include "UI/FlowLayout.h" -namespace // anoymous namespace +namespace // anoymous namespace { const int PREVIEW_WIDTH = 120; const int PREVIEW_HEIGHT = 100; -//! \note It is not the most efficient way to do this thing, but I will fix it later +//! \note It is not the most efficient way to do this thing, but I will fix it +//! later //! this function get calls multiple time -void resetTonemappingOptions(TonemappingOptions* tm_options, const pfs::Frame* frame) -{ - tm_options->origxsize = frame->getWidth(); - tm_options->xsize = frame->getWidth(); - //tm_options->pregamma = 1.0f; //TODO check this - tm_options->tonemapSelection = false; +void resetTonemappingOptions(TonemappingOptions *tm_options, + const pfs::Frame *frame) { + tm_options->origxsize = frame->getWidth(); + tm_options->xsize = frame->getWidth(); + tm_options->tonemapSelection = false; } -class PreviewLabelUpdater -{ -public: - explicit PreviewLabelUpdater(QSharedPointer reference_frame): - m_doAutolevels(false), - m_autolevelThreshold(0.985f), - m_ReferenceFrame(reference_frame) - {} - - void setAutolevels(bool al, float th) { m_doAutolevels = al; m_autolevelThreshold = th; } +class PreviewLabelUpdater { + public: + explicit PreviewLabelUpdater(QSharedPointer reference_frame) + : m_doAutolevels(false), + m_autolevelThreshold(0.985f), + m_ReferenceFrame(reference_frame) {} + + void setAutolevels(bool al, float th) { + m_doAutolevels = al; + m_autolevelThreshold = th; + } //! \brief QRunnable::run() definition - //! \caption I use shared pointer in this function, so I don't have to worry about memory allocation + //! \caption I use shared pointer in this function, so I don't have to worry + //! about memory allocation //! in case something wrong happens, it shouldn't leak - void operator()(PreviewLabel* to_update) - { + void operator()(PreviewLabel *to_update) { #ifdef QT_DEBUG - //qDebug() << QThread::currentThread() << "running..."; +// qDebug() << QThread::currentThread() << "running..."; #endif // retrieve TM parameters - TonemappingOptions* tm_options = to_update->getTonemappingOptions(); + TonemappingOptions *tm_options = to_update->getTonemappingOptions(); resetTonemappingOptions(tm_options, m_ReferenceFrame.data()); - if ( m_ReferenceFrame.isNull() ) - { + if (m_ReferenceFrame.isNull()) { #ifdef QT_DEBUG - qDebug() << "operator()() for TM" << static_cast(tm_options->tmoperator) << " received a NULL pointer"; + qDebug() << "operator()() for TM" + << static_cast(tm_options->tmoperator) + << " received a NULL pointer"; return; #endif } // Copy Reference Frame - QSharedPointer temp_frame( pfs::copy(m_ReferenceFrame.data()) ); + QSharedPointer temp_frame( + pfs::copy(m_ReferenceFrame.data())); // Tone Mapping - //QScopedPointer tm_operator( TonemapOperator::getTonemapOperator(tm_options->tmoperator)); - //tm_operator->tonemapFrame(temp_frame.data(), tm_options, fake_progress_helper); - - //try { //Since nothing here actually throws this isn't useful, i need to check if returned frame != NULL + // QScopedPointer tm_operator( + // TonemapOperator::getTonemapOperator(tm_options->tmoperator)); + // tm_operator->tonemapFrame(temp_frame.data(), tm_options, + // fake_progress_helper); + + // try { //Since nothing here actually throws this isn't useful, i need + // to + // check if returned frame != NULL QScopedPointer tmWorker(new TMWorker); - QSharedPointer frame (tmWorker->computeTonemap(temp_frame.data(), tm_options, BilinearInterp)); + QSharedPointer frame(tmWorker->computeTonemap( + temp_frame.data(), tm_options, BilinearInterp)); - if (!frame.isNull()) - { - // Create QImage from pfs::Frame into QSharedPointer, and I give it to the preview panel - //QSharedPointer qimage(fromLDRPFStoQImage(temp_frame.data())); + if (!frame.isNull()) { + // Create QImage from pfs::Frame into QSharedPointer, and I give it + // to the + // preview panel + // QSharedPointer + // qimage(fromLDRPFStoQImage(temp_frame.data())); if (m_doAutolevels) { - QSharedPointer temp_qimage(fromLDRPFStoQImage(frame.data())); + QSharedPointer temp_qimage( + fromLDRPFStoQImage(frame.data())); float minL, maxL, gammaL; - computeAutolevels(temp_qimage.data(), m_autolevelThreshold, minL, maxL, gammaL); + computeAutolevels(temp_qimage.data(), m_autolevelThreshold, + minL, maxL, gammaL); pfs::gammaAndLevels(frame.data(), minL, maxL, 0.f, 1.f, gammaL); } QSharedPointer qimage(fromLDRPFStoQImage(frame.data())); - //! \note I cannot use these 2 functions, because setPixmap must run in the GUI thread - //m_PreviewLabel->setPixmap( QPixmap::fromImage(*qimage) ); - //m_PreviewLabel->adjustSize(); + //! \note I cannot use these 2 functions, because setPixmap must run + //! in + //! the GUI thread + // m_PreviewLabel->setPixmap( QPixmap::fromImage(*qimage) ); + // m_PreviewLabel->adjustSize(); //! \note So I queue a SLOT request on the m_PreviewPanel - QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, + QMetaObject::invokeMethod(to_update, "assignNewQImage", + Qt::QueuedConnection, Q_ARG(QSharedPointer, qimage)); - } - else - { - QSharedPointer qimage(new QImage(PREVIEW_WIDTH, PREVIEW_HEIGHT, QImage::Format_ARGB32_Premultiplied)); - qimage->fill(QColor(255,0,0)); //TODO Tonemapping failed, let's show a RED preview... - QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, + } else { + QSharedPointer qimage( + new QImage(PREVIEW_WIDTH, PREVIEW_HEIGHT, + QImage::Format_ARGB32_Premultiplied)); + qimage->fill(QColor( + 255, 0, + 0)); // TODO Tonemapping failed, let's show a RED preview... + QMetaObject::invokeMethod(to_update, "assignNewQImage", + Qt::QueuedConnection, Q_ARG(QSharedPointer, qimage)); } - /* - } - catch (...) { - qDebug() << "PreviewLabelUpdater: caught exception"; - QSharedPointer qimage(new QImage); - QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, - Q_ARG(QSharedPointer, qimage)); - } - */ +/* +} +catch (...) { + qDebug() << "PreviewLabelUpdater: caught exception"; + QSharedPointer qimage(new QImage); + QMetaObject::invokeMethod(to_update, "assignNewQImage", +Qt::QueuedConnection, + Q_ARG(QSharedPointer, qimage)); +} +*/ #ifdef QT_DEBUG - //qDebug() << QThread::currentThread() << "done!"; +// qDebug() << QThread::currentThread() << "done!"; #endif } -private: + private: bool m_doAutolevels; float m_autolevelThreshold; QSharedPointer m_ReferenceFrame; }; - } -PreviewPanel::PreviewPanel(QWidget *parent): - QWidget(parent), - m_original_width_frame(0), - m_doAutolevels(false) -{ - //! \note I need to register the new object to pass this class as parameter inside invokeMethod() +PreviewPanel::PreviewPanel(QWidget *parent) + : QWidget(parent), m_original_width_frame(0), m_doAutolevels(false) { + //! \note I need to register the new object to pass this class as parameter + //! inside invokeMethod() //! see run() inside PreviewLabelUpdater - qRegisterMetaType< QSharedPointer >("QSharedPointer"); + qRegisterMetaType>("QSharedPointer"); - PreviewLabel * labelMantiuk06 = new PreviewLabel(this, mantiuk06); - labelMantiuk06->setText("Mantiuk '06"); - labelMantiuk06->setToolTip("Mantiuk '06"); + PreviewLabel *labelMantiuk06 = new PreviewLabel(this, mantiuk06); + labelMantiuk06->setText(QStringLiteral("Mantiuk '06")); + labelMantiuk06->setToolTip(QStringLiteral("Mantiuk '06")); labelMantiuk06->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelMantiuk06); - connect(labelMantiuk06, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelMantiuk08 = new PreviewLabel(this, mantiuk08); - labelMantiuk08->setText("Mantiuk '08"); - labelMantiuk08->setToolTip("Mantiuk '08"); + connect(labelMantiuk06, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelMantiuk08 = new PreviewLabel(this, mantiuk08); + labelMantiuk08->setText(QStringLiteral("Mantiuk '08")); + labelMantiuk08->setToolTip(QStringLiteral("Mantiuk '08")); labelMantiuk08->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelMantiuk08); - connect(labelMantiuk08, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelFattal = new PreviewLabel(this, fattal); - labelFattal->setText("Fattal"); - labelFattal->setToolTip("Fattal"); + connect(labelMantiuk08, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelFattal = new PreviewLabel(this, fattal); + labelFattal->setText(QStringLiteral("Fattal")); + labelFattal->setToolTip(QStringLiteral("Fattal")); labelFattal->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelFattal); - connect(labelFattal, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelFerradans = new PreviewLabel(this, ferradans); - labelFerradans->setText("Ferradans"); - labelFerradans->setToolTip("Ferradans"); + connect(labelFattal, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelFerradans = new PreviewLabel(this, ferradans); + labelFerradans->setText(QStringLiteral("Ferradans")); + labelFerradans->setToolTip(QStringLiteral("Ferradans")); labelFerradans->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelFerradans); - connect(labelFerradans, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelDrago = new PreviewLabel(this, drago); - labelDrago->setText("Drago"); - labelDrago->setToolTip("Drago"); + connect(labelFerradans, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelDrago = new PreviewLabel(this, drago); + labelDrago->setText(QStringLiteral("Drago")); + labelDrago->setToolTip(QStringLiteral("Drago")); labelDrago->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelDrago); - connect(labelDrago, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelDurand = new PreviewLabel(this, durand); - labelDurand->setText("Durand"); - labelDurand->setToolTip("Durand"); + connect(labelDrago, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelDurand = new PreviewLabel(this, durand); + labelDurand->setText(QStringLiteral("Durand")); + labelDurand->setToolTip(QStringLiteral("Durand")); labelDurand->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelDurand); - connect(labelDurand, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelReinhard02= new PreviewLabel(this, reinhard02); - labelReinhard02->setText("Reinhard '02"); - labelReinhard02->setToolTip("Reinhard '02"); + connect(labelDurand, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelReinhard02 = new PreviewLabel(this, reinhard02); + labelReinhard02->setText(QStringLiteral("Reinhard '02")); + labelReinhard02->setToolTip(QStringLiteral("Reinhard '02")); labelReinhard02->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelReinhard02); - connect(labelReinhard02, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelReinhard05 = new PreviewLabel(this, reinhard05); - labelReinhard05->setText("Reinhard '05"); - labelReinhard05->setToolTip("Reinhard '05"); + connect(labelReinhard02, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelReinhard05 = new PreviewLabel(this, reinhard05); + labelReinhard05->setText(QStringLiteral("Reinhard '05")); + labelReinhard05->setToolTip(QStringLiteral("Reinhard '05")); labelReinhard05->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelReinhard05); - connect(labelReinhard05, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelAshikhmin = new PreviewLabel(this, ashikhmin); - labelAshikhmin->setText("Ashikhmin"); - labelAshikhmin->setToolTip("Ashikhmin"); + connect(labelReinhard05, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelAshikhmin = new PreviewLabel(this, ashikhmin); + labelAshikhmin->setText(QStringLiteral("Ashikhmin")); + labelAshikhmin->setToolTip(QStringLiteral("Ashikhmin")); labelAshikhmin->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelAshikhmin); - connect(labelAshikhmin, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelPattanaik = new PreviewLabel(this, pattanaik); - labelPattanaik->setText("Pattanaik"); - labelPattanaik->setToolTip("Pattanaik"); + connect(labelAshikhmin, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelPattanaik = new PreviewLabel(this, pattanaik); + labelPattanaik->setText(QStringLiteral("Pattanaik")); + labelPattanaik->setToolTip(QStringLiteral("Pattanaik")); labelPattanaik->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelPattanaik); - connect(labelPattanaik, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - - PreviewLabel * labelMai = new PreviewLabel(this, mai); - labelMai->setText("Mai"); - labelMai->setToolTip("Mai"); + connect(labelPattanaik, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelMai = new PreviewLabel(this, mai); + labelMai->setText(QStringLiteral("Mai")); + labelMai->setToolTip(QStringLiteral("Mai")); labelMai->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelMai); - connect(labelMai, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); + connect(labelMai, static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelFerwerda = new PreviewLabel(this, ferwerda); + labelFerwerda->setText(QStringLiteral("Ferwerda")); + labelFerwerda->setToolTip(QStringLiteral("Ferwerda")); + labelFerwerda->setFrameStyle(QFrame::Box); + m_ListPreviewLabel.push_back(labelFerwerda); + connect(labelFerwerda, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelKimKautz = new PreviewLabel(this, kimkautz); + labelKimKautz->setText(QStringLiteral("KimKautz")); + labelKimKautz->setToolTip(QStringLiteral("KimKautz")); + labelKimKautz->setFrameStyle(QFrame::Box); + m_ListPreviewLabel.push_back(labelKimKautz); + connect(labelKimKautz, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelVanHateren = new PreviewLabel(this, vanhateren); + labelVanHateren->setText(QStringLiteral("VanHateren")); + labelVanHateren->setToolTip(QStringLiteral("VanHateren")); + labelVanHateren->setFrameStyle(QFrame::Box); + m_ListPreviewLabel.push_back(labelVanHateren); + connect(labelVanHateren, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); + + PreviewLabel *labelLischinski = new PreviewLabel(this, lischinski); + labelLischinski->setText(QStringLiteral("Lischinski")); + labelLischinski->setToolTip(QStringLiteral("Lischinski")); + labelLischinski->setFrameStyle(QFrame::Box); + m_ListPreviewLabel.push_back(labelLischinski); + connect(labelLischinski, + static_cast( + &PreviewLabel::clicked), + this, &PreviewPanel::tonemapPreview); FlowLayout *flowLayout = new FlowLayout; @@ -247,20 +335,22 @@ flowLayout->addWidget(labelAshikhmin); flowLayout->addWidget(labelPattanaik); flowLayout->addWidget(labelMai); + flowLayout->addWidget(labelFerwerda); + flowLayout->addWidget(labelKimKautz); + flowLayout->addWidget(labelVanHateren); + flowLayout->addWidget(labelLischinski); setLayout(flowLayout); } -PreviewPanel::~PreviewPanel() -{ +PreviewPanel::~PreviewPanel() { #ifdef QT_DEBUG qDebug() << "PreviewPanel::~PreviewPanel()"; #endif } -void PreviewPanel::updatePreviews(pfs::Frame* frame, int index) -{ - if ( frame == NULL ) return; +void PreviewPanel::updatePreviews(pfs::Frame *frame, int index) { + if (frame == NULL) return; m_original_width_frame = frame->getWidth(); @@ -268,34 +358,34 @@ int frame_height = frame->getHeight(); int resized_width = PREVIEW_WIDTH; - if (frame_height > frame_width) - { - float ratio = ((float)frame_width)/frame_height; - resized_width = PREVIEW_HEIGHT*ratio; + if (frame_height > frame_width) { + float ratio = ((float)frame_width) / frame_height; + resized_width = PREVIEW_HEIGHT * ratio; } // 1. make a resized copy - QSharedPointer current_frame( pfs::resize(frame, resized_width, BilinearInterp)); + QSharedPointer current_frame( + pfs::resize(frame, resized_width, BilinearInterp)); - // 2. (non concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() + // 2. (non concurrent) for each PreviewLabel, call + // PreviewLabelUpdater::operator() if (index == -1) { - foreach(PreviewLabel* current_label, m_ListPreviewLabel) - { + foreach (PreviewLabel *current_label, m_ListPreviewLabel) { PreviewLabelUpdater updater(current_frame); updater.setAutolevels(m_doAutolevels, m_autolevelThreshold); updater(current_label); } - } - else { + } else { PreviewLabelUpdater updater(current_frame); updater.setAutolevels(m_doAutolevels, m_autolevelThreshold); updater(m_ListPreviewLabel.at(index)); } - // 2. (concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() - //QtConcurrent::map (m_ListPreviewLabel, PreviewLabelUpdater(current_frame) ); + // 2. (concurrent) for each PreviewLabel, call + // PreviewLabelUpdater::operator() + // QtConcurrent::map (m_ListPreviewLabel, PreviewLabelUpdater(current_frame) + // ); } -void PreviewPanel::tonemapPreview(TonemappingOptions* opts) -{ +void PreviewPanel::tonemapPreview(TonemappingOptions *opts) { #ifdef QT_DEBUG qDebug() << "void PreviewPanel::tonemapPreview()"; #endif @@ -306,18 +396,15 @@ emit startTonemapping(opts); } -QSize PreviewPanel::getLabelSize() -{ +QSize PreviewPanel::getLabelSize() { return m_ListPreviewLabel.at(0)->pixmap()->size(); } -PreviewLabel *PreviewPanel::getLabel(int index) -{ +PreviewLabel *PreviewPanel::getLabel(int index) { return m_ListPreviewLabel.at(index); } -void PreviewPanel::setAutolevels(bool al, float th) -{ +void PreviewPanel::setAutolevels(bool al, float th) { #ifdef QT_DEBUG std::cout << "void PreviewPanel::setAutolevels(" << al << ")" << std::endl; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewPanel.h luminance-hdr-2.6.0/src/PreviewPanel/PreviewPanel.h --- luminance-hdr-2.5.1+dfsg/src/PreviewPanel/PreviewPanel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewPanel/PreviewPanel.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,40 +28,39 @@ // forward declaration namespace pfs { - class Frame; // #include "Libpfs/frame.h" +class Frame; // #include "Libpfs/frame.h" } namespace Ui { - class PreviewPanel; +class PreviewPanel; } -class TonemappingOptions; // #include "Core/TonemappingOptions.h" -class PreviewLabel; // #include "PreviewPanel/PreviewLabel.h" +class TonemappingOptions; // #include "Core/TonemappingOptions.h" +class PreviewLabel; // #include "PreviewPanel/PreviewLabel.h" -class PreviewPanel : public QWidget -{ +class PreviewPanel : public QWidget { Q_OBJECT -public: + public: explicit PreviewPanel(QWidget *parent = 0); ~PreviewPanel(); QSize getLabelSize(); PreviewLabel *getLabel(int); -public Q_SLOTS: - void updatePreviews(pfs::Frame* frame, int index = -1); + public Q_SLOTS: + void updatePreviews(pfs::Frame *frame, int index = -1); void setAutolevels(bool, float); -protected Q_SLOTS: - void tonemapPreview(TonemappingOptions*); + protected Q_SLOTS: + void tonemapPreview(TonemappingOptions *); -Q_SIGNALS: - void startTonemapping(TonemappingOptions*); + Q_SIGNALS: + void startTonemapping(TonemappingOptions *); -private: + private: int m_original_width_frame; bool m_doAutolevels; float m_autolevelThreshold; - QList m_ListPreviewLabel; + QVector m_ListPreviewLabel; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewSettings/CMakeLists.txt luminance-hdr-2.6.0/src/PreviewSettings/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/PreviewSettings/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewSettings/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -7,8 +7,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -ADD_LIBRARY(previewsettings ${FILES_H} ${FILES_CPP} ${FILES_MOC}) -qt5_use_modules(previewsettings Core Concurrent Gui Widgets) +ADD_LIBRARY(previewsettings STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC}) +TARGET_LINK_LIBRARIES(previewsettings Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} previewsettings PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewSettings/PreviewSettings.cpp luminance-hdr-2.6.0/src/PreviewSettings/PreviewSettings.cpp --- luminance-hdr-2.5.1+dfsg/src/PreviewSettings/PreviewSettings.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewSettings/PreviewSettings.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,64 +21,63 @@ * @author Franco Comida */ +#include #include -#include #include -#include +#include #include "PreviewSettings.h" #include "Libpfs/frame.h" -#include "Libpfs/manip/cut.h" #include "Libpfs/manip/copy.h" +#include "Libpfs/manip/cut.h" #include "Libpfs/manip/resize.h" #include "Libpfs/progress.h" #include "Libpfs/tm/TonemapOperator.h" +#include "Common/LuminanceOptions.h" #include "Core/TMWorker.h" #include "Fileformat/pfsoutldrimage.h" #include "PreviewPanel/PreviewLabel.h" -#include "Common/LuminanceOptions.h" -namespace // anoymous namespace +namespace // anoymous namespace { const int PREVIEW_WIDTH = 120; const int PREVIEW_HEIGHT = 100; -//! \note It is not the most efficient way to do this thing, but I will fix it later +//! \note It is not the most efficient way to do this thing, but I will fix it +//! later //! this function get calls multiple time -void resetTonemappingOptions(TonemappingOptions* tm_options, const pfs::Frame* frame) -{ - tm_options->origxsize = frame->getWidth(); - tm_options->xsize = frame->getWidth(); - tm_options->pregamma = 1.0f; - tm_options->tonemapSelection = false; +void resetTonemappingOptions(TonemappingOptions *tm_options, + const pfs::Frame *frame) { + tm_options->origxsize = frame->getWidth(); + tm_options->xsize = frame->getWidth(); + tm_options->tonemapSelection = false; } -class PreviewLabelUpdater -{ -public: - explicit PreviewLabelUpdater(QSharedPointer reference_frame): - m_ReferenceFrame(reference_frame) - {} +class PreviewLabelUpdater { + public: + explicit PreviewLabelUpdater(QSharedPointer reference_frame) + : m_ReferenceFrame(reference_frame) {} //! \brief QRunnable::run() definition - //! \caption I use shared pointer in this function, so I don't have to worry about memory allocation + //! \caption I use shared pointer in this function, so I don't have to worry + //! about memory allocation //! in case something wrong happens, it shouldn't leak - void operator()(PreviewLabel* to_update) - { + void operator()(PreviewLabel *to_update) { #ifdef QT_DEBUG - //qDebug() << QThread::currentThread() << "running..."; +// qDebug() << QThread::currentThread() << "running..."; #endif // retrieve TM parameters - TonemappingOptions* tm_options = to_update->getTonemappingOptions(); + TonemappingOptions *tm_options = to_update->getTonemappingOptions(); resetTonemappingOptions(tm_options, m_ReferenceFrame.data()); - if ( m_ReferenceFrame.isNull() ) - { + if (m_ReferenceFrame.isNull()) { #ifdef QT_DEBUG - qDebug() << "operator()() for TM" << static_cast(tm_options->tmoperator) << " received a NULL pointer"; + qDebug() << "operator()() for TM" + << static_cast(tm_options->tmoperator) + << " received a NULL pointer"; return; #endif } @@ -86,65 +85,67 @@ pfs::Progress fake_progress; // Copy Reference Frame - QSharedPointer temp_frame( pfs::copy(m_ReferenceFrame.data()) ); + QSharedPointer temp_frame( + pfs::copy(m_ReferenceFrame.data())); // Tone Mapping - QScopedPointer tm_operator( TonemapOperator::getTonemapOperator(tm_options->tmoperator)); + QScopedPointer tm_operator( + TonemapOperator::getTonemapOperator(tm_options->tmoperator)); tm_operator->tonemapFrame(*temp_frame, tm_options, fake_progress); - // Create QImage from pfs::Frame into QSharedPointer, and I give it to the preview panel + // Create QImage from pfs::Frame into QSharedPointer, and I give it to + // the + // preview panel QSharedPointer qimage(fromLDRPFStoQImage(temp_frame.data())); - //! \note I cannot use these 2 functions, because setPixmap must run in the GUI thread - //m_PreviewLabel->setPixmap( QPixmap::fromImage(*qimage) ); - //m_PreviewLabel->adjustSize(); + //! \note I cannot use these 2 functions, because setPixmap must run in + //! the + //! GUI thread + // m_PreviewLabel->setPixmap( QPixmap::fromImage(*qimage) ); + // m_PreviewLabel->adjustSize(); //! \note So I queue a SLOT request on the m_PreviewSettings - QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, + QMetaObject::invokeMethod(to_update, "assignNewQImage", + Qt::QueuedConnection, Q_ARG(QSharedPointer, qimage)); #ifdef QT_DEBUG - //qDebug() << QThread::currentThread() << "done!"; +// qDebug() << QThread::currentThread() << "done!"; #endif } -private: + private: QSharedPointer m_ReferenceFrame; }; - } -PreviewSettings::PreviewSettings(QWidget *parent): - QWidget(parent), - m_original_width_frame(0) -{ - //! \note I need to register the new object to pass this class as parameter inside invokeMethod() +PreviewSettings::PreviewSettings(QWidget *parent) + : QWidget(parent), m_original_width_frame(0) { + //! \note I need to register the new object to pass this class as parameter + //! inside invokeMethod() //! see run() inside PreviewLabelUpdater - qRegisterMetaType< QSharedPointer >("QSharedPointer"); + qRegisterMetaType>("QSharedPointer"); m_flowLayout = new FlowLayout; setLayout(m_flowLayout); } -PreviewSettings::~PreviewSettings() -{ +PreviewSettings::~PreviewSettings() { #ifdef QT_DEBUG qDebug() << "PreviewSettings::~PreviewSettings()"; #endif } -void PreviewSettings::changeEvent(QEvent *event) -{ +void PreviewSettings::changeEvent(QEvent *event) { if (event->type() == QEvent::LanguageChange) { - //m_Ui->retranslateUi(this); + // m_Ui->retranslateUi(this); } QWidget::changeEvent(event); } -void PreviewSettings::updatePreviews(pfs::Frame* frame) -{ - if ( frame == NULL ) return; +void PreviewSettings::updatePreviews(pfs::Frame *frame) { + if (frame == NULL) return; m_original_width_frame = frame->getWidth(); @@ -152,26 +153,27 @@ int frame_height = frame->getHeight(); int resized_width = PREVIEW_WIDTH; - if (frame_height > frame_width) - { - float ratio = ((float)frame_width)/frame_height; - resized_width = PREVIEW_HEIGHT*ratio; + if (frame_height > frame_width) { + float ratio = ((float)frame_width) / frame_height; + resized_width = PREVIEW_HEIGHT * ratio; } // 1. make a resized copy - QSharedPointer current_frame( pfs::resize(frame, resized_width, BilinearInterp) ); + QSharedPointer current_frame( + pfs::resize(frame, resized_width, BilinearInterp)); - // 2. (non concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() - foreach (PreviewLabel* current_label, m_ListPreviewLabel) - { + // 2. (non concurrent) for each PreviewLabel, call + // PreviewLabelUpdater::operator() + foreach (PreviewLabel *current_label, m_ListPreviewLabel) { PreviewLabelUpdater updater(current_frame); updater(current_label); } - // 2. (concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() - //QtConcurrent::map (m_ListPreviewLabel, PreviewLabelUpdater(current_frame) ); + // 2. (concurrent) for each PreviewLabel, call + // PreviewLabelUpdater::operator() + // QtConcurrent::map (m_ListPreviewLabel, PreviewLabelUpdater(current_frame) + // ); } -void PreviewSettings::tonemapPreview(TonemappingOptions* opts) -{ +void PreviewSettings::tonemapPreview(TonemappingOptions *opts) { #ifdef QT_DEBUG qDebug() << "void PreviewSettings::tonemapPreview()"; #endif @@ -182,20 +184,19 @@ emit startTonemapping(opts); } -QSize PreviewSettings::getLabelSize() -{ +QSize PreviewSettings::getLabelSize() { return m_ListPreviewLabel.at(0)->pixmap()->size(); } -void PreviewSettings::addPreviewLabel(PreviewLabel *label) -{ +void PreviewSettings::addPreviewLabel(PreviewLabel *label) { TonemappingOptions *opts = label->getTonemappingOptions(); - QString text = opts->getCaption(false, QString("\n")); + QString text = opts->getCaption(true, QStringLiteral("\n")); if (label->actions().isEmpty()) { - QAction* pAction = new QAction(tr("Load settings"), label); + QAction *pAction = new QAction(tr("Load settings"), label); label->addAction(pAction); - connect(pAction, SIGNAL(triggered()), this, SIGNAL(triggered())); + connect(pAction, &QAction::triggered, this, + &PreviewSettings::triggered); } label->setToolTip(text); @@ -213,7 +214,7 @@ } } -PreviewLabel * PreviewSettings::getPreviewLabel(int index) { +PreviewLabel *PreviewSettings::getPreviewLabel(int index) { QWidget *w = m_flowLayout->itemAt(index)->widget(); return static_cast(w); } diff -Nru luminance-hdr-2.5.1+dfsg/src/PreviewSettings/PreviewSettings.h luminance-hdr-2.6.0/src/PreviewSettings/PreviewSettings.h --- luminance-hdr-2.5.1+dfsg/src/PreviewSettings/PreviewSettings.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/PreviewSettings/PreviewSettings.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,17 +30,16 @@ // forward declaration namespace pfs { - class Frame; // #include "Libpfs/frame.h" +class Frame; // #include "Libpfs/frame.h" } -class TonemappingOptions; // #include "Core/TonemappingOptions.h" -class PreviewLabel; // #include "PreviewSettings/PreviewLabel.h" +class TonemappingOptions; // #include "Core/TonemappingOptions.h" +class PreviewLabel; // #include "PreviewSettings/PreviewLabel.h" -class PreviewSettings : public QWidget -{ +class PreviewSettings : public QWidget { Q_OBJECT -public: + public: explicit PreviewSettings(QWidget *parent = 0); ~PreviewSettings(); void addPreviewLabel(PreviewLabel *label); @@ -48,23 +47,24 @@ QSize getLabelSize(); int getSize() { return m_ListPreviewLabel.size(); } void clear(); -protected: - virtual void changeEvent(QEvent* event); -public Q_SLOTS: + protected: + virtual void changeEvent(QEvent *event); + + public Q_SLOTS: void selectLabel(int index); - void updatePreviews(pfs::Frame* frame); + void updatePreviews(pfs::Frame *frame); -protected Q_SLOTS: - void tonemapPreview(TonemappingOptions*); + protected Q_SLOTS: + void tonemapPreview(TonemappingOptions *); -Q_SIGNALS: - void startTonemapping(TonemappingOptions*); + Q_SIGNALS: + void startTonemapping(TonemappingOptions *); void triggered(); -private: + private: int m_original_width_frame; - QList m_ListPreviewLabel; + QList m_ListPreviewLabel; FlowLayout *m_flowLayout; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Projection/CMakeLists.txt luminance-hdr-2.6.0/src/Projection/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Projection/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Projection/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(projectionsdialog ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(projectionsdialog Concurrent Core Gui Widgets) +ADD_LIBRARY(projectionsdialog STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(projectionsdialog Qt5::Concurrent Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} projectionsdialog PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Projection/ProjectionsDialog.cpp luminance-hdr-2.6.0/src/Projection/ProjectionsDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/Projection/ProjectionsDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Projection/ProjectionsDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,33 +24,31 @@ #include #include -#include "ProjectionsDialog.h" -#include "ui_ProjectionsDialog.h" +#include "Projection/ProjectionsDialog.h" +#include "Projection/ui_ProjectionsDialog.h" #include "Libpfs/frame.h" #include "Libpfs/manip/projection.h" -static void worker(pfs::Frame *original, pfs::Frame *transformed, int xSize, int ySize, TransformInfo *transforminfo) -{ - const pfs::ChannelContainer& channels = original->getChannels(); +static void worker(pfs::Frame *original, pfs::Frame *transformed, int xSize, + int ySize, TransformInfo *transforminfo) { + const pfs::ChannelContainer &channels = original->getChannels(); for (pfs::ChannelContainer::const_iterator it = channels.begin(); - it != channels.end(); ++it) - { - pfs::Channel *newCh = transformed->createChannel( (*it)->getName() ); + it != channels.end(); ++it) { + pfs::Channel *newCh = transformed->createChannel((*it)->getName()); transformArray(*it, newCh, transforminfo); } - pfs::copyTags( original, transformed ); + pfs::copyTags(original, transformed); } -ProjectionsDialog::ProjectionsDialog(QWidget *parent,pfs::Frame *orig): - QDialog(parent), - original(orig), - transformed(NULL), - m_Ui(new Ui::ProjectionsDialog) -{ +ProjectionsDialog::ProjectionsDialog(QWidget *parent, pfs::Frame *orig) + : QDialog(parent), + original(orig), + transformed(NULL), + m_Ui(new Ui::ProjectionsDialog) { m_Ui->setupUi(this); m_Ui->progressBar->hide(); @@ -60,60 +58,65 @@ projectionList.append(&(CylindricalProjection::singleton)); projectionList.append(&(MirrorBallProjection::singleton)); transforminfo = new TransformInfo(); - transforminfo->srcProjection=projectionList.at(0); - transforminfo->dstProjection=projectionList.at(0); + transforminfo->srcProjection = projectionList.at(0); + transforminfo->dstProjection = projectionList.at(0); - connect(m_Ui->okButton,SIGNAL(clicked()),this,SLOT(okClicked())); - connect(m_Ui->sourceProjection,SIGNAL(activated(int)),this,SLOT(srcProjActivated(int))); - connect(m_Ui->destProjection,SIGNAL(activated(int)),this,SLOT(dstProjActivated(int))); - connect(m_Ui->bilinearCheckBox,SIGNAL(toggled(bool)),this,SLOT(bilinearToggled(bool))); - connect(m_Ui->oversampleSpinBox,SIGNAL(valueChanged(int)),this,SLOT(oversampleChanged(int))); - connect(m_Ui->XrotSpinBox,SIGNAL(valueChanged(int)),this,SLOT(XRotChanged(int))); - connect(m_Ui->YrotSpinBox,SIGNAL(valueChanged(int)),this,SLOT(YRotChanged(int))); - connect(m_Ui->ZrotSpinBox,SIGNAL(valueChanged(int)),this,SLOT(ZRotChanged(int))); - connect(m_Ui->anglesSpinBox,SIGNAL(valueChanged(int)),this,SLOT(anglesAngularDestinationProj(int))); - - connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(projectionFinished()), Qt::DirectConnection); -} - -ProjectionsDialog::~ProjectionsDialog() { - delete transforminfo; -} - -void ProjectionsDialog::XRotChanged(int v) { - transforminfo->xRotate=v; -} -void ProjectionsDialog::YRotChanged(int v) { - transforminfo->yRotate=v; -} -void ProjectionsDialog::ZRotChanged(int v) { - transforminfo->zRotate=v; -} + connect(m_Ui->okButton, &QAbstractButton::clicked, this, + &ProjectionsDialog::okClicked); + connect(m_Ui->sourceProjection, SIGNAL(activated(int)), this, + SLOT(srcProjActivated(int))); + connect(m_Ui->destProjection, SIGNAL(activated(int)), this, + SLOT(dstProjActivated(int))); + connect(m_Ui->bilinearCheckBox, &QAbstractButton::toggled, this, + &ProjectionsDialog::bilinearToggled); + connect(m_Ui->oversampleSpinBox, SIGNAL(valueChanged(int)), this, + SLOT(oversampleChanged(int))); + connect(m_Ui->XrotSpinBox, SIGNAL(valueChanged(int)), this, + SLOT(XRotChanged(int))); + connect(m_Ui->YrotSpinBox, SIGNAL(valueChanged(int)), this, + SLOT(YRotChanged(int))); + connect(m_Ui->ZrotSpinBox, SIGNAL(valueChanged(int)), this, + SLOT(ZRotChanged(int))); + connect(m_Ui->anglesSpinBox, SIGNAL(valueChanged(int)), this, + SLOT(anglesAngularDestinationProj(int))); + + connect(&m_futureWatcher, &QFutureWatcherBase::finished, this, + &ProjectionsDialog::projectionFinished, Qt::DirectConnection); +} + +ProjectionsDialog::~ProjectionsDialog() { delete transforminfo; } + +void ProjectionsDialog::XRotChanged(int v) { transforminfo->xRotate = v; } +void ProjectionsDialog::YRotChanged(int v) { transforminfo->yRotate = v; } +void ProjectionsDialog::ZRotChanged(int v) { transforminfo->zRotate = v; } void ProjectionsDialog::oversampleChanged(int v) { - transforminfo->oversampleFactor=v; + transforminfo->oversampleFactor = v; } void ProjectionsDialog::bilinearToggled(bool v) { - transforminfo->interpolate=v; + transforminfo->interpolate = v; } void ProjectionsDialog::dstProjActivated(int gui_index) { - transforminfo->dstProjection=projectionList.at(gui_index); - bool transformIsAngular=transforminfo->dstProjection==&(AngularProjection::singleton); + transforminfo->dstProjection = projectionList.at(gui_index); + bool transformIsAngular = + transforminfo->dstProjection == &(AngularProjection::singleton); m_Ui->labelAngles->setEnabled(transformIsAngular); m_Ui->anglesSpinBox->setEnabled(transformIsAngular); if (transformIsAngular) - ((AngularProjection*)(transforminfo->dstProjection))->setAngle(m_Ui->anglesSpinBox->value()); + ((AngularProjection *)(transforminfo->dstProjection)) + ->setAngle(m_Ui->anglesSpinBox->value()); } void ProjectionsDialog::srcProjActivated(int gui_index) { - transforminfo->srcProjection=projectionList.at(gui_index); + transforminfo->srcProjection = projectionList.at(gui_index); } void ProjectionsDialog::anglesAngularDestinationProj(int v) { - ((AngularProjection*)(transforminfo->dstProjection))->setAngle(v); + ((AngularProjection *)(transforminfo->dstProjection))->setAngle(v); } -void ProjectionsDialog::okClicked() -{ - qDebug("Projective Transformation from %s to %s", transforminfo->srcProjection->getName(), transforminfo->dstProjection->getName()); +void ProjectionsDialog::okClicked() { + qDebug("Projective Transformation from %s to %s", + transforminfo->srcProjection->getName(), + transforminfo->dstProjection->getName()); m_Ui->progressBar->setMaximum(0); m_Ui->progressBar->setMinimum(0); @@ -125,17 +128,17 @@ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); int xSize = original->getWidth(); - int ySize = static_cast(xSize / transforminfo->dstProjection->getSizeRatio()); - transformed = new pfs::Frame( xSize,ySize ); + int ySize = + static_cast(xSize / transforminfo->dstProjection->getSizeRatio()); + transformed = new pfs::Frame(xSize, ySize); - m_future = QtConcurrent::run(boost::bind(&worker, original, transformed, xSize, ySize, transforminfo)); + m_future = QtConcurrent::run(boost::bind(&worker, original, transformed, + xSize, ySize, transforminfo)); m_futureWatcher.setFuture(m_future); - } -void ProjectionsDialog::projectionFinished() -{ +void ProjectionsDialog::projectionFinished() { QApplication::restoreOverrideCursor(); emit accept(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Projection/ProjectionsDialog.h luminance-hdr-2.6.0/src/Projection/ProjectionsDialog.h --- luminance-hdr-2.5.1+dfsg/src/Projection/ProjectionsDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Projection/ProjectionsDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,31 +29,31 @@ #include namespace Ui { - class ProjectionsDialog; +class ProjectionsDialog; } namespace pfs { - class Frame; +class Frame; } class Projection; class TransformInfo; -class ProjectionsDialog : public QDialog -{ -Q_OBJECT -public: - ProjectionsDialog(QWidget *parent, pfs::Frame *orig); +class ProjectionsDialog : public QDialog { + Q_OBJECT + public: + ProjectionsDialog(QWidget *parent, pfs::Frame *orig); ~ProjectionsDialog(); - pfs::Frame* getTranformedFrame(); + pfs::Frame *getTranformedFrame(); TransformInfo *transforminfo; -private: + + private: pfs::Frame *original, *transformed; - QList projectionList; + QList projectionList; QScopedPointer m_Ui; QFutureWatcher m_futureWatcher; QFuture m_future; -private slots: + private slots: void okClicked(); void XRotChanged(int); void YRotChanged(int); @@ -66,8 +66,7 @@ void projectionFinished(); }; -inline pfs::Frame* ProjectionsDialog::getTranformedFrame() -{ +inline pfs::Frame *ProjectionsDialog::getTranformedFrame() { return transformed; } diff -Nru luminance-hdr-2.5.1+dfsg/src/Resize/CMakeLists.txt luminance-hdr-2.6.0/src/Resize/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Resize/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Resize/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(resizedialog ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(resizedialog Core Gui Widgets) +ADD_LIBRARY(resizedialog STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(resizedialog Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} resizedialog PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Resize/ResizeDialog.cpp luminance-hdr-2.6.0/src/Resize/ResizeDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/Resize/ResizeDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Resize/ResizeDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,18 +21,17 @@ * @author Giuseppe Rota */ -#include "ResizeDialog.h" -#include "ui_ResizeDialog.h" +#include "Resize/ResizeDialog.h" +#include "Resize/ui_ResizeDialog.h" #include "Libpfs/frame.h" #include "Libpfs/manip/resize.h" -ResizeDialog::ResizeDialog(QWidget *parent, pfs::Frame *orig): - QDialog(parent), - m_original(orig), - m_resized(NULL), - m_Ui(new Ui::ResizeDialog) -{ +ResizeDialog::ResizeDialog(QWidget *parent, pfs::Frame *orig) + : QDialog(parent), + m_original(orig), + m_resized(NULL), + m_Ui(new Ui::ResizeDialog) { m_Ui->setupUi(this); orig_width = m_original->getWidth(); @@ -40,41 +39,48 @@ resized_width = orig_width; resized_height = orig_height; - m_Ui->widthSpinBox->setSuffix(""); + m_Ui->widthSpinBox->setSuffix(QLatin1String("")); m_Ui->widthSpinBox->setDecimals(0); - m_Ui->widthSpinBox->setMaximum(2*orig_width); + m_Ui->widthSpinBox->setMaximum(2 * orig_width); m_Ui->widthSpinBox->setMinimum(1); - m_Ui->heightSpinBox->setSuffix(""); + m_Ui->heightSpinBox->setSuffix(QLatin1String("")); m_Ui->heightSpinBox->setDecimals(0); - m_Ui->heightSpinBox->setMaximum(2*orig_height); + m_Ui->heightSpinBox->setMaximum(2 * orig_height); m_Ui->heightSpinBox->setMinimum(1); - //we are now in pixel mode, put directly original pixel values. + // we are now in pixel mode, put directly original pixel values. m_Ui->widthSpinBox->setValue(orig_width); m_Ui->heightSpinBox->setValue(orig_height); from_other_spinbox = false; updatelabel(); - connect(m_Ui->scaleButton,SIGNAL(clicked()),this,SLOT(scaledPressed())); - connect(m_Ui->widthSpinBox,SIGNAL(editingFinished()),this,SLOT(update_heightSpinBox())); - connect(m_Ui->widthSpinBox,SIGNAL(valueChanged(double)),this,SLOT(update_heightSpinBox())); - connect(m_Ui->heightSpinBox,SIGNAL(editingFinished()),this,SLOT(update_widthSpinBox())); - connect(m_Ui->heightSpinBox,SIGNAL(valueChanged(double)),this,SLOT(update_widthSpinBox())); - connect(m_Ui->px_or_percentage,SIGNAL(activated(int)),this,SLOT(switch_px_percentage(int))); - connect(m_Ui->restoredefault,SIGNAL(clicked()),this,SLOT(defaultpressed())); + connect(m_Ui->scaleButton, &QAbstractButton::clicked, this, + &ResizeDialog::scaledPressed); + connect(m_Ui->widthSpinBox, &QAbstractSpinBox::editingFinished, this, + &ResizeDialog::update_heightSpinBox); + connect(m_Ui->widthSpinBox, SIGNAL(valueChanged(double)), this, + SLOT(update_heightSpinBox())); + connect(m_Ui->heightSpinBox, &QAbstractSpinBox::editingFinished, this, + &ResizeDialog::update_widthSpinBox); + connect(m_Ui->heightSpinBox, SIGNAL(valueChanged(double)), this, + SLOT(update_widthSpinBox())); + connect(m_Ui->px_or_percentage, SIGNAL(activated(int)), this, + SLOT(switch_px_percentage(int))); + connect(m_Ui->restoredefault, &QAbstractButton::clicked, this, + &ResizeDialog::defaultpressed); } ResizeDialog::~ResizeDialog() { -//we don't delete *original, because in maingui_impl.cpp we will later call mdiwin->updateHDR which takes care of deleting its previous pfs::Frame* buffer. + // we don't delete *original, because in maingui_impl.cpp we will later call + // mdiwin->updateHDR which takes care of deleting its previous pfs::Frame* + // buffer. } -pfs::Frame* ResizeDialog::getResizedFrame() { - return m_resized; -} +pfs::Frame *ResizeDialog::getResizedFrame() { return m_resized; } void ResizeDialog::scaledPressed() { - if (orig_width==resized_width) { + if (orig_width == resized_width) { emit reject(); return; } @@ -83,114 +89,126 @@ } void ResizeDialog::switch_px_percentage(int px_per) { - switch (px_per) { - case 0: - m_Ui->widthSpinBox->setMaximum(2*orig_width); - m_Ui->heightSpinBox->setMaximum(2*orig_height); - from_other_spinbox = true; - m_Ui->widthSpinBox->setValue((int)(m_Ui->widthSpinBox->value()*(float)orig_width/100.0)); //from perc to px - from_other_spinbox = true; - m_Ui->heightSpinBox->setValue((int)(m_Ui->heightSpinBox->value()*(float)orig_height/100.0)); //from perc to px - m_Ui->widthSpinBox->setSuffix(""); - m_Ui->widthSpinBox->setDecimals(0); - m_Ui->widthSpinBox->setMinimum(1); - m_Ui->heightSpinBox->setSuffix(""); - m_Ui->heightSpinBox->setDecimals(0); - m_Ui->heightSpinBox->setMinimum(1); - break; - case 1: - m_Ui->widthSpinBox->setDecimals(2); - m_Ui->heightSpinBox->setDecimals(2); - from_other_spinbox = true; - m_Ui->widthSpinBox->setValue(100*m_Ui->widthSpinBox->value()/(float)orig_width); //from px to perc - from_other_spinbox = true; - m_Ui->heightSpinBox->setValue(100*m_Ui->heightSpinBox->value()/(float)orig_height); //from px to perc - m_Ui->widthSpinBox->setSuffix("%"); - m_Ui->widthSpinBox->setMaximum(200); - m_Ui->widthSpinBox->setMinimum(1); - m_Ui->heightSpinBox->setSuffix("%"); - m_Ui->heightSpinBox->setMaximum(200); - m_Ui->heightSpinBox->setMinimum(1); - break; + case 0: + m_Ui->widthSpinBox->setMaximum(2 * orig_width); + m_Ui->heightSpinBox->setMaximum(2 * orig_height); + from_other_spinbox = true; + m_Ui->widthSpinBox->setValue((int)(m_Ui->widthSpinBox->value() * + (float)orig_width / + 100.0)); // from perc to px + from_other_spinbox = true; + m_Ui->heightSpinBox->setValue((int)(m_Ui->heightSpinBox->value() * + (float)orig_height / + 100.0)); // from perc to px + m_Ui->widthSpinBox->setSuffix(QLatin1String("")); + m_Ui->widthSpinBox->setDecimals(0); + m_Ui->widthSpinBox->setMinimum(1); + m_Ui->heightSpinBox->setSuffix(QLatin1String("")); + m_Ui->heightSpinBox->setDecimals(0); + m_Ui->heightSpinBox->setMinimum(1); + break; + case 1: + m_Ui->widthSpinBox->setDecimals(2); + m_Ui->heightSpinBox->setDecimals(2); + from_other_spinbox = true; + m_Ui->widthSpinBox->setValue(100 * m_Ui->widthSpinBox->value() / + (float)orig_width); // from px to perc + from_other_spinbox = true; + m_Ui->heightSpinBox->setValue( + 100 * m_Ui->heightSpinBox->value() / + (float)orig_height); // from px to perc + m_Ui->widthSpinBox->setSuffix(QStringLiteral("%")); + m_Ui->widthSpinBox->setMaximum(200); + m_Ui->widthSpinBox->setMinimum(1); + m_Ui->heightSpinBox->setSuffix(QStringLiteral("%")); + m_Ui->heightSpinBox->setMaximum(200); + m_Ui->heightSpinBox->setMinimum(1); + break; } from_other_spinbox = false; updatelabel(); } -//get a proper resized_width from a resized_height +// get a proper resized_width from a resized_height int ResizeDialog::rw_from_rh() { - return (int)((float)orig_width*(float)resized_height/(float)orig_height); + return (int)((float)orig_width * (float)resized_height / + (float)orig_height); } -//get a proper resized_height from a resized_width +// get a proper resized_height from a resized_width int ResizeDialog::rh_from_rw() { - return (int)((float)orig_height*(float)resized_width/(float)orig_width); + return (int)((float)orig_height * (float)resized_width / (float)orig_width); } void ResizeDialog::update_heightSpinBox() { if (from_other_spinbox) { - from_other_spinbox=false; + from_other_spinbox = false; return; } switch (m_Ui->px_or_percentage->currentIndex()) { - case 0: - resized_width=(int)m_Ui->widthSpinBox->value(); - resized_height=rh_from_rw(); - from_other_spinbox=true; - //update directly resized_height - m_Ui->heightSpinBox->setValue(resized_height); - break; - case 1: - resized_width=(int)(orig_width*m_Ui->widthSpinBox->value()/100.0); - resized_height=rh_from_rw(); - from_other_spinbox=true; - m_Ui->heightSpinBox->setValue((double)resized_height/(double)orig_height*100.0); - break; + case 0: + resized_width = (int)m_Ui->widthSpinBox->value(); + resized_height = rh_from_rw(); + from_other_spinbox = true; + // update directly resized_height + m_Ui->heightSpinBox->setValue(resized_height); + break; + case 1: + resized_width = + (int)(orig_width * m_Ui->widthSpinBox->value() / 100.0); + resized_height = rh_from_rw(); + from_other_spinbox = true; + m_Ui->heightSpinBox->setValue((double)resized_height / + (double)orig_height * 100.0); + break; } updatelabel(); } void ResizeDialog::update_widthSpinBox() { if (from_other_spinbox) { - from_other_spinbox=false; + from_other_spinbox = false; return; } switch (m_Ui->px_or_percentage->currentIndex()) { - case 0: - resized_height=(int)m_Ui->heightSpinBox->value(); - resized_width=rw_from_rh(); - from_other_spinbox=true; - //update directly resized_width - m_Ui->widthSpinBox->setValue(resized_width); - break; - case 1: - resized_height=(int)(orig_height*m_Ui->heightSpinBox->value()/100.0); - resized_width=rw_from_rh(); - from_other_spinbox=true; - m_Ui->widthSpinBox->setValue((double)resized_width/(double)orig_width*100.0); - break; + case 0: + resized_height = (int)m_Ui->heightSpinBox->value(); + resized_width = rw_from_rh(); + from_other_spinbox = true; + // update directly resized_width + m_Ui->widthSpinBox->setValue(resized_width); + break; + case 1: + resized_height = + (int)(orig_height * m_Ui->heightSpinBox->value() / 100.0); + resized_width = rw_from_rh(); + from_other_spinbox = true; + m_Ui->widthSpinBox->setValue((double)resized_width / + (double)orig_width * 100.0); + break; } updatelabel(); } void ResizeDialog::updatelabel() { - m_Ui->sizepreview->setText(QString("%1x%2").arg(resized_width).arg(resized_height)); + m_Ui->sizepreview->setText( + QStringLiteral("%1x%2").arg(resized_width).arg(resized_height)); } void ResizeDialog::defaultpressed() { - resized_height=orig_height; - resized_width=orig_width; + resized_height = orig_height; + resized_width = orig_width; switch (m_Ui->px_or_percentage->currentIndex()) { - case 0: - from_other_spinbox=true; - m_Ui->widthSpinBox->setValue(resized_width); - from_other_spinbox=true; - m_Ui->heightSpinBox->setValue(resized_height); - from_other_spinbox=false; - break; - case 1: - from_other_spinbox=true; - m_Ui->widthSpinBox->setValue(100); - from_other_spinbox=true; - m_Ui->heightSpinBox->setValue(100); - from_other_spinbox=false; - break; + case 0: + from_other_spinbox = true; + m_Ui->widthSpinBox->setValue(resized_width); + from_other_spinbox = true; + m_Ui->heightSpinBox->setValue(resized_height); + from_other_spinbox = false; + break; + case 1: + from_other_spinbox = true; + m_Ui->widthSpinBox->setValue(100); + from_other_spinbox = true; + m_Ui->heightSpinBox->setValue(100); + from_other_spinbox = false; + break; } updatelabel(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Resize/ResizeDialog.h luminance-hdr-2.6.0/src/Resize/ResizeDialog.h --- luminance-hdr-2.5.1+dfsg/src/Resize/ResizeDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Resize/ResizeDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,31 +27,31 @@ #include namespace pfs { - class Frame; +class Frame; } namespace Ui { - class ResizeDialog; +class ResizeDialog; } -class ResizeDialog : public QDialog -{ -Q_OBJECT -public: +class ResizeDialog : public QDialog { + Q_OBJECT + public: ResizeDialog(QWidget *parent, pfs::Frame *orig); ~ResizeDialog(); - pfs::Frame* getResizedFrame(); -public slots: + pfs::Frame *getResizedFrame(); + public slots: void scaledPressed(); void switch_px_percentage(int); void update_heightSpinBox(); void update_widthSpinBox(); void defaultpressed(); -private: - pfs::Frame* m_original; - pfs::Frame* m_resized; - int orig_width,orig_height; - int resized_width,resized_height; + + private: + pfs::Frame *m_original; + pfs::Frame *m_resized; + int orig_width, orig_height; + int resized_width, resized_height; void updatelabel(); int rh_from_rw(); int rw_from_rh(); diff -Nru luminance-hdr-2.5.1+dfsg/src/rt_math.h luminance-hdr-2.6.0/src/rt_math.h --- luminance-hdr-2.5.1+dfsg/src/rt_math.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/rt_math.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,136 @@ +#pragma once + +#include +#include +#include +#include + +namespace lhdrengine +{ + +constexpr int MAXVAL = 0xffff; +constexpr float MAXVALF = static_cast(MAXVAL); // float version of MAXVAL +constexpr double MAXVALD = static_cast(MAXVAL); // double version of MAXVAL + +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 x * x; +} + +template +constexpr const T& min(const T& a) +{ + return a; +} + +template +constexpr const T& min(const T& a, const T& b) +{ + return b < a ? b : a; +} + +template +constexpr const T& min(const T& a, const T& b, const ARGS&... args) +{ + return min(min(a, b), min(args...)); +} + +template +constexpr const T& max(const T& a) +{ + return a; +} + +template +constexpr const T& max(const T& a, const T& b) +{ + return a < b ? b : a; +} + +template +constexpr const T& max(const T& a, const T& b, const ARGS&... args) +{ + return max(max(a, b), max(args...)); +} + +template +constexpr const T& LIM(const T& a, const T& b, const T& c) +{ + return max(b, min(a, c)); +} + +template +constexpr T LIM01(const T& a) +{ + return max(T(0), min(a, T(1))); +} + +template +constexpr T CLIP(const T& a) +{ + return LIM(a, static_cast(0), static_cast(MAXVAL)); +} + +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: + // intp(a, b+x, c+x) = intp(a, b, c) + x + // intp(a, b*x, c*x) = intp(a, b, c) * x + return a * (b - c) + c; +} + +template +inline T norm1(const T& x, const T& y) +{ + return std::abs(x) + std::abs(y); +} + +template +inline T norm2(const T& x, const T& y) +{ + return std::sqrt(x * x + y * y); +} + +template< typename T > +inline T norminf(const T& x, const T& y) +{ + return max(std::abs(x), std::abs(y)); +} + +constexpr int float2uint16range(float d) +{ + // clips input to [0;65535] and rounds + return CLIP(d) + 0.5f; +} + +constexpr std::uint8_t uint16ToUint8Rounded(std::uint16_t i) +{ + return ((i + 128) - ((i + 128) >> 8)) >> 8; +} + +} diff -Nru luminance-hdr-2.5.1+dfsg/src/sleef.c luminance-hdr-2.6.0/src/sleef.c --- luminance-hdr-2.5.1+dfsg/src/sleef.c 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/sleef.c 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,1252 @@ +//////////////////////////////////////////////////////////////// +// +// this code was taken from http://shibatch.sourceforge.net/ +// Many thanks to the author of original version: Naoki Shibata +// +// This version contains modifications made by Ingo Weyrich +// +//////////////////////////////////////////////////////////////// + +#ifndef _SLEEFC_ +#define _SLEEFC_ + +#include +#include +//#include +#include "rt_math.h" +//#include +//#include + +#define PI4_A .7853981554508209228515625 +#define PI4_B .794662735614792836713604629039764404296875e-8 +#define PI4_C .306161699786838294306516483068750264552437361480769e-16 +#define M_4_PI 1.273239544735162542821171882678754627704620361328125 + +#define L2U .69314718055966295651160180568695068359375 +#define L2L .28235290563031577122588448175013436025525412068e-12 +#define R_LN2 1.442695040888963407359924681001892137426645954152985934135449406931 + +__inline int64_t doubleToRawLongBits(double d) { + union { + double f; + int64_t i; + } tmp; + tmp.f = d; + return tmp.i; +} + +__inline double longBitsToDouble(int64_t i) { + union { + double f; + int64_t i; + } tmp; + tmp.i = i; + return tmp.f; +} + +__inline double xfabs(double x) { + return longBitsToDouble(0x7fffffffffffffffLL & doubleToRawLongBits(x)); +} + +__inline double mulsign(double x, double y) { + return longBitsToDouble(doubleToRawLongBits(x) ^ (doubleToRawLongBits(y) & (1LL << 63))); +} + +__inline double sign(double d) { return mulsign(1, d); } +__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 == lhdrengine::RT_INFINITY || x == -lhdrengine::RT_INFINITY; } +__inline int xisminf(double x) { return x == -lhdrengine::RT_INFINITY; } +__inline int xispinf(double x) { return x == lhdrengine::RT_INFINITY; } + +__inline double ldexpk(double x, int q) { + double u; + int m; + m = q >> 31; + m = (((m + q) >> 9) - m) << 7; + q = q - (m << 2); + u = longBitsToDouble(((int64_t)(m + 0x3ff)) << 52); + double u2 = u*u; + u2 = u2 * u2; + x = x * u2; + u = longBitsToDouble(((int64_t)(q + 0x3ff)) << 52); + return x * u; +} + +__inline double xldexp(double x, int q) { return ldexpk(x, q); } + +__inline int ilogbp1(double d) { + int m = d < 4.9090934652977266E-91; + d = m ? 2.037035976334486E90 * d : d; + int q = (doubleToRawLongBits(d) >> 52) & 0x7ff; + q = m ? q - (300 + 0x03fe) : q - 0x03fe; + return q; +} + +__inline int xilogb(double d) { + int e = ilogbp1(xfabs(d)) - 1; + e = d == 0 ? (-2147483647 - 1) : e; + e = d == lhdrengine::RT_INFINITY || d == -lhdrengine::RT_INFINITY ? 2147483647 : e; + return e; +} + +__inline double upper(double d) { + return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL); +} + +typedef struct { + double x, y; +} double2; + +typedef struct { + float x, y; +} float2; + +__inline double2 dd(double h, double l) { + double2 ret; + ret.x = h; ret.y = l; + return ret; +} + +__inline double2 normalize_d(double2 t) { + double2 s; + + s.x = t.x + t.y; + s.y = t.x - s.x + t.y; + + return s; +} + +__inline double2 scale_d(double2 d, double s) { + double2 r; + + r.x = d.x * s; + r.y = d.y * s; + + return r; +} + +__inline double2 add2_ss(double x, double y) { + double2 r; + + r.x = x + y; + double v = r.x - x; + r.y = (x - (r.x - v)) + (y - v); + + return r; +} + +__inline double2 add_ds(double2 x, double y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x.x) || xisnan(y) || xfabs(x.x) >= xfabs(y)); + + r.x = x.x + y; + r.y = x.x - r.x + y + x.y; + + return r; +} + +__inline double2 add2_ds(double2 x, double y) { + // |x| >= |y| + + double2 r; + + r.x = x.x + y; + double v = r.x - x.x; + r.y = (x.x - (r.x - v)) + (y - v); + r.y += x.y; + + return r; +} + +__inline double2 add_sd(double x, double2 y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x) || xisnan(y.x) || xfabs(x) >= xfabs(y.x)); + + r.x = x + y.x; + r.y = x - r.x + y.x + y.y; + + return r; +} + +__inline double2 add_dd(double2 x, double2 y) { + // |x| >= |y| + + double2 r; + + assert(xisnan(x.x) || xisnan(y.x) || xfabs(x.x) >= xfabs(y.x)); + + r.x = x.x + y.x; + r.y = x.x - r.x + y.x + x.y + y.y; + + return r; +} + +__inline double2 add2_dd(double2 x, double2 y) { + double2 r; + + r.x = x.x + y.x; + double v = r.x - x.x; + r.y = (x.x - (r.x - v)) + (y.x - v); + r.y += x.y + y.y; + + return r; +} + +__inline double2 div_dd(double2 n, double2 d) { + double t = 1.0 / d.x; + double dh = upper(d.x), dl = d.x - dh; + double th = upper(t ), tl = t - th; + double nhh = upper(n.x), nhl = n.x - nhh; + + double2 q; + + q.x = n.x * t; + + double u = -q.x + nhh * th + nhh * tl + nhl * th + nhl * tl + + q.x * (1 - dh * th - dh * tl - dl * th - dl * tl); + + q.y = t * (n.y - q.x * d.y) + u; + + return q; +} + +__inline double2 mul_ss(double x, double y) { + double xh = upper(x), xl = x - xh; + double yh = upper(y), yl = y - yh; + double2 r; + + r.x = x * y; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl; + + return r; +} + +__inline double2 mul_ds(double2 x, double y) { + double xh = upper(x.x), xl = x.x - xh; + double yh = upper(y ), yl = y - yh; + double2 r; + + r.x = x.x * y; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.y * y; + + return r; +} + +__inline double2 mul_dd(double2 x, double2 y) { + double xh = upper(x.x), xl = x.x - xh; + double yh = upper(y.x), yl = y.x - yh; + double2 r; + + r.x = x.x * y.x; + r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.x * y.y + x.y * y.x; + + return r; +} + +__inline double2 squ_d(double2 x) { + double xh = upper(x.x), xl = x.x - xh; + double2 r; + + r.x = x.x * x.x; + r.y = xh * xh - r.x + (xh + xh) * xl + xl * xl + x.x * (x.y + x.y); + + return r; +} + +__inline double2 rec_s(double d) { + double t = 1.0 / d; + double dh = upper(d), dl = d - dh; + double th = upper(t), tl = t - th; + double2 q; + + q.x = t; + q.y = t * (1 - dh * th - dh * tl - dl * th - dl * tl); + + return q; +} + +__inline double2 sqrt_d(double2 d) { + double t = sqrt(d.x + d.y); + return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), 0.5); +} + +__inline double atan2k(double y, double x) { + double s, t, u; + int q = 0; + + if (x < 0) { x = -x; q = -2; } + if (y > x) { t = x; x = y; y = -t; q += 1; } + + s = y / x; + t = s * s; + + u = -1.88796008463073496563746e-05; + u = u * t + (0.000209850076645816976906797); + u = u * t + (-0.00110611831486672482563471); + u = u * t + (0.00370026744188713119232403); + u = u * t + (-0.00889896195887655491740809); + u = u * t + (0.016599329773529201970117); + u = u * t + (-0.0254517624932312641616861); + u = u * t + (0.0337852580001353069993897); + u = u * t + (-0.0407629191276836500001934); + u = u * t + (0.0466667150077840625632675); + u = u * t + (-0.0523674852303482457616113); + u = u * t + (0.0587666392926673580854313); + u = u * t + (-0.0666573579361080525984562); + u = u * t + (0.0769219538311769618355029); + u = u * t + (-0.090908995008245008229153); + u = u * t + (0.111111105648261418443745); + u = u * t + (-0.14285714266771329383765); + u = u * t + (0.199999999996591265594148); + u = u * t + (-0.333333333333311110369124); + + t = u * t * s + s; + t = q * (lhdrengine::RT_PI_2) + t; + + return t; +} + +__inline double xatan2(double y, double x) { + double r = atan2k(xfabs(y), x); + + r = mulsign(r, x); + if (xisinf(x) || x == 0) r = lhdrengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (lhdrengine::RT_PI_2)) : 0); + if (xisinf(y) ) r = lhdrengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (lhdrengine::RT_PI*1/4)) : 0); + if ( y == 0) r = (sign(x) == -1 ? lhdrengine::RT_PI : 0); + + return xisnan(x) || xisnan(y) ? lhdrengine::RT_NAN : mulsign(r, y); +} + +__inline double xasin(double d) { + return mulsign(atan2k(xfabs(d), sqrt((1+d)*(1-d))), d); +} + +__inline double xacos(double d) { + return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? lhdrengine::RT_PI : 0); +} + +__inline double xatan(double s) { + double t, u; + int q = 0; + + if (s < 0) { s = -s; q = 2; } + if (s > 1) { s = 1.0 / s; q |= 1; } + + t = s * s; + + u = -1.88796008463073496563746e-05; + u = u * t + (0.000209850076645816976906797); + u = u * t + (-0.00110611831486672482563471); + u = u * t + (0.00370026744188713119232403); + u = u * t + (-0.00889896195887655491740809); + u = u * t + (0.016599329773529201970117); + u = u * t + (-0.0254517624932312641616861); + u = u * t + (0.0337852580001353069993897); + u = u * t + (-0.0407629191276836500001934); + u = u * t + (0.0466667150077840625632675); + u = u * t + (-0.0523674852303482457616113); + u = u * t + (0.0587666392926673580854313); + u = u * t + (-0.0666573579361080525984562); + u = u * t + (0.0769219538311769618355029); + u = u * t + (-0.090908995008245008229153); + u = u * t + (0.111111105648261418443745); + u = u * t + (-0.14285714266771329383765); + u = u * t + (0.199999999996591265594148); + u = u * t + (-0.333333333333311110369124); + + t = s + s * (t * u); + + if ((q & 1) != 0) t = 1.570796326794896557998982 - t; + if ((q & 2) != 0) t = -t; + + return t; +} + +__inline double xsin(double d) { + int q; + double u, s; + + q = (int)xrint(d * lhdrengine::RT_1_PI); + + d = mla(q, -PI4_A*4, d); + d = mla(q, -PI4_B*4, d); + d = mla(q, -PI4_C*4, d); + + s = d * d; + + if ((q & 1) != 0) d = -d; + + u = -7.97255955009037868891952e-18; + u = mla(u, s, 2.81009972710863200091251e-15); + u = mla(u, s, -7.64712219118158833288484e-13); + u = mla(u, s, 1.60590430605664501629054e-10); + u = mla(u, s, -2.50521083763502045810755e-08); + u = mla(u, s, 2.75573192239198747630416e-06); + u = mla(u, s, -0.000198412698412696162806809); + u = mla(u, s, 0.00833333333333332974823815); + u = mla(u, s, -0.166666666666666657414808); + + u = mla(s, u * d, d); + + return u; +} + +__inline double xcos(double d) { + int q; + double u, s; + + q = 1 + 2*(int)xrint(d * lhdrengine::RT_1_PI - 0.5); + + d = mla(q, -PI4_A*2, d); + d = mla(q, -PI4_B*2, d); + d = mla(q, -PI4_C*2, d); + + s = d * d; + + if ((q & 2) == 0) d = -d; + + u = -7.97255955009037868891952e-18; + u = mla(u, s, 2.81009972710863200091251e-15); + u = mla(u, s, -7.64712219118158833288484e-13); + u = mla(u, s, 1.60590430605664501629054e-10); + u = mla(u, s, -2.50521083763502045810755e-08); + u = mla(u, s, 2.75573192239198747630416e-06); + u = mla(u, s, -0.000198412698412696162806809); + u = mla(u, s, 0.00833333333333332974823815); + u = mla(u, s, -0.166666666666666657414808); + + u = mla(s, u * d, d); + + return u; +} + +__inline double2 xsincos(double d) { + int q; + double u, s, t; + double2 r; + + q = (int)xrint(d * (2 * lhdrengine::RT_1_PI)); + + s = d; + + s = mla(-q, PI4_A*2, s); + s = mla(-q, PI4_B*2, s); + s = mla(-q, PI4_C*2, s); + + t = s; + + s = s * s; + + u = 1.58938307283228937328511e-10; + u = mla(u, s, -2.50506943502539773349318e-08); + u = mla(u, s, 2.75573131776846360512547e-06); + u = mla(u, s, -0.000198412698278911770864914); + u = mla(u, s, 0.0083333333333191845961746); + u = mla(u, s, -0.166666666666666130709393); + u = u * s * t; + + r.x = t + u; + + u = -1.13615350239097429531523e-11; + u = mla(u, s, 2.08757471207040055479366e-09); + u = mla(u, s, -2.75573144028847567498567e-07); + u = mla(u, s, 2.48015872890001867311915e-05); + u = mla(u, s, -0.00138888888888714019282329); + u = mla(u, s, 0.0416666666666665519592062); + u = mla(u, s, -0.5); + + r.y = u * s + 1; + + if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } + if ((q & 2) != 0) { r.x = -r.x; } + if (((q+1) & 2) != 0) { r.y = -r.y; } + + if (xisinf(d)) { r.x = r.y = lhdrengine::RT_NAN; } + + return r; +} + +__inline double xtan(double d) { + int q; + double u, s, x; + + q = (int)xrint(d * (2 * lhdrengine::RT_1_PI)); + + x = mla(q, -PI4_A*2, d); + x = mla(q, -PI4_B*2, x); + x = mla(q, -PI4_C*2, x); + + s = x * x; + + if ((q & 1) != 0) x = -x; + + u = 1.01419718511083373224408e-05; + u = mla(u, s, -2.59519791585924697698614e-05); + u = mla(u, s, 5.23388081915899855325186e-05); + u = mla(u, s, -3.05033014433946488225616e-05); + u = mla(u, s, 7.14707504084242744267497e-05); + u = mla(u, s, 8.09674518280159187045078e-05); + u = mla(u, s, 0.000244884931879331847054404); + u = mla(u, s, 0.000588505168743587154904506); + u = mla(u, s, 0.00145612788922812427978848); + u = mla(u, s, 0.00359208743836906619142924); + u = mla(u, s, 0.00886323944362401618113356); + u = mla(u, s, 0.0218694882853846389592078); + u = mla(u, s, 0.0539682539781298417636002); + u = mla(u, s, 0.133333333333125941821962); + u = mla(u, s, 0.333333333333334980164153); + + u = mla(s, u * x, x); + + if ((q & 1) != 0) u = 1.0 / u; + + if (xisinf(d)) u = lhdrengine::RT_NAN; + + return u; +} + +__inline double xlog(double d) { + double x, x2, t, m; + int e; + + e = ilogbp1(d * 0.7071); + m = ldexpk(d, -e); + + x = (m-1) / (m+1); + x2 = x * x; + + t = 0.148197055177935105296783; + t = mla(t, x2, 0.153108178020442575739679); + t = mla(t, x2, 0.181837339521549679055568); + t = mla(t, x2, 0.22222194152736701733275); + t = mla(t, x2, 0.285714288030134544449368); + t = mla(t, x2, 0.399999999989941956712869); + t = mla(t, x2, 0.666666666666685503450651); + t = mla(t, x2, 2); + + x = x * t + 0.693147180559945286226764 * e; + + if (xisinf(d)) x = lhdrengine::RT_INFINITY; + if (d < 0) x = lhdrengine::RT_NAN; + if (d == 0) x = -lhdrengine::RT_INFINITY; + + return x; +} + +__inline double xexp(double d) { + int q = (int)xrint(d * R_LN2); + double s, u; + + s = mla(q, -L2U, d); + s = mla(q, -L2L, s); + + u = 2.08860621107283687536341e-09; + u = mla(u, s, 2.51112930892876518610661e-08); + u = mla(u, s, 2.75573911234900471893338e-07); + u = mla(u, s, 2.75572362911928827629423e-06); + u = mla(u, s, 2.4801587159235472998791e-05); + u = mla(u, s, 0.000198412698960509205564975); + u = mla(u, s, 0.00138888888889774492207962); + u = mla(u, s, 0.00833333333331652721664984); + u = mla(u, s, 0.0416666666666665047591422); + u = mla(u, s, 0.166666666666666851703837); + u = mla(u, s, 0.5); + + u = s * s * u + s + 1; + u = ldexpk(u, q); + + if (xisminf(d)) u = 0; + + return u; +} + +__inline double2 logk(double d) { + double2 x, x2; + double m, t; + int e; + + e = ilogbp1(d * 0.7071); + m = ldexpk(d, -e); + + x = div_dd(add2_ss(-1, m), add2_ss(1, m)); + x2 = squ_d(x); + + t = 0.134601987501262130076155; + t = mla(t, x2.x, 0.132248509032032670243288); + t = mla(t, x2.x, 0.153883458318096079652524); + t = mla(t, x2.x, 0.181817427573705403298686); + t = mla(t, x2.x, 0.222222231326187414840781); + t = mla(t, x2.x, 0.285714285651261412873718); + t = mla(t, x2.x, 0.400000000000222439910458); + t = mla(t, x2.x, 0.666666666666666371239645); + + return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), + add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); +} + +__inline double expk(double2 d) { + int q = (int)rint((d.x + d.y) * R_LN2); + double2 s, t; + double u; + + s = add2_ds(d, q * -L2U); + s = add2_ds(s, q * -L2L); + + s = normalize_d(s); + + u = 2.51069683420950419527139e-08; + u = mla(u, s.x, 2.76286166770270649116855e-07); + u = mla(u, s.x, 2.75572496725023574143864e-06); + u = mla(u, s.x, 2.48014973989819794114153e-05); + u = mla(u, s.x, 0.000198412698809069797676111); + u = mla(u, s.x, 0.0013888888939977128960529); + u = mla(u, s.x, 0.00833333333332371417601081); + u = mla(u, s.x, 0.0416666666665409524128449); + u = mla(u, s.x, 0.166666666666666740681535); + u = mla(u, s.x, 0.500000000000000999200722); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(1, t); + return ldexpk(t.x + t.y, q); +} + +__inline double xpow(double x, double y) { + int yisint = (int)y == y; + int yisodd = (1 & (int)y) != 0 && yisint; + + double result = expk(mul_ds(logk(xfabs(x)), y)); + + result = xisnan(result) ? lhdrengine::RT_INFINITY : result; + result *= (x >= 0 ? 1 : (!yisint ? lhdrengine::RT_NAN : (yisodd ? -1 : 1))); + + double efx = mulsign(xfabs(x) - 1, y); + if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : lhdrengine::RT_INFINITY); + if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : lhdrengine::RT_INFINITY); + if (xisnan(x) || xisnan(y)) result = lhdrengine::RT_NAN; + if (y == 0 || x == 1) result = 1; + + return result; +} + +__inline double2 expk2(double2 d) { + int q = (int)rint((d.x + d.y) * R_LN2); + double2 s, t; + double u; + + s = add2_ds(d, q * -L2U); + s = add2_ds(s, q * -L2L); + + s = normalize_d(s); + + u = 2.51069683420950419527139e-08; + u = mla(u, s.x, 2.76286166770270649116855e-07); + u = mla(u, s.x, 2.75572496725023574143864e-06); + u = mla(u, s.x, 2.48014973989819794114153e-05); + u = mla(u, s.x, 0.000198412698809069797676111); + u = mla(u, s.x, 0.0013888888939977128960529); + u = mla(u, s.x, 0.00833333333332371417601081); + u = mla(u, s.x, 0.0416666666665409524128449); + u = mla(u, s.x, 0.166666666666666740681535); + u = mla(u, s.x, 0.500000000000000999200722); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(1, t); + return dd(ldexpk(t.x, q), ldexpk(t.y, q)); +} + +__inline double xsinh(double x) { + double y = xfabs(x); + double2 d = expk2(dd(y, 0)); + d = add2_dd(d, div_dd(dd(-1, 0), d)); + y = (d.x + d.y) * 0.5; + + y = xisinf(x) || xisnan(y) ? lhdrengine::RT_INFINITY : y; + y = mulsign(y, x); + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +__inline double xcosh(double x) { + double2 d = expk2(dd(x, 0)); + d = add2_dd(d, div_dd(dd(1, 0), d)); + double y = (d.x + d.y) * 0.5; + + y = xisinf(x) || xisnan(y) ? lhdrengine::RT_INFINITY : y; + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +__inline double xtanh(double x) { + double y = xfabs(x); + double2 d = expk2(dd(y, 0)); + double2 e = div_dd(dd(1, 0), d); + d = div_dd(add2_dd(d, scale_d(e, -1)), add2_dd(d, e)); + y = d.x + d.y; + + y = xisinf(x) || xisnan(y) ? 1.0 : y; + y = mulsign(y, x); + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +__inline double2 logk2(double2 d) { + double2 x, x2, m; + double t; + int e; + + d = normalize_d(d); + e = ilogbp1(d.x * 0.7071); + m = scale_d(d, ldexpk(1, -e)); + + x = div_dd(add2_ds(m, -1), add2_ds(m, 1)); + x2 = squ_d(x); + + t = 0.134601987501262130076155; + t = mla(t, x2.x, 0.132248509032032670243288); + t = mla(t, x2.x, 0.153883458318096079652524); + t = mla(t, x2.x, 0.181817427573705403298686); + t = mla(t, x2.x, 0.222222231326187414840781); + t = mla(t, x2.x, 0.285714285651261412873718); + t = mla(t, x2.x, 0.400000000000222439910458); + t = mla(t, x2.x, 0.666666666666666371239645); + + return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e), + add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t))); +} + +__inline double xasinh(double x) { + double y = xfabs(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) ? lhdrengine::RT_INFINITY : y; + y = mulsign(y, x); + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +__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) ? lhdrengine::RT_INFINITY : y; + y = x == 1.0 ? 0.0 : y; + y = x < 1.0 ? lhdrengine::RT_NAN : y; + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +__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 ? lhdrengine::RT_NAN : (y == 1.0 ? lhdrengine::RT_INFINITY : (d.x + d.y) * 0.5); + + y = xisinf(x) || xisnan(y) ? lhdrengine::RT_NAN : y; + y = mulsign(y, x); + y = xisnan(x) ? lhdrengine::RT_NAN : y; + + return y; +} + +// + +__inline double xfma(double x, double y, double z) { + union { + double f; + long long int i; + } tmp; + + tmp.f = x; + tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; + double xh = tmp.f, xl = x - xh; + + tmp.f = y; + tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL; + double yh = tmp.f, yl = y - yh; + + double h = x * y; + double l = xh * yh - h + xl * yh + xh * yl + xl * yl; + + double h2, l2, v; + + h2 = h + z; + v = h2 - h; + l2 = (h - (h2 - v)) + (z - v) + l; + + return h2 + l2; +} + +__inline double xsqrt(double d) { // max error : 0.5 ulp + double q = 1; + + if (d < 8.636168555094445E-78) { + d *= 1.157920892373162E77; + q = 2.9387358770557188E-39; + } + + // http://en.wikipedia.org/wiki/Fast_inverse_square_root + double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1)); + + x = x * (1.5 - 0.5 * d * x * x); + x = x * (1.5 - 0.5 * d * x * x); + x = x * (1.5 - 0.5 * d * x * x); + + // 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 == lhdrengine::RT_INFINITY ? lhdrengine::RT_INFINITY : x * q; +} + +__inline double xcbrt(double d) { // max error : 2 ulps + double x, y, q = 1.0; + int e, r; + + e = ilogbp1(d); + d = ldexpk(d, -e); + r = (e + 6144) % 3; + q = (r == 1) ? 1.2599210498948731647672106 : q; + q = (r == 2) ? 1.5874010519681994747517056 : q; + q = ldexpk(q, (e + 6144) / 3 - 2048); + + q = mulsign(q, d); + d = xfabs(d); + + x = -0.640245898480692909870982; + x = x * d + 2.96155103020039511818595; + x = x * d + -5.73353060922947843636166; + x = x * d + 6.03990368989458747961407; + x = x * d + -3.85841935510444988821632; + x = x * d + 2.2307275302496609725722; + + y = x * x; y = y * y; x -= (d * y - x) * (1.0 / 3.0); + y = d * x * x; + y = (y - (2.0 / 3.0) * y * (y * x - 1)) * q; + + return y; +} + +__inline double xexp2(double a) { + double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a)); + if (xispinf(a)) u = lhdrengine::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 = lhdrengine::RT_INFINITY; + if (xisminf(a)) u = 0; + return u; +} + +__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 = lhdrengine::RT_INFINITY; + if (xisminf(a)) x = -1; + return x; +} + +__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 = lhdrengine::RT_INFINITY; + if (a < 0) x = lhdrengine::RT_NAN; + if (a == 0) x = -lhdrengine::RT_INFINITY; + + return x; +} + +__inline double xlog1p(double a) { + double2 d = logk2(add2_ss(a, 1)); + double x = d.x + d.y; + + if (xisinf(a)) x = lhdrengine::RT_INFINITY; + if (a < -1) x = lhdrengine::RT_NAN; + if (a == -1) x = -lhdrengine::RT_INFINITY; + + return x; +} + +/////////////////////////////////////////// + +#define PI4_Af 0.78515625f +#define PI4_Bf 0.00024127960205078125f +#define PI4_Cf 6.3329935073852539062e-07f +#define PI4_Df 4.9604681473525147339e-10f + +#define L2Uf 0.693145751953125f +#define L2Lf 1.428606765330187045e-06f + +#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f + +__inline int32_t floatToRawIntBits(float d) { + union { + float f; + int32_t i; + } tmp; + tmp.f = d; + return tmp.i; +} + +__inline float intBitsToFloat(int32_t i) { + union { + float f; + int32_t i; + } tmp; + tmp.i = i; + return tmp.f; +} + +__inline float xfabsf(float x) { + return intBitsToFloat(0x7fffffffL & floatToRawIntBits(x)); +} + +__inline float mulsignf(float x, float y) { + return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31))); +} + +__inline float signf(float d) { return mulsignf(1, d); } +__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 == lhdrengine::RT_INFINITY_F || x == -lhdrengine::RT_INFINITY_F; } +__inline int xisminff(float x) { return x == -lhdrengine::RT_INFINITY_F; } +__inline int xispinff(float x) { return x == lhdrengine::RT_INFINITY_F; } + +__inline int ilogbp1f(float d) { + int m = d < 5.421010862427522E-20f; + d = m ? 1.8446744073709552E19f * d : d; + int q = (floatToRawIntBits(d) >> 23) & 0xff; + q = m ? q - (64 + 0x7e) : q - 0x7e; + return q; +} + +__inline float ldexpkf(float x, int q) { + float u; + int m; + m = q >> 31; + m = (((m + q) >> 6) - m) << 4; + q = q - (m << 2); + u = intBitsToFloat(((int32_t)(m + 0x7f)) << 23); + u = u * u; + x = x * u * u; + u = intBitsToFloat(((int32_t)(q + 0x7f)) << 23); + return x * u; +} + +__inline float xcbrtf(float d) { // max error : 2 ulps + float x, y, q = 1.0f; + int e, r; + + e = ilogbp1f(d); + d = ldexpkf(d, -e); + r = (e + 6144) % 3; + q = (r == 1) ? 1.2599210498948731647672106f : q; + q = (r == 2) ? 1.5874010519681994747517056f : q; + q = ldexpkf(q, (e + 6144) / 3 - 2048); + + q = mulsignf(q, d); + d = xfabsf(d); + + x = -0.601564466953277587890625f; + x = mlaf(x, d, 2.8208892345428466796875f); + x = mlaf(x, d, -5.532182216644287109375f); + x = mlaf(x, d, 5.898262500762939453125f); + x = mlaf(x, d, -3.8095417022705078125f); + x = mlaf(x, d, 2.2241256237030029296875f); + + y = d * x * x; + y = (y - (2.0f / 3.0f) * y * (y * x - 1.0f)) * q; + + return y; +} + +__inline float xsinf(float d) { + int q; + float u, s; + + q = (int)xrintf(d * (float)lhdrengine::RT_1_PI); + + d = mlaf(q, -PI4_Af*4, d); + d = mlaf(q, -PI4_Bf*4, d); + d = mlaf(q, -PI4_Cf*4, d); + d = mlaf(q, -PI4_Df*4, d); + + s = d * d; + + if ((q & 1) != 0) d = -d; + + u = 2.6083159809786593541503e-06f; + u = mlaf(u, s, -0.0001981069071916863322258f); + u = mlaf(u, s, 0.00833307858556509017944336f); + u = mlaf(u, s, -0.166666597127914428710938f); + + u = mlaf(s, u * d, d); + + return u; +} + +__inline float xcosf(float d) { + int q; + float u, s; + + q = 1 + 2*(int)xrintf(d * (float)lhdrengine::RT_1_PI - 0.5f); + + d = mlaf(q, -PI4_Af*2, d); + d = mlaf(q, -PI4_Bf*2, d); + d = mlaf(q, -PI4_Cf*2, d); + d = mlaf(q, -PI4_Df*2, d); + + s = d * d; + + if ((q & 2) == 0) d = -d; + + u = 2.6083159809786593541503e-06f; + u = mlaf(u, s, -0.0001981069071916863322258f); + u = mlaf(u, s, 0.00833307858556509017944336f); + u = mlaf(u, s, -0.166666597127914428710938f); + + u = mlaf(s, u * d, d); + + return u; +} + +__inline float2 xsincosf(float d) { + int q; + float u, s, t; + float2 r; + + q = (int)rint(d * ((float)(2 * lhdrengine::RT_1_PI))); + + s = d; + + s = mlaf(q, -PI4_Af*2, s); + s = mlaf(q, -PI4_Bf*2, s); + s = mlaf(q, -PI4_Cf*2, s); + s = mlaf(q, -PI4_Df*2, s); + + t = s; + + s = s * s; + + u = -0.000195169282960705459117889f; + u = mlaf(u, s, 0.00833215750753879547119141f); + u = mlaf(u, s, -0.166666537523269653320312f); + u = u * s * t; + + r.x = t + u; + + u = -2.71811842367242206819355e-07f; + u = mlaf(u, s, 2.47990446951007470488548e-05f); + u = mlaf(u, s, -0.00138888787478208541870117f); + u = mlaf(u, s, 0.0416666641831398010253906f); + u = mlaf(u, s, -0.5f); + + r.y = u * s + 1; + + if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; } + if ((q & 2) != 0) { r.x = -r.x; } + if (((q+1) & 2) != 0) { r.y = -r.y; } + + if (xisinff(d)) { r.x = r.y = lhdrengine::RT_NAN_F; } + + return r; +} + +__inline float xtanf(float d) { + int q; + float u, s, x; + + q = (int)xrintf(d * (float)(2 * lhdrengine::RT_1_PI)); + + x = d; + + x = mlaf(q, -PI4_Af*2, x); + x = mlaf(q, -PI4_Bf*2, x); + x = mlaf(q, -PI4_Cf*2, x); + x = mlaf(q, -PI4_Df*2, x); + + s = x * x; + + if ((q & 1) != 0) x = -x; + + u = 0.00927245803177356719970703f; + u = mlaf(u, s, 0.00331984995864331722259521f); + u = mlaf(u, s, 0.0242998078465461730957031f); + u = mlaf(u, s, 0.0534495301544666290283203f); + u = mlaf(u, s, 0.133383005857467651367188f); + u = mlaf(u, s, 0.333331853151321411132812f); + + u = mlaf(s, u * x, x); + + if ((q & 1) != 0) u = 1.0f / u; + + if (xisinff(d)) u = lhdrengine::RT_NAN_F; + + return u; +} + +__inline float xatanf(float s) { + float t, u; + int q = 0; + + if (s < 0) { s = -s; q = 2; } + if (s > 1) { s = 1.0f / s; q |= 1; } + + t = s * s; + + u = 0.00282363896258175373077393f; + u = mlaf(u, t, -0.0159569028764963150024414f); + u = mlaf(u, t, 0.0425049886107444763183594f); + u = mlaf(u, t, -0.0748900920152664184570312f); + u = mlaf(u, t, 0.106347933411598205566406f); + u = mlaf(u, t, -0.142027363181114196777344f); + u = mlaf(u, t, 0.199926957488059997558594f); + u = mlaf(u, t, -0.333331018686294555664062f); + + t = s + s * (t * u); + + if ((q & 1) != 0) t = 1.570796326794896557998982f - t; + if ((q & 2) != 0) t = -t; + + return t; +} + +__inline float atan2kf(float y, float x) { + float s, t, u; + float q = 0.f; + + if (x < 0) { x = -x; q = -2.f; } + if (y > x) { t = x; x = y; y = -t; q += 1.f; } + + s = y / x; + t = s * s; + + u = 0.00282363896258175373077393f; + u = mlaf(u, t, -0.0159569028764963150024414f); + u = mlaf(u, t, 0.0425049886107444763183594f); + u = mlaf(u, t, -0.0748900920152664184570312f); + u = mlaf(u, t, 0.106347933411598205566406f); + u = mlaf(u, t, -0.142027363181114196777344f); + u = mlaf(u, t, 0.199926957488059997558594f); + u = mlaf(u, t, -0.333331018686294555664062f); + + t = u * t; + t = mlaf(t,s,s); + return mlaf(q,(float)(lhdrengine::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 = lhdrengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(lhdrengine::RT_PI_F*.5f)) : 0); + if (xisinff(y) ) r = lhdrengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(lhdrengine::RT_PI_F*.25f)) : 0); + if ( y == 0) r = (signf(x) == -1 ? lhdrengine::RT_PI_F : 0); + + return xisnanf(x) || xisnanf(y) ? lhdrengine::RT_NAN_F : mulsignf(r, y); +} + +__inline float xasinf(float d) { + return mulsignf(atan2kf(fabsf(d), sqrtf((1.0f+d)*(1.0f-d))), d); +} + +__inline float xacosf(float d) { + return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)lhdrengine::RT_PI : 0.0f); +} + +__inline float xlogf(float d) { + float x, x2, t, m; + int e; + + e = ilogbp1f(d * 0.7071f); + m = ldexpkf(d, -e); + + x = (m-1.0f) / (m+1.0f); + x2 = x * x; + + t = 0.2371599674224853515625f; + t = mlaf(t, x2, 0.285279005765914916992188f); + t = mlaf(t, x2, 0.400005519390106201171875f); + t = mlaf(t, x2, 0.666666567325592041015625f); + t = mlaf(t, x2, 2.0f); + + x = x * t + 0.693147180559945286226764f * e; + + if (xisinff(d)) x = lhdrengine::RT_INFINITY_F; + if (d < 0) x = lhdrengine::RT_NAN_F; + if (d == 0) x = -lhdrengine::RT_INFINITY_F; + + return x; +} + +__inline float xexpf(float d) { + if(d<=-104.0f) return 0.0f; + + int q = (int)xrintf(d * R_LN2f); + float s, u; + + s = mlaf(q, -L2Uf, d); + s = mlaf(q, -L2Lf, s); + + u = 0.00136324646882712841033936f; + u = mlaf(u, s, 0.00836596917361021041870117f); + u = mlaf(u, s, 0.0416710823774337768554688f); + u = mlaf(u, s, 0.166665524244308471679688f); + u = mlaf(u, s, 0.499999850988388061523438f); + + u = mlaf( s, mlaf(s,u,1.f),1.f); + return ldexpkf(u, q); + +} + +__inline float xmul2f(float d) { + return d + d; +} + +__inline float xdiv2f(float d) { + union { + float floatval; + int intval; + } uflint; + uflint.floatval = d; + if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing + uflint.intval -= 1 << 23; // sub 1 from the exponent + } + return uflint.floatval; +} + +__inline float xdivf( float d, int n){ + union { + float floatval; + int intval; + } uflint; + uflint.floatval = d; + if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing + uflint.intval -= n << 23; // add n to the exponent + } + return uflint.floatval; +} + + + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/sleefsseavx.c luminance-hdr-2.6.0/src/sleefsseavx.c --- luminance-hdr-2.5.1+dfsg/src/sleefsseavx.c 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/sleefsseavx.c 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,1468 @@ +//////////////////////////////////////////////////////////////// +// +// this code was taken from http://shibatch.sourceforge.net/ +// Many thanks to the author of original version: Naoki Shibata +// +// This version contains modifications made by Ingo Weyrich +// +//////////////////////////////////////////////////////////////// + + +#ifndef SLEEFSSEAVX +#define SLEEFSSEAVX + +#include +//#include +//#include +//#include +//#include "sleefsseavx.h" +#include "rt_math.h" +#ifdef __SSE2__ +#include "helpersse2.h" + +#ifdef ENABLE_AVX +#include "helperavx.h" +#endif + +#ifdef __GNUC__ +#define INLINE __inline +#else +#define INLINE inline +#endif + +// + +#define PI4_A .7853981554508209228515625 +#define PI4_B .794662735614792836713604629039764404296875e-8 +#define PI4_C .306161699786838294306516483068750264552437361480769e-16 +#define M_4_PI 1.273239544735162542821171882678754627704620361328125 + +#define L2U .69314718055966295651160180568695068359375 +#define L2L .28235290563031577122588448175013436025525412068e-12 +#define R_LN2 1.442695040888963407359924681001892137426645954152985934135449406931 + +// + +#define PI4_Af 0.78515625f +#define PI4_Bf 0.00024127960205078125f +#define PI4_Cf 6.3329935073852539062e-07f +#define PI4_Df 4.9604681473525147339e-10f + +#define L2Uf 0.693145751953125f +#define L2Lf 1.428606765330187045e-06f +#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f + +#define INFINITYf ((float)lhdrengine::RT_INFINITY) +#define NANf ((float)lhdrengine::RT_NAN) + +// + +static INLINE vdouble vadd3(vdouble v0, vdouble v1, vdouble v2) { + return vadd(vadd(v0, v1), v2); +} + +static INLINE vdouble vadd4(vdouble v0, vdouble v1, vdouble v2, vdouble v3) { + return vadd3(vadd(v0, v1), v2, v3); +} + +static INLINE vdouble vadd5(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4) { + return vadd4(vadd(v0, v1), v2, v3, v4); +} + +static INLINE vdouble vadd6(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4, vdouble v5) { + return vadd5(vadd(v0, v1), v2, v3, v4, v5); +} + +static INLINE vdouble vadd7(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4, vdouble v5, vdouble v6) { + return vadd6(vadd(v0, v1), v2, v3, v4, v5, v6); +} + +static INLINE vdouble vsub3(vdouble v0, vdouble v1, vdouble v2) { + return vsub(vsub(v0, v1), v2); +} + +static INLINE vdouble vsub4(vdouble v0, vdouble v1, vdouble v2, vdouble v3) { + return vsub3(vsub(v0, v1), v2, v3); +} + +static INLINE vdouble vsub5(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4) { + return vsub4(vsub(v0, v1), v2, v3, v4); +} + +// + +static INLINE vdouble2 normalize_d(vdouble2 t) { + vdouble2 s; + + s.x = vadd(t.x, t.y); + s.y = vadd(vsub(t.x, s.x), t.y); + + return s; +} + +static INLINE vdouble2 scale_d(vdouble2 d, vdouble s) { + vdouble2 r = {vmul(d.x, s), vmul(d.y, s)}; + return r; +} + +static INLINE vdouble2 add_ss(vdouble x, vdouble y) { + vdouble2 r; + + r.x = vadd(x, y); + r.y = vadd(vsub(x, r.x), y); + + return r; +} + +static INLINE vdouble2 add2_ss(vdouble x, vdouble y) { + vdouble2 r; + + r.x = vadd(x, y); + vdouble v = vsub(r.x, x); + r.y = vadd(vsub(x, vsub(r.x, v)), vsub(y, v)); + + return r; +} + +static INLINE vdouble2 add_ds(vdouble2 x, vdouble y) { + vdouble2 r; + + r.x = vadd(x.x, y); + r.y = vadd3(vsub(x.x, r.x), y, x.y); + + return r; +} + +static INLINE vdouble2 add2_ds(vdouble2 x, vdouble y) { + vdouble2 r; + + r.x = vadd(x.x, y); + vdouble v = vsub(r.x, x.x); + r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y, v)); + r.y = vadd(r.y, x.y); + + return r; +} + +static INLINE vdouble2 add_sd(vdouble x, vdouble2 y) { + vdouble2 r; + + r.x = vadd(x, y.x); + r.y = vadd3(vsub(x, r.x), y.x, y.y); + + return r; +} + +static INLINE vdouble2 add_dd(vdouble2 x, vdouble2 y) { + // |x| >= |y| + + vdouble2 r; + + r.x = vadd(x.x, y.x); + r.y = vadd4(vsub(x.x, r.x), y.x, x.y, y.y); + + return r; +} + +static INLINE vdouble2 add2_dd(vdouble2 x, vdouble2 y) { + vdouble2 r; + + r.x = vadd(x.x, y.x); + vdouble v = vsub(r.x, x.x); + r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y.x, v)); + r.y = vadd(r.y, vadd(x.y, y.y)); + + return r; +} + +static INLINE vdouble2 div_dd(vdouble2 n, vdouble2 d) { + vdouble t = vrec(d.x); + vdouble dh = vupper(d.x), dl = vsub(d.x, dh); + vdouble th = vupper(t ), tl = vsub(t , th); + vdouble nhh = vupper(n.x), nhl = vsub(n.x, nhh); + + vdouble2 q; + + q.x = vmul(n.x, t); + + vdouble u = vadd5(vsub(vmul(nhh, th), q.x), vmul(nhh, tl), vmul(nhl, th), vmul(nhl, tl), + vmul(q.x, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl)))); + + q.y = vadd(vmul(t, vsub(n.y, vmul(q.x, d.y))), u); + + return q; +} + +static INLINE vdouble2 mul_ss(vdouble x, vdouble y) { + vdouble xh = vupper(x), xl = vsub(x, xh); + vdouble yh = vupper(y), yl = vsub(y, yh); + vdouble2 r; + + r.x = vmul(x, y); + r.y = vadd5(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl)); + + return r; +} + +static INLINE vdouble2 mul_ds(vdouble2 x, vdouble y) { + vdouble xh = vupper(x.x), xl = vsub(x.x, xh); + vdouble yh = vupper(y ), yl = vsub(y , yh); + vdouble2 r; + + r.x = vmul(x.x, y); + r.y = vadd6(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.y, y)); + + return r; +} + +static INLINE vdouble2 mul_dd(vdouble2 x, vdouble2 y) { + vdouble xh = vupper(x.x), xl = vsub(x.x, xh); + vdouble yh = vupper(y.x), yl = vsub(y.x, yh); + vdouble2 r; + + r.x = vmul(x.x, y.x); + r.y = vadd7(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.x, y.y), vmul(x.y, y.x)); + + return r; +} + +static INLINE vdouble2 squ_d(vdouble2 x) { + vdouble xh = vupper(x.x), xl = vsub(x.x, xh); + vdouble2 r; + + r.x = vmul(x.x, x.x); + r.y = vadd5(vmul(xh, xh), vneg(r.x), vmul(vadd(xh, xh), xl), vmul(xl, xl), vmul(x.x, vadd(x.y, x.y))); + + return r; +} + +static INLINE vdouble2 rec_s(vdouble d) { + vdouble t = vrec(d); + vdouble dh = vupper(d), dl = vsub(d, dh); + vdouble th = vupper(t), tl = vsub(t, th); + vdouble2 q; + + q.x = t; + q.y = vmul(t, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl))); + + return q; +} + +static INLINE vdouble2 sqrt_d(vdouble2 d) { + vdouble t = vsqrt(vadd(d.x, d.y)); + return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), vcast_vd_d(0.5)); +} + +// + +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(lhdrengine::RT_INFINITY)), vcast_vd_d(2147483647), e); + return vrint_vi_vd(e); +} + +static INLINE vdouble xsin(vdouble d) { + vint q; + vdouble u, s; + + q = vrint_vi_vd(vmul(d, vcast_vd_d(lhdrengine::RT_1_PI))); + + u = vcast_vd_vi(q); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*4))); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*4))); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*4))); + + s = vmul(d, d); + + d = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vneg(d), d); + + u = vcast_vd_d(-7.97255955009037868891952e-18); + u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15)); + u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13)); + u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10)); + u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08)); + u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06)); + u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809)); + u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815)); + u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808)); + + u = vmla(s, vmul(u, d), d); + + return u; +} + +static INLINE vdouble xcos(vdouble d) { + vint q; + vdouble u, s; + + q = vrint_vi_vd(vsub(vmul(d, vcast_vd_d(lhdrengine::RT_1_PI)), vcast_vd_d(0.5))); + q = vaddi(vaddi(q, q), vcast_vi_i(1)); + + u = vcast_vd_vi(q); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2))); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*2))); + d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*2))); + + s = vmul(d, d); + + d = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(0)), vneg(d), d); + + u = vcast_vd_d(-7.97255955009037868891952e-18); + u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15)); + u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13)); + u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10)); + u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08)); + u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06)); + u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809)); + u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815)); + u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808)); + + u = vmla(s, vmul(u, d), d); + + return u; +} + +static INLINE vdouble2 xsincos(vdouble d) { + vint q; + vmask m; + vdouble u, s, t, rx, ry; + vdouble2 r; + + q = vrint_vi_vd(vmul(d, vcast_vd_d(lhdrengine::RT_2_PI))); + + s = d; + + u = vcast_vd_vi(q); + s = vmla(u, vcast_vd_d(-PI4_A*2), s); + s = vmla(u, vcast_vd_d(-PI4_B*2), s); + s = vmla(u, vcast_vd_d(-PI4_C*2), s); + + t = s; + + s = vmul(s, s); + + u = vcast_vd_d(1.58938307283228937328511e-10); + u = vmla(u, s, vcast_vd_d(-2.50506943502539773349318e-08)); + u = vmla(u, s, vcast_vd_d(2.75573131776846360512547e-06)); + u = vmla(u, s, vcast_vd_d(-0.000198412698278911770864914)); + u = vmla(u, s, vcast_vd_d(0.0083333333333191845961746)); + u = vmla(u, s, vcast_vd_d(-0.166666666666666130709393)); + u = vmul(vmul(u, s), t); + + rx = vadd(t, u); + + u = vcast_vd_d(-1.13615350239097429531523e-11); + u = vmla(u, s, vcast_vd_d(2.08757471207040055479366e-09)); + u = vmla(u, s, vcast_vd_d(-2.75573144028847567498567e-07)); + u = vmla(u, s, vcast_vd_d(2.48015872890001867311915e-05)); + u = vmla(u, s, vcast_vd_d(-0.00138888888888714019282329)); + u = vmla(u, s, vcast_vd_d(0.0416666666666665519592062)); + u = vmla(u, s, vcast_vd_d(-0.5)); + + ry = vadd(vcast_vd_d(1), vmul(s, u)); + + m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(0)); + r.x = vsel(m, rx, ry); + r.y = vsel(m, ry, rx); + + m = vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2)); + r.x = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.x))); + + m = vmaski_eq(vandi(vaddi(q, vcast_vi_i(1)), vcast_vi_i(2)), vcast_vi_i(2)); + 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(lhdrengine::RT_NAN), r.x); + r.y = vsel(m, vcast_vd_d(lhdrengine::RT_NAN), r.y); + + return r; +} + +static INLINE vdouble xtan(vdouble d) { + vint q; + vdouble u, s, x; + vmask m; + + q = vrint_vi_vd(vmul(d, vcast_vd_d(lhdrengine::RT_2_PI))); + + u = vcast_vd_vi(q); + x = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2))); + x = vadd(x, vmul(u, vcast_vd_d(-PI4_B*2))); + x = vadd(x, vmul(u, vcast_vd_d(-PI4_C*2))); + + s = vmul(x, x); + + m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)); + x = vsel(m, vneg(x), x); + + u = vcast_vd_d(1.01419718511083373224408e-05); + u = vmla(u, s, vcast_vd_d(-2.59519791585924697698614e-05)); + u = vmla(u, s, vcast_vd_d(5.23388081915899855325186e-05)); + u = vmla(u, s, vcast_vd_d(-3.05033014433946488225616e-05)); + u = vmla(u, s, vcast_vd_d(7.14707504084242744267497e-05)); + u = vmla(u, s, vcast_vd_d(8.09674518280159187045078e-05)); + u = vmla(u, s, vcast_vd_d(0.000244884931879331847054404)); + u = vmla(u, s, vcast_vd_d(0.000588505168743587154904506)); + u = vmla(u, s, vcast_vd_d(0.00145612788922812427978848)); + u = vmla(u, s, vcast_vd_d(0.00359208743836906619142924)); + u = vmla(u, s, vcast_vd_d(0.00886323944362401618113356)); + u = vmla(u, s, vcast_vd_d(0.0218694882853846389592078)); + u = vmla(u, s, vcast_vd_d(0.0539682539781298417636002)); + u = vmla(u, s, vcast_vd_d(0.133333333333125941821962)); + u = vmla(u, s, vcast_vd_d(0.333333333333334980164153)); + + u = vmla(s, vmul(u, x), x); + + u = vsel(m, vrec(u), u); + + u = vsel(vmask_isinf(d), vcast_vd_d(lhdrengine::RT_NAN), u); + + return u; +} + +static INLINE vdouble atan2k(vdouble y, vdouble x) { + vdouble s, t, u; + vint q; + vmask p; + + q = vseli_lt(x, vcast_vd_d(0), vcast_vi_i(-2), vcast_vi_i(0)); + x = vabs(x); + + q = vseli_lt(x, y, vaddi(q, vcast_vi_i(1)), q); + p = vmask_lt(x, y); + s = vsel (p, vneg(x), y); + t = vmax (x, y); + + s = vdiv(s, t); + t = vmul(s, s); + + u = vcast_vd_d(-1.88796008463073496563746e-05); + u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797)); + u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471)); + u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403)); + u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809)); + u = vmla(u, t, vcast_vd_d(0.016599329773529201970117)); + u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861)); + u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897)); + u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934)); + u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675)); + u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113)); + u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313)); + u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562)); + u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029)); + u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153)); + u = vmla(u, t, vcast_vd_d(0.111111105648261418443745)); + u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765)); + u = vmla(u, t, vcast_vd_d(0.199999999996591265594148)); + 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(lhdrengine::RT_PI/2))); + + return t; +} + +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(lhdrengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(lhdrengine::RT_PI/2), x))), r); + r = vsel(vmask_isinf(y), vsub(vcast_vd_d(lhdrengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(lhdrengine::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(lhdrengine::RT_PI), vcast_vd_d(0)), r); + + return vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(lhdrengine::RT_NAN), vmulsign(r, y)); +} + +static INLINE vdouble xasin(vdouble d) { + vdouble x, y; + x = vadd(vcast_vd_d(1), d); + y = vsub(vcast_vd_d(1), d); + x = vmul(x, y); + x = vsqrt(x); + x = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), atan2k(vabs(d), x)); + return vmulsign(x, d); +} + +static INLINE vdouble xacos(vdouble d) { + vdouble x, y; + x = vadd(vcast_vd_d(1), d); + y = vsub(vcast_vd_d(1), 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(lhdrengine::RT_PI)); + x = vadd(x, y); + return x; +} + +static INLINE vdouble xatan(vdouble s) { + vdouble t, u; + vint q; + + q = vseli_lt(s, vcast_vd_d(0), vcast_vi_i(2), vcast_vi_i(0)); + s = vabs(s); + + q = vseli_lt(vcast_vd_d(1), s, vaddi(q, vcast_vi_i(1)), q); + s = vsel(vmask_lt(vcast_vd_d(1), s), vdiv(vcast_vd_d(1), s), s); + + t = vmul(s, s); + + u = vcast_vd_d(-1.88796008463073496563746e-05); + u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797)); + u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471)); + u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403)); + u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809)); + u = vmla(u, t, vcast_vd_d(0.016599329773529201970117)); + u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861)); + u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897)); + u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934)); + u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675)); + u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113)); + u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313)); + u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562)); + u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029)); + u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153)); + u = vmla(u, t, vcast_vd_d(0.111111105648261418443745)); + u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765)); + u = vmla(u, t, vcast_vd_d(0.199999999996591265594148)); + u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124)); + + 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(lhdrengine::RT_PI/2), t), t); + t = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2)), vneg(t), t); + + return t; +} + +static INLINE vdouble xlog(vdouble d) { + vdouble x, x2; + vdouble t, m; + vint e; + + e = vilogbp1(vmul(d, vcast_vd_d(0.7071))); + m = vldexp(d, vsubi(vcast_vi_i(0), e)); + + x = vdiv(vadd(vcast_vd_d(-1), m), vadd(vcast_vd_d(1), m)); + x2 = vmul(x, x); + + t = vcast_vd_d(0.148197055177935105296783); + t = vmla(t, x2, vcast_vd_d(0.153108178020442575739679)); + t = vmla(t, x2, vcast_vd_d(0.181837339521549679055568)); + t = vmla(t, x2, vcast_vd_d(0.22222194152736701733275)); + t = vmla(t, x2, vcast_vd_d(0.285714288030134544449368)); + t = vmla(t, x2, vcast_vd_d(0.399999999989941956712869)); + t = vmla(t, x2, vcast_vd_d(0.666666666666685503450651)); + t = vmla(t, x2, vcast_vd_d(2)); + + x = vadd(vmul(x, t), vmul(vcast_vd_d(0.693147180559945286226764), vcast_vd_vi(e))); + + x = vsel(vmask_ispinf(d), vcast_vd_d(lhdrengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(0), d), vcast_vd_d(lhdrengine::RT_NAN), x); + x = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-lhdrengine::RT_INFINITY), x); + + return x; +} + +static INLINE vdouble xexp(vdouble d) { + vint q = vrint_vi_vd(vmul(d, vcast_vd_d(R_LN2))); + vdouble s, u; + + s = vadd(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U))); + s = vadd(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L))); + + u = vcast_vd_d(2.08860621107283687536341e-09); + u = vmla(u, s, vcast_vd_d(2.51112930892876518610661e-08)); + u = vmla(u, s, vcast_vd_d(2.75573911234900471893338e-07)); + u = vmla(u, s, vcast_vd_d(2.75572362911928827629423e-06)); + u = vmla(u, s, vcast_vd_d(2.4801587159235472998791e-05)); + u = vmla(u, s, vcast_vd_d(0.000198412698960509205564975)); + u = vmla(u, s, vcast_vd_d(0.00138888888889774492207962)); + u = vmla(u, s, vcast_vd_d(0.00833333333331652721664984)); + u = vmla(u, s, vcast_vd_d(0.0416666666666665047591422)); + u = vmla(u, s, vcast_vd_d(0.166666666666666851703837)); + u = vmla(u, s, vcast_vd_d(0.5)); + + u = vadd(vcast_vd_d(1), vadd(s, vmul(vmul(s, s), u))); + + u = vldexp(u, q); + + u = vsel(vmask_isminf(d), vcast_vd_d(0), u); + + return u; +} + +static INLINE vdouble2 logk(vdouble d) { + vdouble2 x, x2; + vdouble t, m; + vint e; + + e = vilogbp1(vmul(d, vcast_vd_d(0.7071))); + m = vldexp(d, vsubi(vcast_vi_i(0), e)); + + x = div_dd(add2_ss(vcast_vd_d(-1), m), add2_ss(vcast_vd_d(1), m)); + x2 = squ_d(x); + x2 = normalize_d(x2); + + t = vcast_vd_d(0.134601987501262130076155); + t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288)); + t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524)); + t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686)); + t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781)); + t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718)); + t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458)); + t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645)); + + return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)), + vcast_vd_vi(e)), + add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t))); +} + +static INLINE vdouble expk(vdouble2 d) { + vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2)); + vint q = vrint_vi_vd(u); + vdouble2 s, t; + + s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U))); + s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L))); + + q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49))); + + s = normalize_d(s); + + u = vcast_vd_d(2.51069683420950419527139e-08); + u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07)); + u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06)); + u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05)); + u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111)); + u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529)); + u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081)); + u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449)); + u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535)); + u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722)); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(vcast_vd_d(1), t); + u = vadd(t.x, t.y); + u = vldexp(u, q); + + return u; +} + +static INLINE vdouble xpow(vdouble x, vdouble y) { +#if 1 + vmask yisint = vmask_eq(vcast_vd_vi(vrint_vi_vd(y)), y); + vmask yisodd = vandm(vmaski_eq(vandi(vrint_vi_vd(y), vcast_vi_i(1)), vcast_vi_i(1)), yisint); + + vdouble result = expk(mul_ds(logk(vabs(x)), y)); + + //result = vsel(vmask_isnan(result), vcast_vd_d(lhdrengine::RT_INFINITY), result); + + result = vmul(result, + vsel(vmask_gt(x, vcast_vd_d(0)), + vcast_vd_d(1), + vsel(yisint, + vsel(yisodd, + vcast_vd_d(-1), + vcast_vd_d(1)), + vcast_vd_d(lhdrengine::RT_NAN)))); + + vdouble efx = vreinterpret_vd_vm(vxorm(vreinterpret_vm_vd(vsub(vabs(x), vcast_vd_d(1))), vsignbit(y))); + + result = vsel(vmask_isinf(y), + vsel(vmask_lt(efx, vcast_vd_d(0)), + vcast_vd_d(0), + vsel(vmask_eq(efx, vcast_vd_d(0)), + vcast_vd_d(1.0), + vcast_vd_d(lhdrengine::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(lhdrengine::RT_INFINITY))), + result); + + result = vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(lhdrengine::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); + + return result; +#else + return expk(mul_ds(logk(x), y)); +#endif +} + +static INLINE vdouble2 expk2(vdouble2 d) { + vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2)); + vint q = vrint_vi_vd(u); + vdouble2 s, t; + + s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U))); + s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L))); + + q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49))); + + s = normalize_d(s); + + u = vcast_vd_d(2.51069683420950419527139e-08); + u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07)); + u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06)); + u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05)); + u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111)); + u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529)); + u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081)); + u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449)); + u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535)); + u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722)); + + t = add_dd(s, mul_ds(squ_d(s), u)); + + t = add_sd(vcast_vd_d(1), t); + + return dd(vldexp(t.x, q), vldexp(t.y, q)); +} + +static INLINE vdouble xsinh(vdouble x) { + vdouble y = vabs(x); + vdouble2 d = expk2(dd(y, vcast_vd_d(0))); + 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(lhdrengine::RT_INFINITY), y); + y = vmulsign(y, x); + y = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), y); + + return y; +} + +static INLINE vdouble xcosh(vdouble x) { + vdouble2 d = expk2(dd(x, vcast_vd_d(0))); + 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(lhdrengine::RT_INFINITY), y); + y = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), y); + + return y; +} + +static INLINE vdouble xtanh(vdouble x) { + vdouble y = vabs(x); + vdouble2 d = expk2(dd(y, vcast_vd_d(0))); + vdouble2 e = div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d); + d = div_dd(add2_dd(d, scale_d(e, vcast_vd_d(-1))), add2_dd(d, e)); + y = d.x + d.y; + + 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(lhdrengine::RT_NAN), y); + + return y; +} + +static INLINE vdouble2 logk2(vdouble2 d) { + vdouble2 x, x2, m; + vdouble t; + vint e; + + d = normalize_d(d); + e = vilogbp1(vmul(d.x, vcast_vd_d(0.7071))); + m = scale_d(d, vldexp(vcast_vd_d(1), vsubi(vcast_vi_i(0), e))); + + x = div_dd(add2_ds(m, vcast_vd_d(-1)), add2_ds(m, vcast_vd_d(1))); + x2 = squ_d(x); + x2 = normalize_d(x2); + + t = vcast_vd_d(0.134601987501262130076155); + t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288)); + t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524)); + t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686)); + t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781)); + t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718)); + t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458)); + t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645)); + + return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)), + vcast_vd_vi(e)), + add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t))); +} + +static INLINE vdouble xasinh(vdouble x) { + vdouble y = vabs(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(lhdrengine::RT_INFINITY), y); + y = vmulsign(y, x); + y = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), y); + + return y; +} + +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(lhdrengine::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(lhdrengine::RT_NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), y); + + return y; +} + +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(lhdrengine::RT_NAN), vsel(vmask_eq(y, vcast_vd_d(1.0)), vcast_vd_d(lhdrengine::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(lhdrengine::RT_NAN), y); + y = vmulsign(y, x); + y = vsel(vmask_isnan(x), vcast_vd_d(lhdrengine::RT_NAN), y); + + return y; +} + +static INLINE vdouble xcbrt(vdouble d) { + vdouble x, y, q = vcast_vd_d(1.0); + vint e, qu, re; + vdouble t; + + e = vilogbp1(vabs(d)); + d = vldexp(d, vsubi(vcast_vi_i(0), e)); + + t = vadd(vcast_vd_vi(e), vcast_vd_d(6144)); + qu = vtruncate_vi_vd(vdiv(t, vcast_vd_d(3))); + re = vtruncate_vi_vd(vsub(t, vmul(vcast_vd_vi(qu), vcast_vd_d(3)))); + + q = vsel(vmaski_eq(re, vcast_vi_i(1)), vcast_vd_d(1.2599210498948731647672106), q); + q = vsel(vmaski_eq(re, vcast_vi_i(2)), vcast_vd_d(1.5874010519681994747517056), q); + q = vldexp(q, vsubi(qu, vcast_vi_i(2048))); + + q = vmulsign(q, d); + + d = vabs(d); + + x = vcast_vd_d(-0.640245898480692909870982); + x = vmla(x, d, vcast_vd_d(2.96155103020039511818595)); + x = vmla(x, d, vcast_vd_d(-5.73353060922947843636166)); + x = vmla(x, d, vcast_vd_d(6.03990368989458747961407)); + x = vmla(x, d, vcast_vd_d(-3.85841935510444988821632)); + x = vmla(x, d, vcast_vd_d(2.2307275302496609725722)); + + y = vmul(x, x); y = vmul(y, y); x = vsub(x, vmul(vmla(d, y, vneg(x)), vcast_vd_d(1.0 / 3.0))); + y = vmul(vmul(d, x), x); + y = vmul(vsub(y, vmul(vmul(vcast_vd_d(2.0 / 3.0), y), vmla(y, x, vcast_vd_d(-1.0)))), q); + + return y; +} + +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(lhdrengine::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(lhdrengine::RT_INFINITY), u); + u = vsel(vmask_isminf(a), vcast_vd_d(0), u); + return u; +} + +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(lhdrengine::RT_INFINITY), x); + x = vsel(vmask_isminf(a), vcast_vd_d(-1), x); + return x; +} + +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(lhdrengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(0), a), vcast_vd_d(lhdrengine::RT_NAN), x); + x = vsel(vmask_eq(a, vcast_vd_d(0)), vcast_vd_d(-lhdrengine::RT_INFINITY), x); + + return x; +} + +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(lhdrengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(-1), a), vcast_vd_d(lhdrengine::RT_NAN), x); + x = vsel(vmask_eq(a, vcast_vd_d(-1)), vcast_vd_d(-lhdrengine::RT_INFINITY), x); + + return x; +} + +// + +typedef struct { + vfloat x, y; +} vfloat2; + +static INLINE vfloat vabsf(vfloat f) { return (vfloat)vandnotm((vmask)vcast_vf_f(-0.0f), (vmask)f); } +static INLINE vfloat vnegf(vfloat f) { return (vfloat)vxorm((vmask)f, (vmask)vcast_vf_f(-0.0f)); } + +#if defined( __SSE4_1__ ) && defined( __x86_64__ ) + // only one instruction when using SSE4.1 + static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) { + return _mm_blendv_ps(y,x,(vfloat)mask); + } + + static INLINE vint vselc(vmask mask, vint x, vint y) { + return _mm_blendv_epi8(y,x,mask); + } + +#else + // three instructions when using SSE2 + static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) { + return (vfloat)vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y)); + } + + static INLINE vint vselc(vmask mask, vint x, vint y) { + return vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y)); + } +#endif + +static INLINE vfloat vselfzero(vmask mask, vfloat x) { + // returns value of x if corresponding mask bits are 1, else returns 0 + // faster than vself(mask, x, ZEROV) + return _mm_and_ps((vfloat)mask, x); +} +static INLINE vfloat vselfnotzero(vmask mask, vfloat x) { + // returns value of x if corresponding mask bits are 0, else returns 0 + // faster than vself(mask, ZEROV, x) + return _mm_andnot_ps((vfloat)mask, x); +} + +static INLINE vint vselizero(vmask mask, vint x) { + // returns value of x if corresponding mask bits are 1, else returns 0 + // faster than vselc(mask, x, ZEROV) + return _mm_and_si128(mask, x); +} +static INLINE vint vselinotzero(vmask mask, vint x) { + // returns value of x if corresponding mask bits are 0, else returns 0 + // faster than vselc(mask, ZEROV, x) + return _mm_andnot_si128(mask, x); +} + +static INLINE vint2 vseli2_lt(vfloat f0, vfloat f1, vint2 x, vint2 y) { + vint2 m2 = vcast_vi2_vm(vmaskf_lt(f0, f1)); + return vori2(vandi2(m2, x), vandnoti2(m2, y)); +} + +static INLINE vmask vsignbitf(vfloat f) { + return vandm((vmask)f, (vmask)vcast_vf_f(-0.0f)); +} + +static INLINE vfloat vmulsignf(vfloat x, vfloat y) { + return (vfloat)vxorm((vmask)x, vsignbitf(y)); +} + +static INLINE vfloat vsignf(vfloat f) { + return (vfloat)vorm((vmask)vcast_vf_f(1.0f), vandm((vmask)vcast_vf_f(-0.0f), (vmask)f)); +} + +static INLINE vmask vmaskf_isinf(vfloat d) { return vmaskf_eq(vabsf(d), vcast_vf_f(INFINITYf)); } +static INLINE vmask vmaskf_ispinf(vfloat d) { return vmaskf_eq(d, vcast_vf_f(INFINITYf)); } +static INLINE vmask vmaskf_isminf(vfloat d) { return vmaskf_eq(d, vcast_vf_f(-INFINITYf)); } +static INLINE vmask vmaskf_isnan(vfloat d) { return vmaskf_neq(d, d); } +static INLINE vfloat visinf2f(vfloat d, vfloat m) { return (vfloat)vandm(vmaskf_isinf(d), vorm(vsignbitf(d), (vmask)m)); } +static INLINE vfloat visinff(vfloat d) { return visinf2f(d, vcast_vf_f(1.0f)); } + +static INLINE vint2 vilogbp1f(vfloat d) { + vmask m = vmaskf_lt(d, vcast_vf_f(5.421010862427522E-20f)); + d = vself(m, vmulf(vcast_vf_f(1.8446744073709552E19f), d), d); + vint2 q = vandi2(vsrli2(vcast_vi2_vm(vreinterpret_vm_vf(d)), 23), vcast_vi2_i(0xff)); + q = vsubi2(q, vseli2(m, vcast_vi2_i(64 + 0x7e), vcast_vi2_i(0x7e))); + return q; +} + +static INLINE vfloat vldexpf(vfloat x, vint2 q) { + vfloat u; + vint2 m = vsrai2(q, 31); + m = vslli2(vsubi2(vsrai2(vaddi2(m, q), 6), m), 4); + q = vsubi2(q, vslli2(m, 2)); + u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(m, vcast_vi2_i(0x7f)), 23))); + x = vmulf(vmulf(vmulf(vmulf(x, u), u), u), u); + u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(q, vcast_vi2_i(0x7f)), 23))); + return vmulf(x, u); +} + +static INLINE vfloat xsinf(vfloat d) { + vint2 q; + vfloat u, s; + + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)lhdrengine::RT_1_PI))); + + u = vcast_vf_vi2(q); + d = vmlaf(u, vcast_vf_f(-PI4_Af*4), d); + d = vmlaf(u, vcast_vf_f(-PI4_Bf*4), d); + d = vmlaf(u, vcast_vf_f(-PI4_Cf*4), d); + d = vmlaf(u, vcast_vf_f(-PI4_Df*4), d); + + s = vmulf(d, d); + + d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vnegf(d), d); + + u = vcast_vf_f(2.6083159809786593541503e-06f); + u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f)); + u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f)); + u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f)); + + u = vmlaf(s, vmulf(u, d), d); + + return u; +} + +static INLINE vfloat xcosf(vfloat d) { + vint2 q; + vfloat u, s; + + q = vrint_vi2_vf(vsubf(vmulf(d, vcast_vf_f((float)lhdrengine::RT_1_PI)), vcast_vf_f(0.5f))); + q = vaddi2(vaddi2(q, q), vcast_vi2_i(1)); + + u = vcast_vf_vi2(q); + d = vmlaf(u, vcast_vf_f(-PI4_Af*2), d); + d = vmlaf(u, vcast_vf_f(-PI4_Bf*2), d); + d = vmlaf(u, vcast_vf_f(-PI4_Cf*2), d); + d = vmlaf(u, vcast_vf_f(-PI4_Df*2), d); + + s = vmulf(d, d); + + d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), d, vnegf(d)); + + u = vcast_vf_f(2.6083159809786593541503e-06f); + u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f)); + u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f)); + u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f)); + + u = vmlaf(s, vmulf(u, d), d); + + return u; +} + +static INLINE vfloat2 xsincosf(vfloat d) { + vint2 q; + vmask m; + vfloat u, s, t, rx, ry; + vfloat2 r; + + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)lhdrengine::RT_2_PI))); + + s = d; + + u = vcast_vf_vi2(q); + s = vmlaf(u, vcast_vf_f(-PI4_Af*2), s); + s = vmlaf(u, vcast_vf_f(-PI4_Bf*2), s); + s = vmlaf(u, vcast_vf_f(-PI4_Cf*2), s); + s = vmlaf(u, vcast_vf_f(-PI4_Df*2), s); + + t = s; + + s = vmulf(s, s); + + u = vcast_vf_f(-0.000195169282960705459117889f); + u = vmlaf(u, s, vcast_vf_f(0.00833215750753879547119141f)); + u = vmlaf(u, s, vcast_vf_f(-0.166666537523269653320312f)); + u = vmulf(vmulf(u, s), t); + + rx = vaddf(t, u); + + u = vcast_vf_f(-2.71811842367242206819355e-07f); + u = vmlaf(u, s, vcast_vf_f(2.47990446951007470488548e-05f)); + u = vmlaf(u, s, vcast_vf_f(-0.00138888787478208541870117f)); + u = vmlaf(u, s, vcast_vf_f(0.0416666641831398010253906f)); + u = vmlaf(u, s, vcast_vf_f(-0.5)); + + ry = vaddf(vcast_vf_f(1), vmulf(s, u)); + + m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(0)); + r.x = vself(m, rx, ry); + r.y = vself(m, ry, rx); + + m = vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)); + r.x = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.x))); + + m = vmaski2_eq(vandi2(vaddi2(q, vcast_vi2_i(1)), vcast_vi2_i(2)), vcast_vi2_i(2)); + 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(lhdrengine::RT_NAN), r.x); + r.y = vself(m, vcast_vf_f(lhdrengine::RT_NAN), r.y); + + return r; +} + +static INLINE vfloat xtanf(vfloat d) { + vint2 q; + vmask m; + vfloat u, s, x; + + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)(2 * lhdrengine::RT_1_PI)))); + + x = d; + + u = vcast_vf_vi2(q); + x = vmlaf(u, vcast_vf_f(-PI4_Af*2), x); + x = vmlaf(u, vcast_vf_f(-PI4_Bf*2), x); + x = vmlaf(u, vcast_vf_f(-PI4_Cf*2), x); + x = vmlaf(u, vcast_vf_f(-PI4_Df*2), x); + + s = vmulf(x, x); + + m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)); + x = vself(m, vnegf(x), x); + + u = vcast_vf_f(0.00927245803177356719970703f); + u = vmlaf(u, s, vcast_vf_f(0.00331984995864331722259521f)); + u = vmlaf(u, s, vcast_vf_f(0.0242998078465461730957031f)); + u = vmlaf(u, s, vcast_vf_f(0.0534495301544666290283203f)); + u = vmlaf(u, s, vcast_vf_f(0.133383005857467651367188f)); + u = vmlaf(u, s, vcast_vf_f(0.333331853151321411132812f)); + + u = vmlaf(s, vmulf(u, x), x); + + u = vself(m, vrecf(u), u); + + u = vself(vmaskf_isinf(d), vcast_vf_f(NANf), u); + + return u; +} + +static INLINE vfloat xatanf(vfloat s) { + vfloat t, u; + vint2 q; + + q = vseli2_lt(s, vcast_vf_f(0.0f), vcast_vi2_i(2), vcast_vi2_i(0)); + s = vabsf(s); + + q = vseli2_lt(vcast_vf_f(1.0f), s, vaddi2(q, vcast_vi2_i(1)), q); + s = vself(vmaskf_lt(vcast_vf_f(1.0f), s), vdivf(vcast_vf_f(1.0f), s), s); + + t = vmulf(s, s); + + u = vcast_vf_f(0.00282363896258175373077393f); + u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f)); + u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f)); + u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f)); + u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f)); + u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f)); + u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f)); + u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f)); + + 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)(lhdrengine::RT_PI/2)), t), t); + t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), vnegf(t), t); + + return t; +} + +static INLINE vfloat atan2kf(vfloat y, vfloat x) { + vfloat s, t, u; + vint2 q; + vmask p; + + q = vseli2_lt(x, vcast_vf_f(0.0f), vcast_vi2_i(-2), vcast_vi2_i(0)); + x = vabsf(x); + + q = vseli2_lt(x, y, vaddi2(q, vcast_vi2_i(1)), q); + p = vmaskf_lt(x, y); + s = vself(p, vnegf(x), y); + t = vmaxf(x, y); + + s = vdivf(s, t); + t = vmulf(s, s); + + u = vcast_vf_f(0.00282363896258175373077393f); + u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f)); + u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f)); + u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f)); + u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f)); + u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f)); + u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f)); + 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)(lhdrengine::RT_PI/2)))); + + return t; +} + +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)(lhdrengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(lhdrengine::RT_PI/2)), x))), r); + r = vself(vmaskf_isinf(y), vsubf(vcast_vf_f((float)(lhdrengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(lhdrengine::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)lhdrengine::RT_PI)), r); + + return vself(vorm(vmaskf_isnan(x), vmaskf_isnan(y)), vcast_vf_f(NANf), vmulsignf(r, y)); +} + +static INLINE vfloat xasinf(vfloat d) { + vfloat x, y; + x = vaddf(vcast_vf_f(1.0f), d); + y = vsubf(vcast_vf_f(1.0f), d); + x = vmulf(x, y); + x = vsqrtf(x); + x = vself(vmaskf_isnan(x), vcast_vf_f(NANf), atan2kf(vabsf(d), x)); + return vmulsignf(x, d); +} + +static INLINE vfloat xacosf(vfloat d) { + vfloat x, y; + x = vaddf(vcast_vf_f(1.0f), d); + y = vsubf(vcast_vf_f(1.0f), 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)lhdrengine::RT_PI)); + x = vaddf(x, y); + return x; +} + +static INLINE vfloat xlogf(vfloat d) { + vfloat x, x2, t, m; + vint2 e; + + e = vilogbp1f(vmulf(d, vcast_vf_f(0.7071f))); + m = vldexpf(d, vsubi2(vcast_vi2_i(0), e)); + + x = vdivf(vaddf(vcast_vf_f(-1.0f), m), vaddf(vcast_vf_f(1.0f), m)); + x2 = vmulf(x, x); + + t = vcast_vf_f(0.2371599674224853515625f); + t = vmlaf(t, x2, vcast_vf_f(0.285279005765914916992188f)); + t = vmlaf(t, x2, vcast_vf_f(0.400005519390106201171875f)); + t = vmlaf(t, x2, vcast_vf_f(0.666666567325592041015625f)); + t = vmlaf(t, x2, vcast_vf_f(2.0f)); + + x = vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e))); + + x = vself(vmaskf_ispinf(d), vcast_vf_f(INFINITYf), x); + x = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(NANf), x); + x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(-INFINITYf), x); + + return x; +} + +static INLINE vfloat xlogf0(vfloat d) { + vfloat x, x2, t, m; + vint2 e; + + e = vilogbp1f(vmulf(d, vcast_vf_f(0.7071f))); + m = vldexpf(d, vsubi2(vcast_vi2_i(0), e)); + + x = vdivf(vaddf(vcast_vf_f(-1.0f), m), vaddf(vcast_vf_f(1.0f), m)); + x2 = vmulf(x, x); + + t = vcast_vf_f(0.2371599674224853515625f); + t = vmlaf(t, x2, vcast_vf_f(0.285279005765914916992188f)); + t = vmlaf(t, x2, vcast_vf_f(0.400005519390106201171875f)); + t = vmlaf(t, x2, vcast_vf_f(0.666666567325592041015625f)); + t = vmlaf(t, x2, vcast_vf_f(2.0f)); + + x = vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e))); + + x = vself(vmaskf_ispinf(d), vcast_vf_f(0), x); + x = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(0), x); + x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(0), x); + + return x; +} + +static INLINE vfloat xlogfNoCheck(vfloat d) { // this version does not check input values. Use it only when you know the input values are > 0 e.g. when filling a lookup table + vfloat x, x2, t, m; + vint2 e; + + e = vilogbp1f(vmulf(d, vcast_vf_f(0.7071f))); + m = vldexpf(d, vsubi2(vcast_vi2_i(0), e)); + + x = vdivf(vaddf(vcast_vf_f(-1.0f), m), vaddf(vcast_vf_f(1.0f), m)); + x2 = vmulf(x, x); + + t = vcast_vf_f(0.2371599674224853515625f); + t = vmlaf(t, x2, vcast_vf_f(0.285279005765914916992188f)); + t = vmlaf(t, x2, vcast_vf_f(0.400005519390106201171875f)); + t = vmlaf(t, x2, vcast_vf_f(0.666666567325592041015625f)); + t = vmlaf(t, x2, vcast_vf_f(2.0f)); + + return vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e))); + +} + +static INLINE vfloat xexpf(vfloat d) { + vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f))); + vfloat s, u; + + s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d); + s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s); + + u = vcast_vf_f(0.00136324646882712841033936f); + u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f)); + u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f)); + u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f)); + u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f)); + + u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s)); + + u = vldexpf(u, q); + + u = vself(vmaskf_isminf(d), vcast_vf_f(0.0f), u); +// -104.0 + u = vself(vmaskf_gt(vcast_vf_f(-104), d), vcast_vf_f(0), u); + return u; +} + +static INLINE vfloat xexpfNoCheck(vfloat d) { // this version does not check input values. Use it only when you know the input values are > -104.f e.g. when filling a lookup table + vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f))); + vfloat s, u; + + s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d); + s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s); + + u = vcast_vf_f(0.00136324646882712841033936f); + u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f)); + u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f)); + u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f)); + u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f)); + + u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s)); + + return vldexpf(u, q); +} + +static INLINE vfloat xcbrtf(vfloat d) { + vfloat x, y, q = vcast_vf_f(1.0), t; + vint2 e, qu, re; + + e = vilogbp1f(vabsf(d)); + d = vldexpf(d, vsubi2(vcast_vi2_i(0), e)); + + t = vaddf(vcast_vf_vi2(e), vcast_vf_f(6144)); + qu = vtruncate_vi2_vf(vdivf(t, vcast_vf_f(3))); + re = vtruncate_vi2_vf(vsubf(t, vmulf(vcast_vf_vi2(qu), vcast_vf_f(3)))); + + q = vself(vmaski2_eq(re, vcast_vi2_i(1)), vcast_vf_f(1.2599210498948731647672106f), q); + q = vself(vmaski2_eq(re, vcast_vi2_i(2)), vcast_vf_f(1.5874010519681994747517056f), q); + q = vldexpf(q, vsubi2(qu, vcast_vi2_i(2048))); + + q = vmulsignf(q, d); + d = vabsf(d); + + x = vcast_vf_f(-0.601564466953277587890625f); + x = vmlaf(x, d, vcast_vf_f(2.8208892345428466796875f)); + x = vmlaf(x, d, vcast_vf_f(-5.532182216644287109375f)); + x = vmlaf(x, d, vcast_vf_f(5.898262500762939453125f)); + x = vmlaf(x, d, vcast_vf_f(-3.8095417022705078125f)); + x = vmlaf(x, d, vcast_vf_f(2.2241256237030029296875f)); + + y = vmulf(vmulf(d, x), x); + y = vmulf(vsubf(y, vmulf(vmulf(vcast_vf_f(2.0f / 3.0f), y), vmlaf(y, x, vcast_vf_f(-1.0f)))), q); + + return y; +} + +static INLINE vfloat LIMV( vfloat a, vfloat b, vfloat c ) { +return vmaxf( b, vminf(a,c)); +} + +static INLINE vfloat SQRV(vfloat a){ + return a * a; +} + +static inline void vswap( vmask condition, vfloat &a, vfloat &b) { + // conditional swap the elements of two vfloats + vfloat temp = vself(condition, a, b); // the values which fit to condition + condition = vnotm(condition); // invert the condition + a = vself(condition, a, b); // the values which fit to inverted condition + b = temp; +} + +static inline float vhadd( vfloat a ) { + // returns a[0] + a[1] + a[2] + a[3] + a += _mm_movehl_ps(a, a); + return _mm_cvtss_f32(_mm_add_ss(a, _mm_shuffle_ps(a, a, 1))); +} + +static inline float vhmax( vfloat a ) { + // returns max(a[0],a[1],a[2],a[3]) + a = vmaxf(a, _mm_movehl_ps(a, a)); + return _mm_cvtss_f32(_mm_max_ss(a, _mm_shuffle_ps(a, a, 1))); +} + +static inline float vhmin( vfloat a ) { + // returns max(a[0],a[1],a[2],a[3]) + a = vminf(a, _mm_movehl_ps(a, a)); + return _mm_cvtss_f32(_mm_min_ss(a, _mm_shuffle_ps(a, a, 1))); +} + +static INLINE vfloat vmul2f(vfloat a){ + // fastest way to multiply by 2 + return a + a; +} + +static INLINE vfloat vintpf(vfloat a, vfloat b, vfloat c) { + // calculate a * b + (1 - a) * c (interpolate two values) + // following is valid: + // vintpf(a, b+x, c+x) = vintpf(a, b, c) + x + // vintpf(a, b*x, c*x) = vintpf(a, b, c) * x + return a * (b-c) + c; +} + +static INLINE vfloat vdup(vfloat a){ + // returns { a[0],a[0],a[1],a[1] } + return _mm_unpacklo_ps( a, a ); +} + +static INLINE vfloat vaddc2vfu(float &a) +{ + // loads a[0]..a[7] and returns { a[0]+a[1], a[2]+a[3], a[4]+a[5], a[6]+a[7] } + vfloat a1 = _mm_loadu_ps( &a ); + vfloat a2 = _mm_loadu_ps( (&a) + 4 ); + return _mm_shuffle_ps(a1,a2,_MM_SHUFFLE( 2,0,2,0 )) + _mm_shuffle_ps(a1,a2,_MM_SHUFFLE( 3,1,3,1 )); +} + +static INLINE vfloat vadivapb (vfloat a, vfloat b) { + return a / (a+b); +} + +static INLINE void vconvertrgbrgbrgbrgb2rrrrggggbbbb (const float * src, vfloat &rv, vfloat &gv, vfloat &bv) { // cool function name, isn't it ? :P + // converts a sequence of 4 float RGB triplets to 3 red, green and blue quadruples + rv = _mm_setr_ps(src[0],src[3],src[6],src[9]); + gv = _mm_setr_ps(src[1],src[4],src[7],src[10]); + bv = _mm_setr_ps(src[2],src[5],src[8],src[11]); +} + +#if defined( __SSE4_1__ ) && defined( __x86_64__ ) +static INLINE vfloat vceilf(vfloat x) { + return _mm_round_ps(x, _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC); +} + +#else + +static INLINE vfloat vceilf(vfloat x) { + __m128i zerov = _mm_setzero_si128(); + zerov = _mm_cmpeq_epi32(zerov, zerov); + const vfloat onev = (vfloat)_mm_slli_epi32(_mm_srli_epi32(zerov, 25), 23); //create vector 1.0f + const vfloat xi = _mm_cvtepi32_ps(_mm_cvttps_epi32(x)); + return xi + _mm_and_ps(_mm_cmplt_ps(xi, x), onev); +} +#endif +#endif // __SSE2__ +#endif // SLEEFSSEAVX diff -Nru luminance-hdr-2.5.1+dfsg/src/StopWatch.h luminance-hdr-2.6.0/src/StopWatch.h --- luminance-hdr-2.5.1+dfsg/src/StopWatch.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/StopWatch.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * This file is part of Luminance HDR. + * + * Luminance HDR 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. + * + * Luminance HDR 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 Luminance HDR. If not, see . + * + * This file was copied from RawTherapee on 5 Dec 2017, commit 08203cc. + * + * Author: reine +*/ + +#ifndef STOPWATCH_H +#define STOPWATCH_H +#include +#include "mytime.h" + +#ifdef BENCHMARK + #define BENCHFUN StopWatch StopFun(__func__); + #define BENCHFUNMICRO StopWatch StopFun(__func__, true); +#else + #define BENCHFUN + #define BENCHFUNMICRO +#endif + +class StopWatch +{ +public: + + explicit StopWatch( const char* msg, bool microseconds = false ) : microseconds(microseconds) + { + message = msg; + start(); + stopped = false; + } + ~StopWatch() + { + if(!stopped) { + stop(); + } + } + void start() + { + startTime.set(); + }; + void stop() + { + stopTime.set(); + if(!microseconds) { + long elapsedTime = stopTime.etime(startTime) / 1000; + std::cout << message << " took " << elapsedTime << " ms" << std::endl; + } else { + long elapsedTime = stopTime.etime(startTime); + std::cout << message << " took " << elapsedTime << " us" << std::endl; + } + stopped = true; + } + void stop(const char *msg) + { + message = msg; + stop(); + }; +private: + bool microseconds; + MyTime startTime; + MyTime stopTime; + const char *message; + bool stopped; +}; + +#endif /* STOPWATCH_H */ diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,5 +1,6 @@ /** - * @brief Ashikhmin Tone Mapping Operator: tone reproduction for displaying high contrast scenes + * @brief Ashikhmin Tone Mapping Operator: tone reproduction for displaying high + * contrast scenes * Michael Ashikhmin 2002 * * This file is a part of LuminanceHDR package, based on pfstmo. @@ -28,38 +29,80 @@ */ #include +#include #include #include -#include -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" #include "tmo_ashikhmin02.h" +#include "../../sleef.c" +#include "../../opthelper.h" + +namespace { +void calculateLuminance(pfs::Array2Df *Y, float &avLum, float &maxLum, + float &minLum) { -namespace -{ -void calculateLuminance( pfs::Array2Df* Y, float& avLum, float& maxLum, float& minLum) -{ avLum = 0.0f; maxLum = 0.0f; minLum = 0.0f; - int size = Y->getCols() * Y->getRows(); - - for ( int i=0 ; i maxLum ) ? (*Y)(i) : maxLum ; - minLum = ( (*Y)(i) < minLum ) ? (*Y)(i) : minLum ; +#ifdef _OPENMP +#pragma omp parallel +#endif +{ + float maxLumThr = 0.f; + float minLumThr = 0.f; + float avLumThr = 0.f; + +#ifdef __SSE2__ + vfloat maxLumThrv = ZEROV; + vfloat minLumThrv = ZEROV; + vfloat avLumThrv = ZEROV; + vfloat c1v = F2V(1e-4f); +#endif +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t y = 0; y < Y->getRows(); ++y) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < Y->getCols() - 3; x+=4) { + vfloat Yv = LVFU((*Y)(x, y)); + avLumThrv += xlogf(Yv + c1v); + maxLumThrv = vmaxf(Yv, maxLumThrv); + minLumThrv = vminf(Yv, minLumThrv); + } +#endif + for (; x < Y->getCols(); ++x) { + avLumThr += xlogf((*Y)(x, y) + 1e-4f); + maxLumThr = std::max((*Y)(x, y), maxLumThr); + minLumThr = std::min((*Y)(x, y), minLumThr); + } } - avLum =exp( avLum/ size); +#ifdef _OPENMP +#pragma omp critical +#endif +{ + avLum += avLumThr; + maxLum = std::max(maxLum, maxLumThr); + minLum = std::max(minLum, minLumThr); +#ifdef __SSE2__ + avLum += vhadd(avLumThrv); + maxLum = std::max(maxLum, vhmax(maxLumThrv)); + minLum = std::max(minLum, vhmin(minLumThrv)); +#endif +} +} + avLum = exp(avLum / (Y->getRows() * Y->getCols())); } } -void pfstmo_ashikhmin02(pfs::Frame& frame, bool simple_flag, float lc_value, int eq, pfs::Progress &ph) -{ +void pfstmo_ashikhmin02(pfs::Frame &frame, bool simple_flag, float lc_value, + int eq, pfs::Progress &ph) { + #ifndef NDEBUG //--- default tone mapping parameters; std::cout << "pfstmo_ashikhmin02 ("; @@ -68,44 +111,46 @@ std::cout << ", eq: " << eq << ")" << std::endl; #endif + ph.setValue(0); + pfs::Channel *Xr, *Yr, *Zr; frame.getXYZChannels(Xr, Yr, Zr); - assert( Xr != NULL ); - assert( Yr != NULL ); - assert( Zr != NULL ); - if ( !Xr || !Yr || !Zr ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + assert(Xr != NULL); + assert(Yr != NULL); + assert(Zr != NULL); + if (!Xr || !Yr || !Zr) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } - - pfs::transformColorSpace( pfs::CS_RGB, Xr, Yr, Zr, pfs::CS_XYZ, Xr, Yr, Zr ); + pfs::transformColorSpace(pfs::CS_RGB, Xr, Yr, Zr, pfs::CS_XYZ, Xr, Yr, Zr); float maxLum, avLum, minLum; calculateLuminance(Yr, avLum, maxLum, minLum); int w = Yr->getCols(); int h = Yr->getRows(); - pfs::Array2Df L(w,h); - tmo_ashikhmin02(Yr, &L, maxLum, minLum, avLum, simple_flag, lc_value, eq, ph); + pfs::Array2Df L(w, h); + try { + tmo_ashikhmin02(Yr, &L, maxLum, minLum, avLum, simple_flag, lc_value, + eq, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } // TODO: this section can be rewritten using SSE Function - for ( int x=0 ; x -#include "Libpfs/array2d_fwd.h" +#include +#include -class Pyramid { // each level of a Gaussian pyramid - public: - Pyramid() { - flag = 0; - GP = NULL; - }; - - ~Pyramid() { - // delete GP; - }; - - int width; - int height; - int size; - int kernel_size; - - double lambda; - - pfs::Array2Df* GP; - int flag; - - inline double getPixel(int x, int y) { - return (*GP)(x,y); - } - - inline void setPixel(int x, int y, double val) { - (*GP)(x,y) = val; - } +using namespace pfs; + +class Pyramid { // each level of a Gaussian pyramid + public: + Pyramid() : width(0), height(0), size(0), kernel_size(0), lambda(0.), GP(NULL), flag(0) { + }; + + ~Pyramid(){ + // delete GP; + }; + + int width; + int height; + int size; + int kernel_size; + + double lambda; + + pfs::Array2Df *GP; + int flag; + + inline double getPixel(int x, int y) { return (*GP)(x, y); } + + inline void setPixel(int x, int y, double val) { (*GP)(x, y) = val; } }; //////////////////////////////////////////////////////// -class GaussianPyramid -{ - public: - GaussianPyramid() - {} - - GaussianPyramid(pfs::Array2Df* lum_map, int im_height, int im_width) - { - // set a=0.4 (considered by Burt and Adelson, 1983). - // obtained by Outer((0.05, 0.25, 0.4, 0.25, 0.05),(0.05, 0.25, 0.4, 0.25, 0.05)) - g_weights[0][0] = g_weights[0][4] = 0.0025; - g_weights[0][1] = g_weights[0][3] = 0.0125; - g_weights[0][2] = 0.0200; - - g_weights[1][0] = g_weights[1][4] = 0.0125; - g_weights[1][1] = g_weights[1][3] = 0.0625; - g_weights[1][2] = 0.1000; - - g_weights[2][0] = g_weights[2][4] = 0.0200; - g_weights[2][1] = g_weights[2][3] = 0.1000; - g_weights[2][2] = 0.1600; - - g_weights[3][0] = g_weights[3][4] = 0.0125; - g_weights[3][1] = g_weights[3][3] = 0.0625; - g_weights[3][2] = 0.1000; - - g_weights[4][0] = g_weights[4][4] = 0.0025; - g_weights[4][1] = g_weights[4][3] = 0.0125; - g_weights[4][2] = 0.0200; - - constructPyramid(lum_map, im_width, im_height); - } - - ~GaussianPyramid() - { - for( int i=0 ; i< PYRAMID ; i++ ) - delete p[i].GP; - } - - double InterpolateLum(double newX, double newY, Pyramid *pl) { - int X_int = (int)newX; - int Y_int = (int)newY; - - double dx, omdx, dy, omdy; - dx = newX - (double)X_int; - omdx = 1.0 - dx; - dy = newY - (double)Y_int; - omdy = 1.0 - dy; - double lum; - - if(X_int < pl->width-1 && Y_int < pl->height-1) - lum = omdx * omdy * pl->getPixel(X_int, Y_int) - + dx * omdy * pl->getPixel(X_int+1, Y_int) - + omdx * dy * pl->getPixel(X_int, Y_int+1) - + dx * dy * pl->getPixel(X_int+1, Y_int+1); - else if(X_int < pl->width-1 && Y_int >= pl->height) { - Y_int = pl->height-1; - lum = omdx * pl->getPixel(X_int, Y_int) + dx * pl->getPixel(X_int+1, Y_int); - } - else if(X_int >= pl->width && Y_int < pl->height-1) { - X_int = pl->width-1; - lum = omdy * pl->getPixel(X_int, Y_int) + dy * pl->getPixel(X_int, Y_int+1); - } - else - lum = pl->getPixel(pl->width-1, pl->height-1); - - return lum; - } - - - void Interpolate(int bottom, int top) { - // fprintf(stderr, "Interpolating kernel_size=%2d and kernel_size=%2d\n", p[bottom].kernel_size, p[top].kernel_size); - for(int i=bottom+1; i= 0 && 2*x+m < p[current_index].width) - X = 2*x+m; - else if(2*x+m < 0) - X = 0; - else - X = p[current_index].width-1; +class GaussianPyramid { + public: + GaussianPyramid() {} + + GaussianPyramid(pfs::Array2Df *lum_map, int im_height, int im_width) { + // set a=0.4 (considered by Burt and Adelson, 1983). + // obtained by Outer((0.05, 0.25, 0.4, 0.25, 0.05),(0.05, 0.25, 0.4, + // 0.25, + // 0.05)) + g_weights[0][0] = g_weights[0][4] = 0.0025; + g_weights[0][1] = g_weights[0][3] = 0.0125; + g_weights[0][2] = 0.0200; + + g_weights[1][0] = g_weights[1][4] = 0.0125; + g_weights[1][1] = g_weights[1][3] = 0.0625; + g_weights[1][2] = 0.1000; + + g_weights[2][0] = g_weights[2][4] = 0.0200; + g_weights[2][1] = g_weights[2][3] = 0.1000; + g_weights[2][2] = 0.1600; + + g_weights[3][0] = g_weights[3][4] = 0.0125; + g_weights[3][1] = g_weights[3][3] = 0.0625; + g_weights[3][2] = 0.1000; + + g_weights[4][0] = g_weights[4][4] = 0.0025; + g_weights[4][1] = g_weights[4][3] = 0.0125; + g_weights[4][2] = 0.0200; + + constructPyramid(lum_map, im_width, im_height); + } + + ~GaussianPyramid() { + for (int i = 0; i < PYRAMID; i++) delete p[i].GP; + } + + double NoInterpolateLum(int newX, int newY, Pyramid *pl) { + + double lum; + + if (newX < pl->width - 1 && newY < pl->height - 1) + lum = pl->getPixel(newX, newY); + else if (newX < pl->width - 1 && newY >= pl->height) { + lum = pl->getPixel(newX, pl->height - 1); + } else if (newX >= pl->width && newY < pl->height - 1) { + lum = pl->getPixel(pl->width - 1, newY); + } else + lum = pl->getPixel(pl->width - 1, pl->height - 1); + + return lum; + } - if(2*y+n >= 0 && 2*y+n < p[current_index].height) - Y = 2*y+n; - else if(2*y+n < 0) - Y = 0; + double InterpolateLum(double newX, double newY, Pyramid *pl) { + int X_int = (int)newX; + int Y_int = (int)newY; + + double dx, omdx, dy, omdy; + dx = newX - (double)X_int; + omdx = 1.0 - dx; + dy = newY - (double)Y_int; + omdy = 1.0 - dy; + double lum; + + if (X_int < pl->width - 1 && Y_int < pl->height - 1) + lum = omdx * omdy * pl->getPixel(X_int, Y_int) + + dx * omdy * pl->getPixel(X_int + 1, Y_int) + + omdx * dy * pl->getPixel(X_int, Y_int + 1) + + dx * dy * pl->getPixel(X_int + 1, Y_int + 1); + else if (X_int < pl->width - 1 && Y_int >= pl->height) { + Y_int = pl->height - 1; + lum = omdx * pl->getPixel(X_int, Y_int) + + dx * pl->getPixel(X_int + 1, Y_int); + } else if (X_int >= pl->width && Y_int < pl->height - 1) { + X_int = pl->width - 1; + lum = omdy * pl->getPixel(X_int, Y_int) + + dy * pl->getPixel(X_int, Y_int + 1); + } else + lum = pl->getPixel(pl->width - 1, pl->height - 1); + + return lum; + } + + void Interpolate(int bottom, int top) { + // fprintf(stderr, "Interpolating kernel_size=%2d and + // kernel_size=%2d\n", p[bottom].kernel_size, + // p[top].kernel_size); + for (int i = bottom + 1; i < top && i < PYRAMID; i++) { + // fprintf(stderr, "into %2d\n", i+1); + + int new_kernel_size = i + 1; + double lambda = + 1.0 - + (double)(p[bottom].kernel_size - new_kernel_size) / + (double)(p[bottom].kernel_size - p[top].kernel_size) * 0.5; + int new_w = (int)((double)p[bottom].width * lambda); + int new_h = (int)((double)p[bottom].height * lambda); + initializeNewLevel(i, new_w, new_h, new_kernel_size, lambda * p[bottom].lambda); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + for (int y = 0; y < p[i].height; y++) { + for (int x = 0; x < p[i].width; x++) { + // top + int newX = x / (lambda + lambda); + int newY = y / (lambda + lambda); + double top_lum = NoInterpolateLum(newX, newY, &p[top]); + + // bottom + newX = (int)((double)x / lambda); + newY = (int)((double)y / lambda); + double bottom_lum = NoInterpolateLum(newX, newY, &p[bottom]); + +/* old implementation. It casts the values to int and calls InterPolateLum, where no interpolation is made because the values are int => nonsense + int newX = (int)((double)x / (lambda + lambda)); + int newY = (int)((double)y / (lambda + lambda)); + double top_lum = InterpolateLum(newX, newY, &p[top]); + + // bottom + newX = (int)((double)x / lambda); + newY = (int)((double)y / lambda); + double bottom_lum = InterpolateLum(newX, newY, &p[bottom]); +*/ + (*p[i].GP)(x, y) = (1.0 - lambda) * top_lum + lambda * bottom_lum; + } + } + } + } + + void InterpolatePyramid() { + int bottom = 0, top = bottom + 1; + while (bottom < PYRAMID - 1) { + while (p[top].flag == 0) top++; + + Interpolate(bottom, top); + + bottom = top; + top++; + } + } + + int constructNext(int current_index) { + int w = (int)(p[current_index].width / 2); + int h = (int)(p[current_index].height / 2); + + int k_size; + if (p[current_index].kernel_size == 1) + k_size = 5; else - Y = p[current_index].height-1; + k_size = 2 * p[current_index].kernel_size; - sum += g_weights[m+2][n+2] * p[current_index].getPixel(X, Y); - } + int next_index = k_size - 1; + double new_lambda = p[current_index].lambda * 0.5; + initializeNewLevel(next_index, w, h, k_size, new_lambda); + + // apply 5*5 kernel + int X, Y; +#ifdef _OPENMP + #pragma omp parallel for private(X,Y) +#endif + for (int y = 0; y < h; y++) { + for (int x = 0; x < w; x++) { + double sum = 0.0; + for (int n = -2; n < 3; n++) { + for (int m = -2; m < 3; m++) { + if (2 * x + m >= 0 && + 2 * x + m < p[current_index].width) + X = 2 * x + m; + else if (2 * x + m < 0) + X = 0; + else + X = p[current_index].width - 1; + + if (2 * y + n >= 0 && + 2 * y + n < p[current_index].height) + Y = 2 * y + n; + else if (2 * y + n < 0) + Y = 0; + else + Y = p[current_index].height - 1; + + sum += g_weights[m + 2][n + 2] * + p[current_index].getPixel(X, Y); + } + } + + p[next_index].setPixel(x, y, sum); + } + } + return next_index; } - p[next_index].setPixel(x, y, sum); - } + void showPyramid() { + fprintf(stderr, "showPyramid()...\n"); + for (int i = 0; i < PYRAMID; i++) + fprintf(stderr, + "index=%2d: kernel_size=%2d, w h=%4d %4d, lambda=%f\n", i, + p[i].kernel_size, p[i].width, p[i].height, p[i].lambda); } - return next_index; - } - - void showPyramid() { - fprintf(stderr, "showPyramid()...\n"); - for(int i=0; i -#include #include +#include +#include #include "Libpfs/array2d.h" #include "Libpfs/frame.h" +#include #include "Libpfs/progress.h" -#include "tmo_ashikhmin02.h" #include "pyramid.h" +#include "tmo_ashikhmin02.h" +#include "../../sleef.c" #define SMAX 10 -#define LDMAX 500.0 -#define EPSILON 0.00001 +#define LDMAX 500.f +#define EPSILON 0.00001f //------------------------------------------- -float calc_LAL_interpolated(GaussianPyramid *myPyramid, int x, int y, int s) -{ - float ratio = myPyramid->p[s-1].lambda; - - float newX = (float)x * ratio; - float newY = (float)y * ratio; - int X_int = (int)newX; - int Y_int = (int)newY; - - float dx, dy, omdx, omdy; - dx = newX-(float)X_int; - omdx = 1.0 - dx; - dy = newY - (float)Y_int; - omdy = 1.0 - dy; - - int w = myPyramid->p[s-1].GP->getCols(); - int h = myPyramid->p[s-1].GP->getRows(); - - float g; - if(X_int < w-1 && Y_int < h-1) { - g = omdx * omdy * myPyramid->p[s-1].getPixel(X_int, Y_int) - + dx * omdy * myPyramid->p[s-1].getPixel(X_int+1, Y_int) - + omdx * dy * myPyramid->p[s-1].getPixel(X_int, Y_int+1) - + dx * dy * myPyramid->p[s-1].getPixel(X_int+1, Y_int+1); - } - else if(X_int < w-1 && Y_int >= h-1) { - Y_int = h-1; - g = omdx * myPyramid->p[s-1].getPixel(X_int, Y_int) + dx * myPyramid->p[s-1].getPixel(X_int+1, Y_int); - } - else if(X_int >= w-1 && Y_int < h-1) { - X_int = w-1; - g = omdy * myPyramid->p[s-1].getPixel(X_int, Y_int) + dy * myPyramid->p[s-1].getPixel(X_int, Y_int+1); - } - else - g = myPyramid->p[s-1].getPixel(w-1, h-1); +float calc_LAL_interpolated(GaussianPyramid *myPyramid, size_t x, size_t y, int s) { + float ratio = myPyramid->p[s - 1].lambda; + + float newX = (float)x * ratio; + float newY = (float)y * ratio; + size_t X_int = (size_t)newX; + size_t Y_int = (size_t)newY; + + float dx, dy, omdx, omdy; + dx = newX - (float)X_int; + omdx = 1.f - dx; + dy = newY - (float)Y_int; + omdy = 1.f - dy; + + size_t w = myPyramid->p[s - 1].GP->getCols(); + size_t h = myPyramid->p[s - 1].GP->getRows(); + + float g; + if (X_int < w - 1 && Y_int < h - 1) { + g = omdx * omdy * myPyramid->p[s - 1].getPixel(X_int, Y_int) + + dx * omdy * myPyramid->p[s - 1].getPixel(X_int + 1, Y_int) + + omdx * dy * myPyramid->p[s - 1].getPixel(X_int, Y_int + 1) + + dx * dy * myPyramid->p[s - 1].getPixel(X_int + 1, Y_int + 1); + } else if (X_int < w - 1 && Y_int >= h - 1) { + Y_int = h - 1; + g = omdx * myPyramid->p[s - 1].getPixel(X_int, Y_int) + + dx * myPyramid->p[s - 1].getPixel(X_int + 1, Y_int); + } else if (X_int >= w - 1 && Y_int < h - 1) { + X_int = w - 1; + g = omdy * myPyramid->p[s - 1].getPixel(X_int, Y_int) + + dy * myPyramid->p[s - 1].getPixel(X_int, Y_int + 1); + } else + g = myPyramid->p[s - 1].getPixel(w - 1, h - 1); - return g; + return g; } float calc_LAL(GaussianPyramid *myPyramid, int x, int y, int s) { - float ratio = myPyramid->p[s-1].lambda; + float ratio = myPyramid->p[s - 1].lambda; - float newX = (float)x * ratio; - float newY = (float)y * ratio; - unsigned int X_int = (unsigned int)newX; - unsigned int Y_int = (unsigned int)newY; + float newX = (float)x * ratio; + float newY = (float)y * ratio; + unsigned int X_int = (unsigned int)newX; + unsigned int Y_int = (unsigned int)newY; + + if (X_int >= myPyramid->p[s - 1].GP->getCols()) + X_int = myPyramid->p[s - 1].GP->getCols() - 1; + if (Y_int >= myPyramid->p[s - 1].GP->getRows()) + Y_int = myPyramid->p[s - 1].GP->getRows() - 1; - if(X_int >= myPyramid->p[s-1].GP->getCols()) X_int = myPyramid->p[s-1].GP->getCols()-1; - if(Y_int >= myPyramid->p[s-1].GP->getRows()) Y_int = myPyramid->p[s-1].GP->getRows()-1; - - return myPyramid->p[s-1].getPixel(X_int, Y_int); + return myPyramid->p[s - 1].getPixel(X_int, Y_int); } float LAL(GaussianPyramid *myPyramid, int x, int y, float LOCAL_CONTRAST) { - float g, gg; - for(int s=1; s<=SMAX; s++) { - // with interpolation - g = calc_LAL_interpolated(myPyramid, x, y, s); - gg = calc_LAL_interpolated(myPyramid, x, y, 2*s); - - // w/o interpolation - // g = calc_LAL(myPyramid, x, y, s); - // gg = calc_LAL(myPyramid, x, y, 2*s); - - if(fabs((g-gg)/g) >= LOCAL_CONTRAST) - return g; - } - return g; + float g, gg; + for (int s = 1; s <= SMAX; s++) { + // with interpolation + g = calc_LAL_interpolated(myPyramid, x, y, s); + gg = calc_LAL_interpolated(myPyramid, x, y, 2 * s); + + // w/o interpolation + // g = calc_LAL(myPyramid, x, y, s); + // gg = calc_LAL(myPyramid, x, y, 2*s); + + if (fabs((g - gg) / g) >= LOCAL_CONTRAST) return g; + } + return g; } //////////////////////////////////////////////////////// -float C(float lum_val) { // linearly approximated TVI function - if(lum_val <= 1e-20) - return 0.0; +inline float C(float lum_val) { // linearly approximated TVI function + if (lum_val <= 1e-20f) return 0.f; - if(lum_val < 0.0034) - return lum_val/0.0014; + if (lum_val < 0.0034f) return lum_val / 0.0014f; - if(lum_val < 1.0) - return 2.4483 + log(lum_val/0.0034)/0.4027; + if (lum_val < 1.f) return 2.4483f + xlogf(lum_val / 0.0034f) / 0.4027f; - if(lum_val < 7.2444) - return 16.5630 + (lum_val-1.0)/0.4027; + if (lum_val < 7.2444f) return 16.5630f + (lum_val - 1.f) / 0.4027f; - return 32.0693 + log(lum_val/7.2444)/0.0556; + return 32.0693f + xlogf(lum_val / 7.2444f) / 0.0556f; } -inline float TM(float lum_val, float maxLum, float minLum) { - float div = C(maxLum)-C(minLum); - if(div != 0.0) - return (LDMAX * (C(lum_val)-C(minLum)) / div); - else - return (LDMAX * (C(lum_val)-C(minLum)) / EPSILON); +inline float TM(float lum_val, float minLum, float div) { + return (LDMAX * (C(lum_val) - C(minLum)) / div); } //////////////////////////////////////////////////////// -void getMaxMin(pfs::Array2Df* lum_map, float& maxLum, float& minLum) { - maxLum = minLum = 0.0; +void getMaxMin(pfs::Array2Df *lum_map, float &maxLum, float &minLum) { + maxLum = minLum = 0.0; - for(unsigned int i=0; igetCols() * lum_map->getRows(); i++) { - maxLum = ((*lum_map)(i) > maxLum) ? (*lum_map)(i) : maxLum; - minLum = ((*lum_map)(i) < minLum) ? (*lum_map)(i) : minLum; - } -} - -void Normalize(pfs::Array2Df* lum_map, int nrows, int ncols) { - float maxLum, minLum; - getMaxMin(lum_map, maxLum, minLum); - float range = maxLum - minLum; - for(int y=0; ygetCols() * lum_map->getRows(); i++) { + maxLum = ((*lum_map)(i) > maxLum) ? (*lum_map)(i) : maxLum; + minLum = ((*lum_map)(i) < minLum) ? (*lum_map)(i) : minLum; + } +} + +void Normalize(pfs::Array2Df *lum_map, int nrows, int ncols) { + float maxLum, minLum; + getMaxMin(lum_map, maxLum, minLum); + float range = maxLum - minLum; +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int y = 0; y < nrows; y++) + for (int x = 0; x < ncols; x++) + (*lum_map)(x, y) = ((*lum_map)(x, y) - minLum) / range; } //////////////////////////////////////////////////////// -int tmo_ashikhmin02(pfs::Array2Df* Y, pfs::Array2Df* L, float maxLum, float minLum, float /*avLum*/, bool simple_flag, float lc_value, int eq, pfs::Progress &ph) -{ - assert(Y!=NULL); - assert(L!=NULL); - - unsigned int nrows = Y->getRows(); // image size - unsigned int ncols = Y->getCols(); - assert(nrows==L->getRows() && ncols==L->getCols() ); - -// int im_size = nrows * ncols; - - // maxLum /= avLum; // normalize maximum luminance by average luminance - - // apply ToneMapping function only - if(simple_flag) { - for(unsigned int y=0; ygetRows(); // image size + unsigned int ncols = Y->getCols(); + assert(nrows == L->getRows() && ncols == L->getCols()); + + // int im_size = nrows * ncols; + + // maxLum /= avLum; // normalize maximum + // luminance + // by average luminance + + // apply ToneMapping function only + if (simple_flag) { + float div = C(maxLum) - C(minLum); + div = div != 0 ? div : EPSILON; + +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (unsigned int y = 0; y < nrows; y++) + for (unsigned int x = 0; x < ncols; x++) { + (*L)(x, y) = TM((*Y)(x, y), minLum, div); + + //!! FIX: + // to keep output values in range 0.01 - 1 + // (*L)(x,y) /= 100.0f; + } + Normalize(L, nrows, ncols); - return 0; - } + return 0; + } - // applying the full functions.... - GaussianPyramid *myPyramid = new GaussianPyramid(Y, nrows, ncols); + // applying the full functions.... + GaussianPyramid *myPyramid = new GaussianPyramid(Y, nrows, ncols); - // LAL calculation - pfs::Array2Df* la = new pfs::Array2Df(ncols, nrows); - for(unsigned int y=0; y -namespace pfs -{ +namespace pfs { class Frame; class Progress; } @@ -43,10 +42,13 @@ //! \param L [out] tone mapped values //! \param maxLum maximum luminance in the image //! \param avLum logarithmic average of luminance in the image -//! \param simple_flag true: use only tone mapping function (global version of the operator) +//! \param simple_flag true: use only tone mapping function (global version of +//! the operator) //! \param lc_value local contrast threshold //! \param eq chose equation number from the paper (ie equation 2. or 4. ) //! -int tmo_ashikhmin02(pfs::Array2Df* Y, pfs::Array2Df* L, float maxLum, float minLum, float avLum, bool simple_flag, float lc_value, int eq, pfs::Progress &ph); +int tmo_ashikhmin02(pfs::Array2Df *Y, pfs::Array2Df *L, float maxLum, + float minLum, float avLum, bool simple_flag, float lc_value, + int eq, pfs::Progress &ph); -#endif // TMO_ASHIKHMIN02_H +#endif // TMO_ASHIKHMIN02_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingOperators/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -7,20 +7,24 @@ ADD_SUBDIRECTORY(durand02) ADD_SUBDIRECTORY(fattal02) ADD_SUBDIRECTORY(ferradans11) +ADD_SUBDIRECTORY(ferwerda96) +ADD_SUBDIRECTORY(kimkautz08) +ADD_SUBDIRECTORY(lischinski06) ADD_SUBDIRECTORY(mai11) ADD_SUBDIRECTORY(mantiuk06) ADD_SUBDIRECTORY(mantiuk08) ADD_SUBDIRECTORY(pattanaik00) ADD_SUBDIRECTORY(reinhard02) ADD_SUBDIRECTORY(reinhard05) +ADD_SUBDIRECTORY(vanhateren06) # List all .h files in this directory FILE(GLOB FILES_H *.h) # List all .cpp files in this directory FILE(GLOB FILES_CPP *.cpp) -ADD_LIBRARY(pfstmo ${TM_LIBPFS_H} ${TM_LIBPFS_CPP} ${FILES_H} ${FILES_CPP}) -qt5_use_modules(pfstmo Core Gui Widgets) +ADD_LIBRARY(pfstmo STATIC ${TM_LIBPFS_H} ${TM_LIBPFS_CPP} ${FILES_H} ${FILES_CPP}) +TARGET_LINK_LIBRARIES(pfstmo Qt5::Core Qt5::Gui Qt5::Widgets) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} pfstmo PARENT_SCOPE) SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} pfstmo PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/drago03/pfstmo_drago03.cpp luminance-hdr-2.6.0/src/TonemappingOperators/drago03/pfstmo_drago03.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/drago03/pfstmo_drago03.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/drago03/pfstmo_drago03.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,41 +29,40 @@ * $Id: pfstmo_drago03.cpp,v 1.3 2008/09/04 12:46:48 julians37 Exp $ */ - #include #include #include +#include "Libpfs/exception.h" #include "Libpfs/frame.h" #include "Libpfs/progress.h" -#include "Libpfs/exception.h" #include "tmo_drago03.h" +#include "../../opthelper.h" -void pfstmo_drago03(pfs::Frame& frame, float opt_biasValue, pfs::Progress &ph) -{ +void pfstmo_drago03(pfs::Frame &frame, float opt_biasValue, pfs::Progress &ph) { #ifndef NDEBUG - std::stringstream ss; - ss << "pfstmo_drago03 ("; - ss << "bias: " << opt_biasValue; - ss << ")"; - std::cout << ss.str() << std::endl; + std::stringstream ss; + ss << "pfstmo_drago03 ("; + ss << "bias: " << opt_biasValue; + ss << ")"; + std::cout << ss.str() << std::endl; #endif + ph.setValue(0); + pfs::Channel *X, *Y, *Z; - frame.getXYZChannels( X, Y, Z ); + frame.getXYZChannels(X, Y, Z); - if ( !X || !Y || !Z ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (!X || !Y || !Z) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } frame.getTags().setTag("LUMINANCE", "RELATIVE"); - //--- - pfs::Array2Df& Xr = *X; - pfs::Array2Df& Yr = *Y; - pfs::Array2Df& Zr = *Z; + pfs::Array2Df &Xr = *X; + pfs::Array2Df &Yr = *Y; + pfs::Array2Df &Zr = *Z; int w = Yr.getCols(); int h = Yr.getRows(); @@ -73,30 +72,38 @@ calculateLuminance(w, h, Yr.data(), avLum, maxLum); pfs::Array2Df L(w, h); - tmo_drago03(Yr, L, maxLum, avLum, opt_biasValue, ph); + try { + tmo_drago03(Yr, L, maxLum, avLum, opt_biasValue, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } - for (int x=0 ; x #include +#include #include +#include "Libpfs/utils/msec_timer.h" #include "Libpfs/frame.h" #include "Libpfs/progress.h" #include "TonemappingOperators/pfstmo.h" +#include "../../opthelper.h" +#include "../../sleef.c" -namespace -{ -inline float biasFunc(float b, float x) -{ - return std::pow(x, b); // pow(x, log(bias)/log(0.5)) +namespace { +/* +inline float biasFunc(float b, float x) { + return b == 0.f ? xexpf( x * xlogf(b)) : 1.f; } +*/ -const float LOG05 = -0.693147f; // log(0.5) +const float LOG05 = -0.693147f; // log(0.5) } -void calculateLuminance(unsigned int width, unsigned int height, - const float* Y, float& avLum, float& maxLum) -{ +void calculateLuminance(unsigned int width, unsigned int height, const float *Y, + float &avLum, float &maxLum) { avLum = 0.0f; maxLum = 0.0f; int size = width * height; - for (int i = 0; i < size; i++) - { - avLum += log( Y[i] + 1e-4 ); - maxLum = ( Y[i] > maxLum ) ? Y[i] : maxLum ; +#ifdef __SSE2__ + vfloat maxLumv = ZEROV; + vfloat avLumv = ZEROV; +#endif // __SSE2__ + +#pragma omp parallel +{ + float eps = 1e-4f; + float avLumThr = 0.f; + float maxLumThr = 0.f; +#ifdef __SSE2__ + vfloat epsv = F2V(eps); + vfloat maxLumThrv = ZEROV; + vfloat avLumThrv = ZEROV; +#endif // __SSE2__ + #pragma omp for nowait + for(size_t i = 0; i < height; ++i) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < width - 3; j+=4) { + vfloat Ywv = LVFU(Y[i * width + j]); + avLumThrv += xlogf(Ywv + epsv); + maxLumThrv = vmaxf(Ywv, maxLumThrv); + } +#endif + for (; j < width; j++) { + float Yw = Y[i * width + j]; + avLumThr += xlogf(Yw + eps); + maxLumThr = std::max(Yw, maxLumThr); + } } - avLum = exp( avLum/size ); +#pragma omp critical +{ +#ifdef __SSE2__ + avLumv += avLumThrv; + maxLumv = vmaxf(maxLumv, maxLumThrv); +#endif + avLum += avLumThr; + maxLum = std::max(maxLum, maxLumThr); +} +} +#ifdef __SSE2__ + avLum += vhadd(avLumv); + maxLum = std::max(maxLum, vhmax(maxLumv)); +#endif + avLum = exp(avLum / size); } - -void tmo_drago03(const pfs::Array2Df& Y, pfs::Array2Df& L, - float maxLum, float avLum, float bias, - pfs::Progress &ph) -{ +void tmo_drago03(const pfs::Array2Df &Y, pfs::Array2Df &L, float maxLum, + float avLum, float bias, pfs::Progress &ph) { assert(Y.getRows() == L.getRows()); assert(Y.getCols() == L.getCols()); +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif // normalize maximum luminance by average luminance maxLum /= avLum; float divider = std::log10(maxLum + 1.0f); - float biasP = log(bias)/LOG05; + float biasP = (log(bias) / LOG05); + float logmaxLum = log(maxLum); // Normal tone mapping of every pixel - for (int y=0, yEnd = Y.getRows(); y < yEnd; y++) + #pragma omp parallel { - ph.setValue(100*y/yEnd); - if (ph.canceled()) - break; - - for (int x=0, xEnd = Y.getCols(); x < xEnd; x++) - { - float Yw = Y(x,y) / avLum; - float interpol = std::log (2.0f + biasFunc(biasP, Yw / maxLum) * 8.0f); - //L(x,y) = ( std::log(Yw+1.0f)/interpol ) / divider; - L(x,y) = ( std::log1p(Yw)/interpol ) / divider; // avoid loss of precision + int yEnd = Y.getRows(); + int xEnd = Y.getCols(); +#ifdef __SSE2__ + vfloat avLumv = F2V(avLum); + vfloat onev = F2V(1.f); + vfloat twov = F2V(2.f); + vfloat eightv = F2V(8.f); + vfloat biasPv = F2V(biasP); + vfloat logmaxLumv = F2V(logmaxLum); + vfloat dividerv = F2V(divider); +#endif + #pragma omp for + for (int y = 0; y < yEnd; y++) { + int x = 0; +#ifdef __SSE2__ + for (; x < xEnd - 3; x+=4) { + vfloat Ywv = LVFU(Y(x, y)) / avLumv; + vfloat interpolv = xlogf( twov + eightv * xexpf(biasPv * (xlogf(Ywv) - logmaxLumv))); + STVFU(L(x, y), xlogf(Ywv + onev) / (interpolv * dividerv)); // avoid loss of precision + } +#endif + for (; x < xEnd; x++) { + float Yw = Y(x, y) / avLum; + float interpol = xlogf( 2.f + 8.f * xexpf(biasP * (xlogf(Yw) - logmaxLum))); + L(x, y) = xlogf(Yw + 1.f) / (interpol * divider); // avoid loss of precision - assert(!boost::math::isnan(L(x,y))); + assert(!boost::math::isnan(L(x, y))); } } -} + } +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_drago03 = " << stop_watch.get_time() << " msec" << endl; +#endif +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/drago03/tmo_drago03.h luminance-hdr-2.6.0/src/TonemappingOperators/drago03/tmo_drago03.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/drago03/tmo_drago03.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/drago03/tmo_drago03.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,8 +30,7 @@ #include -namespace pfs -{ +namespace pfs { class Progress; } @@ -48,8 +47,8 @@ //! \param avLum logarithmic average of luminance in the image //! \param bias bias parameter of tone mapping algorithm (eg 0.85) //! -void tmo_drago03(const pfs::Array2Df& Y, pfs::Array2Df& L, - float maxLum, float avLum, float bias, pfs::Progress &ph); +void tmo_drago03(const pfs::Array2Df &Y, pfs::Array2Df &L, float maxLum, + float avLum, float bias, pfs::Progress &ph); //! \brief Find average and maximum luminance in an image //! @@ -57,7 +56,7 @@ //! \param avLum [out] average luminance //! \param maxLum [out] maximum luminance //! -void calculateLuminance(unsigned int width, unsigned int height, - const float* Y, float& avLum, float& maxLum); +void calculateLuminance(unsigned int width, unsigned int height, const float *Y, + float &avLum, float &maxLum); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/bilateral.cpp luminance-hdr-2.6.0/src/TonemappingOperators/durand02/bilateral.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/bilateral.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/bilateral.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -32,38 +32,34 @@ #include "arch/math.h" -#include "TonemappingOperators/pfstmo.h" #include "Libpfs/array2d.h" #include "Libpfs/progress.h" +#include "TonemappingOperators/pfstmo.h" #ifdef BRANCH_PREDICTION -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif -inline int max( int a, int b ) -{ return (a>b) ? a : b; } - -inline int min( int a, int b ) -{ return (a b) ? a : b; } +inline int min(int a, int b) { return (a < b) ? a : b; } // support functions -void gaussianKernel( pfs::Array2Df *kern, float sigma ) -{ +void gaussianKernel(pfs::Array2Df *kern, float sigma) { float sigma2Sqr = 2.0f * sigma * sigma; int col_2 = kern->getCols() / 2; int row_2 = kern->getRows() / 2; - for(unsigned int y = 0; y < kern->getRows(); y++ ) { - for(unsigned int x = 0; x < kern->getCols(); x++ ) { + for (unsigned int y = 0; y < kern->getRows(); y++) { + for (unsigned int x = 0; x < kern->getCols(); x++) { float rx = (float)(x - col_2); float ry = (float)(y - row_2); - float d2 = rx*rx + ry*ry; - (*kern)(x, y) = exp( -d2 / sigma2Sqr ); + float d2 = rx * rx + ry * ry; + (*kern)(x, y) = exp(-d2 / sigma2Sqr); } } } @@ -72,85 +68,73 @@ float *gauss; float maxVal; float scaleFactor; - int N; -public: - GaussLookup( float sigma, int N ) : N(N) - { + public: + GaussLookup(float sigma, int N) { float sigma2Sqr = 2.0f * sigma * sigma; maxVal = sqrt(-logf(0.01f) * sigma2Sqr); gauss = new float[N]; - for( int i = 0; i < N; i++) { - float x = (float)i / (float)(N-1) * maxVal; + for (int i = 0; i < N; i++) { + float x = (float)i / (float)(N - 1) * maxVal; gauss[i] = exp(-x * x / (sigma2Sqr)); } - scaleFactor = (float)(N-1) / maxVal; + scaleFactor = (float)(N - 1) / maxVal; } - ~GaussLookup() - { - delete[] gauss; - } + ~GaussLookup() { delete[] gauss; } - float getValue( float x ) - { - x = fabs( x ); - if( unlikely( x > maxVal ) ) return 0; - return gauss[ (int)(x*scaleFactor) ]; + float getValue(float x) { + x = fabs(x); + if (unlikely(x > maxVal)) return 0; + return gauss[(int)(x * scaleFactor)]; } }; -void bilateralFilter(const pfs::Array2Df *I, pfs::Array2Df *J, - float sigma_s, float sigma_r, - pfs::Progress& ph) -{ - const pfs::Array2Df *X1 = I; // intensity data // DAVIDE : CHECK THIS! +void bilateralFilter(const pfs::Array2Df *I, pfs::Array2Df *J, float sigma_s, + float sigma_r, pfs::Progress &ph) { + const pfs::Array2Df *X1 = I; // intensity data // DAVIDE : CHECK THIS! // x +- sigma_s*2 should contain 95% of the Gaussian distrib - int sKernelSize = (int)( sigma_s*4 + 0.5 ) + 1; + int sKernelSize = (int)(sigma_s * 4 + 0.5) + 1; int sKernelSize_2 = sKernelSize / 2; pfs::Array2Df sKernel(sKernelSize, sKernelSize); - gaussianKernel( &sKernel, sigma_s ); - GaussLookup gauss( sigma_r, 256 ); + gaussianKernel(&sKernel, sigma_s); + GaussLookup gauss(sigma_r, 256); - for(unsigned int y = 0; y < I->getRows(); y++ ) - { - ph.setValue( y * 100 / I->getRows() ); + for (unsigned int y = 0; y < I->getRows(); y++) { + ph.setValue(y * 100 / I->getRows()); - for(unsigned int x = 0; x < I->getCols(); x++ ) - { + for (unsigned int x = 0; x < I->getCols(); x++) { float val = 0; float k = 0; - float I_s = (*X1)(x,y); //!! previously 'I' not 'X1' - - if( unlikely( !boost::math::isfinite( I_s ) ) ) - I_s = 0.0f; + float I_s = (*X1)(x, y); //!! previously 'I' not 'X1' - for( int py = max( 0, y - sKernelSize_2), pymax = min( I->getRows(), y + sKernelSize_2); - py < pymax; py++ ) - { - for( int px = max( 0, x - sKernelSize_2), pxmax = min( I->getCols(), x + sKernelSize_2); - px < pxmax; px++ ) - { - float I_p = (*X1)(px, py); //!! previously 'I' not 'X1' - if( unlikely( !boost::math::isfinite( I_p ) ) ) - I_p = 0.0f; + if (unlikely(!boost::math::isfinite(I_s))) I_s = 0.0f; - float mult = sKernel(px-x + sKernelSize_2, py-y + sKernelSize_2) * - gauss.getValue( I_p - I_s ); + for (int py = max(0, y - sKernelSize_2), + pymax = min(I->getRows(), y + sKernelSize_2); + py < pymax; py++) { + for (int px = max(0, x - sKernelSize_2), + pxmax = min(I->getCols(), x + sKernelSize_2); + px < pxmax; px++) { + float I_p = (*X1)(px, py); //!! previously 'I' not 'X1' + if (unlikely(!boost::math::isfinite(I_p))) I_p = 0.0f; + + float mult = sKernel(px - x + sKernelSize_2, + py - y + sKernelSize_2) * + gauss.getValue(I_p - I_s); float Ixy = (*I)(px, py); - if( unlikely( !boost::math::isfinite( Ixy ) ) ) - Ixy = 0.0f; + if (unlikely(!boost::math::isfinite(Ixy))) Ixy = 0.0f; - val += Ixy * mult; //!! but here we want 'I' + val += Ixy * mult; //!! but here we want 'I' k += mult; } } - //avoid division by 0 when k is close to 0 + // avoid division by 0 when k is close to 0 // (*J)(x,y) = fabs(k) > 0.00000001 ? val/k : 0.; - (*J)(x,y) = val/k; + (*J)(x, y) = val / k; } } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/bilateral.h luminance-hdr-2.6.0/src/TonemappingOperators/durand02/bilateral.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/bilateral.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/bilateral.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,12 +28,10 @@ * $Id: bilateral.h,v 1.3 2008/09/09 00:56:49 rafm Exp $ */ - #ifndef BILATERAL_H #define BILATERAL_H -namespace pfs -{ +namespace pfs { class Array2D; class Progress; } @@ -48,8 +46,7 @@ //! \param sigma_s sigma value for spatial kernel //! \param sigma_r sigma value for range kernel //! -void bilateralFilter(const pfs::Array2D *I, pfs::Array2D *J, - float sigma_s, float sigma_r, - pfs::Progress& ph); +void bilateralFilter(const pfs::Array2D *I, pfs::Array2D *J, float sigma_s, + float sigma_r, pfs::Progress &ph); #endif /* #ifndef BILATERAL_H */ diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/fastbilateral.cpp luminance-hdr-2.6.0/src/TonemappingOperators/durand02/fastbilateral.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/fastbilateral.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/fastbilateral.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,101 +27,28 @@ * $Id: fastbilateral.cpp,v 1.5 2008/09/09 18:10:49 rafm Exp $ */ -#include #include -#include - -#include "Libpfs/array2d.h" -#include "Libpfs/progress.h" +#include +#include #include "fastbilateral.h" #ifdef BRANCH_PREDICTION -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif +#include "../../sleef.c" +#include "../../opthelper.h" +#include "../../gauss.h" using namespace std; // TODO: use spatial convolution rather than FFT, should be much // faster except for a very large kernels -class GaussianBlur -{ - float* source; - fftwf_complex* freq; - fftwf_plan fplan_fw; - fftwf_plan fplan_in; - - float sigma; - -public: - GaussianBlur( int nx, int ny, float sigma ) : sigma( sigma ) - { - int ox = nx; - int oy = ny/2 + 1; // saves half of the data - const int osize = ox * oy; - source = (float*)fftwf_malloc(sizeof(float) * nx * 2 * (ny/2+1) ); - freq = (fftwf_complex*) fftwf_malloc(sizeof(fftwf_complex) * osize); -// if( source == NULL || freq == NULL ) - //TODO: throw exception - fplan_fw = fftwf_plan_dft_r2c_2d(nx, ny, source, freq, FFTW_ESTIMATE); - fplan_in = fftwf_plan_dft_c2r_2d(nx, ny, freq, source, FFTW_ESTIMATE); - } - - - void blur( const pfs::Array2Df& I, pfs::Array2Df& J ) - { - int x,y; - - int nx = I.getCols(); - int ny = I.getRows(); - int nsize = nx * ny; - - int ox = nx; - int oy = ny/2 + 1; // saves half of the data - - for( y=0 ; ymaxI ) ) maxI = v; - if( unlikely( v jI + stepI ) ) - continue; // wi = 0; - if( likely( I(i) > jI ) ) { - float wi = (stepI - (I(i)-jI)) / stepI; - J(i) += (*JJ)(i)*wi; - } else - J(i) += (*JJ)(i); - } - } else if( j == NB_SEGMENTS-1 ) { - // if the last segment - to account for the range boundary - for (int i=0 ; i0.0f ) ) - J(i) += (*JJ)(i)*wi; - } - } - } +#ifdef _OPENMP +#pragma omp parallel +#endif +{ +#ifdef __SSE2__ + vfloat sqrsigma_rv = F2V(sigma_r * sigma_r); + vfloat jIv = F2V(jI); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (int i = 0; i < h; i++) { + int j = 0; +#ifdef __SSE2__ + for (; j < w-3; j+=4) { + vfloat Iv = LVFU(I(j, i)); + vfloat dIv = Iv - jIv; + vfloat jGv = xexpf(-(dIv * dIv) / sqrsigma_rv); + STVFU(jG(j, i), jGv); + STVFU(jH(j, i), jGv * Iv); + } +#endif + for (; j < w; j++) { + float dI = I(j, i) - jI; + jG(j, i) = xexpf(-(dI * dI) / (sigma_r * sigma_r)); + jH(j, i) = jG(j, i) * I(j, i); + } + } +} + float* gaussRows[h]; + + gaussRows[0] = jG.data(); + for(int i = 1; i < h; ++i) + gaussRows[i] = gaussRows[i - 1] + w; +#ifdef _OPENMP + #pragma omp parallel +#endif + gaussianBlur(gaussRows, gaussRows, w, h, sigma_s); + + gaussRows[0] = jH.data(); + for(int i = 1; i < h; ++i) + gaussRows[i] = gaussRows[i - 1] + w; +#ifdef _OPENMP + #pragma omp parallel +#endif + gaussianBlur(gaussRows, gaussRows, w, h, sigma_s); -// delete Iz; -// if( downsample != 1 ) -// delete JJ; - delete jJ; - delete jG; - delete jK; - delete jH; +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < h; i++) { + for (int j = 0; j < w; j++) { + float temp = jG(j, i); + jJ(j, i) = temp != 0.f ? jH(j, i) / temp : 0.f; + } + } + + if (j == 0) { + // if the first segment - to account for the range boundary +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int i = 0; i < size; i++) { + if (likely(I(i) > jI + stepI)) continue; // wi = 0; + if (likely(I(i) > jI)) { + float wi = (stepI - (I(i) - jI)) / stepI; + J(i) += jJ(i)*wi; + } else + J(i) += jJ(i); + } + } else if (j == NB_SEGMENTS - 1) { + // if the last segment - to account for the range boundary +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int i = 0; i < size; i++) { + if (I(i) < jI - stepI) continue; // wi = 0; + if (likely(I(i) < jI)) { + float wi = (stepI - (jI - I(i))) / stepI; + J(i) += jJ(i)*wi; + } else + J(i) += jJ(i); + } + } else { +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int i = 0; i < size; i++) { + float wi = stepI - fabs(I(i) - jI);// / stepI; + if (unlikely(wi > 0.0f)) J(i) += jJ(i)*(wi/stepI); + } + } + } + // delete Iz; + // if( downsample != 1 ) + // delete JJ; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/fastbilateral.h luminance-hdr-2.6.0/src/TonemappingOperators/durand02/fastbilateral.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/fastbilateral.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/fastbilateral.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,14 +27,12 @@ * $Id: fastbilateral.h,v 1.3 2008/09/09 00:56:49 rafm Exp $ */ - #ifndef FASTBILATERAL_H #define FASTBILATERAL_H #include -namespace pfs -{ +namespace pfs { class Progress; } @@ -48,9 +46,8 @@ //! \param sigma_s sigma value for spatial kernel //! \param sigma_r sigma value for range kernel //! -void fastBilateralFilter(const pfs::Array2Df& I, pfs::Array2Df& J, +void fastBilateralFilter(const pfs::Array2Df &I, pfs::Array2Df &J, float sigma_s, float sigma_r, int downsample, - pfs::Progress& ph); + pfs::Progress &ph); #endif /* #ifndef FASTBILATERAL_H */ - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/pfstmo_durand02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/durand02/pfstmo_durand02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/pfstmo_durand02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/pfstmo_durand02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -31,9 +31,9 @@ * $Id: pfstmo_durand02.cpp,v 1.5 2009/02/23 19:09:41 rafm Exp $ */ +#include #include #include -#include #include "Libpfs/colorspace/colorspace.h" #include "Libpfs/exception.h" @@ -41,8 +41,7 @@ #include "Libpfs/progress.h" #include "tmo_durand02.h" -namespace -{ +namespace { const int downsample = 1; const bool original_algorithm = false; } @@ -51,24 +50,22 @@ //#ifdef HAVE_FFTW3F // float sigma_s = 40.0f; //#else -//float sigma_s = 8.0f; +// float sigma_s = 8.0f; //#endif -//float sigma_r = 0.4f; -//float baseContrast = 5.0f; +// float sigma_r = 0.4f; +// float baseContrast = 5.0f; -void pfstmo_durand02(pfs::Frame& frame, - float sigma_s, float sigma_r, float baseContrast, - pfs::Progress &ph) -{ +void pfstmo_durand02(pfs::Frame &frame, float sigma_s, float sigma_r, + float baseContrast, pfs::Progress &ph) { #ifndef NDEBUG std::stringstream ss; ss << "pfstmo_durand02 ("; - #ifdef HAVE_FFTW3F +#ifdef HAVE_FFTW3F ss << "fftw3f ON"; - #else +#else ss << "fftw3f OFF"; - #endif +#endif ss << ", sigma_s: " << sigma_s; ss << ", sigma_r: " << sigma_r; ss << ", base contrast: " << baseContrast << ")"; @@ -76,22 +73,24 @@ std::cout << ss.str() << std::endl; #endif - pfs::Channel *X, *Y, *Z; + ph.setValue(0); - frame.getXYZChannels( X, Y, Z ); - frame.getTags().setTag("LUMINANCE", "RELATIVE"); - //--- - - if ( Y == NULL || X == NULL || Z == NULL ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - } - - tmo_durand02(*X, *Y, *Z, - sigma_s, sigma_r, baseContrast, downsample, !original_algorithm, - ph); + pfs::Channel *X, *Y, *Z; - if ( !ph.canceled() ) - ph.setValue(100); -} + frame.getXYZChannels(X, Y, Z); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); + //--- + + if (Y == NULL || X == NULL || Z == NULL) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); + } + + try { + tmo_durand02(*X, *Y, *Z, sigma_s, sigma_r, baseContrast, downsample, + !original_algorithm, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } + if (!ph.canceled()) ph.setValue(100); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/tmo_durand02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/durand02/tmo_durand02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/tmo_durand02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/tmo_durand02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -32,59 +32,52 @@ * $Id: tmo_durand02.cpp,v 1.6 2009/02/23 19:09:41 rafm Exp $ */ -#include -#include #include #include +#include +#include +#include "Libpfs/utils/msec_timer.h" #include "Libpfs/array2d.h" +#include "Libpfs/rt_algo.h" #include "Libpfs/progress.h" #include "TonemappingOperators/pfstmo.h" -//#undef HAVE_FFTW3F - -#ifdef HAVE_FFTW3F #include "fastbilateral.h" -#else -#include "bilateral.h" -#endif -namespace -{ +#include "../../sleef.c" +#include "../../opthelper.h" +#define pow_F(a,b) (xexpf(b*xlogf(a))) + +namespace { /** * @brief Find minimum and maximum value skipping the extreems * */ -inline -void findMaxMinPercentile(pfs::Array2Df* I, - float minPrct, float maxPrct, - float& minLum, float& maxLum) -{ - int size = I->getRows() * I->getCols(); - std::vector vI; - for (int i=0 ; i +inline T decode(const T &value) { + if (value <= 0.0031308f) { + return (value * 12.92f); } - - std::sort(vI.begin(), vI.end()); - - minLum = vI.at( int(minPrct*vI.size()) ); - maxLum = vI.at( int(maxPrct*vI.size()) ); + return (1.055f * pow_F(value, 1.f / 2.4f) - 0.055f); } template -inline -T decode(const T& value) -{ - if ( value <= 0.0031308f ) - { - return (value * 12.92f); +inline T fastDecode(const T &value) { + if (value <= -5.766466716f) { + return (xexpf(value) * 12.92f); } - return (1.055f * std::pow( value, 1.f/2.4f ) - 0.055f); + return (1.055f * xexpf(1.f / 2.4f * value) - 0.055f); } +#ifdef __SSE2__ +inline vfloat fastDecode(const vfloat &valuev, const vfloat &c0, const vfloat &c1, const vfloat &c2, const vfloat &c3, const vfloat &c4) { + vmask selmask = vmaskf_le(valuev, c0); + vfloat tempv = vself(selmask, valuev, valuev * c1); + tempv = xexpf(tempv); + return vself(selmask, tempv * c2, tempv * c3 - c4); +} +#endif } /* @@ -104,91 +97,207 @@ */ -void tmo_durand02(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - float sigma_s, float sigma_r, float baseContrast, int downsample, - bool color_correction, - pfs::Progress &ph) +void tmo_durand02(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + float sigma_s, float sigma_r, float baseContrast, + int downsample, bool color_correction, pfs::Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + size_t w = R.getCols(); + size_t h = R.getRows(); + size_t size = w * h; + + pfs::Array2Df I(w, h); // intensities + pfs::Array2Df BASE(w, h); // base layer + + float min_pos = 1e10f; // minimum positive value (to avoid log(0)) +#ifdef __SSE2__ + vfloat min_posv = F2V(1e10f); +#endif + +#ifdef _OPENMP +#pragma omp parallel +#endif { - int w = R.getCols(); - int h = R.getRows(); - int size = w*h; - - pfs::Array2Df I(w,h); // intensities - pfs::Array2Df BASE(w,h); // base layer - pfs::Array2Df DETAIL(w,h); // detail layer - - float min_pos = 1e10f; // minimum positive value (to avoid log(0)) - for (int i = 0 ; i < size ; i++) - { - I(i) = 1.0f/61.0f * ( 20.0f*R(i) + 40.0f*G(i) + B(i) ); - if ( I(i) < min_pos && I(i) > 0.0f ) - { - min_pos = I(i); + float min_posthr = 1e10f; +#ifdef __SSE2__ + vfloat min_posthrv = F2V(min_posthr); + vfloat onev = F2V(1.f); + vfloat c61v = F2V(61.f); + vfloat c20v = F2V(20.f); + vfloat c40v = F2V(40.f); + vfloat cmaxv = F2V(1e10f); +#endif + +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t i = 0; i < h; i++) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j+=4) { + vfloat Iv = onev / c61v * (c20v * LVFU(R(j, i)) + c40v * LVFU(G(j, i)) + LVFU(B(j,i))); + vfloat tminv = vself(vmaskf_gt(Iv, ZEROV), Iv, cmaxv); + min_posthrv = vminf(min_posthrv, tminv); + STVFU(I(j,i), Iv); + } +#endif + for (; j < w; j++) { + I(j, i) = 1.0f / 61.0f * (20.0f * R(j, i) + 40.0f * G(j, i) + B(j, i)); + if (I(j, i) < min_posthr && I(j, i) > 0.0f) { + min_posthr = I(j, i); + } } } +#ifdef _OPENMP + #pragma omp critical +#endif +{ + min_pos = std::min(min_pos, min_posthr); +#ifdef __SSE2__ + min_posv = vminf(min_posv, min_posthrv); +#endif +} +} +#ifdef __SSE2__ + min_pos = std::min(min_pos, vhmin(min_posv)); +#endif - for (int i = 0 ; i < size ; i++) - { - float L = I(i); - if ( L <= 0.0f ) - { - L = min_pos; - } +#ifdef _OPENMP +#pragma omp parallel +#endif +{ +#ifdef __SSE2__ + vfloat min_posv = F2V(min_pos); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (size_t i = 0; i < h; i++) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < w-3; j+=4) { + vfloat Lv = LVFU(I(j, i)); + Lv = vmaxf(Lv, min_posv); + + STVFU(R(j, i), LVFU(R(j, i)) / Lv); + STVFU(G(j, i), LVFU(G(j, i)) / Lv); + STVFU(B(j, i), LVFU(B(j, i)) / Lv); - R(i) /= L; - G(i) /= L; - B(i) /= L; + STVFU(I(j, i), xlogf(Lv)); + } +#endif + for (; j < w; j++) { + float L = I(j, i); + L = std::max(L, min_pos); + + R(j, i) /= L; + G(j, i) /= L; + B(j, i) /= L; - I(i) = std::log( L ); + I(j, i) = xlogf(L); + } } +} -#ifdef HAVE_FFTW3F - fastBilateralFilter( I, BASE, sigma_s, sigma_r, downsample, ph ); -#else - bilateralFilter( &I, &BASE, sigma_s, sigma_r, ph ); -#endif + fastBilateralFilter(I, BASE, sigma_s, sigma_r, downsample, ph); //!! FIX: find minimum and maximum luminance, but skip 1% of outliers float maxB; float minB; - findMaxMinPercentile(&BASE, 0.01f, 0.99f, minB, maxB); + lhdrengine::findMinMaxPercentile(BASE.data(), w * h, 0.01f, minB, 0.99f, maxB, true); float compressionfactor = baseContrast / (maxB - minB); + float compressionfactorm1 = compressionfactor - 1.f; // Color correction factor - const float k1 = 1.48f; - const float k2 = 0.82f; - const float s = ( (1 + k1)*pow(compressionfactor,k2) )/( 1 + k1*pow(compressionfactor,k2) ); - - for (int i = 0 ; i < size ; i++) - { - DETAIL(i) = I(i) - BASE(i); - I(i) = BASE(i) * compressionfactor + DETAIL(i); - - //!! FIX: this to keep the output in normalized range 0.01 - 1.0 - //intensitites are related only to minimum luminance because I - //would say this is more stable over time than using maximum - //luminance and is also robust against random peaks of very high - //luminance - I(i) -= 4.3f+minB*compressionfactor; - - if ( color_correction ) - { - R(i) = decode( std::pow( R(i), s ) * std::exp( I(i) ) ); - G(i) = decode( std::pow( G(i), s ) * std::exp( I(i) ) ); - B(i) = decode( std::pow( B(i), s ) * std::exp( I(i) ) ); - } - else - { - R(i) *= decode( std::exp( I(i) ) ); - G(i) *= decode( std::exp( I(i) ) ); - B(i) *= decode( std::exp( I(i) ) ); + constexpr float k1 = 1.48f; + constexpr float k2 = 0.82f; + const float s = ((1 + k1) * pow(compressionfactor, k2)) / + (1 + k1 * pow(compressionfactor, k2)); + + if (color_correction) { + +#ifdef _OPENMP +#pragma omp parallel +#endif +{ +#ifdef __SSE2__ + vfloat offsetv = F2V(4.3f + minB * compressionfactor); + vfloat compressionfactorm1v = F2V(compressionfactorm1); + vfloat sv = F2V(s); + const vfloat c0 = F2V(-5.7664667f); + const vfloat c1 = F2V(0.416666667f); + const vfloat c2 = F2V(12.92f); + const vfloat c3 = F2V(1.055f); + const vfloat c4 = F2V(0.055f); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (size_t i = 0; i < h; i++) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j+=4) { + vfloat Iiv = LVFU(BASE(j, i)) * compressionfactorm1v + LVFU(I(j, i)) - offsetv; + + //!! FIX: this to keep the output in normalized range 0.01 - 1.0 + // intensitites are related only to minimum luminance because I + // would say this is more stable over time than using maximum + // luminance and is also robust against random peaks of very high + // luminance +// Iiv -= offsetv; + + STVFU(R(j, i), fastDecode(sv * xlogf(LVFU(R(j,i))) + Iiv, c0, c1, c2, c3, c4)); + STVFU(G(j, i), fastDecode(sv * xlogf(LVFU(G(j,i))) + Iiv, c0, c1, c2, c3, c4)); + STVFU(B(j, i), fastDecode(sv * xlogf(LVFU(B(j,i))) + Iiv, c0, c1, c2, c3, c4)); + } +#endif + for (; j < w; j++) { + float Ii = BASE(j, i) * compressionfactorm1 + I(j, i); + + //!! FIX: this to keep the output in normalized range 0.01 - 1.0 + // intensitites are related only to minimum luminance because I + // would say this is more stable over time than using maximum + // luminance and is also robust against random peaks of very high + // luminance + Ii -= 4.3f + minB * compressionfactor; + + R(j, i) = fastDecode(s * xlogf(R(j,i)) + Ii); + G(j, i) = fastDecode(s * xlogf(G(j,i)) + Ii); + B(j, i) = fastDecode(s * xlogf(B(j,i)) + Ii); + } } - } +} + } else { +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (size_t i = 0; i < size; i++) { + float Ii = BASE(i) * compressionfactorm1 + I(i); - if (!ph.canceled()) - { - ph.setValue( 100 ); + //!! FIX: this to keep the output in normalized range 0.01 - 1.0 + // intensitites are related only to minimum luminance because I + // would say this is more stable over time than using maximum + // luminance and is also robust against random peaks of very high + // luminance + Ii -= 4.3f + minB * compressionfactor; + + float expi = xexpf(Ii); + R(i) *= decode(expi); + G(i) *= decode(expi); + B(i) *= decode(expi); + } } -} + ph.setValue(99); + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_durand02 = " << stop_watch.get_time() << " msec" << endl; +#endif + +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/tmo_durand02.h luminance-hdr-2.6.0/src/TonemappingOperators/durand02/tmo_durand02.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/durand02/tmo_durand02.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/durand02/tmo_durand02.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,8 +37,7 @@ #include -namespace pfs -{ +namespace pfs { class Progress; } @@ -54,12 +53,12 @@ //! \param sigma_r sigma for range kernel //! \param baseContrast contrast of the base layer //! \param color_correction enable automatic color correction -//! \param downsample down sampling factor for speeding up fast-bilateral (1..20) +//! \param downsample down sampling factor for speeding up fast-bilateral +//! (1..20) //! -void tmo_durand02(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - float sigma_s, float sigma_r, float baseContrast, int downsample, - bool color_correction /*= true*/, +void tmo_durand02(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + float sigma_s, float sigma_r, float baseContrast, + int downsample, bool color_correction /*= true*/, pfs::Progress &ph); - -#endif // TMO_DURAND02_H +#endif // TMO_DURAND02_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pde.cpp luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pde.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pde.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pde.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -34,17 +34,17 @@ #include "pde.h" -#include -#include +#include #include #include -#include +#include +#include +#include "Libpfs/array2d.h" +#include "Libpfs/manip/copy.h" #include "Libpfs/progress.h" #include "Libpfs/utils/numeric.h" #include "Libpfs/utils/sse.h" -#include "Libpfs/array2d.h" -#include "Libpfs/manip/copy.h" #include "TonemappingOperators/pfstmo.h" @@ -56,37 +56,31 @@ #define MODYF 0 /* 1 or 0 (1 is better) */ #define MINS 16 /* minimum size 4 6 or 100 */ //#define MODYF_SQRT -1.0f /* -1 or 0 */ -#define SMOOTH_IT 1 // orig: 1 -#define BCG_STEPS 20 // orig: 20 -#define BCG_TOL 1e-3 // orig: 1e-3 -#define V_CYCLE 2 // orig: 2 +#define SMOOTH_IT 1 // orig: 1 +#define BCG_STEPS 20 // orig: 20 +#define BCG_TOL 1e-3 // orig: 1e-3 +#define V_CYCLE 2 // orig: 2 // post improvement of the solution using additional cg-iterations #define BCG_POST_IMPROVE false -#define BCG_POST_STEPS 1000 // very slow if > 100, only use on small image +#define BCG_POST_STEPS 1000 // very slow if > 100, only use on small image #define BCG_POST_TOL 1e-7 - // precision #define EPS 1.0e-12 #define OMP_THRESHOLD 1000000 static void linbcg(unsigned long n, const float b[], float x[], float tol, - int itmax, int *iter, float *err, int rows, int cols); + int itmax, int *iter, float *err, int rows, int cols); -inline float max( float a, float b ) -{ - return a > b ? a : b; -} +inline float max(float a, float b) { return a > b ? a : b; } -inline float min( float a, float b ) -{ - return a < b ? a : b; -} +inline float min(float a, float b) { return a < b ? a : b; } //!! TODO: for debugging purposes // #define PFSEOL "\x0a" -// static void dumpPFS( const char *fileName, const pfs::Array2D *data, const char *channelName ) +// static void dumpPFS( const char *fileName, const pfs::Array2D *data, const +// char *channelName ) // { // FILE *fh = fopen( fileName, "wb" ); // assert( fh != NULL ); @@ -109,8 +103,7 @@ // Full Multigrid Algorithm for solving partial differential equations ////////////////////////////////////////////////////////////////////// -static void restrict( const pfs::Array2Df *in, pfs::Array2Df *out ) -{ +static void restrict(const pfs::Array2Df *in, pfs::Array2Df *out) { const float inRows = in->getRows(); const float inCols = in->getCols(); @@ -125,18 +118,19 @@ float sx, sy; int x, y; - for( y = 0, sy = dy/2-0.5; y < outRows; y++, sy += dy ) - { - for( x = 0, sx = dx/2-0.5; x < outCols; x++, sx += dx ) { - + for (y = 0, sy = dy / 2 - 0.5; y < outRows; y++, sy += dy) { + for (x = 0, sx = dx / 2 - 0.5; x < outCols; x++, sx += dx) { float pixVal = 0; float w = 0; - for( float ix = max( 0, ceilf( sx-dx*filterSize ) ); ix <= min( floorf( sx+dx*filterSize ), inCols-1 ); ix++ ) - for( float iy = max( 0, ceilf( sy-dx*filterSize ) ); iy <= min( floorf( sy+dx*filterSize), inRows-1 ); iy++ ) { - pixVal += (*in)( (int)ix, (int)iy ); - w += 1; - } - (*out)(x,y) = pixVal/w; + for (float ix = max(0, ceilf(sx - dx * filterSize)); + ix <= min(floorf(sx + dx * filterSize), inCols - 1); ix++) + for (float iy = max(0, ceilf(sy - dx * filterSize)); + iy <= min(floorf(sy + dx * filterSize), inRows - 1); + iy++) { + pixVal += (*in)((int)ix, (int)iy); + w += 1; + } + (*out)(x, y) = pixVal / w; } } } @@ -173,387 +167,378 @@ // } // } +static void prolongate(const pfs::Array2Df *in, pfs::Array2Df *out) { + float dx = (float)in->getCols() / (float)out->getCols(); + float dy = (float)in->getRows() / (float)out->getRows(); -static void prolongate( const pfs::Array2Df *in, pfs::Array2Df *out ) -{ - float dx = (float)in->getCols() / (float)out->getCols(); - float dy = (float)in->getRows() / (float)out->getRows(); - - const int outRows = out->getRows(); - const int outCols = out->getCols(); - - const float inRows = in->getRows(); - const float inCols = in->getCols(); - - const float filterSize = 1; + const int outRows = out->getRows(); + const int outCols = out->getCols(); - float sx, sy; - int x, y; - for( y = 0, sy = -dy/2; y < outRows; y++, sy += dy ) - for( x = 0, sx = -dx/2; x < outCols; x++, sx += dx ) { + const float inRows = in->getRows(); + const float inCols = in->getCols(); - float pixVal = 0; - float weight = 0; + const float filterSize = 1; - for( float ix = max( 0, ceilf( sx-filterSize ) ); ix <= min( floorf(sx+filterSize), inCols-1 ); ix++ ) - for( float iy = max( 0, ceilf( sy-filterSize ) ); iy <= min( floorf( sy+filterSize), inRows-1 ); iy++ ) { - float fx = fabs( sx - ix ); - float fy = fabs( sy - iy ); + float sx, sy; + int x, y; + for (y = 0, sy = -dy / 2; y < outRows; y++, sy += dy) + for (x = 0, sx = -dx / 2; x < outCols; x++, sx += dx) { + float pixVal = 0; + float weight = 0; - const float fval = (1-fx)*(1-fy); + for (float ix = max(0, ceilf(sx - filterSize)); + ix <= min(floorf(sx + filterSize), inCols - 1); ix++) + for (float iy = max(0, ceilf(sy - filterSize)); + iy <= min(floorf(sy + filterSize), inRows - 1); iy++) { + float fx = fabs(sx - ix); + float fy = fabs(sy - iy); + + const float fval = (1 - fx) * (1 - fy); + + pixVal += (*in)((int)ix, (int)iy) * fval; + weight += fval; + } - pixVal += (*in)( (int)ix, (int)iy ) * fval; - weight += fval; + assert(weight != 0); + (*out)(x, y) = pixVal / weight; } - - assert( weight != 0 ); - (*out)(x,y) = pixVal / weight; - - } } -static void exact_sollution( pfs::Array2Df */*F*/, pfs::Array2Df *U ) -{ -// DEBUG_STR << "exact sollution" << endl; - -/* int sx = F->getCols(); - int sy = F->getRows(); - int x,y; +static void exact_sollution(pfs::Array2Df * /*F*/, pfs::Array2Df *U) { + // DEBUG_STR << "exact sollution" << endl; - float h = 1.0/sqrt(sx*sy*1.0f); - float h2 = h*h; -*/ + /* int sx = F->getCols(); + int sy = F->getRows(); + int x,y; + + float h = 1.0/sqrt(sx*sy*1.0f); + float h2 = h*h; + */ U->reset(); /* also works well?? */ return; -// if( sx==3 && sy==3 ) -// { -// (*U)(1,1) = -h2* (*F)(1,1) / 4.0f; - -// // boundary points -// for( x=0 ; xgetRows(); - int cols = U->getCols(); + int rows = U->getRows(); + int cols = U->getCols(); - const int n = rows*cols; + const int n = rows * cols; - int iter; - float err; + int iter; + float err; - linbcg( n, F->data(), U->data(), BCG_TOL, BCG_STEPS, &iter, &err, rows, cols); + linbcg(n, F->data(), U->data(), BCG_TOL, BCG_STEPS, &iter, &err, rows, + cols); -// fprintf( stderr, "." ); + // fprintf( stderr, "." ); - // Gauss relaxation is too slow + // Gauss relaxation is too slow -// int sx = F->getCols(); -// int sy = F->getRows(); -// int x,y,i; -// int shx; shift x + // int sx = F->getCols(); + // int sy = F->getRows(); + // int x,y,i; + // int shx; shift x + + // float h = 1.0f/sqrt(sx*sy*1.0f); + // float h2 = h*h; + + // h2 = 1; + + // for( int pass=0 ; pass<2 ; pass++ ) + // { + // shx=pass; + // for( y=0; ygetCols(); + int sy = F->getRows(); + + // float h = 1.0f/sqrt(sx*sy*1.0f); + // float h2i = 1.0/(h*h); + + // h2i = 1; + + for (int y = 0; y < sy; y++) + for (int x = 0; x < sx; x++) { + int w, n, e, s; + w = (x == 0 ? 0 : x - 1); + n = (y == 0 ? 0 : y - 1); + s = (y + 1 == sy ? y : y + 1); + e = (x + 1 == sx ? x : x + 1); -// float h = 1.0f/sqrt(sx*sy*1.0f); -// float h2 = h*h; + (*D)(x, y) = (*F)(x, y) - ((*U)(e, y) + (*U)(w, y) + (*U)(x, n) + + (*U)(x, s) - 4.0 * (*U)(x, y)); + } +} -// h2 = 1; +static void add_correction(pfs::Array2Df *U, const pfs::Array2Df *C) { + // DEBUG_STR << "add_correction" << endl; -// for( int pass=0 ; pass<2 ; pass++ ) -// { -// shx=pass; -// for( y=0; ygetCols(); + int sy = C->getRows(); + + for (int i = 0; i < sx * sy; i++) (*U)(i) += (*C)(i); } -static void calculate_defect( pfs::Array2Df *D, const pfs::Array2Df *U, const pfs::Array2Df *F ) -{ -// DEBUG_STR << "calculate defect" << endl; - - int sx = F->getCols(); - int sy = F->getRows(); - - // float h = 1.0f/sqrt(sx*sy*1.0f); - // float h2i = 1.0/(h*h); - - // h2i = 1; - - for( int y=0 ; ygetCols(); - int sy = C->getRows(); - - for( int i=0 ; igetCols(); - int ymax = F->getRows(); - - int i; // index for simple loops - int k; // index for iterating through levels - int k2; // index for iterating through levels in V-cycles - - // 1. restrict f to coarse-grid (by the way count the number of levels) - // k=0: fine-grid = f - // k=levels: coarsest-grid - int levels = 0; - int mins = (xmax=MINS ) - { - levels++; - mins = mins/2+MODYF; - } - - // given function f restricted on levels - pfs::Array2Df** RHS = new pfs::Array2Df*[levels+1]; - - // approximate initial sollutions on levels - pfs::Array2Df** IU = new pfs::Array2Df*[levels+1]; - // target functions in cycles (approximate sollution error (uh - ~uh) ) - pfs::Array2Df** VF = new pfs::Array2Df*[levels+1]; - - VF[0] = new pfs::Array2Df(xmax,ymax); - RHS[0] = F; - IU[0] = new pfs::Array2Df(xmax,ymax); - pfs::copy( U, IU[0] ); - - int sx=xmax; - int sy=ymax; - for( k=0 ; k=0 ; k-- ) - { - ph.setValue(20+70*(levels - k)/(levels+1)); - // 4. interpolate sollution from last coarse-grid to finer-grid - // interpolate from level k+1 to level k (finer-grid) - prolongate( IU[k+1], IU[k] ); - - // 4.1. first target function is the equation target function - // (following target functions are the defect) - pfs::copy( RHS[k], VF[k] ); - - // 5. V-cycle (twice repeated) - for( int cycle=0 ; cyclereset(); - -// fprintf( stderr, "Level: %d --------\n", k2 ); - - for( i=0 ; igetCols(), IU[k2]->getRows()); - calculate_defect( D, IU[k2], VF[k2] ); - - // 9. restrict deffect as target function for next coarser-grid - // def -> f[k2+1] - restrict( D, VF[k2+1] ); - delete D; - } - - // 10. solve on coarsest-grid (target function is the deffect) - // iu[levels] should contain sollution for - // the f[levels] - last deffect, iu will now be the correction - exact_sollution(VF[levels], IU[levels] ); - - // 11. upward stroke of V - for( k2=levels-1 ; k2>=k ; k2-- ) - { - // 12. interpolate correction from last coarser-grid to finer-grid - // iu[k2+1] -> cor - pfs::Array2Df* C = new pfs::Array2Df(IU[k2]->getCols(), IU[k2]->getRows()); - prolongate( IU[k2+1], C ); - - // 13. add interpolated correction to initial sollution at level k2 - add_correction( IU[k2], C ); - delete C; - -// fprintf( stderr, "Level: %d --------\n", k2 ); - - // 14. post-smoothing of current sollution using target function - for( i=0 ; igetCols(); + int ymax = F->getRows(); + + int i; // index for simple loops + int k; // index for iterating through levels + int k2; // index for iterating through levels in V-cycles + + // 1. restrict f to coarse-grid (by the way count the number of levels) + // k=0: fine-grid = f + // k=levels: coarsest-grid + int levels = 0; + int mins = (xmax < ymax) ? xmax : ymax; + while (mins >= MINS) { + levels++; + mins = mins / 2 + MODYF; + } - pfs::copy( IU[0], U ); + // given function f restricted on levels + pfs::Array2Df **RHS = new pfs::Array2Df *[levels + 1]; - // further improvement of the solution - if(BCG_POST_IMPROVE) { - int iter; - float err; - //DEBUG_STR << "FMG: cg post improving ..., maxiter=" << BCG_POST_STEPS; - //DEBUG_STR << ", tol=" << BCG_POST_TOL << std::endl; - linbcg( xmax*ymax, F->data(), U->data(), - BCG_POST_TOL, BCG_POST_STEPS, &iter, &err,ymax,xmax); - //DEBUG_STR << "FMG: cg post improvement: iter=" << iter << ", err=" << err; - //DEBUG_STR << std::endl; - } - - - ph.setValue(90); - - delete VF[0]; - delete IU[0]; - - for( k=1 ; k<=levels ; k++ ) { - delete RHS[k]; - delete IU[k]; - delete VF[k]; - } - - delete[] RHS; - delete[] IU; - delete[] VF; + // approximate initial sollutions on levels + pfs::Array2Df **IU = new pfs::Array2Df *[levels + 1]; + // target functions in cycles (approximate sollution error (uh - ~uh) ) + pfs::Array2Df **VF = new pfs::Array2Df *[levels + 1]; + + VF[0] = new pfs::Array2Df(xmax, ymax); + RHS[0] = F; + IU[0] = new pfs::Array2Df(xmax, ymax); + pfs::copy(U, IU[0]); + + int sx = xmax; + int sy = ymax; + for (k = 0; k < levels; k++) { + // calculate size of next level + sx = sx / 2 + MODYF; + sy = sy / 2 + MODYF; + + RHS[k + 1] = new pfs::Array2Df(sx, sy); + IU[k + 1] = new pfs::Array2Df(sx, sy); + VF[k + 1] = new pfs::Array2Df(sx, sy); -} + // restrict from level k to level k+1 (coarser-grid) + restrict(RHS[k], RHS[k + 1]); + } + + // 2. find exact sollution at the coarsest-grid (k=levels) + exact_sollution(RHS[levels], IU[levels]); + + // 3. nested iterations + for (k = levels - 1; k >= 0; k--) { + ph.setValue(20 + 70 * (levels - k) / (levels + 1)); + // 4. interpolate sollution from last coarse-grid to finer-grid + // interpolate from level k+1 to level k (finer-grid) + prolongate(IU[k + 1], IU[k]); + + // 4.1. first target function is the equation target function + // (following target functions are the defect) + pfs::copy(RHS[k], VF[k]); + + // 5. V-cycle (twice repeated) + for (int cycle = 0; cycle < V_CYCLE; cycle++) { + // 6. downward stroke of V + for (k2 = k; k2 < levels; k2++) { + // 7. pre-smoothing of initial sollution using target function + // zero for initial guess at smoothing + // (except for level k when iu contains prolongated result) + if (k2 != k) IU[k2]->reset(); + + // fprintf( stderr, "Level: %d --------\n", k2 ); + + for (i = 0; i < SMOOTH_IT; i++) smooth(IU[k2], VF[k2]); + + // 8. calculate defect at level + // d[k2] = Lh * ~u[k2] - f[k2] + pfs::Array2Df *D = + new pfs::Array2Df(IU[k2]->getCols(), IU[k2]->getRows()); + calculate_defect(D, IU[k2], VF[k2]); + + // 9. restrict deffect as target function for next coarser-grid + // def -> f[k2+1] + restrict(D, VF[k2 + 1]); + delete D; + } + + // 10. solve on coarsest-grid (target function is the deffect) + // iu[levels] should contain sollution for + // the f[levels] - last deffect, iu will now be the correction + exact_sollution(VF[levels], IU[levels]); + + // 11. upward stroke of V + for (k2 = levels - 1; k2 >= k; k2--) { + // 12. interpolate correction from last coarser-grid to + // finer-grid + // iu[k2+1] -> cor + pfs::Array2Df *C = + new pfs::Array2Df(IU[k2]->getCols(), IU[k2]->getRows()); + prolongate(IU[k2 + 1], C); + + // 13. add interpolated correction to initial sollution at level + // k2 + add_correction(IU[k2], C); + delete C; + + // fprintf( stderr, "Level: %d --------\n", k2 ); + + // 14. post-smoothing of current sollution using target function + for (i = 0; i < SMOOTH_IT; i++) smooth(IU[k2], VF[k2]); + } + + } //--- end of V-cycle + + } //--- end of nested iteration + + // 15. final sollution + // IU[0] contains the final sollution + + // for( k=0 ; k #include -#include "arch/math.h" #include +#include "arch/math.h" #ifdef _OPENMP #include #endif -#include #include +#include -#include "Libpfs/progress.h" -#include "Libpfs/array2d.h" +#include +#include +#include #include "pde.h" using namespace std; - #ifndef SQR -#define SQR(x) (x)*(x) +#define SQR(x) (x) * (x) #endif - // returns T = EVy A EVx^tr // note, modifies input data -void transform_ev2normal(pfs::Array2Df *A, pfs::Array2Df *T) -{ - int width = A->getCols(); - int height = A->getRows(); - assert((int)T->getCols()==width && (int)T->getRows()==height); - - // the discrete cosine transform is not exactly the transform needed - // need to scale input values to get the right transformation - for(int y=1 ; ydata(), T->data(), - FFTW_REDFT00, FFTW_REDFT00, FFTW_ESTIMATE); - fftwf_execute(p); - fftwf_destroy_plan(p); -} +void transform_ev2normal(pfs::Array2Df &A, pfs::Array2Df &T) { + int width = A.getCols(); + int height = A.getRows(); + assert((int)T.getCols() == width && (int)T.getRows() == height); + + // the discrete cosine transform is not exactly the transform needed + // need to scale input values to get the right transformation + for (int y = 1; y < height - 1; y++) + for (int x = 1; x < width - 1; x++) A(x, y) *= 0.25f; + + for (int x = 1; x < width - 1; x++) { + A(x, 0) *= 0.5f; + A(x, height - 1) *= 0.5f; + } + for (int y = 1; y < height - 1; y++) { + A(0, y) *= 0.5; + A(width - 1, y) *= 0.5f; + } + // note, fftw provides its own memory allocation routines which + // ensure that memory is properly 16/32 byte aligned so it can + // use SSE/AVX operations (2/4 double ops in parallel), if our + // data is not properly aligned fftw won't use SSE/AVX + // (I believe new() aligns memory to 16 byte so avoid overhead here) + // + // double* in = (double*) fftwf_malloc(sizeof(double) * width*height); + // fftwf_free(in); + + // executes 2d discrete cosine transform + fftwf_plan p; + FFTW_MUTEX::fftw_mutex_plan.lock(); + p = fftwf_plan_r2r_2d(height, width, A.data(), T.data(), FFTW_REDFT00, + FFTW_REDFT00, FFTW_ESTIMATE); + FFTW_MUTEX::fftw_mutex_plan.unlock(); + + fftwf_execute(p); + + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); + fftwf_destroy_plan(p); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); +} // returns T = EVy^-1 * A * (EVx^-1)^tr -void transform_normal2ev(pfs::Array2Df *A, pfs::Array2Df *T) -{ - int width = A->getCols(); - int height = A->getRows(); - assert((int)T->getCols()==width && (int)T->getRows()==height); - - // executes 2d discrete cosine transform - fftwf_plan p; - p=fftwf_plan_r2r_2d(height, width, A->data(), T->data(), - FFTW_REDFT00, FFTW_REDFT00, FFTW_ESTIMATE); - fftwf_execute(p); - fftwf_destroy_plan(p); - - // need to scale the output matrix to get the right transform - for(int y=0 ; y get_lambda(int n) -{ - assert(n>1); - std::vector v(n); - for (int i=0; i get_lambda(int n) { + assert(n > 1); + std::vector v(n); + for (int i = 0; i < n; i++) { + v[i] = -4.0 * SQR(sin((double)i / (2 * (n - 1)) * + boost::math::double_constants::pi)); + } - return v; + return v; } +void make_compatible_boundary(pfs::Array2Df &F) // makes boundary conditions compatible so that a solution exists -void make_compatible_boundary(pfs::Array2Df *F) { - int width = F->getCols(); - int height = F->getRows(); + int width = F.getCols(); + int height = F.getRows(); - double sum=0.0; - for(int y=1 ; ygetCols(); - int height = F->getRows(); - assert((int)U->getCols()==width && (int)U->getRows()==height); - // activate parallel execution of fft routines - fftwf_init_threads(); -#ifdef _OPENMP - fftwf_plan_with_nthreads( omp_get_max_threads() ); -#else - fftwf_plan_with_nthreads( 2 ); -#endif +void solve_pde_fft(pfs::Array2Df &F, pfs::Array2Df &U, pfs::Array2Df &F_tr, pfs::Progress &ph, + bool adjust_bound) { + ph.setValue(20); + // DEBUG_STR << "solve_pde_fft: solving Laplace U = F ..." << std::endl; + int width = F.getCols(); + int height = F.getRows(); + assert((int)U.getCols() == width && (int)U.getRows() == height); + + // activate parallel execution of fft routines + init_fftw(); + + // in general there might not be a solution to the Poisson pde + // with Neumann boundary conditions unless the boundary satisfies + // an integral condition, this function modifies the boundary so that + // the condition is exactly satisfied + if (adjust_bound) { + // DEBUG_STR << "solve_pde_fft: checking boundary conditions" << + // std::endl; + make_compatible_boundary(F); + } - // in general there might not be a solution to the Poisson pde - // with Neumann boundary conditions unless the boundary satisfies - // an integral condition, this function modifies the boundary so that - // the condition is exactly satisfied - if(adjust_bound) - { - //DEBUG_STR << "solve_pde_fft: checking boundary conditions" << std::endl; - make_compatible_boundary(F); - } - - // transforms F into eigenvector space: Ftr = - //DEBUG_STR << "solve_pde_fft: transform F to ev space (fft)" << std::endl; - pfs::Array2Df* F_tr = new pfs::Array2Df(width,height); - transform_normal2ev(F, F_tr); - // TODO: F no longer needed so could release memory, but as it is an - // input parameter we won't do that - ph.setValue(50); - if (ph.canceled()) - { - delete F_tr; - return; - } - - //DEBUG_STR << "solve_pde_fft: F_tr(0,0) = " << (*F_tr)(0,0); - //DEBUG_STR << " (must be 0 for solution to exist)" << std::endl; - - // in the eigenvector space the solution is very simple - //DEBUG_STR << "solve_pde_fft: solve in eigenvector space" << std::endl; - pfs::Array2Df* U_tr = new pfs::Array2Df(width,height); - std::vector l1=get_lambda(height); - std::vector l2=get_lambda(width); - for(int y=0 ; y l1 = get_lambda(height); + std::vector l2 = get_lambda(width); + #pragma omp parallel for + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + F_tr(x, y) = F_tr(x, y) / (l1[y] + l2[x]); + } + } + F_tr(0, 0) = 0.f; // any value ok, only adds a const to the solution - // fft parallel threads cleanup, better handled outside this function? - fftwf_cleanup_threads(); + ph.setValue(55); - ph.setValue(90); - //DEBUG_STR << "solve_pde_fft: done" << std::endl; -} + // transforms F_tr back to the normal space + // DEBUG_STR << "solve_pde_fft: transform F_tr to normal space (fft)" << + // std::endl; + transform_ev2normal(F_tr, U); + ph.setValue(85); + + // the solution U as calculated will satisfy something like int U = 0 + // since for any constant c, U-c is also a solution and we are mainly + // working in the logspace of (0,1) data we prefer to have + // a solution which has no positive values: U_new(x,y)=U(x,y)-max + // (not really needed but good for numerics as we later take exp(U)) + // DEBUG_STR << "solve_pde_fft: removing constant from solution" << + // std::endl; + float max = 0.f; + for (int i = 0; i < width * height; i++) { + if (max < U(i)) { + max = U(i); + } + } + + for (int i = 0; i < width * height; i++) { + U(i) -= max; + } + // fft parallel threads cleanup, better handled outside this function? + // fftwf_cleanup_threads(); + + ph.setValue(90); + // DEBUG_STR << "solve_pde_fft: done" << std::endl; +} // --------------------------------------------------------------------- // the functions below are only for test purposes to check the accuracy // of the pde solvers - // returns the norm of (Laplace U - F) of all interior points // useful to compare solvers -float residual_pde(pfs::Array2Df* U, pfs::Array2Df* F) -{ - int width = U->getCols(); - int height = U->getRows(); - assert((int)F->getCols()==width && (int)F->getRows()==height); - - double res=0.0; - for(int y=1;y( sqrt(res) ); +float residual_pde(pfs::Array2Df &U, pfs::Array2Df &F) { + int width = U.getCols(); + int height = U.getRows(); + assert((int)F.getCols() == width && (int)F.getRows() == height); + + double res = 0.0; + for (int y = 1; y < height - 1; y++) + for (int x = 1; x < width - 1; x++) { + double laplace = -4.0 * U(x, y) + U(x - 1, y) + U(x + 1, y) + + U(x, y - 1) + U(x, y + 1); + res += SQR(laplace - F(x, y)); + } + return static_cast(sqrt(res)); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pde.h luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pde.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pde.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pde.h 2019-06-09 19:18:38.000000000 +0000 @@ -34,8 +34,7 @@ #include -namespace pfs -{ +namespace pfs { class Progress; } @@ -54,8 +53,8 @@ * @param U [out] solution * @param adjust_bound, adjust boundary values of F to make pde solvable */ -void solve_pde_fft(pfs::Array2Df *F, pfs::Array2Df *U, - pfs::Progress &ph, bool adjust_bound = false); +void solve_pde_fft(pfs::Array2Df &F, pfs::Array2Df &U, pfs::Array2Df &F_tr, pfs::Progress &ph, + bool adjust_bound = false); /** * @brief returns the residual error of the solution U, ie norm(Laplace U - F) @@ -63,8 +62,6 @@ * @param F [in] right hand side * @param U [in] solution */ -float residual_pde(pfs::Array2Df *U, pfs::Array2Df *F); - +float residual_pde(pfs::Array2Df &U, pfs::Array2Df &F); #endif - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -33,92 +33,104 @@ #include "tmo_fattal02.h" +#include #include #include #include -#include -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" +#include "../../opthelper.h" +#include "../../sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) -namespace -{ +namespace { const float epsilon = 1e-4f; } -void pfstmo_fattal02(pfs::Frame& frame, - float opt_alpha, - float opt_beta, - float opt_saturation, - float opt_noise, - bool newfattal, - bool fftsolver, - int detail_level, - pfs::Progress &ph) -{ - if (fftsolver) - { - // opt_alpha = 1.f; - newfattal = true; // let's make sure, prudence is never enough! - } - - if ( opt_noise <= 0.0f ) - { - opt_noise = opt_alpha * 0.01f; - } +void pfstmo_fattal02(pfs::Frame &frame, float opt_alpha, float opt_beta, + float opt_saturation, float opt_noise, bool newfattal, + bool fftsolver, int detail_level, pfs::Progress &ph) { + + if (fftsolver) { + // opt_alpha = 1.f; + newfattal = true; // let's make sure, prudence is never enough! + } + + if (opt_noise <= 0.0f) { + opt_noise = opt_alpha * 0.01f; + } #ifndef NDEBUG - std::stringstream ss; - ss << "pfstmo_fattal02 ("; - ss << "alpha: " << opt_alpha; - ss << ", beta: " << opt_beta; - ss << ". saturation: " << opt_saturation; - ss << ", noise: " << opt_noise; - ss << ", fftsolver: " << fftsolver << ")"; - std::cout << ss.str() << std::endl; + std::stringstream ss; + ss << "pfstmo_fattal02 ("; + ss << "alpha: " << opt_alpha; + ss << ", beta: " << opt_beta; + ss << ". saturation: " << opt_saturation; + ss << ", noise: " << opt_noise; + ss << ", fftsolver: " << fftsolver << ")"; + std::cout << ss.str() << std::endl; #endif - //Store RGB data temporarily in XYZ channels - pfs::Channel *R, *G, *B; - frame.getXYZChannels( R, G, B ); - //--- - - if ( !R || !G || !B ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - } - - frame.getTags().setTag("LUMINANCE", "RELATIVE"); - // tone mapping - const int w = frame.getWidth(); - const int h = frame.getHeight(); - - pfs::Array2Df Yr(w,h); - pfs::Array2Df L(w,h); - - pfs::transformRGB2Y(R, G, B, &Yr); - - tmo_fattal02(w, h, Yr, L, - opt_alpha, opt_beta, opt_noise, newfattal, - fftsolver, detail_level, - ph); - - if ( !ph.canceled() ) - { - pfs::Array2Df& arrayRed = *R; - pfs::Array2Df& arrayGreen = *G; - pfs::Array2Df& arrayBlue = *B; - - for (int i=0; i < w*h; i++) - { - float y = std::max( Yr(i), epsilon ); - float l = std::max( L(i), epsilon ); - arrayRed(i) = std::pow( std::max(arrayRed(i)/y, 0.f), opt_saturation ) * l; - arrayGreen(i) = std::pow( std::max(arrayGreen(i)/y, 0.f), opt_saturation ) * l; - arrayBlue(i) = std::pow( std::max(arrayBlue(i)/y, 0.f), opt_saturation ) * l; - } + ph.setValue(0); + + // Store RGB data temporarily in XYZ channels + pfs::Channel *R, *G, *B; + frame.getXYZChannels(R, G, B); + //--- + + if (!R || !G || !B) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); + } + + frame.getTags().setTag("LUMINANCE", "RELATIVE"); + // tone mapping + const int w = frame.getWidth(); + const int h = frame.getHeight(); + + pfs::Array2Df Yr(w, h); + pfs::Array2Df L(w, h); + + pfs::transformRGB2Y(R, G, B, &Yr); + + try { + tmo_fattal02(w, h, Yr, L, opt_alpha, opt_beta, opt_noise, newfattal, + fftsolver, detail_level, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } + + if (!ph.canceled()) { + pfs::Array2Df &arrayRed = *R; + pfs::Array2Df &arrayGreen = *G; + pfs::Array2Df &arrayBlue = *B; + +#ifdef __SSE2__ + const vfloat epsilonv = F2V(epsilon); + const vfloat opt_saturationv = F2V(opt_saturation); +#endif + #pragma omp parallel for + for (int i = 0; i < h; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + vfloat yv = vmaxf(LVFU(Yr(j, i)), epsilonv); + vfloat lv = vmaxf(LVFU(L(j, i)), epsilonv); + STVFU(arrayRed(j, i), pow_F(vmaxf(LVFU(arrayRed(j, i)) / yv, ZEROV), opt_saturationv) * lv); + STVFU(arrayGreen(j, i), pow_F(vmaxf(LVFU(arrayGreen(j, i)) / yv, ZEROV), opt_saturationv) * lv); + STVFU(arrayBlue(j, i), pow_F(vmaxf(LVFU(arrayBlue(j, i)) / yv, ZEROV), opt_saturationv) * lv); + } +#endif + for (; j < w; ++j) { + float y = std::max(Yr(j, i), epsilon); + float l = std::max(L(j, i), epsilon); + arrayRed(j, i) = pow_F(std::max(arrayRed(j, i) / y, 0.f), opt_saturation) * l; + arrayGreen(j, i) = pow_F(std::max(arrayGreen(j, i) / y, 0.f), opt_saturation) * l; + arrayBlue(j, i) = pow_F(std::max(arrayBlue(j, i) / y, 0.f), opt_saturation) * l; + } + } - ph.setValue( 100 ); - } + ph.setValue(100); + } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/tmo_fattal02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/tmo_fattal02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/tmo_fattal02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/tmo_fattal02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -30,20 +30,25 @@ * $Id: tmo_fattal02.cpp,v 1.3 2008/11/04 23:43:08 rafm Exp $ */ - +#include #include #include #include #include -#include -#include #include +#include #include "Libpfs/array2d.h" +#include "Libpfs/rt_algo.h" #include "Libpfs/progress.h" #include "Libpfs/utils/msec_timer.h" #include "TonemappingOperators/pfstmo.h" +#include "../../sleef.c" +#ifdef _OPENMP +#include +#endif +#include "opthelper.h" #include "pde.h" #include "tmo_fattal02.h" @@ -52,32 +57,8 @@ using namespace pfs; using namespace utils; +void downSample(const pfs::Array2Df &A, pfs::Array2Df &B) { -//!! TODO: for debugging purposes -// #define PFSEOL "\x0a" -// static void dumpPFS( const char *fileName, const pfs::Array2D *data, const char *channelName ) -// { -// FILE *fh = fopen( fileName, "wb" ); -// assert( fh != NULL ); - -// int width = data->getCols(); -// int height = data->getRows(); - -// fprintf( fh, "PFS1" PFSEOL "%d %d" PFSEOL "1" PFSEOL "0" PFSEOL -// "%s" PFSEOL "0" PFSEOL "ENDH", width, height, channelName ); - -// for( int y = 0; y < height; y++ ) -// for( int x = 0; x < width; x++ ) { -// fwrite( &((*data)(x,y)), sizeof( float ), 1, fh ); -// } - -// fclose( fh ); -// } - -//-------------------------------------------------------------------- - -void downSample(const pfs::Array2Df& A, pfs::Array2Df& B) -{ const int width = B.getCols(); const int height = B.getRows(); @@ -85,466 +66,436 @@ // applied to too small problems and in total don't lead to noticable // speed improvements. The main issue is the pde solver and in case of the // fft solver uses optimised threaded fftw routines. + // Note from Ingo Weyrich. The above statement is wrong. There are some very expensive loops (exp, log, pow) which got a really good speedup by parallelized and vectorized code. //#pragma omp parallel for - for ( int y=0 ; ygetCols(); - int height = H->getRows(); - const int size = width*height; - - pyramids[0] = new pfs::Array2Df(width,height); -//#pragma omp parallel for shared(pyramids, H) - for( int i=0 ; igetCols(); - const int height = H->getRows(); - const float divider = pow( 2.0f, k+1 ); - float avgGrad = 0.0f; - -//#pragma omp parallel for shared(G,H) reduction(+:avgGrad) - for( int y=0 ; y(x * 0.5f); //x / 2.f; - int ay = static_cast(y * 0.5f); //y / 2.f; - ax = (axgetCols(); -// int height = A->getRows(); -// int x,y; - -// for( y=0 ; y(x * 0.5f); // x / 2.f; + int ay = static_cast(y * 0.5f); // y / 2.f; + ax = (ax < awidth) ? ax : awidth - 1; + ay = (ay < aheight) ? ay : aheight - 1; + B(x, y) = A(ax, ay); + } + } +} -void calculateFiMatrix(pfs::Array2Df* FI, pfs::Array2Df* gradients[], +void calculateFiMatrix(pfs::Array2Df &FI, pfs::Array2Df *gradients[], float avgGrad[], int nlevels, int detail_level, - float alfa, float beta, float noise, bool newfattal) -{ - int width = gradients[nlevels-1]->getCols(); - int height = gradients[nlevels-1]->getRows(); - pfs::Array2Df** fi = new pfs::Array2Df*[nlevels]; + float alfa, float beta, float noise, bool newfattal) { - fi[nlevels-1] = new pfs::Array2Df(width,height); - if (newfattal) - { - //#pragma omp parallel for shared(fi) - for ( int k = 0 ; k < width*height ; k++ ) - { - (*fi[nlevels-1])(k) = 1.0f; + int width = gradients[nlevels - 1]->getCols(); + int height = gradients[nlevels - 1]->getRows(); + pfs::Array2Df **fi = new pfs::Array2Df *[nlevels]; + + fi[nlevels - 1] = new pfs::Array2Df(width, height); + if (newfattal) { + for (int k = 0; k < width * height; k++) { + (*fi[nlevels - 1])(k) = 1.0f; } } - for ( int k = nlevels-1; k >= 0 ; k-- ) - { + for (int k = nlevels - 1; k >= 0; k--) { width = gradients[k]->getCols(); height = gradients[k]->getRows(); - // only apply gradients to levels>=detail_level but at least to the coarsest - if ( k >= detail_level - ||k==nlevels-1 - || newfattal == false) - { - //DEBUG_STR << "calculateFiMatrix: apply gradient to level " << k << endl; - //#pragma omp parallel for shared(fi,avgGrad) - for ( int y = 0; y < height; y++ ) - { - for ( int x = 0; x < width; x++ ) - { - float grad = ((*gradients[k])(x,y) < 1e-4f) ? 1e-4 : (*gradients[k])(x,y); + // only apply gradients to levels>=detail_level but at least to the + // coarsest + if (k >= detail_level || k == nlevels - 1 || newfattal == false) { + #pragma omp parallel for + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + float grad = ((*gradients[k])(x, y) < 1e-4f) + ? 1e-4 + : (*gradients[k])(x, y); float a = alfa * avgGrad[k]; - float value = powf((grad+noise)/a, beta - 1.0f); + float value = powf((grad + noise) / a, beta - 1.0f); if (newfattal) - (*fi[k])(x,y) *= value; + (*fi[k])(x, y) *= value; else - (*fi[k])(x,y) = value; + (*fi[k])(x, y) = value; } } } - // create next level - if ( k>1 ) - { - width = gradients[k-1]->getCols(); - height = gradients[k-1]->getRows(); - fi[k-1] = new pfs::Array2Df(width,height); - } - else - fi[0] = FI; // highest level -> result - - if ( k>0 && newfattal ) - { - upSample(*fi[k], *fi[k-1]); // upsample to next level - gaussianBlur(*fi[k-1], *fi[k-1]); + if (k > 1) { + width = gradients[k - 1]->getCols(); + height = gradients[k - 1]->getRows(); + fi[k - 1] = new pfs::Array2Df(width, height); + } else + fi[0] = &FI; // highest level -> result + + if (k > 0 && newfattal) { + upSample(*fi[k], *fi[k - 1]); // upsample to next level + gaussianBlur(*fi[k - 1], *fi[k - 1]); } } - for ( int k=1 ; k vI; - - copy(data, data + size, back_inserter(vI)); - sort(vI.begin(), vI.end()); - - minLum = vI.at( int(minPrct*vI.size()) ); - maxLum = vI.at( int(maxPrct*vI.size()) ); -} - -void tmo_fattal02(size_t width, - size_t height, - const pfs::Array2Df& Y, - pfs::Array2Df& L, - float alfa, - float beta, - float noise, - bool newfattal, - bool fftsolver, - int detail_level, - pfs::Progress &ph) -{ +void tmo_fattal02(size_t width, size_t height, const pfs::Array2Df &Y, + pfs::Array2Df &L, float alfa, float beta, float noise, + bool newfattal, bool fftsolver, int detail_level, + pfs::Progress &ph) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); #endif static const float black_point = 0.1f; static const float white_point = 0.5f; - static const float gamma = 1.0f; // 0.8f; + static const float gamma = 1.0f; // 0.8f; // static const int detail_level = 3; - if ( detail_level < 0 ) detail_level = 0; - if ( detail_level > 3 ) detail_level = 3; + if (detail_level < 0) detail_level = 0; + if (detail_level > 3) detail_level = 3; + + ph.setValue(2); + if (ph.canceled()) return; + + int MSIZE = 32; // minimum size of gaussian pyramid + // I believe a smaller value than 32 results in slightly better overall + // quality but I'm only applying this if the newly implemented fft solver + // is used in order not to change behaviour of the old version + // TODO: best let the user decide this value + if (fftsolver) { + MSIZE = 8; + } + + size_t size = width * height; + + // find max & min values, normalize to range 0..100 and take logarithm + float minLum = Y(0, 0); + float maxLum = Y(0, 0); + + for (size_t i = 0; i < size; i++) { + minLum = (Y(i) < minLum) ? Y(i) : minLum; + maxLum = (Y(i) > maxLum) ? Y(i) : maxLum; + } + + pfs::Array2Df H(width, height); + +#ifdef __SSE2__ + const vfloat maxLumv = F2V(maxLum); + const vfloat c100v = F2V(100.f); + const vfloat epsv = F2V(1e-4f); +#endif + #pragma omp parallel for + for (size_t i = 0; i < height; ++i) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < width - 3; j += 4) { + STVFU(H(j, i), xlogf(c100v * LVFU(Y(j, i)) / maxLumv + epsv)); + } +#endif + for (; j < width; ++j) { + H(j, i) = xlogf(100.0f * Y(j, i) / maxLum + 1e-4f); + } + } + + ph.setValue(4); + + // create gaussian pyramids + int mins = (width < height) ? width : height; // smaller dimension + int nlevels = 0; + while (mins >= MSIZE) { + nlevels++; + mins /= 2; + } + + // The following lines solves a bug with images particularly small + if (nlevels == 0) nlevels = 1; + + pfs::Array2Df **pyramids = new pfs::Array2Df *[nlevels]; + pyramids[0] = &H; + createGaussianPyramids(H, pyramids, nlevels); + ph.setValue(8); + + // calculate gradients and its average values on pyramid levels + pfs::Array2Df **gradients = new pfs::Array2Df *[nlevels]; + float avgGrad[nlevels]; + for (int k = 0; k < nlevels; k++) { + gradients[k] = new pfs::Array2Df(pyramids[k]->getCols(), pyramids[k]->getRows()); + avgGrad[k] = calculateGradients(*pyramids[k], *gradients[k], k); + } + ph.setValue(12); + + // calculate fi matrix + pfs::Array2Df FI(width, height); + calculateFiMatrix(FI, gradients, avgGrad, nlevels, detail_level, alfa, beta, + noise, newfattal); + + for (int i = 0; i < nlevels; i++) { + if(i != 0) // pyramids[0] is H. Will be deleted later + delete pyramids[i]; + delete gradients[i]; + } + delete[] pyramids; + delete[] gradients; + ph.setValue(16); + if (ph.canceled()) { + return; + } + + // attenuate gradients + pfs::Array2Df Gx(width, height); + pfs::Array2Df Gy(width, height); + + // the fft solver solves the Poisson pde but with slightly different + // boundary conditions, so we need to adjust the assembly of the right hand + // side accordingly (basically fft solver assumes U(-1) = U(1), whereas zero + // Neumann conditions assume U(-1)=U(0)), see also divergence calculation + + if (fftsolver) + #pragma omp parallel for + for (size_t y = 0; y < height; y++) + for (size_t x = 0; x < width; x++) { + // sets index+1 based on the boundary assumption H(N+1)=H(N-1) + unsigned int yp1 = (y + 1 >= height ? height - 2 : y + 1); + unsigned int xp1 = (x + 1 >= width ? width - 2 : x + 1); + // forward differences in H, so need to use between-points + // approx of FI + Gx(x, y) = + (H(xp1, y) - H(x, y)) * 0.5 * (FI(xp1, y) + FI(x, y)); + Gy(x, y) = + (H(x, yp1) - H(x, y)) * 0.5 * (FI(x, yp1) + FI(x, y)); + } + else + #pragma omp parallel for + for (size_t y = 0; y < height; y++) + for (size_t x = 0; x < width; x++) { + int s, e; + s = (y + 1 == height ? y : y + 1); + e = (x + 1 == width ? x : x + 1); - ph.setValue(2); - if (ph.canceled()) return; + Gx(x, y) = (H(e, y) - H(x, y)) * FI(x, y); + Gy(x, y) = (H(x, s) - H(x, y)) * FI(x, y); + } + + ph.setValue(18); + + // calculate divergence + + pfs::Array2Df DivG(width, height); + #pragma omp parallel for + for (size_t y = 0; y < height; ++y) { + for (size_t x = 0; x < width; ++x) { + DivG(x, y) = Gx(x, y) + Gy(x, y); + if (x > 0) DivG(x, y) -= Gx(x - 1, y); + if (y > 0) DivG(x, y) -= Gy(x, y - 1); + + if (fftsolver) { + if (x == 0) DivG(x, y) += Gx(x, y); + if (y == 0) DivG(x, y) += Gy(x, y); + } + } + } - int MSIZE = 32; // minimum size of gaussian pyramid - // I believe a smaller value than 32 results in slightly better overall - // quality but I'm only applying this if the newly implemented fft solver - // is used in order not to change behaviour of the old version - // TODO: best let the user decide this value - if (fftsolver) - { - MSIZE = 8; - } - - int size = width*height; - // unsigned int x,y; - // int i, k; - - // find max & min values, normalize to range 0..100 and take logarithm - float minLum = Y(0,0); - float maxLum = Y(0,0); - for ( int i=0 ; i maxLum ) ? Y(i) : maxLum; - } - pfs::Array2Df* H = new pfs::Array2Df(width, height); - //#pragma omp parallel for private(i) shared(H, Y, maxLum) - for ( int i=0 ; i= MSIZE ) - { - nlevels++; - mins /= 2; - } - // std::cout << "DEBUG: nlevels = " << nlevels << ", mins = " << mins << std::endl; - // The following lines solves a bug with images particularly small - if (nlevels == 0) nlevels = 1; - - pfs::Array2Df** pyramids = new pfs::Array2Df*[nlevels]; - createGaussianPyramids(H, pyramids, nlevels); - ph.setValue(8); - - // calculate gradients and its average values on pyramid levels - pfs::Array2Df** gradients = new pfs::Array2Df*[nlevels]; - float* avgGrad = new float[nlevels]; - for ( int k=0 ; kgetCols(), pyramids[k]->getRows()); - avgGrad[k] = calculateGradients(pyramids[k],gradients[k], k); - } - ph.setValue(12); - - // calculate fi matrix - pfs::Array2Df* FI = new pfs::Array2Df(width, height); - calculateFiMatrix(FI, gradients, avgGrad, nlevels, detail_level, alfa, beta, noise, newfattal); -// dumpPFS( "FI.pfs", FI, "Y" ); - for ( int i=0 ; i= height ? height-2 : y+1); - unsigned int xp1 = (x+1 >= width ? width-2 : x+1); - // forward differences in H, so need to use between-points approx of FI - (*Gx)(x,y) = ((*H)(xp1,y)-(*H)(x,y)) * 0.5*((*FI)(xp1,y)+(*FI)(x,y)); - (*Gy)(x,y) = ((*H)(x,yp1)-(*H)(x,y)) * 0.5*((*FI)(x,yp1)+(*FI)(x,y)); - } - else - for ( size_t y=0 ; y 0 ) DivG(x,y) -= (*Gx)(x-1,y); - if ( y > 0 ) DivG(x,y) -= (*Gy)(x,y-1); - - if (fftsolver) - { - if (x==0) DivG(x,y) += (*Gx)(x,y); - if (y==0) DivG(x,y) += (*Gy)(x,y); - } - - } - } - delete Gx; - delete Gy; - ph.setValue(20); - if (ph.canceled()) - { - return; - } - -// dumpPFS( "DivG.pfs", DivG, "Y" ); - - // solve pde and exponentiate (ie recover compressed image) - { - pfs::Array2Df U(width, height); - if (fftsolver) - { - solve_pde_fft(&DivG, &U, ph); - } - else - { - solve_pde_multigrid(&DivG, &U, ph); - } + ph.setValue(20); + if (ph.canceled()) { + return; + } + + // solve pde and exponentiate (ie recover compressed image) + { + pfs::Array2Df U(width, height); + if (fftsolver) { + solve_pde_fft(DivG, U, Gx, ph); + } else { + solve_pde_multigrid(&DivG, &U, ph); + } #ifndef NDEBUG - printf("\npde residual error: %f\n", residual_pde(&U, &DivG)); + printf("\npde residual error: %f\n", residual_pde(U, DivG)); #endif - ph.setValue(90); - if ( ph.canceled() ) - { - return; - } - - for ( size_t idx = 0 ; idx < height*width; ++idx ) - { - L(idx) = expf( gamma * U(idx) ); - } - } - ph.setValue(95); - - // remove percentile of min and max values and renormalize - float cut_min = 0.01f * black_point; - float cut_max = 1.0f - 0.01f * white_point; - assert(cut_min>=0.0f && (cut_max<=1.0f) && (cut_min 1.0 - } + ph.setValue(90); + if (ph.canceled()) { + return; + } + +#ifdef __SSE2__ + const vfloat gammav = F2V(gamma); +#endif + #pragma omp parallel for + for (size_t i = 0; i < height; ++i) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < width - 3; j += 4) { + STVFU(L(j, i), xexpf(gammav * LVFU(U(j, i)))); + } +#endif + for (; j < width; ++j) { + L(j, i) = xexpf(gamma * U(j, i)); + } + } + } + ph.setValue(95); + + // remove percentile of min and max values and renormalize + float cut_min = 0.01f * black_point; + float cut_max = 1.0f - 0.01f * white_point; + assert(cut_min >= 0.0f && (cut_max <= 1.0f) && (cut_min < cut_max)); + lhdrengine::findMinMaxPercentile(L.data(), width * height, cut_min, minLum, cut_max, maxLum, true); + + for (size_t idx = 0; idx < height * width; ++idx) { + L(idx) = (L(idx) - minLum) / (maxLum - minLum); + if (L(idx) <= 0.0f) { + L(idx) = 0.0; + } + // note, we intentionally do not cut off values > 1.0 + } + + ph.setValue(96); + #ifdef TIMER_PROFILING stop_watch.stop_and_update(); cout << endl; cout << "tmo_fattal02 = " << stop_watch.get_time() << " msec" << endl; #endif - - ph.setValue(96); } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/tmo_fattal02.h luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/tmo_fattal02.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/fattal02/tmo_fattal02.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/fattal02/tmo_fattal02.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,11 +33,10 @@ #ifndef TMO_FATTAL02_H #define TMO_FATTAL02_H -#include #include +#include -namespace pfs -{ +namespace pfs { class Progress; } @@ -55,12 +54,9 @@ //! \param noise gradient level of noise (extra parameter) //! void tmo_fattal02(size_t width, size_t height, - //const float* Y, float* L, - const pfs::Array2Df& Y, - pfs::Array2Df& L, - float alfa, float beta, - float noise, bool newfattal, - bool fftsolver, int detail_level, - pfs::Progress &ph); + // const float* Y, float* L, + const pfs::Array2Df &Y, pfs::Array2Df &L, float alfa, + float beta, float noise, bool newfattal, bool fftsolver, + int detail_level, pfs::Progress &ph); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/pfstmo_ferradans11.cpp luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/pfstmo_ferradans11.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/pfstmo_ferradans11.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/pfstmo_ferradans11.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -31,18 +31,16 @@ */ #include -#include "tmo_ferradans11.h" -#include "Libpfs/frame.h" -#include "Libpfs/manip/gamma.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" +#include "tmo_ferradans11.h" -void pfstmo_ferradans11(pfs::Frame& frame, float opt_rho, float opt_inv_alpha, pfs::Progress &ph) -{ - - //--- default tone mapping parameters; - //float rho = -2; - //float inv_alpha = 5; +void pfstmo_ferradans11(pfs::Frame &frame, float opt_rho, float opt_inv_alpha, + pfs::Progress &ph) { +//--- default tone mapping parameters; +// float rho = -2; +// float inv_alpha = 5; #ifndef NDEBUG std::stringstream ss; @@ -52,21 +50,24 @@ std::cout << ss.str() << std::endl; #endif + ph.setValue(0); + pfs::Channel *inR, *inG, *inB; - frame.getXYZChannels( inR, inG, inB ); - //--- + frame.getXYZChannels(inR, inG, inB); - if( inR==NULL || inG==NULL || inB==NULL) - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (inR == NULL || inG == NULL || inB == NULL) + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); frame.getTags().setTag("LUMINANCE", "RELATIVE"); - //TODO Check why gamma is 1/4 of gamma in pfstools - //pfs::applyGamma(&frame, 0.25f); + // TODO Check why gamma is 1/4 of gamma in pfstools + // pfs::applyGamma(&frame, 0.25f); // tone mapping - tmo_ferradans11(*inR, *inG, *inB, opt_rho, opt_inv_alpha, ph); + try { + tmo_ferradans11(*inR, *inG, *inB, opt_rho, opt_inv_alpha, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } - if ( !ph.canceled() ) - ph.setValue(100); + if (!ph.canceled()) ph.setValue(100); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/tmo_ferradans11.cpp luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/tmo_ferradans11.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/tmo_ferradans11.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/tmo_ferradans11.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -28,37 +28,45 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * + * Adapted to Luminance HDR + * @author Franco Comida + * */ #include +#include -#include -#include #include +#include +#include #include -#include #include #ifdef _OPENMP #include #endif -#include "Libpfs/array2d.h" -#include "Libpfs/progress.h" -#include -#include "Libpfs/utils/msec_timer.h" -#include "TonemappingOperators/pfstmo.h" -#include "tmo_ferradans11.h" #include +#include -#include +#include +#include +#include +#include "Libpfs/rt_algo.h" +#include +#include +#include +#include "Common/LuminanceOptions.h" +#include "tmo_ferradans11.h" +#include "../../sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) using namespace std; using namespace pfs; using namespace utils; -//for debugging purposes +// for debugging purposes #if 0 #define PFSEOL "\x0a" static void dumpPFS( const char *fileName, const pfstmo::Array2D *data, const char *channelName ) @@ -82,34 +90,48 @@ } #endif - //-------------------------------------------------------------------- namespace { -static inline bool abs_compare(float a, float b) -{ - return fabs(a) < fabs(b); -} +static inline bool abs_compare(float a, float b) { return fabs(a) < fabs(b); } /*Implementation, hardcoded of the R function */ -float apply_arctg_slope10(float Ip,float I,float I2,float I3,float I4,float I5,float I6,float I7) -{ - //Arctan, slope 10 - float gr1,gr2,gr3,gr4,gr5,gr6,gr7; - gr1=Ip-I; - gr2=Ip*Ip-2*Ip*I+I2; - gr3=Ip*Ip*Ip-3*Ip*Ip*I+3*Ip*I2-I3; - gr4=Ip*Ip*Ip*Ip+4*Ip*Ip*I2+I4-4*Ip*I3+2*Ip*Ip*(I2-2*Ip*I); - gr5=Ip*gr4-Ip*Ip*Ip*Ip*I-4*Ip*Ip*I3-I5+4*Ip*I4-2*Ip*Ip*(I3-2*Ip*I2); - gr6=Ip*Ip*gr4-Ip*Ip*Ip*Ip*Ip*I-4*Ip*Ip*Ip*I3-Ip*I5+4*Ip*Ip*I4-2*Ip*Ip*Ip*(I3-2*Ip*I2)-(I*Ip*gr4-Ip*Ip*Ip*Ip*I2-4*Ip*Ip*I4-I6+4*Ip*I5-2*Ip*Ip*(I4-2*Ip*I3) ); - gr7=Ip*Ip*(Ip*( Ip*Ip*Ip*Ip+4*Ip*Ip*I2+I4-4*Ip*I3+2*Ip*Ip*(I2-2*Ip*I) )-Ip*Ip*Ip*Ip*I-4*Ip*Ip*I3-I5+4*Ip*I4-2*Ip*Ip*(I3-2*Ip*I2))-2*Ip*(Ip*(Ip*Ip*Ip*Ip*I+4*Ip*Ip*I3+I5-4*Ip*I4+2*Ip*Ip*(I3-2*Ip*I2)) -Ip*Ip*Ip*Ip*I2-4*Ip*Ip*I4-I6+4*Ip*I5-2*Ip*Ip*(I4-2*Ip*I3))+Ip*(Ip*Ip*Ip*Ip*I2+4*Ip*Ip*I4+I6-4*Ip*I5+2*Ip*Ip*(I4-2*Ip*I3)) -Ip*Ip*Ip*Ip*I3-4*Ip*Ip*I5-I7+4*Ip*I6-2*Ip*Ip*(I5-2*Ip*I4); +inline float apply_arctg_slope10(float Ip, float I, float I2, float I3, float I4, + float I5, float I6, float I7) { - // Hardcoded coefficients of the polynomial of degree 9 that allows to approximate the neighborhood averaging as a sum of convolutions - return(( -7.7456e+00)*gr7+ (3.1255e-16)*gr6+(1.5836e+01)*gr5+(-1.8371e-15)*gr4+(-1.1013e+01)*gr3+(4.4531e-16)*gr2+(3.7891e+00)*gr1+ 1.2391e-15 ) ; + // Arctan, slope 10 + float gr1, gr2, gr3, gr4, gr5, gr6, gr7; + gr1 = Ip - I; + gr2 = Ip * Ip - 2 * Ip * I + I2; + gr3 = Ip * Ip * Ip - 3 * Ip * Ip * I + 3 * Ip * I2 - I3; + gr4 = Ip * Ip * Ip * Ip + 4 * Ip * Ip * I2 + I4 - 4 * Ip * I3 + + 2 * Ip * Ip * (I2 - 2 * Ip * I); + gr5 = Ip * gr4 - Ip * Ip * Ip * Ip * I - 4 * Ip * Ip * I3 - I5 + + 4 * Ip * I4 - 2 * Ip * Ip * (I3 - 2 * Ip * I2); + gr6 = Ip * Ip * gr4 - Ip * Ip * Ip * Ip * Ip * I - 4 * Ip * Ip * Ip * I3 - + Ip * I5 + 4 * Ip * Ip * I4 - 2 * Ip * Ip * Ip * (I3 - 2 * Ip * I2) - + (I * Ip * gr4 - Ip * Ip * Ip * Ip * I2 - 4 * Ip * Ip * I4 - I6 + + 4 * Ip * I5 - 2 * Ip * Ip * (I4 - 2 * Ip * I3)); + gr7 = Ip * Ip * (Ip * (Ip * Ip * Ip * Ip + 4 * Ip * Ip * I2 + I4 - + 4 * Ip * I3 + 2 * Ip * Ip * (I2 - 2 * Ip * I)) - + Ip * Ip * Ip * Ip * I - 4 * Ip * Ip * I3 - I5 + + 4 * Ip * I4 - 2 * Ip * Ip * (I3 - 2 * Ip * I2)) - + 2 * Ip * (Ip * (Ip * Ip * Ip * Ip * I + 4 * Ip * Ip * I3 + I5 - + 4 * Ip * I4 + 2 * Ip * Ip * (I3 - 2 * Ip * I2)) - + Ip * Ip * Ip * Ip * I2 - 4 * Ip * Ip * I4 - I6 + + 4 * Ip * I5 - 2 * Ip * Ip * (I4 - 2 * Ip * I3)) + + Ip * (Ip * Ip * Ip * Ip * I2 + 4 * Ip * Ip * I4 + I6 - 4 * Ip * I5 + + 2 * Ip * Ip * (I4 - 2 * Ip * I3)) - + Ip * Ip * Ip * Ip * I3 - 4 * Ip * Ip * I5 - I7 + 4 * Ip * I6 - + 2 * Ip * Ip * (I5 - 2 * Ip * I4); + + // Hardcoded coefficients of the polynomial of degree 9 that allows to + // approximate the neighborhood averaging as a sum of convolutions + return ((-7.7456e+00) * gr7 + (3.1255e-16) * gr6 + (1.5836e+01) * gr5 + + (-1.8371e-15) * gr4 + (-1.1013e+01) * gr3 + (4.4531e-16) * gr2 + + (3.7891e+00) * gr1 + 1.2391e-15); } - - /* * This Quickselect routine is based on the algorithm described in * "Numerical recipes in C", Second Edition, @@ -117,179 +139,166 @@ * This code by Nicolas Devillard - 1998. Public domain. */ - -#define ELEM_SWAP(a,b) { float t=(a);(a)=(b);(b)=t; } +#define ELEM_SWAP(a, b) \ + { \ + float t = (a); \ + (a) = (b); \ + (b) = t; \ + } //#define ELEM_SWAP(a,b) { register float t=(a);(a)=(b);(b)=t; } //#define ELEM_SWAP(a,b) { register float t=a;a=b;b=t; } -float quick_select(float arr[], int n) -{ - int low, high ; +float quick_select(float arr[], int n) { + + int low, high; int median; int middle, ll, hh; - low = 0 ; high = n-1 ; median = (low + high) / 2; + low = 0; + high = n - 1; + median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ - return arr[median] ; + return arr[median]; - if (high == low + 1) { /* Two elements only */ - if (arr[low] > arr[high]) - ELEM_SWAP(arr[low], arr[high]) ; - return arr[median] ; + if (high == low + 1) { /* Two elements only */ + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]); + return arr[median]; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; - if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; - if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; - if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; + if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]); + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]); + if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]); /* Swap low item (now in position middle) into position (low+1) */ - ELEM_SWAP(arr[middle], arr[low+1]) ; + ELEM_SWAP(arr[middle], arr[low + 1]); /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { - do ll++; while (arr[low] > arr[ll]) ; - do hh--; while (arr[hh] > arr[low]) ; + do + ll++; + while (arr[low] > arr[ll]); + do + hh--; + while (arr[hh] > arr[low]); - if (hh < ll) - break; + if (hh < ll) break; - ELEM_SWAP(arr[ll], arr[hh]) ; + ELEM_SWAP(arr[ll], arr[hh]); } /* Swap middle item (in position low) back into correct position */ - ELEM_SWAP(arr[low], arr[hh]) ; + ELEM_SWAP(arr[low], arr[hh]); /* Re-set active partition */ - if (hh <= median) - low = ll; - if (hh >= median) - high = hh - 1; + if (hh <= median) low = ll; + if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP -float medval(float a[], int length) -{ - return accumulate(a, a+length, 0.f)/(float)length; +float medval(const float* a, int length, bool multiThread = true) { + return lhdrengine::accumulate(a, length, multiThread) / length; } -float MSE(float Im1[], float Im2[], int largo, float escala) -{ - float res=0.f; - float tmp; - float v=1.f/escala; - float v2=1.f; - #pragma omp parallel for reduction(+:res) - for(int i=0;ithreshold_diff) - { - if (ph.canceled()){ + + while (difference > threshold_diff) { + if (ph.canceled()) { break; } iteration++; - difference=0.0; - - for(int color=0;color()); - - copy(u2, u2+length, u3); - transform(u3, u3+length, u0, u3, multiplies()); - - copy(u3, u3+length, u4); - transform(u4, u4+length, u0, u4, multiplies()); + difference = 0.0; - copy(u4, u4+length, u5); - transform(u5, u5+length, u0, u5, multiplies()); - - copy(u5, u5+length, u6); - transform(u6, u6+length, u0, u6, multiplies()); - - copy(u6, u6+length, u7); - transform(u7, u7+length, u0, u7, multiplies()); + for (int color = 0; color < colors; color++) { + copy(RGB[color], RGB[color] + length, u0); + copy(RGB[color], RGB[color] + length, RGB0); + + transform(u0, u0 + length, u0, u2, multiplies()); + transform(u2, u2 + length, u0, u3, multiplies()); + transform(u3, u3 + length, u0, u4, multiplies()); + transform(u4, u4 + length, u0, u5, multiplies()); + transform(u5, u5 + length, u0, u6, multiplies()); + transform(u6, u6 + length, u0, u7, multiplies()); fftwf_execute(pU); - fftwf_execute(pU2); - fftwf_execute(pU3); - fftwf_execute(pU4); - fftwf_execute(pU5); - fftwf_execute(pU6); - fftwf_execute(pU7); - - producto(U,G,UG,fil,col); - producto(U2,G,U2G,fil,col); - producto(U3,G,U3G,fil,col); - producto(U4,G,U4G,fil,col); - producto(U5,G,U5G,fil,col); - producto(U6,G,U6G,fil,col); - producto(U7,G,U7G,fil,col); - + producto(U, G, fil, col); fftwf_execute(pinvU); - vsmul(iu, norm, iu, length); + fftwf_execute(pU2); + producto(U2, G, fil, col); fftwf_execute(pinvU2); - vsmul(iu2, norm, iu2, length); + fftwf_execute(pU3); + producto(U3, G, fil, col); fftwf_execute(pinvU3); - vsmul(iu3, norm, iu3, length); + fftwf_execute(pU4); + producto(U4, G, fil, col); fftwf_execute(pinvU4); - vsmul(iu4, norm, iu4, length); + fftwf_execute(pU5); + producto(U5, G, fil, col); fftwf_execute(pinvU5); - vsmul(iu5, norm, iu5, length); + fftwf_execute(pU6); + producto(U6, G, fil, col); fftwf_execute(pinvU6); - vsmul(iu6, norm, iu6, length); + fftwf_execute(pU7); + producto(U7, G, fil, col); fftwf_execute(pinvU7); - vsmul(iu7, norm, iu7, length); - #pragma omp parallel for - for(int i=0;i 1) - ph.setValue(30+69/(steps+1)); + if (iteration > 1) ph.setValue(30 + 69 / (steps + 1)); } + + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); fftwf_destroy_plan(pU); fftwf_destroy_plan(pU2); fftwf_destroy_plan(pU3); @@ -684,12 +663,6 @@ fftwf_free(u7); fftwf_free(iu); - fftwf_free(iu2); - fftwf_free(iu3); - fftwf_free(iu4); - fftwf_free(iu5); - fftwf_free(iu6); - fftwf_free(iu7); fftwf_free(U); fftwf_free(U2); @@ -699,20 +672,14 @@ fftwf_free(U6); fftwf_free(U7); - fftwf_free(UG); - fftwf_free(U2G); - fftwf_free(U3G); - fftwf_free(U4G); - fftwf_free(U5G); - fftwf_free(U6G); - fftwf_free(U7G); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); ph.setValue(90); - #pragma omp parallel for - for(int c = 0; c < 3; c++) + + for (int c = 0; c < 3; c++) escala(RGB[c], length, 1.f, 0.f); - //range between (0,1) + // range between (0,1) copy(RGB[0], RGB[0] + length, imR.begin()); copy(RGB[1], RGB[1] + length, imG.begin()); copy(RGB[2], RGB[2] + length, imB.begin()); @@ -723,11 +690,12 @@ delete[] RGB[0]; delete[] RGB[1]; delete[] RGB[2]; + FFTW_MUTEX::fftw_mutex_free.lock(); fftwf_free(G); + FFTW_MUTEX::fftw_mutex_free.unlock(); #ifdef TIMER_PROFILING stop_watch.stop_and_update(); cout << endl; cout << "tmo_ferradans11 = " << stop_watch.get_time() << " msec" << endl; #endif } - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/tmo_ferradans11.h luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/tmo_ferradans11.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferradans11/tmo_ferradans11.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferradans11/tmo_ferradans11.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,15 +33,15 @@ #ifndef TMO_FERRADANS11_H #define TMO_FERRADANS11_H -#include #include +#include -namespace pfs -{ +namespace pfs { class Progress; } -//! \brief An Analysis of Visual Adaptation and Contrast Perception for Tone Mapping +//! \brief An Analysis of Visual Adaptation and Contrast Perception for Tone +//! Mapping //! //! Implementation of Visual Adaptation and Contrast Perception //! by Sira Farradans @@ -54,6 +54,7 @@ //! \param rho parameter rho (refer to the paper) //! \param inv_alpha parameter inv_alpha (refer to the paper) //! -void tmo_ferradans11(pfs::Array2Df& imR, pfs::Array2Df& imG, pfs::Array2Df& imB, float rho, float invalpha, pfs::Progress &ph); +void tmo_ferradans11(pfs::Array2Df &imR, pfs::Array2Df &imG, pfs::Array2Df &imB, + float rho, float invalpha, pfs::Progress &ph); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,9 @@ +# List all .h files in this directory +FILE(GLOB FILES_H *.h) +# List all .cpp files in this directory +FILE(GLOB FILES_CPP *.cpp) + +# add all .h files to the _H module variable +SET(TM_LIBPFS_H ${TM_LIBPFS_H} ${FILES_H} PARENT_SCOPE) +# add all .cpp files to the _CPP module variable +SET(TM_LIBPFS_CPP ${TM_LIBPFS_CPP} ${FILES_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/pfstmo_ferwerda96.cpp luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/pfstmo_ferwerda96.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/pfstmo_ferwerda96.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/pfstmo_ferwerda96.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * @brief Ferwerda Tone Mapping Operator: + * "A Model of Visual Adaptation for Realistic Image Synthesis" + * by James A. Ferwerda, Sumanta N. Pattanaik, Peter Shirley, Donald P. Greenberg + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include +#include + +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" + +#include "tmo_ferwerda96.h" +#include "../../sleef.c" +#include "../../opthelper.h" + +void pfstmo_ferwerda96(pfs::Frame &frame, float Ld_Max, + float L_da, pfs::Progress &ph) { + +#ifndef NDEBUG + //--- default tone mapping parameters; + std::cout << "pfstmo_ferwerda96 ("; + std::cout << "max luminance: " << Ld_Max; + std::cout << ", adaptation luminance: " << L_da << ")" << std::endl; +#endif + + ph.setValue(0); + + pfs::Channel *inX, *inY, *inZ; + frame.getXYZChannels(inY, inX, inZ); + assert(inX != NULL); + assert(inY != NULL); + assert(inZ != NULL); + if (!inX || !inY || !inZ) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); + } + + int w = inX->getCols(); + int h = inX->getRows(); + + pfs::Array2Df L(w, h); + transformRGB2Y(inX, inY, inZ, &L); + + try { + tmo_ferwerda96(inX, inY, inZ, &L, + Ld_Max, L_da, + ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } + + frame.getTags().setTag("LUMINANCE", "DISPLAY"); + + if (!ph.canceled()) { + ph.setValue(100); + } +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.cpp luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,141 @@ +/* + * @brief Ferwerda Tone Mapping Operator: + * "A Model of Visual Adaptation for Realistic Image Synthesis" + * by James A. Ferwerda, Sumanta N. Pattanaik, Peter Shirley, Donald P. Greenberg + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" +#include "Libpfs/utils/msec_timer.h" +#include "tmo_ferwerda96.h" + +namespace { + float TpFerwerda(float x) + { + float t = log10(x); + + float y; + + if(t <= -2.6f) + y = -0.72f; + else + if(t >= 1.9f) + y = t - 1.255f; + else + y = powf((0.249f * t + 0.65f), 2.7f) - 0.72f; + + return powf(10.f, y); + } + + float TsFerwerda(float x) + { + float t = log10(x); + + float y; + + if(t <= -3.94f) + y = -2.86f; + else + if(t >= -1.44f) + y = t - 0.395f; + else + y = powf(2.18f, (0.405f * t + 1.6f)) - 2.86f; + + return powf(10.f, y); + } + + float WalravenValeton_k(float Lwa, float wv_sigma) + { + float k = (wv_sigma - Lwa / 4.f) / (wv_sigma + Lwa); + + return (k < 0.0f) ? 0.0f : k; + } +} + +using namespace pfs; +using namespace std; + +int tmo_ferwerda96(Array2Df *X, Array2Df *Y, Array2Df *Z, Array2Df *L, + float mul1, float mul2, + Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + assert(X != NULL); + assert(Y != NULL); + assert(Z != NULL); + assert(L != NULL); + + mul1 *= 100.f; + mul2 /= 1000.f; + + float Ld_Max = 100.f * mul1; + float L_wa = *max_element(L->begin(), L->end()) * 0.5f * mul1; + + float L_da = mul2 * Ld_Max; + + //compute the scaling factors + float mC = TpFerwerda(L_da) / TpFerwerda(L_wa); //cones + float mR = TsFerwerda(L_da) / TsFerwerda(L_wa); //rods + float k = WalravenValeton_k(L_wa, L_da); + + ph.setValue(2); + if (ph.canceled()) return 0; + + float vec[3] = {1.05f, 0.97f, 1.27f}; + float maxX = *max_element(X->begin(), X->end()); + float maxY = *max_element(Y->begin(), Y->end()); + float maxZ = *max_element(Z->begin(), Z->end()); + float maxC = max(maxX, max(maxY, maxZ)); + float scale = 1.0f / maxC; + + ph.setValue(10); + if (ph.canceled()) return 0; + + const int channels = 3; + Array2Df *Ch[channels] = {X, Y, Z}; + for (int c = 0; c < channels; c++) { + ph.setValue(10+(c+1)*30); + if (ph.canceled()) return 0; + + transform(Ch[c]->begin(), Ch[c]->end(), L->begin(), Ch[c]->begin(), + [mC, mR, k, vec, c, scale](float a, float L) { return (mC * a + vec[c] * mR * k * L) * scale; } ); + } + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_ferwerda96 = " << stop_watch.get_time() << " msec" << endl; +#endif + + return 0; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.h luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/ferwerda96/tmo_ferwerda96.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * @brief Ferwerda Tone Mapping Operator: + * "A Model of Visual Adaptation for Realistic Image Synthesis" + * by James A. Ferwerda, Sumanta N. Pattanaik, Peter Shirley, Donald P. Greenberg + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#ifndef TMO_FERWERDA_H +#define TMO_FERWERDA_H + +#include + +namespace pfs { +class Frame; +class Progress; +} + +//! \brief A. Ferwerda tone mapping operator +//! +//! \param L [in] image luminance values +//! \param X, Y, Z [out] tone mapped values +//! \param Ld_Max: maximum luminance of the display in cd/m^2 +//! \param L_da: adaptation luminance in cd/m^2 +//! +int tmo_ferwerda96(pfs::Array2Df *X, pfs::Array2Df *Y, pfs::Array2Df *Z, pfs::Array2Df *L, + float Ld_Max, float L_da, + pfs::Progress &ph); + +#endif // TMO_FERWERDA_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,9 @@ +# List all .h files in this directory +FILE(GLOB FILES_H *.h) +# List all .cpp files in this directory +FILE(GLOB FILES_CPP *.cpp) + +# add all .h files to the _H module variable +SET(TM_LIBPFS_H ${TM_LIBPFS_H} ${FILES_H} PARENT_SCOPE) +# add all .cpp files to the _CPP module variable +SET(TM_LIBPFS_CPP ${TM_LIBPFS_CPP} ${FILES_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/pfstmo_kimkautz08.cpp luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/pfstmo_kimkautz08.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/pfstmo_kimkautz08.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/pfstmo_kimkautz08.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,111 @@ +/* + * @brief KimKautz Tone Mapping Operator: + * "Consistent Tone Reproduction" + * by Min H. Kim, Jan Kautz + * in CGIM '08 Proceedings of the Tenth IASTED + * International Conference on Computer Graphics and Imaging 2008 + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include +#include + +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/manip/copy.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" + +#include "tmo_kimkautz08.h" +#include "../../opthelper.h" +#include "../../sleef.c" + +using namespace pfs; + +void pfstmo_kimkautz08(Frame &frame, float KK_c1, float KK_c2, + Progress &ph) { + +#ifndef NDEBUG + //--- default tone mapping parameters; + std::cout << "pfstmo_kimkautz08 ("; + std::cout << ", KK_c2: " << KK_c2 << ")" << std::endl; +#endif + + ph.setValue(0); + + Channel *inX, *inY, *inZ; + frame.getXYZChannels(inX, inY, inZ); + assert(inX != NULL); + assert(inY != NULL); + assert(inZ != NULL); + if (!inX || !inY || !inZ) { + throw Exception("Missing X, Y, Z channels in the PFS stream"); + } + + int w = inX->getCols(); + int h = inY->getRows(); + + Array2Df L(w, h); + Array2Df Lold(w, h); + + transformRGB2Y(inX, inY, inZ, &L); + copy(L.begin(), L.end(), Lold.begin()); + + try { + tmo_kimkautz08(L, KK_c1, KK_c2, ph); + } catch (...) { + throw Exception("Tonemapping Failed!"); + } + + if (!ph.canceled()) { + Array2Df &arrayRed = *inX; + Array2Df &arrayGreen = *inY; + Array2Df &arrayBlue = *inZ; + + #pragma omp parallel for + for (int i = 0; i < h; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + vfloat scalev = LVFU(L(j, i)) / LVFU(Lold(j, i)); + STVFU(arrayRed(j, i), LVFU(arrayRed(j, i)) * scalev); + STVFU(arrayGreen(j, i), LVFU(arrayGreen(j, i)) * scalev); + STVFU(arrayBlue(j, i), LVFU(arrayBlue(j, i)) * scalev); + } +#endif + for (; j < w; ++j) { + float scale = L(j, i) / Lold(j, i); + arrayRed(j, i) = arrayRed(j, i) * scale; + arrayGreen(j, i) = arrayGreen(j, i) * scale; + arrayBlue(j, i) = arrayBlue(j, i) * scale; + } + } + + frame.getTags().setTag("LUMINANCE", "DISPLAY"); + + ph.setValue(100); + } +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.cpp luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,229 @@ +/* + * @brief KimKautz Tone Mapping Operator: + * "Consistent Tone Reproduction" + * by Min H. Kim, Jan Kautz + * in CGIM '08 Proceedings of the Tenth IASTED + * International Conference on Computer Graphics and Imaging 2008 + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" +#include "Libpfs/rt_algo.h" +#include +#include "Libpfs/utils/msec_timer.h" +#include "tmo_kimkautz08.h" +#include "sleef.c" +#include "opthelper.h" + +using namespace std; +using namespace pfs; +using namespace pfs::colorspace; + +int tmo_kimkautz08(Array2Df &L, + float KK_c1, float KK_c2, + Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + ph.setValue(5); + + int w = L.getCols(); + int h = L.getRows(); + + Array2Df L_log(w, h); + + float sum = 0.f; + float minVal = std::numeric_limits::max(); + float maxVal = std::numeric_limits::min(); +#ifdef _OPENMP + #pragma omp parallel +#endif + { + float sumThr = 0.f; + float minValThr = std::numeric_limits::max(); + float maxValThr = std::numeric_limits::min(); +#ifdef __SSE2__ + const vfloat c1em6v = F2V(1e-6f); + vfloat sumThrv = ZEROV; + vfloat minValv = F2V(minValThr); + vfloat maxValv = F2V(maxValThr); +#endif +#ifdef _OPENMP + #pragma omp for schedule(dynamic, 16) nowait +#endif + for (int i = 0; i < h; i++) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + const vfloat valv = xlogf(LVFU(L(j, i)) + c1em6v); + sumThrv += valv; + minValv = vminf(minValv, valv); + maxValv = vmaxf(maxValv, valv); + STVFU(L_log(j, i), valv); + } +#endif + for (; j < w; ++j) { + const float val = xlogf(L(j, i) + 1e-6f); + sumThr += val; + minValThr = std::min(minValThr, val); + maxValThr = std::max(maxValThr, val); + L_log(j, i) = val; + } + } +#ifdef _OPENMP + #pragma omp critical +#endif + { + sum += sumThr; + minVal = std::min(minVal, minValThr); + maxVal = std::max(maxVal, maxValThr); +#ifdef __SSE2__ + sum += vhadd(sumThrv); + minVal = std::min(minVal, vhmin(minValv)); + maxVal = std::max(maxVal, vhmax(maxValv)); +#endif + } + } + + ph.setValue(25); + if (ph.canceled()) return 0; + + const float mu = sum / (w * h); + + const float maxLd = logf(300.f); + const float minLd = logf(0.3f); + + const float k1 = (maxLd - minLd) / (maxVal - minVal); + const float d0 = maxVal - minVal; + const float sigma = d0 / KK_c1; + const float sigma_sq_2 = sigma*sigma * 2; + +#ifdef _OPENMP + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + const vfloat sigma_sq_2v = F2V(sigma_sq_2); + const vfloat muv = F2V(mu); + const vfloat k1v = F2V(k1); + const vfloat onevmk1v = F2V(1.f - k1); + +#endif +#ifdef _OPENMP + #pragma omp for schedule(dynamic, 16) +#endif + for (int i = 0; i < h; i++) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + const vfloat Lv = LVFU(L(j, i)); + STVFU(L(j, i), onevmk1v * xexpf(-SQRV(Lv - muv) / sigma_sq_2v) + k1v); + } +#endif + for (; j < w; ++j) { + L(j, i) = (1 - k1) * xexpf(-(L(j, i) - mu)*(L(j, i) - mu) / sigma_sq_2) + k1; + } + } + } + + ph.setValue(50); + if (ph.canceled()) return 0; + +#ifdef _OPENMP + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + const vfloat KK_c2v = F2V(KK_c2); + const vfloat muv = F2V(mu); +#endif +#ifdef _OPENMP + #pragma omp for schedule(dynamic, 16) +#endif + for (int i = 0; i < h; i++) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + STVFU(L(j, i), xexpf(KK_c2v * LVFU(L(j, i)) * (LVFU(L_log(j, i)) - muv) + muv)); + } +#endif + for (; j < w; ++j) { + L(j, i) = xexpf(KK_c2 * L(j, i) * (L_log(j, i) - mu) + mu); + } + } + } + + ph.setValue(75); + if (ph.canceled()) return 0; + + //Percentile clamping + lhdrengine::findMinMaxPercentile(L.data(), L.getCols() * L.getRows(), 0.01f, minVal, 0.99f, maxVal, true); + + const float range = maxVal - minVal; +#ifdef _OPENMP + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + const vfloat minValv = F2V(minVal); + const vfloat maxValv = F2V(maxVal); + const vfloat rangev = F2V(range); +#endif +#ifdef _OPENMP + #pragma omp for schedule(dynamic, 16) +#endif + for (int i = 0; i < h; i++) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + STVFU(L(j, i), (LIMV(LVFU(L(j, i)), minValv, maxValv) - minValv) / rangev); + } +#endif + for (; j < w; ++j) { + L(j, i) = (lhdrengine::LIM(L(j, i), minVal, maxVal) - minVal) / range; + } + } + } + + ph.setValue(99); + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_kimkautz08 = " << stop_watch.get_time() << " msec" << endl; +#endif + + return 0; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.h luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/kimkautz08/tmo_kimkautz08.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * @brief KimKautz Tone Mapping Operator: + * "Consistent Tone Reproduction" + * by Min H. Kim, Jan Kautz + * in CGIM '08 Proceedings of the Tenth IASTED + * International Conference on Computer Graphics and Imaging 2008 + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#ifndef TMO_KIMKAUTZ_H +#define TMO_KIMKAUTZ_H + +#include + +namespace pfs { +class Frame; +class Progress; +} + +//! \brief Min H. Kim, Jan Kautz tone mapping operator +//! +//! \param L [in/out] image luminance values +//! KK_c1 this parameter adjusts the shape of Gaussian fall-off +//! within the width of tis characteristic curve. It influcences +//! the resulting brightness and local details of the tone-mapped +//! image. A good value is 3.0 (tradeoff between compression and +//! lost details) +//! KK_c2 the ratio between the dynamic range (in log10) of an +//! 8-bit imag (2.4) and the dynamic range (in log10) of the +//! LDR monitor for visualization +//! +int tmo_kimkautz08(pfs::Array2Df &L, + float KK_c1, float KK_c2, + pfs::Progress &ph); + +#endif // TMO_KIMKAUTZ_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,9 @@ +# List all .h files in this directory +FILE(GLOB FILES_H *.h) +# List all .cpp files in this directory +FILE(GLOB FILES_CPP *.cpp) + +# add all .h files to the _H module variable +SET(TM_LIBPFS_H ${TM_LIBPFS_H} ${FILES_H} PARENT_SCOPE) +# add all .cpp files to the _CPP module variable +SET(TM_LIBPFS_CPP ${TM_LIBPFS_CPP} ${FILES_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/lischinski_minimization.cpp luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/lischinski_minimization.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/lischinski_minimization.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/lischinski_minimization.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,166 @@ +/* + * @brief Lischinski Tone Mapping Operator: + * "Interactive Local Adjustment of Tonal Values" + * by Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski + * in Proceedings of SIGGRAPH 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + * Code adapted for Luminance HDR from: + * + * PICCANTE + * The hottest HDR imaging library! + * http://vcg.isti.cnr.it/piccante + * Copyright (C) 2014 + * Visual Computing Laboratory - ISTI CNR + * http://vcg.isti.cnr.it + * First author: Francesco Banterle + * + */ + +#include +#include + +#include "Libpfs/exception.h" +#include "Libpfs/manip/resize.h" +#include "lischinski_minimization.h" +#include "sleef.c" +#include "opthelper.h" + +using namespace std; +using namespace pfs; + +inline float LischinskiFunction(float Lcur, float Lref, float param[2], + float LISCHINSKI_EPSILON = 0.0001f) { + return -param[1] / (powf(fabsf(Lcur - Lref), param[0]) + LISCHINSKI_EPSILON); +} + +void LischinskiMinimization(Array2Df &L_orig, Array2Df &g_orig, Array2Df &F, + float alpha, float lambda, float LISCHINSKI_EPSILON, float omega) { + + const int orig_width = L_orig.getCols(); + const int orig_height = L_orig.getRows(); + + int xSize = 512; + + if (orig_width < 2*xSize) + xSize = 256; + + const int width = xSize; + const int height = (int)(orig_height * (float)xSize / + (float)orig_width); + + const int size = height * width; + Array2Df L(width, height); + Array2Df g(width, height); + + resize(&L_orig, &L, BilinearInterp); + resize(&g_orig, &g, BilinearInterp); + + Eigen::VectorXf b, x; + b = Eigen::VectorXf::Zero(size); + + std::vector< Eigen::Triplet< float > > tL; + + float param[2]; + param[0] = alpha; + param[1] = lambda; + + for(int i = 0; i < height; i++) { + int tmpInd = i * width; + + for(int j = 0; j < width; j++) { + + float sum = 0.0; + float tmp; + int indJ; + int indI = tmpInd + j; + float Lref = L(indI); + + b[indI] = omega * g(indI); + + if((i - 1) >= 0) { + indJ = indI - width; + tmp = LischinskiFunction(L(indJ), Lref, param, LISCHINSKI_EPSILON); + tL.push_back(Eigen::Triplet< float > (indI, indJ, tmp)); + sum += tmp; + } + + if((i + 1) < height) { + indJ = indI + width; + tmp = LischinskiFunction(L(indJ), Lref, param, LISCHINSKI_EPSILON); + tL.push_back(Eigen::Triplet< float > (indI, indJ, tmp)); + + sum += tmp; + } + + if((j - 1) >= 0) { + indJ = indI - 1; + tmp = LischinskiFunction(L(indJ), Lref, param, LISCHINSKI_EPSILON); + tL.push_back(Eigen::Triplet< float > (indI, indJ, tmp)); + sum += tmp; + } + + if((j + 1) < width) { + indJ = indI + 1; + tmp = LischinskiFunction(L(indJ), Lref, param, LISCHINSKI_EPSILON); + tL.push_back(Eigen::Triplet< float > (indI, indJ, tmp)); + sum += tmp; + } + + tL.push_back(Eigen::Triplet< float >{indI, indI, omega - sum}); + } + } + + Eigen::SparseMatrix A = Eigen::SparseMatrix(size, size); + A.setFromTriplets(tL.begin(), tL.end()); + + Eigen::SimplicialCholesky > solver(A); + x = solver.solve(b); + + if(solver.info() != Eigen::Success) { + #ifndef NDDEBUG + printf("SOLVER FAILED!\n"); + #endif + throw pfs::Exception("SOLVER FAILED"); + } + + Array2Df F_res(width, height); + +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < height; ++i) { + int j = 0; + int counter = i * width; +#ifdef __SSE2__ + for (; j < width - 3; j += 4) { + STVFU(F_res(j, i), LVFU(x(counter + j))); + } +#endif + for (; j < width; ++j) { + F_res(j, i) = x(counter + j); + } + } + + resize(&F_res, &F, BilinearInterp); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/lischinski_minimization.h luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/lischinski_minimization.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/lischinski_minimization.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/lischinski_minimization.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * @brief Lischinski Tone Mapping Operator: + * "Interactive Local Adjustment of Tonal Values" + * by Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski + * in Proceedings of SIGGRAPH 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + * Code adapted for Luminance HDR from: + * + * PICCANTE + * The hottest HDR imaging library! + * http://vcg.isti.cnr.it/piccante + * Copyright (C) 2014 + * Visual Computing Laboratory - ISTI CNR + * http://vcg.isti.cnr.it + * First author: Francesco Banterle + * + */ + +#ifndef LISCHINSKI_MINIMIZATION_H +#define LISCHINSKI_MINIMIZATION_H + +#include "Libpfs/array2d_fwd.h" + +void LischinskiMinimization(pfs::Array2Df &L, + pfs::Array2Df &g, + pfs::Array2Df &F, + float alpha = 1.0f, + float lambda = 0.4f, + float LISCHINSKI_EPSILON = 1e-4f, + float omega = 0.07f); + +#endif // LISCHINSKI_MINIMIZATION_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/pfstmo_lischinski06.cpp luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/pfstmo_lischinski06.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/pfstmo_lischinski06.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/pfstmo_lischinski06.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * @brief Lischinski Tone Mapping Operator: + * "Interactive Local Adjustment of Tonal Values" + * by Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski + * in Proceedings of SIGGRAPH 2006 + * + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + * Code adapted for Luminance HDR from: + * + * PICCANTE + * The hottest HDR imaging library! + * http://vcg.isti.cnr.it/piccante + * Copyright (C) 2014 + * Visual Computing Laboratory - ISTI CNR + * http://vcg.isti.cnr.it + * First author: Francesco Banterle + * + */ + +#include +#include +#include +#include + +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" + +#include "tmo_lischinski06.h" + +using namespace pfs; + +void pfstmo_lischinski06(Frame &frame, float alpha_mul, + Progress &ph) { + +#ifndef NDEBUG + //--- default tone mapping parameters; + std::cout << "pfstmo_lischinski06 ("; + std::cout << "alpha_mul: " << alpha_mul << ")" << std::endl; +#endif + + ph.setValue(0); + + Channel *inX, *inY, *inZ; + frame.getXYZChannels(inX, inY, inZ); + assert(inX != NULL); + assert(inY != NULL); + assert(inZ != NULL); + if (!inX || !inY || !inZ) { + throw Exception("Missing X, Y, Z channels in the PFS stream"); + } + + const int w = inX->getCols(); + const int h = inY->getRows(); + + Array2Df L(w, h); + + transformRGB2Y(inX, inY, inZ, &L); + + try { + tmo_lischinski06(L, *inX, *inY, *inZ, alpha_mul, ph); + } catch (...) { + throw Exception("Tonemapping Failed!"); + } + + frame.getTags().setTag("LUMINANCE", "DISPLAY"); + + ph.setValue(100); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/tmo_lischinski06.cpp luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/tmo_lischinski06.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/tmo_lischinski06.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/tmo_lischinski06.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,278 @@ +/* + * @brief Lischinski Tone Mapping Operator: + * "Interactive Local Adjustment of Tonal Values" + * by Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski + * in Proceedings of SIGGRAPH 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + * Code adapted for Luminance HDR from: + * + * PICCANTE + * The hottest HDR imaging library! + * http://vcg.isti.cnr.it/piccante + * Copyright (C) 2014 + * Visual Computing Laboratory - ISTI CNR + * http://vcg.isti.cnr.it + * First author: Francesco Banterle + * + */ + +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/progress.h" +#include "Libpfs/rt_algo.h" +#include "Libpfs/utils/msec_timer.h" +#include "tmo_lischinski06.h" +#include "lischinski_minimization.h" +#include "sleef.c" +#include "opthelper.h" + + +#ifndef CLAMP + #define CLAMP(x, a) (x >= a ? (a - 1) : (x < 0 ? 0 : x)) +#endif + +#define pow_F(a,b) (xexpf(b*xlogf(a))) + +using namespace std; +using namespace pfs; + +float LogMeanVal(const Array2Df &L) { + const size_t height = L.getRows(); + const size_t width = L.getCols(); + const size_t size = width*height; + constexpr float eps = 1e-6f; + + float avg_loglum = 0.f; + +#ifdef _OPENMP + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + vfloat avg_loglumv = ZEROV; + vfloat epsv = F2V(eps); +#endif +#ifdef _OPENMP + #pragma omp for reduction(+:avg_loglum) nowait +#endif + for (size_t j = 0; j < height; ++j) { + size_t i = 0; +#ifdef __SSE2__ + for (; i < width - 3; i += 4) { + vfloat value = xlogf(LVFU(L(i,j)) + epsv); + avg_loglumv += value; + } +#endif + for (; i < width; ++i) { + float value = xlogf(L(i,j) + eps); + avg_loglum += value; + } + } + +#ifdef _OPENMP + #pragma omp critical +#endif + { +#ifdef __SSE2__ + avg_loglum += vhadd(avg_loglumv); +#endif + } + } + return xexpf(avg_loglum / size); +} + +int tmo_lischinski06(Array2Df &L,Array2Df &inX, Array2Df &inY, Array2Df &inZ, + const float alpha_mul, + Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + ph.setValue(5); + + const int width = L.getCols(); + const int height = L.getRows(); + constexpr float eps = 1e-6f; + + //Percentile clamping + float maxL, minL; + lhdrengine::findMinMaxPercentile(L.data(), L.getCols() * L.getRows(), 0.01f, minL, 0.99f, maxL, true); + + const float invLOG2 = 1.0f/xlogf(2.0f); + const float Lav = LogMeanVal(L); + const float maxL_log = xlogf(maxL + eps) * invLOG2; + const float minL_log = xlogf(minL + eps) * invLOG2; + + const float log2Average = xlogf(Lav + eps) * invLOG2; + float alpha = 0.18f * pow_F(4.0f, (2.0f * log2Average - minL_log - maxL_log)/( maxL_log - minL_log)); + float whitePoint = 1.5f * pow_F(2.0f, maxL_log - minL_log - 5.0f); + + alpha *= alpha_mul; + +#ifndef NDEBUG + cout << "maxL: " << maxL << endl; + cout << "minL: " << minL << endl; + cout << "maxL_log: " << maxL_log << endl; + cout << "minL_log: " << minL_log << endl; + cout << "Lav: " << Lav << endl; + cout << "whitePoint: " << whitePoint << endl; + cout << "alpha: " << alpha << endl; +#endif + + const float whitePoint_sq = whitePoint * whitePoint; + + const int Z = int(ceilf(maxL_log - minL_log)); + if(Z <= 0) { + return 0; + } + + std::vector zones[Z]; + + Array2Df L_log(width, height); + +#ifdef _OPENMP + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + const vfloat epsv = F2V(eps); + const vfloat invLOG2v = F2V(invLOG2); + const vfloat minL_logv = F2V(minL_log); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (int i = 0; i < height; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < width - 3; j += 4) { + STVFU(L_log(j, i), vceilf(xlogf(LVFU(L(j, i)) + epsv) * invLOG2v - minL_logv)); + } +#endif + for (; j < width; ++j) { + L_log(j, i) = ceilf(xlogf(L(j, i) + eps) * invLOG2 - minL_log); + } + } + + std::vector zonesThr[Z]; + +#ifdef _OPENMP + #pragma omp for nowait +#endif + for(int i = 0; i < height; i++) { + for(int j = 0; j < width; j++) { + const int zone = CLAMP(int(L_log(j, i)), Z); + zonesThr[zone].push_back(L(j,i)); + } + } + +#ifdef _OPENMP + #pragma omp critical +#endif + { + for (int i = 0; i < Z; ++i) { + for (size_t j = 0; j < zonesThr[i].size(); ++j) { + zones[i].push_back(zonesThr[i][j]); + } + } + } + } + + ph.setValue(25); + if (ph.canceled()) return 0; + + //Choose the representative Rz for each zone + float fstop[Z]; + float Rz[Z]; + + for(int i = 0; i < Z; i++) { + fstop[i] = Rz[i] = 0.f; + int n = int(zones[i].size()); + if(n > 0) { + float maxL, minL; + lhdrengine::findMinMaxPercentile(zones[i].data(), n, 0.5f, minL, 0.5f, maxL, true); + Rz[i] = minL; + if(Rz[i] > 0.0f) { + //photographic operator + const float Rz2 = Rz[i] * alpha / Lav; + const float f = (Rz2 * (1 + Rz2 / whitePoint_sq) ) / (1.0f + Rz2); + fstop[i] = xlogf(f / Rz[i] + eps) * invLOG2; + } + } + } + + //create the fstop map + Array2Df &fstopMap = L_log; + +#ifdef _OPENMP + #pragma omp parallel for +#endif + for(int i = 0; i < height; i++) { + for(int j = 0; j < width; j++) { + fstopMap(j,i) = fstop[CLAMP(int(L_log(j,i)), Z)]; + } + } + + ph.setValue(50); + if (ph.canceled()) return 0; + + //Lischinski minimization + LischinskiMinimization(L, fstopMap, L); + + ph.setValue(85); + if (ph.canceled()) return 0; + +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < height; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < width - 3; j += 4) { + const vfloat exposurev = pow_F(2.0f, LVFU(L(j, i))); + STVFU(inX(j, i), LVFU(inX(j, i)) * exposurev); + STVFU(inY(j, i), LVFU(inY(j, i)) * exposurev); + STVFU(inZ(j, i), LVFU(inZ(j, i)) * exposurev); + } +#endif + for (; j < width; ++j) { + const float exposure = pow_F(2.0f, L(j, i)); + inX(j, i) *= exposure; + inY(j, i) *= exposure; + inZ(j, i) *= exposure; + } + } + + ph.setValue(99); + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_lischinski06 = " << stop_watch.get_time() << " msec" << endl; +#endif + + return 0; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/tmo_lischinski06.h luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/tmo_lischinski06.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/lischinski06/tmo_lischinski06.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/lischinski06/tmo_lischinski06.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * @brief Lischinski Tone Mapping Operator: + * "Interactive Local Adjustment of Tonal Values" + * by Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski + * in Proceedings of SIGGRAPH 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + * Code adapted for Luminance HDR from: + * + * PICCANTE + * The hottest HDR imaging library! + * http://vcg.isti.cnr.it/piccante + * Copyright (C) 2014 + * Visual Computing Laboratory - ISTI CNR + * http://vcg.isti.cnr.it + * First author: Francesco Banterle + * + */ + +#ifndef TMO_LISCHINSKI_H +#define TMO_LISCHINSKI_H + +#include + +namespace pfs { +class Frame; +class Progress; +} + +//! \brief Dani Lischinski, Zeev Farbman, Matt Uyttendaele, Richard Szeliski tone mapping operator +//! +//! \param L [in] image luminance values +//! inX [out] image red channel +//! inY [out] image green channel +//! inZ [out] image blue channel +//! alpha_mul multiplier value of exposure of the image +//! +int tmo_lischinski06(pfs::Array2Df &L, pfs::Array2Df &inX, pfs::Array2Df &inY, pfs::Array2Df &inZ, + float alpha_mul, + pfs::Progress &ph); + +#endif // TMO_LISCHINSKI_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/compression_tmo.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mai11/compression_tmo.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/compression_tmo.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mai11/compression_tmo.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,13 @@ /** - * @brief Tone-mapping optimized for backward-compatible HDR image and video compression + * @brief Tone-mapping optimized for backward-compatible HDR image and video + * compression * * From: * Mai, Z., Mansour, H., Mantiuk, R., Nasiopoulos, P., Ward, R., & Heidrich, W. - * Optimizing a tone curve for backward-compatible high dynamic range image and video compression. - * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. doi:10.1109/TIP.2010.2095866, 2011 + * Optimizing a tone curve for backward-compatible high dynamic range image and + * video compression. + * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. + * doi:10.1109/TIP.2010.2095866, 2011 * * This file is a part of LuminanceHDR package, based on pfstmo. * ---------------------------------------------------------------------- @@ -31,21 +34,23 @@ #ifdef _OPENMP #include #endif +#include "opthelper.h" +#include "sleef.c" #include +#include #include #include -#include -#include "compression_tmo.h" #include "Libpfs/utils/msec_timer.h" +#include "compression_tmo.h" #ifdef BRANCH_PREDICTION -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif /** @@ -55,20 +60,21 @@ * y_i must be initialized after creating an object */ namespace mai { -class UniformArrayLUT -{ +class UniformArrayLUT { double start_v; size_t lut_size; double delta; bool own_y_i; -public: + + public: double *y_i; - UniformArrayLUT( double from, double to, int lut_size, double *y_i = NULL ) : - start_v(from), lut_size( lut_size ), delta( (to-from)/(double)lut_size ) - { - if( y_i == NULL ) { + UniformArrayLUT(double from, double to, int lut_size, double *y_i = NULL) + : start_v(from), + lut_size(lut_size), + delta((to - from) / (double)lut_size) { + if (y_i == NULL) { this->y_i = new double[lut_size]; own_y_i = true; } else { @@ -77,163 +83,165 @@ } } - UniformArrayLUT() : lut_size( 0 ), delta( 0. ), own_y_i( false ), y_i(NULL) {} + UniformArrayLUT() : start_v(0.), lut_size(0), delta(0.), own_y_i(false), y_i(NULL) {} - UniformArrayLUT(const UniformArrayLUT& other) : start_v( other.start_v ), lut_size( other.lut_size ), delta( other.delta ) - { + UniformArrayLUT(const UniformArrayLUT &other) + : start_v(other.start_v), lut_size(other.lut_size), delta(other.delta) { this->y_i = new double[lut_size]; own_y_i = true; memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); } - UniformArrayLUT& operator = (const UniformArrayLUT& other) - { - this->lut_size = other.lut_size; - this->delta = other.delta; - this->start_v = other.start_v; - this->y_i = new double[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); + UniformArrayLUT &operator=(const UniformArrayLUT &other) { + if (&other != this) { + this->lut_size = other.lut_size; + this->delta = other.delta; + this->start_v = other.start_v; + this->y_i = new double[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); + } return *this; } - ~UniformArrayLUT() - { - if( own_y_i ) - delete []y_i; + ~UniformArrayLUT() { + if (own_y_i) delete[] y_i; } - double interp( double x ) - { - const double ind_f = (x - start_v)/delta; + double interp(double x) { + const double ind_f = (x - start_v) / delta; const size_t ind_low = (size_t)(ind_f); const size_t ind_hi = (size_t)ceil(ind_f); - if( unlikely(ind_f < 0) ) // Out of range checks + if (unlikely(ind_f < 0)) // Out of range checks return y_i[0]; - if( unlikely(ind_hi >= lut_size) ) - return y_i[lut_size-1]; + if (unlikely(ind_hi >= lut_size)) return y_i[lut_size - 1]; - if( unlikely(ind_low == ind_hi) ) - return y_i[ind_low]; // No interpolation necessary + if (unlikely(ind_low == ind_hi)) + return y_i[ind_low]; // No interpolation necessary - return y_i[ind_low] + (y_i[ind_hi]-y_i[ind_low])*(ind_f-(double)ind_low); // Interpolation + return y_i[ind_low] + + (y_i[ind_hi] - y_i[ind_low]) * + (ind_f - (double)ind_low); // Interpolation } - }; - -class ImgHistogram -{ -public: +class ImgHistogram { + public: const float L_min, L_max; const float delta; int *bins; double *p; int bin_count; - ImgHistogram() : L_min( -6.f ), L_max( 9.f ), delta( 0.1 ), bins( NULL ), p( NULL ) - { - bin_count = (int)ceil((L_max-L_min)/delta); + ImgHistogram() : L_min(-6.f), L_max(9.f), delta(0.1), bins(NULL), p(NULL) { + bin_count = (int)ceil((L_max - L_min) / delta); bins = new int[bin_count]; p = new double[bin_count]; } - ~ImgHistogram() - { - delete [] bins; - delete [] p; + ~ImgHistogram() { + delete[] bins; + delete[] p; } - void compute( const float *img, size_t pixel_count ) - { - - std::fill( bins, bins + bin_count, 0 ); + void compute(const float *img, size_t pixel_count) { + std::fill(bins, bins + bin_count, 0); int pp_count = 0; - for( size_t pp = 0; pp < pixel_count; pp++ ) - { - int bin_index = (img[pp]-L_min)/delta; + +#pragma omp parallel +{ + int *binsThr = new int[bin_count]; + std::fill(binsThr, binsThr + bin_count, 0); + + int pp_countThr = 0; + #pragma omp for nowait + for (size_t pp = 0; pp < pixel_count; pp++) { + int bin_index = (img[pp] - L_min) / delta; // ignore anything outside the range - if( bin_index < 0 || bin_index >= bin_count ) - continue; - bins[bin_index]++; - pp_count++; + if (bin_index < 0 || bin_index >= bin_count) continue; + binsThr[bin_index]++; + pp_countThr++; } - - for( int bb = 0; bb < bin_count; bb++ ) { + #pragma omp critical + { + pp_count += pp_countThr; + for (int bb = 0; bb < bin_count; bb++) { + bins[bb] += binsThr[bb]; + } + delete [] binsThr; + } +} + for (int bb = 0; bb < bin_count; bb++) { p[bb] = (double)bins[bb] / (double)pp_count; } } - - }; -inline float safelog10f( float x ) -{ - if( unlikely(x < 1e-5f) ) - return -5.f; - return log10f( x ); +inline float safelog10f(float x) { + return xlogf(std::max(x, 1e-5f)) * 0.43429448190325182765112891891661f; } +#ifdef __SSE2__ +inline vfloat safelog10f(vfloat xv, vfloat log10v, vfloat minv) { + return xlogf(vmaxf(xv, minv)) * log10v; +} +#endif - -void CompressionTMO::tonemap( const float *R_in, const float *G_in, float *B_in, int width, int height, - float *R_out, float *G_out, float *B_out, const float *L_in, pfs::Progress &ph) -{ +void CompressionTMO::tonemap(const float *R_in, const float *G_in, float *B_in, + size_t width, size_t height, float *R_out, float *G_out, + float *B_out, const float *L_in, + pfs::Progress &ph) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); #endif - const size_t pix_count = width*height; - - bool canceled = false; + const size_t pix_count = width * height; - ph.setValue(0); + ph.setValue(2); // Compute log of Luminance float *logL = new float[pix_count]; -// std::unique_ptr logL(new float[pix_count]); - for( size_t pp = 0; pp < pix_count; pp++ ) { - logL[pp] = safelog10f( L_in[pp] ); + +#ifdef __SSE2__ + const vfloat log10v = F2V(0.43429448190325182765112891891661f); + const vfloat minv = F2V(1e-5f); + #pragma omp parallel for + for (size_t pp = 0; pp < pix_count - 3; pp += 4) { + STVFU(logL[pp], safelog10f(LVFU(L_in[pp]), log10v, minv)); + } + + for (size_t pp = pix_count - (pix_count % 4); pp < pix_count; pp++) { + logL[pp] = safelog10f(L_in[pp]); + } +#else + #pragma omp parallel for + for (size_t pp = 0; pp < pix_count; pp++) { + logL[pp] = safelog10f(L_in[pp]); } +#endif ImgHistogram H; - H.compute(logL, pix_count ); + H.compute(logL, pix_count); - //Instantiate LUT - UniformArrayLUT lut( H.L_min, H.L_max, H.bin_count ); + // Instantiate LUT + UniformArrayLUT lut(H.L_min, H.L_max, H.bin_count); - //Compute slopes -// std::unique_ptr s(new double[H.bin_count]); + // Compute slopes + // std::unique_ptr s(new double[H.bin_count]); double *s = new double[H.bin_count]; { double d = 0; - #pragma omp parallel for reduction(+:d) - for( int bb = 0; bb < H.bin_count; bb++ ) { - if (ph.canceled()) - { - canceled = true; -#ifndef WIN32 - bb = H.bin_count; -#endif - } - d += pow( H.p[bb], 1./3. ); + + for (int bb = 0; bb < H.bin_count; bb++) { + d += cbrt(H.p[bb]); } - if (canceled) goto end; + d *= H.delta; - #pragma omp parallel for - for( int bb = 0; bb < H.bin_count; bb++ ) { - if (ph.canceled()) - { - canceled = true; -#ifndef WIN32 - bb = H.bin_count; -#endif - } - s[bb] = pow( H.p[bb], 1./3. )/d; - } - if (canceled) goto end; + for (int bb = 0; bb < H.bin_count; bb++) { + s[bb] = cbrt(H.p[bb]) / d; + } } ph.setValue(33); @@ -257,42 +265,40 @@ #endif - //Create a tone-curve + // Create a tone-curve lut.y_i[0] = 0; - //#pragma omp parallel for private (bb) - for( int bb = 1; bb < H.bin_count; bb++ ) { - if (ph.canceled()) - { - canceled = true; - bb = H.bin_count; - } - lut.y_i[bb] = lut.y_i[bb-1] + s[bb] * H.delta; + for (int bb = 1; bb < H.bin_count; bb++) { + lut.y_i[bb] = lut.y_i[bb - 1] + s[bb] * H.delta; } - if (canceled) goto end; ph.setValue(66); - // Apply the tone-curve - #pragma omp parallel for - for( int pp = 0; pp < static_cast(pix_count); pp++ ) { - if (ph.canceled()) - { - canceled = true; -#ifndef WIN32 - pp = pix_count; + +// Apply the tone-curve + +#pragma omp parallel for + for (int pp = 0; pp < static_cast(pix_count); pp++) { +#ifdef __SSE2__ + vfloat rgbv = _mm_set_ps(R_in[pp], G_in[pp], B_in[pp], 0); + rgbv = safelog10f(rgbv, log10v, minv); + float temp[4]; + STVFU(temp[0], rgbv); + R_out[pp] = lut.interp(temp[3]); + G_out[pp] = lut.interp(temp[2]); + B_out[pp] = lut.interp(temp[1]); +#else + R_out[pp] = lut.interp(safelog10f(R_in[pp])); + G_out[pp] = lut.interp(safelog10f(G_in[pp])); + B_out[pp] = lut.interp(safelog10f(B_in[pp])); #endif - } - R_out[pp] = lut.interp( safelog10f(R_in[pp]) ); - G_out[pp] = lut.interp( safelog10f(G_in[pp]) ); - B_out[pp] = lut.interp( safelog10f(B_in[pp]) ); } ph.setValue(99); -end: - delete [] s; - delete [] logL; + delete[] s; + delete[] logL; #ifdef TIMER_PROFILING stop_watch.stop_and_update(); std::cout << std::endl; - std::cout << "tmo_mai11 = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "tmo_mai11 = " << stop_watch.get_time() << " msec" + << std::endl; #endif } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/compression_tmo.h luminance-hdr-2.6.0/src/TonemappingOperators/mai11/compression_tmo.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/compression_tmo.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mai11/compression_tmo.h 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,13 @@ /** - * @brief Tone-mapping optimized for backward-compatible HDR image and video compression + * @brief Tone-mapping optimized for backward-compatible HDR image and video + * compression * * From: * Mai, Z., Mansour, H., Mantiuk, R., Nasiopoulos, P., Ward, R., & Heidrich, W. - * Optimizing a tone curve for backward-compatible high dynamic range image and video compression. - * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. doi:10.1109/TIP.2010.2095866, 2011 + * Optimizing a tone curve for backward-compatible high dynamic range image and + * video compression. + * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. + * doi:10.1109/TIP.2010.2095866, 2011 * * This file is a part of LuminanceHDR package, based on pfstmo. * ---------------------------------------------------------------------- @@ -34,11 +37,11 @@ #include "Libpfs/progress.h" namespace mai { -class CompressionTMO -{ - public: - void tonemap(const float *R_in, const float *G_in, float *B_in, int width, int height, - float *R_out, float *G_out, float *B_out, const float *L_in, pfs::Progress &ph); +class CompressionTMO { + public: + void tonemap(const float *R_in, const float *G_in, float *B_in, size_t width, + size_t height, float *R_out, float *G_out, float *B_out, + const float *L_in, pfs::Progress &ph); }; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/pfstmo_mai11.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mai11/pfstmo_mai11.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mai11/pfstmo_mai11.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mai11/pfstmo_mai11.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,13 @@ /** - * @brief Tone-mapping optimized for backward-compatible HDR image and video compression + * @brief Tone-mapping optimized for backward-compatible HDR image and video + * compression * * From: * Mai, Z., Mansour, H., Mantiuk, R., Nasiopoulos, P., Ward, R., & Heidrich, W. - * Optimizing a tone curve for backward-compatible high dynamic range image and video compression. - * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. doi:10.1109/TIP.2010.2095866, 2011 + * Optimizing a tone curve for backward-compatible high dynamic range image and + * video compression. + * IEEE Transactions on Image Processing, 20(6), 1558 – 1571. + * doi:10.1109/TIP.2010.2095866, 2011 * * This file is a part of LuminanceHDR package, based on pfstmo. * ---------------------------------------------------------------------- @@ -30,42 +33,45 @@ #include -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "compression_tmo.h" using namespace mai; -void pfstmo_mai11(pfs::Frame& frame, pfs::Progress &ph) -{ +void pfstmo_mai11(pfs::Frame &frame, pfs::Progress &ph) { + #ifndef NDEBUG - std::stringstream ss; - ss << "pfstmo_mai11 ("; - ss << ")"; - std::cout << ss.str() << std::endl; + std::stringstream ss; + ss << "pfstmo_mai11 ("; + ss << ")"; + std::cout << ss.str() << std::endl; #endif - //--- default tone mapping parameters; + //--- default tone mapping parameters; + + ph.setValue(0); CompressionTMO tmo; pfs::Channel *inX, *inY, *inZ; frame.getXYZChannels(inX, inY, inZ); - if ( inX == NULL || inY == NULL || inZ == NULL ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (inX == NULL || inY == NULL || inZ == NULL) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } - int cols = frame.getWidth(); - int rows = frame.getHeight(); + size_t cols = frame.getWidth(); + size_t rows = frame.getHeight(); - tmo.tonemap( inX->data(), inY->data(), inZ->data(), cols, rows, - inX->data(), inY->data(), inZ->data(), inY->data(), ph); + try { + tmo.tonemap(inX->data(), inY->data(), inZ->data(), cols, rows, + inX->data(), inY->data(), inZ->data(), inY->data(), ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } frame.getTags().setTag("LUMINANCE", "DISPLAY"); - if ( !ph.canceled() ) - ph.setValue(100); + if (!ph.canceled()) ph.setValue(100); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/contrast_domain.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/contrast_domain.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/contrast_domain.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/contrast_domain.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -49,7 +49,8 @@ //! Improvement & Clean up (August 2011) //! Refactoring code structure to improve modularity (September 2012) //! \author Bruce Guenter -//! Added trivial downsample and upsample functions when both dimension are even +//! Added trivial downsample and upsample functions when both dimension are +//! even //! //! \note This implementation of Mantiuk06, while originally based on the source //! code available in PFSTMO, is different in many ways. For this reason, while @@ -58,46 +59,49 @@ //! for an implementation with a less stringent license, please refer to the //! original implementation of this algorithm in PFSTMO. +#include +#include +#include #include #include #include #include #include -#include -#include -#include #ifdef _OPENMP #include #endif -#include "contrast_domain.h" +#include "../../sleef.c" +#include "../../opthelper.h" + +#include "TonemappingOperators/pfstmo.h" #include "arch/malloc.h" #include "arch/math.h" -#include "TonemappingOperators/pfstmo.h" +#include "contrast_domain.h" #include "pyramid.h" -#include "Libpfs/utils/sse.h" -#include "Libpfs/utils/numeric.h" -#include "Libpfs/utils/minmax.h" +#include "Libpfs/progress.h" #include "Libpfs/utils/dotproduct.h" +#include "Libpfs/utils/minmax.h" #include "Libpfs/utils/msec_timer.h" -#include "Libpfs/progress.h" +#include "Libpfs/utils/numeric.h" +#include "Libpfs/utils/sse.h" +#include "Libpfs/rt_algo.h" using namespace pfs; // divG_sum = A * x = sum(divG(x)) -void multiplyA(PyramidT& px, const PyramidT& pC, - const Array2Df& x, Array2Df& sumOfDivG) -{ - px.computeGradients( x ); +void multiplyA(PyramidT &px, const PyramidT &pC, const Array2Df &x, + Array2Df &sumOfDivG) { + px.computeGradients(x); // scale gradients by Cx,Cy from main pyramid - px.multiply( pC ); + px.multiply(pC); // calculate the sum of divergences - px.computeSumOfDivergence( sumOfDivG ); + px.computeSumOfDivergence(sumOfDivG); } // conjugate linear equation solver overwrites pyramid! @@ -106,26 +110,23 @@ // Davide Anastasia // March 25, 2011 // -namespace -{ +namespace { const int NUM_BACKWARDS_CEILING = 3; } -void lincg(PyramidT& pyramid, PyramidT& pC, - const Array2Df& b, Array2Df& x, - const int itmax, const float tol, - Progress &ph) -{ +void lincg(PyramidT &pyramid, PyramidT &pC, const Array2Df &b, Array2Df &x, + const int itmax, const float tol, Progress &ph) { + float rdotr_curr; float rdotr_prev; float rdotr_best; float alpha; float beta; - const size_t rows = pyramid.getRows(); - const size_t cols = pyramid.getCols(); - const size_t n = rows*cols; - const float tol2 = tol*tol; + const size_t rows = pyramid.getRows(); + const size_t cols = pyramid.getCols(); + const size_t n = rows * cols; + const float tol2 = tol * tol; Array2Df x_best(cols, rows); Array2Df r(cols, rows); @@ -136,30 +137,28 @@ const float bnrm2 = utils::dotProduct(b.data(), n); // r = b - Ax - multiplyA(pyramid, pC, x, r); // r = A x - utils::vsub(b.data(), r.data(), r.data(), n); // r = b - r + multiplyA(pyramid, pC, x, r); // r = A x + utils::vsub(b.data(), r.data(), r.data(), n); // r = b - r // rdotr = r.r rdotr_best = rdotr_curr = utils::dotProduct(r.data(), n); // Setup initial vector - std::copy(r.begin(), r.end(), p.begin()); // p = r - std::copy(x.begin(), x.end(), x_best.begin()); // x_best = x + std::copy(r.begin(), r.end(), p.begin()); // p = r + std::copy(x.begin(), x.end(), x_best.begin()); // x_best = x const float irdotr = rdotr_curr; - const float percent_sf = 100.0f/std::log(tol2*bnrm2/irdotr); + int phvalue = ph.value() + 8; + const float percent_sf = (100.0f - phvalue) / std::log(tol2 * bnrm2 / irdotr); int iter = 0; int num_backwards = 0; - for (; iter < itmax; ++iter) - { + for (; iter < itmax; ++iter) { // TEST ph.setValue( - static_cast(std::log(rdotr_curr/irdotr)*percent_sf) - ); + static_cast(phvalue + std::max(std::log(rdotr_curr / irdotr) * percent_sf, 0.f))); // User requested abort - if ( ph.canceled() && iter > 0 ) - { + if (ph.canceled() && iter > 0) { break; } @@ -177,19 +176,15 @@ rdotr_curr = utils::dotProduct(r.data(), n); // Have we gone unstable? - if (rdotr_curr > rdotr_prev) - { + if (rdotr_curr > rdotr_prev) { // Save where we've got to - if (num_backwards == 0 && rdotr_prev < rdotr_best) - { + if (num_backwards == 0 && rdotr_prev < rdotr_best) { rdotr_best = rdotr_prev; std::copy(x.begin(), x.end(), x_best.begin()); } num_backwards++; - } - else - { + } else { num_backwards = 0; } @@ -198,11 +193,9 @@ // Exit if we're done // fprintf(stderr, "iter:%d err:%f\n", iter+1, sqrtf(rdotr/bnrm2)); - if (rdotr_curr/bnrm2 < tol2) - break; + if (rdotr_curr / bnrm2 < tol2) break; - if (num_backwards > NUM_BACKWARDS_CEILING) - { + if (num_backwards > NUM_BACKWARDS_CEILING) { // Reset num_backwards = 0; std::copy(x_best.begin(), x_best.end(), x.begin()); @@ -218,96 +211,81 @@ // p = r std::copy(r.begin(), r.end(), p.begin()); - } - else - { + } else { // p = r + beta * p - beta = rdotr_curr/rdotr_prev; + beta = rdotr_curr / rdotr_prev; utils::vadds(r.data(), beta, p.data(), p.data(), n); } } // Use the best version we found - if (rdotr_curr > rdotr_best) - { + if (rdotr_curr > rdotr_best) { rdotr_curr = rdotr_best; std::copy(x_best.begin(), x_best.end(), x.begin()); } - if (rdotr_curr/bnrm2 > tol2) - { + if (rdotr_curr / bnrm2 > tol2) { // Not converged ph.setValue( - static_cast(std::log(rdotr_curr/irdotr)*percent_sf) - ); - if (iter == itmax) - { - std::cerr << std::endl << "pfstmo_mantiuk06: Warning: Not "\ + static_cast(std::log(rdotr_curr / irdotr) * percent_sf)); + if (iter == itmax) { + std::cerr << std::endl + << "pfstmo_mantiuk06: Warning: Not " "converged (hit maximum iterations), error = " - << std::sqrt(rdotr_curr/bnrm2) - << " (should be below " << tol <<")" - << std::endl; - } - else - { + << std::sqrt(rdotr_curr / bnrm2) << " (should be below " + << tol << ")" << std::endl; + } else { std::cerr << std::endl - << "pfstmo_mantiuk06: Warning: Not converged "\ + << "pfstmo_mantiuk06: Warning: Not converged " "(going unstable), error = " - << std::sqrt(rdotr_curr/bnrm2) - << " (should be below " << tol << ")" - << std::endl; + << std::sqrt(rdotr_curr / bnrm2) << " (should be below " + << tol << ")" << std::endl; } } } -void transformToLuminance(PyramidT& pp, Array2Df& Y, - const int itmax, const float tol, - Progress& ph) -{ - PyramidT pC = pp; // copy ctor +void transformToLuminance(PyramidT &pp, Array2Df &Y, const int itmax, + const float tol, Progress &ph) { + PyramidT pC = pp; // copy ctor - pp.computeScaleFactors( pC ); + pp.computeScaleFactors(pC); // pyramidScaleGradient(pp, pC); - pp.multiply( pC ); + pp.multiply(pC); // size of the first level of the pyramid - Array2Df b( pp.getCols(), pp.getRows() ); + Array2Df b(pp.getCols(), pp.getRows()); // calculate the sum of divergences (equal to b) - pp.computeSumOfDivergence( b ); + pp.computeSumOfDivergence(b); // calculate luminances from gradients lincg(pp, pC, b, Y, itmax, tol, ph); } -struct HistData -{ +struct HistData { float data; float cdf; size_t index; }; struct HistDataCompareData { - bool operator()(const HistData& v1, const HistData& v2) const { + bool operator()(const HistData &v1, const HistData &v2) const { return (v1.data < v2.data); } }; struct HistDataCompareIndex { - bool operator()(const HistData& v1, const HistData& v2) const { + bool operator()(const HistData &v1, const HistData &v2) const { return (v1.index < v2.index); } }; -void contrastEqualization(PyramidT& pp, const float contrastFactor) -{ +void contrastEqualization(PyramidT &pp, const float contrastFactor) { // Count size size_t totalPixels = 0; - for ( PyramidT::const_iterator itCurr = pp.begin(), itEnd = pp.end(); - itCurr != itEnd; - ++itCurr) - { + for (PyramidT::const_iterator itCurr = pp.begin(), itEnd = pp.end(); + itCurr != itEnd; ++itCurr) { totalPixels += itCurr->size(); } @@ -316,53 +294,44 @@ // Build histogram info size_t offset = 0; - for ( PyramidT::const_iterator itCurr = pp.begin(), itEnd = pp.end(); - itCurr != itEnd; - ++itCurr) - { + for (PyramidT::const_iterator itCurr = pp.begin(), itEnd = pp.end(); + itCurr != itEnd; ++itCurr) { PyramidS::const_iterator xyGradIter = itCurr->begin(); PyramidS::const_iterator xyGradEnd = itCurr->end(); - for (; xyGradIter != xyGradEnd; ++xyGradIter) - { - hist[offset].data = std::sqrt( - std::pow(xyGradIter->gX(), 2) + - std::pow(xyGradIter->gY(), 2) - ); + for (; xyGradIter != xyGradEnd; ++xyGradIter) { + hist[offset].data = std::sqrt(std::pow(xyGradIter->gX(), 2) + + std::pow(xyGradIter->gY(), 2)); hist[offset].index = offset; offset++; } } - std::sort( hist.begin(), hist.end(), HistDataCompareData() ); - assert( hist[0].data < hist[totalPixels-1].data ); + std::sort(hist.begin(), hist.end(), HistDataCompareData()); + assert(hist[0].data < hist[totalPixels - 1].data); // Calculate cdf - const float normalizationFactor = 1.0f/totalPixels; - for (size_t idx = 0; idx < totalPixels; ++idx) - { - hist[idx].cdf = idx*normalizationFactor; + const float normalizationFactor = 1.0f / totalPixels; + for (size_t idx = 0; idx < totalPixels; ++idx) { + hist[idx].cdf = idx * normalizationFactor; } // Recalculate in terms of indexes - std::sort( hist.begin(), hist.end(), HistDataCompareIndex() ); - assert( hist[0].index < hist[totalPixels-1].index ); - assert( hist[0].index == 0 ); + std::sort(hist.begin(), hist.end(), HistDataCompareIndex()); + assert(hist[0].index < hist[totalPixels - 1].index); + assert(hist[0].index == 0); - //Remap gradient magnitudes + // Remap gradient magnitudes offset = 0; - for ( PyramidT::iterator itCurr = pp.begin(), itEnd = pp.end(); - itCurr != itEnd; - ++itCurr) - { + for (PyramidT::iterator itCurr = pp.begin(), itEnd = pp.end(); + itCurr != itEnd; ++itCurr) { PyramidS::iterator xyGradIter = itCurr->begin(); PyramidS::iterator xyGradEnd = itCurr->end(); - for (; xyGradIter != xyGradEnd; ++xyGradIter) - { + for (; xyGradIter != xyGradEnd; ++xyGradIter) { float scaleFactor = - contrastFactor * hist[offset].cdf / hist[offset].data; + contrastFactor * hist[offset].cdf / hist[offset].data; *xyGradIter *= scaleFactor; @@ -371,144 +340,158 @@ } } -namespace -{ +namespace { const float CUT_MARGIN = 0.1f; const float DISP_DYN_RANGE = 2.3f; -void normalizeLuminanceAndRGB(Array2Df& R, Array2Df& G, Array2Df& B, - Array2Df& Y) -{ +void normalizeLuminanceAndRGB(Array2Df &R, Array2Df &G, Array2Df &B, + Array2Df &Y) { const float Ymax = utils::maxElement(Y.data(), Y.size()); - const float clip_min = 1e-7f*Ymax; + const float clip_min = 1e-7f * Ymax; - // std::cout << "clip_min = " << clip_min << std::endl; - // std::cout << "Ymax = " << Ymax << std::endl; +// std::cout << "clip_min = " << clip_min << std::endl; +// std::cout << "Ymax = " << Ymax << std::endl; #pragma omp parallel for - for (int idx = 0; idx < static_cast(Y.size()); idx++) - { - if ( R(idx) < clip_min ) R(idx) = clip_min; - if ( G(idx) < clip_min ) G(idx) = clip_min; - if ( B(idx) < clip_min ) B(idx) = clip_min; - if ( Y(idx) < clip_min ) Y(idx) = clip_min; + for (int idx = 0; idx < static_cast(Y.size()); idx++) { + if (R(idx) < clip_min) R(idx) = clip_min; + if (G(idx) < clip_min) G(idx) = clip_min; + if (B(idx) < clip_min) B(idx) = clip_min; + if (Y(idx) < clip_min) Y(idx) = clip_min; - float currY = 1.f/Y(idx); + float currY = 1.f / Y(idx); R(idx) *= currY; G(idx) *= currY; B(idx) *= currY; - Y(idx) = std::log10( Y(idx) ); + Y(idx) = std::log10(Y(idx)); } } /* Renormalize luminance */ -void denormalizeLuminance(Array2Df& Y) -{ +void denormalizeLuminance(Array2Df &Y) { const size_t size = Y.size(); - std::vector temp(size); - std::copy(Y.begin(), Y.end(), temp.begin()); + float lumMin, lumMax; + lhdrengine::findMinMaxPercentile(Y.data(), size, CUT_MARGIN * 0.01f, lumMin, 1.f - CUT_MARGIN * 0.01f, lumMax, true); - std::sort(temp.begin(), temp.end()); + const float lumRange = 1.f / (lumMax - lumMin) * DISP_DYN_RANGE; - float trim = (size - 1) * CUT_MARGIN * 0.01f; - float delta = trim - std::floor(trim); - const float lumMin = - temp[ static_cast(std::floor(trim)) ]*delta + - temp[ static_cast(std::ceil(trim)) ]*(1.0f - delta); - - trim = (size - 1) * (100.0f - CUT_MARGIN) * 0.01f; - delta = trim - std::floor(trim); - const float lumMax = - temp[ static_cast(std::floor(trim)) ]*delta + - temp[ static_cast(std::ceil(trim)) ]*(1.0f - delta); - - const float lumRange = 1.f/(lumMax - lumMin)*DISP_DYN_RANGE; - -#pragma omp parallel for // shared(lumRange, lumMin) - for (int j = 0; j < static_cast(size); j++) - { - Y(j) = (Y(j) - lumMin)*lumRange - DISP_DYN_RANGE; // x scaled +#pragma omp parallel for // shared(lumRange, lumMin) + for (int j = 0; j < static_cast(size); j++) { + Y(j) = (Y(j) - lumMin) * lumRange - DISP_DYN_RANGE; // x scaled } } template -inline -T decode(const T& value) -{ - if ( value <= 0.0031308f ) - { - return (value * 12.92f); - } - return (1.055f * std::pow( value, 1.f/2.4f ) - 0.055f); -} - -void denormalizeRGB(Array2Df& R, Array2Df& G, Array2Df& B, const Array2Df& Y, - float saturationFactor) -{ - const int size = static_cast(Y.size()); +inline T fastDecode(const T &value) { + if (value <= -5.766466716f) { + return (xexpf(value) * 12.92f); + } + return (1.055f * xexpf(1.f / 2.4f * value) - 0.055f); +} + +#ifdef __SSE2__ +inline vfloat fastDecode(const vfloat &valuev, const vfloat &c0, const vfloat &c1, const vfloat &c2, const vfloat &c3, const vfloat &c4) { + vmask selmask = vmaskf_le(valuev, c0); + vfloat tempv = vself(selmask, valuev, valuev * c1); + tempv = xexpf(tempv); + return vself(selmask, tempv * c2, tempv * c3 - c4); +} +#endif - /* Transform to sRGB */ +void denormalizeRGB(Array2Df &R, Array2Df &G, Array2Df &B, const Array2Df &Y, + float saturationFactor) { + + const float log10 = std::log(10.f); + +#ifdef __SSE2__ + const vfloat log10v = F2V(log10); + const vfloat saturationFactorv = F2V(saturationFactor); + const vfloat c0 = F2V(-5.7664667f); + const vfloat c1 = F2V(0.416666667f); + const vfloat c2 = F2V(12.92f); + const vfloat c3 = F2V(1.055f); + const vfloat c4 = F2V(0.055f); + +#endif +/* Transform to sRGB */ #pragma omp parallel for - for (int j = 0; j < size; j++) - { - float myY = std::pow( 10.f, Y(j) ); - R(j) = decode( std::pow( R(j), saturationFactor ) * myY ); - G(j) = decode( std::pow( G(j), saturationFactor ) * myY ); - B(j) = decode( std::pow( B(j), saturationFactor ) * myY ); + for (size_t i = 0; i < Y.getRows(); ++i) { + size_t j = 0; +#ifdef __SSE2__ + for (; j < Y.getCols() - 3; j += 4) { + vfloat myYv = LVFU(Y(j, i)) * log10v; + STVFU(R(j, i), fastDecode(saturationFactorv * xlogf(LVFU(R(j, i))) + myYv, c0, c1, c2, c3, c4)); + STVFU(G(j, i), fastDecode(saturationFactorv * xlogf(LVFU(G(j, i))) + myYv, c0, c1, c2, c3, c4)); + STVFU(B(j, i), fastDecode(saturationFactorv * xlogf(LVFU(B(j, i))) + myYv, c0, c1, c2, c3, c4)); + } +#endif + for (; j < Y.getCols(); ++j) { + float myY = Y(j, i) * log10; + R(j, i) = fastDecode(saturationFactor * xlogf(R(j, i)) + myY); + G(j, i) = fastDecode(saturationFactor * xlogf(G(j, i)) + myY); + B(j, i) = fastDecode(saturationFactor * xlogf(B(j, i)) + myY); + } } } } - // tone mapping -int tmo_mantiuk06_contmap(Array2Df& R, Array2Df& G, Array2Df& B, - Array2Df& Y, +int tmo_mantiuk06_contmap(Array2Df &R, Array2Df &G, Array2Df &B, Array2Df &Y, const float contrastFactor, - const float saturationFactor, - float detailfactor, - const int itmax, - const float tol, - Progress &ph) -{ - assert( R.getCols() == G.getCols() ); - assert( G.getCols() == B.getCols() ); - assert( B.getCols() == Y.getCols() ); - assert( R.getRows() == G.getRows() ); - assert( G.getRows() == B.getRows() ); - assert( B.getRows() == Y.getRows() ); + const float saturationFactor, float detailfactor, + const int itmax, const float tol, Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + assert(R.getCols() == G.getCols()); + assert(G.getCols() == B.getCols()); + assert(B.getCols() == Y.getCols()); + assert(R.getRows() == G.getRows()); + assert(G.getRows() == B.getRows()); + assert(B.getRows() == Y.getRows()); const size_t r = R.getRows(); const size_t c = R.getCols(); // const size_t n = r*c; normalizeLuminanceAndRGB(R, G, B, Y); + ph.setValue(2); // create pyramid PyramidT pp(r, c); + ph.setValue(6); + // calculate gradients for pyramid (Y won't be changed) - pp.computeGradients( Y ); + pp.computeGradients(Y); + // transform gradients to R - pp.transformToR( detailfactor ); + pp.transformToR(detailfactor); + ph.setValue(13); // Contrast map - if ( contrastFactor > 0.0f ) - { + if (contrastFactor > 0.0f) { // Contrast mapping - pp.scale( contrastFactor ); - } - else - { + pp.scale(contrastFactor); + } else { // Contrast equalization contrastEqualization(pp, -contrastFactor); } // transform R to gradients - pp.transformToG( detailfactor ); + pp.transformToG(detailfactor); + ph.setValue(40); + // transform gradients to luminance Y (pp -> Y) transformToLuminance(pp, Y, itmax, tol, ph); - denormalizeLuminance(Y); denormalizeRGB(R, G, B, Y, saturationFactor); +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_mantiuk06 = " << stop_watch.get_time() << " msec" << endl; +#endif + return PFSTMO_OK; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/contrast_domain.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/contrast_domain.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/contrast_domain.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/contrast_domain.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,8 +37,8 @@ #ifndef CONTRAST_DOMAIN_H #define CONTRAST_DOMAIN_H -#include "TonemappingOperators/pfstmo.h" #include +#include "TonemappingOperators/pfstmo.h" //! \brief: Tone mapping algorithm [Mantiuk2006] //! @@ -55,10 +55,10 @@ //! it was stopped from a callback function and PFSTMO_ERROR if an //! error was encountered. //! -int tmo_mantiuk06_contmap( pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - pfs::Array2Df& Y, - float contrastFactor, float saturationFactor, float detailFactor, - int itmax /*= 200*/, float tol /*= 1e-3*/, - pfs::Progress &ph); +int tmo_mantiuk06_contmap(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + pfs::Array2Df &Y, float contrastFactor, + float saturationFactor, float detailFactor, + int itmax /*= 200*/, float tol /*= 1e-3*/, + pfs::Progress &ph); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -34,19 +34,18 @@ * $Id: pfstmo_mantiuk06.cpp,v 1.9 2008/06/16 22:09:33 rafm Exp $ */ -#include +#include #include +#include #include #include -#include #include "contrast_domain.h" -#include "Libpfs/pfs.h" +#include "Libpfs/colorspace/colorspace.h" #include "Libpfs/frame.h" +#include "Libpfs/pfs.h" #include "Libpfs/progress.h" -#include "Libpfs/colorspace/colorspace.h" - //--- default tone mapping parameters; // float scaleFactor = 0.1f; @@ -54,27 +53,23 @@ // bool cont_map = false, cont_eq = false // bool cont_map = false; -namespace -{ +namespace { const int itmax = 200; const float tol = 5e-3f; } -void pfstmo_mantiuk06(pfs::Frame& frame, float scaleFactor, - float saturationFactor, float detailFactor, - bool cont_eq, pfs::Progress &ph) -{ +void pfstmo_mantiuk06(pfs::Frame &frame, float scaleFactor, + float saturationFactor, float detailFactor, bool cont_eq, + pfs::Progress &ph) { + #ifndef NDEBUG std::stringstream ss; ss << "pfstmo_mantiuk06 ("; - if (!cont_eq) - { + if (!cont_eq) { ss << "Mode: Contrast Mapping, "; - } - else - { - //scaleFactor = -scaleFactor; this was only executed in release mode!!! + } else { + // scaleFactor = -scaleFactor; this was only executed in release mode!!! ss << "Mode: Contrast Equalization, "; } @@ -86,28 +81,28 @@ #endif ph.setValue(0); - if (cont_eq) - scaleFactor = -scaleFactor; + if (cont_eq) scaleFactor = -scaleFactor; pfs::Channel *inRed, *inGreen, *inBlue; frame.getXYZChannels(inRed, inGreen, inBlue); - if ( !inRed || !inGreen || !inBlue ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (!inRed || !inGreen || !inBlue) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } const int cols = frame.getWidth(); const int rows = frame.getHeight(); - pfs::Array2Df inY( cols, rows ); + pfs::Array2Df inY(cols, rows); pfs::transformRGB2Y(inRed, inGreen, inBlue, &inY); - tmo_mantiuk06_contmap(*inRed, *inGreen, *inBlue, inY, - scaleFactor, saturationFactor, detailFactor, itmax, tol, - ph); + try { + tmo_mantiuk06_contmap(*inRed, *inGreen, *inBlue, inY, scaleFactor, + saturationFactor, detailFactor, itmax, tol, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } frame.getTags().setTag("LUMINANCE", "RELATIVE"); - if ( !ph.canceled() ) - ph.setValue(100); + if (!ph.canceled()) ph.setValue(100); } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pyramid.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pyramid.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pyramid.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pyramid.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,241 +29,287 @@ #include "pyramid.h" -#include -#include #include -#include +#include +#include #include +#include #ifdef _OPENMP #include #endif #include "Libpfs/array2d.h" -#include "Libpfs/utils/sse.h" #include "Libpfs/utils/numeric.h" +#include "Libpfs/utils/sse.h" +#include "../../sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) using namespace pfs; -namespace -{ -inline -size_t downscaleBy2(size_t value) -{ - return (value >> 1); +namespace { +inline size_t downscaleBy2(size_t value) { return (value >> 1); } +const size_t PYRAMID_MIN_PIXELS = 3; + +const float LOG10FACTOR = 2.3025850929940456840179914546844f; +const size_t LOOKUP_W_TO_R = 107; + +static float W_table[] = { + 0.000000f, 0.010000f, 0.021180f, 0.031830f, 0.042628f, + 0.053819f, 0.065556f, 0.077960f, 0.091140f, 0.105203f, + 0.120255f, 0.136410f, 0.153788f, 0.172518f, 0.192739f, + 0.214605f, 0.238282f, 0.263952f, 0.291817f, 0.322099f, + 0.355040f, 0.390911f, 0.430009f, 0.472663f, 0.519238f, + 0.570138f, 0.625811f, 0.686754f, 0.753519f, 0.826720f, + 0.907041f, 0.995242f, 1.092169f, 1.198767f, 1.316090f, + 1.445315f, 1.587756f, 1.744884f, 1.918345f, 2.109983f, + 2.321863f, 2.556306f, 2.815914f, 3.103613f, 3.422694f, + 3.776862f, 4.170291f, 4.607686f, 5.094361f, 5.636316f, + 6.240338f, 6.914106f, 7.666321f, 8.506849f, 9.446889f, + 10.499164f, 11.678143f, 13.000302f, 14.484414f, 16.151900f, + 18.027221f, 20.138345f, 22.517282f, 25.200713f, 28.230715f, + 31.655611f, 35.530967f, 39.920749f, 44.898685f, 50.549857f, + 56.972578f, 64.280589f, 72.605654f, 82.100619f, 92.943020f, + 105.339358f, 119.530154f, 135.795960f, 154.464484f, 175.919088f, + 200.608905f, 229.060934f, 261.894494f, 299.838552f, 343.752526f, + 394.651294f, 453.735325f, 522.427053f, 602.414859f, 695.706358f, + 804.693100f, 932.229271f, 1081.727632f, 1257.276717f, 1463.784297f, + 1707.153398f, 1994.498731f, 2334.413424f, 2737.298517f, 3215.770944f, + 3785.169959f, 4464.187290f, 5275.653272f, 6247.520102f, 7414.094945f, + 8817.590551f, 10510.080619f}; +static float R_table[] = { + 0.000000f, 0.009434f, 0.018868f, 0.028302f, 0.037736f, 0.047170f, 0.056604f, + 0.066038f, 0.075472f, 0.084906f, 0.094340f, 0.103774f, 0.113208f, 0.122642f, + 0.132075f, 0.141509f, 0.150943f, 0.160377f, 0.169811f, 0.179245f, 0.188679f, + 0.198113f, 0.207547f, 0.216981f, 0.226415f, 0.235849f, 0.245283f, 0.254717f, + 0.264151f, 0.273585f, 0.283019f, 0.292453f, 0.301887f, 0.311321f, 0.320755f, + 0.330189f, 0.339623f, 0.349057f, 0.358491f, 0.367925f, 0.377358f, 0.386792f, + 0.396226f, 0.405660f, 0.415094f, 0.424528f, 0.433962f, 0.443396f, 0.452830f, + 0.462264f, 0.471698f, 0.481132f, 0.490566f, 0.500000f, 0.509434f, 0.518868f, + 0.528302f, 0.537736f, 0.547170f, 0.556604f, 0.566038f, 0.575472f, 0.584906f, + 0.594340f, 0.603774f, 0.613208f, 0.622642f, 0.632075f, 0.641509f, 0.650943f, + 0.660377f, 0.669811f, 0.679245f, 0.688679f, 0.698113f, 0.707547f, 0.716981f, + 0.726415f, 0.735849f, 0.745283f, 0.754717f, 0.764151f, 0.773585f, 0.783019f, + 0.792453f, 0.801887f, 0.811321f, 0.820755f, 0.830189f, 0.839623f, 0.849057f, + 0.858491f, 0.867925f, 0.877358f, 0.886792f, 0.896226f, 0.905660f, 0.915094f, + 0.924528f, 0.933962f, 0.943396f, 0.952830f, 0.962264f, 0.971698f, 0.981132f, + 0.990566f, 1.000000f}; + +// in_tab and out_tab should contain inccreasing float values +static float lookup_table(size_t n, const float *in_tab, const float *out_tab, + float val) { + if (val < in_tab[0]) return out_tab[0]; + + for (size_t j = 1; j < n; j++) { + if (val < in_tab[j]) { + const float dd = + (val - in_tab[j - 1]) / (in_tab[j] - in_tab[j - 1]); + return out_tab[j - 1] + (out_tab[j] - out_tab[j - 1]) * dd; + } + } + + return out_tab[n - 1]; } +// transform gradient G to R +float transformToRn(float currG, float detailFactor){ + const float mult = copysign(1.f, currG); + // G to W + currG = pow_F(10, (mult * currG) * LOG10FACTOR * detailFactor) - 1.0f; + // W to RESP + return mult * lookup_table(LOOKUP_W_TO_R, W_table, R_table, currG); } -namespace -{ -const size_t PYRAMID_MIN_PIXELS = 3; +// transform gradient R to G +float transformToGn(float currR, float detailFactor){ + const float mult = copysign(1.f, currR); + // RESP to W + currR = lookup_table(LOOKUP_W_TO_R, R_table, W_table, mult * currR); + // W to G + return mult * std::log1p(currR) * detailFactor; } -PyramidT::PyramidT(size_t rows, size_t cols) - : m_rows(rows) - , m_cols(cols) -{ - size_t referenceSize = std::min( rows, cols ); - while ( referenceSize >= PYRAMID_MIN_PIXELS ) - { - m_pyramid.push_back( PyramidS(cols, rows) ); +static const float detectT = 0.001f; +static const float a = 0.038737f; +static const float b = 0.537756f; - rows = downscaleBy2(rows); // division by 2 - cols = downscaleBy2(cols); // division by 2 - referenceSize = downscaleBy2(referenceSize); // division by 2 +//! \brief compute a scale factor based on the input \a g value +float calculateScaleFactor(float g) { + return 1.0 / (a * pow_F(std::max(detectT, std::fabs(g)), b)); +} + +} + +PyramidT::PyramidT(size_t rows, size_t cols) : m_rows(rows), m_cols(cols) { + size_t referenceSize = std::min(rows, cols); + while (referenceSize >= PYRAMID_MIN_PIXELS) { + m_pyramid.push_back(PyramidS(cols, rows)); + + rows = downscaleBy2(rows); // division by 2 + cols = downscaleBy2(cols); // division by 2 + referenceSize = downscaleBy2(referenceSize); // division by 2 } } -void PyramidT::computeGradients(const pfs::Array2Df& Y) -{ - assert( this->getCols() == Y.getCols() ); - assert( this->getRows() == Y.getRows() ); +void PyramidT::computeGradients(const pfs::Array2Df &Y) { + assert(this->getCols() == Y.getCols()); + assert(this->getRows() == Y.getRows()); - if ( !m_pyramid.size() ) return; + if (!m_pyramid.size()) return; #ifndef NDEBUG - assert((getElems()/4) > 0); - assert((getElems()/16) > 0); + assert((getElems() / 4) > 0); + assert((getElems() / 16) > 0); #endif - Array2Df buffer1(downscaleBy2(Y.getCols()), - downscaleBy2(getRows())); + Array2Df buffer1(downscaleBy2(Y.getCols()), downscaleBy2(getRows())); Array2Df buffer2(downscaleBy2(buffer1.getCols()), downscaleBy2(buffer1.getRows())); calculateGradients(Y.data(), m_pyramid[0]); - if ( m_pyramid.size() > 1 ) - { + if (m_pyramid.size() > 1) { matrixDownsample(m_pyramid[0].getCols(), m_pyramid[0].getRows(), Y.data(), buffer1.data()); calculateGradients(buffer1.data(), m_pyramid[1]); } - for (size_t idx = 2; idx < m_pyramid.size(); ++idx) - { - matrixDownsample(m_pyramid[idx-1].getCols(), m_pyramid[idx-1].getRows(), - buffer1.data(), buffer2.data()); + for (size_t idx = 2; idx < m_pyramid.size(); ++idx) { + matrixDownsample(m_pyramid[idx - 1].getCols(), + m_pyramid[idx - 1].getRows(), buffer1.data(), + buffer2.data()); calculateGradients(buffer2.data(), m_pyramid[idx]); - buffer1.swap( buffer2 ); + buffer1.swap(buffer2); } } -void PyramidT::computeSumOfDivergence(pfs::Array2Df& sumOfdivG) -{ +void PyramidT::computeSumOfDivergence(pfs::Array2Df &sumOfdivG) { // zero dimension Array2D - pfs::Array2Df tempSumOfdivG( downscaleBy2(sumOfdivG.getCols()), - downscaleBy2(sumOfdivG.getRows()) ); + pfs::Array2Df tempSumOfdivG(downscaleBy2(sumOfdivG.getCols()), + downscaleBy2(sumOfdivG.getRows())); - if ( (numLevels() % 2) ) - { + if ((numLevels() % 2)) { sumOfdivG.swap(tempSumOfdivG); tempSumOfdivG.fill(0.0f); - } - else - { + } else { tempSumOfdivG.fill(0.0f); } - if ( numLevels() != 0 ) - { - calculateAndAddDivergence(m_pyramid[m_pyramid.size()-1], + if (numLevels() != 0) { + calculateAndAddDivergence(m_pyramid[m_pyramid.size() - 1], tempSumOfdivG.data()); tempSumOfdivG.swap(sumOfdivG); } - for (int idx = numLevels()-2; idx >= 0; idx--) - { + for (int idx = numLevels() - 2; idx >= 0; idx--) { matrixUpsample(m_pyramid[idx].getCols(), m_pyramid[idx].getRows(), sumOfdivG.data(), tempSumOfdivG.data()); - calculateAndAddDivergence(m_pyramid[idx], - tempSumOfdivG.data()); + calculateAndAddDivergence(m_pyramid[idx], tempSumOfdivG.data()); tempSumOfdivG.swap(sumOfdivG); } } -namespace -{ -struct CalculateScaleFactor -{ - XYGradient operator()(const XYGradient& xyGrad) const - { - return XYGradient(calculateScaleFactor(xyGrad.gX()), - calculateScaleFactor(xyGrad.gY())); - } -}; -} - -void PyramidT::computeScaleFactors( PyramidT& result ) const -{ +void PyramidT::computeScaleFactors(PyramidT &result) const { PyramidContainer::const_iterator inCurr = m_pyramid.begin(); PyramidContainer::const_iterator inEnd = m_pyramid.end(); PyramidContainer::iterator outCurr = result.m_pyramid.begin(); - while ( inCurr != inEnd ) - { - std::transform(inCurr->begin(), inCurr->end(), outCurr->begin(), - CalculateScaleFactor()); - - ++outCurr; + while (inCurr != inEnd) { + #pragma omp parallel for + for(size_t i = 0; i < inCurr->getRows(); i++) { + PyramidS::const_iterator currGxy = inCurr->row_begin(i); + PyramidS::const_iterator endGxy = inCurr->row_end(i); + PyramidS::iterator currGxyOut = outCurr->row_begin(i); + + while (currGxy != endGxy) { + currGxyOut->gX() = calculateScaleFactor(currGxy->gX()); + currGxyOut->gY() = calculateScaleFactor(currGxy->gY()); + ++currGxy; + ++currGxyOut; + } + } ++inCurr; + ++outCurr; } } -namespace -{ -template -struct TransformObj -{ - TransformObj(float f) : t_(f) {} - - XYGradient operator()(const XYGradient& xyGrad) const - { - return XYGradient(t_(xyGrad.gX()), - t_(xyGrad.gY())); - } -private: - Traits t_; -}; -} - -void PyramidT::transformToR(float detailFactor) -{ +void PyramidT::transformToR(float detailFactor) { PyramidContainer::iterator itCurr = m_pyramid.begin(); PyramidContainer::iterator itEnd = m_pyramid.end(); - TransformObj transformFunctor(detailFactor); - - while ( itCurr != itEnd ) - { - std::transform(itCurr->begin(), itCurr->end(), itCurr->begin(), - transformFunctor); - + while (itCurr != itEnd) { + #pragma omp parallel for + for(size_t i = 0; i < itCurr->getRows(); i++) { + PyramidS::iterator currGxy = itCurr->row_begin(i); + PyramidS::iterator endGxy = itCurr->row_end(i); + + while (currGxy != endGxy) { + currGxy->gX() = transformToRn(currGxy->gX(), detailFactor); + currGxy->gY() = transformToRn(currGxy->gY(), detailFactor); + ++currGxy; + } + } ++itCurr; } } -void PyramidT::transformToG(float detailFactor) -{ +void PyramidT::transformToG(float detailFactor) { PyramidContainer::iterator itCurr = m_pyramid.begin(); PyramidContainer::iterator itEnd = m_pyramid.end(); - TransformObj transformFunctor(detailFactor); - - while ( itCurr != itEnd ) - { - std::transform(itCurr->begin(), itCurr->end(), itCurr->begin(), - transformFunctor); - + while (itCurr != itEnd) { + #pragma omp parallel for + for(size_t i = 0; i < itCurr->getRows(); i++) { + PyramidS::iterator currGxy = itCurr->row_begin(i); + PyramidS::iterator endGxy = itCurr->row_end(i); + + while (currGxy != endGxy) { + currGxy->gX() = transformToGn(currGxy->gX(), detailFactor); + currGxy->gY() = transformToGn(currGxy->gY(), detailFactor); + ++currGxy; + } + } ++itCurr; } } -struct ScalePyramidS -{ - ScalePyramidS(float multiplier) - : multiplier_(multiplier) - {} +struct ScalePyramidS { + ScalePyramidS(float multiplier) : multiplier_(multiplier) {} - void operator()(PyramidS& multiply) - { - pfs::utils::vsmul(multiply.data(), multiplier_, - multiply.data(), multiply.size()); + void operator()(PyramidS &multiply) { + pfs::utils::vsmul(multiply.data(), multiplier_, multiply.data(), + multiply.size()); } -private: + + private: float multiplier_; }; -void PyramidT::scale(float multiplier) -{ - for_each(m_pyramid.begin(), m_pyramid.end(), - ScalePyramidS(multiplier)); +void PyramidT::scale(float multiplier) { + for_each(m_pyramid.begin(), m_pyramid.end(), ScalePyramidS(multiplier)); } // scale gradients for the whole one pyramid with the use of (Cx,Cy) // from the other pyramid -void PyramidT::multiply(const PyramidT &other) -{ +void PyramidT::multiply(const PyramidT &other) { // check that the pyramids have the same number of levels - assert( this->numLevels() == other.numLevels() ); + assert(this->numLevels() == other.numLevels()); // check that the first level of the pyramid has the same size - assert( this->getCols() == other.getCols() ); - assert( this->getRows() == other.getRows() ); + assert(this->getCols() == other.getCols()); + assert(this->getRows() == other.getRows()); PyramidContainer::const_iterator inCurr = other.m_pyramid.begin(); PyramidContainer::const_iterator inEnd = other.m_pyramid.end(); PyramidContainer::iterator outCurr = m_pyramid.begin(); - for ( ; inCurr != inEnd ; ++outCurr, ++inCurr) - { - PyramidContainer::value_type::const_iterator innerItOther = inCurr->begin(); + for (; inCurr != inEnd; ++outCurr, ++inCurr) { + PyramidContainer::value_type::const_iterator innerItOther = + inCurr->begin(); PyramidContainer::value_type::iterator innerIt = outCurr->begin(); PyramidContainer::value_type::iterator innerItEnd = outCurr->end(); - while (innerIt != innerItEnd) - { + while (innerIt != innerItEnd) { *innerIt *= *innerItOther; innerIt++; @@ -273,116 +319,109 @@ } // downsample the matrix -void matrixDownsampleFull(size_t inCols, size_t inRows, - const float* inputData, float* outputData) -{ +void matrixDownsampleFull(size_t inCols, size_t inRows, const float *inputData, + float *outputData) { const size_t outRows = inRows / 2; const size_t outCols = inCols / 2; const float dx = static_cast(inCols) / outCols; const float dy = static_cast(inRows) / outRows; - const float normalize = 1.0f/(dx*dy); + const float normalize = 1.0f / (dx * dy); - // New downsampling by Ed Brambley: - // Experimental downsampling that assumes pixels are square and - // integrates over each new pixel to find the average value of the - // underlying pixels. - // - // Consider the original pixels laid out, and the new (larger) - // pixels layed out over the top of them. Then the new value for - // the larger pixels is just the integral over that pixel of what - // shows through; i.e., the values of the pixels underneath - // multiplied by how much of that pixel is showing. - // - // (ix1, iy1) is the coordinate of the top left visible pixel. - // (ix2, iy2) is the coordinate of the bottom right visible pixel. - // (fx1, fy1) is the fraction of the top left pixel showing. - // (fx2, fy2) is the fraction of the bottom right pixel showing. +// New downsampling by Ed Brambley: +// Experimental downsampling that assumes pixels are square and +// integrates over each new pixel to find the average value of the +// underlying pixels. +// +// Consider the original pixels laid out, and the new (larger) +// pixels layed out over the top of them. Then the new value for +// the larger pixels is just the integral over that pixel of what +// shows through; i.e., the values of the pixels underneath +// multiplied by how much of that pixel is showing. +// +// (ix1, iy1) is the coordinate of the top left visible pixel. +// (ix2, iy2) is the coordinate of the bottom right visible pixel. +// (fx1, fy1) is the fraction of the top left pixel showing. +// (fx2, fy2) is the fraction of the bottom right pixel showing. #pragma omp parallel for - for (int y = 0; y < static_cast(outRows); y++) - { - const size_t iy1 = ( y * inRows) / outRows; - const size_t iy2 = ((y+1) * inRows) / outRows; - const float fy1 = (iy1+1) - y * dy; - const float fy2 = (y+1) * dy - iy2; - - for (size_t x = 0; x < outCols; x++) - { - const size_t ix1 = ( x * inCols) / outCols; - const size_t ix2 = ((x+1) * inCols) / outCols; - const float fx1 = (ix1+1) - x * dx; - const float fx2 = (x+1) * dx - ix2; + for (int y = 0; y < static_cast(outRows); y++) { + const size_t iy1 = (y * inRows) / outRows; + const size_t iy2 = ((y + 1) * inRows) / outRows; + const float fy1 = (iy1 + 1) - y * dy; + const float fy2 = (y + 1) * dy - iy2; + + for (size_t x = 0; x < outCols; x++) { + const size_t ix1 = (x * inCols) / outCols; + const size_t ix2 = ((x + 1) * inCols) / outCols; + const float fx1 = (ix1 + 1) - x * dx; + const float fx2 = (x + 1) * dx - ix2; float pixVal = 0.0f; float factorx, factory; - for (size_t i = iy1; i <= iy2 && i < inRows; i++) - { + for (size_t i = iy1; i <= iy2 && i < inRows; i++) { if (i == iy1) - factory = fy1; // We're just getting the bottom edge of this pixel + factory = fy1; // We're just getting the bottom edge of + // this pixel else if (i == iy2) - factory = fy2; // We're just gettting the top edge of this pixel + factory = + fy2; // We're just gettting the top edge of this pixel else - factory = 1.0f; // We've got the full height of this pixel - for (size_t j = ix1; j <= ix2 && j < inCols; j++) - { + factory = 1.0f; // We've got the full height of this pixel + for (size_t j = ix1; j <= ix2 && j < inCols; j++) { if (j == ix1) - factorx = fx1; // We've just got the right edge of this pixel + factorx = + fx1; // We've just got the right edge of this pixel else if (j == ix2) - factorx = fx2; // We've just got the left edge of this pixel + factorx = + fx2; // We've just got the left edge of this pixel else - factorx = 1.0f; // We've got the full width of this pixel + factorx = + 1.0f; // We've got the full width of this pixel - pixVal += inputData[j + i*inCols] * factorx * factory; + pixVal += inputData[j + i * inCols] * factorx * factory; } } - outputData[x + y * outCols] = pixVal * normalize; // Normalize by the area of the new pixel + outputData[x + y * outCols] = + pixVal * normalize; // Normalize by the area of the new pixel } } } void matrixDownsampleSimple(size_t inCols, size_t inRows, - const float* inputData, float* outputData) -{ + const float *inputData, float *outputData) { const size_t outRows = inRows / 2; const size_t outCols = inCols / 2; - // Simplified downsampling by Bruce Guenter: - // - // Follows exactly the same math as the full downsampling above, - // except that inRows and inCols are known to be even. This allows - // for all of the boundary cases to be eliminated, reducing the - // sampling to a simple average. +// Simplified downsampling by Bruce Guenter: +// +// Follows exactly the same math as the full downsampling above, +// except that inRows and inCols are known to be even. This allows +// for all of the boundary cases to be eliminated, reducing the +// sampling to a simple average. #pragma omp parallel for - for (int y = 0; y < static_cast(outRows); y++) - { + for (int y = 0; y < static_cast(outRows); y++) { const int iy1 = y * 2; - const float* datap = inputData + iy1 * inCols; - float* resp = outputData + y * outCols; + const float *datap = inputData + iy1 * inCols; + float *resp = outputData + y * outCols; - for (size_t x = 0; x < outCols; x++) - { - const size_t ix1 = x*2; + for (size_t x = 0; x < outCols; x++) { + const size_t ix1 = x * 2; - resp[x] = ( datap[ix1] + - datap[(ix1+1)] + - datap[ix1 + inCols] + - datap[(ix1+1) + inCols]) * 0.25f; // / 4.0f; + resp[x] = (datap[ix1] + datap[(ix1 + 1)] + datap[ix1 + inCols] + + datap[(ix1 + 1) + inCols]) * + 0.25f; // / 4.0f; } } } -void matrixDownsample(size_t inCols, size_t inRows, - const float* inputData, float* outputData) -{ - if ( !(inCols % 2) && !(inRows % 2) ) - { +void matrixDownsample(size_t inCols, size_t inRows, const float *inputData, + float *outputData) { + if (!(inCols % 2) && !(inRows % 2)) { matrixDownsampleSimple(inCols, inRows, inputData, outputData); - } - else - { + } else { matrixDownsampleFull(inCols, inRows, inputData, outputData); } } @@ -392,90 +431,86 @@ // res should be a pointer to allocated memory for bigger matrix // cols and rows are the dimensions of the output matrix void matrixUpsampleFull(const size_t outCols, const size_t outRows, - const float* inputData, float* outputData) -{ - const size_t inRows = outRows/2; - const size_t inCols = outCols/2; - - // Transpose of experimental downsampling matrix (theoretically the correct thing to do) - const float dx = static_cast(inCols)/outCols; - const float dy = static_cast(inRows)/outRows; - - // This gives a genuine upsampling matrix, not the transpose of the downsampling matrix - const float factor = 1.0f / (dx*dy); - // Theoretically, this should be the best. - // const float factor = 1.0f; + const float *inputData, float *outputData) { + const size_t inRows = outRows / 2; + const size_t inCols = outCols / 2; + + // Transpose of experimental downsampling matrix (theoretically the correct + // thing to do) + const float dx = static_cast(inCols) / outCols; + const float dy = static_cast(inRows) / outRows; + + // This gives a genuine upsampling matrix, not the transpose of the + // downsampling matrix + const float factor = 1.0f / (dx * dy); +// Theoretically, this should be the best. +// const float factor = 1.0f; #pragma omp parallel for - for (int y = 0; y < static_cast(outRows); y++) - { + for (int y = 0; y < static_cast(outRows); y++) { const float sy = y * dy; - const int iy1 = ( y * inRows) / outRows; - const int iy2 = std::min(((y+1) * inRows) / outRows, inRows-1); + const int iy1 = (y * inRows) / outRows; + const int iy2 = std::min(((y + 1) * inRows) / outRows, inRows - 1); - for (size_t x = 0; x < outCols; x++) - { + for (size_t x = 0; x < outCols; x++) { const float sx = x * dx; - const int ix1 = ( x * inCols) / outCols; - const int ix2 = std::min(((x+1) * inCols) / outCols, inCols-1); + const int ix1 = (x * inCols) / outCols; + const int ix2 = std::min(((x + 1) * inCols) / outCols, inCols - 1); - outputData[x + y*outCols] = (((ix1+1) - sx)*((iy1+1 - sy)) * inputData[ix1 + iy1*inCols] + - ((ix1+1) - sx)*(sy+dy - (iy1+1)) * inputData[ix1 + iy2*inCols] + - (sx+dx - (ix1+1))*((iy1+1 - sy)) * inputData[ix2 + iy1*inCols] + - (sx+dx - (ix1+1))*(sy+dx - (iy1+1)) * inputData[ix2 + iy2*inCols])*factor; + outputData[x + y * outCols] = + (((ix1 + 1) - sx) * ((iy1 + 1 - sy)) * + inputData[ix1 + iy1 * inCols] + + ((ix1 + 1) - sx) * (sy + dy - (iy1 + 1)) * + inputData[ix1 + iy2 * inCols] + + (sx + dx - (ix1 + 1)) * ((iy1 + 1 - sy)) * + inputData[ix2 + iy1 * inCols] + + (sx + dx - (ix1 + 1)) * (sy + dx - (iy1 + 1)) * + inputData[ix2 + iy2 * inCols]) * + factor; } } } void matrixUpsampleSimple(const int outCols, const int outRows, - const float* const inputData, float* const outputData) -{ + const float *const inputData, + float *const outputData) { #pragma omp parallel for - for (int y = 0; y < outRows; y++) - { + for (int y = 0; y < outRows; y++) { const int iy1 = y / 2; - float* outp = outputData + y*outCols; - const float* inp = inputData + iy1*(outCols/2); - for (int x = 0; x < outCols; x+=2) - { + float *outp = outputData + y * outCols; + const float *inp = inputData + iy1 * (outCols / 2); + for (int x = 0; x < outCols; x += 2) { const int ix1 = x / 2; - outp[x] = outp[x+1] = inp[ix1]; + outp[x] = outp[x + 1] = inp[ix1]; } } } -void matrixUpsample(size_t outCols, size_t outRows, - const float* inputData, float* outputData) -{ - if ( !(outRows%2) && !(outCols%2) ) - { +void matrixUpsample(size_t outCols, size_t outRows, const float *inputData, + float *outputData) { + if (!(outRows % 2) && !(outCols % 2)) { matrixUpsampleSimple(outCols, outRows, inputData, outputData); - } - else - { + } else { matrixUpsampleFull(outCols, outRows, inputData, outputData); } } // calculate gradients -void calculateGradients(const float* inputData, PyramidS& gradient) -{ +void calculateGradients(const float *inputData, PyramidS &gradient) { const int COLS = gradient.getCols(); const int ROWS = gradient.getRows(); -#pragma omp parallel // shared(COLS, ROWS) +#pragma omp parallel // shared(COLS, ROWS) { #pragma omp for nowait - for (int ky = 0; ky < (ROWS-1); ++ky) - { + for (int ky = 0; ky < (ROWS - 1); ++ky) { PyramidS::iterator currGxy = gradient.row_begin(ky); PyramidS::iterator endGxy = gradient.row_end(ky) - 1; - const float* currLumU = inputData + ky*COLS; - const float* currLumL = inputData + (ky + 1)*COLS; + const float *currLumU = inputData + ky * COLS; + const float *currLumL = inputData + (ky + 1) * COLS; - while ( currGxy != endGxy ) - { + while (currGxy != endGxy) { currGxy->gX() = *(currLumU + 1) - *currLumU; currGxy->gY() = *currLumL - *currLumU; @@ -490,13 +525,12 @@ #pragma omp single { - PyramidS::iterator currGxy = gradient.row_begin(ROWS-1); - PyramidS::iterator endGxy = gradient.row_end(ROWS-1) - 1; + PyramidS::iterator currGxy = gradient.row_begin(ROWS - 1); + PyramidS::iterator endGxy = gradient.row_end(ROWS - 1) - 1; - const float* currLumU = inputData + (ROWS-1)*COLS; + const float *currLumU = inputData + (ROWS - 1) * COLS; - while ( currGxy != endGxy ) - { + while (currGxy != endGxy) { currGxy->gX() = *(currLumU + 1) - *currLumU; currGxy->gY() = 0.0f; @@ -506,117 +540,8 @@ // last sample of the row... currGxy->gX() = 0.0f; currGxy->gY() = 0.0f; - } // pragma omp single - } // pragma omp parallel -} - -namespace -{ -const float LOG10FACTOR = 2.3025850929940456840179914546844f; -const size_t LOOKUP_W_TO_R = 107; - -static float W_table[] = { - 0.000000f,0.010000f,0.021180f,0.031830f,0.042628f,0.053819f,0.065556f, - 0.077960f,0.091140f,0.105203f,0.120255f,0.136410f,0.153788f,0.172518f, - 0.192739f,0.214605f,0.238282f,0.263952f,0.291817f,0.322099f,0.355040f, - 0.390911f,0.430009f,0.472663f,0.519238f,0.570138f,0.625811f,0.686754f, - 0.753519f,0.826720f,0.907041f,0.995242f,1.092169f,1.198767f,1.316090f, - 1.445315f,1.587756f,1.744884f,1.918345f,2.109983f,2.321863f,2.556306f, - 2.815914f,3.103613f,3.422694f,3.776862f,4.170291f,4.607686f,5.094361f, - 5.636316f,6.240338f,6.914106f,7.666321f,8.506849f,9.446889f,10.499164f, - 11.678143f,13.000302f,14.484414f,16.151900f,18.027221f,20.138345f, - 22.517282f,25.200713f,28.230715f,31.655611f,35.530967f,39.920749f, - 44.898685f,50.549857f,56.972578f,64.280589f,72.605654f,82.100619f, - 92.943020f,105.339358f,119.530154f,135.795960f,154.464484f,175.919088f, - 200.608905f,229.060934f,261.894494f,299.838552f,343.752526f,394.651294f, - 453.735325f,522.427053f,602.414859f,695.706358f,804.693100f,932.229271f, - 1081.727632f,1257.276717f,1463.784297f,1707.153398f,1994.498731f, - 2334.413424f,2737.298517f,3215.770944f,3785.169959f,4464.187290f, - 5275.653272f,6247.520102f,7414.094945f,8817.590551f,10510.080619f}; -static float R_table[] = { - 0.000000f,0.009434f,0.018868f,0.028302f,0.037736f,0.047170f,0.056604f, - 0.066038f,0.075472f,0.084906f,0.094340f,0.103774f,0.113208f,0.122642f, - 0.132075f,0.141509f,0.150943f,0.160377f,0.169811f,0.179245f,0.188679f, - 0.198113f,0.207547f,0.216981f,0.226415f,0.235849f,0.245283f,0.254717f, - 0.264151f,0.273585f,0.283019f,0.292453f,0.301887f,0.311321f,0.320755f, - 0.330189f,0.339623f,0.349057f,0.358491f,0.367925f,0.377358f,0.386792f, - 0.396226f,0.405660f,0.415094f,0.424528f,0.433962f,0.443396f,0.452830f, - 0.462264f,0.471698f,0.481132f,0.490566f,0.500000f,0.509434f,0.518868f, - 0.528302f,0.537736f,0.547170f,0.556604f,0.566038f,0.575472f,0.584906f, - 0.594340f,0.603774f,0.613208f,0.622642f,0.632075f,0.641509f,0.650943f, - 0.660377f,0.669811f,0.679245f,0.688679f,0.698113f,0.707547f,0.716981f, - 0.726415f,0.735849f,0.745283f,0.754717f,0.764151f,0.773585f,0.783019f, - 0.792453f,0.801887f,0.811321f,0.820755f,0.830189f,0.839623f,0.849057f, - 0.858491f,0.867925f,0.877358f,0.886792f,0.896226f,0.905660f,0.915094f, - 0.924528f,0.933962f,0.943396f,0.952830f,0.962264f,0.971698f,0.981132f, - 0.990566f,1.000000f}; - -// in_tab and out_tab should contain inccreasing float values -static -float lookup_table(size_t n, const float* in_tab, const float* out_tab, float val) -{ - if ( val < in_tab[0] ) return out_tab[0]; - - for (size_t j = 1; j < n; j++) - { - if (val < in_tab[j]) - { - const float dd = (val - in_tab[j-1]) / (in_tab[j] - in_tab[j-1]); - return out_tab[j-1] + (out_tab[j] - out_tab[j-1]) * dd; - } - } - - return out_tab[n-1]; -} -} - -TransformToR::TransformToR(float detailFactor) - : m_detailFactor(LOG10FACTOR*detailFactor) -{} - -// transform gradient G to R -float TransformToR::operator ()(float currG) const -{ - if (currG < 0.0f) - { - // G to W - currG = std::pow(10, (-currG) * m_detailFactor) - 1.0f; - // W to RESP - return -lookup_table(LOOKUP_W_TO_R, W_table, R_table, currG); - } - else - { - // G to W - currG = std::pow(10, currG * m_detailFactor) - 1.0f; - // W to RESP - return lookup_table(LOOKUP_W_TO_R, W_table, R_table, currG); - } -} - - -TransformToG::TransformToG(float detailFactor) - : m_detailFactor(1.0f/(LOG10FACTOR*detailFactor)) -{} - -// transform from R to G -float TransformToG::operator ()(float currR) const -{ - if (currR < 0.0f) - { - // RESP to W - currR = lookup_table(LOOKUP_W_TO_R, R_table, W_table, -currR); - // W to G - //return -std::log(currR + 1.0f) * m_detailFactor; - return -std::log1p(currR) * m_detailFactor; // avoid loss of precision - } - else - { - // RESP to W - currR = lookup_table(LOOKUP_W_TO_R, R_table, W_table, currR); - // W to G - //return std::log(currR + 1.0f) * m_detailFactor; - return std::log1p(currR) * m_detailFactor; // avoid loss of precision - } + } // pragma omp single + } // pragma omp parallel } //! \brief calculate divergence of two gradient maps (Gx and Gy) @@ -624,61 +549,32 @@ //! \note \a divG will be used purely as a temporary vector of data, to store //! the result. The only requirement is that \a divG size is bigger or equal //! to \a G size -void calculateAndAddDivergence(const PyramidS& G, float* divG) -{ +void calculateAndAddDivergence(const PyramidS &G, float *divG) { const int ROWS = G.getRows(); const int COLS = G.getCols(); // kx = 0 AND ky = 0; - divG[0] += G[0][0].gX() + G[0][0].gY(); // OUT + divG[0] += G[0][0].gX() + G[0][0].gY(); // OUT float divGx, divGy; - // ky = 0 -#pragma omp parallel for private(divGx, divGy) - for (int kx = 1; kx < COLS; kx++) - { + + for (int kx = 1; kx < COLS; kx++) { divGx = G[0][kx].gX() - G[0][kx - 1].gX(); divGy = G[0][kx].gY(); - divG[kx] += divGx + divGy; // OUT + divG[kx] += divGx + divGy; // OUT } #pragma omp parallel for private(divGx, divGy) - for (int ky = 1; ky < ROWS; ky++) - { + for (int ky = 1; ky < ROWS; ky++) { // kx = 0 divGx = G[ky][0].gX(); divGy = G[ky][0].gY() - G[ky - 1][0].gY(); - divG[ky*COLS] += divGx + divGy; // OUT + divG[ky * COLS] += divGx + divGy; // OUT // kx > 0 - for (int kx = 1; kx < COLS; kx++) - { + for (int kx = 1; kx < COLS; kx++) { divGx = G[ky][kx].gX() - G[ky][kx - 1].gX(); divGy = G[ky][kx].gY() - G[ky - 1][kx].gY(); - divG[kx + ky*COLS] += divGx + divGy; // OUT + divG[kx + ky * COLS] += divGx + divGy; // OUT } } } - -namespace -{ -// static const float GFIXATE = 0.1f; -// static const float EDGE_WEIGHT = 0.01f; -static const float detectT = 0.001f; -static const float a = 0.038737f; -static const float b = 0.537756f; -} - -float calculateScaleFactor(float g) -{ -#if 1 - return 1.0/(a * std::pow( std::max( detectT, - std::fabs( g ) ) - , b) ); -#else - if (std::fabs(G[i]) < GFIXATE) - C[i] = 1.0f / EDGE_WEIGHT; - else - C[i] = 1.0f; -#endif -} - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pyramid.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pyramid.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk06/pyramid.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk06/pyramid.h 2019-06-09 19:18:38.000000000 +0000 @@ -36,94 +36,78 @@ #include "Libpfs/array2d.h" -class XYGradient -{ -public: - XYGradient() - : m_Gx(), m_Gy() {} - - XYGradient(float gx, float gy) - : m_Gx(gx), m_Gy(gy) {} - - XYGradient(float grad) - : m_Gx(grad), m_Gy(grad) {} - - const float& gX() const { return m_Gx; } - float& gX() { return m_Gx; } - - const float& gY() const { return m_Gy; } - float& gY() { return m_Gy; } - - inline - XYGradient& operator*=(float multiplier) - { +class XYGradient { + public: + XYGradient() : m_Gx(), m_Gy() {} + + XYGradient(float gx, float gy) : m_Gx(gx), m_Gy(gy) {} + + XYGradient(float grad) : m_Gx(grad), m_Gy(grad) {} + + const float &gX() const { return m_Gx; } + float &gX() { return m_Gx; } + + const float &gY() const { return m_Gy; } + float &gY() { return m_Gy; } + + inline XYGradient &operator*=(float multiplier) { m_Gx *= multiplier; m_Gy *= multiplier; return *this; } - inline - XYGradient& operator*=(const XYGradient& multiplier) - { + inline XYGradient &operator*=(const XYGradient &multiplier) { m_Gx *= multiplier.m_Gx; m_Gy *= multiplier.m_Gy; return *this; } -private: + private: float m_Gx; float m_Gy; }; -inline -XYGradient operator*(const XYGradient& x, const XYGradient& y) -{ - return XYGradient(x.gX() * y.gX(), - x.gY() * y.gY()); +inline XYGradient operator*(const XYGradient &x, const XYGradient &y) { + return XYGradient(x.gX() * y.gX(), x.gY() * y.gY()); } -typedef ::pfs::Array2D< XYGradient > PyramidS; +typedef ::pfs::Array2D PyramidS; -class PyramidT -{ -public: - typedef std::vector< PyramidS > PyramidContainer; +class PyramidT { + public: + typedef std::vector PyramidContainer; // iterator typedef PyramidContainer::iterator iterator; typedef PyramidContainer::const_iterator const_iterator; - iterator begin() { return m_pyramid.begin(); } - iterator end() { return m_pyramid.end(); } + iterator begin() { return m_pyramid.begin(); } + iterator end() { return m_pyramid.end(); } - const_iterator begin() const { return m_pyramid.begin(); } - const_iterator end() const { return m_pyramid.end(); } + const_iterator begin() const { return m_pyramid.begin(); } + const_iterator end() const { return m_pyramid.end(); } // builds a Pyramid PyramidT(size_t rows, size_t cols); - inline - size_t getRows() const { return m_rows; } - inline - size_t getCols() const { return m_cols; } - inline - size_t getElems() const { return m_rows*m_cols; } + inline size_t getRows() const { return m_rows; } + inline size_t getCols() const { return m_cols; } + inline size_t getElems() const { return m_rows * m_cols; } - inline - size_t numLevels() const { return m_pyramid.size(); } + inline size_t numLevels() const { return m_pyramid.size(); } //! \brief fill all the levels of the pyramid based on the data inside //! the supplied vector (same size of the first level of the \c PyramidT) //! \param[in] data input vector of data - void computeGradients(const pfs::Array2Df& inputData); + void computeGradients(const pfs::Array2Df &inputData); //! \param[out] data input vector of data - void computeSumOfDivergence(pfs::Array2Df& sumOfDivG); + void computeSumOfDivergence(pfs::Array2Df &sumOfDivG); //! \param[out] result PyramidT structure that contains the scaling factors! - void computeScaleFactors(PyramidT& result) const; + void computeScaleFactors(PyramidT &result) const; //! \brief transform every level of the Pyramid in the R space //! \note Please refer to the original paper for the meaning of R and G @@ -134,9 +118,9 @@ void transformToG(float detailFactor); void scale(float multiplier); - void multiply(const PyramidT& multiplier); + void multiply(const PyramidT &multiplier); -private: + private: //! \brief number of rows for the higher level of the pyramid size_t m_rows; //! \brief number of cols for the higher level of the pyramid @@ -148,38 +132,17 @@ // free functions (mostly in the header file to improve testability) //! \brief downsample the image contained in \a inputData and stores the result //! inside \a outputData -void matrixDownsample(size_t inCols, size_t inRows, - const float* inputData, float* outputData); +void matrixDownsample(size_t inCols, size_t inRows, const float *inputData, + float *outputData); //! \brief upsample the image contained in \a inputData and stores the result //! inside \a outputData -void matrixUpsample(size_t outCols, size_t outRows, - const float* inputData, float* outputData); +void matrixUpsample(size_t outCols, size_t outRows, const float *inputData, + float *outputData); //! \brief compute X and Y gradients from \a inputData into \a gradient -void calculateGradients(const float* inputData, PyramidS& gradient); +void calculateGradients(const float *inputData, PyramidS &gradient); // -void calculateAndAddDivergence(const PyramidS& G, float* divG); - -//! \brief compute a scale factor based on the input \a g value -float calculateScaleFactor(float g); - -//! \brief transform gradient \a G to R -struct TransformToR -{ - TransformToR(float detailFactor); - float operator()(float currG) const; -private: - float m_detailFactor; -}; - -//! \brief transform from \a R to G -struct TransformToG -{ - TransformToG(float detailFactor); - float operator()(float currR) const; -private: - float m_detailFactor; -}; +void calculateAndAddDivergence(const PyramidS &G, float *divG); -#endif // MANTIUK06_PYRAMID_H +#endif // MANTIUK06_PYRAMID_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,10 @@ /** * @brief Convex Quadratic Programming library * - * From: + * From: * http://ra.uni-trier.de/~huebner/software.html * - * ---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * 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 2 of the License, or @@ -18,177 +18,163 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * + * ---------------------------------------------------------------------- + * * @author Ewgenij Hübner * * $$ */ -#include +#include #include -#include +#include #include -#include +#include #include "gsl_cqp.h" -gsl_cqpminimizer * -gsl_cqpminimizer_alloc (const gsl_cqpminimizer_type * T, const size_t n, const size_t me, const size_t mi) -{ - int status; - - gsl_cqpminimizer *minimizer = (gsl_cqpminimizer *) malloc (sizeof (gsl_cqpminimizer)); +gsl_cqpminimizer *gsl_cqpminimizer_alloc(const gsl_cqpminimizer_type *T, + const size_t n, const size_t me, + const size_t mi) { + int status; + + gsl_cqpminimizer *minimizer = + (gsl_cqpminimizer *)malloc(sizeof(gsl_cqpminimizer)); + + if (minimizer == 0) { + GSL_ERROR_VAL("failed to allocate space for cqpminimizer", GSL_ENOMEM, + 0); + } + + minimizer->type = T; + + // if(n <= 0) // n is unsigned + if (n == 0) { + free(minimizer); + GSL_ERROR_VAL("the problem dimension n must be greater than 0", + GSL_ENOMEM, 0); + } + + // if(mi <= 0) // mi is unsigned + if (mi == 0) { + free(minimizer); + GSL_ERROR_VAL( + "the number of inequality constrains me must be greater or equal " + "to 1", + GSL_ENOMEM, 0); + } + + minimizer->x = gsl_vector_alloc(n); + if (minimizer->x == 0) { + free(minimizer); + GSL_ERROR_VAL("failed to allocate space for x", GSL_ENOMEM, 0); + } + + if (me != 0) { + minimizer->y = gsl_vector_alloc(me); + if (minimizer->y == 0) { + gsl_vector_free(minimizer->x); + free(minimizer); + GSL_ERROR_VAL( + "failed to allocate space for the Lagrange multiplier y", + GSL_ENOMEM, 0); + } + } else + minimizer->y = 0; + + minimizer->z = gsl_vector_alloc(mi); + if (minimizer->z == 0) { + gsl_vector_free(minimizer->y); + gsl_vector_free(minimizer->x); + free(minimizer); + GSL_ERROR_VAL("failed to allocate space for the Lagrange multiplier z", + GSL_ENOMEM, 0); + } + + minimizer->state = malloc(T->size); + + if (minimizer->state == 0) { + gsl_vector_free(minimizer->x); + free(minimizer); + GSL_ERROR_VAL("failed to allocate space for minimizer state", + GSL_ENOMEM, 0); + } + + status = (T->alloc)(minimizer->state, n, me, mi); + + if (status != GSL_SUCCESS) { + free(minimizer->state); + gsl_vector_free(minimizer->x); + free(minimizer); + GSL_ERROR_VAL("failed to initialize minimizer state", GSL_ENOMEM, 0); + } + + return minimizer; +} + +int gsl_cqpminimizer_set(gsl_cqpminimizer *minimizer, gsl_cqp_data *cqp) { + if (cqp->Q->size1 != cqp->Q->size2) { + GSL_ERROR("matrix Q is not square", GSL_EBADLEN); + } + + if (cqp->q->size != cqp->Q->size1) { + GSL_ERROR("dim(q)!= #rows(Q)", GSL_EBADLEN); + } + + if (cqp->Q->size1 != minimizer->x->size) { + GSL_ERROR("#columns(Q)!=dim(x)", GSL_EBADLEN); + } + + if (cqp->A != 0 && cqp->b != 0 && cqp->A->size1 != 0) { + if (cqp->A->size2 != minimizer->x->size) { + GSL_ERROR("#columns(A) != dim(x)", GSL_EBADLEN); + } + + if (cqp->A->size1 != cqp->b->size) { + GSL_ERROR("#rows(A) != dim(b)", GSL_EBADLEN); + } + + if (cqp->A->size1 != minimizer->y->size) { + GSL_ERROR("#rows(A) != me", GSL_EBADLEN); + } + } + + if (cqp->C->size2 != minimizer->x->size) { + GSL_ERROR("#columns(C) != dim(x)", GSL_EBADLEN); + } + + if (cqp->C->size1 != cqp->d->size) { + GSL_ERROR("#rows(C) != dim(d)", GSL_EBADLEN); + } + + if (cqp->C->size1 != minimizer->z->size) { + GSL_ERROR("#rows(C) != mi", GSL_EBADLEN); + } + + minimizer->cqp = cqp; + + return (minimizer->type->set)( + minimizer->state, minimizer->cqp, minimizer->x, minimizer->y, + minimizer->z, &(minimizer->gap), &(minimizer->residuals_norm), + &(minimizer->data_norm), &(minimizer->quantity_of_infeasibility), + &(minimizer->quantity_of_infeasibility_min)); +} - if (minimizer == 0) - { - GSL_ERROR_VAL ("failed to allocate space for cqpminimizer", GSL_ENOMEM, 0); - } - - minimizer->type = T; - - //if(n <= 0) // n is unsigned - if(n == 0) - { - free (minimizer); - GSL_ERROR_VAL ("the problem dimension n must be greater than 0", GSL_ENOMEM, 0); - } - - //if(mi <= 0) // mi is unsigned - if(mi == 0) - { - free (minimizer); - GSL_ERROR_VAL ("the number of inequality constrains me must be greater or equal to 1", GSL_ENOMEM, 0); - - } - - minimizer->x = gsl_vector_alloc(n); - if (minimizer->x == 0) - { - free (minimizer); - GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); - } - - if( me != 0 ) { - minimizer->y = gsl_vector_alloc(me); - if(minimizer->y ==0) - { - gsl_vector_free(minimizer->x); - free(minimizer); - GSL_ERROR_VAL ("failed to allocate space for the Lagrange multiplier y", GSL_ENOMEM, 0); - } - } else - minimizer->y = 0; - - minimizer->z = gsl_vector_alloc(mi); - if(minimizer->z ==0) - { - gsl_vector_free(minimizer->y); +void gsl_cqpminimizer_free(gsl_cqpminimizer *minimizer) { + (minimizer->type->free)(minimizer->state); gsl_vector_free(minimizer->x); + if (minimizer->y != 0) gsl_vector_free(minimizer->y); + gsl_vector_free(minimizer->z); + free(minimizer->state); free(minimizer); - GSL_ERROR_VAL ("failed to allocate space for the Lagrange multiplier z", GSL_ENOMEM, 0); - } - - minimizer->state = malloc (T->size); - - if (minimizer->state == 0) - { - gsl_vector_free (minimizer->x); - free (minimizer); - GSL_ERROR_VAL ("failed to allocate space for minimizer state", GSL_ENOMEM, 0); - } - - status = (T->alloc) (minimizer->state, n, me, mi); - - if (status != GSL_SUCCESS) - { - free (minimizer->state); - gsl_vector_free (minimizer->x); - free (minimizer); - GSL_ERROR_VAL ("failed to initialize minimizer state", GSL_ENOMEM, 0); - } - - return minimizer; } - -int -gsl_cqpminimizer_set (gsl_cqpminimizer * minimizer, gsl_cqp_data * cqp) -{ - - - if (cqp->Q->size1 != cqp->Q->size2) - { - GSL_ERROR ("matrix Q is not square", GSL_EBADLEN); - } - - if (cqp->q->size != cqp->Q->size1) - { - GSL_ERROR ("dim(q)!= #rows(Q)", GSL_EBADLEN); - } - - if (cqp->Q->size1 != minimizer->x->size) - { - GSL_ERROR ("#columns(Q)!=dim(x)", GSL_EBADLEN); - } - - if(cqp->A != 0 && cqp->b !=0 && cqp->A->size1 !=0) - { - if(cqp->A->size2 != minimizer->x->size) - { - GSL_ERROR ("#columns(A) != dim(x)", GSL_EBADLEN); - } - - if(cqp->A->size1 != cqp->b->size) - { - GSL_ERROR ("#rows(A) != dim(b)", GSL_EBADLEN); - } - - if(cqp->A->size1 != minimizer->y->size) - { - GSL_ERROR ("#rows(A) != me", GSL_EBADLEN); - } - } - - if(cqp->C->size2 != minimizer->x->size) - { - GSL_ERROR ("#columns(C) != dim(x)", GSL_EBADLEN); - } - - if(cqp->C->size1 != cqp->d->size) - { - GSL_ERROR ("#rows(C) != dim(d)", GSL_EBADLEN); - } - - if(cqp->C->size1 != minimizer->z->size) - { - GSL_ERROR ("#rows(C) != mi", GSL_EBADLEN); - } - - - minimizer->cqp = cqp; - - return (minimizer->type->set) (minimizer->state, minimizer->cqp, minimizer->x, minimizer->y, minimizer->z, &(minimizer->gap), - &(minimizer->residuals_norm), &(minimizer->data_norm), &(minimizer->quantity_of_infeasibility), &(minimizer->quantity_of_infeasibility_min)); -} - -void -gsl_cqpminimizer_free (gsl_cqpminimizer * minimizer) -{ - (minimizer->type->free) (minimizer->state); - gsl_vector_free (minimizer->x); - if( minimizer->y != 0 ) - gsl_vector_free (minimizer->y); - gsl_vector_free (minimizer->z); - free(minimizer->state); - free(minimizer); -} - -int -gsl_cqpminimizer_iterate (gsl_cqpminimizer * minimizer) -{ - return (minimizer->type->iterate) (minimizer->state, minimizer->cqp, minimizer->x, minimizer->y, minimizer->z, &(minimizer->gap), - &(minimizer->residuals_norm), &(minimizer->quantity_of_infeasibility), &(minimizer->quantity_of_infeasibility_min)); +int gsl_cqpminimizer_iterate(gsl_cqpminimizer *minimizer) { + return (minimizer->type->iterate)( + minimizer->state, minimizer->cqp, minimizer->x, minimizer->y, + minimizer->z, &(minimizer->gap), &(minimizer->residuals_norm), + &(minimizer->quantity_of_infeasibility), + &(minimizer->quantity_of_infeasibility_min)); } /* @@ -198,86 +184,66 @@ return (minimizer->type->restart) (minimizer->state); } */ -const char * -gsl_cqpminimizer_name (const gsl_cqpminimizer * minimizer) -{ - return minimizer->type->name; +const char *gsl_cqpminimizer_name(const gsl_cqpminimizer *minimizer) { + return minimizer->type->name; } - -gsl_vector * -gsl_cqpminimizer_x (gsl_cqpminimizer * minimizer) -{ - return minimizer->x; +gsl_vector *gsl_cqpminimizer_x(gsl_cqpminimizer *minimizer) { + return minimizer->x; } -gsl_vector * -gsl_cqpminimizer_lm_eq (gsl_cqpminimizer * minimizer) -{ - return minimizer->y; +gsl_vector *gsl_cqpminimizer_lm_eq(gsl_cqpminimizer *minimizer) { + return minimizer->y; } -gsl_vector * -gsl_cqpminimizer_lm_ineq (gsl_cqpminimizer * minimizer) -{ - return minimizer->z; +gsl_vector *gsl_cqpminimizer_lm_ineq(gsl_cqpminimizer *minimizer) { + return minimizer->z; } -double -gsl_cqpminimizer_f (gsl_cqpminimizer * minimizer) -{ - /* the value of the objective at the point x */ - /* f = 0.5*(x^t)Qx+(q^t)x */ - double f; - - gsl_vector * tmp = gsl_vector_alloc(minimizer->x->size); - if(tmp == 0) - { - GSL_ERROR_VAL ("failed to initialize workspace", GSL_ENOMEM, 0); - } - - gsl_blas_dcopy(minimizer->cqp->q, tmp); - - gsl_blas_dsymv(CblasUpper, 0.5, minimizer->cqp->Q, minimizer->x, 1.0, tmp); - - gsl_blas_ddot(minimizer->x, tmp, &f); - - gsl_vector_free(tmp); - - return f; -} +double gsl_cqpminimizer_f(gsl_cqpminimizer *minimizer) { + /* the value of the objective at the point x */ + /* f = 0.5*(x^t)Qx+(q^t)x */ + double f; -double -gsl_cqpminimizer_gap (gsl_cqpminimizer * minimizer) -{ - return minimizer->gap; -} + gsl_vector *tmp = gsl_vector_alloc(minimizer->x->size); + if (tmp == 0) { + GSL_ERROR_VAL("failed to initialize workspace", GSL_ENOMEM, 0); + } -double -gsl_cqpminimizer_residuals_norm (gsl_cqpminimizer *minimizer) -{ - return minimizer->residuals_norm; -} + gsl_blas_dcopy(minimizer->cqp->q, tmp); + gsl_blas_dsymv(CblasUpper, 0.5, minimizer->cqp->Q, minimizer->x, 1.0, tmp); -int -gsl_cqpminimizer_test_convergence(gsl_cqpminimizer * minimizer, double eps_gap, double eps_residuals) -{ - if(minimizer->gap <= eps_gap && minimizer->residuals_norm <= eps_residuals*minimizer->data_norm) - return GSL_SUCCESS; - else - return GSL_CONTINUE; - + gsl_blas_ddot(minimizer->x, tmp, &f); + + gsl_vector_free(tmp); + + return f; } -int -gsl_cqp_minimizer_test_infeasibility(gsl_cqpminimizer * minimizer, double eps_infeasible) -{ +double gsl_cqpminimizer_gap(gsl_cqpminimizer *minimizer) { + return minimizer->gap; +} - if(minimizer->quantity_of_infeasibility > eps_infeasible && - minimizer->quantity_of_infeasibility > pow(10.0, 4) * minimizer->quantity_of_infeasibility_min) - return GSL_SUCCESS; - else - return GSL_CONTINUE; +double gsl_cqpminimizer_residuals_norm(gsl_cqpminimizer *minimizer) { + return minimizer->residuals_norm; } +int gsl_cqpminimizer_test_convergence(gsl_cqpminimizer *minimizer, + double eps_gap, double eps_residuals) { + if (minimizer->gap <= eps_gap && + minimizer->residuals_norm <= eps_residuals * minimizer->data_norm) + return GSL_SUCCESS; + else + return GSL_CONTINUE; +} + +int gsl_cqp_minimizer_test_infeasibility(gsl_cqpminimizer *minimizer, + double eps_infeasible) { + if (minimizer->quantity_of_infeasibility > eps_infeasible && + minimizer->quantity_of_infeasibility > + pow(10.0, 4) * minimizer->quantity_of_infeasibility_min) + return GSL_SUCCESS; + else + return GSL_CONTINUE; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/gsl_cqp.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/gsl_cqp.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/gsl_cqp.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/gsl_cqp.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,8 +28,8 @@ #ifndef GSL_CQP_H #define GSL_CQP_H -#include #include +#include //#ifdef __cplusplus //# define __BEGIN_DECLS extern "C" { @@ -43,44 +43,43 @@ extern "C" { #endif -typedef struct -{ +typedef struct { /* objective function: 0.5*(x^t)Qx+(q^t)x */ - gsl_matrix * Q; - gsl_vector * q; + gsl_matrix *Q; + gsl_vector *q; /* constraints: Ax=b; Cx>=d */ - const gsl_matrix * A; - const gsl_vector * b; - gsl_matrix * C; - gsl_vector * d; -} -gsl_cqp_data; + const gsl_matrix *A; + const gsl_vector *b; + gsl_matrix *C; + gsl_vector *d; +} gsl_cqp_data; -typedef struct -{ +typedef struct { const char *name; size_t size; - int (*alloc) (void *state, size_t n, size_t me, size_t mi); - int (*set) (void *state, const gsl_cqp_data *cqp, gsl_vector *x, gsl_vector *y, gsl_vector *z, - double *gap, double *residuals_norm, double *data_norm, double *inf_barrier, double *inf_barrier_min); - int (*iterate) (void *state, const gsl_cqp_data * cqp, gsl_vector *x, gsl_vector *y, gsl_vector *z, - double *gap, double *residuals_norm, double *inf_barrier, double *inf_barrier_min); + int (*alloc)(void *state, size_t n, size_t me, size_t mi); + int (*set)(void *state, const gsl_cqp_data *cqp, gsl_vector *x, + gsl_vector *y, gsl_vector *z, double *gap, + double *residuals_norm, double *data_norm, double *inf_barrier, + double *inf_barrier_min); + int (*iterate)(void *state, const gsl_cqp_data *cqp, gsl_vector *x, + gsl_vector *y, gsl_vector *z, double *gap, + double *residuals_norm, double *inf_barrier, + double *inf_barrier_min); /* int (*restart) (void *state); */ - void (*free) (void *state); -} -gsl_cqpminimizer_type; - -typedef struct -{ - const gsl_cqpminimizer_type * type; + void (*free)(void *state); +} gsl_cqpminimizer_type; - gsl_cqp_data * cqp; - gsl_vector * x; +typedef struct { + const gsl_cqpminimizer_type *type; + + gsl_cqp_data *cqp; + gsl_vector *x; /* Lagrange-multipliers */ - gsl_vector * y; /*corresponding to Ax=b */ - gsl_vector * z; /*corresponding to CX>=d */ + gsl_vector *y; /*corresponding to Ax=b */ + gsl_vector *z; /*corresponding to CX>=d */ double gap; double residuals_norm; @@ -89,58 +88,46 @@ double quantity_of_infeasibility_min; void *state; -} -gsl_cqpminimizer; +} gsl_cqpminimizer; -gsl_cqpminimizer * -gsl_cqpminimizer_alloc(const gsl_cqpminimizer_type *T, size_t n, size_t me, size_t mi); +gsl_cqpminimizer *gsl_cqpminimizer_alloc(const gsl_cqpminimizer_type *T, + size_t n, size_t me, size_t mi); /* int gsl_cqpminimizer_set (gsl_cqpminimizer * minimizer, gsl_cqp_problem * cqp); */ -int -gsl_cqpminimizer_set (gsl_cqpminimizer * minimizer, gsl_cqp_data * cqp); +int gsl_cqpminimizer_set(gsl_cqpminimizer *minimizer, gsl_cqp_data *cqp); -void -gsl_cqpminimizer_free(gsl_cqpminimizer *minimizer); +void gsl_cqpminimizer_free(gsl_cqpminimizer *minimizer); -const char * -gsl_cqpminimizer_name (const gsl_cqpminimizer * minimizer); +const char *gsl_cqpminimizer_name(const gsl_cqpminimizer *minimizer); -int -gsl_cqpminimizer_iterate(gsl_cqpminimizer *minimizer); +int gsl_cqpminimizer_iterate(gsl_cqpminimizer *minimizer); /* int gsl_cqpminimizer_restart(gsl_cqpminimizer *minimizer); */ -gsl_vector * -gsl_cqpminimizer_x (gsl_cqpminimizer * minimizer); +gsl_vector *gsl_cqpminimizer_x(gsl_cqpminimizer *minimizer); -gsl_vector * -gsl_cqpminimizer_lm_eq (gsl_cqpminimizer * minimizer); +gsl_vector *gsl_cqpminimizer_lm_eq(gsl_cqpminimizer *minimizer); -gsl_vector * -gsl_cqpminimizer_lm_ineq (gsl_cqpminimizer * minimizer); +gsl_vector *gsl_cqpminimizer_lm_ineq(gsl_cqpminimizer *minimizer); -double -gsl_cqpminimizer_f (gsl_cqpminimizer * minimizer); +double gsl_cqpminimizer_f(gsl_cqpminimizer *minimizer); -double -gsl_cqpminimizer_gap (gsl_cqpminimizer *minimizer); +double gsl_cqpminimizer_gap(gsl_cqpminimizer *minimizer); -double -gsl_cqpminimizer_residuals_norm (gsl_cqpminimizer *minimizer); +double gsl_cqpminimizer_residuals_norm(gsl_cqpminimizer *minimizer); -int -gsl_cqpminimizer_test_convergence(gsl_cqpminimizer * minimizer, double eps_gap, double eps_residual); +int gsl_cqpminimizer_test_convergence(gsl_cqpminimizer *minimizer, + double eps_gap, double eps_residual); -int -gsl_cqp_minimizer_test_infeasibility(gsl_cqpminimizer * minimizer, double eps_infeasible); +int gsl_cqp_minimizer_test_infeasibility(gsl_cqpminimizer *minimizer, + double eps_infeasible); -double -gsl_cqpminimizer_minimum (gsl_cqpminimizer * minimizer); +double gsl_cqpminimizer_minimum(gsl_cqpminimizer *minimizer); GSL_VAR const gsl_cqpminimizer_type *gsl_cqpminimizer_mg_pdip; /*GSL_VAR const gsl_cqpminimizer_type *gsl_cqpminimizer_pdip_mpc_eqc;*/ diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/initial_point.c luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.c --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/initial_point.c 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.c 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,10 @@ /** * @brief Convex Quadratic Programming library * - * From: + * From: * http://ra.uni-trier.de/~huebner/software.html * - * ---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * 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 2 of the License, or @@ -18,8 +18,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * + * ---------------------------------------------------------------------- + * * @author Ewgenij Hübner * * $$ @@ -28,194 +28,180 @@ #include #include #include - + #include "initial_point.h" -int -pdip_initial_point_feasible_x(const gsl_matrix *A, const gsl_vector *b, gsl_vector *x) -{ +int pdip_initial_point_feasible_x(const gsl_matrix *A, const gsl_vector *b, + gsl_vector *x) { int signum; - - /* x = A^t*(AA^t)^{-1}*b */ - - gsl_matrix * AA_t; - gsl_vector * tmp; - gsl_permutation * p; - - AA_t = gsl_matrix_calloc(A->size1, A->size1); - if(AA_t == 0) - { - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - tmp = gsl_vector_alloc(A->size1); - if(tmp == 0) - { - gsl_matrix_free(AA_t); - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - p = gsl_permutation_alloc(A->size1); - if(p == 0) - { - gsl_vector_free(tmp); - gsl_matrix_free(AA_t); - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - - /* status = gsl_blas_dsyrk(CblasUpper, CblasNoTrans, 1.0, cqp->A, 0.0, AA_t); */ - gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, A, A, 0.0, AA_t); - - - /* (AA^t)tmp=b */ - gsl_linalg_LU_decomp(AA_t, p, &signum); - gsl_linalg_LU_solve(AA_t, p, b, tmp); - - - /* - gsl_blas_dtrsv(CblasUpper, CblasNoTrans, CblasNonUnit, AA_t, tmp); tmp=(AA^t)^{-1}tmp */ - - gsl_blas_dgemv(CblasTrans, 1.0, A, tmp, 0.0, x); - - gsl_matrix_free(AA_t); - gsl_vector_free(tmp); - gsl_permutation_free(p); - - return GSL_SUCCESS; - + + /* x = A^t*(AA^t)^{-1}*b */ + + gsl_matrix *AA_t; + gsl_vector *tmp; + gsl_permutation *p; + + AA_t = gsl_matrix_calloc(A->size1, A->size1); + if (AA_t == 0) { + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + tmp = gsl_vector_alloc(A->size1); + if (tmp == 0) { + gsl_matrix_free(AA_t); + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + p = gsl_permutation_alloc(A->size1); + if (p == 0) { + gsl_vector_free(tmp); + gsl_matrix_free(AA_t); + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + /* status = gsl_blas_dsyrk(CblasUpper, CblasNoTrans, 1.0, cqp->A, 0.0, + * AA_t); */ + gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, A, A, 0.0, AA_t); + + /* (AA^t)tmp=b */ + gsl_linalg_LU_decomp(AA_t, p, &signum); + gsl_linalg_LU_solve(AA_t, p, b, tmp); + + /* + gsl_blas_dtrsv(CblasUpper, CblasNoTrans, CblasNonUnit, AA_t, tmp); + tmp=(AA^t)^{-1}tmp */ + + gsl_blas_dgemv(CblasTrans, 1.0, A, tmp, 0.0, x); + + gsl_matrix_free(AA_t); + gsl_vector_free(tmp); + gsl_permutation_free(p); + + return GSL_SUCCESS; } -int -pdip_initial_point_feasible_s(const gsl_matrix * C, const gsl_vector *d, const gsl_vector *x, gsl_vector *s) -{ - /* s=Cx-d */ +int pdip_initial_point_feasible_s(const gsl_matrix *C, const gsl_vector *d, + const gsl_vector *x, gsl_vector *s) { + /* s=Cx-d */ - gsl_blas_dcopy(d, s); + gsl_blas_dcopy(d, s); - gsl_blas_dgemv(CblasNoTrans, 1.0, C, x, -1.0, s); + gsl_blas_dgemv(CblasNoTrans, 1.0, C, x, -1.0, s); - return GSL_SUCCESS; + return GSL_SUCCESS; } +int pdip_initial_point_y(const gsl_matrix *Q, const gsl_vector *q, + const gsl_matrix *A, const gsl_vector *x, + gsl_vector *y) { + int signum; + + /* y=(AA^t)^{-1}(A(Qx+q)) */ -int -pdip_initial_point_y(const gsl_matrix *Q, const gsl_vector *q, const gsl_matrix *A, const gsl_vector *x, gsl_vector *y) -{ - int signum; - - /* y=(AA^t)^{-1}(A(Qx+q)) */ - - gsl_matrix * AA_t; - gsl_vector * tmp; - gsl_permutation * p; - - AA_t = gsl_matrix_calloc(A->size1, A->size1); - if(AA_t == 0) - { - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - tmp = gsl_vector_alloc(q->size); - if(tmp == 0) - { - gsl_matrix_free(AA_t); - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - p = gsl_permutation_alloc(AA_t->size1); - if(p == 0) - { - gsl_vector_free(tmp); - gsl_matrix_free(AA_t); - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - gsl_blas_dcopy(q, tmp); - gsl_blas_dsymv(CblasUpper, 1.0, Q, x, 1.0, tmp); - gsl_blas_dgemv(CblasNoTrans, 1.0, A, tmp, 0.0, y); - - /* gsl_blas_dsyrk(CblasUpper, CblasNoTrans, 1.0, cqp->A, 0.0, AA_t); */ - - gsl_vector_free(tmp); - tmp = gsl_vector_alloc(y->size); - if(tmp == 0) - { - gsl_permutation_free(p); - gsl_matrix_free(AA_t); - GSL_ERROR_VAL ("failed to initialize space for finding initial point", GSL_ENOMEM, 0); - } - - gsl_blas_dcopy(y, tmp); - - gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, A, A, 0.0, AA_t); - - gsl_linalg_LU_decomp(AA_t, p, &signum); - gsl_linalg_LU_solve(AA_t, p, tmp, y); - - - /* gsl_blas_dtrsv(CblasUpper, CblasNoTrans, CblasNonUnit, AA_t, y); */ - - gsl_matrix_free(AA_t); - gsl_vector_free(tmp); - gsl_permutation_free(p); + gsl_matrix *AA_t; + gsl_vector *tmp; + gsl_permutation *p; + + AA_t = gsl_matrix_calloc(A->size1, A->size1); + if (AA_t == 0) { + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + tmp = gsl_vector_alloc(q->size); + if (tmp == 0) { + gsl_matrix_free(AA_t); + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + p = gsl_permutation_alloc(AA_t->size1); + if (p == 0) { + gsl_vector_free(tmp); + gsl_matrix_free(AA_t); + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + gsl_blas_dcopy(q, tmp); + gsl_blas_dsymv(CblasUpper, 1.0, Q, x, 1.0, tmp); + gsl_blas_dgemv(CblasNoTrans, 1.0, A, tmp, 0.0, y); + + /* gsl_blas_dsyrk(CblasUpper, CblasNoTrans, 1.0, cqp->A, 0.0, AA_t); */ + + gsl_vector_free(tmp); + tmp = gsl_vector_alloc(y->size); + if (tmp == 0) { + gsl_permutation_free(p); + gsl_matrix_free(AA_t); + GSL_ERROR_VAL("failed to initialize space for finding initial point", + GSL_ENOMEM, 0); + } + + gsl_blas_dcopy(y, tmp); + + gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, A, A, 0.0, AA_t); + + gsl_linalg_LU_decomp(AA_t, p, &signum); + gsl_linalg_LU_solve(AA_t, p, tmp, y); + + /* gsl_blas_dtrsv(CblasUpper, CblasNoTrans, CblasNonUnit, AA_t, y); */ + + gsl_matrix_free(AA_t); + gsl_vector_free(tmp); + gsl_permutation_free(p); - return GSL_SUCCESS; - + return GSL_SUCCESS; } -int -pdip_initial_point_z(gsl_vector *z) -{ - double delta_z = 0.1; +int pdip_initial_point_z(gsl_vector *z) { + double delta_z = 0.1; - gsl_vector_set_all(z, delta_z); + gsl_vector_set_all(z, delta_z); - return GSL_SUCCESS; + return GSL_SUCCESS; } -int -pdip_initial_point_strict_feasible(gsl_vector *x, gsl_vector *s) -{ - double delta_x, delta_s, xs=0.0, sum_x=0.0, sum_s=0.0, tmp, rg=1e-10; - - size_t i; - - //int status; - - delta_x = GSL_MAX_DBL(-1.5*gsl_vector_min(x),0.0); - delta_s = GSL_MAX_DBL(-1.5*gsl_vector_min(s),0.0); - - - if(delta_x < rg && delta_s < rg) - { - //status = gsl_blas_ddot(x, s, &tmp); - gsl_blas_ddot(x, s, &tmp); - - if(tmp < rg) /* the initial point is optimal */ - return GSL_SUCCESS; - - } - - for(i=0; isize; i++) - { - xs += (gsl_vector_get(x,i)+delta_x)*(gsl_vector_get(s,i)+delta_s); - - sum_x += gsl_vector_get(x,i); - sum_s += gsl_vector_get(s,i); - } - - sum_x += delta_x*(x->size); - sum_s += delta_s*(s->size); - - delta_x += 0.5*xs/sum_s; - delta_s += 0.5*xs/sum_x; - - //status = gsl_vector_add_constant(x, delta_x); - //status = gsl_vector_add_constant(s, delta_s); - gsl_vector_add_constant(x, delta_x); - gsl_vector_add_constant(s, delta_s); - - - return GSL_SUCCESS; +int pdip_initial_point_strict_feasible(gsl_vector *x, gsl_vector *s) { + double delta_x, delta_s, xs = 0.0, sum_x = 0.0, sum_s = 0.0, tmp, + rg = 1e-10; + + size_t i; + + // int status; + + delta_x = GSL_MAX_DBL(-1.5 * gsl_vector_min(x), 0.0); + delta_s = GSL_MAX_DBL(-1.5 * gsl_vector_min(s), 0.0); + + if (delta_x < rg && delta_s < rg) { + // status = gsl_blas_ddot(x, s, &tmp); + gsl_blas_ddot(x, s, &tmp); + + if (tmp < rg) /* the initial point is optimal */ + return GSL_SUCCESS; + } + + for (i = 0; i < x->size; i++) { + xs += + (gsl_vector_get(x, i) + delta_x) * (gsl_vector_get(s, i) + delta_s); + + sum_x += gsl_vector_get(x, i); + sum_s += gsl_vector_get(s, i); + } + + sum_x += delta_x * (x->size); + sum_s += delta_s * (s->size); + + delta_x += 0.5 * xs / sum_s; + delta_s += 0.5 * xs / sum_x; + + // status = gsl_vector_add_constant(x, delta_x); + // status = gsl_vector_add_constant(s, delta_s); + gsl_vector_add_constant(x, delta_x); + gsl_vector_add_constant(s, delta_s); + + return GSL_SUCCESS; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/initial_point.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/initial_point.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,24 +25,34 @@ * $$ */ +#ifndef MANTIUK08_CQP_H +#define MANTIUK08_CQP_H + #ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#include #else -# define __BEGIN_DECLS /* empty */ -# define __END_DECLS /* empty */ +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ #endif __BEGIN_DECLS -int pdip_initial_point_feasible_x(const gsl_matrix * A, const gsl_vector *b, gsl_vector *x); +int pdip_initial_point_feasible_x(const gsl_matrix *A, const gsl_vector *b, + gsl_vector *x); -int pdip_initial_point_feasible_s(const gsl_matrix * C, const gsl_vector *d, const gsl_vector *x, gsl_vector *s); +int pdip_initial_point_feasible_s(const gsl_matrix *C, const gsl_vector *d, + const gsl_vector *x, gsl_vector *s); -int pdip_initial_point_y(const gsl_matrix *Q, const gsl_vector *q, const gsl_matrix *A, const gsl_vector *x, gsl_vector *y); +int pdip_initial_point_y(const gsl_matrix *Q, const gsl_vector *q, + const gsl_matrix *A, const gsl_vector *x, + gsl_vector *y); int pdip_initial_point_z(gsl_vector *z); int pdip_initial_point_strict_feasible(gsl_vector *x, gsl_vector *s); __END_DECLS + +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c 2019-06-09 19:18:38.000000000 +0000 @@ -1,10 +1,10 @@ /** * @brief Convex Quadratic Programming library * - * From: + * From: * http://ra.uni-trier.de/~huebner/software.html * - * ---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * 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 2 of the License, or @@ -18,505 +18,509 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * + * ---------------------------------------------------------------------- + * * @author Ewgenij Hübner * * $$ */ +#include +#include #include -#include #include -#include #include -#include +#include #include "gsl_cqp.h" #include "initial_point.h" /* static void -print_vectors(const gsl_vector*,const gsl_vector*,const gsl_vector*,const gsl_vector*); +print_vectors(const gsl_vector*,const gsl_vector*,const gsl_vector*,const +gsl_vector*); */ -static double -compute_gap_infeasible_points(const gsl_cqp_data * cqp, const gsl_vector *x, const gsl_vector *y, const gsl_vector *z); +static double compute_gap_infeasible_points(const gsl_cqp_data *cqp, + const gsl_vector *x, + const gsl_vector *y, + const gsl_vector *z); +static int compute_residuals(const gsl_cqp_data *cqp, const gsl_vector *x, + const gsl_vector *y, const gsl_vector *z, + const gsl_vector *s, gsl_vector *r); -static int -compute_residuals(const gsl_cqp_data * cqp, const gsl_vector *x, const gsl_vector *y, const gsl_vector *z, const gsl_vector *s, - gsl_vector *r); +static int build_kkt_matrix(const gsl_cqp_data *cqp, const gsl_vector *z, + const gsl_vector *s, gsl_matrix *kkt_matrix); -static int -build_kkt_matrix(const gsl_cqp_data * cqp, const gsl_vector *z, const gsl_vector *s, gsl_matrix *kkt_matrix); +double step_length(const gsl_vector *s, const gsl_vector *z, + const gsl_vector *delta_s, const gsl_vector *delta_z); -double -step_length(const gsl_vector *s, const gsl_vector *z, const gsl_vector *delta_s, const gsl_vector *delta_z); +double gsl_vector_max_norm(const gsl_vector *v); -double -gsl_vector_max_norm(const gsl_vector *v); +double gsl_matrix_max_norm(const gsl_matrix *M); -double -gsl_matrix_max_norm(const gsl_matrix *M); +typedef struct { + size_t n; /* dimension of the problem*/ + size_t me; /* number of the equality constraints*/ + size_t mi; /* number of the inequality constraints */ + gsl_vector *s; /* Slack vector for the constrain: Cx+s = d */ -typedef struct -{ - - size_t n; /* dimension of the problem*/ - size_t me; /* number of the equality constraints*/ - size_t mi; /* number of the inequality constraints */ - gsl_vector *s; /* Slack vector for the constrain: Cx+s = d */ - - gsl_matrix *kkt_matrix; - gsl_vector *r; /* the vector of the right-hand side in the kkt-system: r=(r_Q,r_A,r_C) */ - - double tau; /* a constant for the Mehrotra's heuristic */ - - /* gondzio's parameters */ - size_t k_max; /*maximal number of corrections */ - double beta_min, beta_max; /* relatibe threhold values for outlier compl. products */ - double delta_alpha; /* the required increas of stepsize */ - double gamma; /* the minimum acceptable increase of stepsize */ + gsl_matrix *kkt_matrix; + gsl_vector *r; /* the vector of the right-hand side in the kkt-system: + r=(r_Q,r_A,r_C) */ - double data_norm; /* norm of the problem data */ - -} -mg_pdip_state; + double tau; /* a constant for the Mehrotra's heuristic */ -static int -mg_pdip_alloc (void *vstate, size_t n, size_t me, size_t mi) -{ - mg_pdip_state * state = (mg_pdip_state *) vstate; - - state->s = gsl_vector_alloc(mi); - if(state->s == 0) - { - GSL_ERROR_VAL ("failed to initialize space for the slack vector s", GSL_ENOMEM, 0); - } - - state->kkt_matrix = gsl_matrix_calloc(n+me+mi, n+me+mi); - if(state->kkt_matrix == 0) - { - gsl_vector_free(state->s); - GSL_ERROR_VAL ("failed to initialize space for the KKT-Matrix", GSL_ENOMEM, 0); - } - - state->r = gsl_vector_alloc(state->kkt_matrix->size1); - if(state->r == 0) - { - gsl_matrix_free(state->kkt_matrix); - gsl_vector_free(state->s); - GSL_ERROR_VAL ("failed to initialize space for right-hand side of the KKT-System", GSL_ENOMEM, 0); - } - - return GSL_SUCCESS; + /* gondzio's parameters */ + size_t k_max; /*maximal number of corrections */ + double beta_min, + beta_max; /* relatibe threhold values for outlier compl. products */ + double delta_alpha; /* the required increas of stepsize */ + double gamma; /* the minimum acceptable increase of stepsize */ + + double data_norm; /* norm of the problem data */ + +} mg_pdip_state; + +static int mg_pdip_alloc(void *vstate, size_t n, size_t me, size_t mi) { + mg_pdip_state *state = (mg_pdip_state *)vstate; + + state->s = gsl_vector_alloc(mi); + if (state->s == 0) { + GSL_ERROR_VAL("failed to initialize space for the slack vector s", + GSL_ENOMEM, 0); + } + + state->kkt_matrix = gsl_matrix_calloc(n + me + mi, n + me + mi); + if (state->kkt_matrix == 0) { + gsl_vector_free(state->s); + GSL_ERROR_VAL("failed to initialize space for the KKT-Matrix", + GSL_ENOMEM, 0); + } + + state->r = gsl_vector_alloc(state->kkt_matrix->size1); + if (state->r == 0) { + gsl_matrix_free(state->kkt_matrix); + gsl_vector_free(state->s); + GSL_ERROR_VAL( + "failed to initialize space for right-hand side of the KKT-System", + GSL_ENOMEM, 0); + } + + return GSL_SUCCESS; } -static int -mg_pdip_set (void *vstate, const gsl_cqp_data *cqp, gsl_vector *x, gsl_vector *y, gsl_vector *z, - double *gap, double *residuals_norm, double *data_norm, double *infeasibility, double *infeasibility_min) -{ +static int mg_pdip_set(void *vstate, const gsl_cqp_data *cqp, gsl_vector *x, + gsl_vector *y, gsl_vector *z, double *gap, + double *residuals_norm, double *data_norm, + double *infeasibility, double *infeasibility_min) { int status = GSL_SUCCESS; - //size_t i, j = 0; //, debug=0; - - mg_pdip_state *state = (mg_pdip_state *) vstate; - - /* Initial points */ - if( cqp->A->size1 != 0 ) - status = pdip_initial_point_feasible_x(cqp->A, cqp->b, x); + // size_t i, j = 0; //, debug=0; + + mg_pdip_state *state = (mg_pdip_state *)vstate; + + /* Initial points */ + if (cqp->A->size1 != 0) + status = pdip_initial_point_feasible_x(cqp->A, cqp->b, x); else - gsl_vector_set_zero(x); + gsl_vector_set_zero(x); - if (status != GSL_SUCCESS) - { + if (status != GSL_SUCCESS) { return status; } - status = pdip_initial_point_feasible_s(cqp->C, cqp->d, x, state->s); - if (status != GSL_SUCCESS) - { + status = pdip_initial_point_feasible_s(cqp->C, cqp->d, x, state->s); + if (status != GSL_SUCCESS) { return status; } - if( cqp->A->size1 != 0 ) - { + if (cqp->A->size1 != 0) { status = pdip_initial_point_y(cqp->Q, cqp->q, cqp->A, x, y); } - status = pdip_initial_point_z(z); - if (status != GSL_SUCCESS) - { + status = pdip_initial_point_z(z); + if (status != GSL_SUCCESS) { return status; } - status = pdip_initial_point_strict_feasible(z, state->s); - if (status != GSL_SUCCESS) - { + status = pdip_initial_point_strict_feasible(z, state->s); + if (status != GSL_SUCCESS) { return status; } - /* Dualtity gap */ - status = gsl_blas_ddot(z, state->s, gap); - if (status != GSL_SUCCESS) - { + /* Dualtity gap */ + status = gsl_blas_ddot(z, state->s, gap); + if (status != GSL_SUCCESS) { return status; } - *gap /= (double) cqp->C->size1; + *gap /= (double)cqp->C->size1; - status = build_kkt_matrix(cqp, z, state->s, state->kkt_matrix); - if (status != GSL_SUCCESS) - { + status = build_kkt_matrix(cqp, z, state->s, state->kkt_matrix); + if (status != GSL_SUCCESS) { return status; } - state->tau = 3.0; + state->tau = 3.0; - /* for the convergence conditions */ - /* data_norm = ||Q,A,C,q,b,d||_{infinity} */ - *data_norm = gsl_matrix_max_norm(cqp->Q); + /* for the convergence conditions */ + /* data_norm = ||Q,A,C,q,b,d||_{infinity} */ + *data_norm = gsl_matrix_max_norm(cqp->Q); - if( cqp->A->size1 != 0 ) - { + if (cqp->A->size1 != 0) { *data_norm = GSL_MAX_DBL(*data_norm, gsl_matrix_max_norm(cqp->A)); } - - *data_norm = GSL_MAX_DBL(*data_norm, gsl_matrix_max_norm(cqp->C)); - - *data_norm = GSL_MAX_DBL(*data_norm, gsl_vector_max_norm(cqp->q)); - - if( cqp->A->size1 != 0 ) - { + + *data_norm = GSL_MAX_DBL(*data_norm, gsl_matrix_max_norm(cqp->C)); + + *data_norm = GSL_MAX_DBL(*data_norm, gsl_vector_max_norm(cqp->q)); + + if (cqp->A->size1 != 0) { *data_norm = GSL_MAX_DBL(*data_norm, gsl_vector_max_norm(cqp->b)); } - - *data_norm = GSL_MAX_DBL(*data_norm, gsl_vector_max_norm(cqp->d)); - state->data_norm = *data_norm; - - /* ||r||_{infinity}=||r_Q, r_A, r_C||_{infinity} */ - status = compute_residuals(cqp, x, y, z, state->s, state->r); - *residuals_norm = gsl_vector_max_norm(state->r); - - *infeasibility = (*residuals_norm+compute_gap_infeasible_points(cqp, x, y, z))/(state->data_norm); - *infeasibility_min = *infeasibility; - - /* Gondzio's paameters */ - state->k_max = 0; - state->beta_min = 0.1; - state->beta_max = 10.0; - state->delta_alpha = 0.1; - state->gamma = 0.1; - -// if(debug) -// { -// printf("\nStart points:\n"); -// print_vectors(x, y, z, state->s); -// printf("\nDuality gap: %e\n",*gap); -// -// printf("\nKKT-matrix:\n"); -// for(i=0; ikkt_matrix->size1; i++) -// { -// for(j=0; jkkt_matrix->size2; j++) -// printf("%4.2f ",gsl_matrix_get(state->kkt_matrix,i,j)); -// printf("\n"); -// } -// printf("\n"); -// } - + *data_norm = GSL_MAX_DBL(*data_norm, gsl_vector_max_norm(cqp->d)); + + state->data_norm = *data_norm; + + /* ||r||_{infinity}=||r_Q, r_A, r_C||_{infinity} */ + status = compute_residuals(cqp, x, y, z, state->s, state->r); + *residuals_norm = gsl_vector_max_norm(state->r); + + *infeasibility = + (*residuals_norm + compute_gap_infeasible_points(cqp, x, y, z)) / + (state->data_norm); + *infeasibility_min = *infeasibility; + + /* Gondzio's paameters */ + state->k_max = 0; + state->beta_min = 0.1; + state->beta_max = 10.0; + state->delta_alpha = 0.1; + state->gamma = 0.1; + + // if(debug) + // { + // printf("\nStart points:\n"); + // print_vectors(x, y, z, state->s); + // printf("\nDuality gap: %e\n",*gap); + // + // printf("\nKKT-matrix:\n"); + // for(i=0; ikkt_matrix->size1; i++) + // { + // for(j=0; jkkt_matrix->size2; j++) + // printf("%4.2f + //",gsl_matrix_get(state->kkt_matrix,i,j)); + // printf("\n"); + // } + // printf("\n"); + // } + return GSL_SUCCESS; } +static int mg_pdip_iterate(void *vstate, const gsl_cqp_data *cqp, gsl_vector *x, + gsl_vector *y, gsl_vector *z, double *gap, + double *residuals_norm, double *infeasibility, + double *infeasibility_min) { + size_t i, j = 0; //, debug=0; + int signum; + double sigma, alpha, alpha_gondzio; + double tmp_v, tmp_vt, tmp_d; + + gsl_vector_view r_block, delta_block; + + mg_pdip_state *state = (mg_pdip_state *)vstate; + + gsl_permutation *p; + + gsl_vector *delta; + gsl_vector *delta_s; + + gsl_vector *r_zs; + + gsl_vector *delta_gondzio; + gsl_vector *delta_s_gondzio; + + p = gsl_permutation_alloc(state->kkt_matrix->size1); + if (p == 0) { + GSL_ERROR_VAL("failed to initialize space for permutation vector", + GSL_ENOMEM, 0); + } + + delta = gsl_vector_alloc(state->kkt_matrix->size2); + if (delta == 0) { + gsl_permutation_free(p); + GSL_ERROR_VAL("failed to initialize space for predictor step", + GSL_ENOMEM, 0); + } + delta_gondzio = gsl_vector_alloc(state->kkt_matrix->size2); + if (delta_gondzio == 0) { + gsl_vector_free(delta); + gsl_permutation_free(p); + GSL_ERROR_VAL("failed to initialize space for predictor step", + GSL_ENOMEM, 0); + } + + delta_s_gondzio = gsl_vector_alloc(z->size); + if (delta_s_gondzio == 0) { + gsl_vector_free(delta_gondzio); + gsl_vector_free(delta); + gsl_permutation_free(p); + GSL_ERROR_VAL("failed to initialize space for LM s", GSL_ENOMEM, 0); + } + + delta_s = gsl_vector_alloc(z->size); + if (delta_s == 0) { + gsl_vector_free(delta_s_gondzio); + gsl_vector_free(delta_gondzio); + gsl_vector_free(delta); + gsl_permutation_free(p); + GSL_ERROR_VAL("failed to initialize space for LM s", GSL_ENOMEM, 0); + } + + r_zs = gsl_vector_alloc(z->size); + if (r_zs == 0) { + gsl_vector_free(delta_s); + gsl_vector_free(delta_s_gondzio); + gsl_vector_free(delta_gondzio); + gsl_vector_free(delta); + gsl_permutation_free(p); + GSL_ERROR_VAL("failed to initialize space for LM s", GSL_ENOMEM, 0); + } + + /* the right-hand side of the KKT-system: r = -(r_Q, r_A, r_C+Z^{-1}*r_zs) + */ + /* the vecors of variables: delta = (delta_x, -delta_y, -delta_z) */ + /* delta_s for the slack variable s: delta_s = Z^{-1}(-r_zs - S*delta_z) */ + + /********* Predictor Step ******************/ + /* in the predictor step: r_zs = ZSe */ + r_block = gsl_vector_subvector(state->r, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + gsl_blas_daxpy(1.0, state->s, &r_block.vector); + gsl_blas_dscal(-1.0, state->r); + + /* solve the KKT-system: */ + /* evaluate the LU-decomposition of the KKT-matrix*/ + gsl_linalg_LU_decomp(state->kkt_matrix, p, &signum); + /* find the predictor step */ + gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta); + + for (i = 0; i < delta_s->size; i++) { + /* find delta_s for the slack variable s: delta_s = Z^{-1}(-r_zs - + * S*delta_z) */ + gsl_vector_set( + delta_s, i, + gsl_vector_get(state->s, i) * + (gsl_vector_get(delta, cqp->Q->size2 + cqp->A->size1 + i) / + gsl_vector_get(z, i) - + 1.0)); + } + + /* find the stepsize of the predictor step */ + delta_block = gsl_vector_subvector(delta, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + alpha = step_length(state->s, z, delta_s, &delta_block.vector); + + // if(debug) + // { + // printf("\n *** Predictor Step ***\n"); + // printf("\nthe right-hand side of the KKT-system:\n"); + // for(i=0; ir->size; i++) + // printf("r[%lu]=%f ",i,gsl_vector_get(state->r,i)); + // printf("\n"); + // printf("\nsolution (delta_x,-delta_y,-delta_z):\n"); + // for(i=0; isize; i++) + // printf("%6.3f ",gsl_vector_get(delta,i)); + // printf("\n"); + // printf("\ndelta_s\n"); + // for(i=0; isize; i++) + // printf("%6.3f ",gsl_vector_get(delta_s,i)); + // printf("\n"); + // printf("the stepsize for the predictor step=%f\n",alpha); + // } + + /************ Evaluation of the centering parameter sigma ***************/ + /* sigma = (gap_aff/gap)^tau */ + sigma = 0.0; + for (i = 0; i < z->size; i++) { + sigma += + (gsl_vector_get(z, i) - + alpha * gsl_vector_get(delta, cqp->Q->size2 + cqp->A->size1 + i)) * + (gsl_vector_get(state->s, i) + alpha * gsl_vector_get(delta_s, i)); + } + sigma /= (cqp->C->size1 * (*gap)); + sigma = pow(sigma, state->tau); + + // if(debug) + // printf("the centering parameter sigma =%f\n",sigma); + + /************ Corrector Step ******************/ + + /* modify the right-hand side of the kkt-system in oder to find the + * Mehrotra's corrector step */ + + r_block = gsl_vector_subvector(state->r, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + for (i = 0; i < cqp->C->size1; i++) { + tmp_d = -sigma * (*gap) - + gsl_vector_get(delta, cqp->Q->size2 + cqp->A->size1 + i) * + gsl_vector_get(delta_s, i); + gsl_vector_set( + r_zs, i, + gsl_vector_get(z, i) * gsl_vector_get(state->s, i) + tmp_d); + gsl_vector_set( + &r_block.vector, i, + gsl_vector_get(&r_block.vector, i) - tmp_d / gsl_vector_get(z, i)); + } + + /* find the corrector step */ + gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta); + + for (i = 0; i < delta_s->size; i++) { + /* delta_s = Z^{-1}*(-r_zs-S*delta_z) */ + gsl_vector_set( + delta_s, i, + (-gsl_vector_get(r_zs, i) + + gsl_vector_get(delta, cqp->Q->size2 + cqp->A->size1 + i) * + gsl_vector_get(state->s, i)) / + gsl_vector_get(z, i)); + } + + /* evaluate the stepsize */ + delta_block = gsl_vector_subvector(delta, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + alpha = step_length(state->s, z, delta_s, &delta_block.vector); + + // if(debug) + // { + // printf("\n *** Corrector Step ***\n"); + // printf("the right-hand side:\n"); + // for(i=0; ir->size; i++) + // printf("r[%lu]=%f ",i,gsl_vector_get(state->r,i)); + // printf("\n"); + // for(i=0; isize; i++) + // printf("%6.3f ",gsl_vector_get(delta,i)); + // printf("\n"); + // printf("\ndelta_s\n"); + // for(i=0; isize; i++) + // printf("%6.3f ",gsl_vector_get(delta_s,i)); + // printf("\n"); + // printf("the stepsize for the corrector step=%f\n",alpha); + // } + + /* Gondzio's centrality correction steps */ + + i = 0; + while (i < state->k_max) { + alpha_gondzio = GSL_MIN_DBL(alpha + state->delta_alpha, 1.0); + r_block = gsl_vector_subvector(state->r, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + + for (j = 0; j < z->size; j++) { + tmp_v = + (gsl_vector_get(z, j) - + alpha_gondzio * + gsl_vector_get(delta, cqp->Q->size1 + cqp->A->size1 + j)) * + (gsl_vector_get(state->s, j) + + alpha_gondzio * gsl_vector_get(delta_s, j)); + tmp_vt = GSL_MIN_DBL( + GSL_MAX_DBL(tmp_v, state->beta_min * sigma * (*gap)), + state->beta_max * sigma * (*gap)); + gsl_vector_set(r_zs, j, gsl_vector_get(r_zs, j) - (tmp_vt - tmp_v)); + gsl_vector_set(&r_block.vector, j, + gsl_vector_get(&r_block.vector, j) + + (tmp_vt - tmp_v) / gsl_vector_get(z, j)); + } -static int -mg_pdip_iterate (void *vstate, const gsl_cqp_data *cqp, gsl_vector *x, gsl_vector *y, gsl_vector *z, - double *gap, double *residuals_norm, double *infeasibility, double *infeasibility_min) -{ - size_t i, j = 0; //, debug=0; - int signum; - double sigma, alpha, alpha_gondzio; - double tmp_v, tmp_vt, tmp_d; - - gsl_vector_view r_block, delta_block; - - mg_pdip_state *state = (mg_pdip_state *) vstate; - - gsl_permutation * p; - - gsl_vector * delta; - gsl_vector * delta_s; - - gsl_vector * r_zs; - - gsl_vector * delta_gondzio; - gsl_vector * delta_s_gondzio; - - - p = gsl_permutation_alloc(state->kkt_matrix->size1); - if(p == 0) - { - GSL_ERROR_VAL ("failed to initialize space for permutation vector", GSL_ENOMEM, 0); - } - - delta = gsl_vector_alloc(state->kkt_matrix->size2); - if(delta == 0) - { - gsl_permutation_free(p); - GSL_ERROR_VAL ("failed to initialize space for predictor step", GSL_ENOMEM, 0); - } - delta_gondzio = gsl_vector_alloc(state->kkt_matrix->size2); - if(delta_gondzio == 0) - { - gsl_vector_free(delta); - gsl_permutation_free(p); - GSL_ERROR_VAL ("failed to initialize space for predictor step", GSL_ENOMEM, 0); - } - - delta_s_gondzio = gsl_vector_alloc(z->size); - if(delta_s_gondzio == 0) - { - gsl_vector_free(delta_gondzio); - gsl_vector_free(delta); - gsl_permutation_free(p); - GSL_ERROR_VAL ("failed to initialize space for LM s", GSL_ENOMEM, 0); - } - - delta_s = gsl_vector_alloc(z->size); - if(delta_s == 0) - { - gsl_vector_free(delta_s_gondzio); - gsl_vector_free(delta_gondzio); - gsl_vector_free(delta); - gsl_permutation_free(p); - GSL_ERROR_VAL ("failed to initialize space for LM s", GSL_ENOMEM, 0); - } - - r_zs = gsl_vector_alloc(z->size); - if(r_zs == 0) - { - gsl_vector_free(delta_s); - gsl_vector_free(delta_s_gondzio); - gsl_vector_free(delta_gondzio); - gsl_vector_free(delta); - gsl_permutation_free(p); - GSL_ERROR_VAL ("failed to initialize space for LM s", GSL_ENOMEM, 0); - } - - /* the right-hand side of the KKT-system: r = -(r_Q, r_A, r_C+Z^{-1}*r_zs) */ - /* the vecors of variables: delta = (delta_x, -delta_y, -delta_z) */ - /* delta_s for the slack variable s: delta_s = Z^{-1}(-r_zs - S*delta_z) */ - - /********* Predictor Step ******************/ - /* in the predictor step: r_zs = ZSe */ - r_block = gsl_vector_subvector(state->r, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - gsl_blas_daxpy(1.0, state->s, &r_block.vector); - gsl_blas_dscal(-1.0, state->r); - - /* solve the KKT-system: */ - /* evaluate the LU-decomposition of the KKT-matrix*/ - gsl_linalg_LU_decomp(state->kkt_matrix, p, &signum); - /* find the predictor step */ - gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta); - - for(i=0; isize; i++) - { - /* find delta_s for the slack variable s: delta_s = Z^{-1}(-r_zs - S*delta_z) */ - gsl_vector_set(delta_s, i, gsl_vector_get(state->s,i)* - (gsl_vector_get(delta,cqp->Q->size2+cqp->A->size1+i)/gsl_vector_get(z,i)-1.0)); - - } - - /* find the stepsize of the predictor step */ - delta_block = gsl_vector_subvector(delta, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - alpha = step_length(state->s, z, delta_s, &delta_block.vector); - - -// if(debug) -// { -// printf("\n *** Predictor Step ***\n"); -// printf("\nthe right-hand side of the KKT-system:\n"); -// for(i=0; ir->size; i++) -// printf("r[%lu]=%f ",i,gsl_vector_get(state->r,i)); -// printf("\n"); -// printf("\nsolution (delta_x,-delta_y,-delta_z):\n"); -// for(i=0; isize; i++) -// printf("%6.3f ",gsl_vector_get(delta,i)); -// printf("\n"); -// printf("\ndelta_s\n"); -// for(i=0; isize; i++) -// printf("%6.3f ",gsl_vector_get(delta_s,i)); -// printf("\n"); -// printf("the stepsize for the predictor step=%f\n",alpha); -// } - - - - /************ Evaluation of the centering parameter sigma ***************/ - /* sigma = (gap_aff/gap)^tau */ - sigma = 0.0; - for(i=0; isize; i++) - { - sigma += (gsl_vector_get(z,i) - alpha*gsl_vector_get(delta, cqp->Q->size2+cqp->A->size1+i))* - (gsl_vector_get(state->s,i) + alpha*gsl_vector_get(delta_s,i)); - } - sigma /= (cqp->C->size1*(*gap)); - sigma = pow(sigma, state->tau); - -// if(debug) -// printf("the centering parameter sigma =%f\n",sigma); - - - /************ Corrector Step ******************/ - - /* modify the right-hand side of the kkt-system in oder to find the Mehrotra's corrector step */ - - r_block = gsl_vector_subvector(state->r, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - for(i=0; iC->size1; i++) - { - tmp_d = -sigma*(*gap)-gsl_vector_get(delta, cqp->Q->size2+cqp->A->size1+i)*gsl_vector_get(delta_s, i); - gsl_vector_set(r_zs, i, gsl_vector_get(z,i)*gsl_vector_get(state->s,i)+tmp_d); - gsl_vector_set(&r_block.vector, i, gsl_vector_get(&r_block.vector, i)-tmp_d/gsl_vector_get(z,i)); - } - - /* find the corrector step */ - gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta); - - - for(i=0; isize; i++) - { - /* delta_s = Z^{-1}*(-r_zs-S*delta_z) */ - gsl_vector_set(delta_s, i, (-gsl_vector_get(r_zs,i)+gsl_vector_get(delta,cqp->Q->size2+cqp->A->size1+i) - *gsl_vector_get(state->s, i))/gsl_vector_get(z,i)); - } - - /* evaluate the stepsize */ - delta_block = gsl_vector_subvector(delta, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - alpha = step_length(state->s, z, delta_s, &delta_block.vector); - -// if(debug) -// { -// printf("\n *** Corrector Step ***\n"); -// printf("the right-hand side:\n"); -// for(i=0; ir->size; i++) -// printf("r[%lu]=%f ",i,gsl_vector_get(state->r,i)); -// printf("\n"); -// for(i=0; isize; i++) -// printf("%6.3f ",gsl_vector_get(delta,i)); -// printf("\n"); -// printf("\ndelta_s\n"); -// for(i=0; isize; i++) -// printf("%6.3f ",gsl_vector_get(delta_s,i)); -// printf("\n"); -// printf("the stepsize for the corrector step=%f\n",alpha); -// } - - - /* Gondzio's centrality correction steps */ - - i=0; - while(ik_max) - { - - alpha_gondzio = GSL_MIN_DBL(alpha+state->delta_alpha, 1.0); - r_block = gsl_vector_subvector(state->r, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - - for(j=0; jsize; j++) - { - tmp_v = (gsl_vector_get(z,j)-alpha_gondzio*gsl_vector_get(delta,cqp->Q->size1+cqp->A->size1+j))* - (gsl_vector_get(state->s,j)+alpha_gondzio*gsl_vector_get(delta_s,j)); - tmp_vt = GSL_MIN_DBL(GSL_MAX_DBL(tmp_v,state->beta_min*sigma*(*gap)),state->beta_max*sigma*(*gap)); - gsl_vector_set(r_zs, j, gsl_vector_get(r_zs,j)-(tmp_vt-tmp_v)); - gsl_vector_set(&r_block.vector, j, gsl_vector_get(&r_block.vector,j)+(tmp_vt-tmp_v)/gsl_vector_get(z,j)); - } - - gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta_gondzio); - for(j=0; jsize; j++) - { - gsl_vector_set(delta_s_gondzio, j, (-gsl_vector_get(r_zs,j)+gsl_vector_get(delta_gondzio,cqp->Q->size2+cqp->A->size1+j) - *gsl_vector_get(state->s, j))/gsl_vector_get(z,j)); - } - - /* evaluate the stepsize */ - delta_block = gsl_vector_subvector(delta_gondzio, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - alpha_gondzio = step_length(state->s, z, delta_s, &delta_block.vector); - - if(alpha_gondzio >= alpha+state->gamma*state->delta_alpha) - { - i++; - alpha = alpha_gondzio; - gsl_blas_dcopy(delta_gondzio, delta); - gsl_blas_dcopy(delta_s_gondzio, delta_s); - } - else - break; - - } - - /* heuristic for step length */ - alpha = GSL_MIN_DBL(0.995*alpha, 1.0); - - /* Update */ - /* x^k = x^k + alpha*delta_x */ - delta_block = gsl_vector_subvector(delta, 0, cqp->Q->size1); - gsl_blas_daxpy(alpha, &delta_block.vector, x); - - /* y^k = y^k - alpha*(-delta_y) */ - if( y != 0 ) { - delta_block = gsl_vector_subvector(delta, cqp->Q->size1, cqp->A->size1); - gsl_blas_daxpy(-alpha, &delta_block.vector, y); + gsl_linalg_LU_solve(state->kkt_matrix, p, state->r, delta_gondzio); + for (j = 0; j < delta_s->size; j++) { + gsl_vector_set(delta_s_gondzio, j, + (-gsl_vector_get(r_zs, j) + + gsl_vector_get(delta_gondzio, + cqp->Q->size2 + cqp->A->size1 + j) * + gsl_vector_get(state->s, j)) / + gsl_vector_get(z, j)); } - - /* z^k = z^k - alpha*(-delta_z) */ - delta_block = gsl_vector_subvector(delta, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - gsl_blas_daxpy(-alpha, &delta_block.vector, z); - - /* s^k = s^k + alpha*(delta_s) */ - gsl_blas_daxpy(alpha, delta_s, state->s); - - - /* duality gap */ - gsl_blas_ddot(z, state->s, gap); - *gap /= cqp->C->size1; - - /* data for the next iteration */ - compute_residuals(cqp, x, y, z, state->s, state->r); - *residuals_norm = gsl_vector_max_norm(state->r); - - build_kkt_matrix(cqp, z, state->s, state->kkt_matrix); - - /* for the infeasibility test */ - *infeasibility = (*residuals_norm+compute_gap_infeasible_points(cqp, x, y, z))/(state->data_norm); - *infeasibility_min = GSL_MIN_DBL(*infeasibility, *infeasibility_min); - - -// if(debug) -// { -// printf("current iteration points\n"); -// print_vectors(x, y, z, state->s); -// -// printf("\nduality gap: %e\n",*gap); -// } - - gsl_permutation_free(p); - gsl_vector_free(delta); - gsl_vector_free(delta_gondzio); - gsl_vector_free(delta_s_gondzio); - gsl_vector_free(delta_s); - gsl_vector_free(r_zs); - - - return GSL_SUCCESS; + + /* evaluate the stepsize */ + delta_block = gsl_vector_subvector( + delta_gondzio, cqp->Q->size1 + cqp->A->size1, cqp->C->size1); + alpha_gondzio = step_length(state->s, z, delta_s, &delta_block.vector); + + if (alpha_gondzio >= alpha + state->gamma * state->delta_alpha) { + i++; + alpha = alpha_gondzio; + gsl_blas_dcopy(delta_gondzio, delta); + gsl_blas_dcopy(delta_s_gondzio, delta_s); + } else + break; + } + + /* heuristic for step length */ + alpha = GSL_MIN_DBL(0.995 * alpha, 1.0); + + /* Update */ + /* x^k = x^k + alpha*delta_x */ + delta_block = gsl_vector_subvector(delta, 0, cqp->Q->size1); + gsl_blas_daxpy(alpha, &delta_block.vector, x); + + /* y^k = y^k - alpha*(-delta_y) */ + if (y != 0) { + delta_block = gsl_vector_subvector(delta, cqp->Q->size1, cqp->A->size1); + gsl_blas_daxpy(-alpha, &delta_block.vector, y); + } + + /* z^k = z^k - alpha*(-delta_z) */ + delta_block = gsl_vector_subvector(delta, cqp->Q->size1 + cqp->A->size1, + cqp->C->size1); + gsl_blas_daxpy(-alpha, &delta_block.vector, z); + + /* s^k = s^k + alpha*(delta_s) */ + gsl_blas_daxpy(alpha, delta_s, state->s); + + /* duality gap */ + gsl_blas_ddot(z, state->s, gap); + *gap /= cqp->C->size1; + + /* data for the next iteration */ + compute_residuals(cqp, x, y, z, state->s, state->r); + *residuals_norm = gsl_vector_max_norm(state->r); + + build_kkt_matrix(cqp, z, state->s, state->kkt_matrix); + + /* for the infeasibility test */ + *infeasibility = + (*residuals_norm + compute_gap_infeasible_points(cqp, x, y, z)) / + (state->data_norm); + *infeasibility_min = GSL_MIN_DBL(*infeasibility, *infeasibility_min); + + // if(debug) + // { + // printf("current iteration points\n"); + // print_vectors(x, y, z, state->s); + // + // printf("\nduality gap: %e\n",*gap); + // } + + gsl_permutation_free(p); + gsl_vector_free(delta); + gsl_vector_free(delta_gondzio); + gsl_vector_free(delta_s_gondzio); + gsl_vector_free(delta_s); + gsl_vector_free(r_zs); + + return GSL_SUCCESS; } -static void -mg_pdip_free (void *vstate) -{ - mg_pdip_state *state = (mg_pdip_state *) vstate; - - gsl_vector_free(state->s); - gsl_matrix_free(state->kkt_matrix); - gsl_vector_free(state->r); +static void mg_pdip_free(void *vstate) { + mg_pdip_state *state = (mg_pdip_state *)vstate; + + gsl_vector_free(state->s); + gsl_matrix_free(state->kkt_matrix); + gsl_vector_free(state->r); } /* @@ -529,179 +533,176 @@ } */ +static int compute_residuals(const gsl_cqp_data *cqp, const gsl_vector *x, + const gsl_vector *y, const gsl_vector *z, + const gsl_vector *s, gsl_vector *r) { + gsl_vector_view r_block; + + /*gsl_cqp_geconstraints * constraints = (gsl_cqp_geconstraints *) + * cqp->constraints;*/ + + /* r_Q=Qx+q-A^ty-C^tz */ + r_block = gsl_vector_subvector(r, 0, cqp->Q->size1); + gsl_blas_dcopy(cqp->q, &r_block.vector); + gsl_blas_dsymv(CblasUpper, 1.0, cqp->Q, x, 1.0, &r_block.vector); + /*gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->Q, x, 1.0, r_Q);*/ + if (cqp->A->size1 != 0) { + gsl_blas_dgemv(CblasTrans, -1.0, cqp->A, y, 1.0, &r_block.vector); + } + gsl_blas_dgemv(CblasTrans, -1.0, cqp->C, z, 1.0, &r_block.vector); + + /* r_A=Ax-b */ + if (cqp->A->size1 != 0) { + r_block = gsl_vector_subvector(r, cqp->Q->size1, cqp->A->size1); + gsl_blas_dcopy(cqp->b, &r_block.vector); + gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->A, x, -1.0, &r_block.vector); + } + + /* r_C=Cx-s-d */ + r_block = + gsl_vector_subvector(r, cqp->Q->size1 + cqp->A->size1, cqp->C->size1); + gsl_blas_dcopy(s, &r_block.vector); + gsl_blas_daxpy(1.0, cqp->d, &r_block.vector); + gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->C, x, -1.0, &r_block.vector); + return GSL_SUCCESS; +} -static int -compute_residuals(const gsl_cqp_data * cqp, const gsl_vector *x, const gsl_vector *y, const gsl_vector *z, const gsl_vector *s, - gsl_vector *r) -{ +static int build_kkt_matrix(const gsl_cqp_data *cqp, const gsl_vector *z, + const gsl_vector *s, gsl_matrix *kkt_matrix) { + size_t i; - gsl_vector_view r_block; - - /*gsl_cqp_geconstraints * constraints = (gsl_cqp_geconstraints *) cqp->constraints;*/ - - /* r_Q=Qx+q-A^ty-C^tz */ - r_block = gsl_vector_subvector(r, 0, cqp->Q->size1); - gsl_blas_dcopy(cqp->q, &r_block.vector); - gsl_blas_dsymv(CblasUpper, 1.0, cqp->Q, x, 1.0, &r_block.vector); - /*gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->Q, x, 1.0, r_Q);*/ - if( cqp->A->size1 != 0 ) - { - gsl_blas_dgemv(CblasTrans, -1.0, cqp->A, y, 1.0, &r_block.vector); - } - gsl_blas_dgemv(CblasTrans, -1.0, cqp->C, z, 1.0, &r_block.vector); - - /* r_A=Ax-b */ - if( cqp->A->size1 != 0 ) { - r_block = gsl_vector_subvector(r, cqp->Q->size1, cqp->A->size1); - gsl_blas_dcopy(cqp->b, &r_block.vector); - gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->A, x, -1.0, &r_block.vector); - } - - /* r_C=Cx-s-d */ - r_block = gsl_vector_subvector(r, cqp->Q->size1+cqp->A->size1, cqp->C->size1); - gsl_blas_dcopy(s, &r_block.vector); - gsl_blas_daxpy(1.0, cqp->d, &r_block.vector); - gsl_blas_dgemv(CblasNoTrans, 1.0, cqp->C, x, -1.0, &r_block.vector); + gsl_matrix_view kkt_block; - return GSL_SUCCESS; -} + /*KKT - Matrix -static int -build_kkt_matrix(const gsl_cqp_data * cqp, const gsl_vector *z, const gsl_vector *s, gsl_matrix * kkt_matrix) -{ - size_t i; - - gsl_matrix_view kkt_block; - - - /*KKT - Matrix - - |Q A^t C^t | - kkt_matrix =|A 0 0 | - |C 0 -Z^{-1}S| - - */ - /* 1. Block */ - kkt_block = gsl_matrix_submatrix(kkt_matrix, 0, 0, cqp->Q->size1, cqp->Q->size2); - gsl_matrix_memcpy(&kkt_block.matrix, cqp->Q); - - /* 2. Block */ - if( cqp->A->size1 != 0 ) { - kkt_block = gsl_matrix_submatrix(kkt_matrix, 0, cqp->Q->size2, cqp->A->size2, cqp->A->size1); - gsl_matrix_transpose_memcpy(&kkt_block.matrix, cqp->A); - } - - /* 3. Block */ - kkt_block = gsl_matrix_submatrix(kkt_matrix, 0, cqp->Q->size2+cqp->A->size1, cqp->C->size2, cqp->C->size1); - gsl_matrix_transpose_memcpy(&kkt_block.matrix, cqp->C); - - /* 4. Block */ - if( cqp->A->size1 != 0 ) { - kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1, 0, cqp->A->size1, cqp->A->size2); - gsl_matrix_memcpy(&kkt_block.matrix, cqp->A); - } - - /* 5. Block */ - kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1+cqp->A->size1, 0, cqp->C->size1, cqp->C->size2); - gsl_matrix_memcpy(&kkt_block.matrix, cqp->C); - - /* Null Block */ - kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1, cqp->Q->size2, cqp->A->size1+cqp->C->size1, cqp->A->size1+cqp->C->size1); - gsl_matrix_set_zero(&kkt_block.matrix); - - /* 6. Block */ - for(i=cqp->Q->size1+cqp->A->size1; isize1; i++) - { - gsl_matrix_set(kkt_matrix, i,i, -gsl_vector_get(s, i-(cqp->Q->size1+cqp->A->size1))/ - gsl_vector_get(z, i-(cqp->Q->size1+cqp->A->size1))); - } - - return GSL_SUCCESS; - -} + |Q A^t C^t | +kkt_matrix =|A 0 0 | + |C 0 -Z^{-1}S| -double -step_length(const gsl_vector *s, const gsl_vector *z, const gsl_vector *delta_s, const gsl_vector *delta_z) -{ - double alpha = 1.0; - size_t i; - - for(i=0; isize; i++) - { - if(gsl_vector_get(delta_z,i) > 0.0) - alpha = GSL_MIN_DBL(alpha, gsl_vector_get(z,i)/gsl_vector_get(delta_z,i)); - - if(gsl_vector_get(delta_s,i) < 0.0) - alpha = GSL_MIN_DBL(alpha, -gsl_vector_get(s,i)/gsl_vector_get(delta_s,i)); - - } - - return alpha; +*/ + /* 1. Block */ + kkt_block = + gsl_matrix_submatrix(kkt_matrix, 0, 0, cqp->Q->size1, cqp->Q->size2); + gsl_matrix_memcpy(&kkt_block.matrix, cqp->Q); + + /* 2. Block */ + if (cqp->A->size1 != 0) { + kkt_block = gsl_matrix_submatrix(kkt_matrix, 0, cqp->Q->size2, + cqp->A->size2, cqp->A->size1); + gsl_matrix_transpose_memcpy(&kkt_block.matrix, cqp->A); + } + + /* 3. Block */ + kkt_block = + gsl_matrix_submatrix(kkt_matrix, 0, cqp->Q->size2 + cqp->A->size1, + cqp->C->size2, cqp->C->size1); + gsl_matrix_transpose_memcpy(&kkt_block.matrix, cqp->C); + + /* 4. Block */ + if (cqp->A->size1 != 0) { + kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1, 0, + cqp->A->size1, cqp->A->size2); + gsl_matrix_memcpy(&kkt_block.matrix, cqp->A); + } + + /* 5. Block */ + kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1 + cqp->A->size1, + 0, cqp->C->size1, cqp->C->size2); + gsl_matrix_memcpy(&kkt_block.matrix, cqp->C); + + /* Null Block */ + kkt_block = gsl_matrix_submatrix(kkt_matrix, cqp->Q->size1, cqp->Q->size2, + cqp->A->size1 + cqp->C->size1, + cqp->A->size1 + cqp->C->size1); + gsl_matrix_set_zero(&kkt_block.matrix); + + /* 6. Block */ + for (i = cqp->Q->size1 + cqp->A->size1; i < kkt_matrix->size1; i++) { + gsl_matrix_set( + kkt_matrix, i, i, + -gsl_vector_get(s, i - (cqp->Q->size1 + cqp->A->size1)) / + gsl_vector_get(z, i - (cqp->Q->size1 + cqp->A->size1))); + } + + return GSL_SUCCESS; } +double step_length(const gsl_vector *s, const gsl_vector *z, + const gsl_vector *delta_s, const gsl_vector *delta_z) { + double alpha = 1.0; + size_t i; -static double -compute_gap_infeasible_points(const gsl_cqp_data *cqp, const gsl_vector *x, const gsl_vector *y, const gsl_vector *z) -{ - double g, tmp_d; - - gsl_vector * tmp_v = gsl_vector_alloc(cqp->q->size); - - gsl_blas_dcopy(cqp->q, tmp_v); - gsl_blas_dsymv(CblasUpper, 1.0, cqp->Q, x, 1.0, tmp_v); - gsl_blas_ddot(x, tmp_v, &g); - - if( cqp->A->size1 != 0 ) { - gsl_blas_ddot(cqp->b, y, &tmp_d); - g -= tmp_d; - } - - gsl_blas_ddot(cqp->d, z, &tmp_d); - g -= tmp_d; + for (i = 0; i < delta_s->size; i++) { + if (gsl_vector_get(delta_z, i) > 0.0) + alpha = GSL_MIN_DBL( + alpha, gsl_vector_get(z, i) / gsl_vector_get(delta_z, i)); - gsl_vector_free(tmp_v); + if (gsl_vector_get(delta_s, i) < 0.0) + alpha = GSL_MIN_DBL( + alpha, -gsl_vector_get(s, i) / gsl_vector_get(delta_s, i)); + } - return g; + return alpha; } -double -gsl_matrix_max_norm(const gsl_matrix *M) -{ - size_t i,j; - double max_norm = 0.0; - - for(i=0; isize1; i++) - for(j=0; jsize2; j++) - max_norm = GSL_MAX_DBL(max_norm, fabs(gsl_matrix_get(M, i, j))); - - return max_norm; +static double compute_gap_infeasible_points(const gsl_cqp_data *cqp, + const gsl_vector *x, + const gsl_vector *y, + const gsl_vector *z) { + double g, tmp_d; + + gsl_vector *tmp_v = gsl_vector_alloc(cqp->q->size); + + gsl_blas_dcopy(cqp->q, tmp_v); + gsl_blas_dsymv(CblasUpper, 1.0, cqp->Q, x, 1.0, tmp_v); + gsl_blas_ddot(x, tmp_v, &g); + + if (cqp->A->size1 != 0) { + gsl_blas_ddot(cqp->b, y, &tmp_d); + g -= tmp_d; + } + + gsl_blas_ddot(cqp->d, z, &tmp_d); + g -= tmp_d; + + gsl_vector_free(tmp_v); + return g; } -double -gsl_vector_max_norm(const gsl_vector *v) -{ - size_t i; - double max_norm = fabs(gsl_vector_get(v,0)); - - for(i=1; isize; i++) - max_norm = GSL_MAX_DBL(max_norm, fabs(gsl_vector_get(v,i))); - - return max_norm; +double gsl_matrix_max_norm(const gsl_matrix *M) { + size_t i, j; + double max_norm = 0.0; + + for (i = 0; i < M->size1; i++) + for (j = 0; j < M->size2; j++) + max_norm = GSL_MAX_DBL(max_norm, fabs(gsl_matrix_get(M, i, j))); + + return max_norm; } +double gsl_vector_max_norm(const gsl_vector *v) { + size_t i; + double max_norm = fabs(gsl_vector_get(v, 0)); + + for (i = 1; i < v->size; i++) + max_norm = GSL_MAX_DBL(max_norm, fabs(gsl_vector_get(v, i))); + + return max_norm; +} /* static void -print_vectors(const gsl_vector * x, const gsl_vector * y, const gsl_vector * z, const gsl_vector * s) +print_vectors(const gsl_vector * x, const gsl_vector * y, const gsl_vector * z, +const gsl_vector * s) { - size_t i; - - printf("\nx[1 x %lu]:\n",x->size); - for(i=0; isize; i++) - printf("%f ",gsl_vector_get(x,i)); - printf("\n"); + size_t i; + + printf("\nx[1 x %lu]:\n",x->size); + for(i=0; isize; i++) + printf("%f ",gsl_vector_get(x,i)); + printf("\n"); if( y != NULL ) { printf("\ny[1 x %lu]: (LM zu Ax=b)\n",y->size); @@ -709,31 +710,25 @@ printf("%f ",gsl_vector_get(y,i)); printf("\n"); } - - printf("\nz[1 x %lu]: (LM zu Cx>=d)\n",z->size); - for(i=0; isize; i++) - printf("%f ",gsl_vector_get(z,i)); - printf("\n"); - - printf("\ns[1 x %lu]: (Slack zu Cx>=d)\n",s->size); - for(i=0; isize; i++) - printf("%f ",gsl_vector_get(s,i)); - printf("\n"); + + printf("\nz[1 x %lu]: (LM zu Cx>=d)\n",z->size); + for(i=0; isize; i++) + printf("%f ",gsl_vector_get(z,i)); + printf("\n"); + + printf("\ns[1 x %lu]: (Slack zu Cx>=d)\n",s->size); + for(i=0; isize; i++) + printf("%f ",gsl_vector_get(s,i)); + printf("\n"); } */ - static const gsl_cqpminimizer_type mg_pdip_type = { - "mg_pdip", /* name of the method: Mehrotra-Gondzio primal-dual interior point method*/ - sizeof (mg_pdip_state), - &mg_pdip_alloc, - &mg_pdip_set, - &mg_pdip_iterate, - /* &mg_pdip_restart, */ - &mg_pdip_free -}; - -const gsl_cqpminimizer_type - * gsl_cqpminimizer_mg_pdip = &mg_pdip_type; + "mg_pdip", /* name of the method: Mehrotra-Gondzio primal-dual interior + point method*/ + sizeof(mg_pdip_state), &mg_pdip_alloc, &mg_pdip_set, &mg_pdip_iterate, + /* &mg_pdip_restart, */ + &mg_pdip_free}; +const gsl_cqpminimizer_type *gsl_cqpminimizer_mg_pdip = &mg_pdip_type; diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,140 +29,138 @@ * $Id: display_adaptive_tmo.cpp,v 1.19 2009/02/23 18:46:36 rafm Exp $ */ -#include -#include +#include #include +#include +#include #include -#include #include -#include -#include +#include +#include #ifdef _OPENMP #include #endif +#include "../../sleef.c" +#include "../../opthelper.h" +#define pow_F(a,b) (xexpf(b*xlogf(a))) + #include "display_adaptive_tmo.h" -#include -#include #include #include +#include +#include #include "cqp/gsl_cqp.h" -#include "Libpfs/progress.h" #include "Libpfs/array2d.h" -#include "Libpfs/utils/sse.h" +#include "Libpfs/progress.h" #ifdef BRANCH_PREDICTION -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif -// Computing Conditional Density takes about 90% of the time -#define PROGRESS_CDF 90 +// Computing Conditional Density takes about 50% of the time +#define PROGRESS_CDF 40 -#define MIN_PHVAL 1e-8f // Minimum value allowed in HDR images -#define MAX_PHVAL 1e8f // Maximum value allowed in HDR images +#define MIN_PHVAL 1e-8f // Minimum value allowed in HDR images +#define MAX_PHVAL 1e8f // Maximum value allowed in HDR images + +void my_gsl_error_handler (const char * reason, + const char * file, + int line, + int gsl_errno) { + throw pfs::Exception(reason); +} /** * Simple RAII wrapper for gsl_matrix */ -class auto_matrix -{ - gsl_matrix *m; +class auto_matrix { + gsl_matrix *m; public: - auto_matrix(gsl_matrix *m): m(m) {} - ~auto_matrix() { gsl_matrix_free(m); } - operator gsl_matrix* () { return m; } + auto_matrix(gsl_matrix *m) : m(m) {} + ~auto_matrix() { gsl_matrix_free(m); } + operator gsl_matrix *() { return m; } }; /** * Simple RAII wrapper for gsl_vector */ -class auto_vector -{ - gsl_vector *v; +class auto_vector { + gsl_vector *v; public: - auto_vector(gsl_vector *v): v(v) {} - ~auto_vector() { gsl_vector_free(v); } - operator gsl_vector* () { return v; } + auto_vector(gsl_vector *v) : v(v) {} + ~auto_vector() { gsl_vector_free(v); } + operator gsl_vector *() { return v; } }; /** * Simple RAII wrapper for gsl_cqpminimizer */ -class auto_cqpminimizer -{ - gsl_cqpminimizer *v; +class auto_cqpminimizer { + gsl_cqpminimizer *v; public: - auto_cqpminimizer(gsl_cqpminimizer *v): v(v) {} - ~auto_cqpminimizer() { gsl_cqpminimizer_free(v); } - operator gsl_cqpminimizer* () { return v; } + auto_cqpminimizer(gsl_cqpminimizer *v) : v(v) {} + ~auto_cqpminimizer() { gsl_cqpminimizer_free(v); } + operator gsl_cqpminimizer *() { return v; } }; // =============== Tone-curve filtering ============== -datmoToneCurve::datmoToneCurve() : own_y_i( false ), x_i( NULL ), y_i( NULL ) -{ -} +datmoToneCurve::datmoToneCurve() : own_y_i(false), size(0), x_i(NULL), y_i(NULL) {} -datmoToneCurve::~datmoToneCurve() -{ - free(); -} +datmoToneCurve::~datmoToneCurve() { free(); } -void datmoToneCurve::init( size_t n_size, const double *n_x_i, double *n_y_i ) -{ - free(); +void datmoToneCurve::init(size_t n_size, const double *n_x_i, double *n_y_i) { + free(); - size = n_size; - x_i = n_x_i; - if( n_y_i == NULL ) { - y_i = new double[size]; - own_y_i = true; - } else { - y_i = n_y_i; - own_y_i = false; - } + size = n_size; + x_i = n_x_i; + if (n_y_i == NULL) { + y_i = new double[size]; + own_y_i = true; + } else { + y_i = n_y_i; + own_y_i = false; + } } -void datmoToneCurve::free() -{ - if( y_i != NULL && own_y_i ) - delete []y_i; +void datmoToneCurve::free() { + if (y_i != NULL && own_y_i) delete[] y_i; } - // =============== Utils ============== -#define round_int( x ) (int)((x) + 0.5) -#define sign( x ) ( (x)<0 ? -1 : 1 ) +#define round_int(x) (int)((x) + 0.5) +#define sign(x) ((x) < 0 ? -1 : 1) -static inline float safe_log10( float x, const float min_x = MIN_PHVAL, const float max_x = MAX_PHVAL ) -{ - if( x < min_x ) - return log10(min_x); - else if( x > max_x ) - return log10(max_x); - else return log10( x ); +static inline float safe_log10(float x, const float min_x = MIN_PHVAL, + const float max_x = MAX_PHVAL) { + if (x < min_x) + return log10(min_x); + else if (x > max_x) + return log10(max_x); + else + return log10(x); } -#ifdef LUMINANCE_USE_SSE - -#define LOG2_10 3.3219280948874f -#define LOG2_10__1 (1.0f/LOG2_10) -static inline v4sf safe_log10( v4sf x, const float min_x = MIN_PHVAL, const float max_x = MAX_PHVAL ) -{ - x = _mm_max_ps(x, _mm_set1_ps(min_x)); - x = _mm_min_ps(x, _mm_set1_ps(max_x)); - return _mm_log2_ps(x) * _mm_set1_ps(LOG2_10__1); +#ifdef __SSE2__ + +#define LOGE_10 2.3025850929940456840179914546844f +#define LOGE_10__1 (1.0f / LOGE_10) +static inline vfloat safe_log10(vfloat x, const float min_x = MIN_PHVAL, const float max_x = MAX_PHVAL) { + x = vmaxf(x, F2V(min_x)); + x = vminf(x, F2V(max_x)); + return xlogfNoCheck(x) * F2V(LOGE_10__1); } #endif @@ -170,23 +168,20 @@ /** * Find the lowest non-zero value. Used to avoid log10(0). */ -static float min_positive( const float *x, size_t len ) -{ - float min_val = MAX_PHVAL; - for( size_t k=0; k < len; k++ ) - if( unlikely(x[k] < min_val && x[k] > 0) ) - min_val = x[k]; - - return min_val; +static float min_positive(const float *x, size_t len) { + float min_val = MAX_PHVAL; + for (size_t k = 0; k < len; k++) + if (unlikely(x[k] < min_val && x[k] > 0)) min_val = x[k]; + + return min_val; } - -static void mult_rows( const gsl_matrix *A, const gsl_vector *b, gsl_matrix *C ) -{ - assert( A->size1 == b->size ); - for( size_t j=0; j < A->size2; j++ ) - for( size_t i=0; i < A->size1; i++ ) - gsl_matrix_set( C, i, j, gsl_matrix_get(A,i,j)*gsl_vector_get(b,i) ); +static void mult_rows(const gsl_matrix *A, const gsl_vector *b, gsl_matrix *C) { + assert(A->size1 == b->size); + for (size_t j = 0; j < A->size2; j++) + for (size_t i = 0; i < A->size1; i++) + gsl_matrix_set(C, i, j, + gsl_matrix_get(A, i, j) * gsl_vector_get(b, i)); } /** @@ -195,476 +190,476 @@ * x_i must be at least two elements * y_i must be initialized after creating an object */ -class UniformArrayLUT -{ - const double *x_i; - size_t lut_size; - double delta; - - bool own_y_i; -public: - double *y_i; - - UniformArrayLUT( size_t lut_size, const double *x_i, double *y_i = NULL ) : x_i( x_i ), lut_size( lut_size ), delta( x_i[1]-x_i[0] ) - { - if( y_i == NULL ) { - this->y_i = new double[lut_size]; - own_y_i = true; - } else { - this->y_i = y_i; - own_y_i = false; +class UniformArrayLUT { + const double *x_i; + size_t lut_size; + double delta; + + bool own_y_i; + + public: + double *y_i; + + UniformArrayLUT(size_t lut_size, const double *x_i, double *y_i = NULL) + : x_i(x_i), lut_size(lut_size), delta(x_i[1] - x_i[0]) { + if (y_i == NULL) { + this->y_i = new double[lut_size]; + own_y_i = true; + } else { + this->y_i = y_i; + own_y_i = false; + } } - } - UniformArrayLUT() : x_i( 0 ), lut_size( 0 ), delta( 0. ), y_i(0) {} + UniformArrayLUT() : x_i(0), lut_size(0), delta(0.), own_y_i(0), y_i(0) {} - UniformArrayLUT(const UniformArrayLUT& other) : x_i( other.x_i ), lut_size( other.lut_size ), delta( other.delta ) - { - this->y_i = new double[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); - } - - UniformArrayLUT& operator = (const UniformArrayLUT& other) - { - this->lut_size = other.lut_size; - this->delta = other.delta; - this->x_i = other.x_i; - this->y_i = new double[lut_size]; - own_y_i = true; - memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); - - return *this; - } - - ~UniformArrayLUT() - { - if( own_y_i ) - delete []y_i; - } - - double interp( double x ) - { - const double ind_f = (x - x_i[0])/delta; - const size_t ind_low = (size_t)(ind_f); - const size_t ind_hi = (size_t)ceil(ind_f); - - if( unlikely(ind_f < 0) ) // Out of range checks - return y_i[0]; - if( unlikely(ind_hi >= lut_size) ) - return y_i[lut_size-1]; + UniformArrayLUT(const UniformArrayLUT &other) + : x_i(other.x_i), lut_size(other.lut_size), delta(other.delta) { + this->y_i = new double[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); + } - if( unlikely(ind_low == ind_hi) ) - return y_i[ind_low]; // No interpolation necessary + UniformArrayLUT &operator=(const UniformArrayLUT &other) { + if (&other != this) { + this->lut_size = other.lut_size; + this->delta = other.delta; + this->x_i = other.x_i; + this->y_i = new double[lut_size]; + own_y_i = true; + memcpy(this->y_i, other.y_i, lut_size * sizeof(double)); + } - return y_i[ind_low] + (y_i[ind_hi]-y_i[ind_low])*(ind_f-(double)ind_low); // Interpolation - } + return *this; + } + ~UniformArrayLUT() { + if (own_y_i) delete[] y_i; + } + + double interp(double x) { + const double ind_f = (x - x_i[0]) / delta; + const size_t ind_low = (size_t)(ind_f); + const size_t ind_hi = (size_t)ceil(ind_f); + + if (unlikely(ind_f < 0)) // Out of range checks + return y_i[0]; + if (unlikely(ind_hi >= lut_size)) return y_i[lut_size - 1]; + + if (unlikely(ind_low == ind_hi)) + return y_i[ind_low]; // No interpolation necessary + + return y_i[ind_low] + + (y_i[ind_hi] - y_i[ind_low]) * + (ind_f - (double)ind_low); // Interpolation + } }; #ifdef DEBUG #define PFSEOL "\x0a" -static void dumpPFS( const char *fileName, const int width, const int height, float *data, const char *channelName ) -{ - FILE *fh = fopen( fileName, "wb" ); - assert( fh != NULL ); - - fprintf( fh, "PFS1" PFSEOL "%d %d" PFSEOL "1" PFSEOL "0" PFSEOL - "%s" PFSEOL "0" PFSEOL "ENDH", width, height, channelName ); - - for( int y = 0; y < height; y++ ) - for( int x = 0; x < width; x++ ) { - fwrite( &data[x+y*width], sizeof( float ), 1, fh ); - } +static void dumpPFS(const char *fileName, const int width, const int height, + float *data, const char *channelName) { + FILE *fh = fopen(fileName, "wb"); + assert(fh != NULL); + + fprintf(fh, "PFS1" PFSEOL "%d %d" PFSEOL "1" PFSEOL "0" PFSEOL "%s" PFSEOL + "0" PFSEOL "ENDH", + width, height, channelName); + + for (int y = 0; y < height; y++) + for (int x = 0; x < width; x++) { + fwrite(&data[x + y * width], sizeof(float), 1, fh); + } - fclose( fh ); + fclose(fh); } #endif - -static void compute_gaussian_level( const int width, const int height, - const pfs::Array2Df& in, pfs::Array2Df& out, int level, pfs::Array2Df& temp ) -{ - - const float kernel_a = 0.4f; - - const int kernel_len = 5; - const int kernel_len_2 = kernel_len/2; - const float kernel[kernel_len] = { 0.25f - kernel_a/2.f, - 0.25f, - kernel_a, - 0.25f, - 0.25f - kernel_a/2.f }; - - const int step = 1<= width ) ) - l = 2*width - 2 - l; - sum += in_raw[r*width+l] * kernel[j]; - } - temp_raw[r*width+c] = sum; - } - } - - // Filter columns -#pragma omp parallel for default(none) shared(temp_raw, out_raw, kernel) - for( int c=0; c < width; c++ ) { - for( int r=0; r < height; r++ ) { - float sum = 0; - for( int j=0; j< kernel_len; j++ ) { - int l = (j-kernel_len_2)*step+r; - if( unlikely(l < 0) ) - l = -l; - if( unlikely(l >= height) ) - l = 2*height - 2 - l; - sum += temp_raw[l*width+c] * kernel[j]; - } - out_raw[r*width+c] = sum; +static void compute_gaussian_level(const int width, const int height, + const pfs::Array2Df &in, pfs::Array2Df &out, + int level, pfs::Array2Df &temp) { + const float kernel_a = 0.4f; + + const int kernel_len = 5; + const int kernel_len_2 = kernel_len / 2; + const float kernel[kernel_len] = {0.25f - kernel_a / 2.f, 0.25f, kernel_a, + 0.25f, 0.25f - kernel_a / 2.f}; + + const int step = 1 << level; + + // FIXME: without the following (with using operator () ) there + // seems to be a performance drop - need to investigate if gcc can + // be made to optimize this better. If this can't be made faster + // with using the overloaded operator then this optimization should + // be applied to the other TMOs as well. + const float *in_raw = in.data(); + float *temp_raw = temp.data(); + float *out_raw = out.data(); + +// Filter rows +#pragma omp parallel for shared(in_raw, temp_raw, kernel) + for (int r = 0; r < height; r++) { + for (int c = 0; c < width; c++) { + float sum = 0; + for (int j = 0; j < kernel_len; j++) { + int l = (j - kernel_len_2) * step + c; + if (unlikely(l < 0)) l = -l; + if (unlikely(l >= width)) l = 2 * width - 2 - l; + sum += in_raw[r * width + l] * kernel[j]; + } + temp_raw[r * width + c] = sum; + } + } +// Filter columns +#pragma omp parallel for shared(temp_raw, out_raw, kernel) + // process 8 columns per iteration for better usage of cpu cache + for (int c = 0; c < width - 7; c+=8) { + for (int r = 0; r < height; r++) { + float sum[8] = {}; + for(int cc = 0; cc < 8; ++cc) { + for (int j = 0; j < kernel_len; j++) { + int l = (j - kernel_len_2) * step + r; + if (unlikely(l < 0)) l = -l; + if (unlikely(l >= height)) l = 2 * height - 2 - l; + sum[cc] += temp_raw[l * width + c + cc] * kernel[j]; + } + out_raw[r * width + c + cc] = sum[cc]; + } + } + } + // remaining columns + for (int c = width - (width % 8); c < width; c++) { + for (int r = 0; r < height; r++) { + float sum = 0; + for (int j = 0; j < kernel_len; j++) { + int l = (j - kernel_len_2) * step + r; + if (unlikely(l < 0)) l = -l; + if (unlikely(l >= height)) l = 2 * height - 2 - l; + sum += temp_raw[l * width + c] * kernel[j]; + } + out_raw[r * width + c] = sum; + } } - } } -static inline float clamp_channel( const float v ) -{ - return (v > MIN_PHVAL ? v : MIN_PHVAL); +static inline float clamp_channel(const float v) { + return (v > MIN_PHVAL ? v : MIN_PHVAL); } /** Compute conditional probability density function */ - // round_int( (l_max-l_min)/delta ) + 1; -#define X_COUNT (round_int((8.f+8.f)/0.1) + 1) - -class conditional_density: public datmoConditionalDensity -{ -public: - static const double l_min, l_max, delta; - static double x_scale[X_COUNT]; // input log luminance scale - double *g_scale; // contrast scale - double *f_scale; // frequency scale - - const double g_max; - - double total; +#define X_COUNT (round_int((8.f + 8.f) / 0.1) + 1) - int x_count, g_count, f_count; // Number of elements +class conditional_density : public datmoConditionalDensity { + public: + static const double l_min, l_max, delta; + static double x_scale[X_COUNT]; // input log luminance scale + double *g_scale; // contrast scale + double *f_scale; // frequency scale - double *C; // Conditional probability function + const double g_max; - conditional_density( const float pix_per_deg = 30.f ) : - g_max( 0.7f ) - { + double total; - x_count = X_COUNT; - g_count = round_int(g_max/delta)*2 + 1; + int x_count, g_count, f_count; // Number of elements - // Find freq. band < 3 cyc per deg - int f; - for( f=0; f<8; f++ ) { - float b_freq = 0.5f*pix_per_deg/(float)(1<= 0) && (x + g*x_count + f*x_count*g_count < x_count*g_count*f_count) ); - return C[x + g*x_count + f*x_count*g_count]; - } + ~conditional_density() { + delete[] C; + delete[] g_scale; + delete[] f_scale; + } + double &operator()(int x, int g, int f) { + assert((x + g * x_count + f * x_count * g_count >= 0) && + (x + g * x_count + f * x_count * g_count < + x_count * g_count * f_count)); + return C[x + g * x_count + f * x_count * g_count]; + } }; -datmoConditionalDensity::~datmoConditionalDensity() -{ -} - -const double conditional_density::l_min = -8.f, conditional_density::l_max = 8.f, conditional_density::delta = 0.1f; -double conditional_density::x_scale[X_COUNT] = { 0 }; // input log luminance scale - - -std::unique_ptr datmo_compute_conditional_density( int width, int height, const float *L, pfs::Progress &ph) -{ - ph.setValue( 0 ); - - pfs::Array2Df buf_1(width, height); - pfs::Array2Df buf_2(width, height); - pfs::Array2Df temp(width, height); - - std::unique_ptr C(new conditional_density()); +datmoConditionalDensity::~datmoConditionalDensity() {} - const float thr = 0.0043f; // Approx. discrimination threshold in log10 - const int pix_count = width*height; - - - pfs::Array2Df* LP_low = &buf_1; - pfs::Array2Df* LP_high = &buf_2; - float* LP_high_raw = LP_high->data(); - - const float min_val = std::max( min_positive( L, pix_count ), MIN_PHVAL ); - - // Compute log10 of an image -#pragma omp parallel for default(none) shared(LP_high_raw, L) -#ifndef LUMINANCE_USE_SSE - for( int i=0; i < pix_count; i++ ) - LP_high_raw[i] = safe_log10( L[i], min_val ); +const double conditional_density::l_min = -8.f, + conditional_density::l_max = 8.f, + conditional_density::delta = 0.1f; +double conditional_density::x_scale[X_COUNT] = { + 0}; // input log luminance scale + +std::unique_ptr datmo_compute_conditional_density( + int width, int height, const float *L, pfs::Progress &ph) { + gsl_set_error_handler (my_gsl_error_handler); + ph.setValue(0); + + pfs::Array2Df buf_1(width, height); + pfs::Array2Df buf_2(width, height); + pfs::Array2Df temp(width, height); + + std::unique_ptr C(new conditional_density()); + + const float thr = 0.0043f; // Approx. discrimination threshold in log10 + const int pix_count = width * height; + + pfs::Array2Df *LP_low = &buf_1; + pfs::Array2Df *LP_high = &buf_2; + float *LP_high_raw = LP_high->data(); + + const float min_val = std::max(min_positive(L, pix_count), MIN_PHVAL); + +// Compute log10 of an image +#pragma omp parallel for shared(LP_high_raw, L) +#ifndef __SSE2__ + for (int i = 0; i < pix_count; i++) + LP_high_raw[i] = safe_log10(L[i], min_val); #else - for( int i=0; i < pix_count-3; i+=4 ) - _mm_store_ps(&LP_high_raw[i], safe_log10( _mm_load_ps(&L[i]), min_val )); - // In case pix_count%4 > 0 - for( int i=pix_count-3; i < pix_count; i++ ) - LP_high_raw[i] = safe_log10( L[i], min_val ); + for (int i = 0; i < pix_count - 3; i += 4) + STVFU(LP_high_raw[i], safe_log10(LVFU(L[i]), min_val)); + // Remaining pixels + for (int i = pix_count - (pix_count % 4); i < pix_count; i++) + LP_high_raw[i] = safe_log10(L[i], min_val); #endif - bool warn_out_of_range = false; - C->total = 0; - - for( int f=0; ff_count; f++ ) { + bool warn_out_of_range = false; + C->total = 0; - compute_gaussian_level( width, height, *LP_high, *LP_low, f, temp ); + for (int f = 0; f < C->f_count; f++) { + compute_gaussian_level(width, height, *LP_high, *LP_low, f, temp); // For debug purposes only #ifdef DEBUG - char fname[20]; - sprintf( fname, "l_%d.pfs", f+1 ); - dumpPFS( fname, width, height, LP_low, "Y" ); + char fname[20]; + sprintf(fname, "l_%d.pfs", f + 1); + dumpPFS(fname, width, height, LP_low, "Y"); #endif - const int gi_tp = C->g_count/2+1; - const int gi_tn = C->g_count/2-1; - const int gi_t = C->g_count/2; - // Can't parallelize this loop due to the increments on shared data - // at the end, and making those increments critical sections makes - // things worse. - for( int i=0; i < pix_count; i++ ) { - float g = (*LP_high)(i) - (*LP_low)(i); // Compute band-pass - int x_i = round_int( ((*LP_low)(i) - C->l_min)/C->delta ); - if( unlikely(x_i < 0 || x_i >= C->x_count) ) { - warn_out_of_range = true; - continue; - } - int g_i = round_int( (g + C->g_max) / C->delta ); - if( unlikely(g_i < 0 || g_i >= C->g_count) ) - continue; - - if( g > thr && g < C->delta/2 ) { - // above the threshold + - (*C)(x_i,gi_tp,f)++; - } else if( g < -thr && g > -C->delta/2 ) { - // above the threshold - - (*C)(x_i,gi_tn,f)++; - } else (*C)(x_i,g_i,f)++; - } - - for( int i = 0; i < C->x_count; i++ ) { - // Special case: flat field and no gradients - if( (*C)(i,gi_t,f) == 0 ) - continue; - bool gradient_exist = false; - for( int m=0; mg_count; m++ ) - if( m != gi_t && (*C)(i,m,f) != 0 ) { - gradient_exist = true; - break; - } - if( !gradient_exist ) { - // generate some gradient data to avoid bad conditioned problem - (*C)(i,gi_tp,f)++; - (*C)(i,gi_tn,f)++; - } - - // Compute C->total - for( int m=0; mg_count; m++ ) - if( likely(m != gi_t) ) - C->total += (*C)(i,m,f); - } - std::swap( LP_low, LP_high ); - - ph.setValue( (f+1)*PROGRESS_CDF/C->f_count ); - if (ph.canceled()) - break; - } - - if( warn_out_of_range ) - std::cerr << "Warning: Luminance value out of permissible range\n"; - - - // For debugging purposes only -// FILE *fh = fopen( "c_dens.dat", "wt" ); -// std::cerr << "x: " << C->x_count << " g: " << C->g_count << " f: " << C->f_count << "\n"; -// for( int i=0; i<(C->x_count*C->g_count*C->f_count); i++ ) { -// fprintf( fh, "%g\n", C->C[i] ); -// } -// fclose( fh ); - - return std::move(C); + const int gi_tp = C->g_count / 2 + 1; + const int gi_tn = C->g_count / 2 - 1; + const int gi_t = C->g_count / 2; + +#pragma omp parallel +{ + double *Cthr = new double[C->x_count * C->g_count]; + for(int c = 0; c < C->x_count * C->g_count; c++) { + Cthr[c] = 0; + } + #pragma omp for nowait + for (int i = 0; i < pix_count; i++) { + float g = (*LP_high)(i) - (*LP_low)(i); // Compute band-pass + int x_i = round_int(((*LP_low)(i)-C->l_min) / C->delta); + if (unlikely(x_i < 0 || x_i >= C->x_count)) { + warn_out_of_range = true; + continue; + } + int g_i = round_int((g + C->g_max) / C->delta); + if (unlikely(g_i < 0 || g_i >= C->g_count)) continue; + + if (g > thr && g < C->delta / 2) { + // above the threshold + + Cthr[gi_tp * C->x_count + x_i]++; + } else if (g < -thr && g > -C->delta / 2) { + // above the threshold - + Cthr[gi_tn * C->x_count + x_i]++; + } else { + Cthr[g_i * C->x_count + x_i]++; + } + } + #pragma omp critical + { + for(int g = 0; g < C->g_count; g++) { + for(int x = 0; x < C->x_count; x++) { + (*C)(x, g, f) += Cthr[g * C->x_count + x]; + } + } + delete [] Cthr; + } } + for (int i = 0; i < C->x_count; i++) { + // Special case: flat field and no gradients + if ((*C)(i, gi_t, f) == 0) continue; + bool gradient_exist = false; + for (int m = 0; m < C->g_count; m++) + if (m != gi_t && (*C)(i, m, f) != 0) { + gradient_exist = true; + break; + } + if (!gradient_exist) { + // generate some gradient data to avoid bad conditioned problem + (*C)(i, gi_tp, f)++; + (*C)(i, gi_tn, f)++; + } + + // Compute C->total + for (int m = 0; m < C->g_count; m++) + if (likely(m != gi_t)) C->total += (*C)(i, m, f); + } + std::swap(LP_low, LP_high); + + ph.setValue((f + 1) * PROGRESS_CDF / C->f_count); + if (ph.canceled()) break; + } + + if (warn_out_of_range) + std::cerr << "Warning: Luminance value out of permissible range\n"; + + // For debugging purposes only + // FILE *fh = fopen( "c_dens.dat", "wt" ); + // std::cerr << "x: " << C->x_count << " g: " << C->g_count << " f: " << + // C->f_count << "\n"; + // for( int i=0; i<(C->x_count*C->g_count*C->f_count); i++ ) { + // fprintf( fh, "%g\n", C->C[i] ); + // } + // fclose( fh ); + return std::move(C); +} // =============== Quadratic programming solver ============== -const static gsl_matrix null_matrix = {0,0,0,0,0,0}; -const static gsl_vector null_vector = {0,0,0,0,0}; +const static gsl_matrix null_matrix = {0, 0, 0, 0, 0, 0}; +const static gsl_vector null_vector = {0, 0, 0, 0, 0}; /* objective function: 0.5*(x^t)Qx+(q^t)x */ /* constraints: Cx>=d */ /* Ax=b; is not used in our problem */ -static int solve( gsl_matrix *Q, gsl_vector *q, gsl_matrix *C, gsl_vector *d, gsl_vector *x) -{ +static int solve(gsl_matrix *Q, gsl_vector *q, gsl_matrix *C, gsl_vector *d, + gsl_vector *x) { + gsl_cqp_data cqpd; - gsl_cqp_data cqpd; + cqpd.Q = Q; + cqpd.q = q; - cqpd.Q = Q; - cqpd.q = q; + // Do not use any equality constraints (Ax=b) - // Do not use any equality constraints (Ax=b) + // Unfortunatelly GSL does not allow for 0-size vectors and matrices + // As a work-around we create a phony gsl_matrix that has 0-size. + // This matrix must not be passed to any gsl function! - // Unfortunatelly GSL does not allow for 0-size vectors and matrices - // As a work-around we create a phony gsl_matrix that has 0-size. - // This matrix must not be passed to any gsl function! + cqpd.A = &null_matrix; + cqpd.b = &null_vector; - cqpd.A = &null_matrix; - cqpd.b = &null_vector; + cqpd.C = C; + cqpd.d = d; - cqpd.C = C; - cqpd.d = d; + size_t n = cqpd.Q->size1; + size_t me = cqpd.b->size; + size_t mi = cqpd.d->size; - size_t n = cqpd.Q->size1; - size_t me = cqpd.b->size; - size_t mi = cqpd.d->size; + const size_t max_iter = 100; - const size_t max_iter = 100; + size_t iter = 1; - size_t iter=1; + int status; - int status; + const gsl_cqpminimizer_type *T; - const gsl_cqpminimizer_type * T; + T = gsl_cqpminimizer_mg_pdip; + auto_cqpminimizer s(gsl_cqpminimizer_alloc(T, n, me, mi)); - T = gsl_cqpminimizer_mg_pdip; - auto_cqpminimizer s(gsl_cqpminimizer_alloc(T, n, me, mi)); + status = gsl_cqpminimizer_set(s, &cqpd); - status = gsl_cqpminimizer_set(s, &cqpd); + const bool verbose = false; - const bool verbose = false; + if (verbose) + fprintf(stderr, + "== Itn ======= f ======== ||gap|| ==== ||residual||\n\n"); - if( verbose ) fprintf( stderr, "== Itn ======= f ======== ||gap|| ==== ||residual||\n\n"); + do { + status = gsl_cqpminimizer_iterate(s); + status = gsl_cqpminimizer_test_convergence(s, 1e-10, 1e-10); - do - { - status = gsl_cqpminimizer_iterate(s); - status = gsl_cqpminimizer_test_convergence(s, 1e-10, 1e-10); + if (verbose) + fprintf(stderr, "%4lu %14.8f %13.6e %13.6e\n", iter, + gsl_cqpminimizer_f(s), gsl_cqpminimizer_gap(s), + gsl_cqpminimizer_residuals_norm(s)); - if( verbose ) fprintf( stderr, "%4lu %14.8f %13.6e %13.6e\n", iter, gsl_cqpminimizer_f(s), gsl_cqpminimizer_gap(s), gsl_cqpminimizer_residuals_norm(s)); + if (status == GSL_SUCCESS) { + size_t j; + if (verbose) { + fprintf(stderr, "\nMinimum is found at\n"); + for (j = 0; j < gsl_cqpminimizer_x(s)->size; j++) + fprintf(stderr, "%9.6f ", + gsl_vector_get(gsl_cqpminimizer_x(s), j)); + fprintf(stderr, "\n\n"); + } - if(status == GSL_SUCCESS) - { - size_t j; - if( verbose ) { - fprintf( stderr, "\nMinimum is found at\n"); - for(j=0; jsize; j++) - fprintf( stderr, "%9.6f ",gsl_vector_get(gsl_cqpminimizer_x(s), j)); - fprintf( stderr, "\n\n"); - } - - -// printf("\nLagrange-multipliers for Ax=b\n"); -// for(j=0; jsize; j++) -// printf("%9.6f ",gsl_vector_get(gsl_cqpminimizer_lm_eq(s), j)); -// printf("\n\n"); - -// printf("\nLagrange-multipliers for Cx>=d\n"); -// for(j=0; jsize; j++) -// printf("%9.6f ",gsl_vector_get(gsl_cqpminimizer_lm_ineq(s), j)); -// printf("\n\n"); - } - else - { - iter++; - } + // printf("\nLagrange-multipliers for Ax=b\n"); + // for(j=0; jsize; j++) + // printf("%9.6f ",gsl_vector_get(gsl_cqpminimizer_lm_eq(s), + // j)); + // printf("\n\n"); - } - while(status == GSL_CONTINUE && iter<=max_iter); + // printf("\nLagrange-multipliers for Cx>=d\n"); + // for(j=0; jsize; j++) + // printf("%9.6f + // ",gsl_vector_get(gsl_cqpminimizer_lm_ineq(s), + // j)); + // printf("\n\n"); + } else { + iter++; + } - bool valid_solution = true; + } while (status == GSL_CONTINUE && iter <= max_iter); - // If the solver bahaves instable, stop at this point - if( status != GSL_SUCCESS ) { - if( gsl_cqp_minimizer_test_infeasibility( s, 1e-10 ) != GSL_SUCCESS ) - valid_solution = false; - } + bool valid_solution = true; - if( valid_solution ) - gsl_vector_memcpy( x, gsl_cqpminimizer_x(s) ); + // If the solver bahaves instable, stop at this point + if (status != GSL_SUCCESS) { + if (gsl_cqp_minimizer_test_infeasibility(s, 1e-10) != GSL_SUCCESS) + valid_solution = false; + } + if (valid_solution) gsl_vector_memcpy(x, gsl_cqpminimizer_x(s)); - return GSL_SUCCESS; + return GSL_SUCCESS; } +// =============== HVS functions ============== +static double contrast_transducer(double C, double sensitivity, + datmoVisualModel visual_model) { + if (visual_model & vm_contrast_masking) { + const double W = pow(10, fabs(C)) - 1.; -// =============== HVS functions ============== + const double Q = 3., A = 3.291, B = 3.433, E = 0.8, k = 0.2599; + const double SC = sensitivity * W; -static double contrast_transducer( double C, double sensitivity, datmoVisualModel visual_model ) -{ - if( visual_model & vm_contrast_masking ) - { - const double W = pow( 10, fabs(C) ) - 1.; - - const double Q = 3., A = 3.291, B = 3.433, E = 0.8, k=0.2599; - const double SC = sensitivity*W; - - return sign(C) * A*(pow(1.+pow(SC,Q),1./3.)-1.)/(k*pow(B+SC,E)); - } - else - { - return C * sensitivity; - } + return sign(C) * A * (pow(1. + pow(SC, Q), 1. / 3.) - 1.) / + (k * pow(B + SC, E)); + } else { + return C * sensitivity; + } } /** @@ -677,85 +672,79 @@ * @param viewing_dist viewing distance in meters (default = 0.5m) * @return sensitivity */ -static double csf_daly( double rho, double theta, double l_adapt, double im_size, double viewing_dist = 0.5 ) -{ - if( rho == 0 ) - return 0; // To avoid singularity +static double csf_daly(double rho, double theta, double l_adapt, double im_size, + double viewing_dist = 0.5) { + if (rho == 0) return 0; // To avoid singularity - // Sensitivity calibration constant (from Daly's paper: 250) - const double P = 250.f; + // Sensitivity calibration constant (from Daly's paper: 250) + const double P = 250.f; - const double eps = 0.9; - const double i_pow2 = im_size; - const double l = l_adapt; - const double A = 0.801 * pow(1 + 0.7 / l, -0.20); - const double B = 0.3 * pow(1 + 100 / l, 0.15); + const double eps = 0.9; + const double i_pow2 = im_size; + const double l = l_adapt; + const double A = 0.801 * pow(1 + 0.7 / l, -0.20); + const double B = 0.3 * pow(1 + 100 / l, 0.15); - const double r_a = 0.856 * powf(viewing_dist, 0.14); - const double e = 0.0; // eccentricity in visual degrees - const double r_e = 1.0 / (1.0 + 0.24 * e); - const double r_a_r_e = r_a * r_e; + const double r_a = 0.856 * powf(viewing_dist, 0.14); + const double e = 0.0; // eccentricity in visual degrees + const double r_e = 1.0 / (1.0 + 0.24 * e); + const double r_a_r_e = r_a * r_e; - double S1, S2; + double S1, S2; - double B1 = B*eps*rho; - S1 = pow(pow(3.23 * pow(rho*rho * i_pow2, -0.3), 5.0) + 1.0, -0.2)* - A*eps*rho * exp(-B1) * sqrt(1 + 0.06*exp(B1)); + double B1 = B * eps * rho; + S1 = pow(pow(3.23 * pow(rho * rho * i_pow2, -0.3), 5.0) + 1.0, -0.2) * A * + eps * rho * exp(-B1) * sqrt(1 + 0.06 * exp(B1)); - const double ob=0.78; - const double r_theta = (1-ob)/2 * cosf(4.0 * theta) + (1+ob)/2; - rho = rho / (r_a_r_e * r_theta); + const double ob = 0.78; + const double r_theta = (1 - ob) / 2 * cosf(4.0 * theta) + (1 + ob) / 2; + rho = rho / (r_a_r_e * r_theta); - B1 = B*eps*rho; - S2 = powf(pow(3.23 * pow(rho*rho * i_pow2, -0.3), 5.0) + 1.0, -0.2)* - A*eps*rho * exp(-B1) * sqrt(1 + 0.06*exp(B1)); + B1 = B * eps * rho; + S2 = powf(pow(3.23 * pow(rho * rho * i_pow2, -0.3), 5.0) + 1.0, -0.2) * A * + eps * rho * exp(-B1) * sqrt(1 + 0.06 * exp(B1)); - return (S1 > S2 ? S2 : S1) * P; + return (S1 > S2 ? S2 : S1) * P; } -static double csf_datmo( double rho, double l_adapt, datmoVisualModel visual_model ) -{ - if( !(visual_model & vm_luminance_masking ) ) - l_adapt = 1000.; - if( !(visual_model & vm_csf ) ) - rho = 4.; +static double csf_datmo(double rho, double l_adapt, + datmoVisualModel visual_model) { + if (!(visual_model & vm_luminance_masking)) l_adapt = 1000.; + if (!(visual_model & vm_csf)) rho = 4.; - return csf_daly( rho, 0, l_adapt, 1 ); + return csf_daly(rho, 0, l_adapt, 1); } -static void compute_y( double *y, const gsl_vector *x, int *skip_lut, int x_count, int L, double Ld_min, double Ld_max ) -{ - double sum_d = 0; - double alpha = 1; - for( int k=0; k < L; k++ ) - { - sum_d += gsl_vector_get( x, k ); - } - double cy = log10(Ld_min) + alpha*(log10(Ld_max)-log10(Ld_min) - sum_d); - double dy; - y[0] = cy; - dy = 0; - for( int i=0; i < x_count-1; i++ ) - { - if( skip_lut[i] != -1 ) - { - // Check how many nodes spans this d_i - int j; - for ( j = i+1; j < (x_count-1) && skip_lut[j] == -1; j++ ) {}; - - if( j == (x_count-1) ) { // The last node - dy = 0; +static void compute_y(double *y, const gsl_vector *x, int *skip_lut, + int x_count, int L, double Ld_min, double Ld_max) { + double sum_d = 0; + double alpha = 1; + for (int k = 0; k < L; k++) { + sum_d += gsl_vector_get(x, k); + } + double cy = log10(Ld_min) + alpha * (log10(Ld_max) - log10(Ld_min) - sum_d); + double dy; + y[0] = cy; + dy = 0; + for (int i = 0; i < x_count - 1; i++) { + if (skip_lut[i] != -1) { + // Check how many nodes spans this d_i + int j; + for (j = i + 1; j < (x_count - 1) && skip_lut[j] == -1; j++) { + }; + + if (j == (x_count - 1)) { // The last node + dy = 0; + y[i] = cy; + cy += gsl_vector_get(x, skip_lut[i]); + continue; + } else + dy = gsl_vector_get(x, skip_lut[i]) / (double)(j - i); + } y[i] = cy; - cy += gsl_vector_get( x, skip_lut[i] ); - continue; - } else - dy = gsl_vector_get( x, skip_lut[i] ) / (double)(j-i); - } - y[i] = cy; - cy += dy; - } - y[x_count-1] = cy; - + cy += dy; + } + y[x_count - 1] = cy; } // =============== Tone mapping ============== @@ -767,438 +756,474 @@ * @param y output luminance value for the nodes C->x_scale. y must be * a pre-allocated array and has the same size as C->x_scale. */ -static int optimize_tonecurve( datmoConditionalDensity *C_pub, DisplayFunction *dm, DisplaySize */*ds*/, - float enh_factor, double *y, const float white_y, datmoVisualModel visual_model, double scene_l_adapt, pfs::Progress &ph ) { +static int optimize_tonecurve(datmoConditionalDensity *C_pub, + DisplayFunction *dm, DisplaySize * /*ds*/, + float enh_factor, double *y, const float white_y, + datmoVisualModel visual_model, + double scene_l_adapt, pfs::Progress &ph) { + conditional_density *C = (conditional_density *)C_pub; + + double d_dr = + log10(dm->display(1.f) / dm->display(0.f)); // display dynamic range + + // Create LUTs for CSF to speed up computations + std::vector csf_lut(C->f_count); + for (int f = 0; f < C->f_count; f++) { + csf_lut[f] = UniformArrayLUT(C->x_count, C->x_scale); + for (int i = 0; i < C->x_count; i++) + // csf_lut[f].y_i[i] = csf_daly( C->f_scale[f], 0, pow( 10., + // C->x_scale[i] + // ), 1 ); + csf_lut[f].y_i[i] = + csf_datmo(C->f_scale[f], pow(10., C->x_scale[i]), + visual_model); // In pfstmo 2.0.5 + } - conditional_density *C = (conditional_density*)C_pub; + const int max_neigh = (C->g_count - 1) / 2; - double d_dr = log10( dm->display( 1.f )/dm->display( 0.f ) ); // display dynamic range + // count number of needed equations and remove not used variables + // Create a structure of disconnected frameworks, which can be connected + // later + int k = 0; + std::vector skip_lut(C->x_count - 1); // LUT used to skip unused nodes + std::vector used_var(C->x_count - 1); // Used / unused variables + memset(&used_var[0], 0, sizeof(used_var[0]) * (C->x_count - 1)); + + int minmax_i[2] = {C->x_count - 1, 0}; + + for (int f = 0; f < C->f_count; f++) + for (int i = 0; i < C->x_count; i++) + for (int j = std::max(0, i - max_neigh); + j < std::min(C->x_count - 1, i + max_neigh); j++) { + if (i == j || (*C)(i, j - i + max_neigh, f) == 0) continue; + k++; + + const int from = std::min(i, j); + const int to = std::max(i, j); + for (int l = from; l <= to - 1; l++) { + used_var[l] = 1; + } + minmax_i[0] = std::min(minmax_i[0], from); + minmax_i[1] = std::max(minmax_i[1], to - 1); + } - // Create LUTs for CSF to speed up computations - std::vector csf_lut(C->f_count); - for( int f = 0; f < C->f_count; f++ ) { - csf_lut[f] = UniformArrayLUT( C->x_count, C->x_scale ); - for( int i=0; i < C->x_count; i++ ) - //csf_lut[f].y_i[i] = csf_daly( C->f_scale[f], 0, pow( 10., C->x_scale[i] ), 1 ); - csf_lut[f].y_i[i] = csf_datmo( C->f_scale[f], pow( 10., C->x_scale[i] ), visual_model ); // In pfstmo 2.0.5 - } - - const int max_neigh = (C->g_count-1)/2; - - // count number of needed equations and remove not used variables - // Create a structure of disconnected frameworks, which can be connected later - int k = 0; - std::vector skip_lut(C->x_count-1); // LUT used to skip unused nodes - std::vector used_var(C->x_count-1); // Used / unused variables - memset( &used_var[0], 0, sizeof( used_var[0] )*(C->x_count-1) ); - - int minmax_i[2] = { C->x_count-1, 0 }; - - for( int f=0; f < C->f_count; f++ ) - for( int i=0; i < C->x_count; i++ ) - for( int j = std::max(0,i-max_neigh); j < std::min(C->x_count-1,i+max_neigh); j++ ) { - if( i == j || (*C)(i,j-i+max_neigh,f) == 0 ) - continue; + int white_i = 0; + if (white_y > 0) { k++; + const float white_l = log10(white_y); + // find i that corresponds to the reference white + int i; + for (i = C->x_count - 1; i >= 0; i--) + if (C->x_scale[i] <= white_l) break; + white_i = i; + used_var[white_i] = 1; + minmax_i[0] = std::min(minmax_i[0], white_i); + minmax_i[1] = std::max(minmax_i[1], white_i); + } - const int from = std::min(i,j); - const int to = std::max(i,j); - for( int l = from; l <= to-1; l++ ) { - used_var[l] = 1; - } - minmax_i[0] = std::min( minmax_i[0], from ); - minmax_i[1] = std::max( minmax_i[1], to-1 ); - } - - int white_i=0; - if( white_y > 0 ) { - k++; - const float white_l = log10( white_y ); - // find i that corresponds to the reference white - int i; - for( i = C->x_count-1; i >= 0; i-- ) - if( C->x_scale[i] <= white_l ) - break; - white_i = i; - used_var[white_i] = 1; - minmax_i[0] = std::min( minmax_i[0], white_i ); - minmax_i[1] = std::max( minmax_i[1], white_i ); - } - - // Create skip lookup table (to remove selected columns that contain all zeros) - int i = 0; - int fwrk = 0; // Number if missing contrast ranges - for( int l = 0; l < C->x_count-1; l++ ) { - if( l < minmax_i[0] || l > minmax_i[1] ) { - skip_lut[l] = -1; - continue; - } - if( !used_var[l] ) { - if( l>0 && !used_var[l-1] ) { - skip_lut[l] = -1; - continue; - } - fwrk++; - } - skip_lut[l] = i++; - } - - const int M = k+fwrk; // number of equations - const int L = i; // Number of non-zero d_i variables - -// Constraints -// all intervals must be >=0 -// sum of intervals must be equal displayable dynamic range - - // Ale = [eye(interval_count); -ones(1,interval_count)]; - - auto_matrix Ale(gsl_matrix_calloc(L+1, L)); - gsl_matrix_set_identity( Ale ); - gsl_matrix_view lower_row = gsl_matrix_submatrix( Ale, L, 0, 1, L ); - gsl_matrix_set_all( &lower_row.matrix, -1 ); - - // ble = [zeros(interval_count,1); -d_dr]; - auto_vector ble(gsl_vector_calloc(L+1)); - gsl_vector_set( ble, L, -d_dr ); - - auto_matrix A(gsl_matrix_calloc(M, L)); - auto_vector B(gsl_vector_alloc(M)); - auto_vector N(gsl_vector_alloc(M)); - - std::vector band(M); // Frequency band (index) - std::vector back_x(M); // Background luminance (index) - - k = 0; - for( int f=0; f < C->f_count; f++ ) { - //const double sensitivity = csf_daly( C->f_scale[f], 0., 1000., 1. ); - double sensitivity = csf_daly( C->f_scale[f], 0., 1000., 1. ); // In pfstmo 2.0.5 sensitivity may be uninizialized - if( scene_l_adapt != -1 ) - sensitivity = csf_datmo( C->f_scale[f], scene_l_adapt, visual_model ); - - for( int i=0; i < C->x_count; i++ ) - for( int j = std::max(0,i-max_neigh); j < std::min(C->x_count-1,i+max_neigh); j++ ) { - if( i == j || (*C)(i,j-i+max_neigh,f) == 0 ) - continue; - - const int from = std::min(i,j); - const int to = std::max(i,j); - -// A(k,min(i,j):(max(i,j)-1)) = 1; - for( int l = from; l <= to-1; l++ ) { - if( skip_lut[l] == -1 ) + // Create skip lookup table (to remove selected columns that contain all + // zeros) + int i = 0; + int fwrk = 0; // Number if missing contrast ranges + for (int l = 0; l < C->x_count - 1; l++) { + if (l < minmax_i[0] || l > minmax_i[1]) { + skip_lut[l] = -1; continue; - gsl_matrix_set( A, k, skip_lut[l], 1 ); } - - if( scene_l_adapt == -1 ) { - sensitivity = csf_lut[f].interp( C->x_scale[from] ); + if (!used_var[l]) { + if (l > 0 && !used_var[l - 1]) { + skip_lut[l] = -1; + continue; + } + fwrk++; } + skip_lut[l] = i++; + } -// B(k,1) = l_scale(max(i,j)) - l_scale(min(i,j)); - gsl_vector_set( B, k, contrast_transducer( (C->x_scale[to] - C->x_scale[from])*enh_factor, sensitivity, visual_model ) ); + const int M = k + fwrk; // number of equations + const int L = i; // Number of non-zero d_i variables -// N(k,k) = jpf(j-i+max_neigh+1,i,band); - gsl_vector_set( N, k, (*C)(i,j-i+max_neigh,f) ); + // Constraints + // all intervals must be >=0 + // sum of intervals must be equal displayable dynamic range + + // Ale = [eye(interval_count); -ones(1,interval_count)]; + + auto_matrix Ale(gsl_matrix_calloc(L + 1, L)); + gsl_matrix_set_identity(Ale); + gsl_matrix_view lower_row = gsl_matrix_submatrix(Ale, L, 0, 1, L); + gsl_matrix_set_all(&lower_row.matrix, -1); + + // ble = [zeros(interval_count,1); -d_dr]; + auto_vector ble(gsl_vector_calloc(L + 1)); + gsl_vector_set(ble, L, -d_dr); + + auto_matrix A(gsl_matrix_calloc(M, L)); + auto_vector B(gsl_vector_alloc(M)); + auto_vector N(gsl_vector_alloc(M)); + + std::vector band(M); // Frequency band (index) + std::vector back_x(M); // Background luminance (index) + + k = 0; + for (int f = 0; f < C->f_count; f++) { + // const double sensitivity = csf_daly( C->f_scale[f], 0., 1000., 1. ); + double sensitivity = + csf_daly(C->f_scale[f], 0., 1000., + 1.); // In pfstmo 2.0.5 sensitivity may be uninizialized + if (scene_l_adapt != -1) + sensitivity = csf_datmo(C->f_scale[f], scene_l_adapt, visual_model); + + for (int i = 0; i < C->x_count; i++) + for (int j = std::max(0, i - max_neigh); + j < std::min(C->x_count - 1, i + max_neigh); j++) { + if (i == j || (*C)(i, j - i + max_neigh, f) == 0) continue; + + const int from = std::min(i, j); + const int to = std::max(i, j); + + // A(k,min(i,j):(max(i,j)-1)) = 1; + for (int l = from; l <= to - 1; l++) { + if (skip_lut[l] == -1) continue; + gsl_matrix_set(A, k, skip_lut[l], 1); + } + + if (scene_l_adapt == -1) { + sensitivity = csf_lut[f].interp(C->x_scale[from]); + } + + // B(k,1) = l_scale(max(i,j)) - l_scale(min(i,j)); + gsl_vector_set( + B, k, contrast_transducer( + (C->x_scale[to] - C->x_scale[from]) * enh_factor, + sensitivity, visual_model)); - band[k] = f; - back_x[k] = i; + // N(k,k) = jpf(j-i+max_neigh+1,i,band); + gsl_vector_set(N, k, (*C)(i, j - i + max_neigh, f)); - k++; - } - } - - if( white_y > 0 ) { - for( int l = white_i; l < C->x_count-1; l++ ) { - if( skip_lut[l] == -1 ) - continue; - gsl_matrix_set( A, k, skip_lut[l], 1 ); - } - gsl_vector_set( B, k, 0 ); - gsl_vector_set( N, k, C->total * 0.1 ); // Strength of reference white anchoring - band[k] = 0; - back_x[k] = white_i; - k++; - } - - // Connect disconnected frameworks - // This is the case when there is no contrast between some patches in an image - { - for( int i = minmax_i[0]; i <= minmax_i[1]; i++ ) { - if( !used_var[i] ) { - const int from = i; - int to = i+1; - while( !used_var[to] ) - to++; - assert( k < M ); - for( int l = from; l <= to-1; l++ ) { - if( skip_lut[l] == -1 ) - continue; - gsl_matrix_set( A, k, skip_lut[l], 1 ); - } - //const double sensitivity = csf_daly( C->f_scale[C->f_count-1], 0., 1000., 1. ); - //gsl_vector_set( B, k, contrast_transducer( (C->x_scale[to] - C->x_scale[from])*enh_factor, sensitivity ) ); - double sensitivity; - if( scene_l_adapt == -1 ) { - sensitivity = csf_lut[C->f_count-1].interp( C->x_scale[from] ); - } else - sensitivity = csf_datmo( C->f_scale[C->f_count-1], scene_l_adapt, visual_model ); + band[k] = f; + back_x[k] = i; - // const double sensitivity = csf_datmo( C->f_scale[C->f_count-1], scene_l_adapt, visual_model ); - gsl_vector_set( B, k, contrast_transducer( (C->x_scale[to] - C->x_scale[from])*enh_factor, sensitivity, visual_model ) ); + k++; + } + } - gsl_vector_set( N, k, C->total * 0.1 ); // Strength of framework anchoring - band[k] = C->f_count-1; - back_x[k] = to; + if (white_y > 0) { + for (int l = white_i; l < C->x_count - 1; l++) { + if (skip_lut[l] == -1) continue; + gsl_matrix_set(A, k, skip_lut[l], 1); + } + gsl_vector_set(B, k, 0); + gsl_vector_set( + N, k, + C->total * 0.1); // Strength of reference white anchoring + band[k] = 0; + back_x[k] = white_i; k++; - i = to; - } } - } - - auto_matrix H(gsl_matrix_alloc(L, L)); - auto_vector f(gsl_vector_alloc(L)); - auto_matrix NA(gsl_matrix_alloc(M, L)); - auto_matrix AK(gsl_matrix_alloc(M, L)); - auto_vector Ax(gsl_vector_alloc(M)); - auto_vector K(gsl_vector_alloc(M)); - auto_vector x(gsl_vector_alloc(L)); - auto_vector x_old(gsl_vector_alloc(L)); - - gsl_vector_set_all( x, d_dr/L ); - int max_iter = 200; - if( !(visual_model & vm_contrast_masking) ) - max_iter = 1; - - for( int it = 0; it < max_iter; it++ ) { - -// fprintf( stderr, "Iteration #%d\n", it ); - - // Compute y values for the current solution - compute_y( y, x, &skip_lut[0], C->x_count, L, dm->display(0), dm->display(1) ); + // Connect disconnected frameworks + // This is the case when there is no contrast between some patches in an + // image + { + for (int i = minmax_i[0]; i <= minmax_i[1]; i++) { + if (!used_var[i]) { + const int from = i; + int to = i + 1; + while (!used_var[to]) to++; + assert(k < M); + for (int l = from; l <= to - 1; l++) { + if (skip_lut[l] == -1) continue; + gsl_matrix_set(A, k, skip_lut[l], 1); + } + // const double sensitivity = csf_daly( + // C->f_scale[C->f_count-1], 0., + // 1000., 1. ); + // gsl_vector_set( B, k, contrast_transducer( (C->x_scale[to] - + // C->x_scale[from])*enh_factor, sensitivity ) ); + double sensitivity; + if (scene_l_adapt == -1) { + sensitivity = + csf_lut[C->f_count - 1].interp(C->x_scale[from]); + } else + sensitivity = csf_datmo(C->f_scale[C->f_count - 1], + scene_l_adapt, visual_model); + + // const double sensitivity = csf_datmo( + // C->f_scale[C->f_count-1], + // scene_l_adapt, visual_model ); + gsl_vector_set( + B, k, contrast_transducer( + (C->x_scale[to] - C->x_scale[from]) * enh_factor, + sensitivity, visual_model)); + + gsl_vector_set( + N, k, + C->total * 0.1); // Strength of framework anchoring + band[k] = C->f_count - 1; + back_x[k] = to; + k++; + i = to; + } + } + } - // Ax = A*x - gsl_blas_dgemv( CblasNoTrans, 1, A, x, 0, Ax ); + auto_matrix H(gsl_matrix_alloc(L, L)); + auto_vector f(gsl_vector_alloc(L)); + auto_matrix NA(gsl_matrix_alloc(M, L)); + auto_matrix AK(gsl_matrix_alloc(M, L)); + auto_vector Ax(gsl_vector_alloc(M)); + auto_vector K(gsl_vector_alloc(M)); + auto_vector x(gsl_vector_alloc(L)); + auto_vector x_old(gsl_vector_alloc(L)); + + gsl_vector_set_all(x, d_dr / L); + + int max_iter = 200; + if (!(visual_model & vm_contrast_masking)) max_iter = 1; + + for (int it = 0; it < max_iter; it++) { + // fprintf( stderr, "Iteration #%d\n", it ); + + // Compute y values for the current solution + compute_y(y, x, &skip_lut[0], C->x_count, L, dm->display(0), + dm->display(1)); + + // Ax = A*x + gsl_blas_dgemv(CblasNoTrans, 1, A, x, 0, Ax); + + // T(rng{band}) = cont_transd( Ax(rng{band}), band, DD(rng{band},:)*y' ) + // ./ + // Axd(rng{band}); + for (int k = 0; k < M; k++) { + double sensitivity = csf_lut[band[k]].interp(y[back_x[k]]); + const double Ax_k = gsl_vector_get(Ax, k); + const double denom = (fabs(Ax_k) < 0.0001 ? 1. : Ax_k); + // gsl_vector_set( K, k, contrast_transducer( Ax_k, sensitivity ) / + // denom + // ); + gsl_vector_set( + K, k, + contrast_transducer(Ax_k, sensitivity, visual_model) / denom); + } - // T(rng{band}) = cont_transd( Ax(rng{band}), band, DD(rng{band},:)*y' ) ./ Axd(rng{band}); - for( int k=0; k < M; k++ ){ - double sensitivity = csf_lut[band[k]].interp( y[back_x[k]] ); - const double Ax_k = gsl_vector_get( Ax, k ); - const double denom = (fabs(Ax_k) < 0.0001 ? 1. : Ax_k ); - //gsl_vector_set( K, k, contrast_transducer( Ax_k, sensitivity ) / denom ); - gsl_vector_set( K, k, contrast_transducer( Ax_k, sensitivity, visual_model ) / denom ); - } + // AK = A*K; + mult_rows(A, K, AK); - // AK = A*K; - mult_rows( A, K, AK ); + // NA = N*A; + mult_rows(AK, N, NA); - // NA = N*A; - mult_rows( AK, N, NA ); + // H = AK'*NA; + gsl_blas_dgemm(CblasTrans, CblasNoTrans, 1, AK, NA, 0, H); - // H = AK'*NA; - gsl_blas_dgemm( CblasTrans, CblasNoTrans, 1, AK, NA, 0, H ); + // f = -B'*NA = - NA' * B; + gsl_blas_dgemv(CblasTrans, -1, NA, B, 0, f); - // f = -B'*NA = - NA' * B; - gsl_blas_dgemv( CblasTrans, -1, NA, B, 0, f ); + gsl_vector_memcpy(x_old, x); - gsl_vector_memcpy( x_old, x ); + solve(H, f, Ale, ble, x); - solve( H, f, Ale, ble, x ); + /* + if (status == GSL_FAILURE) + { + std::cout << "GSL_FAILURE" << std::endl; + return PFSTMO_ERROR; + } + */ - /* - if (status == GSL_FAILURE) - { - std::cout << "GSL_FAILURE" << std::endl; - return PFSTMO_ERROR; + // Check for convergence + double min_delta = + (C->x_scale[1] - C->x_scale[0]) / 10.; // minimum acceptable change + bool converged = true; + for (int i = 0; i < L; i++) { + double delta = + fabs(gsl_vector_get(x, i) - gsl_vector_get(x_old, i)); + if (delta > min_delta) { + converged = false; + break; + } + } + if (converged) break; } - */ + ph.setValue(95); + if (ph.canceled()) return PFSTMO_ABORTED; // PFSTMO_OK is right - // Check for convergence - double min_delta = (C->x_scale[1]-C->x_scale[0])/10.; // minimum acceptable change - bool converged = true; - for( int i=0; i < L; i++ ) { - double delta = fabs( gsl_vector_get(x,i) - gsl_vector_get(x_old,i) ); - if( delta > min_delta ) { - converged = false; - break; - } - } - if( converged ) - break; - } - ph.setValue( 95 ); - if (ph.canceled()) - return PFSTMO_ABORTED; // PFSTMO_OK is right - -// for( int i=0; i < L; i++ ) -// fprintf( stderr, "%9.6f ", gsl_vector_get( x, i ) ); -// fprintf( stderr, "\n" ); - - compute_y( y, x, &skip_lut[0], C->x_count, L, dm->display(0), dm->display(1) ); - - return PFSTMO_OK; -} - -int datmo_compute_tone_curve( datmoToneCurve *tc, datmoConditionalDensity *cond_dens, - DisplayFunction *df, DisplaySize *ds, const float enh_factor, - const float white_y, datmoVisualModel visual_model, double scene_l_adapt, pfs::Progress &ph ) -{ - conditional_density *c = (conditional_density*)cond_dens; - tc->init( c->x_count, c->x_scale ); - return optimize_tonecurve( cond_dens, df, ds, enh_factor, tc->y_i, white_y, visual_model, scene_l_adapt, ph ); + // for( int i=0; i < L; i++ ) + // fprintf( stderr, "%9.6f ", gsl_vector_get( x, i ) ); + // fprintf( stderr, "\n" ); + + compute_y(y, x, &skip_lut[0], C->x_count, L, dm->display(0), + dm->display(1)); + + return PFSTMO_OK; +} + +int datmo_compute_tone_curve(datmoToneCurve *tc, + datmoConditionalDensity *cond_dens, + DisplayFunction *df, DisplaySize *ds, + const float enh_factor, const float white_y, + datmoVisualModel visual_model, + double scene_l_adapt, pfs::Progress &ph) { + conditional_density *c = (conditional_density *)cond_dens; + tc->init(c->x_count, c->x_scale); + return optimize_tonecurve(cond_dens, df, ds, enh_factor, tc->y_i, white_y, + visual_model, scene_l_adapt, ph); } - - /** - * Apply tone curve with color correction (http://zgk.wi.ps.pl/color_correction/) + * Apply tone curve with color correction + * (http://zgk.wi.ps.pl/color_correction/) */ -int datmo_apply_tone_curve_cc( float *R_out, float *G_out, float *B_out, int width, int height, - const float *R_in, const float *G_in, const float *B_in, const float *L_in, datmoToneCurve *tc, - DisplayFunction *df, const float saturation_factor ) -{ - // Create LUT: log10( lum factor ) -> pixel value - UniformArrayLUT tc_lut( tc->size, tc->x_i ); - for( size_t i=0; i < tc->size; i++ ) { - tc_lut.y_i[i] = (float)pow( 10, tc->y_i[i] ); -// tc_lut.y_i[i] = df->inv_display( (float)pow( 10, tc->y_i[i] ) ); - } - - // Create LUT: log10( lum factor ) -> saturation correction (for the tone-level) - UniformArrayLUT cc_lut( tc->size, tc->x_i ); - for( size_t i=0; i < tc->size-1; i++ ) { - //const float contrast = std::max( (tc->y_i[i+1]-tc->y_i[i])/(tc->x_i[i+1]-tc->x_i[i]), 0.d ); // In pfstmo 2.0.5 - const float contrast = std::max( (float)(tc->y_i[i+1]-tc->y_i[i])/(float)(tc->x_i[i+1]-tc->x_i[i]), 0.0f ); // In pfstmo 2.0.5 - const float k1 = 1.48f; - const float k2 = 0.82f; - cc_lut.y_i[i] = ( (1 + k1)*pow(contrast,k2) )/( 1 + k1*pow(contrast,k2) ) * saturation_factor; - } - cc_lut.y_i[tc->size-1] = 1; - - const long pix_count = width*height; - -#pragma omp parallel for default(none) shared(R_in,G_in,B_in,L_in,R_out,G_out,B_out,tc_lut,cc_lut,df) - for (long i=0; i < pix_count; i++) - { - float L_fix = clamp_channel(L_in[i]); - const float L_out = tc_lut.interp( log10(L_fix) ); - const float s = cc_lut.interp( log10(L_fix) ); // color correction -#ifdef LUMINANCE_USE_SSE - v4sf vec = _mm_set_ps(R_in[i], G_in[i], B_in[i], 0) / _mm_set1_ps(L_fix); - vec = _mm_max_ps(vec, _mm_set1_ps(MIN_PHVAL)); - vec = _mm_pow_ps(vec, _mm_set1_ps(s)); - vec = vec * _mm_set1_ps(L_out); - vec = df->inv_display(vec); - float tmp[4]; - _mm_store_ps(tmp, vec); - R_out[i] = tmp[3]; - G_out[i] = tmp[2]; - B_out[i] = tmp[1]; +int datmo_apply_tone_curve_cc(float *R_out, float *G_out, float *B_out, + size_t width, size_t height, const float *R_in, + const float *G_in, const float *B_in, + const float *L_in, datmoToneCurve *tc, + DisplayFunction *df, + const float saturation_factor) { + // Create LUT: log10( lum factor ) -> pixel value + UniformArrayLUT tc_lut(tc->size, tc->x_i); + for (size_t i = 0; i < tc->size; i++) { + tc_lut.y_i[i] = (float)pow(10, tc->y_i[i]); + // tc_lut.y_i[i] = df->inv_display( (float)pow( 10, tc->y_i[i] ) ); + } + + // Create LUT: log10( lum factor ) -> saturation correction (for the + // tone-level) + UniformArrayLUT cc_lut(tc->size, tc->x_i); + for (size_t i = 0; i < tc->size - 1; i++) { + // const float contrast = std::max( + // (tc->y_i[i+1]-tc->y_i[i])/(tc->x_i[i+1]-tc->x_i[i]), 0.d ); // In + // pfstmo + // 2.0.5 + const float contrast = + std::max((float)(tc->y_i[i + 1] - tc->y_i[i]) / + (float)(tc->x_i[i + 1] - tc->x_i[i]), + 0.0f); // In pfstmo 2.0.5 + const float k1 = 1.48f; + const float k2 = 0.82f; + cc_lut.y_i[i] = ((1 + k1) * powf(contrast, k2)) / + (1 + k1 * powf(contrast, k2)) * saturation_factor; + } + cc_lut.y_i[tc->size - 1] = 1; + + const size_t pix_count = width * height; +#pragma omp parallel for \ + shared(R_in, G_in, B_in, L_in, R_out, G_out, B_out, tc_lut, cc_lut, df) + for (size_t i = 0; i < pix_count; i++) { + float L_fix = clamp_channel(L_in[i]); + const float l10 = log10(L_fix); + const float L_out = tc_lut.interp(l10); + const float s = cc_lut.interp(l10); // color correction +#ifdef __SSE2__ + vfloat vec = _mm_set_ps(R_in[i], G_in[i], B_in[i], 0) / F2V(L_fix); + vec = vmaxf(vec, F2V(MIN_PHVAL)); + vec = pow_F(vec, F2V(s)); + vec = vec * F2V(L_out); + vec = df->inv_display(vec); + float tmp[4]; + STVFU(tmp[0], vec); + R_out[i] = tmp[3]; + G_out[i] = tmp[2]; + B_out[i] = tmp[1]; #else - R_out[i] = df->inv_display(powf(clamp_channel(R_in[i]/L_fix), s) * L_out); - G_out[i] = df->inv_display(powf(clamp_channel(G_in[i]/L_fix), s) * L_out); - B_out[i] = df->inv_display(powf(clamp_channel(B_in[i]/L_fix), s) * L_out); + R_out[i] = + df->inv_display(pow_F(clamp_channel(R_in[i] / L_fix), s) * L_out); + G_out[i] = + df->inv_display(pow_F(clamp_channel(G_in[i] / L_fix), s) * L_out); + B_out[i] = + df->inv_display(pow_F(clamp_channel(B_in[i] / L_fix), s) * L_out); #endif - } + } - return PFSTMO_OK; + return PFSTMO_OK; } // Pre-computed IIR filters - for different frame rates -double t_filter_a_25fps[] = { 1.000000000000000, -2.748835809214676, 2.528231219142559, -0.777638560238080 }; -double t_filter_b_25fps[] = { 0.000219606211225409, 0.000658818633676228, 0.000658818633676228, 0.000219606211225409 }; - -double t_filter_a_30fps[] = { 1.000000000000000, -2.790655305284069, 2.602653173508124, -0.810960871907291 }; -double t_filter_b_30fps[] = { 0.000129624539595474, 0.000388873618786423, 0.000388873618786423, 0.000129624539595474 }; - -double t_filter_a_60fps[] = { 1.000000000000000, -2.895292177877897, 2.795994584283360, -0.900566088981622 }; -double t_filter_b_60fps[] = { 0.0000170396779801130, 0.0000511190339403389, 0.0000511190339403389, 0.0000170396779801130 }; - - -datmoTCFilter::datmoTCFilter( float fps, float y_min, float y_max ) : - y_min( y_min ), y_max( y_max ), fps( fps ) -{ - assert( fps == 25 || fps == 30 || fps == 60 ); - if( fps == 60 ) { - t_filter_a = t_filter_a_60fps; - t_filter_b = t_filter_b_60fps; - } else if( fps == 30 ) { - t_filter_a = t_filter_a_30fps; - t_filter_b = t_filter_b_30fps; - } else { - t_filter_a = t_filter_a_25fps; - t_filter_b = t_filter_b_25fps; - } +double t_filter_a_25fps[] = {1.000000000000000, -2.748835809214676, + 2.528231219142559, -0.777638560238080}; +double t_filter_b_25fps[] = {0.000219606211225409, 0.000658818633676228, + 0.000658818633676228, 0.000219606211225409}; + +double t_filter_a_30fps[] = {1.000000000000000, -2.790655305284069, + 2.602653173508124, -0.810960871907291}; +double t_filter_b_30fps[] = {0.000129624539595474, 0.000388873618786423, + 0.000388873618786423, 0.000129624539595474}; + +double t_filter_a_60fps[] = {1.000000000000000, -2.895292177877897, + 2.795994584283360, -0.900566088981622}; +double t_filter_b_60fps[] = {0.0000170396779801130, 0.0000511190339403389, + 0.0000511190339403389, 0.0000170396779801130}; + +datmoTCFilter::datmoTCFilter(float fps, float y_min, float y_max) + : y_min(y_min), y_max(y_max) { + assert(fps == 25 || fps == 30 || fps == 60); + if (fps == 60) { + t_filter_a = t_filter_a_60fps; + t_filter_b = t_filter_b_60fps; + } else if (fps == 30) { + t_filter_a = t_filter_a_30fps; + t_filter_b = t_filter_b_30fps; + } else { + t_filter_a = t_filter_a_25fps; + t_filter_b = t_filter_b_25fps; + } - pos = -1; - sz = 0; + pos = -1; + sz = 0; } -datmoToneCurve *datmoTCFilter::getToneCurvePtr() -{ - pos++; - if( pos == DATMO_TF_TAPSIZE ) - pos = 0; +datmoToneCurve *datmoTCFilter::getToneCurvePtr() { + pos++; + if (pos == DATMO_TF_TAPSIZE) pos = 0; - sz++; - if( sz > DATMO_TF_TAPSIZE ) - sz = DATMO_TF_TAPSIZE; + sz++; + if (sz > DATMO_TF_TAPSIZE) sz = DATMO_TF_TAPSIZE; - return ring_buffer_org + pos; + return ring_buffer_org + pos; } -datmoToneCurve *datmoTCFilter::filterToneCurve() -{ - datmoToneCurve *tc_o = ring_buffer_org + pos; - datmoToneCurve *tc_f = ring_buffer_filt + pos; - - tc_f->init( tc_o->size, tc_o->x_i ); - if( tc_filt_clamp.x_i == NULL ) - tc_filt_clamp.init( tc_o->size, tc_o->x_i ); - for( size_t j=0; j < tc_f->size; j++ ) - tc_f->y_i[j] = 0; - - for( int tt=0; tt < DATMO_TF_TAPSIZE; tt++ ) { - datmoToneCurve *x = get_tc(ring_buffer_org,tt); - datmoToneCurve *y; - if( tt >= sz ) - y = x; - else - y = get_tc(ring_buffer_filt,tt); +datmoToneCurve *datmoTCFilter::filterToneCurve() { + datmoToneCurve *tc_o = ring_buffer_org + pos; + datmoToneCurve *tc_f = ring_buffer_filt + pos; - for( size_t j=0; j < tc_f->size; j++ ) { - tc_f->y_i[j] += t_filter_b[tt] * x->y_i[j]; - if( tt > 0 ) - tc_f->y_i[j] -= t_filter_a[tt] * y->y_i[j]; - } - } - - // Copy to dest array and clamp - // Note that the clamped values cannot be used for filtering as they - // would cause too much rippling for the IIR filter - for( size_t j=0; j < tc_f->size; j++ ) { - if( tc_f->y_i[j] < y_min ) { - tc_filt_clamp.y_i[j] = y_min; - } else if( tc_f->y_i[j] > y_max ) { - tc_filt_clamp.y_i[j] = y_max; - } else - tc_filt_clamp.y_i[j] = tc_f->y_i[j]; - } + tc_f->init(tc_o->size, tc_o->x_i); + if (tc_filt_clamp.x_i == NULL) tc_filt_clamp.init(tc_o->size, tc_o->x_i); + for (size_t j = 0; j < tc_f->size; j++) tc_f->y_i[j] = 0; - return &tc_filt_clamp; -} + for (int tt = 0; tt < DATMO_TF_TAPSIZE; tt++) { + datmoToneCurve *x = get_tc(ring_buffer_org, tt); + datmoToneCurve *y; + if (tt >= sz) + y = x; + else + y = get_tc(ring_buffer_filt, tt); -datmoToneCurve *datmoTCFilter::get_tc( datmoToneCurve *ring_buf, int time ) -{ - if( time >= sz ) - time = sz-1; + for (size_t j = 0; j < tc_f->size; j++) { + tc_f->y_i[j] += t_filter_b[tt] * x->y_i[j]; + if (tt > 0) tc_f->y_i[j] -= t_filter_a[tt] * y->y_i[j]; + } + } - int p = pos - time; - if( p < 0 ) - p = p + DATMO_TF_TAPSIZE; + // Copy to dest array and clamp + // Note that the clamped values cannot be used for filtering as they + // would cause too much rippling for the IIR filter + for (size_t j = 0; j < tc_f->size; j++) { + if (tc_f->y_i[j] < y_min) { + tc_filt_clamp.y_i[j] = y_min; + } else if (tc_f->y_i[j] > y_max) { + tc_filt_clamp.y_i[j] = y_max; + } else + tc_filt_clamp.y_i[j] = tc_f->y_i[j]; + } - return ring_buf + p; + return &tc_filt_clamp; } +datmoToneCurve *datmoTCFilter::get_tc(datmoToneCurve *ring_buf, int time) { + if (time >= sz) time = sz - 1; + int p = pos - time; + if (p < 0) p = p + DATMO_TF_TAPSIZE; + return ring_buf + p; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,80 +29,81 @@ * $Id: display_adaptive_tmo.h,v 1.12 2009/02/23 18:46:36 rafm Exp $ */ -#include "display_function.h" -#include "display_size.h" +#ifndef MANTIUK08_DISPLAY_ADAPTIVE_H +#define MANTIUK08_DISPLAY_ADAPTIVE_H -#include "TonemappingOperators/pfstmo.h" -#include "Libpfs/pfs.h" +#include -namespace pfs -{ +#include +#include +#include +#include + +namespace pfs { class Progress; } -#define DATMO_TF_TAPSIZE 4 /* Number of samples required for the temporal filter */ +#define DATMO_TF_TAPSIZE \ + 4 /* Number of samples required for the temporal filter */ -class datmoToneCurve -{ - bool own_y_i; -public: - size_t size; - const double *x_i; /* log10 of input luminance factor */ - double *y_i; /* log10 of output luminance (use inverse display model to get pixel values) */ +class datmoToneCurve { + bool own_y_i; - datmoToneCurve(); - ~datmoToneCurve(); + public: + size_t size; + const double *x_i; /* log10 of input luminance factor */ + double *y_i; /* log10 of output luminance (use inverse display model to get + pixel values) */ - void init( size_t n_size, const double *n_x_i, double *n_y_i = NULL ); - void free(); + datmoToneCurve(); + ~datmoToneCurve(); + void init(size_t n_size, const double *n_x_i, double *n_y_i = NULL); + void free(); }; - -class datmoTCFilter -{ - int sz; - size_t pos; - float y_min, y_max, fps; - - double *t_filter_a, *t_filter_b; - - datmoToneCurve ring_buffer_org[DATMO_TF_TAPSIZE]; // original - datmoToneCurve ring_buffer_filt[DATMO_TF_TAPSIZE]; // filtered - datmoToneCurve tc_filt_clamp; // filtered and clammped tone-curve - - datmoToneCurve *get_tc( datmoToneCurve *ring_buf, int time ); -public: - /** - * Create a temporal filter for tone-curves. This shoudl be used to - * tonemap video sequences. - * - * @param fps - frames per second. Only certain values are allowed - * as all filters are precomputed at the moment. See the code for - * more details. - * @param y_min - minimum log10 display luminance (for clamping the - * results) - * @param y_max - maximum log10 display luminance (for clamping the - * results) - */ - datmoTCFilter( float fps, float y_min, float y_max ); - - /** - * Get the pointer to store the tone-curve. - */ - datmoToneCurve *getToneCurvePtr(); - - /** - * Get the filterted tone-curve. - */ - datmoToneCurve *filterToneCurve(); +class datmoTCFilter { + int sz; + size_t pos; + float y_min, y_max; + + double *t_filter_a, *t_filter_b; + + datmoToneCurve ring_buffer_org[DATMO_TF_TAPSIZE]; // original + datmoToneCurve ring_buffer_filt[DATMO_TF_TAPSIZE]; // filtered + datmoToneCurve tc_filt_clamp; // filtered and clammped tone-curve + + datmoToneCurve *get_tc(datmoToneCurve *ring_buf, int time); + + public: + /** + * Create a temporal filter for tone-curves. This shoudl be used to + * tonemap video sequences. + * + * @param fps - frames per second. Only certain values are allowed + * as all filters are precomputed at the moment. See the code for + * more details. + * @param y_min - minimum log10 display luminance (for clamping the + * results) + * @param y_max - maximum log10 display luminance (for clamping the + * results) + */ + datmoTCFilter(float fps, float y_min, float y_max); + + /** + * Get the pointer to store the tone-curve. + */ + datmoToneCurve *getToneCurvePtr(); + + /** + * Get the filterted tone-curve. + */ + datmoToneCurve *filterToneCurve(); }; - -class datmoConditionalDensity -{ -public: - virtual ~datmoConditionalDensity(); +class datmoConditionalDensity { + public: + virtual ~datmoConditionalDensity(); }; typedef int datmoVisualModel; @@ -134,7 +135,8 @@ * @param G_in green input radiance map. * @param B_in blue input radiance map. * @param L_in input luminance map (L=0.212656*R + 0.715158*G + 0.072186*B) - * @param df display function. See DisplayFunction class documentation for more details. + * @param df display function. See DisplayFunction class documentation for more + * details. * @param ds display size. See DisplaySize class documentation for more details. * @param enh_factor conrast enhancement factor. See man * pfstmo_mantiuk08 page for details @@ -142,17 +144,20 @@ * pfstmo_mantiuk08 page for details * @param white_y luminance factor in the input image that should be * mapped to the maximum luminance of a display. If the parameter is - * set to -1, the tone-mapper will not anchor to white (recommended for HDR images). - * @param progress_cb callback function for reporting progress or stopping computations. + * set to -1, the tone-mapper will not anchor to white (recommended for HDR + * images). + * @param progress_cb callback function for reporting progress or stopping + * computations. * @return PFSTMO_OK if tone-mapping was sucessful, PFSTMO_ABORTED if * it was stopped from a callback function and PFSTMO_ERROR if an * error was encountered. */ -int datmo_tonemap( float *R_out, float *G_out, float *B_out, int width, int height, - const float *R_in, const float *G_in, const float *B_in, const float *L_in, - DisplayFunction *df, DisplaySize *ds, const float enh_factor, const float saturation_factor, - const float white_y, pfs::Progress &ph ); - +int datmo_tonemap(float *R_out, float *G_out, float *B_out, int width, + int height, const float *R_in, const float *G_in, + const float *B_in, const float *L_in, DisplayFunction *df, + DisplaySize *ds, const float enh_factor, + const float saturation_factor, const float white_y, + pfs::Progress &ph); /** * Computes image statistics required for @@ -164,14 +169,15 @@ * @param width image width in pixels * @param height image height in pixels * @param L input luminance map (L=0.212656*R + 0.715158*G + 0.072186*B) - * @param progress_cb callback function for reporting progress or stopping computations. + * @param progress_cb callback function for reporting progress or stopping + * computations. * @return pointer to conditional_density or NULL if computation was * aborted or an error was encountered. The conditional_density object * must be freed by the calling application using the 'delete' * statement. */ -std::unique_ptr datmo_compute_conditional_density( int width, int height, const float *L, pfs::Progress &ph ); - +std::unique_ptr datmo_compute_conditional_density( + int width, int height, const float *L, pfs::Progress &ph); /** * Computes the best tone-curve for a given conditional_density and @@ -180,22 +186,29 @@ * function. * * @param tc datmoToneCurve where the resulting tone-curve will be stored - * @param conditional_density image statistics computed with datmo_compute_conditional_density() - * @param df display function. See DisplayFunction class documentation for more details. + * @param conditional_density image statistics computed with + * datmo_compute_conditional_density() + * @param df display function. See DisplayFunction class documentation for more + * details. * @param ds display size. See DisplaySize class documentation for more details. * @param enh_factor conrast enhancement factor. See man * pfstmo_mantiuk08 page for details * @param white_y luminance factor in the input image that should be * mapped to the maximum luminance of a display. If the parameter is - * set to -1, the tone-mapper will not anchor to white (recommended for HDR images). - * @param progress_cb callback function for reporting progress or stopping computations. + * set to -1, the tone-mapper will not anchor to white (recommended for HDR + * images). + * @param progress_cb callback function for reporting progress or stopping + * computations. * @return PFSTMO_OK if tone-mapping was sucessful, PFSTMO_ABORTED if * it was stopped from a callback function and PFSTMO_ERROR if an * error was encountered. */ -int datmo_compute_tone_curve( datmoToneCurve *tc, datmoConditionalDensity *cond_dens, - DisplayFunction *df, DisplaySize *ds, const float enh_factor, - const float white_y, datmoVisualModel visual_model, double scene_l_adapt, pfs::Progress &ph ); +int datmo_compute_tone_curve(datmoToneCurve *tc, + datmoConditionalDensity *cond_dens, + DisplayFunction *df, DisplaySize *ds, + const float enh_factor, const float white_y, + datmoVisualModel visual_model, + double scene_l_adapt, pfs::Progress &ph); /** * Deprectaied: use datmo_apply_tone_curve_cc() @@ -221,9 +234,11 @@ * it was stopped from a callback function and PFSTMO_ERROR if an * error was encountered. */ -int datmo_apply_tone_curve( float *R_out, float *G_out, float *B_out, int width, int height, - const float *R_in, const float *G_in, const float *B_in, const float *L_in, datmoToneCurve *tc, - DisplayFunction *df, const float saturation_factor = 0.4f ); +int datmo_apply_tone_curve(float *R_out, float *G_out, float *B_out, int width, + int height, const float *R_in, const float *G_in, + const float *B_in, const float *L_in, + datmoToneCurve *tc, DisplayFunction *df, + const float saturation_factor = 0.4f); /** * Tone-map image using the tone-curve computed with @@ -247,15 +262,18 @@ * @param B_in blue input radiance map. * @param L_in input luminance map (L=0.212656*R + 0.715158*G + 0.072186*B) * @param tc tone-curve computed with datmo_compute_tone_curve() - * @param saturation_factor color saturation factor. Set to 1 to preserve colors, >1 to increase color saturation, <1 to reduce color saturation. + * @param saturation_factor color saturation factor. Set to 1 to preserve + * colors, >1 to increase color saturation, <1 to reduce color saturation. * @return PFSTMO_OK if tone-mapping was sucessful, PFSTMO_ABORTED if * it was stopped from a callback function and PFSTMO_ERROR if an * error was encountered. */ -int datmo_apply_tone_curve_cc( float *R_out, float *G_out, float *B_out, int width, int height, - const float *R_in, const float *G_in, const float *B_in, const float *L_in, datmoToneCurve *tc, - DisplayFunction *df, const float saturation_factor ); - +int datmo_apply_tone_curve_cc(float *R_out, float *G_out, float *B_out, + size_t width, size_t height, const float *R_in, + const float *G_in, const float *B_in, + const float *L_in, datmoToneCurve *tc, + DisplayFunction *df, + const float saturation_factor); /** * Filter tone curves over time to avoid flickering. This filtering is @@ -265,5 +283,7 @@ * @param count_in_tc the number of input tone curves in the array * @param out_tc the output tone curve. Must be pre-allocated. */ -void datmo_filter_tone_curves( datmoToneCurve **in_tc, size_t count_in_tc, datmoToneCurve *out_tc ); +void datmo_filter_tone_curves(datmoToneCurve **in_tc, size_t count_in_tc, + datmoToneCurve *out_tc); +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_function.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_function.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_function.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_function.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -28,13 +28,16 @@ * * $Id: display_function.cpp,v 1.3 2008/06/16 18:42:58 rafm Exp $ */ +#include "../../sleef.c" +#include "../../opthelper.h" +#define pow_F(a,b) (xexpf(b*xlogf(a))) #include -#include #include -#include +#include #include +#include #include "Libpfs/pfs.h" @@ -43,70 +46,74 @@ // ========== GGBA Display Function ============== -DisplayFunctionGGBA::DisplayFunctionGGBA( float gamma, float L_max, float L_black, float E_amb, float screen_refl ) -{ - init( gamma, L_max, L_black, E_amb, screen_refl ); +DisplayFunctionGGBA::DisplayFunctionGGBA(float gamma, float L_max, + float L_black, float E_amb, + float screen_refl) { + init(gamma, L_max, L_black, E_amb, screen_refl); +} + +void DisplayFunctionGGBA::init(float gamma, float L_max, float L_black, + float E_amb, float screen_refl) { + this->gamma = gamma; + this->L_max = L_max; + this->L_black = L_black; + this->E_amb = E_amb; + this->screen_refl = screen_refl; + this->L_offset = + L_black + screen_refl / boost::math::double_constants::pi * E_amb; +} + +DisplayFunctionGGBA::DisplayFunctionGGBA(const char *predefined) { + if (!strcasecmp(predefined, "lcd_office")) { + init(2.2f, 100, 0.8f, 400, 0.01f); + } else if (!strcasecmp(predefined, "lcd")) { + init(2.2f, 200, 0.8f, 60, 0.01f); + } else if (!strcasecmp(predefined, "lcd_bright")) { + init(2.6f, 500, 0.5f, 10, 0.01f); + } else if (!strcasecmp(predefined, "crt")) { + init(2.2f, 80, 1.0f, 60, 0.02f); + } else { + throw pfs::Exception( + "Unknown display type. Recognized types: " + "lcd_office, lcd, lcd_bright, " + "crt."); + } } -void DisplayFunctionGGBA::init( float gamma, float L_max, float L_black, float E_amb, float screen_refl ) -{ - this->gamma = gamma; - this->L_max = L_max; - this->L_black = L_black; - this->E_amb = E_amb; - this->screen_refl = screen_refl; - this->L_offset = L_black + screen_refl/boost::math::double_constants::pi*E_amb; +void DisplayFunctionGGBA::print(FILE *fh) { + fprintf(fh, "Display function: gamma-gain-black-ambient\n"); + fprintf(fh, " gamma = %g\t L_max = %g\t L_black = %g\n", (double)gamma, + (double)L_max, (double)L_black); + fprintf(fh, " E_amb = %g\t k = %g\n", (double)E_amb, + (double)screen_refl); } -DisplayFunctionGGBA::DisplayFunctionGGBA( const char *predefined ) -{ - if( !strcasecmp( predefined, "lcd_office" ) ) { - init( 2.2f, 100, 0.8f, 400, 0.01f ); - } else if( !strcasecmp( predefined, "lcd" ) ) { - init( 2.2f, 200, 0.8f, 60, 0.01f ); - } else if( !strcasecmp( predefined, "lcd_bright" ) ) { - init( 2.6f, 500, 0.5f, 10, 0.01f ); - } else if( !strcasecmp( predefined, "crt" ) ) { - init( 2.2f, 80, 1.0f, 60, 0.02f ); - } else { - throw pfs::Exception( "Unknown display type. Recognized types: lcd_office, lcd, lcd_bright, crt." ); - } +float DisplayFunctionGGBA::inv_display(float L) { + if (L < L_offset) L = L_offset; + if (L > (L_offset + L_max)) L = L_offset + L_max; + return pow_F((L - L_offset) / (L_max - L_black), 1 / gamma); } -void DisplayFunctionGGBA::print( FILE *fh ) -{ - fprintf( fh, "Display function: gamma-gain-black-ambient\n" ); - fprintf( fh, " gamma = %g\t L_max = %g\t L_black = %g\n", (double)gamma, (double)L_max, (double)L_black ); - fprintf( fh, " E_amb = %g\t k = %g\n", (double)E_amb, (double)screen_refl ); +float DisplayFunctionGGBA::display(float pix) { + assert(pix >= 0 && pix <= 1); + return pow(pix, gamma) * (L_max - L_black) + L_offset; } -float DisplayFunctionGGBA::inv_display( float L ) -{ - if( L < L_offset ) L = L_offset; - if( L > (L_offset+L_max) ) L = L_offset + L_max; - return powf( (L - L_offset)/(L_max-L_black), 1/gamma ); -} +#ifdef __SSE2__ -float DisplayFunctionGGBA::display( float pix ) -{ - assert( pix >= 0 && pix <= 1 ); - return pow( pix, gamma ) * (L_max-L_black) + L_offset; +vfloat DisplayFunctionGGBA::inv_display(vfloat L) { + const vfloat voffset = F2V(L_offset); + const vfloat vmax = F2V(L_max); + L = vmaxf(L, voffset); + L = vminf(L, voffset + vmax); + return pow_F((L - voffset) / (vmax - F2V(L_black)), + F2V(1.0f / gamma)); } -#ifdef LUMINANCE_USE_SSE - -v4sf DisplayFunctionGGBA::inv_display( v4sf L ) -{ - const v4sf voffset = _mm_set1_ps(L_offset); - const v4sf vmax = _mm_set1_ps(L_max); - L = _mm_max_ps(L, voffset); - L = _mm_min_ps(L, voffset+vmax); - return _mm_pow_ps((L - voffset)/(vmax-_mm_set1_ps(L_black)), _mm_set1_ps(1.0f/gamma)); -} - -v4sf DisplayFunctionGGBA::display( v4sf pix ) -{ - return _mm_pow_ps(pix, _mm_set1_ps(gamma)) * (_mm_set1_ps(L_max)-_mm_set1_ps(L_black)) + _mm_set1_ps(L_offset); +vfloat DisplayFunctionGGBA::display(vfloat pix) { + return pow_F(pix, F2V(gamma)) * + (F2V(L_max) - F2V(L_black)) + + F2V(L_offset); } #endif @@ -115,91 +122,83 @@ static const int max_lut_size = 4096; -DisplayFunctionLUT::DisplayFunctionLUT( const char *file_name ) : pix_lut( NULL ), L_lut( NULL ) -{ - FILE *fh = fopen( file_name, "r" ); - if( fh == NULL ) - throw pfs::Exception( "Cannot open lookup-table file" ); - - L_lut = new float[max_lut_size]; - pix_lut = new float[max_lut_size]; - - const size_t max_line = 100; - char buf[max_line]; - - int i = 0; - while( fgets( buf, max_line, fh ) != NULL ) { - float p_buf, L_buf; - if( sscanf( buf, "%f%*[ ,;]%f\n", &p_buf, &L_buf ) != 2 ) - continue; - if( p_buf < 0 || p_buf > 1 ) - { - fclose( fh ); - throw pfs::Exception( "Improper LUT: pixel values must be from 0 to 1" ); - } - - if( L_buf <= 0 ) - { - fclose( fh ); - throw pfs::Exception( "Improper LUT: luminance must be greater than 0" ); +DisplayFunctionLUT::DisplayFunctionLUT(const char *file_name) + : pix_lut(NULL), L_lut(NULL) { + FILE *fh = fopen(file_name, "r"); + if (fh == NULL) throw pfs::Exception("Cannot open lookup-table file"); + + L_lut = new float[max_lut_size]; + pix_lut = new float[max_lut_size]; + + const size_t max_line = 100; + char buf[max_line]; + + int i = 0; + while (fgets(buf, max_line, fh) != NULL) { + float p_buf, L_buf; + if (sscanf(buf, "%f%*[ ,;]%f\n", &p_buf, &L_buf) != 2) continue; + if (p_buf < 0 || p_buf > 1) { + fclose(fh); + throw pfs::Exception( + "Improper LUT: pixel values must be from 0 to 1"); + } + + if (L_buf <= 0) { + fclose(fh); + throw pfs::Exception( + "Improper LUT: luminance must be greater than 0"); + } + L_lut[i] = log10(L_buf); + pix_lut[i] = p_buf; + i++; + if (i >= max_lut_size) { + fclose(fh); + throw pfs::Exception("LUT too large (more than 4096 entries)"); + } } - L_lut[i] = log10( L_buf ); - pix_lut[i] = p_buf; - i++; - if( i >= max_lut_size ) - { - fclose( fh ); - throw pfs::Exception( "LUT too large (more than 4096 entries)" ); + lut_size = i; + if (pix_lut[0] != 0 || pix_lut[lut_size - 1] != 1) { + fclose(fh); + throw pfs::Exception( + "The first and last LUT entries for pixel value should be 0 and 1"); } - } - lut_size = i; - if( pix_lut[0] != 0 || pix_lut[lut_size-1]!= 1 ) - { - fclose( fh ); - throw pfs::Exception( "The first and last LUT entries for pixel value should be 0 and 1" ); - } - fclose( fh ); + fclose(fh); } -DisplayFunctionLUT::~DisplayFunctionLUT() -{ - delete []pix_lut; - delete []L_lut; +DisplayFunctionLUT::~DisplayFunctionLUT() { + delete[] pix_lut; + delete[] L_lut; +} + +inline float bin_search_interp(float x, const float *lut_x, const float *lut_y, + const int lutSize) { + if (x <= lut_x[0]) return lut_y[0]; + if (x >= lut_x[lutSize - 1]) return lut_y[lutSize - 1]; + + size_t l = 0, r = lutSize; + while (true) { + size_t m = (l + r) / 2; + if (m == l) break; + if (x < lut_x[m]) + r = m; + else + l = m; + } + return lut_y[l] + (lut_y[l + 1] - lut_y[l]) * (x - lut_x[l]); } -inline float bin_search_interp( float x, const float *lut_x, const float *lut_y, const int lutSize ) -{ - if( x <= lut_x[0] ) - return lut_y[0]; - if( x >= lut_x[lutSize-1] ) - return lut_y[lutSize-1]; - - size_t l = 0, r = lutSize; - while( true ) { - size_t m = (l+r)/2; - if( m == l ) break; - if( x < lut_x[m] ) - r = m; - else - l = m; - } - return lut_y[l] + (lut_y[l+1]-lut_y[l])*(x-lut_x[l]); +float DisplayFunctionLUT::inv_display(float L) { + return bin_search_interp(log10(L), L_lut, pix_lut, lut_size); } -float DisplayFunctionLUT::inv_display( float L ) -{ - return bin_search_interp( log10( L ), L_lut, pix_lut, lut_size ); +float DisplayFunctionLUT::display(float pix) { + return pow(10, bin_search_interp(pix, pix_lut, L_lut, lut_size)); } -float DisplayFunctionLUT::display( float pix ) -{ - return pow( 10, bin_search_interp( pix, pix_lut, L_lut, lut_size ) ); -} - -void DisplayFunctionLUT::print( FILE *fh ) -{ - fprintf( fh, "Display function: lookup-table\n" ); - fprintf( fh, " L_min = %g \tL_max = %g\n", (double)pow( 10, L_lut[0] ), (double)pow( 10, L_lut[lut_size-1] ) ); +void DisplayFunctionLUT::print(FILE *fh) { + fprintf(fh, "Display function: lookup-table\n"); + fprintf(fh, " L_min = %g \tL_max = %g\n", (double)pow(10, L_lut[0]), + (double)pow(10, L_lut[lut_size - 1])); } // ========== Command line parsing ============== @@ -210,7 +209,8 @@ for( int i=1 ; i= argc ) throw pfs::Exception( "missing display function specification" ); diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_function.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_function.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_function.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_function.h 2019-06-09 19:18:38.000000000 +0000 @@ -33,75 +33,71 @@ #define DISPLAY_FUNCTION_H #include +#include "../../opthelper.h" -#include "arch/math.h" -#include "Libpfs/utils/sse.h" #include +#include "Libpfs/utils/sse.h" +#include "arch/math.h" -class DisplayFunction -{ -public: - /** Convert input luminance (cd/m^2) to pixel value (0-1) - */ - virtual float inv_display( float L ) = 0; - - /** Convert pixel value (0-1) to input luminance (cd/m^2) - */ - virtual float display( float pix ) = 0; - -#ifdef LUMINANCE_USE_SSE - virtual v4sf inv_display( v4sf L ) = 0; - virtual v4sf display( v4sf L ) = 0; +class DisplayFunction { + public: + /** Convert input luminance (cd/m^2) to pixel value (0-1) + */ + virtual float inv_display(float L) = 0; + + /** Convert pixel value (0-1) to input luminance (cd/m^2) + */ + virtual float display(float pix) = 0; + +#ifdef __SSE2__ + virtual vfloat inv_display(vfloat L) = 0; + virtual vfloat display(vfloat L) = 0; #endif - virtual void print( FILE *fh ) = 0; - - virtual ~DisplayFunction() - { - } + virtual void print(FILE *fh) = 0; + virtual ~DisplayFunction() {} }; - /** * Gamma Gain Black and Ambient display model */ -class DisplayFunctionGGBA : public DisplayFunction -{ - float gamma, L_max, L_offset, L_black, E_amb, screen_refl; - -public: - DisplayFunctionGGBA( float gamma, float L_max, float L_black, float E_amb, float screen_refl ); - DisplayFunctionGGBA( const char *predefined ); - - float inv_display( float L ); - float display( float pix ); - -#ifdef LUMINANCE_USE_SSE - virtual v4sf inv_display( v4sf L ); - virtual v4sf display( v4sf L ); +class DisplayFunctionGGBA : public DisplayFunction { + float gamma, L_max, L_offset, L_black, E_amb, screen_refl; + + public: + DisplayFunctionGGBA(float gamma, float L_max, float L_black, float E_amb, + float screen_refl); + DisplayFunctionGGBA(const char *predefined); + + float inv_display(float L); + float display(float pix); + +#ifdef __SSE2__ + virtual vfloat inv_display(vfloat L); + virtual vfloat display(vfloat L); #endif - void print( FILE *fh ); + void print(FILE *fh); -private: - void init( float gamma, float L_max, float L_black, float E_amb, float screen_refl ); + private: + void init(float gamma, float L_max, float L_black, float E_amb, + float screen_refl); }; -class DisplayFunctionLUT : public DisplayFunction -{ - float *pix_lut, *L_lut; - size_t lut_size; - -public: - DisplayFunctionLUT( const char *file_name ); - ~DisplayFunctionLUT(); - - float inv_display( float L ); - float display( float pix ); - void print( FILE *fh ); +class DisplayFunctionLUT : public DisplayFunction { + float *pix_lut, *L_lut; + size_t lut_size; + + public: + DisplayFunctionLUT(const char *file_name); + ~DisplayFunctionLUT(); + + float inv_display(float L); + float display(float pix); + void print(FILE *fh); }; -//DisplayFunction *createDisplayFunctionFromArgs( int &argc, char* argv[] ); +// DisplayFunction *createDisplayFunctionFromArgs( int &argc, char* argv[] ); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_size.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_size.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_size.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_size.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,98 +29,84 @@ * $Id: display_size.cpp,v 1.3 2008/06/16 18:42:58 rafm Exp $ */ - #include +#include #include #include -#include +#include "Libpfs/pfs.h" #include "arch/math.h" #include "display_size.h" -#include "Libpfs/pfs.h" -static void removeCommandLineArg( int &argc, char* argv[], - int firstArgToRemove, int numArgsToRemove ); +static void removeCommandLineArg(int &argc, char *argv[], int firstArgToRemove, + int numArgsToRemove); -DisplaySize::DisplaySize( int vres, float vd_screen_h, float vd_meters ) : view_d(vd_meters) -{ - ppd = vres * boost::math::double_constants::pi / (360* atan(0.5f/vd_screen_h)); +DisplaySize::DisplaySize(int vres, float vd_screen_h, float vd_meters) + : view_d(vd_meters) { + ppd = vres * boost::math::double_constants::pi / + (360 * atan(0.5f / vd_screen_h)); } -DisplaySize::DisplaySize( float ppd, float vd_meters ) : view_d(vd_meters), ppd( ppd ) -{ -} +DisplaySize::DisplaySize(float ppd, float vd_meters) + : view_d(vd_meters), ppd(ppd) {} -void DisplaySize::print( FILE *fh ) -{ - fprintf( fh, "Display size paramaters:\n" ); - fprintf( fh, " pixels per visual degree = %g\n", (double)getPixPerDeg() ); - fprintf( fh, " viewing distance = %g [meters]\n", (double)getViewD() ); +void DisplaySize::print(FILE *fh) { + fprintf(fh, "Display size paramaters:\n"); + fprintf(fh, " pixels per visual degree = %g\n", (double)getPixPerDeg()); + fprintf(fh, " viewing distance = %g [meters]\n", (double)getViewD()); } +float DisplaySize::getPixPerDeg() { return ppd; } -float DisplaySize::getPixPerDeg() -{ - return ppd; -} +float DisplaySize::getViewD() { return view_d; } -float DisplaySize::getViewD() -{ - return view_d; -} +// ========== Command line parsing ============== +DisplaySize *createDisplaySizeFromArgs(int &argc, char *argv[]) { + DisplaySize *ds = 0; -// ========== Command line parsing ============== + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "--display-size") || !strcmp(argv[i], "-s")) { + if (i + 1 >= argc) + throw pfs::Exception("missing display size specification"); + + float vres = 1024, vd = 2, d = 0.5, ppd = -1; + char *token; + token = strtok(argv[i + 1], ":"); + while (token != NULL) { + if (!strncmp(token, "vres=", 5)) { + vres = strtod(token + 5, NULL); + } else if (!strncmp(token, "vd=", 3)) { + vd = strtod(token + 3, NULL); + } else if (!strncmp(token, "d=", 2)) { + d = strtod(token + 2, NULL); + } else if (!strncmp(token, "ppd=", 4)) { + ppd = strtod(token + 4, NULL); + } else { + throw pfs::Exception("Bad display size specification"); + } + token = strtok(NULL, ":"); + } + if (ppd != -1) + ds = new DisplaySize(ppd, d); + else + ds = new DisplaySize(vres, vd, d); -DisplaySize *createDisplaySizeFromArgs( int &argc, char* argv[] ) -{ - DisplaySize *ds = 0; - - for( int i=1 ; i= argc ) - throw pfs::Exception( "missing display size specification" ); - - float vres = 1024, vd = 2, d = 0.5, ppd = -1; - char *token; - token = strtok( argv[i+1], ":" ); - while( token != NULL ) { - if( !strncmp( token, "vres=", 5 ) ) { - vres = strtod( token+5, NULL ); - } else if( !strncmp( token, "vd=", 3 ) ) { - vd = strtod( token+3, NULL ); - } else if( !strncmp( token, "d=", 2 ) ) { - d = strtod( token+2, NULL ); - } else if( !strncmp( token, "ppd=", 4 ) ) { - ppd = strtod( token+4, NULL ); - } else { - throw pfs::Exception( "Bad display size specification" ); - } - token = strtok( NULL, ":" ); + removeCommandLineArg(argc, argv, i, 2); + break; } - if( ppd != -1 ) - ds = new DisplaySize( ppd, d ); - else - ds = new DisplaySize( vres, vd, d ); - - removeCommandLineArg( argc, argv, i, 2 ); - break; - } } return ds; } +static void removeCommandLineArg(int &argc, char *argv[], int firstArgToRemove, + int numArgsToRemove) { + assert(firstArgToRemove + numArgsToRemove <= argc); + if (argc - firstArgToRemove - numArgsToRemove > 0) { + for (int i = firstArgToRemove; i < argc - numArgsToRemove; i++) + argv[i] = argv[i + numArgsToRemove]; + } -static void removeCommandLineArg( int &argc, char* argv[], - int firstArgToRemove, int numArgsToRemove ) -{ - assert( firstArgToRemove+numArgsToRemove <= argc ); - if( argc-firstArgToRemove-numArgsToRemove > 0 ) { - for( int i = firstArgToRemove; i < argc-numArgsToRemove; i++ ) - argv[i] = argv[i+numArgsToRemove]; - } - - argc -= numArgsToRemove; + argc -= numArgsToRemove; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_size.h luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_size.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/display_size.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/display_size.h 2019-06-09 19:18:38.000000000 +0000 @@ -32,34 +32,34 @@ #ifndef DISPLAY_SIZE_H #define DISPLAY_SIZE_H -#include #include +#include -class DisplaySize -{ - float view_d; - float ppd; -public: - /** - * @param vres vertical screen resolution in pixels - * @param vd_screen_h viewing distance as the multiplies of screen height (e.g. 2) - * @param vd_meters viewing distance in meters - */ - DisplaySize( int vres, float vd_screen_h, float vd_meters = 0.5 ); - - - /** - * @param ppd number of pixels per one visual degree (e.g. 30) - * @param vd_meters viewing distance in meters - */ - DisplaySize( float ppd, float vd_meters = 0.5 ); +class DisplaySize { + float view_d; + float ppd; + + public: + /** + * @param vres vertical screen resolution in pixels + * @param vd_screen_h viewing distance as the multiplies of screen height + * (e.g. 2) + * @param vd_meters viewing distance in meters + */ + DisplaySize(int vres, float vd_screen_h, float vd_meters = 0.5); + + /** + * @param ppd number of pixels per one visual degree (e.g. 30) + * @param vd_meters viewing distance in meters + */ + DisplaySize(float ppd, float vd_meters = 0.5); - void print( FILE *fh ); + void print(FILE *fh); - float getPixPerDeg(); - float getViewD(); + float getPixPerDeg(); + float getViewD(); }; -DisplaySize *createDisplaySizeFromArgs( int &argc, char* argv[] ); +DisplaySize *createDisplaySizeFromArgs(int &argc, char *argv[]); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,145 +29,162 @@ * $Id: pfstmo_mantiuk08.cpp,v 1.12 2009/02/23 18:46:36 rafm Exp $ */ -#include -#include +#include +#include #include #include -#include -#include +#include +#include -#include "Libpfs/progress.h" -#include "Libpfs/frame.h" +#include "Libpfs/utils/msec_timer.h" #include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" #include "display_adaptive_tmo.h" using namespace std; -void pfstmo_mantiuk08(pfs::Frame& frame, float saturation_factor, float contrast_enhance_factor, float white_y, bool setluminance, pfs::Progress &ph) -{ - //--- default tone mapping parameters; - //float contrast_enhance_factor = 1.f; - //float saturation_factor = 1.f; - //float white_y = -2.f; - //int temporal_filter = 0; - float fps = 25; - datmoVisualModel visual_model = vm_full; - double scene_l_adapt = 1000; - - if (!setluminance) - white_y = -2.f; +void pfstmo_mantiuk08(pfs::Frame &frame, float saturation_factor, + float contrast_enhance_factor, float white_y, + bool setluminance, pfs::Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif - if ( contrast_enhance_factor <= 0.0f ) - throw pfs::Exception("incorrect contrast enhancement factor, accepted value is any positive number"); + ph.setValue(0); - if ( saturation_factor < 0.0f || saturation_factor > 2.0f ) - throw pfs::Exception("incorrect saturation factor, accepted range is (0..2)"); + //--- default tone mapping parameters; + // float contrast_enhance_factor = 1.f; + // float saturation_factor = 1.f; + // float white_y = -2.f; + // int temporal_filter = 0; + float fps = 25; + datmoVisualModel visual_model = vm_full; + double scene_l_adapt = 1000; + + if (!setluminance) white_y = -2.f; + + if (contrast_enhance_factor <= 0.0f) + throw pfs::Exception( + "incorrect contrast enhancement factor, accepted " + "value is any positive " + "number"); + + if (saturation_factor < 0.0f || saturation_factor > 2.0f) + throw pfs::Exception( + "incorrect saturation factor, accepted range is (0..2)"); #ifndef NDEBUG - std::cout << "pfstmo_mantiuk08 ("; - std::cout << "saturation factor: " << saturation_factor; - std::cout << ", contrast enhancement factor: " << contrast_enhance_factor; - std::cout << ", white_y: " << white_y; - std::cout << ", setluminance: " << setluminance << ")" << std::endl; + std::cout << "pfstmo_mantiuk08 ("; + std::cout << "saturation factor: " << saturation_factor; + std::cout << ", contrast enhancement factor: " << contrast_enhance_factor; + std::cout << ", white_y: " << white_y; + std::cout << ", setluminance: " << setluminance << ")" << std::endl; #endif - DisplayFunction *df = NULL; - DisplaySize *ds = NULL; + DisplayFunction *df = NULL; + DisplaySize *ds = NULL; - if( df == NULL ) // As of now df is not selected by users but hardcoded here - df = new DisplayFunctionGGBA( "lcd" ); + if (df == NULL) // As of now df is not selected by users but hardcoded here + df = new DisplayFunctionGGBA("lcd"); - if( ds == NULL ) // As of now ds is not selected by users but hardcoded here - ds = new DisplaySize( 30.f, 0.5f ); + if (ds == NULL) // As of now ds is not selected by users but hardcoded here + ds = new DisplaySize(30.f, 0.5f); #ifndef NDEBUG - df->print( stderr ); - ds->print( stderr ); + df->print(stderr); + ds->print(stderr); #endif - pfs::Channel *inX, *inY, *inZ; - frame.getXYZChannels(inX, inY, inZ); + pfs::Channel *inX, *inY, *inZ; + frame.getXYZChannels(inX, inY, inZ); + + if (!inX || !inY || !inZ) { + if (df != NULL) delete df; + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); + } - if ( !inX || !inY || !inZ ) - { - if (df != NULL) - delete df; - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - } - - const int cols = frame.getWidth(); - const int rows = frame.getHeight(); - - pfs::Array2Df R( cols, rows ); - pfs::transformColorSpace(pfs::CS_XYZ, inX, inY, inZ, pfs::CS_RGB, inX, &R, inZ); - - if( white_y == -2.f ) - { - std::string white_y_str = frame.getTags().getTag( "WHITE_Y" ); - if( !white_y_str.empty() ) //TODO check this - { - white_y = strtod( white_y_str.c_str(), NULL ); - if( white_y == 0 ) - { - white_y = -1; - fprintf( stderr, "warning - wrong WHITE_Y in the input image" ); + const size_t cols = frame.getWidth(); + const size_t rows = frame.getHeight(); + + pfs::Array2Df R(cols, rows); + pfs::transformColorSpace(pfs::CS_XYZ, inX, inY, inZ, pfs::CS_RGB, inX, &R, + inZ); + + if (white_y == -2.f) { + std::string white_y_str = frame.getTags().getTag("WHITE_Y"); + if (!white_y_str.empty()) // TODO check this + { + white_y = strtod(white_y_str.c_str(), NULL); + if (white_y == 0) { + white_y = -1; + fprintf(stderr, "warning - wrong WHITE_Y in the input image"); + } + } + } + + /* no need for flushing stdout with this stuff + fprintf( stderr, "Luminance factor of the reference white: " ); + if( white_y < 0 ) + fprintf( stderr, "not specified\n" ); + else + fprintf( stderr, "%g\n", white_y ); + + std::string lum_data = frame.getTags().getTag("LUMINANCE"); + if( !lum_data.empty() && lum_data != "DISPLAY" ) { + fprintf( stderr, "warning: input image should be in linear (not gamma + corrected) luminance factor units. Use '--linear' option with pfsin* + commands.\n" ); } + */ + + std::unique_ptr C = + datmo_compute_conditional_density(cols, rows, inY->data(), ph); + if (C.get() == NULL) { + delete df; + delete ds; + throw pfs::Exception("failed to analyse the image"); } - } -/* no need for flushing stdout with this stuff - fprintf( stderr, "Luminance factor of the reference white: " ); - if( white_y < 0 ) - fprintf( stderr, "not specified\n" ); - else - fprintf( stderr, "%g\n", white_y ); - - std::string lum_data = frame.getTags().getTag("LUMINANCE"); - if( !lum_data.empty() && lum_data != "DISPLAY" ) { - fprintf( stderr, "warning: input image should be in linear (not gamma corrected) luminance factor units. Use '--linear' option with pfsin* commands.\n" ); - } -*/ - - std::unique_ptr C = datmo_compute_conditional_density( cols, rows, inY->data(), ph); - if( C.get() == NULL ) - { - delete df; - delete ds; - throw pfs::Exception("failed to analyse the image"); - } + datmoTCFilter rc_filter(fps, log10(df->display(0)), log10(df->display(1))); - datmoTCFilter rc_filter( fps, log10(df->display(0)), log10(df->display(1)) ); + // datmoToneCurve tc; + datmoToneCurve *tc = rc_filter.getToneCurvePtr(); - //datmoToneCurve tc; - datmoToneCurve *tc = rc_filter.getToneCurvePtr(); + int res; + res = datmo_compute_tone_curve(tc, C.get(), df, ds, contrast_enhance_factor, + white_y, visual_model, scene_l_adapt, ph); + if (res != PFSTMO_OK) { + delete df; + delete ds; + throw pfs::Exception("failed to compute the tone-curve"); + } - int res; - res = datmo_compute_tone_curve( tc, C.get(), df, ds, contrast_enhance_factor, white_y, visual_model, scene_l_adapt, ph); - if( res != PFSTMO_OK ) - { - delete df; - delete ds; - throw pfs::Exception( "failed to compute the tone-curve" ); - } + datmoToneCurve *tc_filt = rc_filter.filterToneCurve(); + + res = datmo_apply_tone_curve_cc( + inX->data(), R.data(), inZ->data(), cols, rows, inX->data(), R.data(), + inZ->data(), inY->data(), tc_filt, df, saturation_factor); + if (res != PFSTMO_OK) { + delete df; + delete ds; + throw pfs::Exception("failed to tone-map the image"); + } + + pfs::transformColorSpace(pfs::CS_RGB, inX, &R, inZ, pfs::CS_XYZ, inX, inY, + inZ); + frame.getTags().setTag("LUMINANCE", "DISPLAY"); - datmoToneCurve *tc_filt = rc_filter.filterToneCurve(); + if (!ph.canceled()) ph.setValue(100); - res = datmo_apply_tone_curve_cc( inX->data(), R.data(), inZ->data(), - cols, rows, inX->data(), R.data(), inZ->data(), inY->data(), tc_filt, df, saturation_factor ); - if( res != PFSTMO_OK ) - { delete df; delete ds; - throw pfs::Exception( "failed to tone-map the image" ); - } - pfs::transformColorSpace( pfs::CS_RGB, inX, &R, inZ, pfs::CS_XYZ, inX, inY, inZ ); - frame.getTags().setTag("LUMINANCE", "DISPLAY"); - - if ( !ph.canceled() ) - ph.setValue(100); +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_mantiuk08 = " << stop_watch.get_time() << " msec" << endl; +#endif - delete df; - delete ds; } - diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp luminance-hdr-2.6.0/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -33,23 +33,21 @@ #include "tmo_pattanaik00.h" -#include -#include #include +#include +#include -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" -namespace -{ -void multiplyChannels( pfs::Array2Df& X, pfs::Array2Df& Y, pfs::Array2Df& Z, float mult ) -{ +namespace { +void multiplyChannels(pfs::Array2Df &X, pfs::Array2Df &Y, pfs::Array2Df &Z, + float mult) { int size = Y.getCols() * Y.getRows(); - for ( int i=0 ; i am(new VisualAdaptationModel()); pfs::Channel *X, *Y, *Z; - frame.getXYZChannels( X, Y, Z ); + frame.getXYZChannels(X, Y, Z); //--- - if ( Y==NULL || X==NULL || Z==NULL) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (Y == NULL || X == NULL || Z == NULL) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } frame.getTags().setTag("LUMINANCE", "RELATIVE"); // adaptation model - if ( multiplier != 1.0f ) { - multiplyChannels(*X, *Y, *Z, multiplier ); + if (multiplier != 1.0f) { + multiplyChannels(*X, *Y, *Z, multiplier); } - if( !local ) - { - if( !timedependence ) - { - if( !autolum ) + if (!local) { + if (!timedependence) { + if (!autolum) am->setAdaptation(Acone, Arod); else am->setAdaptation(*Y); - } - else - am->calculateAdaptation(*Y, 1.0f/fps); + } else + am->calculateAdaptation(*Y, 1.0f / fps); } // tone mapping int w = Y->getWidth(); int h = Y->getHeight(); - pfs::Array2Df R(w,h); - pfs::Array2Df G(w,h); - pfs::Array2Df B(w,h); - - pfs::transformColorSpace( pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, &R, &G, &B ); - tmo_pattanaik00( R, G, B, *Y, am.get(), local, ph ); - pfs::transformColorSpace( pfs::CS_RGB, &R, &G, &B, pfs::CS_XYZ, X, Y, Z ); + pfs::Array2Df R(w, h); + pfs::Array2Df G(w, h); + pfs::Array2Df B(w, h); + + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, &R, &G, &B); + + try { + tmo_pattanaik00(R, G, B, *Y, am.get(), local, ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } + pfs::transformColorSpace(pfs::CS_RGB, &R, &G, &B, pfs::CS_XYZ, X, Y, Z); - if (!ph.canceled()) - { + if (!ph.canceled()) { ph.setValue(100); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.cpp luminance-hdr-2.6.0/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -35,20 +35,24 @@ #include "tmo_pattanaik00.h" -#include "TonemappingOperators/pfstmo.h" -#include "Libpfs/pfs.h" #include "Libpfs/array2d.h" +#include "Libpfs/pfs.h" #include "Libpfs/progress.h" +#include "Libpfs/utils/msec_timer.h" +#include "TonemappingOperators/pfstmo.h" +#include "../../sleef.c" +#include "../../opthelper.h" -/// sensitivity of human visual system -float n = 0.73f; +#define pow_F(a,b) (xexpf(b*xlogf(a))) float sigma_response_rod(float I); float sigma_response_cone(float I); float model_response(float I, float sigma); -namespace -{ +namespace { +/// sensitivity of human visual system +float n = 0.73f; + const float LOG5 = std::log(5.f); /** @@ -63,50 +67,185 @@ * @param Acone [out] calculated adaptation for cones * @param Arod [out] calculated adaptation for rods */ -void calculateLocalAdaptation(const pfs::Array2Df& Y, int x, int y, float& Acone, float& Arod) -{ + + +float pow6(float x) { + return (x*x) * (x*x) * (x*x); +} + +#ifdef __SSE2__ +vfloat pow6(vfloat x) { + return (x*x) * (x*x) * (x*x); +} +#endif + +float pow4(float x) { + return (x*x) * (x*x); +} + +float pow2(float x) { + return (x*x); +} + +float calculateLocalAdaptation(const pfs::Array2Df &Y, int x, int y) { int width = Y.getCols(); int height = Y.getRows(); int kernel_size = 4; - float logLc = std::log(Y(x,y))/LOG5; + float logLc = xlogf(Y(x, y)) / LOG5; float pix_num = 0.0; float pix_sum = 0.0; - for ( int kx = -kernel_size ; kx <= kernel_size ; kx++ ) - for ( int ky = -kernel_size ; ky <= kernel_size ; ky++ ) - if ( (kx*kx+ky*ky)<=(kernel_size*kernel_size) && - x+kx>0 && x+kx0 && y+ky= 4 && x < width -4 && y > 4 && y < height - 4) { + vfloat pix_numv = ZEROV; + vfloat pix_sumv = ZEROV; + vfloat log5v = F2V(LOG5); + vfloat logLcv = F2V(logLc); + { + vfloat Lv = _mm_set_ps(Y(x, y - 4), Y(x + 2, y - 3), Y(x + 2, y + 3),Y(x, y + 4)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + } + { + vfloat Lv = LVFU(Y(x - 2, y - 3)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + } + { + vfloat Lv = LVFU(Y(x - 3, y - 2)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + Lv = LVFU(Y(x + 1, y - 2)); + wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + wv = (vfloat)vandi(vint(wv), _mm_set_epi32(0,0xffffffff,0xffffffff,0xffffffff)); + pix_sumv += wv * Lv; + pix_numv += wv; + + } + { + vfloat Lv = LVFU(Y(x - 3, y - 1)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + Lv = LVFU(Y(x + 1, y - 1)); + wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + wv = (vfloat)vandi(vint(wv), _mm_set_epi32(0,0xffffffff,0xffffffff,0xffffffff)); + pix_sumv += wv * Lv; + pix_numv += wv; + + } + { + vfloat Lv = LVFU(Y(x - 4, y)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + Lv = LVFU(Y(x, y)); + wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + float L = Y(x + 4, y); + float w = xexpf(-pow6(xlogf(L) / LOG5 - logLc)); + pix_sum += w * L; + pix_num += w; + + } + { + vfloat Lv = LVFU(Y(x - 3, y + 1)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + Lv = LVFU(Y(x + 1, y + 1)); + wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + wv = (vfloat)vandi(vint(wv), _mm_set_epi32(0,0xffffffff,0xffffffff,0xffffffff)); + pix_sumv += wv * Lv; + pix_numv += wv; + + } + { + vfloat Lv = LVFU(Y(x - 3, y + 2)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + Lv = LVFU(Y(x + 1, y + 2)); + wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + wv = (vfloat)vandi(vint(wv), _mm_set_epi32(0,0xffffffff,0xffffffff,0xffffffff)); + pix_sumv += wv * Lv; + pix_numv += wv; + + } + { + vfloat Lv = LVFU(Y(x - 2, y + 3)); + vfloat wv = xexpf(-pow6(xlogf(Lv) / log5v - logLcv)); + pix_sumv += wv * Lv; + pix_numv += wv; + } + pix_sum += vhadd(pix_sumv); + pix_num += vhadd(pix_numv); + + } else { + for (int ky = -kernel_size; ky <= kernel_size; ky++) { + for (int kx = -kernel_size; kx <= kernel_size; kx++) { + if ((kx * kx + ky * ky) <= (kernel_size * kernel_size) && + x + kx > 0 && x + kx < width && y + ky > 0 && y + ky < height) { + float L = Y(x + kx, y + ky); + float w = xexpf(-pow6(xlogf(L) / LOG5 - logLc)); + pix_sum += w * L; + pix_num += w; + } } + } + } - if ( pix_num > 0.0 ) - { - Acone = Arod = (pix_sum / pix_num); +#else + for (int ky = -kernel_size; ky <= kernel_size; ky++) { + for (int kx = -kernel_size; kx <= kernel_size; kx++) { + if ((kx * kx + ky * ky) <= (kernel_size * kernel_size) && + x + kx > 0 && x + kx < width && y + ky > 0 && y + ky < height) { + float L = Y(x + kx, y + ky); + float w = xexpf(-pow6(xlogf(L) / LOG5 - logLc)); + pix_sum += w * L; + pix_num += w; + } + } } - else - { - Acone = Arod = Y(x,y); +#endif + if (pix_num > 0.0) { + return pix_sum / pix_num; + } else { + return Y(x, y); } } } // tone mapping operator code -void tmo_pattanaik00(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - const pfs::Array2Df& Y, - VisualAdaptationModel* am, bool local, pfs::Progress &ph) -{ +void tmo_pattanaik00(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + const pfs::Array2Df &Y, VisualAdaptationModel *am, + bool local, pfs::Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + ///--- initialization of parameters /// cones level of adaptation float Acone = am->getAcone(); @@ -120,14 +259,14 @@ /// fraction of adaptation luminance that represents white luminance float white_factor = 5.0f; /// fraction of adaptation luminance that represents dark luminance - float dark_factor = 32.0f/5.0f; + float dark_factor = 32.0f / 5.0f; /// goal adaptation luminance while watching display - float G_display=25.0f; + float G_display = 25.0f; /// display luminance of white - float display_white = G_display*white_factor; + float display_white = G_display * white_factor; /// display luminance of dark - float display_dark = G_display/dark_factor; + float display_dark = G_display / dark_factor; /// half-saturation constant for display float display_sigma = sigma_response_cone(G_display); @@ -137,8 +276,8 @@ float REF_Blk_display = model_response(display_dark, display_sigma); /// display color saturation - float S_d = (REF_Wht_display - REF_Blk_display) - / (log10(display_white)-log10(display_dark)); + float S_d = (REF_Wht_display - REF_Blk_display) / + (log10(display_white) - log10(display_dark)); ///--- precalculated parameters /// half-saturation constant for cones @@ -147,16 +286,16 @@ float sigma_rod = sigma_response_rod(Arod); // appearance model - float scene_white_cone = Acone*white_factor; - float scene_dark_cone = Acone/dark_factor; - float scene_white_rod = Arod*white_factor; - float scene_dark_rod = Arod/dark_factor; + float scene_white_cone = Acone * white_factor; + float scene_dark_cone = Acone / dark_factor; + float scene_white_rod = Arod * white_factor; + float scene_dark_rod = Arod / dark_factor; - float REF_Wht_scene = Bcone*model_response(scene_white_cone, sigma_cone) - + Brod*model_response(scene_white_rod, sigma_rod); + float REF_Wht_scene = Bcone * model_response(scene_white_cone, sigma_cone) + + Brod * model_response(scene_white_rod, sigma_rod); - float REF_Blk_scene = Bcone*model_response(scene_dark_cone, sigma_cone) - + Brod*model_response(scene_dark_rod, sigma_rod); + float REF_Blk_scene = Bcone * model_response(scene_dark_cone, sigma_cone) + + Brod * model_response(scene_dark_rod, sigma_rod); /// scene luminance minus shift float disp_x = 0.0f; @@ -165,34 +304,25 @@ /// display luminance plus shift float disp_z = 0.0f; - float scale = (REF_Wht_display-REF_Blk_display) - / (REF_Wht_scene-REF_Blk_scene); + float scale = + (REF_Wht_display - REF_Blk_display) / (REF_Wht_scene - REF_Blk_scene); - if ( scale < 1.0f ) - { - if ( REF_Wht_scene>REF_Wht_display ) - { + if (scale < 1.0f) { + if (REF_Wht_scene > REF_Wht_display) { disp_x = REF_Wht_scene; disp_y = scale; disp_z = REF_Wht_display; - } - else if ( REF_Blk_scene 1.0f ) - { - if ( REF_Wht_scene>REF_Wht_display ) - { + } else if (scale > 1.0f) { + if (REF_Wht_scene > REF_Wht_display) { disp_x = REF_Wht_scene; disp_y = 1.0f; disp_z = REF_Wht_display; - } - else if ( REF_Blk_scene0.0f ) - { + if (Rlum > 0.0f) { Rrod /= Rlum; Rcone /= Rlum; } - float Scolor = (Bcone*pow(sigma_cone,n)*n*pow(l,n)) - / pow( pow(l,n)+pow(sigma_cone,n), 2 ); + float Scolor = (Bcone * pow_F(sigma_cone, n) * n * pow_F(l, n)) / pow2(pow_F(l, n) + pow_F(sigma_cone, n)); Scolor /= S_d; // appearance model - float Ra = (Rlum - disp_x)*disp_y+disp_z; - Ra = (Ra<1.0f) ? ((Ra>0.0f) ? Ra : 0.0f ) : 0.9999999f; + float Ra = (Rlum - disp_x) * disp_y + disp_z; + Ra = (Ra < 1.0f) ? ((Ra > 0.0f) ? Ra : 0.0f) : 0.9999999f; // inverse display model - float I = display_sigma * pow(Ra/(1.0f-Ra), 1.0f/n) / display_white; + float I = dsbydw * pow_F(Ra / (1.0f - Ra), 1.0f / n); // apply new luminance - r = pow( r, Scolor )*I*Rcone + I*Rrod; - g = pow( g, Scolor )*I*Rcone + I*Rrod; - b = pow( b, Scolor )*I*Rcone + I*Rrod; - - R(x,y) = (r<1.0f) ? ((r>0.0f) ? r : 0.0f) : 1.0f; - G(x,y) = (g<1.0f) ? ((g>0.0f) ? g : 0.0f) : 1.0f; - B(x,y) = (b<1.0f) ? ((b>0.0f) ? b : 0.0f) : 1.0f; + r = I * (pow_F(r, Scolor) * Rcone + Rrod); + g = I * (pow_F(g, Scolor) * Rcone + Rrod); + b = I * (pow_F(b, Scolor) * Rcone + Rrod); + + R(x, y) = (r < 1.0f) ? ((r > 0.0f) ? r : 0.0f) : 1.0f; + G(x, y) = (g < 1.0f) ? ((g > 0.0f) ? g : 0.0f) : 1.0f; + B(x, y) = (b < 1.0f) ? ((b > 0.0f) ? b : 0.0f) : 1.0f; + } +#ifdef _OPENMP + #pragma omp critical +#endif + { + progress += 1; + if((progress % progressSteps) == 0) { + phVal ++; + ph.setValue(std::min(phVal,98)); } } -} - -/////////////////////////////////////////////////////////// - -float sigma_response_rod(float I) -{ -//!! INFO: this is essentially the same as below (formulas come from -// R.W.G.Hunt book) -// float j = 0.00001f / (5.0f*I + 0.00001f); -// float fls = 3800*pow(j,2.0f)*5*I+0.2*pow(1-pow(j,2.0f),4.0f)*pow(5*I,1.0f/6.0f); -// float sigma_rod = pow(2,1.0f/n) / fls * I; - - float j = 1.0f / (5*1e4*I+1); - float j2 = j*j; - float sigma_rod = (2.5874f*I)/(19000.0f*j2*I+0.2615f*pow(1.0f-j2,4)*pow(I,1.0f/6.0f)); - return sigma_rod; -} - -float sigma_response_cone(float I) -{ -//!! INFO: this is essentially the same as below (formulas come from -// R.W.G.Hunt book) -// float k = 1.0f/(5.0f*I+1); -// float fl = 0.2f*5.0f*pow(k,4.0f)*I -// + 0.1f*pow(1.0f-pow(k,4.0f),2.0f)*pow(5*I,1.0f/3.0f); -// float sigma_cone = pow(2.0f,1.0f/n) / fl * (5.0f*I); - - float k = 1.0f/(5.0f*I+1); - float k4 = pow(k,4.0f); - float sigma_cone = (12.9223f*I) / ( k4*I+0.171 * pow(1.0f-k4,2) * powf(I,1.0f/3.0f)); - return sigma_cone; -} - -float model_response(float I, float sigma) -{ - return pow(I,n)/(pow(I,n)+pow(sigma,n)); -} - -VisualAdaptationModel::VisualAdaptationModel() -{ - setAdaptation(60.0f, 60.0f); -} + } + ph.setValue(98); +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_pattanaik00 = " << stop_watch.get_time() << " msec" << endl; +#endif -void VisualAdaptationModel::calculateAdaptation(float Gcone, float Grod, float dt) -{ - // Visual adaptation model for cones - const float t0cone=0.080f; - const float t0rod=0.150f; - const float tau_cone=110.0f; - const float tau_rod=400.0f; - - float in,out; - float delta_out; - float f,j,k; - - // Calculation of Acone & Arod - // Acone - in = Gcone; - out = Acone; - delta_out= in-out; - f = (1.0f - exp( -dt/t0cone ) ); - Acone += f*delta_out; - - // Arod - in = Grod; - out = Arod; - delta_out= in-out; - f = (1.0f - exp( -dt/t0rod ) ); - Arod += f*delta_out; - - // Calculation of Bcone & Brod - // Bcone - in = Gcone; - out = Bcone; - j = dt * in * out / 2.2e8; - k = dt * (1.0f - out ) / tau_cone; - f = k-j; - Bcone += f; - - // Brod - in = Grod; - out = Brod; - j = dt * in * out / 16; - k = dt * (1.0f - out ) / tau_rod; - f = k-j; - Brod += f; } -void VisualAdaptationModel::calculateAdaptation(const pfs::Array2Df& Y, float dt) -{ - float Acone = calculateLogAvgLuminance(Y); - calculateAdaptation(Acone, Acone, dt); -} +/////////////////////////////////////////////////////////// -void VisualAdaptationModel::setAdaptation(float Gcone, float Grod) +float sigma_response_rod(float I) { + //!! INFO: this is essentially the same as below (formulas come from + // R.W.G.Hunt book) + // float j = 0.00001f / (5.0f*I + 0.00001f); + // float fls = + // 3800*pow(j,2.0f)*5*I+0.2*pow(1-pow(j,2.0f),4.0f)*pow(5*I,1.0f/6.0f); + // float sigma_rod = pow(2,1.0f/n) / fls * I; + + float j2 = pow2(1.0f / (5e4f * I + 1)); + return (2.5874f * I) / (19000.0f * j2 * I + 0.2615f * pow4(1.0f - j2) * std::sqrt(xcbrtf(I))); +} + +float sigma_response_cone(float I) { + //!! INFO: this is essentially the same as below (formulas come from + // R.W.G.Hunt book) + // float k = 1.0f/(5.0f*I+1); + // float fl = 0.2f*5.0f*pow(k,4.0f)*I + // + 0.1f*pow(1.0f-pow(k,4.0f),2.0f)*pow(5*I,1.0f/3.0f); + // float sigma_cone = pow(2.0f,1.0f/n) / fl * (5.0f*I); + + float k4 = pow4(1.0f / (5.0f * I + 1)); + return (12.9223f * I) / (k4 * I + 0.171f * pow2(1.0f - k4) * xcbrtf(I)); +} + +float model_response(float I, float sigma) { + return pow_F(I, n) / (pow_F(I, n) + pow_F(sigma, n)); +} + +VisualAdaptationModel::VisualAdaptationModel() { setAdaptation(60.0f, 60.0f); } + +void VisualAdaptationModel::calculateAdaptation(float Gcone, float Grod, + float dt) { + // Visual adaptation model for cones + const float t0cone = 0.080f; + const float t0rod = 0.150f; + const float tau_cone = 110.0f; + const float tau_rod = 400.0f; + + float in, out; + float delta_out; + float f, j, k; + + // Calculation of Acone & Arod + // Acone + in = Gcone; + out = Acone; + delta_out = in - out; + f = (1.0f - xexpf(-dt / t0cone)); + Acone += f * delta_out; + + // Arod + in = Grod; + out = Arod; + delta_out = in - out; + f = (1.0f - xexpf(-dt / t0rod)); + Arod += f * delta_out; + + // Calculation of Bcone & Brod + // Bcone + in = Gcone; + out = Bcone; + j = dt * in * out / 2.2e8; + k = dt * (1.0f - out) / tau_cone; + f = k - j; + Bcone += f; + + // Brod + in = Grod; + out = Brod; + j = dt * in * out / 16; + k = dt * (1.0f - out) / tau_rod; + f = k - j; + Brod += f; +} + +void VisualAdaptationModel::calculateAdaptation(const pfs::Array2Df &Y, + float dt) { + float Acone = calculateLogAvgLuminance(Y); + calculateAdaptation(Acone, Acone, dt); +} + +void VisualAdaptationModel::setAdaptation(float Gcone, float Grod) { + Acone = Gcone; + Arod = Grod; + Bcone = 2e6 / (2e6 + Acone); + Brod = 0.04f / (0.04f + Arod); +} + +void VisualAdaptationModel::setAdaptation(const pfs::Array2Df &Y) { + float Acone = calculateLogAvgLuminance(Y) * 5.0f; + setAdaptation(Acone, Acone); +} + +float VisualAdaptationModel::calculateLogAvgLuminance(const pfs::Array2Df &Y) { + + float avLum = 0.0f; + + size_t size = Y.getCols() * Y.getRows(); +#ifdef _OPENMP + #pragma omp parallel +#endif +{ + float avLumThr = 0.f; +#ifdef __SSE2__ + vfloat avLumThrv = ZEROV; + vfloat c1v = F2V(1e-4f); +#endif +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t y = 0; y < Y.getRows(); ++y) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < Y.getCols() - 3; x+=4) { + avLumThrv += xlogf(LVFU(Y(x,y)) + c1v); + } +#endif + for (; x < Y.getCols(); ++x) { + avLumThr += xlogf(Y(x,y) + 1e-4f); + } + } +#ifdef _OPENMP +#pragma omp critical +#endif { - Acone = Gcone; - Arod = Grod; - Bcone = 2e6/(2e6+Acone); - Brod = 0.04f/(0.04f+Arod); + avLum += avLumThr; +#ifdef __SSE2__ + avLum += vhadd(avLumThrv); +#endif } - -void VisualAdaptationModel::setAdaptation(const pfs::Array2Df& Y) -{ - float Acone = calculateLogAvgLuminance(Y) * 5.0f; - setAdaptation(Acone, Acone); } - -float VisualAdaptationModel::calculateLogAvgLuminance(const pfs::Array2Df& Y) -{ - float avLum = 0.0f; - - int size = Y.getCols() * Y.getRows(); - for( int i=0 ; i -namespace pfs -{ +namespace pfs { // class Frame; class Progress; } @@ -57,89 +55,72 @@ //! \param am pointer to adaptation model //! \param local false: use global version, true: use local version //! -void tmo_pattanaik00(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, - const pfs::Array2Df& Y, - VisualAdaptationModel* am, bool local /*= false*/, - pfs::Progress &ph); +void tmo_pattanaik00(pfs::Array2Df &R, pfs::Array2Df &G, pfs::Array2Df &B, + const pfs::Array2Df &Y, VisualAdaptationModel *am, + bool local /*= false*/, pfs::Progress &ph); //! //! @brief Time-dependent Visual Adaptation Model //! //! Class for storing state of visual adaptation model. //! -class VisualAdaptationModel -{ -private: - //! cone's adaptation level - float Acone; - - //! rod's adaptation level - float Arod; - - //! cone's bleaching term - float Bcone; - - //! rod's bleaching term - float Brod; - - //! calculate logarithmic average of Y - float calculateLogAvgLuminance( const pfs::Array2Df& Y ); - -public: - - //! - //! \brief Constructor - //! Sets default adaptation state (office light conditions) - //! - VisualAdaptationModel(); - - //! @brief Calculate adaptation level according to Visual Adaptation Model - //! - //! \param Gcone goal adaptation value for cones - //! \param Grod goal adaptation value for rods - //! \param dt time [s] that passed after last calculation of adaptation - void calculateAdaptation(float Gcone, float Grod, float dt); - - //! @brief Calculate adaptation level according to Visual Adaptation Model - //! - //! \param Y luminance map of HDR image - //! \param dt time [s] that passed after last calculation of adaptation - void calculateAdaptation(const pfs::Array2Df& Y, float dt); - - //! \brief Set adaptation level to given values - //! \param Gcone goal adaptation value for cones - //! \param Grod goal adaptation value for rods - void setAdaptation(float Gcone, float Grod); - - //! @brief Set adaptation level appropriate for given lumiance map - //! \param Y luminance map of HDR image - void setAdaptation(const pfs::Array2Df& Y); - - //! Get cone adaptation level - float getAcone() - { - return Acone; - } - - //! Get rod adaptation level - float getArod() - { - return Arod; - } - - //! Get cone bleaching term - float getBcone() - { - return Bcone; - } - - //! Get rod bleaching term - float getBrod() - { - return Brod; - } +class VisualAdaptationModel { + private: + //! cone's adaptation level + float Acone; + + //! rod's adaptation level + float Arod; + + //! cone's bleaching term + float Bcone; + + //! rod's bleaching term + float Brod; + + //! calculate logarithmic average of Y + float calculateLogAvgLuminance(const pfs::Array2Df &Y); + + public: + //! + //! \brief Constructor + //! Sets default adaptation state (office light conditions) + //! + VisualAdaptationModel(); + + //! @brief Calculate adaptation level according to Visual Adaptation Model + //! + //! \param Gcone goal adaptation value for cones + //! \param Grod goal adaptation value for rods + //! \param dt time [s] that passed after last calculation of adaptation + void calculateAdaptation(float Gcone, float Grod, float dt); + + //! @brief Calculate adaptation level according to Visual Adaptation Model + //! + //! \param Y luminance map of HDR image + //! \param dt time [s] that passed after last calculation of adaptation + void calculateAdaptation(const pfs::Array2Df &Y, float dt); + + //! \brief Set adaptation level to given values + //! \param Gcone goal adaptation value for cones + //! \param Grod goal adaptation value for rods + void setAdaptation(float Gcone, float Grod); + + //! @brief Set adaptation level appropriate for given lumiance map + //! \param Y luminance map of HDR image + void setAdaptation(const pfs::Array2Df &Y); + + //! Get cone adaptation level + float getAcone() { return Acone; } -}; + //! Get rod adaptation level + float getArod() { return Arod; } + //! Get cone bleaching term + float getBcone() { return Bcone; } + + //! Get rod bleaching term + float getBrod() { return Brod; } +}; #endif /* TMO_PATTANAIK00_H */ diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pfstmdefaultparams.h luminance-hdr-2.6.0/src/TonemappingOperators/pfstmdefaultparams.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pfstmdefaultparams.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/pfstmdefaultparams.h 2019-06-09 19:18:38.000000000 +0000 @@ -55,11 +55,11 @@ #define MANTIUK06_CONTRAST_FACTOR 0.1f #define MANTIUK06_SATURATION_FACTOR 0.8f #define MANTIUK06_DETAIL_FACTOR 0.8f -#define MANTIUK06_CONSTRAST_EQUALIZATION false +#define MANTIUK06_CONTRAST_EQUALIZATION false // Mantiuk 08 #define MANTIUK08_COLOR_SATURATION 1.0f -#define MANTIUK08_CONTRAST_ENHANCEMENT 1.0f +#define MANTIUK08_CONTRAST_ENHANCEMENT 1.0f #define MANTIUK08_LUMINANCE_LEVEL 1.0f #define MANTIUK08_SET_LUMINANCE false @@ -83,4 +83,20 @@ #define REINHARD05_CHROMATIC_ADAPTATION 0.0f #define REINHARD05_LIGHT_ADAPTATION 1.0f -#endif // PFSTMDEFAULTPARAMS_H +// Ferwerda 96 +#define FERWERDA96_MULTIPLIER 1.0f +#define FERWERDA96_ADAPTATION_LUMINANCE 0.5f + +// KimKautz 08 +#define KIMKAUTZ08_LDMAX 1.0f +#define KIMKAUTZ08_LDMIN 1.0f +#define KIMKAUTZ08_C1 3.0f +#define KIMKAUTZ08_C2 0.5f + +// VanHateren 06 +#define VANHATEREN06_PUPIL_AREA 10.0f + +// Lischinski 06 +#define LISCHINSKI06_ALPHA 1.f + +#endif // PFSTMDEFAULTPARAMS_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pfstmo.h luminance-hdr-2.6.0/src/TonemappingOperators/pfstmo.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/pfstmo.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/pfstmo.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,35 +29,56 @@ #ifndef PFSTMO_H #define PFSTMO_H -namespace pfs -{ +namespace pfs { class Frame; class Progress; } #ifdef BRANCH_PREDICTION -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) +#define likely(x) __builtin_expect((x), 1) +#define unlikely(x) __builtin_expect((x), 0) #else -#define likely(x) (x) -#define unlikely(x) (x) +#define likely(x) (x) +#define unlikely(x) (x) #endif /* Common return codes for operators */ -#define PFSTMO_OK 1 /* Successful */ -#define PFSTMO_ABORTED -1 /* User aborted (from callback) */ -#define PFSTMO_ERROR -2 /* Failed, encountered error */ +#define PFSTMO_OK 1 /* Successful */ +#define PFSTMO_ABORTED -1 /* User aborted (from callback) */ +#define PFSTMO_ERROR -2 /* Failed, encountered error */ -void pfstmo_ashikhmin02(pfs::Frame& frame, bool simple_flag, float lc_value, int eq, pfs::Progress &ph); -void pfstmo_drago03(pfs::Frame& frame, float biasValue, pfs::Progress& ph); -void pfstmo_durand02(pfs::Frame& frame, float sigma_s, float sigma_r, float baseContrast, pfs::Progress &ph); -void pfstmo_fattal02(pfs::Frame& frame, float opt_alpha, float opt_beta, float opt_saturation, float opt_noise, bool newfattal, bool fftsolver, int detail_level, pfs::Progress &ph); -void pfstmo_ferradans11(pfs::Frame& frame, float opt_rho, float opt_inv_alpha, pfs::Progress &ph); -void pfstmo_mai11(pfs::Frame& frame, pfs::Progress &ph); -void pfstmo_mantiuk06(pfs::Frame& frame, float scaleFactor, float saturationFactor, float detailFactor, bool cont_eq, pfs::Progress &ph); -void pfstmo_mantiuk08(pfs::Frame& frame, float saturation_factor, float contrast_enhance_factor, float white_y, bool setluminance, pfs::Progress &ph); -void pfstmo_pattanaik00(pfs::Frame& frame, bool local, float multiplier, float Acone, float Arod, bool autolum, pfs::Progress &ph); -void pfstmo_reinhard02 (pfs::Frame& frame, float key, float phi, int num, int low, int high, bool use_scales, pfs::Progress &ph); -void pfstmo_reinhard05(pfs::Frame& frame, float brightness, float chromaticadaptation, float lightadaptation, pfs::Progress &ph); +void pfstmo_ashikhmin02(pfs::Frame &frame, bool simple_flag, float lc_value, + int eq, pfs::Progress &ph); +void pfstmo_drago03(pfs::Frame &frame, float biasValue, pfs::Progress &ph); +void pfstmo_durand02(pfs::Frame &frame, float sigma_s, float sigma_r, + float baseContrast, pfs::Progress &ph); +void pfstmo_fattal02(pfs::Frame &frame, float opt_alpha, float opt_beta, + float opt_saturation, float opt_noise, bool newfattal, + bool fftsolver, int detail_level, pfs::Progress &ph); +void pfstmo_ferradans11(pfs::Frame &frame, float opt_rho, float opt_inv_alpha, + pfs::Progress &ph); +void pfstmo_ferwerda96(pfs::Frame &frame, float Ld_Max, float L_da, + pfs::Progress &ph); +void pfstmo_kimkautz08(pfs::Frame &frame, float KK_c1, float KK_c2, + pfs::Progress &ph); +void pfstmo_mai11(pfs::Frame &frame, pfs::Progress &ph); +void pfstmo_mantiuk06(pfs::Frame &frame, float scaleFactor, + float saturationFactor, float detailFactor, bool cont_eq, + pfs::Progress &ph); +void pfstmo_mantiuk08(pfs::Frame &frame, float saturation_factor, + float contrast_enhance_factor, float white_y, + bool setluminance, pfs::Progress &ph); +void pfstmo_pattanaik00(pfs::Frame &frame, bool local, float multiplier, + float Acone, float Arod, bool autolum, + pfs::Progress &ph); +void pfstmo_reinhard02(pfs::Frame &frame, float key, float phi, int num, + int low, int high, bool use_scales, pfs::Progress &ph); +void pfstmo_reinhard05(pfs::Frame &frame, float brightness, + float chromaticadaptation, float lightadaptation, + pfs::Progress &ph); +void pfstmo_vanhateren06(pfs::Frame &frame, float pupil_area, + pfs::Progress &ph); +void pfstmo_lischinski06(pfs::Frame &frame, float alpha, + pfs::Progress &ph); #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/approx.cpp luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/approx.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/approx.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/approx.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,216 +0,0 @@ -/** - * @file approx.cpp - * @brief Approximate computation of local adaptation - * - * This file is a part of LuminanceHDR package. - * Source code courtesy of Erik Reinhard - * - * Original source code: - * approx.c University of Utah / Erik Reinhard / October 2001 - * - * File taken from: - * http://www.cs.utah.edu/~reinhard/cdrom/source.html - * - * $Id: approx.cpp,v 1.1 2007/06/14 16:41:30 gkrawczyk Exp $ - */ - -#include -#include -#include - -// interpolated version of approximation (always use this one!) (:krawczyk) -#define INTERPOLATED - -extern double **luminance; -int ImageWidth, ImageHeight; - -double ***Pyramid; -int PyramidHeight; -int PyramidWidth0; - -void build_pyramid( double **luminance, int ImageWidth, int ImageHeight ); -double V1( int x, int y, int level ); - -double pyramid_lookup( int x, int y, int level ) - /* PRE: */ -{ - // int n, s; - - /* Level 0 is a special case, the value is just the image */ - if (level == 0) { - if ( (x < 0) || (y < 0) || (x >= ImageWidth) || (y >= ImageHeight) ) - return(0.0); - else - return(luminance[y][x]); - } - - /* Compute the size of the slice */ - level--; - // n = 1 << level; - int s = PyramidWidth0 >> level; - - //x = x >> level; - //y = y >> level; - - if ( (x < 0) || (y < 0) || (x >= s) || (y >= s) ) - return(0.0); - else - return(Pyramid[level][y][x]); -} - -void build_pyramid( double **/*luminance*/, int image_width, int image_height ) -{ - int k; - int x, y; - int i, j; - int width; - int max_dim; -// int height, pyramid_height; - - double sum = 0; - - double a = 0.4; - double b = 0.25; - double c = b - a/2; - double w[5]; - - /* Compute the "filter kernel" */ - w[0] = c; - w[1] = b; - w[2] = a; - w[3] = w[1]; - w[4] = w[0]; - - /* Build the pyramid slices. The bottom of the pyramid is the luminace */ - /* image, and is not in the Pyramid array. */ - /* For simplicity, the first level is padded to a square whose side is a */ - /* power of two. */ - - ImageWidth = image_width; - ImageHeight = image_height; - - /* Compute the size of the Pyramid array */ - max_dim = (ImageHeight > ImageWidth ? ImageHeight : ImageWidth); - PyramidHeight = (int) floor(log(max_dim - 0.5)/log(2.0f)) + 1; - - /* Compute the dimensions of the first level */ - width = 1 << (PyramidHeight - 1); - PyramidWidth0 = width; - -// fprintf(stderr, "max_dim %d height %d\n", max_dim, PyramidHeight); - - /* Allocate the outer Pyramid array */ - Pyramid = (double***) calloc(PyramidHeight, sizeof(double**)); - if (!Pyramid) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - - /* Allocate and assign the Pyramid slices */ - k = 0; - - while (width) { - -// fprintf(stderr, "level %d, width = %d\n", k, width); - - /* Allocate the slice */ - Pyramid[k] = (double**) calloc(width, sizeof(double*)); - if (!Pyramid[k]) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - for (y = 0; y < width; y++) { - Pyramid[k][y] = (double*) calloc(width, sizeof(double)); - if (!Pyramid[k][y]) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - } - - /* Compute the values in the slice */ - for (y = 0; y < width; y++) { - for (x = 0; x < width; x++) { - - sum = 0; - for (i = 0; i < 5; i++) { - for (j = 0; j < 5; j++) { - sum += w[i]*w[j]*pyramid_lookup(2*x + i - 2, 2*y + j - 2, k); - } - } - Pyramid[k][y][x] = sum; - } - } - - /* compute the width of the next slice */ - width /= 2; - k++; - } -} - -void clean_pyramid() -{ - int k=0; - int width = PyramidWidth0; - while(width) - { - for( int y=0 ; y> level; - y = y >> level; - - return(Pyramid[level-1][y][x]); -} -#else -double V1( int x, int y, int level ) - /* PRE: */ -{ - int x0, y0; - int l, size; - double s, t; - - /* Level 0 is a special case, the value is just the image */ - if (level == 0) - return(luminance[y][x]); - - /* Compute the size of the slice */ - l = 1 << level; - x0 = x >> level; - y0 = y >> level; - size = PyramidWidth0 >> (level - 1); - - x0 = (x0 >= size ? size - 1 : x0); - y0 = (y0 >= size ? size - 1 : y0); - - s = (double)(x - x0*l)/(double)l; - t = (double)(y - y0*l)/(double)l; - - level--; - - //!! FIX: a quick fix for boundary conditions - int x01,y01; - x01 = (x0 == size-1 ? x0 : x0+1); - y01 = (y0 == size-1 ? y0 : y0+1); - - return((1-s)*(1-t)*Pyramid[level][y0][x0] + s*(1-t)*Pyramid[level][y0][x01] - + (1-s)*t*Pyramid[level][y01][x0] + s*t*Pyramid[level][y01][x01]); -} -#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -31,71 +31,90 @@ * $Id: pfstmo_reinhard02.cpp,v 1.3 2008/09/04 12:46:49 julians37 Exp $ */ -#include #include #include +#include -#include "Libpfs/frame.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" #include "tmo_reinhard02.h" +#include "../../opthelper.h" -void pfstmo_reinhard02(pfs::Frame& frame, float key, float phi, int num, int low, int high, bool use_scales, pfs::Progress &ph ) -{ - //--- default tone mapping parameters; - //float key = 0.18; - //float phi = 1.0; - //int num = 8; - //int low = 1; - //int high = 43; - //bool use_scales = false; - bool temporal_coherent = false; +void pfstmo_reinhard02(pfs::Frame &frame, float key, float phi, int num, + int low, int high, bool use_scales, pfs::Progress &ph) { + + //--- default tone mapping parameters; + // float key = 0.18; + // float phi = 1.0; + // int num = 8; + // int low = 1; + // int high = 43; + // bool use_scales = false; + bool temporal_coherent = false; #ifndef NDEBUG - std::cout << "pfstmo_reinhard02 ("; - std::cout << "key: " << key; - std::cout << ", phi: " << phi; - std::cout << ", range: " << num; - std::cout << ", lower scale: " << low; - std::cout << ", upper scale: " << high; - std::cout << ", use scales: " << use_scales << ")" << std::endl; + std::cout << "pfstmo_reinhard02 ("; + std::cout << "key: " << key; + std::cout << ", phi: " << phi; + std::cout << ", range: " << num; + std::cout << ", lower scale: " << low; + std::cout << ", upper scale: " << high; + std::cout << ", use scales: " << use_scales << ")" << std::endl; +#endif + + ph.setValue(0); + + pfs::Channel *X, *Y, *Z; + frame.getXYZChannels(X, Y, Z); + //--- + + if (Y == NULL || X == NULL || Z == NULL) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); + } + + frame.getTags().setTag("LUMINANCE", "RELATIVE"); + // tone mapping + size_t w = Y->getWidth(); + size_t h = Y->getHeight(); + pfs::Array2Df L(w, h); + + Reinhard02 tmoperator(Y, &L, use_scales, key, phi, num, low, high, + temporal_coherent, ph); + + try { + tmoperator.tmo_reinhard02(); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } + + // TODO: this section can be rewritten using SSE Function + // DONE + + #pragma omp parallel for + for (size_t y = 0; y < h; y++) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < w - 3; x+=4) { + vfloat yrv = LVFU((*Y)(x, y)); + vmask selmask = vmaskf_eq(yrv, ZEROV); + vfloat scalev = vselfnotzero(selmask, LVFU(L(x, y)) / yrv); + + STVFU((*Y)(x, y), yrv * scalev); + STVFU((*X)(x, y), LVFU((*X)(x, y)) * scalev); + STVFU((*Z)(x, y), LVFU((*Z)(x, y)) * scalev); + } #endif - pfs::Channel *X, *Y, *Z; - frame.getXYZChannels( X, Y, Z ); - //--- - - if ( Y==NULL || X==NULL || Z==NULL ) { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - } - - frame.getTags().setTag("LUMINANCE", "RELATIVE"); - // tone mapping - size_t w = Y->getWidth(); - size_t h = Y->getHeight(); - pfs::Array2Df L(w, h); - - Reinhard02 tmoperator( Y, &L, use_scales, key, phi, num, low, high, temporal_coherent, ph ); - - tmoperator.tmo_reinhard02(); - - // TODO: this section can be rewritten using SSE Function - for (size_t x = 0; x < w; x++) - { - for (size_t y = 0; y < h; y++) - { - float yr = (*Y)(x,y); - float scale = 0.f; - if (yr != 0.f) - { - scale = L(x,y) / yr; - } - - (*Y)(x,y) *= scale; - (*X)(x,y) *= scale; - (*Z)(x,y) *= scale; + for (; x < w; x++) { + float yr = (*Y)(x, y); + float scale = yr != 0.f ? L(x, y) / yr : 0.f; + + (*Y)(x, y) *= scale; + (*X)(x, y) *= scale; + (*Z)(x, y) *= scale; + } + } + + if (!ph.canceled()) { + ph.setValue(100); } - } - if (!ph.canceled()) - { - ph.setValue(100); - } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/tmo_reinhard02.cpp luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/tmo_reinhard02.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard02/tmo_reinhard02.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard02/tmo_reinhard02.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -2,7 +2,6 @@ * @file tmo_reinhard02.cpp * @brief Tone map luminance channel using Reinhard02 model * - * This file is a part of LuminanceHDR package. * Implementation courtesy of Erik Reinhard. * * Original source code note: @@ -13,248 +12,405 @@ * * Port to PFS tools library by Grzegorz Krawczyk * - * $Id: tmo_reinhard02.cpp,v 1.3 2008/11/04 23:43:08 rafm Exp $ + * $Id: tmo_reinhard02.cpp,v 1.4 2009/04/15 11:49:32 julians37 Exp $ + * + * This file is a part of LuminanceHDR package, based on pfstmo. + * ---------------------------------------------------------------------- + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * Adapted to Luminance HDR + * @author Franco Comida + * */ #include -#include #include -#include "arch/math.h" +#include +#include #include "tmo_reinhard02.h" -#include "Libpfs/progress.h" -#include "Libpfs/array2d.h" -#include "TonemappingOperators/pfstmo.h" - -#define SIGMA_I(i) (m_sigma_0 + ((double)i/(double)m_range)*(m_sigma_1 - m_sigma_0)) -#define S_I(i) (exp (SIGMA_I(i))) -#define V2(x,y,i) (V1(x,y,i+1)) -#define ACTIVITY(x,y,i) ((V1(x,y,i) - V2(x,y,i)) / (((m_key * pow (2., m_phi))/(S_I(i)*S_I(i))) + V1(x,y,i))) - -/* - * Kaiser-Bessel stuff - */ +#include +#include +#include +#include +#include +#include +#include "Common/LuminanceOptions.h" +#include "../../sleef.c" +#include "../../opthelper.h" +#ifdef TIMER_PROFILING +#define BENCHMARK +#endif +#include "../../StopWatch.h" /* - * Modified zeroeth order bessel function of the first kind - */ - -double Reinhard02::bessel (double x) -{ - const double f = 1e-9; - int n = 1; - double s = 1.; - double d = 1.; - - double t; - - while (d > f * s) - { - t = x / (2. * n); - n++; - d *= t * t; - s += d; - } - return s; +static int width, height, scale; +static COLOR **image; +static float ***convolved_image; +static float sigma_0, sigma_1; +float **luminance; + +static float k = 1. / (2. * 1.4142136); +static float key = 0.18; +static float threshold = 0.05; +static float phi = 8.; +static float white = 1e20; +static int scale_low = 1; +static int scale_high = 43; // 1.6^8 = 43 +static int range = 8; +static int use_scales = 0; +static int use_border = 0; +static CVTS cvts = {0, 0}; + +static bool temporal_coherent; +*/ +#define pow_F(a,b) (xexpf(b*xlogf(a))) +#define V1(x, y, i) (m_convolved_image[i][y][x]) + +#define SIGMA_I(i) \ + (m_sigma_0 + ((float)i / (float)m_range) * (m_sigma_1 - m_sigma_0)) +#define S_I(i) (xexpf(SIGMA_I(i))) +#define V2(x, y, i) (V1(x, y, i + 1)) +#define ACTIVITY(x, y, i) \ + ((V1(x, y, i) - V2(x, y, i)) / \ + (((m_key * m_twopowphi) / lhdrengine::SQR(S_I(i))) + V1(x, y, i))) + +// +// Kaiser-Bessel stuff +// + +// +// Modified zeroeth order bessel function of the first kind +// + +float Reinhard02::bessel(float x) { + const float f = 1e-9; + int n = 1; + float s = 1.f; + float d = 1.f; + + float t; + + while (d > f * s) { + t = x / (2.f * n); + n++; + d *= t * t; + s += d; + } + return s; } -/* - * Initialiser for Kaiser-Bessel computations - */ - -void Reinhard02::compute_bessel () -{ - m_bbeta = bessel (boost::math::double_constants::pi * m_alpha); +// +// Initialiser for Kaiser-Bessel computations +// + +// +// Kaiser-Bessel function with window length M and parameter beta = 2. +// Window length M = min (width, height) / 2 +// + +float Reinhard02::kaiserbessel(float x, float y, float M) { + float d = 1.f - ((x * x + y * y) / (M * M)); + if (d <= 0.f) return 0.f; + return bessel(boost::math::float_constants::pi * m_alpha * sqrt(d)) / + m_bbeta; +} + +// +// FFT functions +// + +// Compute Gaussian blurred images +void Reinhard02::gaussian_filter(fftwf_complex *filter, float scale, float k) { + + const float a = 1.f / (k * scale); + constexpr float c = 1.f / 4.f; + +#pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) { + float y1 = (y >= m_cvts.ymax / 2) ? y - m_cvts.ymax : y; + float s = erf(a * (y1 - .5f)) - erf(a * (y1 + .5f)); + for (size_t x = 0; x < m_cvts.xmax; x++) { + float x1 = (x >= m_cvts.xmax / 2) ? x - m_cvts.xmax : x; + filter[y * m_cvts.xmax + x][0] = + s * (erf(a * (x1 - .5f)) - erf(a * (x1 + .5f))) * c; + filter[y * m_cvts.xmax + x][1] = 0.f; + } + } } -/* - * Kaiser-Bessel function with window length M and parameter beta = 2. - * Window length M = min (width, height) / 2 - */ +void Reinhard02::build_gaussian_fft() { -double Reinhard02::kaiserbessel (double x, double y, double M) -{ - double d = 1. - ((x*x + y*y) / (M * M)); - if (d <= 0.) - return 0.; - return bessel (boost::math::double_constants::pi * m_alpha * sqrt (d)) / m_bbeta; -} + for (int scale = 0; scale < m_range; scale++) { +#ifndef NDEBUG + fprintf(stderr, + "Computing FFT of Gaussian at scale %i (size %i x %i)%c", scale, + m_cvts.xmax, m_cvts.ymax, (char)13); +#endif + + m_ph.setValue(30 + 40 * scale / m_range); + fftwf_plan p; + FFTW_MUTEX::fftw_mutex_plan.lock(); + // test for available wisdom + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_filter_fft[scale], m_filter_fft[scale], -1, FFTW_WISDOM_ONLY); + if(!p) { + // no wisdom available, load wisdom from file + fftwf_import_wisdom_from_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + // test again for wisdom + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_filter_fft[scale], m_filter_fft[scale], -1, FFTW_WISDOM_ONLY); + if(!p) { + // build plan with FFTW_MEASURE + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_filter_fft[scale], m_filter_fft[scale], -1, FFTW_MEASURE); + // save the wisdom + fftwf_export_wisdom_to_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + } + } + FFTW_MUTEX::fftw_mutex_plan.unlock(); -/* - * Tonemapping routines - */ + gaussian_filter(m_filter_fft[scale], S_I(scale), m_k); -double Reinhard02::get_maxvalue () -{ - double max = 0.; - int x, y; + fftwf_execute(p); - for (y = 0; y < m_cvts.ymax; y++) - for (x = 0; x < m_cvts.xmax; x++) - max = (max < m_image[y][x][0]) ? m_image[y][x][0] : max; - return max; -} + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); + fftwf_destroy_plan(p); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); -void Reinhard02::tonemap_image () -{ - double Lmax2; - int x, y; - int scale, prefscale; - - if (m_white < 1e20) - Lmax2 = m_white * m_white; - else - { - if( m_temporal_coherent ) { - m_max_luminance.set( get_maxvalue() ); - Lmax2 = m_max_luminance.get(); - } else Lmax2 = get_maxvalue(); - Lmax2 *= Lmax2; - } - - for (y = 0; y < m_cvts.ymax; y++) - for (x = 0; x < m_cvts.xmax; x++) - { - if (m_use_scales) - { - prefscale = m_range - 1; - for (scale = 0; scale < m_range - 1; scale++) - if ( scale >= PyramidHeight || fabs (ACTIVITY(x,y,scale)) > m_threshold) - { - prefscale = scale; - break; - } - m_image[y][x][0] /= 1. + V1(x,y,prefscale); - } - else - m_image[y][x][0] = m_image[y][x][0] * (1. + (m_image[y][x][0] / Lmax2)) / (1. + m_image[y][x][0]); - // image[y][x][0] /= (1. + image[y][x][0]); } -} +#ifndef NDEBUG + fprintf(stderr, "\n"); +#endif +} + +void Reinhard02::build_image_fft() { + +#ifndef NDEBUG + fprintf(stderr, "Computing image FFT\n"); +#endif + fftwf_plan p; + FFTW_MUTEX::fftw_mutex_plan.lock(); + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_image_fft, m_image_fft, -1, FFTW_WISDOM_ONLY); + if(!p) { + // no wisdom available, load wisdom from file + fftwf_import_wisdom_from_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + // test again for wisdom + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_image_fft, m_image_fft, -1, FFTW_WISDOM_ONLY); + if(!p) { + // build plan with FFTW_MEASURE + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, m_image_fft, m_image_fft, -1, FFTW_MEASURE); + // save the wisdom + fftwf_export_wisdom_to_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + } + } + FFTW_MUTEX::fftw_mutex_plan.unlock(); -/* - * Miscellaneous functions - */ + #pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) { + for (size_t x = 0; x < m_cvts.xmax; x++) { + m_image_fft[y * m_cvts.xmax + x][0] = m_image[y][x]; + m_image_fft[y * m_cvts.xmax + x][1] = 0; + } + } -void Reinhard02::clamp_image () -{ - int x, y; + fftwf_execute(p); - for (y = 0; y < m_cvts.ymax; y++) - for (x = 0; x < m_cvts.xmax; x++) - { - m_image[y][x][0] = (m_image[y][x][0] > 1.) ? 1. : m_image[y][x][0]; - m_image[y][x][1] = (m_image[y][x][1] > 1.) ? 1. : m_image[y][x][1]; - m_image[y][x][2] = (m_image[y][x][2] > 1.) ? 1. : m_image[y][x][2]; + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); + fftwf_destroy_plan(p); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); +} + +void Reinhard02::convolve_filter(int scale, fftwf_complex *convolution_fft) { + + fftwf_plan p; + FFTW_MUTEX::fftw_mutex_plan.lock(); + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, convolution_fft, convolution_fft, 1, FFTW_WISDOM_ONLY); + if(!p) { + // no wisdom available, load wisdom from file + fftwf_import_wisdom_from_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + // test again for wisdom + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, convolution_fft, convolution_fft, 1, FFTW_WISDOM_ONLY); + if(!p) { + // build plan with FFTW_MEASURE + p = fftwf_plan_dft_2d(m_cvts.ymax, m_cvts.xmax, convolution_fft, convolution_fft, 1, FFTW_MEASURE); + // save the wisdom + fftwf_export_wisdom_to_filename(LuminanceOptions().getFftwWisdomFileName().toStdString().c_str()); + } } -} + FFTW_MUTEX::fftw_mutex_plan.unlock(); -double Reinhard02::log_average () -{ - int x, y; - double sum = 0.; + int length = m_cvts.xmax * m_cvts.ymax; + float fft_scale = 1.f / (float)length; - for (x = 0; x < m_cvts.xmax; x++) - for (y = 0; y < m_cvts.ymax; y++) - sum += log (0.00001 + m_luminance[y][x]); - return exp (sum / (double)(m_cvts.xmax * m_cvts.ymax)); -} + #pragma omp parallel for + for (size_t i = 0; i < m_cvts.xmax * m_cvts.ymax; i++) { + convolution_fft[i][0] = fft_scale * (m_image_fft[i][0] * m_filter_fft[scale][i][0] + + m_image_fft[i][1] * m_filter_fft[scale][i][1]); + convolution_fft[i][1] = fft_scale * (m_image_fft[i][0] * m_filter_fft[scale][i][1] + + m_image_fft[i][1] * m_filter_fft[scale][i][0]); + } -void Reinhard02::scale_to_midtone () -{ - int x, y, u, v, d; - double factor; - double scale_factor; - double low_tone = m_key / 3.; - int border_size = (m_cvts.xmax < m_cvts.ymax) ? int(m_cvts.xmax / 5.) : int(m_cvts.ymax / 5.); - int hw = m_cvts.xmax >> 1; - int hh = m_cvts.ymax >> 1; - - double avg; - if( m_temporal_coherent ) { - m_avg_luminance.set( log_average() ); - avg = m_avg_luminance.get(); - } else avg = log_average(); - - scale_factor = 1.0 / avg; - for (y = 0; y < m_cvts.ymax; y++) - for (x = 0; x < m_cvts.xmax; x++) - { - if (m_use_border) - { - u = (x > hw) ? m_cvts.xmax - x : x; - v = (y > hh) ? m_cvts.ymax - y : y; - d = (u < v) ? u : v; - factor = (d < border_size) ? (m_key - low_tone) * - kaiserbessel (border_size - d, 0, border_size) + - low_tone : m_key; - } - else - factor = m_key; - m_image[y][x][0] *= scale_factor * factor; - m_luminance[y][x] *= scale_factor * factor; + fftwf_execute(p); + + FFTW_MUTEX::fftw_mutex_destroy_plan.lock(); + fftwf_destroy_plan(p); + FFTW_MUTEX::fftw_mutex_destroy_plan.unlock(); + +#pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) + for (size_t x = 0, i = y * m_cvts.xmax; x < m_cvts.xmax; x++, i++) + m_convolved_image[scale][y][x] = m_convolution_fft[i][0]; +} + +void Reinhard02::compute_fourier_convolution() { + + // activate parallel execution of fft routines + init_fftw(); + //initialise_fft(m_cvts.xmax, m_cvts.ymax); + build_image_fft(); + + build_gaussian_fft(); + + for (int scale = 0; scale < m_range; scale++) { +#ifndef NDEBUG + fprintf(stderr, "Computing convolved image at scale %i%c", scale, + (char)13); +#endif + m_ph.setValue(70 + 28 * scale / m_range); + convolve_filter(scale, m_convolution_fft); } +#ifndef NDEBUG + fprintf(stderr, "\n"); +#endif } -void Reinhard02::copy_luminance () -{ - int x, y; +// +// Tonemapping routines +// - for (x = 0; x < m_cvts.xmax; x++) - for (y = 0; y < m_cvts.ymax; y++) - m_luminance[y][x] = m_image[y][x][0]; -} +float Reinhard02::get_maxvalue() { -/* - * Memory allocation - */ -void Reinhard02::allocate_memory () -{ - int y; + float max = 0.; - m_luminance = (double **) malloc (m_cvts.ymax * sizeof (double *)); - m_image = (COLOR **) malloc (m_cvts.ymax * sizeof (COLOR *)); - for (y = 0; y < m_cvts.ymax; y++) - { - m_luminance[y] = (double *) malloc (m_cvts.xmax * sizeof (double)); - m_image[y] = (COLOR *) malloc (m_cvts.xmax * sizeof (COLOR)); - } + #pragma omp parallel for reduction(max:max) + for (size_t y = 0; y < m_cvts.ymax; y++) { + for (size_t x = 0; x < m_cvts.xmax; x++) { + max = (max < m_image[y][x]) ? m_image[y][x] : max; + } + } + return max; } -void Reinhard02::deallocate_memory () -{ - int y; +void Reinhard02::tonemap_image() { - for (y = 0; y < m_cvts.ymax; y++) - { - free(m_luminance[y]); - free(m_image[y]); - } - free( m_luminance ); - free( m_image ); -} + float Lmax2; + if (m_white < 1e20) + Lmax2 = m_white * m_white; + else { + Lmax2 = get_maxvalue(); + Lmax2 *= Lmax2; + } -void Reinhard02::dynamic_range () +#pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) + for (size_t x = 0; x < m_cvts.xmax; x++) { + if (m_use_scales) { + int prefscale = m_range - 1; + for (int scale = 0; scale < m_range - 1; scale++) + if (fabs(ACTIVITY(x, y, scale)) > m_threshold) { + prefscale = scale; + break; + } + m_image[y][x] /= 1.f + V1(x, y, prefscale); + } else + m_image[y][x] = m_image[y][x] * + (1.f + (m_image[y][x] / Lmax2)) / + (1.f + m_image[y][x]); + } +} + +// +// Miscellaneous functions +// + +float Reinhard02::log_average() { + + float sum = 0.; + +#pragma omp parallel +{ + float sumthr = 0.; +#ifdef __SSE2__ + vfloat sumthrv = ZEROV; + vfloat c1v = F2V(0.00001f); +#endif +#pragma omp for + for (size_t y = 0; y < m_cvts.ymax; y++) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < m_cvts.xmax - 3; x+=4) { + sumthrv += xlogf(c1v + LVFU(m_image[y][x])); + } +#endif + for (; x < m_cvts.xmax; x++) { + sumthr += xlogf(0.00001f + m_image[y][x]); + } + } +#pragma omp critical { - int x, y; - double minval = 1e20; - double maxval = -1e20; - - for (x = 0; x < m_cvts.xmax; x++) - for (y = 0; y < m_cvts.ymax; y++) - { - if ((m_luminance[y][x] < minval) && - (m_luminance[y][x] > 0.0)) - minval = m_luminance[y][x]; - if (m_luminance[y][x] > maxval) - maxval = m_luminance[y][x]; + sum += sumthr; +#ifdef __SSE2__ + sum += vhadd(sumthrv); +#endif +} +} + return expf(sum / (float)(m_cvts.xmax * m_cvts.ymax)); +} + +void Reinhard02::scale_to_midtone() { + + + float low_tone = m_key / 3.f; + size_t border_size = (m_cvts.xmax < m_cvts.ymax) ? int(m_cvts.xmax / 5.f) + : int(m_cvts.ymax / 5.f); + size_t hw = m_cvts.xmax >> 1; + size_t hh = m_cvts.ymax >> 1; + + float scale_factor = 1.0f / log_average(); + #pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) { + for (size_t x = 0; x < m_cvts.xmax; x++) { + float factor; + if (m_use_border) { + size_t u = (x > hw) ? m_cvts.xmax - x : x; + size_t v = (y > hh) ? m_cvts.ymax - y : y; + size_t d = (u < v) ? u : v; + factor = + (d < border_size) + ? (m_key - low_tone) * kaiserbessel(border_size - d, 0, border_size) + low_tone + : m_key; + } else + factor = m_key; + m_image[y][x] *= scale_factor * factor; + } } } - /* * @brief Photographic tone-reproduction * @@ -267,256 +423,117 @@ * @param low size in pixels of smallest scale (should be kept at 1) * @param high size in pixels of largest scale (default 1.6^8 = 43) */ -Reinhard02::Reinhard02(const pfs::Array2Df *Y, pfs::Array2Df* L, - bool use_scales, float key, float phi, - int num, int low, int high, bool temporal_coherent, - pfs::Progress &ph) - : m_width(Y->getCols()) - , m_height(Y->getRows()) - , m_use_scales(use_scales) - , m_use_border(false) - , m_key(key) - , m_phi(phi) - , m_white(1e20) - , m_range(num) - , m_scale_low(low) - , m_scale_high(high) - , m_temporal_coherent(temporal_coherent) - , m_alpha(2.) - , m_threshold(0.05) - , m_ph(ph) -{ - m_Y = Y; - m_L = L; -} - -void Reinhard02::tmo_reinhard02() -{ - m_ph.setValue( 0 ); - int x,y; - - m_cvts.xmax = m_Y->getCols(); - m_cvts.ymax = m_Y->getRows(); - - m_sigma_0 = log ((double)m_scale_low); - m_sigma_1 = log ((double)m_scale_high); - - compute_bessel(); - allocate_memory (); - - m_ph.setValue( 10 ); - if (m_ph.canceled()) - goto end; - - // reading image - for( y=0 ; ygetCols()), + m_height(Y->getRows()), + m_Y(Y), + m_L(L), + m_use_scales(use_scales), + m_use_border(false), + m_key(key), + m_twopowphi(pow(2.f,phi)), + m_white(1e20), + m_range(num), + m_scale_low(low), + m_scale_high(high), + m_alpha(2.f), + m_bbeta(0.f), + m_threshold(0.05f), + m_k(1.f / (2.f * 1.4142136f)), + m_ph(ph) +{ + + m_cvts.xmax = m_Y->getCols(); + m_cvts.ymax = m_Y->getRows(); + + int length = m_cvts.xmax * m_cvts.ymax; + + m_sigma_0 = logf(m_scale_low); + m_sigma_1 = logf(m_scale_high); + + m_bbeta = bessel(boost::math::float_constants::pi * m_alpha); + + m_image = (float **)malloc(m_cvts.ymax * sizeof(float *)); + for (size_t y = 0; y < m_cvts.ymax; y++) { + m_image[y] = &(*m_L)(0,y); + } + if (use_scales) { + m_convolved_image = (float ***)malloc(m_range * sizeof(float **)); + FFTW_MUTEX::fftw_mutex_alloc.lock(); + m_image_fft = (fftwf_complex *)fftwf_alloc_complex(length); + m_filter_fft = (fftwf_complex **)fftwf_alloc_complex(m_range); + for (int scale = 0; scale < m_range; scale++) { + m_filter_fft[scale] = (fftwf_complex *)fftwf_alloc_complex(length); + m_convolved_image[scale] = (float **)malloc(m_cvts.ymax * sizeof(float *)); + m_convolved_image[scale][0] = (float *)malloc(length * sizeof(float)); + for (size_t y = 1; y < m_cvts.ymax; y++) + m_convolved_image[scale][y] = m_convolved_image[scale][0] + y * m_cvts.xmax; + } + m_convolution_fft = (fftwf_complex *)fftwf_alloc_complex(m_cvts.xmax * m_cvts.ymax); + FFTW_MUTEX::fftw_mutex_alloc.unlock(); + } } -double Reinhard02::V1( int x, int y, int level ) - /* PRE: */ -{ - int x0, y0; - int l, size; - double s, t; - - /* Level 0 is a special case, the value is just the image */ - if (level == 0) - return(m_luminance[y][x]); - - /* Compute the size of the slice */ - l = 1 << level; - x0 = x >> level; - y0 = y >> level; - size = PyramidWidth0 >> (level - 1); - - x0 = (x0 >= size ? size - 1 : x0); - y0 = (y0 >= size ? size - 1 : y0); +Reinhard02::~Reinhard02() { + free(m_image); + if (m_use_scales) { + FFTW_MUTEX::fftw_mutex_free.lock(); + for (int scale = 0; scale < m_range; scale++) { + fftwf_free(m_filter_fft[scale]); + } + fftwf_free(m_filter_fft); + fftwf_free(m_convolution_fft); + fftwf_free(m_image_fft); + FFTW_MUTEX::fftw_mutex_free.unlock(); + for (int scale = 0; scale < m_range; scale++) { + free(m_convolved_image[scale][0]); + free(m_convolved_image[scale]); + } + free(m_convolved_image); + } +} - s = (double)(x - x0*l)/(double)l; - t = (double)(y - y0*l)/(double)l; +void Reinhard02::tmo_reinhard02() { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + m_ph.setValue(2); + + // reading image + #pragma omp parallel for + for (size_t y = 0; y < m_cvts.ymax; y++) + for (size_t x = 0; x < m_cvts.xmax; x++) + m_image[y][x] = (*m_Y)(x, y); + + m_ph.setValue(10); + if (m_ph.canceled()) goto end; - level--; + scale_to_midtone(); - //!! FIX: a quick fix for boundary conditions - int x01,y01; - x01 = (x0 == size-1 ? x0 : x0+1); - y01 = (y0 == size-1 ? y0 : y0+1); + m_ph.setValue(30); + if (m_ph.canceled()) goto end; - return((1-s)*(1-t)*Pyramid[level][y0][x0] + s*(1-t)*Pyramid[level][y0][x01] - + (1-s)*t*Pyramid[level][y01][x0] + s*t*Pyramid[level][y01][x01]); -} + if (m_use_scales) { + compute_fourier_convolution(); + } -/* PRE: */ -double Reinhard02::pyramid_lookup( unsigned int x, unsigned int y, int level ) -{ - // int n, s; + tonemap_image(); - /* Level 0 is a special case, the value is just the image */ - if (level == 0) { - if ( (x < 0) || (y < 0) || (x >= m_width) || (y >= m_height) ) - return(0.0); - else - return(m_luminance[y][x]); - } - - /* Compute the size of the slice */ - level--; - // n = 1 << level; - unsigned int s = PyramidWidth0 >> level; - - //x = x >> level; - //y = y >> level; - - if ( (x < 0) || (y < 0) || (x >= s) || (y >= s) ) - return(0.0); - else - return(Pyramid[level][y][x]); -} + m_ph.setValue(99); -void Reinhard02::build_pyramid( double **/*luminance*/, int image_width, int image_height ) -{ - int k; - int x, y; - int i, j; - int width; - int max_dim; -// int height, pyramid_height; - - double sum = 0; - - double a = 0.4; - double b = 0.25; - double c = b - a/2; - double w[5]; - - /* Compute the "filter kernel" */ - w[0] = c; - w[1] = b; - w[2] = a; - w[3] = w[1]; - w[4] = w[0]; - - /* Build the pyramid slices. The bottom of the pyramid is the luminace */ - /* image, and is not in the Pyramid array. */ - /* For simplicity, the first level is padded to a square whose side is a */ - /* power of two. */ - - /* Compute the size of the Pyramid array */ - max_dim = (m_height > m_width ? m_height : m_width); - PyramidHeight = (int) floor(log(max_dim - 0.5)/log(2.0f)) + 1; - - /* Compute the dimensions of the first level */ - width = 1 << (PyramidHeight - 1); - PyramidWidth0 = width; - -// fprintf(stderr, "max_dim %d height %d\n", max_dim, PyramidHeight); - - /* Allocate the outer Pyramid array */ - Pyramid = (double***) calloc(PyramidHeight, sizeof(double**)); - if (!Pyramid) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - - /* Allocate and assign the Pyramid slices */ - k = 0; - - while (width) { - -// fprintf(stderr, "level %d, width = %d\n", k, width); - - /* Allocate the slice */ - Pyramid[k] = (double**) calloc(width, sizeof(double*)); - if (!Pyramid[k]) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - for (y = 0; y < width; y++) { - Pyramid[k][y] = (double*) calloc(width, sizeof(double)); - if (!Pyramid[k][y]) { - fprintf(stderr, "Unable to allocate pyramid array.\n"); - exit(1); - } - } - - /* Compute the values in the slice */ - for (y = 0; y < width; y++) { - for (x = 0; x < width; x++) { - - sum = 0; - for (i = 0; i < 5; i++) { - for (j = 0; j < 5; j++) { - sum += w[i]*w[j]*pyramid_lookup(2*x + i - 2, 2*y + j - 2, k); - } - } - Pyramid[k][y][x] = sum; - } - } - - /* compute the width of the next slice */ - width /= 2; - k++; - } -} +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_reinhard02 = " << stop_watch.get_time() << " msec" << endl; +#endif -void Reinhard02::clean_pyramid() -{ - int k=0; - int width = PyramidWidth0; - while(width) - { - for( int y=0 ; y * * $Id: tmo_reinhard02.h,v 1.2 2008/09/04 12:46:49 julians37 Exp $ + * + * This file is a part of LuminanceHDR package, based on pfstmo. + * ---------------------------------------------------------------------- + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * Adapted to Luminance HDR + * @author Franco Comida + * */ #ifndef TMO_REINHARD02_H #define TMO_REINHARD02_H +#include +#include + #include -namespace pfs -{ +namespace pfs { class Progress; } -/** - * Used to achieve temporal coherence - */ -template -class TemporalSmoothVariable -{ -// const int hist_length = 100; - T value; - - T getThreshold( T luminance ) - { - return 0.01 * luminance; - } - -public: - TemporalSmoothVariable() : value( -1 ) - { - } - - void set( T new_value ) - { - if( value == -1 ) - value = new_value; - else { - T delta = new_value - value; - const T threshold = getThreshold( (new_value + value)/2 ); - if( delta > threshold ) delta = threshold; - else if( delta < -threshold ) delta = -threshold; - value += delta; - } - } - - T get() const - { - return value; - } -}; - //--- from defines.h -typedef struct { - int xmax, ymax; /* image dimensions */ -} CVTS; - -typedef double COLOR[3]; /* red, green, blue (or X,Y,Z) */ -//--- end of defines.h - - -//static double key = 0.18; -//static double threshold = 0.05; -//static double phi = 8.; -//static double white = 1e20; -//static int scale_low = 1; -//static int scale_high = 43; // 1.6^8 = 43 -//static int range = 8; -//static int use_scales = 0; -//static int use_border = 0; +typedef struct { size_t xmax, ymax; /* image dimensions */ } CVTS; +typedef float COLOR[3]; /* red, green, blue (or X,Y,Z) */ +//--- end of defines.h /* * @brief Photographic tone-reproduction @@ -91,57 +62,48 @@ * @param low size in pixels of smallest scale (should be kept at 1) * @param high size in pixels of largest scale (default 1.6^8 = 43) */ -class Reinhard02 -{ -public: - Reinhard02(const pfs::Array2Df *Y, pfs::Array2Df *L, - bool use_scales, float key, float phi, - int num, int low, int high, bool temporal_coherent, - pfs::Progress &ph); +class Reinhard02 { + public: + Reinhard02(const pfs::Array2Df *Y, pfs::Array2Df *L, bool use_scales, + float key, float phi, int num, int low, int high, + bool temporal_coherent, pfs::Progress &ph); - ~Reinhard02() - {} + ~Reinhard02(); void tmo_reinhard02(); -private: - TemporalSmoothVariable m_avg_luminance, m_max_luminance; + private: CVTS m_cvts; - COLOR **m_image; - double m_sigma_0, m_sigma_1; - double **m_luminance; - unsigned int m_width, m_height; - const pfs::Array2Df* m_Y; - pfs::Array2Df* m_L; + float **m_image; + float m_sigma_0, m_sigma_1; + int m_width, m_height; + const pfs::Array2Df *m_Y; + pfs::Array2Df *m_L; bool m_use_scales; bool m_use_border; - double m_key, m_phi, m_white; + float m_key, m_twopowphi, m_white; int m_range, m_scale_low, m_scale_high; - bool m_temporal_coherent; - const double m_alpha; - double m_bbeta; - double m_threshold; + const float m_alpha; + float m_bbeta; + float m_threshold; + float m_k; pfs::Progress &m_ph; - double ***Pyramid; - int PyramidHeight; - int PyramidWidth0; - - double bessel(double); - void compute_bessel(); - double kaiserbessel(double, double, double); - double get_maxvalue(); + fftwf_complex **m_filter_fft; + fftwf_complex *m_image_fft; + fftwf_complex *m_convolution_fft; + float ***m_convolved_image; + + float bessel(float); + float kaiserbessel(float, float, float); + float get_maxvalue(); void tonemap_image(); - void clamp_image(); - double log_average(); + float log_average(); void scale_to_midtone(); - void copy_luminance(); - void allocate_memory(); - void deallocate_memory(); - void dynamic_range(); - double V1(int, int, int); - double pyramid_lookup(unsigned int, unsigned int, int); - void build_pyramid(double **, int, int); - void clean_pyramid(); + void gaussian_filter(fftwf_complex *, float, float); + void build_gaussian_fft(); + void build_image_fft(); + void convolve_filter(int, fftwf_complex *); + void compute_fourier_convolution(); }; #endif // TMO_REINHARD02_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -33,21 +33,23 @@ #include "tmo_reinhard05.h" +#include #include #include -#include -#include "Libpfs/frame.h" #include "Libpfs/colorspace/colorspace.h" #include "Libpfs/exception.h" +#include "Libpfs/frame.h" #include "Libpfs/progress.h" -void pfstmo_reinhard05(pfs::Frame &frame, float brightness, float chromaticadaptation, float lightadaptation, pfs::Progress &ph) -{ - //--- default tone mapping parameters; - //float brightness = 0.0f; - //float chromaticadaptation = 0.5f; - //float lightadaptation = 0.75f; +void pfstmo_reinhard05(pfs::Frame &frame, float brightness, + float chromaticadaptation, float lightadaptation, + pfs::Progress &ph) { + +//--- default tone mapping parameters; +// float brightness = 0.0f; +// float chromaticadaptation = 0.5f; +// float lightadaptation = 0.75f; #ifndef NDEBUG std::stringstream ss; @@ -60,13 +62,14 @@ std::cout << ss.str(); #endif + ph.setValue(0); + pfs::Channel *R, *G, *B; - frame.getXYZChannels( R, G, B ); + frame.getXYZChannels(R, G, B); //--- - if ( !R || !G || !B ) - { - throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + if (!R || !G || !B) { + throw pfs::Exception("Missing X, Y, Z channels in the PFS stream"); } frame.getTags().setTag("LUMINANCE", "RELATIVE"); @@ -76,13 +79,18 @@ // is there a way to remove this copy as well? // I am pretty sure there is! - pfs::Array2Df Y(width,height); + pfs::Array2Df Y(width, height); pfs::transformRGB2Y(R, G, B, &Y); - tmo_reinhard05(width, height, R->data(), G->data(), B->data(), Y.data(), - Reinhard05Params(brightness, chromaticadaptation, lightadaptation), ph); + try { + tmo_reinhard05( + width, height, R->data(), G->data(), B->data(), Y.data(), + Reinhard05Params(brightness, chromaticadaptation, lightadaptation), + ph); + } catch (...) { + throw pfs::Exception("Tonemapping Failed!"); + } - if (!ph.canceled()) - { - ph.setValue( 100 ); + if (!ph.canceled()) { + ph.setValue(100); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -31,77 +31,39 @@ */ #include "tmo_reinhard05.h" -#include "TonemappingOperators/pfstmo.h" #include "Libpfs/progress.h" +#include "Libpfs/utils/msec_timer.h" +#include "TonemappingOperators/pfstmo.h" #include #include -#include -#include #include +#include #include +#include +#include "../../opthelper.h" +#include "../../sleef.c" +#define pow_F(a,b) (xexpf(b*xlogf(a))) using namespace std; -namespace -{ -class LuminanceEqualization -{ -private: - static const float DISPL_F; - -public: - LuminanceEqualization(): - min_lum_( numeric_limits::max() ), - max_lum_( -numeric_limits::max() ), - avg_lum_( 0.0f ), - adapted_lum_( 0.0f ) - {} - - void operator() (const float& value) - { - min_lum_ = std::min(min_lum_, value); - max_lum_ = std::max(max_lum_, value); - avg_lum_ += value; - adapted_lum_ += logf(DISPL_F + value); - } - - float min_lum_; - float max_lum_; - float avg_lum_; - float adapted_lum_; -}; - -const float LuminanceEqualization::DISPL_F = 2.3e-5f; +namespace { -void computeAverage(const float* samples, size_t numSamples, float& average) -{ - float summation = accumulate(samples, samples + numSamples, 0.0f); - average = summation/numSamples; -} +void computeAverage(const float *samples, size_t width, size_t height, float &average) { - -class Normalizer -{ -private: - const float& min_; - const float& max_; - -public: - Normalizer(const float& min, const float& max): - min_(min), - max_(max) - {} - - void operator() (float& value) - { - value = (value - min_)/(max_ - min_); + double summation = 0.0; // always use double precision for large summations +#ifdef _OPENMP + #pragma omp parallel for reduction(+:summation) +#endif + for (size_t y = 0; y < height; ++y) { + for (size_t x = 0; x < width; ++x) { + summation += samples[y * width + x]; + } } -}; - + average = summation / (width * height); +} -struct LuminanceProperties -{ +struct LuminanceProperties { float max; float min; float adaptedAverage; @@ -109,154 +71,254 @@ float imageKey; float imageContrast; float imageBrightness; - }; -void computeLuminanceProperties(const float* samples, - size_t numSamples, - LuminanceProperties& luminanceProperties, - const Reinhard05Params& params) -{ - // equalization parameters for the Luminance Channel - LuminanceEqualization lum_eq = for_each(samples, samples + numSamples, LuminanceEqualization()); +void computeLuminanceProperties(const float *samples, size_t width, size_t height, + LuminanceProperties &luminanceProperties, + const Reinhard05Params ¶ms) { - luminanceProperties.max = std::log(lum_eq.max_lum_); - luminanceProperties.min = std::log(lum_eq.min_lum_); - luminanceProperties.adaptedAverage = lum_eq.adapted_lum_/numSamples; - luminanceProperties.average = lum_eq.avg_lum_/numSamples; + // equalization parameters for the Luminance Channel + float min_lum = numeric_limits::max(); + float max_lum = -numeric_limits::max(); + float avg_lum = 0.f; + float adapted_lum = 0.f; +#ifdef _OPENMP +#pragma omp parallel +#endif +{ + float min_lumthr = numeric_limits::max(); + float max_lumthr = -numeric_limits::max(); + float avg_lumthr = 0.f; + float adapted_lumthr = 0.f; + +#ifdef __SSE2__ + vfloat min_lumv = F2V(min_lum); + vfloat max_lumv = F2V(max_lum); + vfloat avg_lumv = ZEROV; + vfloat adapted_lumv = ZEROV; + vfloat c1v = F2V(2.3e-5f); +#endif +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t y = 0; y < height; ++y) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < width - 3; x += 4) { + vfloat value = LVFU(samples[y * width + x]); + min_lumv = vminf(min_lumv, value); + max_lumv = vmaxf(max_lumv, value); + avg_lumv += value; + adapted_lumv += xlogf(c1v + value); + } +#endif + for (; x < width; ++x) { + float value = samples[y * width + x]; + min_lumthr = std::min(min_lumthr, value); + max_lumthr = std::max(max_lumthr, value); + avg_lumthr += value; + adapted_lumthr += xlogf(2.3e-5f + value); + } + } +#ifdef _OPENMP +#pragma omp critical +#endif +{ + min_lum = std::min(min_lum, min_lumthr); + max_lum = std::max(max_lum, max_lumthr); + avg_lum += avg_lumthr; + adapted_lum += adapted_lumthr; +#ifdef __SSE2__ + min_lum = std::min(min_lum, vhmin(min_lumv)); + max_lum = std::max(max_lum, vhmax(max_lumv)); + avg_lum += vhadd(avg_lumv); + adapted_lum += vhadd(adapted_lumv); +#endif +} +} + luminanceProperties.max = xlogf(max_lum); + luminanceProperties.min = xlogf(min_lum); + luminanceProperties.adaptedAverage = adapted_lum / (width * height); + luminanceProperties.average = avg_lum / (width * height); // image key (k) - luminanceProperties.imageKey = (luminanceProperties.max - luminanceProperties.adaptedAverage) / (luminanceProperties.max - luminanceProperties.min); + luminanceProperties.imageKey = + (luminanceProperties.max - luminanceProperties.adaptedAverage) / + (luminanceProperties.max - luminanceProperties.min); // image contrast based on key value (f) - luminanceProperties.imageContrast = 0.3f + 0.7f*std::pow(luminanceProperties.imageKey, 1.4f); + luminanceProperties.imageContrast = + 0.3f + 0.7f * std::pow(luminanceProperties.imageKey, 1.4f); // image brightness (m?) luminanceProperties.imageBrightness = std::exp(-params.m_brightness); } -class ChannelTransformation +void transformChannel(const float *samplesChannel, + const float *samplesLuminance, + float *outputSamples, size_t width, size_t height, + float channelAverage, + const Reinhard05Params ¶ms, + const LuminanceProperties &lumProps, + float &minSample, float &maxSample) { + +#ifdef _OPENMP +#pragma omp parallel +#endif { -public: - ChannelTransformation(float& min_sample, float& max_sample, - const float& channelAverage, - const Reinhard05Params& params, - const LuminanceProperties& lumProps) - : min_sample_(min_sample) - , max_sample_(max_sample) - , channelAverage_(channelAverage) - , params_(params) - , lumProps_(lumProps) - {} - - float operator()(float ch_sample, const float y_sample) - { - if ( y_sample != 0.0f && ch_sample != 0.0f ) - { + float minSampleThr = minSample; + float maxSampleThr = maxSample; +#ifdef __SSE2__ + vfloat onev = F2V(1.f); + vfloat m_chromaticAdaptationv = F2V(params.m_chromaticAdaptation); + vfloat m_lightAdaptationv = F2V(params.m_lightAdaptation); + vfloat channelAveragev = F2V(channelAverage); + vfloat laveragev = F2V(lumProps.average); + vfloat limageBrightnessv = F2V(lumProps.imageBrightness); + vfloat limageContrastv = F2V(lumProps.imageContrast); + vfloat minSamplev = F2V(minSample); + vfloat maxSamplev = F2V(maxSample); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (size_t y = 0; y < height; ++y) { + size_t x = 0; +#ifdef __SSE2__ + for (; x < width - 3; x+=4) { + vfloat chval = LVFU(samplesChannel[y * width + x]); + vfloat oldchval = chval; + vfloat yval = LVFU(samplesLuminance[y * width + x]); + vmask selmask = vandm(vmaskf_neq(chval, ZEROV), vmaskf_neq(yval, ZEROV)); // local light adaptation - float Il = (params_.m_chromaticAdaptation * ch_sample) - + ((1.f - params_.m_chromaticAdaptation)*y_sample); + vfloat Il = (m_chromaticAdaptationv * chval) + + ((onev - m_chromaticAdaptationv) * yval); // global light adaptation - float Ig = (params_.m_chromaticAdaptation*channelAverage_) - + ((1.f - params_.m_chromaticAdaptation)*lumProps_.average); + vfloat Ig = + (m_chromaticAdaptationv * channelAveragev) + + ((onev - m_chromaticAdaptationv) * laveragev); // interpolated light adaptation - float Ia = (params_.m_lightAdaptation*Il) - + ((1.f - params_.m_lightAdaptation)*Ig); + vfloat Ia = (m_lightAdaptationv * Il) + + ((onev - m_lightAdaptationv) * Ig); // photoreceptor equation - ch_sample /= ch_sample - + std::pow(lumProps_.imageBrightness*Ia, lumProps_.imageContrast); + chval /= chval + pow_F(limageBrightnessv * Ia, limageContrastv); - max_sample_ = std::max(ch_sample, max_sample_); - min_sample_ = std::min(ch_sample, min_sample_); + maxSamplev = vself(selmask, vmaxf(chval, maxSamplev), maxSamplev); + minSamplev = vself(selmask, vminf(chval, minSamplev), minSamplev); + chval = vself(selmask, chval, oldchval); + STVFU(outputSamples[y * width + x], chval); + } +#endif + for (; x < width; ++x) { + float chval = samplesChannel[y * width + x]; + float yval = samplesLuminance[y * width + x]; + if (yval != 0.0f && chval != 0.0f) { + // local light adaptation + float Il = (params.m_chromaticAdaptation * chval) + + ((1.f - params.m_chromaticAdaptation) * yval); + // global light adaptation + float Ig = + (params.m_chromaticAdaptation * channelAverage) + + ((1.f - params.m_chromaticAdaptation) * lumProps.average); + // interpolated light adaptation + float Ia = (params.m_lightAdaptation * Il) + + ((1.f - params.m_lightAdaptation) * Ig); + // photoreceptor equation + chval /= chval + pow_F(lumProps.imageBrightness * Ia, + lumProps.imageContrast); + + maxSampleThr = std::max(chval, maxSampleThr); + minSampleThr = std::min(chval, minSampleThr); + } + outputSamples[y * width + x] = chval; } - return ch_sample; } - -private: - // output - float& min_sample_; - float& max_sample_; - - const float& channelAverage_; - const Reinhard05Params& params_; - const LuminanceProperties& lumProps_; -}; - -inline -void transformChannel(const float* samplesChannel, - const float* samplesLuminance, - float* outputSamples, - size_t numSamples, - float channelAverage, - const Reinhard05Params& params, - const LuminanceProperties& lumProps, - float& minSample, float& maxSample) +#ifdef _OPENMP +#pragma omp critical +#endif { - transform(samplesChannel, - samplesChannel + numSamples, - samplesLuminance, - outputSamples, - ChannelTransformation(minSample, - maxSample, - channelAverage, - params, - lumProps) - ); + minSample = std::min(minSampleThr, minSample); + maxSample = std::max(maxSampleThr, maxSample); +#ifdef __SSE2__ + minSample = std::min(minSample, vhmin(minSamplev)); + maxSample = std::max(maxSample, vhmax(maxSamplev)); +#endif +} +} } -void normalizeChannel(float* samples, size_t numSamples, float min, float max) -{ - for_each(samples, samples + numSamples, Normalizer(min, max)); +void normalizeChannel(float *samples, size_t width, size_t height, float min, float max) { + + float dividor = max - min; +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (size_t y = 0; y < height; ++y) { + // manual vectorization of this simple loop gives no speedup. Most likely compiler auto-vectorizes this well + for (size_t x = 0; x < width; ++x) { + samples[y * width + x] = (samples[y * width + x] - min) / (dividor); + } + } } } -void tmo_reinhard05(size_t width, size_t height, - float* nR, float* nG, float* nB, - const float* nY, - const Reinhard05Params& params, - pfs::Progress &ph) -{ +void tmo_reinhard05(size_t width, size_t height, float *nR, float *nG, + float *nB, const float *nY, const Reinhard05Params ¶ms, + pfs::Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + float Cav[] = {0.0f, 0.0f, 0.0f}; - const size_t imSize = width * height; + computeAverage(nR, width, height, Cav[0]); + ph.setValue(2); + + computeAverage(nG, width, height, Cav[1]); + ph.setValue(4); - computeAverage(nR, imSize, Cav[0]); - computeAverage(nG, imSize, Cav[1]); - computeAverage(nB, imSize, Cav[2]); + computeAverage(nB, width, height, Cav[2]); + ph.setValue(6); LuminanceProperties luminanceProperties; - computeLuminanceProperties(nY, imSize, luminanceProperties, params); + computeLuminanceProperties(nY, width, height, luminanceProperties, params); + ph.setValue(11); // output float max_col = std::numeric_limits::min(); float min_col = std::numeric_limits::max(); + // transform Red Channel - transformChannel(nR, nY, nR, imSize, Cav[0], params, luminanceProperties, min_col, max_col); - ph.setValue(22); + transformChannel(nR, nY, nR, width, height, Cav[0], params, luminanceProperties, + min_col, max_col); + ph.setValue(38); // transform Green Channel - transformChannel(nG, nY, nG, imSize, Cav[1], params, luminanceProperties, min_col, max_col); - ph.setValue(44); + transformChannel(nG, nY, nG, width, height, Cav[1], params, luminanceProperties, + min_col, max_col); + ph.setValue(58); // transform Blue Channel - transformChannel(nB, nY, nB, imSize, Cav[2], params, luminanceProperties, min_col, max_col); - ph.setValue(66); - + transformChannel(nB, nY, nB, width, height, Cav[2], params, luminanceProperties, + min_col, max_col); + ph.setValue(78); + + //--- normalize intensities + // normalize RED channel + normalizeChannel(nR, width, height, min_col, max_col); + + // normalize GREEN channel + normalizeChannel(nG, width, height, min_col, max_col); + + // normalize BLUE channel + normalizeChannel(nB, width, height, min_col, max_col); + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_reinhard05 = " << stop_watch.get_time() << " msec" << endl; +#endif - if (!ph.canceled()) - { - //--- normalize intensities - // normalize RED channel - normalizeChannel(nR, imSize, min_col, max_col); - ph.setValue(77); // done! - - // normalize GREEN channel - normalizeChannel(nG, imSize, min_col, max_col); - ph.setValue(88); - - // normalize BLUE channel - normalizeChannel(nB, imSize, min_col, max_col); - ph.setValue(99); - } } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/tmo_reinhard05.h luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/reinhard05/tmo_reinhard05.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.h 2019-06-09 19:18:38.000000000 +0000 @@ -35,20 +35,16 @@ #include -namespace pfs -{ +namespace pfs { class Progress; } -struct Reinhard05Params -{ - Reinhard05Params(float brightness, - float chromaticAdaptation, +struct Reinhard05Params { + Reinhard05Params(float brightness, float chromaticAdaptation, float lightAdaptation) - : m_brightness(brightness) - , m_chromaticAdaptation(chromaticAdaptation) - , m_lightAdaptation(lightAdaptation) - { + : m_brightness(brightness), + m_chromaticAdaptation(chromaticAdaptation), + m_lightAdaptation(lightAdaptation) { // ideally double check that parameters are not outside // of the allowed range! } @@ -69,10 +65,8 @@ //! \param br brightness level -8:8 (def 0) //! \param ca amount of chromatic adaptation 0:1 (saturation, def 0) //! \param la amount of light adaptation 0:1 (local/global, def 1) -void tmo_reinhard05(size_t width, size_t height, - float* R, float* G, float* B, - const float* Y, - const Reinhard05Params& params, +void tmo_reinhard05(size_t width, size_t height, float *R, float *G, float *B, + const float *Y, const Reinhard05Params ¶ms, pfs::Progress &ph); -#endif // TMO_REINHARD05_H +#endif // TMO_REINHARD05_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,9 @@ +# List all .h files in this directory +FILE(GLOB FILES_H *.h) +# List all .cpp files in this directory +FILE(GLOB FILES_CPP *.cpp) + +# add all .h files to the _H module variable +SET(TM_LIBPFS_H ${TM_LIBPFS_H} ${FILES_H} PARENT_SCOPE) +# add all .cpp files to the _CPP module variable +SET(TM_LIBPFS_CPP ${TM_LIBPFS_CPP} ${FILES_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/pfstmo_vanhateren06.cpp luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/pfstmo_vanhateren06.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/pfstmo_vanhateren06.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/pfstmo_vanhateren06.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * @brief VanHateren Tone Mapping Operator: + * "Encoding of High Dynamic Range Video with a Model of Human Cones" + * by J. Hans Van Hateren + * in ACM Transaction on Graphics 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include +#include + +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/manip/gamma.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" + +#include "tmo_vanhateren06.h" +#include "../../sleef.c" +#include "../../opthelper.h" + +using namespace pfs; + +void pfstmo_vanhateren06(Frame &frame, float pupil_area, Progress &ph) { + +#ifndef NDEBUG + //--- default tone mapping parameters; + std::cout << "pfstmo_vanhateren06 ("; + std::cout << "pupil area: " << pupil_area << ")" << std::endl; +#endif + + ph.setValue(0); + + applyGamma(&frame, 1.8f); + + Channel *inX, *inY, *inZ; + frame.getXYZChannels(inY, inX, inZ); + assert(inX != NULL); + assert(inY != NULL); + assert(inZ != NULL); + if (!inX || !inY || !inZ) { + throw Exception("Missing X, Y, Z channels in the PFS stream"); + } + + int w = inX->getCols(); + int h = inX->getRows(); + + Array2Df L(w, h); + Array2Df Lold(w, h); + transformRGB2Y(inX, inY, inZ, &L); + copy(L.begin(), L.end(), Lold.begin()); + + try { + tmo_vanhateren06(L, pupil_area, ph); + } catch (...) { + throw Exception("Tonemapping Failed!"); + } + + if (!ph.canceled()) { + Array2Df &arrayRed = *inX; + Array2Df &arrayGreen = *inY; + Array2Df &arrayBlue = *inZ; + + #pragma omp parallel for + for (int i = 0; i < h; ++i) { + int j = 0; +#ifdef __SSE2__ + for (; j < w - 3; j += 4) { + vfloat scalev = LVFU(L(j, i)) / LVFU(Lold(j, i)); + STVFU(arrayRed(j, i), LVFU(arrayRed(j, i)) * scalev); + STVFU(arrayGreen(j, i), LVFU(arrayGreen(j, i)) * scalev); + STVFU(arrayBlue(j, i), LVFU(arrayBlue(j, i)) * scalev); + } +#endif + for (; j < w; ++j) { + float scale = L(j, i) / Lold(j, i); + arrayRed(j, i) = arrayRed(j, i) * scale; + arrayGreen(j, i) = arrayGreen(j, i) * scale; + arrayBlue(j, i) = arrayBlue(j, i) * scale; + } + } + } + + frame.getTags().setTag("LUMINANCE", "DISPLAY"); + + ph.setValue(100); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.cpp luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,144 @@ +/* + * @brief VanHateren Tone Mapping Operator: + * "Encoding of High Dynamic Range Video with a Model of Human Cones" + * by J. Hans Van Hateren + * in ACM Transaction on Graphics 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#include +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" +#include "Libpfs/utils/msec_timer.h" +#include "Libpfs/utils/clamp.h" +#include +#include "rt_math.h" +#include "tmo_vanhateren06.h" + +using namespace pfs; +using namespace pfs::colorspace; +using namespace std; + +int tmo_vanhateren06(Array2Df &L, float pupil_area, Progress &ph) { +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + ph.setValue(5); + + pupil_area = std::max(pupil_area, 0.f); + + const size_t w = L.getCols(); + const size_t h = L.getRows(); + const size_t size = w*h; + + const float k_beta = 1.6e-4; // td/ms + const float a_C = 9e-2; + const float C_beta = 2.8e-3; // 1/ms + + //Calculate Ios,max + double polIosMax[] = {-1.0/C_beta, 0.0, 0.0, 0.0, 1.0, a_C}; + gsl_poly_complex_workspace* ws = gsl_poly_complex_workspace_alloc(6); + double roots[10]; + gsl_poly_complex_solve(polIosMax, 6, ws, roots); + gsl_poly_complex_workspace_free(ws); + + for (int i = 0; i < 10 ; i += 2) { + roots[i>>1] = roots[i]; + } + + const float maxIos = (float) *max_element(roots, roots + 5); + + float minVal = std::numeric_limits::max(); + float maxVal = std::numeric_limits::min(); + +#ifdef _OPENMP + #pragma omp parallel for reduction(min:minVal) reduction(max:maxVal) +#endif + for (size_t i = 0; i < size; ++i) { + const float val = -1.f / (C_beta + k_beta * L(i) * pupil_area); + minVal = std::min(minVal, val); + maxVal = std::max(maxVal, val); + L(i) = val; + } + + ph.setValue(33); + + constexpr int lutSize = 65536; + const float scale = (lutSize - 1) / (maxVal - minVal); + + float lookup[lutSize]; + + const float lutscale = (maxVal - minVal) / (lutSize - 1); + +#ifdef _OPENMP + #pragma omp parallel +#endif + { + gsl_poly_complex_workspace* wsp = gsl_poly_complex_workspace_alloc(6); + double base[] = {0.0, 0.0, 0.0, 0.0, 1.0, a_C}; + double roots[10]; +#ifdef _OPENMP + #pragma omp for nowait +#endif + for (size_t i = 0; i < lutSize; ++i) { + base[0] = minVal + lutscale * i; + gsl_poly_complex_solve (base, 6, wsp, roots); + double maxRoot = roots[0]; + for (int k = 2; k < 10; k += 2) { + maxRoot = std::max(maxRoot, roots[k]); + } + lookup[i] = maxRoot; + } + gsl_poly_complex_workspace_free (wsp); + } + + ph.setValue(66); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic, w * 16) +#endif + for (size_t i = 0; i < size; i++) { + const float index = lhdrengine::LIM((L(i) - minVal) * scale, 0.f, static_cast(lutSize - 1)); + const int lowerIndex = index; + const int upperIndex = std::min(lowerIndex + 1, lutSize - 1); + L(i) = 1.f - lhdrengine::intp(index - lowerIndex, lookup[upperIndex], lookup[lowerIndex]) / maxIos; + } + + ph.setValue(99); + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + cout << endl; + cout << "tmo_vanhateren06 = " << stop_watch.get_time() << " msec" << endl; +#endif + + return 0; +} diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.h luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingOperators/vanhateren06/tmo_vanhateren06.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * @brief VanHateren Tone Mapping Operator: + * "Encoding of High Dynamic Range Video with a Model of Human Cones" + * by J. Hans Van Hateren + * in ACM Transaction on Graphics 2006 + * + * This file is a part of LuminanceHDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2018 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida, + * + */ + +#ifndef TMO_VANHATEREN_H +#define TMO_VANHATEREN_H + +#include + +namespace pfs { +class Frame; +class Progress; +} + +//! \brief Van Hateren tone mapping operator +//! +//! \param L [in/out] image luminance values +//! \param pupil area in mm^2 +//! +int tmo_vanhateren06(pfs::Array2Df &L, float pupil_area, pfs::Progress &ph); + +#endif // TMO_VANHATEREN_H diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/CMakeLists.txt luminance-hdr-2.6.0/src/TonemappingPanel/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -24,8 +24,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(tonemappingpanel ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(tonemappingpanel Core Gui Widgets Sql Xml) +ADD_LIBRARY(tonemappingpanel STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(tonemappingpanel Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql Qt5::Xml) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} tonemappingpanel PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/SavingParametersDialog.cpp luminance-hdr-2.6.0/src/TonemappingPanel/SavingParametersDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/SavingParametersDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/SavingParametersDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,10 +22,14 @@ * */ -#include "SavingParametersDialog.h" +#include "TonemappingPanel/ui_SavingParametersDialog.h" +#include "TonemappingPanel/SavingParametersDialog.h" -SavingParameters::SavingParameters(QWidget *parent): - QDialog(parent) -{ - setupUi(this); +SavingParameters::SavingParameters(QWidget *parent) + : QDialog(parent), m_Ui(new Ui::SavingParameters) { + m_Ui->setupUi(this); } + +SavingParameters::~SavingParameters() {} + +QString SavingParameters::getComment() { return m_Ui->comment->text(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/SavingParametersDialog.h luminance-hdr-2.6.0/src/TonemappingPanel/SavingParametersDialog.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/SavingParametersDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/SavingParametersDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,15 +25,22 @@ #ifndef SAVINGPARAMETERSDIALOG_H #define SAVINGPARAMETERSDIALOG_H -#include "ui_SavingParametersDialog.h" +#include "TonemappingPanel/ui_SavingParametersDialog.h" -class SavingParameters : public QDialog, private Ui::SavingParameters -{ +namespace Ui { +class SavingParameters; +} + +class SavingParameters : public QDialog { Q_OBJECT -public: + public: SavingParameters(QWidget *parent = 0); - QString getComment() { return comment->text(); } + ~SavingParameters(); + QString getComment(); + + protected: + QScopedPointer m_Ui; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/ThresholdWidget.cpp luminance-hdr-2.6.0/src/TonemappingPanel/ThresholdWidget.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/ThresholdWidget.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/ThresholdWidget.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,40 +22,34 @@ * */ -#include "ThresholdWidget.h" -#include "ui_ThresholdWidget.h" +#include "TonemappingPanel/ui_ThresholdWidget.h" +#include "TonemappingPanel/ThresholdWidget.h" -ThresholdWidget::ThresholdWidget(QWidget *parent, Qt::WindowFlags flags): - QFrame(parent, flags), - m_Ui(new Ui::ThresholdWidget) -{ +ThresholdWidget::ThresholdWidget(QWidget *parent, Qt::WindowFlags flags) + : QFrame(parent, flags), m_Ui(new Ui::ThresholdWidget) { m_Ui->setupUi(this); } -ThresholdWidget::~ThresholdWidget() -{ -} +ThresholdWidget::~ThresholdWidget() {} -float ThresholdWidget::threshold() const -{ +float ThresholdWidget::threshold() const { return m_Ui->thresholdDoubleSpinBox->value(); } -void ThresholdWidget::on_thresholdDoubleSpinBox_valueChanged(double value) -{ +void ThresholdWidget::on_thresholdDoubleSpinBox_valueChanged(double value) { int maxv = m_Ui->thresholdHorizontalSlider->maximum(); - m_Ui->thresholdHorizontalSlider->setValue((int)(value*(maxv+1))); + m_Ui->thresholdHorizontalSlider->setValue((int)(value * (maxv + 1))); } -void ThresholdWidget::on_thresholdHorizontalSlider_valueChanged(int pos) -{ +void ThresholdWidget::on_thresholdHorizontalSlider_valueChanged(int pos) { int maxv = m_Ui->thresholdHorizontalSlider->maximum(); - m_Ui->thresholdDoubleSpinBox->setValue( (double)pos/(maxv+1) ); + m_Ui->thresholdDoubleSpinBox->setValue((double)pos / (maxv + 1)); } -void ThresholdWidget::keyPressEvent(QKeyEvent *event) -{ +void ThresholdWidget::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) { emit ready(); } } + +void ThresholdWidget::hideEvent(QHideEvent *event) { emit ready(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/ThresholdWidget.h luminance-hdr-2.6.0/src/TonemappingPanel/ThresholdWidget.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/ThresholdWidget.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/ThresholdWidget.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,30 +26,30 @@ #define THRESHOLDWIDGET_H #include +#include #include -namespace Ui -{ - class ThresholdWidget; +namespace Ui { +class ThresholdWidget; } -class ThresholdWidget : public QFrame -{ +class ThresholdWidget : public QFrame { Q_OBJECT -public: - ThresholdWidget(QWidget *parent = 0, Qt::WindowFlags flags=Qt::Popup); + public: + ThresholdWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Popup); ~ThresholdWidget(); float threshold() const; -protected: + protected: void keyPressEvent(QKeyEvent *event); + void hideEvent(QHideEvent *event); QScopedPointer m_Ui; -Q_SIGNALS: + Q_SIGNALS: void ready(); -protected Q_SLOTS: + protected Q_SLOTS: void on_thresholdDoubleSpinBox_valueChanged(double value); void on_thresholdHorizontalSlider_valueChanged(int pos); }; diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TMOProgressIndicator.cpp luminance-hdr-2.6.0/src/TonemappingPanel/TMOProgressIndicator.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TMOProgressIndicator.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TMOProgressIndicator.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,76 +29,70 @@ #include -TMOProgressIndicator::TMOProgressIndicator(QWidget *parent): - QWidget(parent), - m_isTerminated(true) -{ +TMOProgressIndicator::TMOProgressIndicator(QWidget *parent) + : QWidget(parent), m_isTerminated(true) { m_hbl = new QHBoxLayout(this); - m_hbl->setMargin(0); // Design - m_hbl->setSpacing(4); // Design + m_hbl->setMargin(0); // Design + m_hbl->setSpacing(4); // Design m_hbl->setContentsMargins(0, 0, 0, 0); m_progressBar = new QProgressBar(this); m_progressBar->setValue(0); m_abortButton = new QPushButton(this); - m_abortButton->resize(22,22); - m_abortButton->setIcon(QIcon::fromTheme("tab-close", QIcon(":/program-icons/tab-close"))); + m_abortButton->resize(22, 22); + m_abortButton->setIcon(QIcon::fromTheme( + QStringLiteral("tab-close"), QIcon(":/program-icons/tab-close"))); m_abortButton->setToolTip(QString(tr("Abort computation"))); m_hbl->addWidget(m_progressBar); m_hbl->addWidget(m_abortButton); - connect(m_abortButton, SIGNAL(clicked()), this, SIGNAL(terminate())); - connect(m_abortButton, SIGNAL(clicked()), this, SLOT(terminated())); + connect(m_abortButton, &QAbstractButton::clicked, this, + &TMOProgressIndicator::terminate); + connect(m_abortButton, &QAbstractButton::clicked, this, + &TMOProgressIndicator::terminated); - //Memory management - //connect(this, SIGNAL(destroyed()), ) + // Memory management + // connect(this, SIGNAL(destroyed()), ) } -TMOProgressIndicator::~TMOProgressIndicator() -{ +TMOProgressIndicator::~TMOProgressIndicator() { delete m_progressBar; delete m_abortButton; delete m_hbl; } -void TMOProgressIndicator::terminated() -{ +void TMOProgressIndicator::terminated() { std::cout << "TMOProgressIndicator::terminated()" << std::endl; m_isTerminated = true; } -bool TMOProgressIndicator::isTerminated() -{ - return m_isTerminated; -} +bool TMOProgressIndicator::isTerminated() { return m_isTerminated; } -void TMOProgressIndicator::setValue(int value) -{ +void TMOProgressIndicator::setValue(int value) { #ifdef QT_DEBUG - qDebug() << "TMOProgressIndicator::setValue("<< value <<")"; + qDebug() << "TMOProgressIndicator::setValue(" << value << ")"; #endif m_progressBar->setValue(value); - //OsIntegration::getInstance().setProgress(value, m_progressBar->maximum() - m_progressBar->minimum()); + // OsIntegration::getInstance().setProgress(value, m_progressBar->maximum() + // - + // m_progressBar->minimum()); } -void TMOProgressIndicator::setMaximum(int max) -{ +void TMOProgressIndicator::setMaximum(int max) { m_progressBar->setMaximum(max); m_isTerminated = false; } -void TMOProgressIndicator::setMinimum(int min) -{ +void TMOProgressIndicator::setMinimum(int min) { m_progressBar->setMinimum(min); } -void TMOProgressIndicator::reset() -{ +void TMOProgressIndicator::reset() { m_progressBar->reset(); - //OsIntegration::getInstance().setProgress(-1); + // OsIntegration::getInstance().setProgress(-1); m_isTerminated = true; } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TMOProgressIndicator.h luminance-hdr-2.6.0/src/TonemappingPanel/TMOProgressIndicator.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TMOProgressIndicator.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TMOProgressIndicator.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,37 +25,36 @@ #ifndef TMOPROGRESSINDICATOR #define TMOPROGRESSINDICATOR -#include +#include #include #include #include -#include +#include -class TMOProgressIndicator : public QWidget -{ +class TMOProgressIndicator : public QWidget { Q_OBJECT -public: + public: TMOProgressIndicator(QWidget *parent = 0); ~TMOProgressIndicator(); bool isTerminated(); void reset(); - void requestTermination() { emit terminate(); } + void requestTermination() { emit terminate(true); } -public slots: + public slots: void setValue(int); void setMaximum(int); void setMinimum(int); void terminated(); -private: - QHBoxLayout* m_hbl; - QProgressBar* m_progressBar; - QPushButton* m_abortButton; - bool m_isTerminated; + private: + QHBoxLayout *m_hbl; + QProgressBar *m_progressBar; + QPushButton *m_abortButton; + bool m_isTerminated; -signals: - void terminate(); + signals: + void terminate(bool); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.cpp luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,160 +26,281 @@ * */ -#include +#include #include -#include -#include #include +#include #include -#include -#include -#include #include -#include -#include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include -#include "Common/LuminanceOptions.h" -#include "Common/config.h" -#include "PreviewPanel/PreviewLabel.h" -#include "TonemappingPanel/TonemappingPanel.h" -#include "TonemappingPanel/TMOProgressIndicator.h" -#include "TonemappingPanel/TonemappingSettings.h" -#include "Common/SavedParametersDialog.h" -#include "TonemappingPanel/SavingParametersDialog.h" -#include "TonemappingOperators/pfstmdefaultparams.h" -#include "UI/Gang.h" -#include "ui_TonemappingPanel.h" - -#include "contrib/qtwaitingspinner/QtWaitingSpinner.h" - -TonemappingPanel::TonemappingPanel(int mainWinNumber, PreviewPanel *panel, QWidget *parent): - QWidget(parent), - adding_custom_size(false), - m_previewPanel(panel), - m_mainWinNumber(mainWinNumber), - m_autolevelThreshold(0.985f), - m_thd(new ThresholdWidget(this)), - m_Ui(new Ui::TonemappingPanel) -{ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +int TonemappingPanel::sm_counter = 0; + +TonemappingPanel::TonemappingPanel(int mainWinNumber, PreviewPanel *panel, + QWidget *parent) + : QWidget(parent), + adding_custom_size(false), + m_previewPanel(panel), + m_mainWinNumber(mainWinNumber), + m_autolevelThreshold(0.985f), + m_thd(new ThresholdWidget(this)), + m_Ui(new Ui::TonemappingPanel) { m_Ui->setupUi(this); - connect(m_thd.data(), SIGNAL(ready()), this, SLOT(thresholdReady())); + sm_counter++; + + m_databaseconnection = QStringLiteral("connection_") + QString("%1").arg(sm_counter); + + connect(m_thd.data(), &ThresholdWidget::ready, this, + &TonemappingPanel::thresholdReady); - if ( !QIcon::hasThemeIcon("edit-download") ) + if (!QIcon::hasThemeIcon(QStringLiteral("edit-download"))) m_Ui->saveButton->setIcon(QIcon(":/program-icons/edit-download")); - if ( !QIcon::hasThemeIcon("cloud-upload") ) + if (!QIcon::hasThemeIcon(QStringLiteral("cloud-upload"))) m_Ui->loadButton->setIcon(QIcon(":/program-icons/cloud-upload")); - currentTmoOperator = mantiuk06; // from Qt Designer + m_currentTmoOperator = mantiuk06; // from Qt Designer // mantiuk06 - contrastfactorGang = new Gang(m_Ui->contrastFactorSlider,m_Ui->contrastFactordsb,m_Ui->contrastEqualizCheckBox,NULL,NULL, NULL, 0.01f /*0.001f*/, 1.0f, MANTIUK06_CONTRAST_FACTOR); - - connect(contrastfactorGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(contrastfactorGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); - - saturationfactorGang = new Gang(m_Ui->saturationFactorSlider, m_Ui->saturationFactordsb, NULL, NULL, NULL, NULL, 0.0f, 2.0f, MANTIUK06_SATURATION_FACTOR); - detailfactorGang = new Gang(m_Ui->detailFactorSlider, m_Ui->detailFactordsb,NULL,NULL,NULL,NULL, 1.0f, 99.0f, MANTIUK06_DETAIL_FACTOR); + contrastfactorGang = + new Gang(m_Ui->contrastFactorSlider, m_Ui->contrastFactordsb, + m_Ui->contrastEqualizCheckBox, NULL, NULL, NULL, + 0.01f /*0.001f*/, 1.0f, MANTIUK06_CONTRAST_FACTOR); + + connect(contrastfactorGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(contrastfactorGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + saturationfactorGang = + new Gang(m_Ui->saturationFactorSlider, m_Ui->saturationFactordsb, NULL, + NULL, NULL, NULL, 0.0f, 2.0f, MANTIUK06_SATURATION_FACTOR); + detailfactorGang = + new Gang(m_Ui->detailFactorSlider, m_Ui->detailFactordsb, NULL, NULL, + NULL, NULL, 1.0f, 99.0f, MANTIUK06_DETAIL_FACTOR); // mantiuk08 - colorSaturationGang = new Gang(m_Ui->colorSaturationSlider,m_Ui->colorSaturationDSB, NULL, NULL, NULL, NULL, 0.f, 2.f, MANTIUK08_COLOR_SATURATION); - - connect(colorSaturationGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(colorSaturationGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); - - contrastEnhancementGang = new Gang(m_Ui->contrastEnhancementSlider, m_Ui->contrastEnhancementDSB, NULL, NULL, NULL, NULL, .01f, 10.f, MANTIUK08_CONTRAST_ENHANCEMENT); - luminanceLevelGang = new Gang(m_Ui->luminanceLevelSlider, m_Ui->luminanceLevelDSB, m_Ui->luminanceLevelCheckBox, NULL, NULL, NULL, 1.f, 100.0f, MANTIUK08_LUMINANCE_LEVEL); + colorSaturationGang = + new Gang(m_Ui->colorSaturationSlider, m_Ui->colorSaturationDSB, NULL, + NULL, NULL, NULL, 0.f, 2.f, MANTIUK08_COLOR_SATURATION); + + connect(colorSaturationGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(colorSaturationGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + contrastEnhancementGang = new Gang( + m_Ui->contrastEnhancementSlider, m_Ui->contrastEnhancementDSB, NULL, + NULL, NULL, NULL, .01f, 10.f, MANTIUK08_CONTRAST_ENHANCEMENT); + luminanceLevelGang = + new Gang(m_Ui->luminanceLevelSlider, m_Ui->luminanceLevelDSB, + m_Ui->luminanceLevelCheckBox, NULL, NULL, NULL, 1.f, 100.0f, + MANTIUK08_LUMINANCE_LEVEL); // fattal02 - alphaGang = new Gang(m_Ui->alphaSlider, m_Ui->alphadsb, NULL,NULL,NULL,NULL, 0.05, 2.f, FATTAL02_ALPHA, true); + alphaGang = new Gang(m_Ui->alphaSlider, m_Ui->alphadsb, NULL, NULL, NULL, + NULL, 0.05, 2.f, FATTAL02_ALPHA, true); - connect(alphaGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(alphaGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); - - betaGang = new Gang(m_Ui->betaSlider, m_Ui->betadsb, NULL,NULL,NULL,NULL, 0.1f, 2.f, FATTAL02_BETA); - saturation2Gang = new Gang(m_Ui->saturation2Slider, m_Ui->saturation2dsb, NULL,NULL,NULL,NULL, 0.f, 1.5f, FATTAL02_COLOR); - noiseGang = new Gang(m_Ui->noiseSlider, m_Ui->noisedsb, NULL,NULL,NULL,NULL, 0, 1.f, FATTAL02_NOISE_REDUX); + connect(alphaGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(alphaGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + betaGang = new Gang(m_Ui->betaSlider, m_Ui->betadsb, NULL, NULL, NULL, NULL, + 0.1f, 2.f, FATTAL02_BETA); + saturation2Gang = + new Gang(m_Ui->saturation2Slider, m_Ui->saturation2dsb, NULL, NULL, + NULL, NULL, 0.f, 1.5f, FATTAL02_COLOR); + noiseGang = new Gang(m_Ui->noiseSlider, m_Ui->noisedsb, NULL, NULL, NULL, + NULL, 0, 1.f, FATTAL02_NOISE_REDUX); // oldFattalGang = new Gang(NULL,NULL, m_Ui->oldFattalCheckBox); - fftSolverGang = new Gang(NULL, NULL,m_Ui->fftVersionCheckBox); + fftSolverGang = new Gang(NULL, NULL, m_Ui->fftVersionCheckBox); // ferradans11 - rhoGang = new Gang(m_Ui->rhoSlider, m_Ui->rhodsb, NULL,NULL,NULL,NULL, -10.f, 10.f, FERRADANS11_RHO); + rhoGang = new Gang(m_Ui->rhoSlider, m_Ui->rhodsb, NULL, NULL, NULL, NULL, + -10.f, 10.f, FERRADANS11_RHO); - connect(rhoGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(rhoGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + connect(rhoGang, &Gang::enableUndo, m_Ui->undoButton, &QWidget::setEnabled); + connect(rhoGang, &Gang::enableRedo, m_Ui->redoButton, &QWidget::setEnabled); - inv_alphaGang = new Gang(m_Ui->inv_alphaSlider, m_Ui->inv_alphadsb, NULL,NULL,NULL,NULL, 0.1f, 10.f, FERRADANS11_INV_ALPHA); + inv_alphaGang = + new Gang(m_Ui->inv_alphaSlider, m_Ui->inv_alphadsb, NULL, NULL, NULL, + NULL, 0.1f, 10.f, FERRADANS11_INV_ALPHA); // ashikhmin02 - contrastGang = new Gang(m_Ui->contrastSlider, m_Ui->contrastdsb,NULL,NULL,NULL,NULL, 0.f, 1.f, 0.5f); + contrastGang = new Gang(m_Ui->contrastSlider, m_Ui->contrastdsb, NULL, NULL, + NULL, NULL, 0.f, 1.f, 0.5f); - connect(contrastGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(contrastGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + connect(contrastGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(contrastGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); simpleGang = new Gang(NULL, NULL, m_Ui->simpleCheckBox); - eq2Gang = new Gang(NULL, NULL,NULL, NULL, m_Ui->eq2RadioButton, m_Ui->eq4RadioButton); + eq2Gang = new Gang(NULL, NULL, NULL, NULL, m_Ui->eq2RadioButton, + m_Ui->eq4RadioButton); // drago03 - biasGang = new Gang(m_Ui->biasSlider, m_Ui->biasdsb,NULL,NULL,NULL,NULL, 0.f, 1.f, DRAGO03_BIAS); + biasGang = new Gang(m_Ui->biasSlider, m_Ui->biasdsb, NULL, NULL, NULL, NULL, + 0.f, 1.f, DRAGO03_BIAS); - connect(biasGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(biasGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + connect(biasGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(biasGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); // durand02 - spatialGang = new Gang(m_Ui->spatialSlider, m_Ui->spatialdsb, NULL, NULL, NULL, NULL, 0.f, 100.f, DURAND02_SPATIAL); - - connect(spatialGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(spatialGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + spatialGang = new Gang(m_Ui->spatialSlider, m_Ui->spatialdsb, NULL, NULL, + NULL, NULL, 0.f, 100.f, DURAND02_SPATIAL); - rangeGang = new Gang(m_Ui->rangeSlider, m_Ui->rangedsb,NULL,NULL,NULL,NULL, 0.01f, 10.f, DURAND02_RANGE); - baseGang = new Gang(m_Ui->baseSlider, m_Ui->basedsb,NULL,NULL,NULL,NULL, 0.f, 10.f, DURAND02_BASE); + connect(spatialGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(spatialGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + rangeGang = new Gang(m_Ui->rangeSlider, m_Ui->rangedsb, NULL, NULL, NULL, + NULL, 0.01f, 10.f, DURAND02_RANGE); + baseGang = new Gang(m_Ui->baseSlider, m_Ui->basedsb, NULL, NULL, NULL, NULL, + 0.f, 10.f, DURAND02_BASE); // pattanaik00 - multiplierGang = new Gang(m_Ui->multiplierSlider, m_Ui->multiplierdsb,NULL,NULL,NULL,NULL, 1e-3,1000.f, PATTANAIK00_MULTIPLIER, true); - - connect(multiplierGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(multiplierGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); - - coneGang = new Gang(m_Ui->coneSlider, m_Ui->conedsb,NULL,NULL,NULL,NULL, 0.f, 1.f, PATTANAIK00_CONE); - rodGang = new Gang(m_Ui->rodSlider, m_Ui->roddsb,NULL,NULL,NULL,NULL, 0.f, 1.f, PATTANAIK00_ROD); - autoYGang = new Gang(NULL,NULL, m_Ui->autoYcheckbox); - pattalocalGang = new Gang(NULL,NULL, m_Ui->pattalocal); + multiplierGang = + new Gang(m_Ui->multiplierSlider, m_Ui->multiplierdsb, NULL, NULL, NULL, + NULL, 1e-3, 1000.f, PATTANAIK00_MULTIPLIER, true); + + connect(multiplierGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(multiplierGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + coneGang = new Gang(m_Ui->coneSlider, m_Ui->conedsb, NULL, NULL, NULL, NULL, + 1e-3, 1.f, PATTANAIK00_CONE, true); + rodGang = new Gang(m_Ui->rodSlider, m_Ui->roddsb, NULL, NULL, NULL, NULL, + 1e-3, 1.f, PATTANAIK00_ROD, true); + autoYGang = new Gang(NULL, NULL, m_Ui->autoYcheckbox); + pattalocalGang = new Gang(NULL, NULL, m_Ui->pattalocal); // reinhard02 - keyGang = new Gang(m_Ui->keySlider, m_Ui->keydsb,NULL,NULL,NULL,NULL, 0.f, 1.f, 0.18f); + keyGang = new Gang(m_Ui->keySlider, m_Ui->keydsb, NULL, NULL, NULL, NULL, + 0.f, 1.f, 0.18f); - connect(keyGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(keyGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + connect(keyGang, &Gang::enableUndo, m_Ui->undoButton, &QWidget::setEnabled); + connect(keyGang, &Gang::enableRedo, m_Ui->redoButton, &QWidget::setEnabled); - phiGang = new Gang(m_Ui->phiSlider, m_Ui->phidsb, NULL,NULL,NULL,NULL, 0.f, 100.f, REINHARD02_PHI); - range2Gang = new Gang(m_Ui->range2Slider, m_Ui->range2dsb,NULL,NULL,NULL,NULL, 1.f, 32.f, REINHARD02_RANGE); - lowerGang = new Gang(m_Ui->lowerSlider, m_Ui->lowerdsb,NULL,NULL,NULL,NULL, 1.f, 100.f, REINHARD02_LOWER); - upperGang = new Gang(m_Ui->upperSlider, m_Ui->upperdsb,NULL,NULL,NULL,NULL, 1.f, 100.f, REINHARD02_UPPER); - usescalesGang = new Gang(NULL,NULL, m_Ui->usescalescheckbox); + phiGang = new Gang(m_Ui->phiSlider, m_Ui->phidsb, NULL, NULL, NULL, NULL, + 0.f, 100.f, REINHARD02_PHI); + range2Gang = new Gang(m_Ui->range2Slider, m_Ui->range2dsb, NULL, NULL, NULL, + NULL, 1.f, 32.f, REINHARD02_RANGE); + lowerGang = new Gang(m_Ui->lowerSlider, m_Ui->lowerdsb, NULL, NULL, NULL, + NULL, 1.f, 100.f, REINHARD02_LOWER); + upperGang = new Gang(m_Ui->upperSlider, m_Ui->upperdsb, NULL, NULL, NULL, + NULL, 1.f, 100.f, REINHARD02_UPPER); + usescalesGang = new Gang(NULL, NULL, m_Ui->usescalescheckbox); // reinhard05 - brightnessGang = new Gang(m_Ui->brightnessSlider, m_Ui->brightnessdsb,NULL,NULL,NULL,NULL, -20.f, 20.f, REINHARD05_BRIGHTNESS); - - connect(brightnessGang, SIGNAL(enableUndo(bool)), m_Ui->undoButton, SLOT(setEnabled(bool))); - connect(brightnessGang, SIGNAL(enableRedo(bool)), m_Ui->redoButton, SLOT(setEnabled(bool))); + brightnessGang = + new Gang(m_Ui->brightnessSlider, m_Ui->brightnessdsb, NULL, NULL, NULL, + NULL, -20.f, 20.f, REINHARD05_BRIGHTNESS); + + connect(brightnessGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(brightnessGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + chromaticGang = + new Gang(m_Ui->chromaticAdaptSlider, m_Ui->chromaticAdaptdsb, NULL, + NULL, NULL, NULL, 0.f, 1.f, REINHARD05_CHROMATIC_ADAPTATION); + lightGang = + new Gang(m_Ui->lightAdaptSlider, m_Ui->lightAdaptdsb, NULL, NULL, NULL, + NULL, 0.f, 1.f, REINHARD05_LIGHT_ADAPTATION); + + // ferwerda96 + ferwerdamultiplierGang = + new Gang(m_Ui->ferwerdaMultiplierSlider, m_Ui->ferwerdaMultiplierDsb, NULL, NULL, NULL, + NULL, 0.001f, 2.f, FERWERDA96_MULTIPLIER); + + connect(ferwerdamultiplierGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(ferwerdamultiplierGang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + adaptationGang = + new Gang(m_Ui->adaptationLuminanceSlider, m_Ui->adaptationLuminanceDsb, NULL, + NULL, NULL, NULL, 0.001f, 1.f, FERWERDA96_ADAPTATION_LUMINANCE); + + // kimkautz08 + kimkautzc1Gang = + new Gang(m_Ui->kimkautzC1Slider, m_Ui->kimkautzC1Dsb, NULL, + NULL, NULL, NULL, 0.001f, 10.f, KIMKAUTZ08_C1); + + connect(kimkautzc1Gang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + connect(kimkautzc1Gang, &Gang::enableRedo, m_Ui->redoButton, + &QWidget::setEnabled); + + kimkautzc2Gang = + new Gang(m_Ui->kimkautzC2Slider, m_Ui->kimkautzC2Dsb, NULL, + NULL, NULL, NULL, 0.001f, 5.f, KIMKAUTZ08_C2); + + // vanhateren06 + vanhaterenPupilAreaGang = + new Gang(m_Ui->pupil_areaSlider, m_Ui->pupil_areaDsb, NULL, + NULL, NULL, NULL, 0.0f, 100.f, VANHATEREN06_PUPIL_AREA); + + connect(vanhaterenPupilAreaGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); + + // lischinski06 + lischinskiAlphaGang = + new Gang(m_Ui->lischinski_alpha_Slider, m_Ui->lischinski_alpha_Dsb, NULL, + NULL, NULL, NULL, 0.01f, 10.0f, LISCHINSKI06_ALPHA, true); - chromaticGang = new Gang(m_Ui->chromaticAdaptSlider, m_Ui->chromaticAdaptdsb,NULL,NULL,NULL,NULL, 0.f, 1.f, REINHARD05_CHROMATIC_ADAPTATION); - lightGang = new Gang(m_Ui->lightAdaptSlider, m_Ui->lightAdaptdsb,NULL,NULL,NULL,NULL, 0.f, 1.f, REINHARD05_LIGHT_ADAPTATION); + connect(lischinskiAlphaGang, &Gang::enableUndo, m_Ui->undoButton, + &QWidget::setEnabled); // pregamma - pregammaGang = new Gang(m_Ui->pregammaSlider, m_Ui->pregammadsb,NULL,NULL,NULL,NULL, 0, 5, 1); + pregammaGang = new Gang(m_Ui->pregammaSlider, m_Ui->pregammadsb, NULL, NULL, + NULL, NULL, 0.1f, 5.f, 1.0f, true); + + // postgamma + postgammaGang = new Gang(m_Ui->postgammaSlider, m_Ui->postgammadsb, NULL, NULL, + NULL, NULL, 0.1f, 5.f, 1.0f, true); + + // postsaturation + postsaturationGang = new Gang(m_Ui->postsaturationSlider, m_Ui->postsaturationdsb, NULL, NULL, + NULL, NULL, 0.1f, 5.f, 1.0f, true); //-- - connect(m_Ui->stackedWidget_operators, SIGNAL(currentChanged(int)), this, SLOT(updateCurrentTmoOperator(int))); + connect(m_Ui->stackedWidget_operators, &QStackedWidget::currentChanged, + this, &TonemappingPanel::updateCurrentTmoOperator); - connect(m_Ui->loadButton, SIGNAL(clicked()), this, SLOT(loadParameters())); - connect(m_Ui->saveButton, SIGNAL(clicked()), this, SLOT(saveParameters())); + connect(m_Ui->loadButton, &QAbstractButton::clicked, this, + &TonemappingPanel::loadParameters); + connect(m_Ui->saveButton, &QAbstractButton::clicked, this, + &TonemappingPanel::saveParameters); - connect(m_Ui->autoLevelsCheckBox, SIGNAL(toggled(bool)), this, SLOT(autoLevels(bool))); + connect(m_Ui->autoLevelsCheckBox, SIGNAL(toggled(bool)), this, + SLOT(autoLevels(bool))); m_spinner = new QtWaitingSpinner(this); @@ -200,15 +321,12 @@ createDatabase(); } -void TonemappingPanel::setExportQueueSize(int size) -{ +void TonemappingPanel::setExportQueueSize(int size) { m_spinner->setVisible(size > 0); m_Ui->lblQueueSize->setText(QString(tr("Queue size: %1")).arg(size)); } - -TonemappingPanel::~TonemappingPanel() -{ +TonemappingPanel::~TonemappingPanel() { qDebug() << "TonemappingPanel::~TonemappingPanel()"; delete contrastfactorGang; @@ -226,6 +344,7 @@ delete baseGang; delete alphaGang; delete betaGang; + delete fftSolverGang; delete rhoGang; delete inv_alphaGang; delete saturation2Gang; @@ -244,885 +363,1186 @@ delete brightnessGang; delete chromaticGang; delete lightGang; + delete ferwerdamultiplierGang; + delete adaptationGang; + delete kimkautzc1Gang; + delete kimkautzc2Gang; + delete vanhaterenPupilAreaGang; + delete lischinskiAlphaGang; delete pregammaGang; + delete postgammaGang; + delete postsaturationGang; delete m_spinner; - qDeleteAll(toneMappingOptionsToDelete); + qDeleteAll(m_toneMappingOptionsToDelete); if (m_mainWinNumber == 0) { - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); db.close(); } } -void TonemappingPanel::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) - m_Ui->retranslateUi(this); +void TonemappingPanel::changeEvent(QEvent *event) { + if (event->type() == QEvent::LanguageChange) m_Ui->retranslateUi(this); QWidget::changeEvent(event); } -void TonemappingPanel::createDatabase() -{ +void TonemappingPanel::createDatabase() { LuminanceOptions options; - QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); + QSqlDatabase db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), + m_databaseconnection); db.setDatabaseName(options.getDatabaseFileName()); - db.setHostName("localhost"); + db.setHostName(QStringLiteral("localhost")); bool ok = db.open(); - if (!ok) - { - QMessageBox::warning(this,tr("TM Database Problem"), - tr("The database used for saving TM parameters cannot be opened.\n" - "Error: %1").arg(db.lastError().databaseText()), - QMessageBox::Ok,QMessageBox::NoButton); + if (!ok) { + QMessageBox::warning( + this, tr("TM Database Problem"), + tr("The database used for saving TM parameters cannot be opened.\n" + "Error: %1") + .arg(db.lastError().databaseText()), + QMessageBox::Ok, QMessageBox::NoButton); return; } - QSqlQuery query; + QSqlQuery query(db); // Mantiuk 06 - bool res = query.exec(" CREATE TABLE IF NOT EXISTS mantiuk06 (contrastEqualization boolean NOT NULL, contrastFactor real, saturationFactor real, detailFactor real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + bool res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS mantiuk06 (contrastEqualization boolean \ + NOT \ + NULL, contrastFactor real, saturationFactor real, detailFactor real, \ + pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM mantiuk06; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE mantiuk06 ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE mantiuk06 ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Mantiuk 08 - res = query.exec(" CREATE TABLE IF NOT EXISTS mantiuk08 (colorSaturation real, contrastEnhancement real, luminanceLevel real, manualLuminanceLevel boolean NOT NULL, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS mantiuk08 (colorSaturation real, \ + contrastEnhancement real, luminanceLevel real, manualLuminanceLevel \ + boolean NOT NULL, pregamma real, comment varchar(150), \ + postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM mantiuk08; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE mantiuk08 ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE mantiuk08 ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Ashikhmin - res = query.exec(" CREATE TABLE IF NOT EXISTS ashikhmin (simple boolean NOT NULL, eq2 boolean NOT NULL, lct real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS ashikhmin (simple boolean NOT NULL, eq2 \ + boolean NOT NULL, lct real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM ashikhmin; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE ashikhmin ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE ashikhmin ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Drago - res = query.exec(" CREATE TABLE IF NOT EXISTS drago (bias real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec( + QStringLiteral(" CREATE TABLE IF NOT EXISTS drago (bias real, \ + pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM drago; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE drago ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE drago ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Durand - res = query.exec(" CREATE TABLE IF NOT EXISTS durand (spatial real, range real, base real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); - // Fattal - res = query.exec(" CREATE TABLE IF NOT EXISTS fattal (alpha real, beta real, colorSaturation real, noiseReduction real, oldFattal boolean NOT NULL, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS durand (spatial real, range \ + real, base real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM durand; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE durand ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE durand ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Fattal - res = query.exec(" CREATE TABLE IF NOT EXISTS ferradans (rho real, inv_alpha real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS fattal (alpha real, beta real, \ + colorSaturation real, noiseReduction real, oldFattal boolean NOT \ + NULL, \ + pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM fattal; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE fattal ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE fattal ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } + // Ferradans + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS ferradans (rho real, \ + inv_alpha real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM ferradans; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE ferradans ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE ferradans ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } + // Ferwerda + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS ferwerda (maxlum real, \ + adaptlum real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM ferwerda; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE ferwerda ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE ferwerda ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } + // KimKautz + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS kimkautz (\ + kk_c1 real, kk_c2 real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM kimkautz; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE kimkautz ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE kimkautz ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Pattanaik - res = query.exec(" CREATE TABLE IF NOT EXISTS pattanaik (autolum boolean NOT NULL, local boolean NOT NULL, cone real, rod real, multiplier real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS pattanaik (autolum boolean \ + NOT NULL, local boolean NOT NULL, cone real, rod real, \ + multiplier real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM pattanaik; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE pattanaik ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE pattanaik ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Reinhard02 - res = query.exec(" CREATE TABLE IF NOT EXISTS reinhard02 (scales boolean NOT NULL, key real, phi real, range int, lower int, upper int, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec( + QStringLiteral(" CREATE TABLE IF NOT EXISTS reinhard02 (scales boolean \ + NOT NULL, key real, phi real, range int, lower int, \ + upper int, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM reinhard02; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE reinhard02 ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE reinhard02 ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Reinhard05 - res = query.exec(" CREATE TABLE IF NOT EXISTS reinhard05 (brightness real, chromaticAdaptation real, lightAdaptation real, pregamma real, comment varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS reinhard05 (brightness real, \ + chromaticAdaptation real, lightAdaptation real, pregamma \ + real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM reinhard05; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE reinhard05 ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE reinhard05 ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } + // VanHateren + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS vanhateren (\ + pupil_area real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM vanhateren; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE vanhateren ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE vanhateren ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } + // Lischinski + res = query.exec(QStringLiteral( + " CREATE TABLE IF NOT EXISTS lischinski (\ + alpha real, pregamma real, comment varchar(150), postsaturation real, postgamma real);")); + if (res == false) qDebug() << query.lastError(); + + res = query.exec(QStringLiteral( + " SELECT postsaturation FROM lischinski; ")); + if (res == false) { + res = query.exec(QStringLiteral( + " ALTER TABLE lischinski ADD COLUMN postsaturation real NOT NULL DEFAULT 1;")); + res = query.exec(QStringLiteral( + " ALTER TABLE lischinski ADD COLUMN postgamma real NOT NULL DEFAULT 1;")); + } // Hdr creation custom config parameters - res = query.exec("CREATE TABLE IF NOT EXISTS parameters (weight integer, response integer, model integer, filename varchar(150));"); - if (res == false) - qDebug() << query.lastError(); + res = query.exec(QStringLiteral( + "CREATE TABLE IF NOT EXISTS parameters (weight integer, response \ + integer, model integer, filename varchar(150));")); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::setSizes(int width, int height) -{ +void TonemappingPanel::setSizes(int width, int height) { sizes.resize(0); - for(int x = 256; x <= width; x *= 2) { - if( x >= width ) - break; + for (int x = 256; x <= width; x *= 2) { + if (x >= width) break; sizes.push_front(x); - if( 3*(x/2) >= width ) - break; - sizes.push_front(3*(x/2)); + if (3 * (x / 2) >= width) break; + sizes.push_front(3 * (x / 2)); } sizes.push_front(width); - heightToWidthRatio = ( (float)height )/( (float) width); + heightToWidthRatio = ((float)height) / ((float)width); fillCustomSizeComboBox(); m_Ui->sizeComboBox->setCurrentIndex(m_Ui->sizeComboBox->count() - 1); } -void TonemappingPanel::on_defaultButton_clicked() -{ - switch (currentTmoOperator) - { - case ashikhmin: - contrastGang->setDefault(); - m_Ui->simpleCheckBox->setChecked(false); - m_Ui->eq2RadioButton->setChecked(true); - break; - case drago: - biasGang->setDefault(); - break; - case durand: - spatialGang->setDefault(); - rangeGang->setDefault(); - baseGang->setDefault(); - break; - case fattal: - alphaGang->setDefault(); - betaGang->setDefault(); - saturation2Gang->setDefault(); - noiseGang->setDefault(); - fftSolverGang->setDefault(); - m_Ui->fftVersionCheckBox->setChecked(true); - break; - case ferradans: - rhoGang->setDefault(); - inv_alphaGang->setDefault(); - break; - case mai: //no options - break; - case mantiuk06: - contrastfactorGang->setDefault(); - saturationfactorGang->setDefault(); - detailfactorGang->setDefault(); - m_Ui->contrastEqualizCheckBox->setChecked(false); - break; - case mantiuk08: - colorSaturationGang->setDefault(); - contrastEnhancementGang->setDefault(); - luminanceLevelGang->setDefault(); - m_Ui->luminanceLevelCheckBox->setChecked(false); - break; - case pattanaik: - multiplierGang->setDefault(); - coneGang->setDefault(); - rodGang->setDefault(); - m_Ui->pattalocal->setChecked(false); - m_Ui->autoYcheckbox->setChecked(true); - break; - case reinhard02: - keyGang->setDefault(); - phiGang->setDefault(); - range2Gang->setDefault(); - lowerGang->setDefault(); - upperGang->setDefault(); - m_Ui->usescalescheckbox->setChecked(false); - break; - case reinhard05: - brightnessGang->setDefault(); - chromaticGang->setDefault(); - lightGang->setDefault(); - break; +void TonemappingPanel::on_defaultButton_clicked() { + switch (m_currentTmoOperator) { + case ashikhmin: + contrastGang->setDefault(); + m_Ui->simpleCheckBox->setChecked(false); + m_Ui->eq2RadioButton->setChecked(true); + break; + case drago: + biasGang->setDefault(); + break; + case durand: + spatialGang->setDefault(); + rangeGang->setDefault(); + baseGang->setDefault(); + break; + case fattal: + alphaGang->setDefault(); + betaGang->setDefault(); + saturation2Gang->setDefault(); + noiseGang->setDefault(); + fftSolverGang->setDefault(); + m_Ui->fftVersionCheckBox->setChecked(true); + break; + case ferradans: + rhoGang->setDefault(); + inv_alphaGang->setDefault(); + break; + case mai: // no options + break; + case mantiuk06: + contrastfactorGang->setDefault(); + saturationfactorGang->setDefault(); + detailfactorGang->setDefault(); + m_Ui->contrastEqualizCheckBox->setChecked(false); + break; + case mantiuk08: + colorSaturationGang->setDefault(); + contrastEnhancementGang->setDefault(); + luminanceLevelGang->setDefault(); + m_Ui->luminanceLevelCheckBox->setChecked(false); + break; + case pattanaik: + multiplierGang->setDefault(); + coneGang->setDefault(); + rodGang->setDefault(); + m_Ui->pattalocal->setChecked(false); + m_Ui->autoYcheckbox->setChecked(true); + break; + case reinhard02: + keyGang->setDefault(); + phiGang->setDefault(); + range2Gang->setDefault(); + lowerGang->setDefault(); + upperGang->setDefault(); + m_Ui->usescalescheckbox->setChecked(false); + break; + case reinhard05: + brightnessGang->setDefault(); + chromaticGang->setDefault(); + lightGang->setDefault(); + break; + case ferwerda: + ferwerdamultiplierGang->setDefault(); + adaptationGang->setDefault(); + break; + case kimkautz: + kimkautzc1Gang->setDefault(); + kimkautzc2Gang->setDefault(); + break; + case vanhateren: + vanhaterenPupilAreaGang->setDefault(); + break; + case lischinski: + lischinskiAlphaGang->setDefault(); + break; } } // TODO : if you change the position of the operator inside the TMOperator enum // you will screw up this function!!! -void TonemappingPanel::updateCurrentTmoOperator(int idx) -{ - currentTmoOperator = TMOperator(idx); +void TonemappingPanel::updateCurrentTmoOperator(int idx) { + m_currentTmoOperator = TMOperator(idx); updateUndoState(); } -void TonemappingPanel::updateUndoState() -{ - switch (currentTmoOperator) - { - case ashikhmin: - contrastGang->updateUndoState(); - break; - case drago: - biasGang->updateUndoState(); - break; - case durand: - spatialGang->updateUndoState(); - break; - case fattal: - alphaGang->updateUndoState(); - break; - case ferradans: - rhoGang->updateUndoState(); - break; - case mai: //no options - break; - case mantiuk06: - contrastfactorGang->updateUndoState(); - break; - case mantiuk08: - colorSaturationGang->updateUndoState(); - break; - case pattanaik: - multiplierGang->updateUndoState(); - break; - case reinhard02: - keyGang->updateUndoState(); - break; - case reinhard05: - brightnessGang->updateUndoState(); - break; +void TonemappingPanel::updateUndoState() { + switch (m_currentTmoOperator) { + case ashikhmin: + contrastGang->updateUndoState(); + break; + case drago: + biasGang->updateUndoState(); + break; + case durand: + spatialGang->updateUndoState(); + break; + case fattal: + alphaGang->updateUndoState(); + break; + case ferradans: + rhoGang->updateUndoState(); + break; + case mai: // no options + break; + case mantiuk06: + contrastfactorGang->updateUndoState(); + break; + case mantiuk08: + colorSaturationGang->updateUndoState(); + break; + case pattanaik: + multiplierGang->updateUndoState(); + break; + case reinhard02: + keyGang->updateUndoState(); + break; + case reinhard05: + brightnessGang->updateUndoState(); + break; + case ferwerda: + ferwerdamultiplierGang->updateUndoState(); + break; + case kimkautz: + kimkautzc1Gang->updateUndoState(); + break; + case vanhateren: + vanhaterenPupilAreaGang->updateUndoState(); + break; + case lischinski: + lischinskiAlphaGang->updateUndoState(); + break; } } -void TonemappingPanel::on_pregammadefault_clicked() -{ +void TonemappingPanel::on_pregammadefault_clicked() { pregammaGang->setDefault(); } -void TonemappingPanel::on_applyButton_clicked() -{ +void TonemappingPanel::on_postgammadefault_clicked() { + postgammaGang->setDefault(); +} + +void TonemappingPanel::on_postsaturationdefault_clicked() { + postsaturationGang->setDefault(); +} + +void TonemappingPanel::on_applyButton_clicked() { fillToneMappingOptions(false); setupUndo(); - emit startTonemapping(toneMappingOptions); + emit startTonemapping(m_toneMappingOptions); } -void TonemappingPanel::on_queueButton_clicked() -{ +void TonemappingPanel::on_queueButton_clicked() { fillToneMappingOptions(true); - //setupUndo(); + // setupUndo(); - emit startExport(toneMappingOptions); + emit startExport(m_toneMappingOptions); } -void TonemappingPanel::fillToneMappingOptions(bool exportMode) -{ - toneMappingOptions = new TonemappingOptions; - if (!exportMode) - { - toneMappingOptionsToDelete.push_back(toneMappingOptions); - } - if (!exportMode && sizes.size()) - { - toneMappingOptions->origxsize = sizes[0]; - toneMappingOptions->xsize = sizes[m_Ui->sizeComboBox->currentIndex()]; +void TonemappingPanel::fillToneMappingOptions(bool exportMode) { + m_toneMappingOptions = new TonemappingOptions; + if (!exportMode) { + m_toneMappingOptionsToDelete.push_back(m_toneMappingOptions); + } + if (!exportMode && sizes.size()) { + m_toneMappingOptions->origxsize = sizes[0]; + m_toneMappingOptions->xsize = sizes[m_Ui->sizeComboBox->currentIndex()]; } else { - toneMappingOptions->origxsize = 0; - toneMappingOptions->xsize = 0; + m_toneMappingOptions->origxsize = 0; + m_toneMappingOptions->xsize = 0; } - toneMappingOptions->pregamma = pregammaGang->v(); + m_toneMappingOptions->pregamma = pregammaGang->v(); + m_toneMappingOptions->postgamma = postgammaGang->v(); + m_toneMappingOptions->postsaturation = postsaturationGang->v(); // toneMappingOptions->tonemapSelection = checkBoxSelection->isChecked(); // toneMappingOptions->tonemapOriginal = checkBoxOriginal->isChecked(); - switch (currentTmoOperator) { - case ashikhmin: - toneMappingOptions->tmoperator = ashikhmin; - toneMappingOptions->operator_options.ashikhminoptions.simple=simpleGang->isCheckBox1Checked(); - toneMappingOptions->operator_options.ashikhminoptions.eq2=eq2Gang->isRadioButton1Checked(); - toneMappingOptions->operator_options.ashikhminoptions.lct=contrastGang->v(); - break; - case drago: - toneMappingOptions->tmoperator = drago; - toneMappingOptions->operator_options.dragooptions.bias=biasGang->v(); - break; - case durand: - toneMappingOptions->tmoperator = durand; - toneMappingOptions->operator_options.durandoptions.spatial=spatialGang->v(); - toneMappingOptions->operator_options.durandoptions.range=rangeGang->v(); - toneMappingOptions->operator_options.durandoptions.base=baseGang->v(); - break; - case fattal: - toneMappingOptions->tmoperator = fattal; - toneMappingOptions->operator_options.fattaloptions.alpha=alphaGang->v(); - toneMappingOptions->operator_options.fattaloptions.beta=betaGang->v(); - toneMappingOptions->operator_options.fattaloptions.color=saturation2Gang->v(); - toneMappingOptions->operator_options.fattaloptions.noiseredux=noiseGang->v(); -// toneMappingOptions->operator_options.fattaloptions.newfattal=!oldFattalGang->isCheckBox1Checked(); - toneMappingOptions->operator_options.fattaloptions.fftsolver=fftSolverGang->isCheckBox1Checked(); - break; - case ferradans: - toneMappingOptions->tmoperator = ferradans; - toneMappingOptions->operator_options.ferradansoptions.rho=rhoGang->v(); - toneMappingOptions->operator_options.ferradansoptions.inv_alpha=inv_alphaGang->v(); - break; - case mai: - toneMappingOptions->tmoperator = mai; - break; - case mantiuk06: - toneMappingOptions->tmoperator = mantiuk06; - toneMappingOptions->operator_options.mantiuk06options.contrastfactor=contrastfactorGang->v(); - toneMappingOptions->operator_options.mantiuk06options.saturationfactor=saturationfactorGang->v(); - toneMappingOptions->operator_options.mantiuk06options.detailfactor=detailfactorGang->v(); - toneMappingOptions->operator_options.mantiuk06options.contrastequalization=contrastfactorGang->isCheckBox1Checked(); - break; - case mantiuk08: - toneMappingOptions->tmoperator = mantiuk08; - toneMappingOptions->operator_options.mantiuk08options.colorsaturation=colorSaturationGang->v(); - toneMappingOptions->operator_options.mantiuk08options.contrastenhancement=contrastEnhancementGang->v(); - toneMappingOptions->operator_options.mantiuk08options.luminancelevel=luminanceLevelGang->v(); - toneMappingOptions->operator_options.mantiuk08options.setluminance=luminanceLevelGang->isCheckBox1Checked(); - break; - case pattanaik: - toneMappingOptions->tmoperator = pattanaik; - toneMappingOptions->operator_options.pattanaikoptions.autolum=autoYGang->isCheckBox1Checked(); - toneMappingOptions->operator_options.pattanaikoptions.local=pattalocalGang->isCheckBox1Checked(); - toneMappingOptions->operator_options.pattanaikoptions.cone=coneGang->v(); - toneMappingOptions->operator_options.pattanaikoptions.rod=rodGang->v(); - toneMappingOptions->operator_options.pattanaikoptions.multiplier=multiplierGang->v(); - break; - case reinhard02: - toneMappingOptions->tmoperator = reinhard02; - toneMappingOptions->operator_options.reinhard02options.scales=usescalesGang->isCheckBox1Checked(); - toneMappingOptions->operator_options.reinhard02options.key=keyGang->v(); - toneMappingOptions->operator_options.reinhard02options.phi=phiGang->v(); - toneMappingOptions->operator_options.reinhard02options.range=(int)range2Gang->v(); - toneMappingOptions->operator_options.reinhard02options.lower=(int)lowerGang->v(); - toneMappingOptions->operator_options.reinhard02options.upper=(int)upperGang->v(); - break; - case reinhard05: - toneMappingOptions->tmoperator = reinhard05; - toneMappingOptions->operator_options.reinhard05options.brightness=brightnessGang->v(); - toneMappingOptions->operator_options.reinhard05options.chromaticAdaptation=chromaticGang->v(); - toneMappingOptions->operator_options.reinhard05options.lightAdaptation=lightGang->v(); - break; - } -} - -void TonemappingPanel::setupUndo() -{ - switch (currentTmoOperator) - { - case ashikhmin: - simpleGang->setupUndo(); - eq2Gang->setupUndo(); - contrastGang->setupUndo(); - break; - case drago: - biasGang->setupUndo(); - break; - case durand: - spatialGang->setupUndo(); - rangeGang->setupUndo(); - baseGang->setupUndo(); - break; - case fattal: - alphaGang->setupUndo(); - betaGang->setupUndo(); - saturation2Gang->setupUndo(); - noiseGang->setupUndo(); -// oldFattalGang->setupUndo(); - fftSolverGang->setupUndo(); - break; - case ferradans: - rhoGang->setupUndo(); - inv_alphaGang->setupUndo(); - break; - case mai: //no options - break; - case mantiuk06: - contrastfactorGang->setupUndo(); - saturationfactorGang->setupUndo(); - detailfactorGang->setupUndo(); - break; - case mantiuk08: - colorSaturationGang->setupUndo(); - contrastEnhancementGang->setupUndo(); - luminanceLevelGang->setupUndo(); - break; - case pattanaik: - autoYGang->setupUndo(); - pattalocalGang->setupUndo(); - coneGang->setupUndo(); - rodGang->setupUndo(); - multiplierGang->setupUndo(); - break; - case reinhard02: - usescalesGang->setupUndo(); - keyGang->setupUndo(); - phiGang->setupUndo(); - range2Gang->setupUndo(); - lowerGang->setupUndo(); - upperGang->setupUndo(); - break; - case reinhard05: - brightnessGang->setupUndo(); - chromaticGang->setupUndo(); - lightGang->setupUndo(); - break; - } -} - -void TonemappingPanel::on_undoButton_clicked() -{ - onUndoRedo(true); -} - -void TonemappingPanel::on_redoButton_clicked() -{ - onUndoRedo(false); -} - -void TonemappingPanel::onUndoRedo(bool undo) -{ - typedef void (Gang::*REDO_UNDO) (); + switch (m_currentTmoOperator) { + case ashikhmin: + m_toneMappingOptions->tmoperator = ashikhmin; + m_toneMappingOptions->operator_options.ashikhminoptions.simple = + simpleGang->isCheckBox1Checked(); + m_toneMappingOptions->operator_options.ashikhminoptions.eq2 = + eq2Gang->isRadioButton1Checked(); + m_toneMappingOptions->operator_options.ashikhminoptions.lct = + contrastGang->v(); + break; + case drago: + m_toneMappingOptions->tmoperator = drago; + m_toneMappingOptions->operator_options.dragooptions.bias = + biasGang->v(); + break; + case durand: + m_toneMappingOptions->tmoperator = durand; + m_toneMappingOptions->operator_options.durandoptions.spatial = + spatialGang->v(); + m_toneMappingOptions->operator_options.durandoptions.range = + rangeGang->v(); + m_toneMappingOptions->operator_options.durandoptions.base = + baseGang->v(); + break; + case fattal: + m_toneMappingOptions->tmoperator = fattal; + m_toneMappingOptions->operator_options.fattaloptions.alpha = + alphaGang->v(); + m_toneMappingOptions->operator_options.fattaloptions.beta = + betaGang->v(); + m_toneMappingOptions->operator_options.fattaloptions.color = + saturation2Gang->v(); + m_toneMappingOptions->operator_options.fattaloptions.noiseredux = + noiseGang->v(); + // m_toneMappingOptions->operator_options.fattaloptions.newfattal=!oldFattalGang->isCheckBox1Checked(); + m_toneMappingOptions->operator_options.fattaloptions.fftsolver = + fftSolverGang->isCheckBox1Checked(); + break; + case ferradans: + m_toneMappingOptions->tmoperator = ferradans; + m_toneMappingOptions->operator_options.ferradansoptions.rho = + rhoGang->v(); + m_toneMappingOptions->operator_options.ferradansoptions.inv_alpha = + inv_alphaGang->v(); + break; + case mai: + m_toneMappingOptions->tmoperator = mai; + break; + case mantiuk06: + m_toneMappingOptions->tmoperator = mantiuk06; + m_toneMappingOptions->operator_options.mantiuk06options + .contrastfactor = contrastfactorGang->v(); + m_toneMappingOptions->operator_options.mantiuk06options + .saturationfactor = saturationfactorGang->v(); + m_toneMappingOptions->operator_options.mantiuk06options.detailfactor = + detailfactorGang->v(); + m_toneMappingOptions->operator_options.mantiuk06options + .contrastequalization = + contrastfactorGang->isCheckBox1Checked(); + break; + case mantiuk08: + m_toneMappingOptions->tmoperator = mantiuk08; + m_toneMappingOptions->operator_options.mantiuk08options + .colorsaturation = colorSaturationGang->v(); + m_toneMappingOptions->operator_options.mantiuk08options + .contrastenhancement = contrastEnhancementGang->v(); + m_toneMappingOptions->operator_options.mantiuk08options + .luminancelevel = luminanceLevelGang->v(); + m_toneMappingOptions->operator_options.mantiuk08options.setluminance = + luminanceLevelGang->isCheckBox1Checked(); + break; + case pattanaik: + m_toneMappingOptions->tmoperator = pattanaik; + m_toneMappingOptions->operator_options.pattanaikoptions.autolum = + autoYGang->isCheckBox1Checked(); + m_toneMappingOptions->operator_options.pattanaikoptions.local = + pattalocalGang->isCheckBox1Checked(); + m_toneMappingOptions->operator_options.pattanaikoptions.cone = + coneGang->v(); + m_toneMappingOptions->operator_options.pattanaikoptions.rod = + rodGang->v(); + m_toneMappingOptions->operator_options.pattanaikoptions.multiplier = + multiplierGang->v(); + break; + case reinhard02: + m_toneMappingOptions->tmoperator = reinhard02; + m_toneMappingOptions->operator_options.reinhard02options.scales = + usescalesGang->isCheckBox1Checked(); + m_toneMappingOptions->operator_options.reinhard02options.key = + keyGang->v(); + m_toneMappingOptions->operator_options.reinhard02options.phi = + phiGang->v(); + m_toneMappingOptions->operator_options.reinhard02options.range = + (int)range2Gang->v(); + m_toneMappingOptions->operator_options.reinhard02options.lower = + (int)lowerGang->v(); + m_toneMappingOptions->operator_options.reinhard02options.upper = + (int)upperGang->v(); + break; + case reinhard05: + m_toneMappingOptions->tmoperator = reinhard05; + m_toneMappingOptions->operator_options.reinhard05options.brightness = + brightnessGang->v(); + m_toneMappingOptions->operator_options.reinhard05options + .chromaticAdaptation = chromaticGang->v(); + m_toneMappingOptions->operator_options.reinhard05options + .lightAdaptation = lightGang->v(); + break; + case ferwerda: + m_toneMappingOptions->tmoperator = ferwerda; + m_toneMappingOptions->operator_options.ferwerdaoptions.multiplier = + ferwerdamultiplierGang->v(); + m_toneMappingOptions->operator_options.ferwerdaoptions + .adaptationluminance = adaptationGang->v(); + break; + case kimkautz: + m_toneMappingOptions->tmoperator = kimkautz; + m_toneMappingOptions->operator_options.kimkautzoptions.c1 = + kimkautzc1Gang->v(); + m_toneMappingOptions->operator_options.kimkautzoptions.c2 = + kimkautzc2Gang->v(); + break; + case vanhateren: + m_toneMappingOptions->tmoperator = vanhateren; + m_toneMappingOptions->operator_options.vanhaterenoptions.pupil_area = + vanhaterenPupilAreaGang->v(); + break; + case lischinski: + m_toneMappingOptions->tmoperator = lischinski; + m_toneMappingOptions->operator_options.lischinskioptions.alpha = + lischinskiAlphaGang->v(); + break; + } +} + +void TonemappingPanel::setupUndo() { + switch (m_currentTmoOperator) { + case ashikhmin: + simpleGang->setupUndo(); + eq2Gang->setupUndo(); + contrastGang->setupUndo(); + break; + case drago: + biasGang->setupUndo(); + break; + case durand: + spatialGang->setupUndo(); + rangeGang->setupUndo(); + baseGang->setupUndo(); + break; + case fattal: + alphaGang->setupUndo(); + betaGang->setupUndo(); + saturation2Gang->setupUndo(); + noiseGang->setupUndo(); + // oldFattalGang->setupUndo(); + fftSolverGang->setupUndo(); + break; + case ferradans: + rhoGang->setupUndo(); + inv_alphaGang->setupUndo(); + break; + case mai: // no options + break; + case mantiuk06: + contrastfactorGang->setupUndo(); + saturationfactorGang->setupUndo(); + detailfactorGang->setupUndo(); + break; + case mantiuk08: + colorSaturationGang->setupUndo(); + contrastEnhancementGang->setupUndo(); + luminanceLevelGang->setupUndo(); + break; + case pattanaik: + autoYGang->setupUndo(); + pattalocalGang->setupUndo(); + coneGang->setupUndo(); + rodGang->setupUndo(); + multiplierGang->setupUndo(); + break; + case reinhard02: + usescalesGang->setupUndo(); + keyGang->setupUndo(); + phiGang->setupUndo(); + range2Gang->setupUndo(); + lowerGang->setupUndo(); + upperGang->setupUndo(); + break; + case reinhard05: + brightnessGang->setupUndo(); + chromaticGang->setupUndo(); + lightGang->setupUndo(); + break; + case ferwerda: + ferwerdamultiplierGang->setupUndo(); + adaptationGang->setupUndo(); + break; + case kimkautz: + kimkautzc1Gang->setupUndo(); + kimkautzc2Gang->setupUndo(); + break; + case vanhateren: + vanhaterenPupilAreaGang->setupUndo(); + break; + case lischinski: + lischinskiAlphaGang->setupUndo(); + break; + } +} + +void TonemappingPanel::on_undoButton_clicked() { onUndoRedo(true); } + +void TonemappingPanel::on_redoButton_clicked() { onUndoRedo(false); } + +void TonemappingPanel::onUndoRedo(bool undo) { + typedef void (Gang::*REDO_UNDO)(); REDO_UNDO redoUndo = undo ? &Gang::undo : &Gang::redo; - switch (currentTmoOperator) - { - case ashikhmin: - (simpleGang->*redoUndo)(); - (eq2Gang->*redoUndo)(); - (contrastGang->*redoUndo)(); - break; - case drago: - (biasGang->*redoUndo)(); - break; - case durand: - (spatialGang->*redoUndo)(); - (rangeGang->*redoUndo)(); - (baseGang->*redoUndo)(); - break; - case fattal: - (alphaGang->*redoUndo)(); - (betaGang->*redoUndo)(); - (saturation2Gang->*redoUndo)(); - (noiseGang->*redoUndo)(); -// (oldFattalGang->*redoUndo)(); - (fftSolverGang->*redoUndo)(); - break; - case ferradans: - (rhoGang->*redoUndo)(); - (inv_alphaGang->*redoUndo)(); - break; - case mai: - break; - case mantiuk06: - (contrastfactorGang->*redoUndo)(); - (saturationfactorGang->*redoUndo)(); - (detailfactorGang->*redoUndo)(); - break; - case mantiuk08: - (colorSaturationGang->*redoUndo)(); - (contrastEnhancementGang->*redoUndo)(); - (luminanceLevelGang->*redoUndo)(); - break; - case pattanaik: - (autoYGang->*redoUndo)(); - (pattalocalGang->*redoUndo)(); - (coneGang->*redoUndo)(); - (rodGang->*redoUndo)(); - (multiplierGang->*redoUndo)(); - break; - case reinhard02: - (usescalesGang->*redoUndo)(); - (keyGang->*redoUndo)(); - (phiGang->*redoUndo)(); - (range2Gang->*redoUndo)(); - (lowerGang->*redoUndo)(); - (upperGang->*redoUndo)(); - break; - case reinhard05: - (brightnessGang->*redoUndo)(); - (chromaticGang->*redoUndo)(); - (lightGang->*redoUndo)(); - break; + switch (m_currentTmoOperator) { + case ashikhmin: + (simpleGang->*redoUndo)(); + (eq2Gang->*redoUndo)(); + (contrastGang->*redoUndo)(); + break; + case drago: + (biasGang->*redoUndo)(); + break; + case durand: + (spatialGang->*redoUndo)(); + (rangeGang->*redoUndo)(); + (baseGang->*redoUndo)(); + break; + case fattal: + (alphaGang->*redoUndo)(); + (betaGang->*redoUndo)(); + (saturation2Gang->*redoUndo)(); + (noiseGang->*redoUndo)(); + // (oldFattalGang->*redoUndo)(); + (fftSolverGang->*redoUndo)(); + break; + case ferradans: + (rhoGang->*redoUndo)(); + (inv_alphaGang->*redoUndo)(); + break; + case mai: + break; + case mantiuk06: + (contrastfactorGang->*redoUndo)(); + (saturationfactorGang->*redoUndo)(); + (detailfactorGang->*redoUndo)(); + break; + case mantiuk08: + (colorSaturationGang->*redoUndo)(); + (contrastEnhancementGang->*redoUndo)(); + (luminanceLevelGang->*redoUndo)(); + break; + case pattanaik: + (autoYGang->*redoUndo)(); + (pattalocalGang->*redoUndo)(); + (coneGang->*redoUndo)(); + (rodGang->*redoUndo)(); + (multiplierGang->*redoUndo)(); + break; + case reinhard02: + (usescalesGang->*redoUndo)(); + (keyGang->*redoUndo)(); + (phiGang->*redoUndo)(); + (range2Gang->*redoUndo)(); + (lowerGang->*redoUndo)(); + (upperGang->*redoUndo)(); + break; + case reinhard05: + (brightnessGang->*redoUndo)(); + (chromaticGang->*redoUndo)(); + (lightGang->*redoUndo)(); + break; + case ferwerda: + (ferwerdamultiplierGang->*redoUndo)(); + (adaptationGang->*redoUndo)(); + break; + case kimkautz: + (kimkautzc1Gang->*redoUndo)(); + (kimkautzc2Gang->*redoUndo)(); + break; + case vanhateren: + (vanhaterenPupilAreaGang->*redoUndo)(); + break; + case lischinski: + (lischinskiAlphaGang->*redoUndo)(); + break; } } -void TonemappingPanel::on_lblOpenQueue_linkActivated(const QString& link) -{ +void TonemappingPanel::on_lblOpenQueue_linkActivated(const QString &link) { LuminanceOptions options; QDesktopServices::openUrl(QUrl::fromLocalFile(options.getExportDir())); } - -void TonemappingPanel::on_loadsettingsbutton_clicked() -{ +void TonemappingPanel::on_loadsettingsbutton_clicked() { LuminanceOptions lum_options; - QString opened = QFileDialog::getOpenFileName(this, - tr("Load a tonemapping settings text file..."), - lum_options.getDefaultPathTmoSettings(), - tr("LuminanceHDR tonemapping settings text file (*.txt)") ); - if ( !opened.isEmpty() ) - { + QString opened = QFileDialog::getOpenFileName( + this, tr("Load a tonemapping settings text file..."), + lum_options.getDefaultPathTmoSettings(), + tr("LuminanceHDR tonemapping settings text file (*.txt)")); + if (!opened.isEmpty()) { QFileInfo qfi(opened); - if (!qfi.isReadable()) - { - QMessageBox::critical(this,tr("Aborting..."), - tr("File is not readable (check existence, permissions,...)"), - QMessageBox::Ok,QMessageBox::NoButton); + if (!qfi.isReadable()) { + QMessageBox::critical( + this, tr("Aborting..."), + tr("File is not readable (check existence, permissions,...)"), + QMessageBox::Ok, QMessageBox::NoButton); return; } - lum_options.setDefaultPathTmoSettings( qfi.path() ); + lum_options.setDefaultPathTmoSettings(qfi.path()); - //update filename internal field, used by parsing function fromTxt2Gui() + // update filename internal field, used by parsing function + // fromTxt2Gui() tmoSettingsFilename = opened; - //call parsing function + // call parsing function fromTxt2Gui(); } } -void TonemappingPanel::on_savesettingsbutton_clicked() -{ +void TonemappingPanel::on_savesettingsbutton_clicked() { LuminanceOptions lum_options; - QString fname = QFileDialog::getSaveFileName(this, - tr("Save tonemapping settings text file to..."), - lum_options.getDefaultPathTmoSettings(), - tr("LuminanceHDR tonemapping settings text file (*.txt)")); - if( ! fname.isEmpty() ) - { + QString fname = QFileDialog::getSaveFileName( + this, tr("Save tonemapping settings text file to..."), + lum_options.getDefaultPathTmoSettings(), + tr("LuminanceHDR tonemapping settings text file (*.txt)")); + if (!fname.isEmpty()) { QFileInfo qfi(fname); - if (qfi.suffix().toUpper() != "TXT") - { - fname+=".txt"; + if (qfi.suffix().toUpper() != QLatin1String("TXT")) { + fname += QLatin1String(".txt"); } - lum_options.setDefaultPathTmoSettings( qfi.path() ); + lum_options.setDefaultPathTmoSettings(qfi.path()); - //write txt file + // write txt file fromGui2Txt(fname); } } -void TonemappingPanel::fromGui2Txt(QString destination) -{ +void TonemappingPanel::fromGui2Txt(QString destination) { QFile file(destination); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) - { - QMessageBox::critical(this,tr("Aborting..."),tr("File is not writable (check permissions, path...)"), - QMessageBox::Ok,QMessageBox::NoButton); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QMessageBox::critical( + this, tr("Aborting..."), + tr("File is not writable (check permissions, path...)"), + QMessageBox::Ok, QMessageBox::NoButton); return; } QTextStream out(&file); out << "# LuminanceHDR Tonemapping Setting file." << endl; - out << "# Editing this file by hand is risky, worst case scenario is Luminance crashing." << endl; - out << "# Please edit this file by hand only if you know what you're doing, in any case never change the left hand side text (i.e. the part before the ``='')." << endl; + out << "# Editing this file by hand is risky, worst case scenario is " + "Luminance crashing." + << endl; + out << "# Please edit this file by hand only if you know what you're " + "doing, " + "in any case never change the left hand side text (i.e. the part " + "before the ``='')." + << endl; out << "TMOSETTINGSVERSION=" << TMOSETTINGSVERSION << endl; out << "XSIZE=" << sizes[m_Ui->sizeComboBox->currentIndex()] << endl; QWidget *current_page = m_Ui->stackedWidget_operators->currentWidget(); - if (current_page == m_Ui->page_mantiuk06) - { - out << "TMO=" << "Mantiuk06" << endl; + if (current_page == m_Ui->page_mantiuk06) { + out << "TMO=" + << "Mantiuk06" << endl; out << "CONTRASTFACTOR=" << contrastfactorGang->v() << endl; out << "SATURATIONFACTOR=" << saturationfactorGang->v() << endl; out << "DETAILFACTOR=" << detailfactorGang->v() << endl; - out << "CONTRASTEQUALIZATION=" << (m_Ui->contrastEqualizCheckBox->isChecked() ? "YES" : "NO") << endl; - } - else if (current_page == m_Ui->page_mantiuk08) - { - out << "TMO=" << "Mantiuk08" << endl; + out << "CONTRASTEQUALIZATION=" + << (m_Ui->contrastEqualizCheckBox->isChecked() ? "YES" : "NO") + << endl; + } else if (current_page == m_Ui->page_mantiuk08) { + out << "TMO=" + << "Mantiuk08" << endl; out << "COLORSATURATION=" << colorSaturationGang->v() << endl; out << "CONTRASTENHANCEMENT=" << contrastEnhancementGang->v() << endl; out << "LUMINANCELEVEL=" << luminanceLevelGang->v() << endl; - out << "SETLUMINANCE=" << (m_Ui->luminanceLevelCheckBox->isChecked() ? "YES" : "NO") << endl; - } - else if (current_page == m_Ui->page_fattal) - { - out << "TMO=" << "Fattal02" << endl; + out << "SETLUMINANCE=" + << (m_Ui->luminanceLevelCheckBox->isChecked() ? "YES" : "NO") + << endl; + } else if (current_page == m_Ui->page_fattal) { + out << "TMO=" + << "Fattal02" << endl; out << "ALPHA=" << alphaGang->v() << endl; out << "BETA=" << betaGang->v() << endl; out << "COLOR=" << saturation2Gang->v() << endl; out << "NOISE=" << noiseGang->v() << endl; - out << "OLDFATTAL=" << (m_Ui->fftVersionCheckBox->isChecked() ? "NO" : "YES") << endl; - } - else if (current_page == m_Ui->page_ferradans) - { - out << "TMO=" << "Ferradans11" << endl; + out << "OLDFATTAL=" + << (m_Ui->fftVersionCheckBox->isChecked() ? "NO" : "YES") << endl; + } else if (current_page == m_Ui->page_ferradans) { + out << "TMO=" + << "Ferradans11" << endl; out << "RHO=" << rhoGang->v() << endl; out << "INV_ALPHA=" << inv_alphaGang->v() << endl; - } - else if (current_page == m_Ui->page_mai) - { - out << "TMO=" << "Mai11" << endl; - } - else if (current_page == m_Ui->page_ashikhmin) - { - out << "TMO=" << "Ashikhmin02" << endl; - out << "SIMPLE=" << (m_Ui->simpleCheckBox->isChecked() ? "YES" : "NO") << endl; - out << "EQUATION=" << (m_Ui->eq2RadioButton->isChecked() ? "2" : "4") << endl; + } else if (current_page == m_Ui->page_ferwerda) { + out << "TMO=" + << "Ferwerda96" << endl; + out << "MAX_LUMINANCE=" << ferwerdamultiplierGang->v() << endl; + out << "ADAPTATION_LUMINANCE=" << adaptationGang->v() << endl; + } else if (current_page == m_Ui->page_kimkautz) { + out << "TMO=" + << "KimKautz08" << endl; + out << "KK_C1=" << kimkautzc1Gang->v() << endl; + out << "KK_C2=" << kimkautzc2Gang->v() << endl; + } else if (current_page == m_Ui->page_mai) { + out << "TMO=" + << "Mai11" << endl; + } else if (current_page == m_Ui->page_ashikhmin) { + out << "TMO=" + << "Ashikhmin02" << endl; + out << "SIMPLE=" << (m_Ui->simpleCheckBox->isChecked() ? "YES" : "NO") + << endl; + out << "EQUATION=" << (m_Ui->eq2RadioButton->isChecked() ? "2" : "4") + << endl; out << "CONTRAST=" << contrastGang->v() << endl; - } - else if (current_page == m_Ui->page_durand) - { - out << "TMO=" << "Durand02" << endl; + } else if (current_page == m_Ui->page_durand) { + out << "TMO=" + << "Durand02" << endl; out << "SPATIAL=" << spatialGang->v() << endl; out << "RANGE=" << rangeGang->v() << endl; out << "BASE=" << baseGang->v() << endl; - } - else if (current_page == m_Ui->page_drago) - { - out << "TMO=" << "Drago03" << endl; + } else if (current_page == m_Ui->page_drago) { + out << "TMO=" + << "Drago03" << endl; out << "BIAS=" << biasGang->v() << endl; - } - else if (current_page == m_Ui->page_pattanaik) - { - out << "TMO=" << "Pattanaik00" << endl; + } else if (current_page == m_Ui->page_pattanaik) { + out << "TMO=" + << "Pattanaik00" << endl; out << "MULTIPLIER=" << multiplierGang->v() << endl; - out << "LOCAL=" << (m_Ui->pattalocal->isChecked() ? "YES" : "NO") << endl; - out << "AUTOLUMINANCE=" << (m_Ui->autoYcheckbox->isChecked() ? "YES" : "NO") << endl; + out << "LOCAL=" << (m_Ui->pattalocal->isChecked() ? "YES" : "NO") + << endl; + out << "AUTOLUMINANCE=" + << (m_Ui->autoYcheckbox->isChecked() ? "YES" : "NO") << endl; out << "CONE=" << coneGang->v() << endl; out << "ROD=" << rodGang->v() << endl; - } - else if (current_page == m_Ui->page_reinhard02) - { - out << "TMO=" << "Reinhard02" << endl; + } else if (current_page == m_Ui->page_reinhard02) { + out << "TMO=" + << "Reinhard02" << endl; out << "KEY=" << keyGang->v() << endl; out << "PHI=" << phiGang->v() << endl; - out << "SCALES=" << (m_Ui->usescalescheckbox->isChecked() ? "YES" : "NO") << endl; + out << "SCALES=" + << (m_Ui->usescalescheckbox->isChecked() ? "YES" : "NO") << endl; out << "RANGE=" << range2Gang->v() << endl; out << "LOWER=" << lowerGang->v() << endl; out << "UPPER=" << upperGang->v() << endl; - } - else if (current_page == m_Ui->page_reinhard05) - { - out << "TMO=" << "Reinhard05" << endl; + } else if (current_page == m_Ui->page_reinhard05) { + out << "TMO=" + << "Reinhard05" << endl; out << "BRIGHTNESS=" << brightnessGang->v() << endl; out << "CHROMATICADAPTATION=" << chromaticGang->v() << endl; out << "LIGHTADAPTATION=" << lightGang->v() << endl; + } else if (current_page == m_Ui->page_vanhateren) { + out << "TMO=" + << "VanHateren06" << endl; + out << "PUPIL_AREA=" << vanhaterenPupilAreaGang->v() << endl; + } else if (current_page == m_Ui->page_lischinski) { + out << "TMO=" + << "Lischinski06" << endl; + out << "ALPHA_L=" << lischinskiAlphaGang->v() << endl; } out << "PREGAMMA=" << pregammaGang->v() << endl; + out << "POSTSATURATION=" << postsaturationGang->v() << endl; + out << "POSTGAMMA=" << postgammaGang->v() << endl; file.close(); } -void TonemappingPanel::fromTxt2Gui() -{ +void TonemappingPanel::fromTxt2Gui() { QFile file(tmoSettingsFilename); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text) || file.size()==0) - { - QMessageBox::critical(this,tr("Aborting..."),tr("File is not readable (check permissions, path...)"), - QMessageBox::Ok,QMessageBox::NoButton); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text) || file.size() == 0) { + QMessageBox::critical( + this, tr("Aborting..."), + tr("File is not readable (check permissions, path...)"), + QMessageBox::Ok, QMessageBox::NoButton); return; } QTextStream in(&file); - QString field,value; + QString field, value; - while (!in.atEnd()) - { + while (!in.atEnd()) { QString line = in.readLine(); - //skip comments - if (line.startsWith('#')) - continue; - - QString tmo; // Hack, same parameter "RANGE" in durand and reinhard02 - - field=line.section('=',0,0); //get the field - value=line.section('=',1,1); //get the value - if (field == "TMOSETTINGSVERSION") - { - if (value != TMOSETTINGSVERSION) - { - QMessageBox::critical(this,tr("Aborting..."),tr("Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one."), - QMessageBox::Ok,QMessageBox::NoButton); + // skip comments + if (line.startsWith('#')) continue; + + QString tmo; // Hack, same parameter "RANGE" in durand and reinhard02 + + field = line.section('=', 0, 0); // get the field + value = line.section('=', 1, 1); // get the value + if (field == QLatin1String("TMOSETTINGSVERSION")) { + if (value != TMOSETTINGSVERSION) { + QMessageBox::critical(this, tr("Aborting..."), + tr("Error: The tone mapping settings " + "file format has changed. This " + "(old) file cannot be used with this " + "version of LuminanceHDR. " + "Create a new one."), + QMessageBox::Ok, QMessageBox::NoButton); return; } - } - else if (field == "XSIZE") - { + } else if (field == QLatin1String("XSIZE")) { int idx; - for (idx = 0; idx < m_Ui->sizeComboBox->count(); idx++) - { - if (sizes[idx] == value.toInt()) - break; + for (idx = 0; idx < m_Ui->sizeComboBox->count(); idx++) { + if (sizes[idx] == value.toInt()) break; } - if (idx == m_Ui->sizeComboBox->count()) // Custom XSIZE + if (idx == m_Ui->sizeComboBox->count()) // Custom XSIZE { sizes.push_back(value.toInt()); fillCustomSizeComboBox(); - m_Ui->sizeComboBox->setCurrentIndex(m_Ui->sizeComboBox->count() - 1); - } - else + m_Ui->sizeComboBox->setCurrentIndex( + m_Ui->sizeComboBox->count() - 1); + } else m_Ui->sizeComboBox->setCurrentIndex(idx); } - //else if ( field == "QUALITY" å) + // else if ( field == "QUALITY" å) //{ // m_Ui->qualityHS->setValue(value.toInt()); // m_Ui->qualitySB->setValue(value.toInt()); //} - else if (field == "TMO") - { - if (value == "Ashikhmin02") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_ashikhmin); - tmo = "Ashikhmin02"; - } else if (value == "Mantiuk06") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_mantiuk06); - tmo = "Mantiuk06"; - } else if (value == "Mantiuk08") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_mantiuk08); - tmo = "Mantiuk08"; - } else if (value == "Drago03") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_drago); - tmo = "Drago03"; - } else if (value == "Durand02") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_durand); - tmo = "Durand02"; - } else if (value == "Fattal02") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_fattal); - tmo = "Fattal02"; - } else if (value == "Ferradans11") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_ferradans); - tmo = "Ferradans11"; - } else if (value == "Mai11") { + else if (field == QLatin1String("TMO")) { + if (value == QLatin1String("Ashikhmin02")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_ashikhmin); + tmo = QStringLiteral("Ashikhmin02"); + } else if (value == QLatin1String("Mantiuk06")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_mantiuk06); + tmo = QStringLiteral("Mantiuk06"); + } else if (value == QLatin1String("Mantiuk08")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_mantiuk08); + tmo = QStringLiteral("Mantiuk08"); + } else if (value == QLatin1String("Drago03")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_drago); + tmo = QStringLiteral("Drago03"); + } else if (value == QLatin1String("Durand02")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_durand); + tmo = QStringLiteral("Durand02"); + } else if (value == QLatin1String("Fattal02")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_fattal); + tmo = QStringLiteral("Fattal02"); + } else if (value == QLatin1String("Ferradans11")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_ferradans); + tmo = QStringLiteral("Ferradans11"); + } else if (value == QLatin1String("Ferwerda96")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_ferwerda); + tmo = QStringLiteral("Ferwerda96"); + } else if (value == QLatin1String("KimKautz08")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_kimkautz); + tmo = QStringLiteral("KimKautz08"); + } else if (value == QLatin1String("Mai11")) { m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_mai); - tmo = "Mai11"; - } else if (value == "Pattanaik00") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_pattanaik); - tmo = "Pattanaik00"; - } else if (value == "Reinhard02") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_reinhard02); - tmo = "Reinhard02"; - } else if (value == "Reinhard05") { - m_Ui->stackedWidget_operators->setCurrentWidget(m_Ui->page_reinhard05); - tmo = "Reinhard05"; + tmo = QStringLiteral("Mai11"); + } else if (value == QLatin1String("Pattanaik00")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_pattanaik); + tmo = QStringLiteral("Pattanaik00"); + } else if (value == QLatin1String("Reinhard02")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_reinhard02); + tmo = QStringLiteral("Reinhard02"); + } else if (value == QLatin1String("Reinhard05")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_reinhard05); + tmo = QStringLiteral("Reinhard05"); + } else if (value == QLatin1String("VanHateren06")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_vanhateren); + tmo = QStringLiteral("VanHateren06"); + } else if (value == QLatin1String("Lischinski06")) { + m_Ui->stackedWidget_operators->setCurrentWidget( + m_Ui->page_lischinski); + tmo = QStringLiteral("Lischinski06"); } - } else if (field == "CONTRASTFACTOR") { - m_Ui->contrastFactorSlider->setValue(contrastfactorGang->v2p(value.toFloat())); - } else if (field == "SATURATIONFACTOR") { - m_Ui->saturationFactorSlider->setValue(saturationfactorGang->v2p(value.toFloat())); - } else if (field == "DETAILFACTOR") { - m_Ui->detailFactorSlider->setValue(detailfactorGang->v2p(value.toFloat())); - } else if (field == "CONTRASTEQUALIZATION") { - m_Ui->contrastEqualizCheckBox->setChecked((value == "YES")); - } else if (field == "COLORSATURATION") { - m_Ui->contrastFactorSlider->setValue(colorSaturationGang->v2p(value.toFloat())); - } else if (field == "CONTRASTENHANCEMENT") { - m_Ui->saturationFactorSlider->setValue(contrastEnhancementGang->v2p(value.toFloat())); - } else if (field == "LUMINANCELEVEL") { - m_Ui->detailFactorSlider->setValue(luminanceLevelGang->v2p(value.toFloat())); - } else if (field == "SIMPLE") { - m_Ui->simpleCheckBox->setChecked((value == "YES")); - } else if (field == "EQUATION") { - m_Ui->eq2RadioButton->setChecked((value=="2")); - m_Ui->eq4RadioButton->setChecked((value=="4")); - } else if (field == "CONTRAST") { + } else if (field == QLatin1String("CONTRASTFACTOR")) { + m_Ui->contrastFactorSlider->setValue( + contrastfactorGang->v2p(value.toFloat())); + } else if (field == QLatin1String("SATURATIONFACTOR")) { + m_Ui->saturationFactorSlider->setValue( + saturationfactorGang->v2p(value.toFloat())); + } else if (field == QLatin1String("DETAILFACTOR")) { + m_Ui->detailFactorSlider->setValue( + detailfactorGang->v2p(value.toFloat())); + } else if (field == QLatin1String("CONTRASTEQUALIZATION")) { + m_Ui->contrastEqualizCheckBox->setChecked( + (value == QLatin1String("YES"))); + } else if (field == QLatin1String("COLORSATURATION")) { + m_Ui->contrastFactorSlider->setValue( + colorSaturationGang->v2p(value.toFloat())); + } else if (field == QLatin1String("CONTRASTENHANCEMENT")) { + m_Ui->saturationFactorSlider->setValue( + contrastEnhancementGang->v2p(value.toFloat())); + } else if (field == QLatin1String("LUMINANCELEVEL")) { + m_Ui->detailFactorSlider->setValue( + luminanceLevelGang->v2p(value.toFloat())); + } else if (field == QLatin1String("SIMPLE")) { + m_Ui->simpleCheckBox->setChecked((value == QLatin1String("YES"))); + } else if (field == QLatin1String("EQUATION")) { + m_Ui->eq2RadioButton->setChecked((value == QLatin1String("2"))); + m_Ui->eq4RadioButton->setChecked((value == QLatin1String("4"))); + } else if (field == QLatin1String("CONTRAST")) { m_Ui->contrastSlider->setValue(contrastGang->v2p(value.toFloat())); - } else if (field == "BIAS") { + } else if (field == QLatin1String("BIAS")) { m_Ui->biasSlider->setValue(biasGang->v2p(value.toFloat())); - } else if (field == "SPATIAL") { + } else if (field == QLatin1String("SPATIAL")) { m_Ui->spatialSlider->setValue(spatialGang->v2p(value.toFloat())); - } else if (field == "RANGE") { - if (tmo == "Durand02") + } else if (field == QLatin1String("RANGE")) { + if (tmo == QLatin1String("Durand02")) m_Ui->rangeSlider->setValue(rangeGang->v2p(value.toFloat())); else m_Ui->range2Slider->setValue(range2Gang->v2p(value.toFloat())); - } else if (field == "BASE") { + } else if (field == QLatin1String("BASE")) { m_Ui->baseSlider->setValue(baseGang->v2p(value.toFloat())); - } else if (field == "ALPHA") { + } else if (field == QLatin1String("ALPHA")) { m_Ui->alphaSlider->setValue(alphaGang->v2p(value.toFloat())); - } else if (field == "BETA") { + } else if (field == QLatin1String("BETA")) { m_Ui->betaSlider->setValue(betaGang->v2p(value.toFloat())); - } else if (field == "COLOR") { - m_Ui->saturation2Slider->setValue(saturation2Gang->v2p(value.toFloat())); - } else if (field == "NOISE") { + } else if (field == QLatin1String("COLOR")) { + m_Ui->saturation2Slider->setValue( + saturation2Gang->v2p(value.toFloat())); + } else if (field == QLatin1String("NOISE")) { m_Ui->noiseSlider->setValue(noiseGang->v2p(value.toFloat())); - } else if (field == "OLDFATTAL") { - m_Ui->fftVersionCheckBox->setChecked(value != "YES"); - } else if (field == "RHO") { + } else if (field == QLatin1String("OLDFATTAL")) { + m_Ui->fftVersionCheckBox->setChecked(value != QLatin1String("YES")); + } else if (field == QLatin1String("RHO")) { m_Ui->rhoSlider->setValue(rhoGang->v2p(value.toFloat())); - } else if (field == "INV_ALPHA") { - m_Ui->inv_alphaSlider->setValue(inv_alphaGang->v2p(value.toFloat())); - } else if (field == "MULTIPLIER") { - m_Ui->multiplierSlider->setValue(multiplierGang->v2p(value.toFloat())); - } else if (field == "LOCAL") { - (value == "YES") ? m_Ui->pattalocal->setChecked(value == "YES") : m_Ui->pattalocal->setChecked(value=="NO"); - } else if (field == "AUTOLUMINANCE") { - (value == "YES") ? m_Ui->autoYcheckbox->setChecked(value == "YES") : m_Ui->autoYcheckbox->setChecked(value=="NO"); - } else if (field == "CONE") { + } else if (field == QLatin1String("INV_ALPHA")) { + m_Ui->inv_alphaSlider->setValue( + inv_alphaGang->v2p(value.toFloat())); + } else if (field == QLatin1String("MAX_LUMINANCE")) { + m_Ui->ferwerdaMultiplierSlider->setValue(ferwerdamultiplierGang->v2p(value.toFloat())); + } else if (field == QLatin1String("ADAPTATION_LUMINANCE")) { + m_Ui->adaptationLuminanceSlider->setValue( + adaptationGang->v2p(value.toFloat())); + } else if (field == QLatin1String("KK_C1")) { + m_Ui->kimkautzC1Slider->setValue(kimkautzc1Gang->v2p(value.toFloat())); + } else if (field == QLatin1String("KK_C2")) { + m_Ui->kimkautzC2Slider->setValue(kimkautzc2Gang->v2p(value.toFloat())); + } else if (field == QLatin1String("MULTIPLIER")) { + m_Ui->multiplierSlider->setValue( + multiplierGang->v2p(value.toFloat())); + } else if (field == QLatin1String("LOCAL")) { + (value == QLatin1String("YES")) + ? m_Ui->pattalocal->setChecked(value == QLatin1String("YES")) + : m_Ui->pattalocal->setChecked(value == QLatin1String("NO")); + } else if (field == QLatin1String("AUTOLUMINANCE")) { + (value == QLatin1String("YES")) + ? m_Ui->autoYcheckbox->setChecked(value == QLatin1String("YES")) + : m_Ui->autoYcheckbox->setChecked(value == QLatin1String("NO")); + } else if (field == QLatin1String("CONE")) { m_Ui->coneSlider->setValue(coneGang->v2p(value.toFloat())); - } else if (field == "ROD") { + } else if (field == QLatin1String("ROD")) { m_Ui->rodSlider->setValue(rodGang->v2p(value.toFloat())); - } else if (field == "KEY") { + } else if (field == QLatin1String("KEY")) { m_Ui->keySlider->setValue(keyGang->v2p(value.toFloat())); - } else if (field == "PHI") { + } else if (field == QLatin1String("PHI")) { m_Ui->phiSlider->setValue(phiGang->v2p(value.toFloat())); - } else if (field == "SCALES") { - (value == "YES") ? m_Ui->usescalescheckbox->setChecked(value == "YES") : m_Ui->usescalescheckbox->setChecked(value=="NO"); - } else if (field == "LOWER") { + } else if (field == QLatin1String("SCALES")) { + (value == QLatin1String("YES")) + ? m_Ui->usescalescheckbox->setChecked(value == + QLatin1String("YES")) + : m_Ui->usescalescheckbox->setChecked(value == + QLatin1String("NO")); + } else if (field == QLatin1String("LOWER")) { m_Ui->lowerSlider->setValue(lowerGang->v2p(value.toFloat())); - } else if (field == "UPPER") { + } else if (field == QLatin1String("UPPER")) { m_Ui->upperSlider->setValue(upperGang->v2p(value.toFloat())); - } else if (field == "BRIGHTNESS") { - m_Ui->brightnessSlider->setValue(brightnessGang->v2p(value.toFloat())); - } else if (field == "CHROMATICADAPTATION") { - m_Ui->chromaticAdaptSlider->setValue(chromaticGang->v2p(value.toFloat())); - } else if (field == "LIGHTADAPTATION") { + } else if (field == QLatin1String("BRIGHTNESS")) { + m_Ui->brightnessSlider->setValue( + brightnessGang->v2p(value.toFloat())); + } else if (field == QLatin1String("CHROMATICADAPTATION")) { + m_Ui->chromaticAdaptSlider->setValue( + chromaticGang->v2p(value.toFloat())); + } else if (field == QLatin1String("LIGHTADAPTATION")) { m_Ui->lightAdaptSlider->setValue(lightGang->v2p(value.toFloat())); - } else if (field == "PREGAMMA") { + } else if (field == QLatin1String("PUPIL_AREA")) { + m_Ui->pupil_areaSlider->setValue(vanhaterenPupilAreaGang->v2p(value.toFloat())); + } else if (field == QLatin1String("ALPHA_L")) { + m_Ui->lischinski_alpha_Slider->setValue(lischinskiAlphaGang->v2p(value.toFloat())); + } else if (field == QLatin1String("PREGAMMA")) { m_Ui->pregammaSlider->setValue(pregammaGang->v2p(value.toFloat())); + } else if (field == QLatin1String("POSTSATURATION")) { + m_Ui->postsaturationSlider->setValue(postsaturationGang->v2p(value.toFloat())); + } else if (field == QLatin1String("POSTGAMMA")) { + m_Ui->postgammaSlider->setValue(postgammaGang->v2p(value.toFloat())); } } } -void TonemappingPanel::on_addCustomSizeButton_clicked() -{ +void TonemappingPanel::on_addCustomSizeButton_clicked() { bool ok; - int i = QInputDialog::getInt(this, - tr("Custom LDR size"), - tr("Enter the width of the new size:"), 0 , 0, 2147483647, 1, &ok); - if (ok && i > 0) - { + int i = QInputDialog::getInt(this, tr("Custom LDR size"), + tr("Enter the width of the new size:"), 0, 0, + 2147483647, 1, &ok); + if (ok && i > 0) { sizes.push_back(i); fillCustomSizeComboBox(); m_Ui->sizeComboBox->setCurrentIndex(m_Ui->sizeComboBox->count() - 1); } } -void TonemappingPanel::fillCustomSizeComboBox() -{ +void TonemappingPanel::fillCustomSizeComboBox() { m_Ui->sizeComboBox->clear(); - for (int i = 0; i < sizes.size(); i++) - { - m_Ui->sizeComboBox->addItem( QString("%1x%2").arg(sizes[i]).arg( (int)(heightToWidthRatio*sizes[i]) )); + for (int i = 0; i < sizes.size(); i++) { + m_Ui->sizeComboBox->addItem(QStringLiteral("%1x%2").arg(sizes[i]).arg( + (int)(heightToWidthRatio * sizes[i]))); } } -void TonemappingPanel::setEnabled(bool b) -{ - if (b) - { +void TonemappingPanel::setEnabled(bool b) { + if (b) { updateUndoState(); - } - else - { + } else { m_Ui->undoButton->setEnabled(false); m_Ui->redoButton->setEnabled(false); } m_Ui->tonemapGroupBox->setEnabled(b); - m_Ui->groupSaveLoadTMOsetting->setEnabled(b); - m_Ui->groupBoxExport->setEnabled(b); - m_Ui->pregammaGroup->setEnabled(b); + m_Ui->processingToolBox->setEnabled(b); m_Ui->applyButton->setEnabled(b); - m_Ui->queueButton->setEnabled(b); - m_Ui->lblOpenQueue->setVisible(b); m_Ui->replaceLdrCheckBox->setEnabled(b); m_Ui->autoLevelsCheckBox->setEnabled(b); m_Ui->toolButtonThreshold->setEnabled(b); -/* - // Operator select - m_Ui->cmbOperators->setEnabled(b); - m_Ui->stackedWidget_operators->setEnabled(b); - - // Load/Store/Reset - m_Ui->loadsettingsbutton->setEnabled(b); - m_Ui->savesettingsbutton->setEnabled(b); - m_Ui->defaultButton->setEnabled(b); - // Size - m_Ui->sizeComboBox->setEnabled(b); - m_Ui->addCustomSizeButton->setEnabled(b); - - // Gamma - m_Ui->pregammadefault->setEnabled(b); - m_Ui->pregammaSlider->setEnabled(b); - m_Ui->pregammadsb->setEnabled(b); - - // Tonemap - m_Ui->applyButton->setEnabled(b); - m_Ui->queueButton->setEnabled(b); - m_Ui->lblOpenQueue->setVisible(b); - - // DB - m_Ui->loadButton->setEnabled(b); - m_Ui->saveButton->setEnabled(b); - - //m_Ui->qualityHS->setEnabled(b); - //m_Ui->qualitySB->setEnabled(b); - - m_Ui->replaceLdrCheckBox->setEnabled(b); - m_Ui->autoLevelsCheckBox->setEnabled(b); - - // Labels - m_Ui->lblOperators->setEnabled(b); - m_Ui->groupSaveLoadTMOsetting->setEnabled(b); - m_Ui->label->setEnabled(b); - m_Ui->pregammaLabel->setEnabled(b); - m_Ui->pregammaGroup->setEnabled(b); -*/ } -void TonemappingPanel::updatedHDR(pfs::Frame* f) -{ +void TonemappingPanel::updatedHDR(pfs::Frame *f) { setSizes(f->getWidth(), f->getHeight()); m_currentFrame = f; } @@ -1131,198 +1551,196 @@ * This function should set the entire status. * Currently I'm only interested in changing the TM operator */ -void TonemappingPanel::updateTonemappingParams(TonemappingOptions *opts) -{ - qDebug() << "TonemappingPanel::updateTonemappingParams(TonemappingOptions *opts)"; -// currentTmoOperator = opts->tmoperator; -// updateUndoState(); +void TonemappingPanel::updateTonemappingParams(TonemappingOptions *opts) { + qDebug() << "TonemappingPanel::updateTonemappingParams(TonemappingOptions " + "*opts)"; + // m_currentTmoOperator = opts->tmoperator; + // updateUndoState(); m_Ui->cmbOperators->setCurrentIndex(opts->tmoperator); } -void TonemappingPanel::saveParameters() -{ +void TonemappingPanel::saveParameters() { SavingParameters dialog; - if (dialog.exec()) - { - // Ashikhmin - float lct; - bool simple, - eq2; - // Drago - float bias; - // Durand - float spatial, - range, - base; - // Fattal - float alpha, - beta, - colorSat, - noiseReduction; - bool oldFattal; - // Ferradans - float rho, - inv_alpha; - // Mantiuk 06 - float contrastFactor, - saturationFactor, - detailFactor; - bool contrastEqualization; - // Mantiuk 08 - float colorSaturation, - contrastEnhancement, - luminanceLevel; - bool manualLuminanceLevel; - // Pattanaik - float multiplier, - rod, - cone; - bool autolum, - local; - // Reinhard 02 - bool scales; - float key, - phi; - int irange, - lower, - upper; - // Reinhard 05 - float brightness, - chromaticAdaptation, - lightAdaptation; - + if (dialog.exec()) { QString comment = dialog.getComment(); - switch (currentTmoOperator) { + switch (m_currentTmoOperator) { case ashikhmin: - simple = simpleGang->isCheckBox1Checked(); - eq2 = eq2Gang->isRadioButton1Checked(); - lct = contrastGang->v(); - execAshikhminQuery(simple, eq2, lct, comment); - break; + { + bool simple = simpleGang->isCheckBox1Checked(); + bool eq2 = eq2Gang->isRadioButton1Checked(); + float lct = contrastGang->v(); + execAshikhminQuery(simple, eq2, lct, comment); + } + break; case drago: - bias = biasGang->v(); - execDragoQuery(bias, comment); - break; + { + float bias = biasGang->v(); + execDragoQuery(bias, comment); + } + break; case durand: - spatial = spatialGang->v(); - range = rangeGang->v(); - base = baseGang->v(); - execDurandQuery(spatial, range, base, comment); - break; + { + float spatial = spatialGang->v(); + float range = rangeGang->v(); + float base = baseGang->v(); + execDurandQuery(spatial, range, base, comment); + } + break; case fattal: - alpha = alphaGang->v(); - beta = betaGang->v(); - colorSat = saturation2Gang->v(); - noiseReduction = noiseGang->v(); - oldFattal = !fftSolverGang->isCheckBox1Checked(); - execFattalQuery(alpha, beta, colorSat, noiseReduction, oldFattal, comment); - break; + { + float alpha = alphaGang->v(); + float beta = betaGang->v(); + float colorSat = saturation2Gang->v(); + bool noiseReduction = noiseGang->v(); + bool oldFattal = !fftSolverGang->isCheckBox1Checked(); + execFattalQuery(alpha, beta, colorSat, noiseReduction, + oldFattal, comment); + } + break; case ferradans: - rho = rhoGang->v(); - inv_alpha = inv_alphaGang->v(); - execFerradansQuery(rho, inv_alpha, comment); - break; - case mai: //no options - break; + { + float rho = rhoGang->v(); + float inv_alpha = inv_alphaGang->v(); + execFerradansQuery(rho, inv_alpha, comment); + } + break; + case mai: // no options + break; case mantiuk06: - contrastFactor = contrastfactorGang->v(); - saturationFactor = saturationfactorGang->v(); - detailFactor = detailfactorGang->v(); - contrastEqualization = contrastfactorGang->isCheckBox1Checked(); - execMantiuk06Query(contrastEqualization, contrastFactor, saturationFactor, detailFactor, comment); - break; + { + float contrastFactor = contrastfactorGang->v(); + float saturationFactor = saturationfactorGang->v(); + float detailFactor = detailfactorGang->v(); + bool contrastEqualization = contrastfactorGang->isCheckBox1Checked(); + execMantiuk06Query(contrastEqualization, contrastFactor, + saturationFactor, detailFactor, comment); + } + break; case mantiuk08: - colorSaturation = colorSaturationGang->v(); - contrastEnhancement = contrastEnhancementGang->v(); - luminanceLevel = luminanceLevelGang->v(); - manualLuminanceLevel = luminanceLevelGang->isCheckBox1Checked(); - execMantiuk08Query(colorSaturation, contrastEnhancement, luminanceLevel, manualLuminanceLevel, comment); - break; + { + float colorSaturation = colorSaturationGang->v(); + float contrastEnhancement = contrastEnhancementGang->v(); + float luminanceLevel = luminanceLevelGang->v(); + bool manualLuminanceLevel = luminanceLevelGang->isCheckBox1Checked(); + execMantiuk08Query(colorSaturation, contrastEnhancement, + luminanceLevel, manualLuminanceLevel, + comment); + } + break; case pattanaik: - autolum=autoYGang->isCheckBox1Checked(); - local=pattalocalGang->isCheckBox1Checked(); - cone=coneGang->v(); - rod=rodGang->v(); - multiplier=multiplierGang->v(); - execPattanaikQuery(autolum, local, cone, rod, multiplier, comment); - break; + { + bool autolum = autoYGang->isCheckBox1Checked(); + bool local = pattalocalGang->isCheckBox1Checked(); + float cone = coneGang->v(); + float rod = rodGang->v(); + float multiplier = multiplierGang->v(); + execPattanaikQuery(autolum, local, cone, rod, multiplier, + comment); + } + break; case reinhard02: - scales = usescalesGang->isCheckBox1Checked(); - key = keyGang->v(); - phi = phiGang->v(); - irange = (int) range2Gang->v(); - lower = (int) lowerGang->v(); - upper = (int) upperGang->v(); - execReinhard02Query(scales, key, phi, irange, lower, upper, comment); - break; + { + bool scales = usescalesGang->isCheckBox1Checked(); + float key = keyGang->v(); + float phi = phiGang->v(); + int irange = (int)range2Gang->v(); + int lower = (int)lowerGang->v(); + int upper = (int)upperGang->v(); + execReinhard02Query(scales, key, phi, irange, lower, upper, + comment); + } + break; case reinhard05: - brightness = brightnessGang->v(); - chromaticAdaptation = chromaticGang->v(); - lightAdaptation = lightGang->v(); - execReinhard05Query(brightness, chromaticAdaptation, lightAdaptation, comment); - break; + { + float brightness = brightnessGang->v(); + float chromaticAdaptation = chromaticGang->v(); + float lightAdaptation = lightGang->v(); + execReinhard05Query(brightness, chromaticAdaptation, + lightAdaptation, comment); + } + break; + case ferwerda: + { + float maxLuminance = ferwerdamultiplierGang->v(); + float adaptationLuminance = adaptationGang->v(); + execFerwerdaQuery(maxLuminance, adaptationLuminance, comment); + } + break; + case kimkautz: + { + float kk_c1 = kimkautzc1Gang->v(); + float kk_c2 = kimkautzc2Gang->v(); + execKimKautzQuery(kk_c1, kk_c2, comment); + } + break; + case vanhateren: + { + float pupil_area = vanhaterenPupilAreaGang->v(); + execVanHaterenQuery(pupil_area, comment); + } + break; + case lischinski: + { + float alpha = lischinskiAlphaGang->v(); + execLischinskiQuery(alpha, comment); + } + break; } } } -void TonemappingPanel::loadParameters() -{ - TonemappingSettings dialog(this, m_currentFrame); +void TonemappingPanel::loadParameters() { + TonemappingSettings dialog(this, m_currentFrame, m_databaseconnection); - if (dialog.exec()) - { + if (dialog.exec()) { LuminanceOptions *luminance_options = new LuminanceOptions; setRealtimePreviews(false); TonemappingOptions *tmopts = dialog.getTonemappingOptions(); // Ashikhmin - bool simple, - eq2; + bool simple, eq2; float lct; // Drago float bias; // Durand - float spatial, - range, - base; + float spatial, range, base; // Fattal - float alpha, - beta, - colorSat, - noiseReduction; + float alpha, beta, colorSat, noiseReduction; bool fftsolver; // Ferradans - float rho, - inv_alpha; + float rho, inv_alpha; // Mantiuk 06 bool contrastEqualization; float contrastFactor; float saturationFactor; float detailFactor; // Mantiuk 08 - float colorSaturation, - contrastEnhancement, - luminanceLevel; + float colorSaturation, contrastEnhancement, luminanceLevel; bool manualLuminanceLevel; // Pattanaik - float multiplier, - rod, - cone; - bool autolum, - local; + float multiplier, rod, cone; + bool autolum, local; // Reinhard 02 bool scales; - float key, - phi; - int irange, - lower, - upper; + float key, phi; + int irange, lower, upper; // Reinhard 05 - float brightness, - chromaticAdaptation, - lightAdaptation; + float brightness, chromaticAdaptation, lightAdaptation; + // Ferwerda 96 + float maxLuminance, adaptationLuminance; + // KimKrautz 08 + float kk_c1, kk_c2; + // VanHateren 06 + float pupil_area; + // Lischinski 06 + float lischinski_alpha; + // Pre-gamma float pregamma; + // Post-saturation + float postsaturation; + // Post-gamma + float postgamma; switch (tmopts->tmoperator) { case ashikhmin: @@ -1331,6 +1749,8 @@ eq2 = tmopts->operator_options.ashikhminoptions.eq2; lct = tmopts->operator_options.ashikhminoptions.lct; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->simpleCheckBox->setChecked(simple); if (eq2) m_Ui->eq2RadioButton->setChecked(true); @@ -1340,22 +1760,34 @@ m_Ui->contrastdsb->setValue(lct); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case drago: m_Ui->stackedWidget_operators->setCurrentIndex(drago); bias = tmopts->operator_options.dragooptions.bias; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->biasSlider->setValue(bias); m_Ui->biasdsb->setValue(bias); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case durand: m_Ui->stackedWidget_operators->setCurrentIndex(durand); spatial = tmopts->operator_options.durandoptions.spatial; range = tmopts->operator_options.durandoptions.range; base = tmopts->operator_options.durandoptions.base; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->spatialSlider->setValue(spatial); m_Ui->spatialdsb->setValue(spatial); m_Ui->rangeSlider->setValue(range); @@ -1364,15 +1796,22 @@ m_Ui->basedsb->setValue(base); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case fattal: m_Ui->stackedWidget_operators->setCurrentIndex(fattal); alpha = tmopts->operator_options.fattaloptions.alpha; beta = tmopts->operator_options.fattaloptions.beta; colorSat = tmopts->operator_options.fattaloptions.color; - noiseReduction = tmopts->operator_options.fattaloptions.noiseredux; + noiseReduction = + tmopts->operator_options.fattaloptions.noiseredux; fftsolver = tmopts->operator_options.fattaloptions.fftsolver; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->alphaSlider->setValue(alpha); m_Ui->alphadsb->setValue(alpha); m_Ui->betaSlider->setValue(beta); @@ -1384,30 +1823,54 @@ m_Ui->fftVersionCheckBox->setChecked(fftsolver); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case ferradans: m_Ui->stackedWidget_operators->setCurrentIndex(ferradans); rho = tmopts->operator_options.ferradansoptions.rho; inv_alpha = tmopts->operator_options.ferradansoptions.inv_alpha; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->rhoSlider->setValue(rho); m_Ui->rhodsb->setValue(rho); m_Ui->inv_alphaSlider->setValue(inv_alpha); m_Ui->inv_alphadsb->setValue(inv_alpha); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case mai: m_Ui->stackedWidget_operators->setCurrentIndex(mai); pregamma = tmopts->pregamma; - break; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; + m_Ui->pregammaSlider->setValue(pregamma); + m_Ui->pregammadsb->setValue(pregamma); + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case mantiuk06: m_Ui->stackedWidget_operators->setCurrentIndex(mantiuk06); - contrastEqualization = tmopts->operator_options.mantiuk06options.contrastequalization; - contrastFactor = tmopts->operator_options.mantiuk06options.contrastfactor; - saturationFactor = tmopts->operator_options.mantiuk06options.saturationfactor; - detailFactor = tmopts->operator_options.mantiuk06options.detailfactor; + contrastEqualization = tmopts->operator_options.mantiuk06options + .contrastequalization; + contrastFactor = + tmopts->operator_options.mantiuk06options.contrastfactor; + saturationFactor = + tmopts->operator_options.mantiuk06options.saturationfactor; + detailFactor = + tmopts->operator_options.mantiuk06options.detailfactor; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->contrastEqualizCheckBox->setChecked(contrastEqualization); m_Ui->contrastFactorSlider->setValue(contrastFactor); m_Ui->contrastFactordsb->setValue(contrastFactor); @@ -1417,14 +1880,24 @@ m_Ui->detailFactordsb->setValue(detailFactor); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case mantiuk08: m_Ui->stackedWidget_operators->setCurrentIndex(mantiuk08); - colorSaturation = tmopts->operator_options.mantiuk08options.colorsaturation; - contrastEnhancement = tmopts->operator_options.mantiuk08options.contrastenhancement; - luminanceLevel = tmopts->operator_options.mantiuk08options.luminancelevel; - manualLuminanceLevel = tmopts->operator_options.mantiuk08options.setluminance; + colorSaturation = + tmopts->operator_options.mantiuk08options.colorsaturation; + contrastEnhancement = tmopts->operator_options.mantiuk08options + .contrastenhancement; + luminanceLevel = + tmopts->operator_options.mantiuk08options.luminancelevel; + manualLuminanceLevel = + tmopts->operator_options.mantiuk08options.setluminance; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->colorSaturationSlider->setValue(colorSaturation); m_Ui->colorSaturationDSB->setValue(colorSaturation); m_Ui->contrastEnhancementSlider->setValue(contrastEnhancement); @@ -1434,15 +1907,22 @@ m_Ui->luminanceLevelCheckBox->setChecked(manualLuminanceLevel); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case pattanaik: m_Ui->stackedWidget_operators->setCurrentIndex(pattanaik); - multiplier = tmopts->operator_options.pattanaikoptions.multiplier; + multiplier = + tmopts->operator_options.pattanaikoptions.multiplier; rod = tmopts->operator_options.pattanaikoptions.rod; cone = tmopts->operator_options.pattanaikoptions.cone; autolum = tmopts->operator_options.pattanaikoptions.autolum; local = tmopts->operator_options.pattanaikoptions.local; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->multiplierSlider->setValue(multiplier); m_Ui->multiplierdsb->setValue(multiplier); m_Ui->coneSlider->setValue(cone); @@ -1453,7 +1933,11 @@ m_Ui->autoYcheckbox->setChecked(autolum); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case reinhard02: m_Ui->stackedWidget_operators->setCurrentIndex(reinhard02); scales = tmopts->operator_options.reinhard02options.scales; @@ -1463,6 +1947,8 @@ lower = tmopts->operator_options.reinhard02options.lower; upper = tmopts->operator_options.reinhard02options.upper; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->usescalescheckbox->setChecked(scales); m_Ui->keySlider->setValue(key); m_Ui->keydsb->setValue(key); @@ -1476,13 +1962,22 @@ m_Ui->upperdsb->setValue(upper); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; case reinhard05: m_Ui->stackedWidget_operators->setCurrentIndex(reinhard05); - brightness = tmopts->operator_options.reinhard05options.brightness; - chromaticAdaptation = tmopts->operator_options.reinhard05options.chromaticAdaptation; - lightAdaptation = tmopts->operator_options.reinhard05options.lightAdaptation; + brightness = + tmopts->operator_options.reinhard05options.brightness; + chromaticAdaptation = tmopts->operator_options.reinhard05options + .chromaticAdaptation; + lightAdaptation = + tmopts->operator_options.reinhard05options.lightAdaptation; pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; m_Ui->brightnessSlider->setValue(brightness); m_Ui->brightnessdsb->setValue(brightness); m_Ui->chromaticAdaptSlider->setValue(chromaticAdaptation); @@ -1491,11 +1986,86 @@ m_Ui->lightAdaptdsb->setValue(lightAdaptation); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); - break; + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; + case ferwerda: + m_Ui->stackedWidget_operators->setCurrentIndex(ferwerda); + maxLuminance = + tmopts->operator_options.ferwerdaoptions.multiplier; + adaptationLuminance = tmopts->operator_options.ferwerdaoptions + .adaptationluminance; + pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; + m_Ui->ferwerdaMultiplierSlider->setValue(maxLuminance); + m_Ui->ferwerdaMultiplierDsb->setValue(maxLuminance); + m_Ui->adaptationLuminanceSlider->setValue(adaptationLuminance); + m_Ui->adaptationLuminanceDsb->setValue(adaptationLuminance); + m_Ui->pregammaSlider->setValue(pregamma); + m_Ui->pregammadsb->setValue(pregamma); + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; + case kimkautz: + m_Ui->stackedWidget_operators->setCurrentIndex(kimkautz); + kk_c1 = + tmopts->operator_options.kimkautzoptions.c1; + kk_c2 = + tmopts->operator_options.kimkautzoptions.c2; + + pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; + m_Ui->kimkautzC1Slider->setValue(kk_c1); + m_Ui->kimkautzC1Dsb->setValue(kk_c1); + m_Ui->kimkautzC2Slider->setValue(kk_c2); + m_Ui->kimkautzC2Dsb->setValue(kk_c2); + m_Ui->pregammaSlider->setValue(pregamma); + m_Ui->pregammadsb->setValue(pregamma); + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; + case vanhateren: + m_Ui->stackedWidget_operators->setCurrentIndex(vanhateren); + pupil_area = tmopts->operator_options.vanhaterenoptions.pupil_area; + pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; + m_Ui->pupil_areaSlider->setValue(pupil_area); + m_Ui->pupil_areaDsb->setValue(pupil_area); + m_Ui->pregammaSlider->setValue(pregamma); + m_Ui->pregammadsb->setValue(pregamma); + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; + case lischinski: + m_Ui->stackedWidget_operators->setCurrentIndex(lischinski); + lischinski_alpha = tmopts->operator_options.lischinskioptions.alpha; + pregamma = tmopts->pregamma; + postsaturation = tmopts->postsaturation; + postgamma = tmopts->postgamma; + m_Ui->lischinski_alpha_Slider->setValue(lischinski_alpha); + m_Ui->lischinski_alpha_Dsb->setValue(lischinski_alpha); + m_Ui->pregammaSlider->setValue(pregamma); + m_Ui->pregammadsb->setValue(pregamma); + m_Ui->postsaturationSlider->setValue(postsaturation); + m_Ui->postsaturationdsb->setValue(postsaturation); + m_Ui->postgammaSlider->setValue(postgamma); + m_Ui->postgammadsb->setValue(postgamma); + break; } if (dialog.wantsTonemap()) { TonemappingOptions *t = new TonemappingOptions(*tmopts); - toneMappingOptionsToDelete.push_back(t); + m_toneMappingOptionsToDelete.push_back(t); t->origxsize = sizes[0]; t->xsize = sizes[0]; emit startTonemapping(t); @@ -1505,301 +2075,484 @@ } } -void TonemappingPanel::execMantiuk06Query(bool contrastEqualization, float contrastFactor, float saturationFactor, - float detailFactor, QString comment) -{ +void TonemappingPanel::execMantiuk06Query(bool contrastEqualization, + float contrastFactor, + float saturationFactor, + float detailFactor, QString comment) { qDebug() << "TonemappingPanel::execMantiuk06Query"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO mantiuk06 (contrastEqualization, contrastFactor, saturationFactor, detailFactor, pregamma, comment) " - "VALUES (:contrastEqualization, :contrastFactor, :saturationFactor, :detailFactor, :pregamma, :comment)"); - query.bindValue(":contrastEqualization", contrastEqualization); - query.bindValue(":contrastFactor", contrastFactor); - query.bindValue(":saturationFactor", saturationFactor); - query.bindValue(":detailFactor", detailFactor); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO mantiuk06 (contrastEqualization, contrastFactor, \ + saturationFactor, detailFactor, pregamma, comment, postsaturation, postgamma) \ + VALUES (:contrastEqualization, :contrastFactor, :saturationFactor, \ + :detailFactor, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":contrastEqualization"), + contrastEqualization); + query.bindValue(QStringLiteral(":contrastFactor"), contrastFactor); + query.bindValue(QStringLiteral(":saturationFactor"), saturationFactor); + query.bindValue(QStringLiteral(":detailFactor"), detailFactor); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execMantiuk08Query(float colorSaturation, float contrastEnhancement, float luminanceLevel, - bool manualLuminanceLevel, QString comment) -{ +void TonemappingPanel::execMantiuk08Query(float colorSaturation, + float contrastEnhancement, + float luminanceLevel, + bool manualLuminanceLevel, + QString comment) { qDebug() << "TonemappingPanel::execMantiuk08Query"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO mantiuk08 (colorSaturation, contrastEnhancement, luminanceLevel, manualLuminanceLevel, pregamma, comment) " - "VALUES (:colorSaturation, :contrastEnhancement, :luminanceLevel, :manualLuminanceLevel, :pregamma, :comment)"); - query.bindValue(":colorSaturation", colorSaturation); - query.bindValue(":contrastEnhancement", contrastEnhancement); - query.bindValue(":luminanceLevel", luminanceLevel); - query.bindValue(":manualLuminanceLevel", manualLuminanceLevel); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO mantiuk08 (colorSaturation, contrastEnhancement, \ + luminanceLevel, manualLuminanceLevel, pregamma, comment, postsaturation, postgamma) \ + VALUES (:colorSaturation, :contrastEnhancement, :luminanceLevel, \ + :manualLuminanceLevel, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":colorSaturation"), colorSaturation); + query.bindValue(QStringLiteral(":contrastEnhancement"), + contrastEnhancement); + query.bindValue(QStringLiteral(":luminanceLevel"), luminanceLevel); + query.bindValue(QStringLiteral(":manualLuminanceLevel"), + manualLuminanceLevel); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execAshikhminQuery(bool simple, bool eq2, float lct, QString comment) -{ +void TonemappingPanel::execAshikhminQuery(bool simple, bool eq2, float lct, + QString comment) { qDebug() << "TonemappingPanel::execAshikhminQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO ashikhmin (simple, eq2, lct, pregamma, comment) " - "VALUES (:simple, :eq2, :lct, :pregamma, :comment)"); - query.bindValue(":simple", simple); - query.bindValue(":eq2", eq2); - query.bindValue(":lct", lct); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO ashikhmin (simple, eq2, lct, pregamma, comment, postsaturation, postgamma) \ + VALUES (:simple, :eq2, :lct, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":simple"), simple); + query.bindValue(QStringLiteral(":eq2"), eq2); + query.bindValue(QStringLiteral(":lct"), lct); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execDragoQuery(float bias, QString comment) -{ +void TonemappingPanel::execDragoQuery(float bias, QString comment) { qDebug() << "TonemappingPanel::execDragoQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO drago (bias, pregamma, comment) " - "VALUES (:bias, :pregamma, :comment)"); - query.bindValue(":bias", bias); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO drago (bias, pregamma, comment, postsaturation, postgamma) \ + VALUES (:bias, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":bias"), bias); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execDurandQuery(float spatial, float range, float base, QString comment) -{ +void TonemappingPanel::execDurandQuery(float spatial, float range, float base, + QString comment) { qDebug() << "TonemappingPanel::execDurandQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO durand (spatial, range, base, pregamma, comment) " - "VALUES (:spatial, :range, :base, :pregamma, :comment)"); - query.bindValue(":spatial", spatial); - query.bindValue(":base", base); - query.bindValue(":range", range); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO durand (spatial, range, base, pregamma, comment, postsaturation, postgamma) \ + VALUES (:spatial, :range, :base, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":spatial"), spatial); + query.bindValue(QStringLiteral(":base"), base); + query.bindValue(QStringLiteral(":range"), range); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execFattalQuery(float alpha, float beta, float colorSaturation, float noiseReduction, bool oldFattal, QString comment) -{ +void TonemappingPanel::execFattalQuery(float alpha, float beta, + float colorSaturation, + float noiseReduction, bool oldFattal, + QString comment) { qDebug() << "TonemappingPanel::execFattalQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO fattal (alpha, beta, colorSaturation, noiseReduction, oldFattal, pregamma, comment) " - "VALUES (:alpha, :beta, :colorSaturation, :noiseReduction, :oldFattal, :pregamma, :comment)"); - query.bindValue(":alpha", alpha); - query.bindValue(":beta", beta); - query.bindValue(":colorSaturation", colorSaturation); - query.bindValue(":noiseReduction", noiseReduction); - query.bindValue(":oldFattal", oldFattal); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO fattal (alpha, beta, colorSaturation, noiseReduction, \ + oldFattal, pregamma, comment, postsaturation, postgamma) \ + VALUES (:alpha, :beta, :colorSaturation, :noiseReduction, :oldFattal, \ + :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":alpha"), alpha); + query.bindValue(QStringLiteral(":beta"), beta); + query.bindValue(QStringLiteral(":colorSaturation"), colorSaturation); + query.bindValue(QStringLiteral(":noiseReduction"), noiseReduction); + query.bindValue(QStringLiteral(":oldFattal"), oldFattal); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execFerradansQuery(float rho, float inv_alpha, QString comment) -{ +void TonemappingPanel::execFerradansQuery(float rho, float inv_alpha, + QString comment) { qDebug() << "TonemappingPanel::execFerradansQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); + QSqlQuery query(db); + float pregamma = m_Ui->pregammadsb->value(); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO ferradans (rho, inv_alpha, pregamma, comment, postsaturation, postgamma) \ + VALUES (:rho, :inv_alpha, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":rho"), rho); + query.bindValue(QStringLiteral(":inv_alpha"), inv_alpha); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); + bool res = query.exec(); + if (res == false) qDebug() << query.lastError(); +} + +void TonemappingPanel::execFerwerdaQuery(float maxlum, float adaptlum, + QString comment) { + qDebug() << "TonemappingPanel::execFerwerdaQuery"; + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); + QSqlQuery query(db); + float pregamma = m_Ui->pregammadsb->value(); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO ferwerda (maxlum, adaptlum, pregamma, comment, postsaturation, postgamma) \ + VALUES (:maxlum, :adaptlum, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":maxlum"), maxlum); + query.bindValue(QStringLiteral(":adaptlum"), adaptlum); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); + bool res = query.exec(); + if (res == false) qDebug() << query.lastError(); +} + +void TonemappingPanel::execKimKautzQuery(float kk_c1, float kk_c2, + QString comment) { + qDebug() << "TonemappingPanel::execKimKautzQuery"; + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO ferradans (rho, inv_alpha, pregamma, comment) " - "VALUES (:rho, :inv_alpha, :pregamma, :comment)"); - query.bindValue(":rho", rho); - query.bindValue(":inv_alpha", inv_alpha); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO kimkautz (kk_c1, kk_c2, pregamma, comment, postsaturation, postgamma) \ + VALUES (:kk_c1, :kk_c2, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":kk_c1"), kk_c1); + query.bindValue(QStringLiteral(":kk_c2"), kk_c2); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execPattanaikQuery(bool autolum, bool local, float cone, float rod, float multiplier, QString comment) -{ + +void TonemappingPanel::execPattanaikQuery(bool autolum, bool local, float cone, + float rod, float multiplier, + QString comment) { qDebug() << "TonemappingPanel::execPattanaikQuery"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO pattanaik (autolum, local, cone, rod, multiplier, pregamma, comment) " - "VALUES (:autolum, :local, :cone, :rod, :multiplier, :pregamma, :comment)"); - query.bindValue(":autolum", autolum); - query.bindValue(":local", local); - query.bindValue(":cone", cone); - query.bindValue(":rod", rod); - query.bindValue(":multiplier", multiplier); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO pattanaik (autolum, local, cone, rod, multiplier, \ + pregamma, \ + comment, postsaturation, postgamma) \ + VALUES (:autolum, :local, :cone, :rod, :multiplier, :pregamma, \ + :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":autolum"), autolum); + query.bindValue(QStringLiteral(":local"), local); + query.bindValue(QStringLiteral(":cone"), cone); + query.bindValue(QStringLiteral(":rod"), rod); + query.bindValue(QStringLiteral(":multiplier"), multiplier); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execReinhard02Query(bool scales, float key, float phi, int range, int lower, int upper, QString comment) -{ +void TonemappingPanel::execReinhard02Query(bool scales, float key, float phi, + int range, int lower, int upper, + QString comment) { qDebug() << "TonemappingPanel::execReinhard02Query"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO reinhard02 (scales, key, phi, range, lower, upper, pregamma, comment) " - "VALUES (:scales, :key, :phi, :range, :lower, :upper, :pregamma, :comment)"); - query.bindValue(":scales", scales); - query.bindValue(":key", key); - query.bindValue(":phi", phi); - query.bindValue(":range", range); - query.bindValue(":lower", lower); - query.bindValue(":upper", upper); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO reinhard02 (scales, key, phi, range, lower, upper, \ + pregamma, comment, postsaturation, postgamma) \ + VALUES (:scales, :key, :phi, :range, :lower, :upper, :pregamma, \ + :comment)"); + query.bindValue(QStringLiteral(":scales"), scales); + query.bindValue(QStringLiteral(":key"), key); + query.bindValue(QStringLiteral(":phi"), phi); + query.bindValue(QStringLiteral(":range"), range); + query.bindValue(QStringLiteral(":lower"), lower); + query.bindValue(QStringLiteral(":upper"), upper); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -void TonemappingPanel::execReinhard05Query(float brightness, float chromaticAdaptation, float lightAdaptation, QString comment) -{ +void TonemappingPanel::execReinhard05Query(float brightness, + float chromaticAdaptation, + float lightAdaptation, + QString comment) { qDebug() << "TonemappingPanel::execReinhard05Query"; - QSqlDatabase db = QSqlDatabase::database(); + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QSqlQuery query(db); float pregamma = m_Ui->pregammadsb->value(); - query.prepare("INSERT INTO reinhard05 (brightness, chromaticAdaptation, lightAdaptation, pregamma, comment) " - "VALUES (:brightness, :chromaticAdaptation, :lightAdaptation, :pregamma, :comment)"); - query.bindValue(":brightness", brightness); - query.bindValue(":chromaticAdaptation", chromaticAdaptation); - query.bindValue(":lightAdaptation", lightAdaptation); - query.bindValue(":pregamma", pregamma); - query.bindValue(":comment", comment); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO reinhard05 (brightness, chromaticAdaptation, \ + lightAdaptation, pregamma, comment, postsaturation, postgamma) \ + VALUES (:brightness, :chromaticAdaptation, \ + :lightAdaptation, :pregamma, \ + :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":brightness"), brightness); + query.bindValue(QStringLiteral(":chromaticAdaptation"), + chromaticAdaptation); + query.bindValue(QStringLiteral(":lightAdaptation"), lightAdaptation); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); bool res = query.exec(); - if (res == false) - qDebug() << query.lastError(); + if (res == false) qDebug() << query.lastError(); } -bool TonemappingPanel::replaceLdr() -{ +void TonemappingPanel::execVanHaterenQuery(float pupil_area, + QString comment) { + qDebug() << "TonemappingPanel::execVanHaterenQuery"; + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); + QSqlQuery query(db); + float pregamma = m_Ui->pregammadsb->value(); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO vanhateren (pupil_area, pregamma, comment, postsaturation, postgamma) \ + VALUES (:pupil_area, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":pupil_area"), pupil_area); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); + bool res = query.exec(); + if (res == false) qDebug() << query.lastError(); +} + +void TonemappingPanel::execLischinskiQuery(float alpha, + QString comment) { + qDebug() << "TonemappingPanel::execLischinskiQuery"; + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); + QSqlQuery query(db); + float pregamma = m_Ui->pregammadsb->value(); + float postsaturation = m_Ui->postsaturationdsb->value(); + float postgamma = m_Ui->postgammadsb->value(); + query.prepare( + "INSERT INTO lischinski (alpha, pregamma, comment, postsaturation, postgamma) \ + VALUES (:alpha, :pregamma, :comment, :postsaturation, :postgamma)"); + query.bindValue(QStringLiteral(":alpha"), alpha); + query.bindValue(QStringLiteral(":pregamma"), pregamma); + query.bindValue(QStringLiteral(":comment"), comment); + query.bindValue(QStringLiteral(":postsaturation"), postsaturation); + query.bindValue(QStringLiteral(":postgamma"), postgamma); + bool res = query.exec(); + if (res == false) qDebug() << query.lastError(); +} + +bool TonemappingPanel::replaceLdr() { return m_Ui->replaceLdrCheckBox->isChecked(); } -bool TonemappingPanel::doAutoLevels() -{ +bool TonemappingPanel::doAutoLevels() { return m_Ui->autoLevelsCheckBox->isChecked(); } -float TonemappingPanel::getAutoLevelsThreshold() -{ +float TonemappingPanel::getAutoLevelsThreshold() { return m_autolevelThreshold; } -void TonemappingPanel::updatePreviews(double v) -{ +void TonemappingPanel::updatePreviews(double v) { int index = m_Ui->stackedWidget_operators->currentIndex(); - TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy fillToneMappingOptions(false); - QObject* eventSender(sender()); + QObject *eventSender(sender()); // Mantiuk06 if (eventSender == m_Ui->contrastFactordsb) tmopts->operator_options.mantiuk06options.contrastfactor = v; - else if(eventSender == m_Ui->saturationFactordsb) + else if (eventSender == m_Ui->saturationFactordsb) tmopts->operator_options.mantiuk06options.saturationfactor = v; - else if(eventSender == m_Ui->detailFactordsb) + else if (eventSender == m_Ui->detailFactordsb) tmopts->operator_options.mantiuk06options.detailfactor = v; // Mantiuk08 - else if(eventSender == m_Ui->colorSaturationDSB) + else if (eventSender == m_Ui->colorSaturationDSB) tmopts->operator_options.mantiuk08options.colorsaturation = v; - else if(eventSender == m_Ui->contrastEnhancementDSB) + else if (eventSender == m_Ui->contrastEnhancementDSB) tmopts->operator_options.mantiuk08options.contrastenhancement = v; - else if(eventSender == m_Ui->luminanceLevelDSB) + else if (eventSender == m_Ui->luminanceLevelDSB) tmopts->operator_options.mantiuk08options.luminancelevel = v; // Fattal - else if(eventSender == m_Ui->alphadsb) + else if (eventSender == m_Ui->alphadsb) tmopts->operator_options.fattaloptions.alpha = v; - else if(eventSender == m_Ui->betadsb) + else if (eventSender == m_Ui->betadsb) tmopts->operator_options.fattaloptions.beta = v; - else if(eventSender == m_Ui->saturation2dsb) + else if (eventSender == m_Ui->saturation2dsb) tmopts->operator_options.fattaloptions.color = v; - else if(eventSender == m_Ui->noisedsb) + else if (eventSender == m_Ui->noisedsb) tmopts->operator_options.fattaloptions.noiseredux = v; // Ferradans - else if(eventSender == m_Ui->rhodsb) + else if (eventSender == m_Ui->rhodsb) tmopts->operator_options.ferradansoptions.rho = v; - else if(eventSender == m_Ui->inv_alphadsb) + else if (eventSender == m_Ui->inv_alphadsb) tmopts->operator_options.ferradansoptions.inv_alpha = v; + // Ferwerda + else if (eventSender == m_Ui->ferwerdaMultiplierDsb) + tmopts->operator_options.ferwerdaoptions.multiplier = v; + else if (eventSender == m_Ui->adaptationLuminanceDsb) + tmopts->operator_options.ferwerdaoptions.adaptationluminance = v; + // KimKautz + else if (eventSender == m_Ui->kimkautzC1Dsb) + tmopts->operator_options.kimkautzoptions.c1 = v; + else if (eventSender == m_Ui->kimkautzC2Dsb) + tmopts->operator_options.kimkautzoptions.c2 = v; // Drago - else if(eventSender == m_Ui->biasdsb) + else if (eventSender == m_Ui->biasdsb) tmopts->operator_options.dragooptions.bias = v; // Durand - else if(eventSender == m_Ui->basedsb) + else if (eventSender == m_Ui->basedsb) tmopts->operator_options.durandoptions.base = v; - else if(eventSender == m_Ui->spatialdsb) + else if (eventSender == m_Ui->spatialdsb) tmopts->operator_options.durandoptions.spatial = v; - else if(eventSender == m_Ui->rangedsb) + else if (eventSender == m_Ui->rangedsb) tmopts->operator_options.durandoptions.range = v; // Reinhard02 - else if(eventSender == m_Ui->keydsb) + else if (eventSender == m_Ui->keydsb) tmopts->operator_options.reinhard02options.key = v; - else if(eventSender == m_Ui->phidsb) + else if (eventSender == m_Ui->phidsb) tmopts->operator_options.reinhard02options.phi = v; - else if(eventSender == m_Ui->range2dsb) + else if (eventSender == m_Ui->range2dsb) tmopts->operator_options.reinhard02options.range = (int)v; - else if(eventSender == m_Ui->lowerdsb) + else if (eventSender == m_Ui->lowerdsb) tmopts->operator_options.reinhard02options.lower = (int)v; - else if(eventSender == m_Ui->upperdsb) + else if (eventSender == m_Ui->upperdsb) tmopts->operator_options.reinhard02options.upper = (int)v; // Reinhard05 - else if(eventSender == m_Ui->brightnessdsb) + else if (eventSender == m_Ui->brightnessdsb) tmopts->operator_options.reinhard05options.brightness = v; - else if(eventSender == m_Ui->chromaticAdaptdsb) + else if (eventSender == m_Ui->chromaticAdaptdsb) tmopts->operator_options.reinhard05options.chromaticAdaptation = v; - else if(eventSender == m_Ui->lightAdaptdsb) + else if (eventSender == m_Ui->lightAdaptdsb) tmopts->operator_options.reinhard05options.lightAdaptation = v; // Ashikhmin - else if(eventSender == m_Ui->contrastdsb) + else if (eventSender == m_Ui->contrastdsb) tmopts->operator_options.ashikhminoptions.lct = v; // Pattanaik - else if(eventSender == m_Ui->multiplierdsb) + else if (eventSender == m_Ui->multiplierdsb) tmopts->operator_options.pattanaikoptions.multiplier = v; - else if(eventSender == m_Ui->conedsb) + else if (eventSender == m_Ui->conedsb) tmopts->operator_options.pattanaikoptions.cone = v; - else if(eventSender == m_Ui->roddsb) + else if (eventSender == m_Ui->roddsb) tmopts->operator_options.pattanaikoptions.rod = v; - //else if(eventSender == m_Ui->pregammadsb) + // VanHateren + else if (eventSender == m_Ui->pupil_areaDsb) + tmopts->operator_options.vanhaterenoptions.pupil_area = v; + // Lischinski + else if (eventSender == m_Ui->lischinski_alpha_Dsb) + tmopts->operator_options.lischinskioptions.alpha = v; + // else if(eventSender == m_Ui->pregammadsb) // tmopts->pregamma = v; - if (index >= 0) - { - if(eventSender == m_Ui->pregammadsb) - { + if (index >= 0) { + if (eventSender == m_Ui->pregammadsb) { int maxIndex = m_Ui->stackedWidget_operators->count(); - for (int i = 0; i < maxIndex; i++) - { + for (int i = 0; i < maxIndex; i++) { updateCurrentTmoOperator(i); fillToneMappingOptions(false); - TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy tmopts->pregamma = v; m_previewPanel->getLabel(i)->setTonemappingOptions(tmopts); m_previewPanel->updatePreviews(m_currentFrame, i); } updateCurrentTmoOperator(index); - } - else - { + } else if (eventSender == m_Ui->postgammadsb) { + int maxIndex = m_Ui->stackedWidget_operators->count(); + for (int i = 0; i < maxIndex; i++) { + updateCurrentTmoOperator(i); + fillToneMappingOptions(false); + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy + tmopts->postgamma = v; + m_previewPanel->getLabel(i)->setTonemappingOptions(tmopts); + m_previewPanel->updatePreviews(m_currentFrame, i); + } + updateCurrentTmoOperator(index); + } else if (eventSender == m_Ui->postsaturationdsb) { + int maxIndex = m_Ui->stackedWidget_operators->count(); + for (int i = 0; i < maxIndex; i++) { + updateCurrentTmoOperator(i); + fillToneMappingOptions(false); + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy + tmopts->postsaturation = v; + m_previewPanel->getLabel(i)->setTonemappingOptions(tmopts); + m_previewPanel->updatePreviews(m_currentFrame, i); + } + updateCurrentTmoOperator(index); + } else { + m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); m_previewPanel->updatePreviews(m_currentFrame, index); } @@ -1807,12 +2560,12 @@ delete tmopts; } -void TonemappingPanel::updatePreviewsCB(int state) -{ +void TonemappingPanel::updatePreviewsCB(bool state) { int index = m_Ui->stackedWidget_operators->currentIndex(); - TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy fillToneMappingOptions(false); - QObject* eventSender(sender()); + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy + QObject *eventSender(sender()); // Mantiuk06 if (eventSender == m_Ui->contrastEqualizCheckBox) tmopts->operator_options.mantiuk06options.contrastequalization = state; @@ -1834,156 +2587,276 @@ else if (eventSender == m_Ui->autoYcheckbox) tmopts->operator_options.pattanaikoptions.autolum = state; - if (index >= 0) - { + if (index >= 0) { m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); m_previewPanel->updatePreviews(m_currentFrame, index); } delete tmopts; } -void TonemappingPanel::updatePreviewsRB(bool toggled) -{ +void TonemappingPanel::updatePreviewsRB(bool toggled) { int index = m_Ui->stackedWidget_operators->currentIndex(); - TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + TonemappingOptions *tmopts = + new TonemappingOptions(*m_toneMappingOptions); // make a copy fillToneMappingOptions(false); // Only one sender: Ashikhmin tmopts->operator_options.ashikhminoptions.eq2 = toggled; - if (index >= 0) - { + if (index >= 0) { m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); m_previewPanel->updatePreviews(m_currentFrame, index); } delete tmopts; } -void TonemappingPanel::setRealtimePreviews(bool toggled) -{ +void TonemappingPanel::setRealtimePreviews(bool toggled) { if (toggled) { fillToneMappingOptions(false); - //Mantiuk06 - connect(m_Ui->contrastFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->saturationFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->detailFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->contrastEqualizCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - - //Mantiuk08 - connect(m_Ui->colorSaturationDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->contrastEnhancementDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->luminanceLevelDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->luminanceLevelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - - //Fattal - connect(m_Ui->alphadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->betadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->saturation2dsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->noisedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->fftVersionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - - //Ferradans - connect(m_Ui->rhodsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->inv_alphadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - //Drago - connect(m_Ui->biasdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - //Durand - connect(m_Ui->basedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->spatialdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->rangedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - //Reinhard02 - connect(m_Ui->keydsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->phidsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->range2dsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->lowerdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->upperdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->usescalescheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - - //Reinhard05 - connect(m_Ui->brightnessdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->chromaticAdaptdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->lightAdaptdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - //Ashikhmin - connect(m_Ui->contrastdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->simpleCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - connect(m_Ui->eq2RadioButton, SIGNAL(toggled(bool)), this, SLOT(updatePreviewsRB(bool))); - - //Pattanaik - connect(m_Ui->multiplierdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->conedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->roddsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - connect(m_Ui->pattalocal, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - connect(m_Ui->autoYcheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - - //GLOBAL Pregamma - connect(m_Ui->pregammadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - } - else { - disconnect(m_Ui->contrastFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->saturationFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->detailFactordsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->colorSaturationDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->contrastEnhancementDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->luminanceLevelDSB, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->alphadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->betadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->saturation2dsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->noisedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->rhodsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->inv_alphadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->biasdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->basedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->spatialdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->rangedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - - disconnect(m_Ui->keydsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->phidsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->range2dsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->lowerdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->upperdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + // Mantiuk06 + connect(m_Ui->contrastFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->saturationFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->detailFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->contrastEqualizCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // Mantiuk08 + connect(m_Ui->colorSaturationDSB, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->contrastEnhancementDSB, SIGNAL(valueChanged(double)), + this, SLOT(updatePreviews(double))); + connect(m_Ui->luminanceLevelDSB, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->luminanceLevelCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + // Fattal + connect(m_Ui->alphadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->betadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->saturation2dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->noisedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->fftVersionCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); - disconnect(m_Ui->brightnessdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->chromaticAdaptdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->lightAdaptdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + // Ferradans + connect(m_Ui->rhodsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->inv_alphadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Ferwerda + connect(m_Ui->ferwerdaMultiplierDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->adaptationLuminanceDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // KimKautz + connect(m_Ui->kimkautzC1Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->kimkautzC2Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->contrastdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + // Drago + connect(m_Ui->biasdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->multiplierdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->conedsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); - disconnect(m_Ui->roddsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + // Durand + connect(m_Ui->basedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->spatialdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->rangedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Reinhard02 + connect(m_Ui->keydsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->phidsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->range2dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->lowerdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->upperdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->usescalescheckbox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // Reinhard05 + connect(m_Ui->brightnessdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->chromaticAdaptdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->lightAdaptdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->pregammadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + // Ashikhmin + connect(m_Ui->contrastdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->simpleCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + connect(m_Ui->eq2RadioButton, &QAbstractButton::toggled, this, + &TonemappingPanel::updatePreviewsRB); - disconnect(m_Ui->contrastEqualizCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Pattanaik + connect(m_Ui->multiplierdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->conedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->roddsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->pattalocal, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + connect(m_Ui->autoYcheckbox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // VanHateren + connect(m_Ui->pupil_areaDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Lischinski + connect(m_Ui->lischinski_alpha_Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // GLOBAL Pregamma + connect(m_Ui->pregammadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->postgammadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + connect(m_Ui->postsaturationdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + } else { + // Mantiuk06 + disconnect(m_Ui->contrastFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->saturationFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->detailFactordsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->contrastEqualizCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // Mantiuk08 + disconnect(m_Ui->colorSaturationDSB, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->contrastEnhancementDSB, SIGNAL(valueChanged(double)), + this, SLOT(updatePreviews(double))); + disconnect(m_Ui->luminanceLevelDSB, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->luminanceLevelCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); - disconnect(m_Ui->luminanceLevelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Fattal + disconnect(m_Ui->alphadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->betadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->saturation2dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->noisedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->fftVersionCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); - disconnect(m_Ui->fftVersionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Ferradans + disconnect(m_Ui->rhodsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->inv_alphadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Ferwerda + disconnect(m_Ui->ferwerdaMultiplierDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->adaptationLuminanceDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // KimKautz + disconnect(m_Ui->kimkautzC1Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->kimkautzC2Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->usescalescheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Drago + disconnect(m_Ui->biasdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->simpleCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Durand + disconnect(m_Ui->basedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->spatialdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->rangedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Reinhard02 + disconnect(m_Ui->keydsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->phidsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->range2dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->lowerdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->upperdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->usescalescheckbox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // Reinhard05 + disconnect(m_Ui->brightnessdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->chromaticAdaptdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->lightAdaptdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); - disconnect(m_Ui->pattalocal, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); - disconnect(m_Ui->autoYcheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + // Ashikhmin + disconnect(m_Ui->contrastdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->simpleCheckBox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + disconnect(m_Ui->eq2RadioButton, &QAbstractButton::toggled, this, + &TonemappingPanel::updatePreviewsRB); - disconnect(m_Ui->eq2RadioButton, SIGNAL(toggled(bool)), this, SLOT(updatePreviewsRB(bool))); + // Pattanaik + disconnect(m_Ui->multiplierdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->conedsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->roddsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->pattalocal, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + disconnect(m_Ui->autoYcheckbox, &QCheckBox::stateChanged, this, + &TonemappingPanel::updatePreviewsCB); + + // VanHateren + disconnect(m_Ui->pupil_areaDsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // Lischinski + disconnect(m_Ui->lischinski_alpha_Dsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + + // GLOBAL Pregamma + disconnect(m_Ui->pregammadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->postgammadsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); + disconnect(m_Ui->postsaturationdsb, SIGNAL(valueChanged(double)), this, + SLOT(updatePreviews(double))); } } -void TonemappingPanel::on_pattalocal_toggled(bool b) -{ +void TonemappingPanel::on_pattalocal_toggled(bool b) { bool autoY = m_Ui->autoYcheckbox->isChecked(); m_Ui->label_cone->setDisabled(b || autoY); @@ -1994,22 +2867,23 @@ m_Ui->roddsb->setDisabled(b || autoY); } -void TonemappingPanel::autoLevels(bool b) -{ +void TonemappingPanel::autoLevels(bool b) { emit autoLevels(b, m_autolevelThreshold); } -void TonemappingPanel::on_toolButtonThreshold_clicked() -{ +void TonemappingPanel::on_toolButtonThreshold_clicked() { QPoint pos = mapToGlobal(m_Ui->toolButtonThreshold->pos()); m_thd->move(pos.x() - 40, pos.y() - 20); m_thd->show(); } -void TonemappingPanel::thresholdReady() -{ +void TonemappingPanel::thresholdReady() { m_autolevelThreshold = m_thd->threshold(); m_thd->hide(); emit autoLevels(doAutoLevels(), m_autolevelThreshold); } + +QString & TonemappingPanel::getDatabaseConnection() { + return m_databaseconnection; +} // ------------------------- // END FILE diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.h luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,81 +30,71 @@ #include -#include "Core/TonemappingOptions.h" -#include "Libpfs/frame.h" -#include "PreviewPanel/PreviewPanel.h" -#include "ThresholdWidget.h" +#include +#include +#include +#include class Gang; class QtWaitingSpinner; -namespace Ui -{ - class TonemappingPanel; +namespace Ui { +class TonemappingPanel; } -class TonemappingPanel: public QWidget -{ +class TonemappingPanel : public QWidget { Q_OBJECT -protected: + protected: Gang - //mantiuk06 - *contrastfactorGang, - *saturationfactorGang, - *detailfactorGang, - // mantiuk08 - *colorSaturationGang, - *contrastEnhancementGang, - *luminanceLevelGang, - // fattal02 - *alphaGang, - *betaGang, - *saturation2Gang, - *noiseGang, - // *oldFattalGang, - *fftSolverGang, - // ferrands11 - *rhoGang, - *inv_alphaGang, - // ashikhmin02 - *contrastGang, - *simpleGang, - *eq2Gang, - // drago03 - *biasGang, - // durand02 - *spatialGang, - *rangeGang, - *baseGang, - // pattanaik00 - *multiplierGang, - *coneGang, - *rodGang, - *autoYGang, - *pattalocalGang, - // reinhard02 - *keyGang, - *phiGang, - *range2Gang, - *lowerGang, - *upperGang, - *usescalesGang, - // reinhard05 - *brightnessGang, - *chromaticGang, - *lightGang, - // - *pregammaGang; - - TMOperator currentTmoOperator; - TonemappingOptions *toneMappingOptions; - QList toneMappingOptionsToDelete; + // mantiuk06 + *contrastfactorGang, + *saturationfactorGang, *detailfactorGang, + // mantiuk08 + *colorSaturationGang, *contrastEnhancementGang, *luminanceLevelGang, + // fattal02 + *alphaGang, *betaGang, *saturation2Gang, *noiseGang, + // *oldFattalGang, + *fftSolverGang, + // ferrands11 + *rhoGang, *inv_alphaGang, + // ashikhmin02 + *contrastGang, *simpleGang, *eq2Gang, + // drago03 + *biasGang, + // durand02 + *spatialGang, *rangeGang, *baseGang, + // pattanaik00 + *multiplierGang, *coneGang, *rodGang, *autoYGang, *pattalocalGang, + // reinhard02 + *keyGang, *phiGang, *range2Gang, *lowerGang, *upperGang, *usescalesGang, + // reinhard05 + *brightnessGang, *chromaticGang, *lightGang, + // ferwerda96 + *ferwerdamultiplierGang, *adaptationGang, + // kimkautz08 + *kimkautzc1Gang, + *kimkautzc2Gang, + // vanhateren06 + *vanhaterenPupilAreaGang, + // lischinski06 + *lischinskiAlphaGang, + // + *pregammaGang, + // + *postgammaGang, + // + *postsaturationGang; + + TMOperator m_currentTmoOperator; + TonemappingOptions *m_toneMappingOptions; + QList m_toneMappingOptionsToDelete; QVector sizes; void fillToneMappingOptions(bool exportMode); void setupUndo(); - void fromGui2Txt(QString destination); //i.e. WRITE tmo settings to text file - //QString recentPathLoadSaveTmoSettings; + void fromGui2Txt(QString destination); // i.e. WRITE tmo settings to text + // file + // QString recentPathLoadSaveTmoSettings; QString tmoSettingsFilename; int out_ldr_cs; @@ -120,9 +110,11 @@ QScopedPointer m_thd; QScopedPointer m_Ui; -protected Q_SLOTS: - virtual void changeEvent(QEvent* event); + protected Q_SLOTS: + virtual void changeEvent(QEvent *event); void on_pregammadefault_clicked(); + void on_postgammadefault_clicked(); + void on_postsaturationdefault_clicked(); void on_defaultButton_clicked(); void on_applyButton_clicked(); void on_undoButton_clicked(); @@ -130,63 +122,69 @@ void on_savesettingsbutton_clicked(); void on_loadsettingsbutton_clicked(); void on_queueButton_clicked(); - void on_lblOpenQueue_linkActivated(const QString& link); + void on_lblOpenQueue_linkActivated(const QString &link); - //APPLY tmo settings from text file + // APPLY tmo settings from text file void fromTxt2Gui(); - //user wants a custom size. + // user wants a custom size. void on_addCustomSizeButton_clicked(); void fillCustomSizeComboBox(); void updateCurrentTmoOperator(int); void updateUndoState(); void loadParameters(); void saveParameters(); - void execMantiuk06Query(bool, float, float, float, QString); + void execMantiuk06Query(bool, float, float, float, QString); void execMantiuk08Query(float, float, float, bool, QString); void execAshikhminQuery(bool, bool, float, QString); void execDragoQuery(float, QString); void execDurandQuery(float, float, float, QString); void execFattalQuery(float, float, float, float, bool, QString); void execFerradansQuery(float, float, QString); + void execFerwerdaQuery(float, float, QString); + void execKimKautzQuery(float, float, QString); void execPattanaikQuery(bool, bool, float, float, float, QString); void execReinhard02Query(bool, float, float, int, int, int, QString); void execReinhard05Query(float, float, float, QString); + void execVanHaterenQuery(float, QString); + void execLischinskiQuery(float, QString); void updatePreviews(double); - void updatePreviewsCB(int); + void updatePreviewsCB(bool); void updatePreviewsRB(bool); void on_pattalocal_toggled(bool); void on_toolButtonThreshold_clicked(); void thresholdReady(); -public: - TonemappingPanel(int mainWinNumber, PreviewPanel *p = 0, QWidget *parent = 0); + public: + TonemappingPanel(int mainWinNumber, PreviewPanel *p = 0, + QWidget *parent = 0); ~TonemappingPanel(); void setSizes(int, int); bool replaceLdr(); bool doAutoLevels(); float getAutoLevelsThreshold(); void setExportQueueSize(int); + QString & getDatabaseConnection(); -public Q_SLOTS: + public Q_SLOTS: void setEnabled(bool); - void updatedHDR(pfs::Frame*); + void updatedHDR(pfs::Frame *); void updateTonemappingParams(TonemappingOptions *opts); void setRealtimePreviews(bool); void autoLevels(bool b); -signals: - void startTonemapping(TonemappingOptions*); - void startExport(TonemappingOptions*); + signals: + void startTonemapping(TonemappingOptions *); + void startExport(TonemappingOptions *); void autoLevels(bool, float); -private: + private: void onUndoRedo(bool undo); - QtWaitingSpinner* m_spinner; - - + QtWaitingSpinner *m_spinner; + static int sm_counter; + QString m_databaseconnection; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.ui luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.ui --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingPanel.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingPanel.ui 2019-06-09 19:18:38.000000000 +0000 @@ -9,8 +9,8 @@ 0 0 - 511 - 590 + 421 + 647 @@ -25,278 +25,27 @@ - - - - - - 0 - 0 - - - - - - - Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. - - - Tone Mapping Settings - - - - 4 - - - 4 - - - 4 - - - 4 - - - - - - - - 0 - 0 - - - - - 16777215 - 33 - - - - Save current parameters to a text file - - - Save current parameters (pregamma and TMO) to a text file. - - - - .. - - - - - - - - 0 - 0 - - - - - 16777215 - 33 - - - - Load an existing text file containing pregamma and TMO settings - - - Load an existing text file containing pregamma and TMO settings. - - - - .. - - - - - - - - 0 - 0 - - - - - 16777215 - 33 - - - - Save current parameters - - - - .. - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 33 - - - - Load saved parameters - - - - .. - - - - - - - - - - - - - 0 - 0 - - - - Export - - - - 6 - - - - - - - - 0 - 0 - - - - Fast export - - - - .. - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Opens the current export direcotory. This can be changed in the preferences! - - - <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - 0 - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 20 - - - - - - - - - - - - - - - - - + + + Qt::Horizontal + + - - + + + + true + - + 0 0 - - - - - Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - - Process + Tonemap - + 4 @@ -309,352 +58,20 @@ 4 - - - - + + + + - + 0 0 - - Result Si&ze - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 0 - - true - - - 1 - - - sizeComboBox - - - - - - - Gamma applied before tonemapping - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 0.100000000000000 - - - 5.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - - 0 - 0 - - - - Gamma applied before tonemapping - - - Pre-&gamma - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - -1 - - - pregammaSlider - - - - - - - - - - 0 - 0 - - - - PointingHandCursor - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 31 - 0 - - - - - 16777215 - 16777215 - - - - Restore pregamma's default value (1) - - - - - - - .. - - - - 10 - 10 - - - - - - - - - - - - - 0 - 0 - - - - Size of the resulting LDR image - - - Here you can choose the size of the resulting LDR image. - - - QComboBox::NoInsert - - - - - - - - 0 - 0 - - - - - 31 - 0 - - - - - 16777215 - 16777215 - - - - - 0 - 0 - - - - PointingHandCursor - - - Set Custom Output Size - - - Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. - - - Qt::LeftToRight - - - - .. - - - - 10 - 10 - - - - - - - - - - - - - - - - - - 0 - 0 - - - - Start tonemapping (CTRL+T) - - - Use current parameters above (pregamma and tone mapping operator) to compute an LDR image - - - &Update preview - - - Ctrl+T - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - Update current LDR - - - true - - - true - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - Auto Levels - - - true - - - - - - - true - - - <html><head/><body><p>set auto levels threshold</p></body></html> - - - ... - - - Qt::ToolButtonIconOnly - - - Qt::DownArrow - - - - - - - - - true - - - - 0 - 0 - - - - Tonemap - - - - 4 - - - 4 - - - 4 - - - 4 - - - - - - - - 0 - 0 - - - - 0 - - + true @@ -712,6 +129,26 @@ Mai + + + Ferwerda + + + + + KimKautz + + + + + VanHateren + + + + + Lischinski + + @@ -777,21 +214,9 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - + @@ -804,7 +229,7 @@ Qt::LeftToRight - Contrast Factor + &Contrast Factor Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -812,31 +237,47 @@ true + + contrastFactorSlider + - - + + - + 0 0 - - Qt::LeftToRight - - Saturation Factor - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Contrast Equalization - + + + + + true + + + 0 + 0 + + + + PointingHandCursor + + + 1000 + + + Qt::Horizontal + - + @@ -858,7 +299,60 @@ - + + + + true + + + + 0 + 0 + + + + Qt::LeftToRight + + + &Detail Factor + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + detailFactorSlider + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Saturat&ion Factor + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + saturationFactorSlider + + + + @@ -877,7 +371,7 @@ - + @@ -908,7 +402,7 @@ - + @@ -939,54 +433,7 @@ - - - - true - - - - 0 - 0 - - - - Qt::LeftToRight - - - Detail Factor - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - true - - - - 0 - 0 - - - - PointingHandCursor - - - 1000 - - - Qt::Horizontal - - - - true @@ -1020,37 +467,24 @@ - - - - - 0 - 0 - - - - Contrast Equalization - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 13 + 56 + + + + @@ -1060,40 +494,9 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - - - - - 0 - 0 - - - - Predefined Display - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - @@ -1133,7 +536,7 @@ - Color Saturation + Co&lor Saturation Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1141,6 +544,9 @@ true + + colorSaturationSlider + @@ -1152,7 +558,7 @@ - Contrast Enhancement + Co&ntrast Enhancement Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1160,6 +566,9 @@ true + + contrastEnhancementSlider + @@ -1200,7 +609,7 @@ - Luminance Level + Lum&inance Level Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1208,6 +617,9 @@ true + + luminanceLevelSlider +
@@ -1226,25 +638,6 @@ - - - - false - - - - 0 - 0 - - - - 100 - - - Qt::Horizontal - - - @@ -1264,6 +657,25 @@ + + + + false + + + + 0 + 0 + + + + 100 + + + Qt::Horizontal + + + @@ -1315,24 +727,43 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - + + + + + 0 + 0 + - + + Predefined &Display + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + displayComboBox + +
+ + + + Qt::Vertical + + + + 20 + 40 + + + +
@@ -1342,19 +773,7 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + @@ -1366,7 +785,7 @@ - Alpha + A&lpha Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1374,6 +793,9 @@ true + + alphaSlider + @@ -1435,7 +857,7 @@ - Beta + Bet&a Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1443,6 +865,9 @@ true + + betaSlider + @@ -1489,22 +914,25 @@ - - - - - 0 - 0 - + + + + Qt::AlignCenter - - Color Saturation + + QAbstractSpinBox::NoButtons - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 2 - - true + + 1.500000000000000 + + + 0.050000000000000 + + + 0.800000000000000 @@ -1527,25 +955,25 @@ - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons + + + + + 0 + 0 + - - 2 + + Color Saturat&ion - - 1.500000000000000 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - 0.050000000000000 + + true - - 0.800000000000000 + + saturation2Slider @@ -1558,7 +986,7 @@ - Noise Reduction + &Noise Reduction Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1566,6 +994,9 @@ true + + noiseSlider + @@ -1587,6 +1018,22 @@ + + + + + 0 + 0 + + + + Version 2.3.0 + + + true + + + @@ -1609,44 +1056,25 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Version 2.3.0 - - - true - - - + + + + Qt::Vertical + + + + 20 + 40 + + + + - + @@ -1680,26 +1108,13 @@ - Inverse Alpha + &Inverse Alpha Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 0 - 0 - - - - Rho - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + inv_alphaSlider @@ -1716,16 +1131,22 @@ - - - - 10.000000000000000 + + + + + 0 + 0 + - - 0.100000000000000 + + Rho - - 5.000000000000000 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + rhoSlider @@ -1748,24 +1169,34 @@ - - - - Qt::Vertical + + + + 10.000000000000000 - - QSizePolicy::MinimumExpanding + + 0.100000000000000 - - - 312 - 13 - + + 5.000000000000000 - + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -1775,21 +1206,9 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - + @@ -1799,7 +1218,7 @@ - Bias + B&ias Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1807,6 +1226,9 @@ true + + biasSlider + @@ -1850,46 +1272,31 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - - - - - 0 - 0 + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + 0 + 0 - - 0 - - - 0 - - - 0 - - - 0 - @@ -1901,7 +1308,7 @@ - Spatial Kernel Sigma + Spatial &Kernel Sigma Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1909,24 +1316,46 @@ true + + spatialSlider + - - + + - + 0 0 - - PointingHandCursor + + Base Co&ntrast + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + baseSlider + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons - 100 + 10.000000000000000 - - Qt::Horizontal + + 5.000000000000000 @@ -1952,27 +1381,27 @@ - - + + - + 0 0 - - Range Kernel Sigma + + PointingHandCursor - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 100 - - true + + Qt::Horizontal - - + + 0 @@ -1990,46 +1419,8 @@ - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0.010000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 0.400000000000000 - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - + + 0 @@ -2037,7 +1428,7 @@ - Base Contrast + Range Kerne&l Sigma Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -2045,10 +1436,13 @@ true + + rangeSlider + - - + + 0 @@ -2066,24 +1460,43 @@ - - + + Qt::AlignCenter QAbstractSpinBox::NoButtons + + 0.010000000000000 + 10.000000000000000 + + 0.100000000000000 + - 5.000000000000000 + 0.400000000000000 + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -2093,42 +1506,11 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - - - - - 0 - 0 - - - - Key Value - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - + + 0 @@ -2139,15 +1521,31 @@ PointingHandCursor - 100 + 1000 Qt::Horizontal - - + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 0 + 0 + + + + + + Qt::AlignCenter @@ -2155,56 +1553,43 @@ QAbstractSpinBox::NoButtons - 1.000000000000000 + 100.000000000000000 - 0.010000000000000 + 1.000000000000000 - 0.180000000000000 + 1.000000000000000 - - - - - 0 - 0 - - - - Phi + + + + false - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons - - - - - - - 0 - 0 - + + 0 - - PointingHandCursor + + 1.000000000000000 - 1000 + 32.000000000000000 - - Qt::Horizontal + + 8.000000000000000 - - + + Qt::AlignCenter @@ -2212,36 +1597,73 @@ QAbstractSpinBox::NoButtons - 100.000000000000000 + 1.000000000000000 - 1.000000000000000 + 0.010000000000000 - 1.000000000000000 + 0.180000000000000 - - - - - 0 - 0 - + + + + false - - - 0 - 28 - + + Qt::AlignCenter - - Use Scales + + QAbstractSpinBox::NoButtons + + + 0 + + + 1.000000000000000 + + + 100.000000000000000 + + + 10.000000000000000 + + + 1.000000000000000 - + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 1.000000000000000 + + + 100.000000000000000 + + + 1.000000000000000 + + + 43.000000000000000 + + + + false @@ -2272,36 +1694,30 @@ - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons + + + + + 0 + 0 + - - 0 + + Ph&i - - 1.000000000000000 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - 32.000000000000000 + + true - - 8.000000000000000 + + phiSlider - - - - false - + + 0 @@ -2309,7 +1725,7 @@ - Range + &Key Value Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -2317,6 +1733,9 @@ true + + keySlider + @@ -2331,18 +1750,18 @@ - Lower Scale + &Lower Scale Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + lowerSlider + - - - - false - + + 0 @@ -2352,9 +1771,6 @@ PointingHandCursor - - 0 - 100 @@ -2364,30 +1780,27 @@ - + false - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons + + + 0 + 0 + - - 0 + + PointingHandCursor - 1.000000000000000 + 0 - 100.000000000000000 - - - 10.000000000000000 + 100 - - 1.000000000000000 + + Qt::Horizontal @@ -2403,14 +1816,17 @@ - Upper Scale + Upper S&cale Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + upperSlider + - + false @@ -2435,49 +1851,72 @@ - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0 - - - 1.000000000000000 - - - 100.000000000000000 - - - 1.000000000000000 - - - 43.000000000000000 - - - - - - - Qt::Vertical - - - - 0 - 0 - - - + + + + + + + 0 + 0 + + + + + 0 + 28 + + + + Qt::RightToLeft + + + Use Scales + + + + + + + false + + + + 0 + 0 + + + + Ra&nge + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + range2Slider + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -2487,49 +1926,9 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Brightness - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + @@ -2558,30 +1957,27 @@ - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons + + + + + 0 + 0 + - - -20.000000000000000 + + PointingHandCursor - 20.000000000000000 - - - 0.100000000000000 + 100 - - 0.000000000000000 + + Qt::Horizontal - - + + 0 @@ -2600,8 +1996,11 @@ 16777215 + + Qt::LeftToRight + - Chromatic Adaptation + &Light Adaptation Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -2609,10 +2008,13 @@ true + + lightAdaptSlider + - - + + 0 @@ -2630,30 +2032,42 @@ - - - - Qt::AlignCenter + + + + + 0 + 0 + - - QAbstractSpinBox::NoButtons + + + 0 + 0 + - - 0.000000000000000 + + + 16777215 + 16777215 + - - 1.000000000000000 + + Chromatic A&daptation - - 0.100000000000000 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - 0.000000000000000 + + true + + + chromaticAdaptSlider - - + + 0 @@ -2672,41 +2086,41 @@ 16777215 - - Qt::LeftToRight - - Light Adaptation + Br&ightness Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - true + + brightnessSlider - - - - - 0 - 0 - + + + + Qt::AlignCenter - - PointingHandCursor + + QAbstractSpinBox::NoButtons + + + -20.000000000000000 - 100 + 20.000000000000000 - - Qt::Horizontal + + 0.100000000000000 + + + 0.000000000000000 - - + + Qt::AlignCenter @@ -2723,28 +2137,47 @@ 0.100000000000000 - 1.000000000000000 + 0.000000000000000 - - - - Qt::Vertical + + + + Qt::AlignCenter - - QSizePolicy::MinimumExpanding + + QAbstractSpinBox::NoButtons - - - 0 - 0 - + + 0.000000000000000 - + + 1.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -2757,19 +2190,7 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + @@ -2793,7 +2214,7 @@ - Local Contrast Threshold + Local Contrast Threshol&d Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -2801,6 +2222,9 @@ true + + contrastSlider + @@ -2896,7 +2320,7 @@ - Equation Number + Equation &Number Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing @@ -2904,6 +2328,9 @@ true + + eq2RadioButton + @@ -2957,6 +2384,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -2966,25 +2406,13 @@ 0 - - - 0 - - - 0 - - - 0 - - - 0 - + - - + + - + 0 0 @@ -2992,42 +2420,17 @@ 0 - 0 + 32 16777215 - 16777215 + 32 - Multiplier - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - - 0 - 0 - - - - PointingHandCursor - - - 1000 - - - Qt::Horizontal + Local Tone Mapping @@ -3053,10 +2456,10 @@ - - + + - + 0 0 @@ -3064,38 +2467,66 @@ 0 - 32 + 0 16777215 - 32 + 16777215 - Local Tone Mapping + Mu&ltiplier + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + multiplierSlider - - + + 0 0 - - - 0 - 28 - + + PointingHandCursor - - - 16777215 - 28 + + 1000 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 0 + 28 + + + + + 16777215 + 28 @@ -3121,7 +2552,13 @@ PointingHandCursor - 100 + 1000 + + + 1 + + + 10 Qt::Horizontal @@ -3152,7 +2589,7 @@ - Cone Level + Co&ne Level Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -3160,6 +2597,9 @@ true + + coneSlider + @@ -3173,11 +2613,14 @@ QAbstractSpinBox::NoButtons + + 5 + 1.000000000000000 - 0.100000000000000 + 0.010000000000000 0.500000000000000 @@ -3208,7 +2651,7 @@ - Rod Level + Ro&d Level Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -3216,6 +2659,9 @@ true + + rodSlider + @@ -3233,7 +2679,13 @@ PointingHandCursor - 100 + 1000 + + + 1 + + + 10 Qt::Horizontal @@ -3251,39 +2703,39 @@ QAbstractSpinBox::NoButtons + + 5 + 1.000000000000000 - 0.100000000000000 + 0.010000000000000 0.500000000000000 - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - + + + + Qt::Vertical + + + + 20 + 40 + + + + - + @@ -3295,7 +2747,7 @@ 20 - 79 + 75 @@ -3310,7 +2762,7 @@ - 0 + 98 20 @@ -3339,7 +2791,7 @@ - 0 + 98 20 @@ -3356,114 +2808,1473 @@ 20 - 79 + 75 - - - - - - - - - 0 - 0 - - - - Restore operator's default values - - - Restore - - - - .. - - - Qt::ToolButtonTextBesideIcon - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 20 - - - - - - - - false - - - - 0 - 0 - - - - Previous applied settings - - - Previous - - - - .. - - - Qt::ToolButtonTextBesideIcon - - - - - - - false - - - - 0 - 0 - - - - Next applied settings - - - - - - Next - - - - .. - - - Qt::ToolButtonTextBesideIcon - - - - - - + + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + 0 + + + 2000 + + + 1 + + + 10 + + + 1000 + + + Qt::Horizontal + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 0.001000000000000 + + + 2.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + &Multiplier + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + brightnessSlider + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + A&daptation Luminance + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + chromaticAdaptSlider + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 0.001000000000000 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.500000000000000 + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + 1000 + + + 500 + + + Qt::Horizontal + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + &C1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + chromaticAdaptSlider + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + 10000 + + + 3000 + + + Qt::Horizontal + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 0.001000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 3.000000000000000 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + C&2 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + chromaticAdaptSlider + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + 5000 + + + 500 + + + Qt::Horizontal + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 0.001000000000000 + + + 5.000000000000000 + + + 0.100000000000000 + + + 0.500000000000000 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + 0 + 0 + + + + 0 + + + 100 + + + 10 + + + Qt::Horizontal + + + + + + + 2 + + + 0.000000000000000 + + + 100.000000000000000 + + + 0.100000000000000 + + + 10.000000000000000 + + + + + + + + 0 + 0 + + + + Pup&il Area + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + rhoSlider + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + a&lpha mul + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + chromaticAdaptSlider + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + 100 + + + 10 + + + Qt::Horizontal + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 0.010000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + 0 + 0 + + + + Restore operator's default values + + + Restore + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + Qt::ToolButtonTextBesideIcon + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 0 + 20 + + + + + + + + false + + + + 0 + 0 + + + + Previous applied settings + + + Previous + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + Qt::ToolButtonTextBesideIcon + + + + + + + false + + + + 0 + 0 + + + + Next applied settings + + + + + + Next + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + + + + + 0 + 0 + + + + Start tonemapping (CTRL+T) + + + Use current parameters above (pregamma and tone mapping operator) to compute an LDR image + + + &Update preview + + + Ctrl+T + + + + + + + + 0 + 0 + + + + Qt::RightToLeft + + + Update current LDR + + + true + + + true + + + + + + + + 0 + 0 + + + + Qt::RightToLeft + + + Auto Levels + + + true + + + + + + + true + + + <html><head/><body><p>set auto levels threshold</p></body></html> + + + ... + + + Qt::ToolButtonIconOnly + + + Qt::DownArrow + + + + + + + + + true + + + + 0 + 0 + + + + 0 + + + + + 0 + 0 + 409 + 174 + + + + Processing + + + + + + + 0 + 0 + + + + + + + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. + + + + + + + + + + 0 + 0 + + + + Res&ult Size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + 1 + + + sizeComboBox + + + + + + + + + + + 0 + 0 + + + + + 31 + 0 + + + + + 16777215 + 16777215 + + + + + 0 + 0 + + + + PointingHandCursor + + + Set Custom Output Size + + + Clicking this button you will be able to insert a <i>width</i> value for the size of the resulting LDR image.<br>After pressing Enter (or Return) a height value will be automatically computed and the new size added to the list. + + + Qt::LeftToRight + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + 10 + 10 + + + + + + + + + 0 + 0 + + + + Gamma applied before tonemapping + + + Pre-&gamma + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + -1 + + + pregammaSlider + + + + + + + 100 + + + 1 + + + 10 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 31 + 0 + + + + + 16777215 + 16777215 + + + + <html><head/><body><p>Restore pregamma's default value (1)</p></body></html> + + + + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + 10 + 10 + + + + + + + + Gamma applied before tonemapping + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 0.100000000000000 + + + 5.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + Pos&t-saturation + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + postsaturationSlider + + + + + + + 100 + + + 1 + + + 10 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 31 + 0 + + + + + 16777215 + 16777215 + + + + <html><head/><body><p>Restore post-saturation's default value (1)</p></body></html> + + + + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + 10 + 10 + + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 5.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + Qt::LeftToRight + + + Post-gamma + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 100 + + + 1 + + + 10 + + + Qt::Horizontal + + + + + + + + 31 + 0 + + + + <html><head/><body><p>Restore postgamma's default value (1)</p></body></html> + + + ... + + + + ../../../../../../../..../../../../../../../.. + + + + 10 + 10 + + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 5.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + + + + + 0 + 0 + 409 + 208 + + + + Settings + + + + + + + + + 0 + 0 + + + + + + + Here you can load and save a tone mapping settings file.<br>You can also apply the contents of the currently loaded settings file. + + + Tone Mapping Settings + + + + 4 + + + 4 + + + 4 + + + 4 + + + + + + + + 0 + 0 + + + + + 16777215 + 33 + + + + Save current parameters to a text file + + + Save current parameters (pregamma and TMO) to a text file. + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + + + + + 0 + 0 + + + + + 16777215 + 33 + + + + Load an existing text file containing pregamma and TMO settings + + + Load an existing text file containing pregamma and TMO settings. + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 33 + + + + Load saved parameters + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + + + + + 0 + 0 + + + + + 16777215 + 33 + + + + Save current parameters + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 0 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 0 + 20 + + + + + + + + + + + + + + 0 + 0 + + + + Export + + + + 6 + + + + + + + + 0 + 0 + + + + + 16777215 + 33 + + + + Fast export + + + + ../../../../../.designer/backup../../../../../.designer/backup + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 0 + 0 + + + + Opens the current export directory. This can be changed in the preferences! + + + <html><head/><body><p><a href="Open"><span style=" text-decoration: underline; color:#0000ff;">Open</span></a></p></body></html> + + + false + + + Qt::LinksAccessibleByMouse + + + + + + + 0 + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 0 + 20 + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + @@ -3471,6 +4282,27 @@ applyButton replaceLdrCheckBox + autoLevelsCheckBox + toolButtonThreshold + sizeComboBox + addCustomSizeButton + pregammaSlider + pregammadefault + pregammadsb + postsaturationSlider + postsaturationdefault + postsaturationdsb + postgammaSlider + postgammadefault + postgammadsb + savesettingsbutton + loadsettingsbutton + saveButton + loadButton + queueButton + defaultButton + undoButton + redoButton cmbOperators contrastFactorSlider contrastFactordsb @@ -3495,6 +4327,11 @@ saturation2dsb noiseSlider noisedsb + fftVersionCheckBox + rhoSlider + rhodsb + inv_alphaSlider + inv_alphadsb biasSlider biasdsb baseSlider @@ -3533,404 +4370,532 @@ conedsb rodSlider roddsb - defaultButton - undoButton - redoButton - savesettingsbutton - loadsettingsbutton - saveButton - loadButton - sizeComboBox - addCustomSizeButton - pregammaSlider - pregammadefault - pregammadsb + ferwerdaMultiplierSlider + ferwerdaMultiplierDsb + adaptationLuminanceSlider + adaptationLuminanceDsb + kimkautzC1Slider + kimkautzC1Dsb + kimkautzC2Slider + kimkautzC2Dsb + pupil_areaSlider + pupil_areaDsb + lischinski_alpha_Slider + lischinski_alpha_Dsb - autoYcheckbox + cmbOperators + currentIndexChanged(int) + stackedWidget_operators + setCurrentIndex(int) + + + 214 + 52 + + + 330 + 73 + + + + + luminanceLevelCheckBox toggled(bool) - coneSlider - setDisabled(bool) + luminanceLevelSlider + setEnabled(bool) - 111 - 103 + 148 + 201 - 111 - 105 + 183 + 242 - autoYcheckbox + luminanceLevelCheckBox toggled(bool) - label_cone - setDisabled(bool) + luminanceLevelDSB + setEnabled(bool) + + + 264 + 197 + + + 359 + 244 + + + + + usescalescheckbox + toggled(bool) + label_range + setEnabled(bool) + + + 57 + 168 + + + 181 + 164 + + + + + usescalescheckbox + toggled(bool) + range2Slider + setEnabled(bool) + + + 91 + 160 + + + 268 + 165 + + + + + usescalescheckbox + toggled(bool) + range2dsb + setEnabled(bool) - 111 - 103 + 77 + 168 + 375 + 172 + + + + + usescalescheckbox + toggled(bool) + label_lowerscale + setEnabled(bool) + + 85 - 105 + 160 + + + 166 + 197 - autoYcheckbox + usescalescheckbox toggled(bool) - rodSlider - setDisabled(bool) + lowerSlider + setEnabled(bool) - 111 - 103 + 94 + 169 - 111 - 105 + 260 + 207 - autoYcheckbox + usescalescheckbox toggled(bool) - conedsb - setDisabled(bool) + lowerdsb + setEnabled(bool) + + + 61 + 163 + + + 371 + 205 + + + + + usescalescheckbox + toggled(bool) + label_upperscale + setEnabled(bool) + + + 49 + 165 + + + 138 + 245 + + + + + usescalescheckbox + toggled(bool) + upperSlider + setEnabled(bool) + + + 58 + 168 + + + 247 + 243 + + + + + usescalescheckbox + toggled(bool) + upperdsb + setEnabled(bool) - 111 - 103 + 50 + 169 - 111 - 105 + 363 + 239 autoYcheckbox toggled(bool) - label_rod + coneSlider setDisabled(bool) - 111 - 103 + 150 + 163 - 85 - 105 + 154 + 211 autoYcheckbox toggled(bool) - roddsb + conedsb setDisabled(bool) - 111 - 103 + 118 + 168 - 111 - 105 + 353 + 197 - luminanceLevelCheckBox + autoYcheckbox toggled(bool) - label_5 - setEnabled(bool) + rodSlider + setDisabled(bool) - 111 - 105 + 108 + 169 - 74 - 105 + 119 + 231 - luminanceLevelCheckBox + autoYcheckbox toggled(bool) - luminanceLevelDSB - setEnabled(bool) + roddsb + setDisabled(bool) - 111 - 105 + 185 + 173 - 111 - 105 + 330 + 238 luminanceLevelCheckBox toggled(bool) - luminanceLevelSlider + label_5 setEnabled(bool) - 111 - 105 + 163 + 198 - 111 - 105 + 67 + 240 - stackedWidget_operators - currentChanged(int) - cmbOperators - setCurrentIndex(int) + simpleCheckBox + toggled(bool) + label_2 + setDisabled(bool) - 184 - 272 + 164 + 86 - 437 - 50 + 94 + 111 - usescalescheckbox + simpleCheckBox toggled(bool) - upperSlider - setEnabled(bool) + eq2RadioButton + setDisabled(bool) - 111 - 105 + 231 + 93 - 111 - 105 + 222 + 117 simpleCheckBox toggled(bool) - contrastSlider + eq4RadioButton setDisabled(bool) - 111 - 105 + 178 + 91 - 111 - 105 + 174 + 147 - usescalescheckbox + simpleCheckBox toggled(bool) - lowerSlider - setEnabled(bool) + label_locatcontrasttreshold + setDisabled(bool) - 111 - 105 + 148 + 96 - 111 - 105 + 119 + 168 - usescalescheckbox + simpleCheckBox toggled(bool) - label_upperscale - setEnabled(bool) + contrastSlider + setDisabled(bool) - 111 - 105 + 251 + 90 - 74 - 105 + 270 + 170 simpleCheckBox toggled(bool) - label_locatcontrasttreshold + contrastdsb setDisabled(bool) - 111 - 105 + 252 + 91 - 79 - 105 + 356 + 169 - usescalescheckbox + autoYcheckbox toggled(bool) - upperdsb - setEnabled(bool) + label_cone + setDisabled(bool) - 111 - 105 + 201 + 171 - 111 - 105 + 65 + 207 - usescalescheckbox + autoYcheckbox toggled(bool) - range2Slider - setEnabled(bool) + label_rod + setDisabled(bool) - 111 - 105 + 235 + 171 - 111 - 105 + 58 + 239 - usescalescheckbox + pattalocal toggled(bool) - lowerdsb - setEnabled(bool) + autoYcheckbox + setDisabled(bool) - 111 - 105 + 103 + 131 - 111 - 105 + 107 + 168 - usescalescheckbox + pattalocal toggled(bool) - range2dsb - setEnabled(bool) + label_cone + setDisabled(bool) - 111 - 105 + 265 + 126 - 111 - 105 + 66 + 192 - usescalescheckbox + pattalocal toggled(bool) - label_range - setEnabled(bool) + coneSlider + setDisabled(bool) - 111 - 105 + 286 + 124 - 74 - 105 + 268 + 202 - cmbOperators - currentIndexChanged(int) - stackedWidget_operators - setCurrentIndex(int) + pattalocal + toggled(bool) + conedsb + setDisabled(bool) - 437 - 50 + 294 + 143 - 224 - 272 + 337 + 206 - usescalescheckbox + pattalocal toggled(bool) - label_lowerscale - setEnabled(bool) + label_rod + setDisabled(bool) - 111 - 105 + 250 + 131 - 74 - 105 + 55 + 234 - simpleCheckBox + pattalocal toggled(bool) - contrastdsb + rodSlider setDisabled(bool) - 111 - 105 + 217 + 144 - 111 - 105 + 203 + 229 pattalocal toggled(bool) - autoYcheckbox + roddsb setDisabled(bool) - 111 - 107 + 259 + 134 - 111 - 103 + 335 + 238 diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingSettings.cpp luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingSettings.cpp --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingSettings.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingSettings.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,55 +22,49 @@ * */ -#include - #include #include #include -#include "Core/TonemappingOptions.h" -#include "PreviewPanel/PreviewLabel.h" -#include "TonemappingSettings.h" -#include "ui_TonemappingSettings.h" +#include +#include +#include +#include -namespace // anoymous namespace +namespace // anoymous namespace { const int PREVIEW_WIDTH = PREVIEW_WIDTH; -const int PREVIEW_HEIGHT = 100; -bool compareByComment(PreviewLabel *l1, PreviewLabel *l2) -{ +bool compareByComment(PreviewLabel *l1, PreviewLabel *l2) { QString s1 = l1->getComment(), s2 = l2->getComment(); return s1 < s2; } -bool compareByOperator(PreviewLabel *l1, PreviewLabel *l2) -{ - TonemappingOptions *opts1 = l1->getTonemappingOptions(), *opts2 = l2->getTonemappingOptions(); +bool compareByOperator(PreviewLabel *l1, PreviewLabel *l2) { + TonemappingOptions *opts1 = l1->getTonemappingOptions(), + *opts2 = l2->getTonemappingOptions(); return opts1->getPostfix() < opts2->getPostfix(); } -bool compareByMostUsefulOperators(PreviewLabel *l1, PreviewLabel *l2) -{ - TonemappingOptions *opts1 = l1->getTonemappingOptions(), *opts2 = l2->getTonemappingOptions(); +bool compareByMostUsefulOperators(PreviewLabel *l1, PreviewLabel *l2) { + TonemappingOptions *opts1 = l1->getTonemappingOptions(), + *opts2 = l2->getTonemappingOptions(); return opts1->getRatingForOperator() < opts2->getRatingForOperator(); } - - } -TonemappingSettings::TonemappingSettings(QWidget *parent, pfs::Frame *frame) : - QDialog(parent), - m_frame(frame), - m_modelPreviews(new QSqlQueryModel()), - m_wantsTonemap(false), - m_Ui(new Ui::TonemappingSettings) -{ +TonemappingSettings::TonemappingSettings(QWidget *parent, pfs::Frame *frame, QString conn) + : QDialog(parent), + m_frame(frame), + m_modelPreviews(new QSqlQueryModel()), + m_wantsTonemap(false), + m_databaseconnection(conn), + m_Ui(new Ui::TonemappingSettings) { m_Ui->setupUi(this); - m_Ui->splitter->setStretchFactor(0,1); - m_Ui->splitter->setStretchFactor(1,10); + m_Ui->splitter->setStretchFactor(0, 1); + m_Ui->splitter->setStretchFactor(1, 10); m_previewSettings = new PreviewSettings(m_Ui->scrollArea); @@ -84,109 +78,138 @@ m_currentIndex = 0; m_Ui->listWidget->setCurrentRow(0); m_previewSettings->selectLabel(0); - } - else - { + } else { m_Ui->applyButton->setDisabled(true); m_Ui->btnTonemap->setDisabled(true); } - sortPreviews(0); // by comment + sortPreviews(0); // by comment - connect(m_Ui->listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(listWidgetChanged(int))); - connect(m_Ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortPreviews(int))); - connect(m_previewSettings, SIGNAL(triggered()), this, SLOT(accept())); + connect(m_Ui->listWidget, &QListWidget::currentRowChanged, this, + &TonemappingSettings::listWidgetChanged); + connect(m_Ui->comboBox, SIGNAL(currentIndexChanged(int)), this, + SLOT(sortPreviews(int))); + connect(m_previewSettings, &PreviewSettings::triggered, this, + &QDialog::accept); } -TonemappingSettings::~TonemappingSettings() -{ - qDeleteAll(m_previewLabelList); -} +TonemappingSettings::~TonemappingSettings() { qDeleteAll(m_previewLabelList); } -void TonemappingSettings::fillPreviews() -{ +void TonemappingSettings::fillPreviews() { int index = 0; + QSqlDatabase db = QSqlDatabase::database(m_databaseconnection); QString sqlQuery; int origxsize = m_frame->getWidth(); - sqlQuery = "SELECT *, 'ashikhmin' AS operator FROM ashikhmin"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = + QStringLiteral("SELECT *, 'ashikhmin' AS operator FROM ashikhmin"); + m_modelPreviews->setQuery(sqlQuery, db); bool simple; bool eq2; float lct; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoAshikhmin = new TonemappingOptions; - simple = m_modelPreviews->record(selectedRow).value("simple").toBool(); - eq2 = m_modelPreviews->record(selectedRow).value("eq2").toBool(); - lct = m_modelPreviews->record(selectedRow).value("lct").toFloat(); + simple = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("simple")) + .toBool(); + eq2 = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("eq2")) + .toBool(); + lct = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("lct")) + .toFloat(); - fillCommonValues(tmoAshikhmin, origxsize, PREVIEW_WIDTH, ashikhmin, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoAshikhmin, origxsize, PREVIEW_WIDTH, ashikhmin, + m_modelPreviews->record(selectedRow)); tmoAshikhmin->operator_options.ashikhminoptions.simple = simple; tmoAshikhmin->operator_options.ashikhminoptions.eq2 = eq2; tmoAshikhmin->operator_options.ashikhminoptions.lct = lct; - addPreview(new PreviewLabel(0, tmoAshikhmin, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoAshikhmin, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'drago' AS operator FROM drago"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = QStringLiteral("SELECT *, 'drago' AS operator FROM drago"); + m_modelPreviews->setQuery(sqlQuery, db); float bias; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoDrago = new TonemappingOptions; - bias = m_modelPreviews->record(selectedRow).value("bias").toFloat(); + bias = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("bias")) + .toFloat(); - fillCommonValues(tmoDrago, origxsize, PREVIEW_WIDTH, drago, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoDrago, origxsize, PREVIEW_WIDTH, drago, + m_modelPreviews->record(selectedRow)); tmoDrago->operator_options.dragooptions.bias = bias; - addPreview(new PreviewLabel(0, tmoDrago, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoDrago, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'durand' AS operator FROM durand"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = QStringLiteral("SELECT *, 'durand' AS operator FROM durand"); + m_modelPreviews->setQuery(sqlQuery, db); - float spatial, - range, - base; + float spatial, range, base; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoDurand = new TonemappingOptions; - spatial = m_modelPreviews->record(selectedRow).value("spatial").toFloat(); - range = m_modelPreviews->record(selectedRow).value("range").toFloat(); - base = m_modelPreviews->record(selectedRow).value("base").toFloat(); + spatial = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("spatial")) + .toFloat(); + range = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("range")) + .toFloat(); + base = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("base")) + .toFloat(); - fillCommonValues(tmoDurand, origxsize, PREVIEW_WIDTH, durand, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoDurand, origxsize, PREVIEW_WIDTH, durand, + m_modelPreviews->record(selectedRow)); tmoDurand->operator_options.durandoptions.spatial = spatial; tmoDurand->operator_options.durandoptions.range = range; tmoDurand->operator_options.durandoptions.base = base; - addPreview(new PreviewLabel(0, tmoDurand, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoDurand, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'fattal' AS operator FROM fattal"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = QStringLiteral("SELECT *, 'fattal' AS operator FROM fattal"); + m_modelPreviews->setQuery(sqlQuery, db); - float alpha, - beta, - colorSat, - noiseReduction; + float alpha, beta, colorSat, noiseReduction; bool fftsolver; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoFattal = new TonemappingOptions; - alpha = m_modelPreviews->record(selectedRow).value("alpha").toFloat(); - beta = m_modelPreviews->record(selectedRow).value("beta").toFloat(); - colorSat = m_modelPreviews->record(selectedRow).value("colorSaturation").toFloat(); - noiseReduction = m_modelPreviews->record(selectedRow).value("noiseReduction").toFloat(); - fftsolver = !m_modelPreviews->record(selectedRow).value("oldFattal").toBool(); + alpha = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("alpha")) + .toFloat(); + beta = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("beta")) + .toFloat(); + colorSat = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("colorSaturation")) + .toFloat(); + noiseReduction = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("noiseReduction")) + .toFloat(); + fftsolver = !m_modelPreviews->record(selectedRow) + .value(QStringLiteral("oldFattal")) + .toBool(); - fillCommonValues(tmoFattal, origxsize, PREVIEW_WIDTH, fattal, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoFattal, origxsize, PREVIEW_WIDTH, fattal, + m_modelPreviews->record(selectedRow)); tmoFattal->operator_options.fattaloptions.alpha = alpha; tmoFattal->operator_options.fattaloptions.beta = beta; @@ -194,96 +217,146 @@ tmoFattal->operator_options.fattaloptions.noiseredux = noiseReduction; tmoFattal->operator_options.fattaloptions.fftsolver = fftsolver; - addPreview(new PreviewLabel(0, tmoFattal, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoFattal, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'ferradans' AS operator FROM ferradans"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = + QStringLiteral("SELECT *, 'ferradans' AS operator FROM ferradans"); + m_modelPreviews->setQuery(sqlQuery, db); - float rho, - inv_alpha; + float rho, inv_alpha; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoFerradans = new TonemappingOptions; - rho = m_modelPreviews->record(selectedRow).value("rho").toFloat(); - inv_alpha = m_modelPreviews->record(selectedRow).value("inv_alpha").toFloat(); + rho = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("rho")) + .toFloat(); + inv_alpha = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("inv_alpha")) + .toFloat(); - fillCommonValues(tmoFerradans, origxsize, PREVIEW_WIDTH, ferradans, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoFerradans, origxsize, PREVIEW_WIDTH, ferradans, + m_modelPreviews->record(selectedRow)); tmoFerradans->operator_options.ferradansoptions.rho = rho; tmoFerradans->operator_options.ferradansoptions.inv_alpha = inv_alpha; - addPreview(new PreviewLabel(0, tmoFerradans, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoFerradans, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'mantiuk06' AS operator FROM mantiuk06"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = + QStringLiteral("SELECT *, 'mantiuk06' AS operator FROM mantiuk06"); + m_modelPreviews->setQuery(sqlQuery, db); bool contrastEqualization; float contrastFactor; float saturationFactor; float detailFactor; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoMantiuk06 = new TonemappingOptions; - contrastEqualization = m_modelPreviews->record(selectedRow).value("contrastEqualization").toBool(); - contrastFactor = m_modelPreviews->record(selectedRow).value("contrastFactor").toFloat(); - saturationFactor = m_modelPreviews->record(selectedRow).value("saturationFactor").toFloat(); - detailFactor = m_modelPreviews->record(selectedRow).value("detailFactor").toFloat(); - - fillCommonValues(tmoMantiuk06, origxsize, PREVIEW_WIDTH, mantiuk06, m_modelPreviews->record(selectedRow)); - - tmoMantiuk06->operator_options.mantiuk06options.contrastfactor = contrastFactor; - tmoMantiuk06->operator_options.mantiuk06options.saturationfactor = saturationFactor; - tmoMantiuk06->operator_options.mantiuk06options.detailfactor = detailFactor; - tmoMantiuk06->operator_options.mantiuk06options.contrastequalization = contrastEqualization; + contrastEqualization = + m_modelPreviews->record(selectedRow) + .value(QStringLiteral("contrastEqualization")) + .toBool(); + contrastFactor = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("contrastFactor")) + .toFloat(); + saturationFactor = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("saturationFactor")) + .toFloat(); + detailFactor = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("detailFactor")) + .toFloat(); + + fillCommonValues(tmoMantiuk06, origxsize, PREVIEW_WIDTH, mantiuk06, + m_modelPreviews->record(selectedRow)); + + tmoMantiuk06->operator_options.mantiuk06options.contrastfactor = + contrastFactor; + tmoMantiuk06->operator_options.mantiuk06options.saturationfactor = + saturationFactor; + tmoMantiuk06->operator_options.mantiuk06options.detailfactor = + detailFactor; + tmoMantiuk06->operator_options.mantiuk06options.contrastequalization = + contrastEqualization; + + addPreview(new PreviewLabel(0, tmoMantiuk06, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'mantiuk08' AS operator FROM mantiuk08"); + m_modelPreviews->setQuery(sqlQuery, db); - addPreview(new PreviewLabel(0, tmoMantiuk06, index++), m_modelPreviews->record(selectedRow)); - } - - sqlQuery = "SELECT *, 'mantiuk08' AS operator FROM mantiuk08"; - m_modelPreviews->setQuery(sqlQuery); - - float colorSaturation, - contrastEnhancement, - luminanceLevel; + float colorSaturation, contrastEnhancement, luminanceLevel; bool manualLuminanceLevel; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoMantiuk08 = new TonemappingOptions; - colorSaturation = m_modelPreviews->record(selectedRow).value("colorSaturation").toFloat(); - contrastEnhancement = m_modelPreviews->record(selectedRow).value("contrastEnhancement").toFloat(); - luminanceLevel = m_modelPreviews->record(selectedRow).value("luminanceLevel").toFloat(); - manualLuminanceLevel = m_modelPreviews->record(selectedRow).value("manualLuminanceLevel").toBool(); - - fillCommonValues(tmoMantiuk08, origxsize, PREVIEW_WIDTH, mantiuk08, m_modelPreviews->record(selectedRow)); - - tmoMantiuk08->operator_options.mantiuk08options.colorsaturation = colorSaturation; - tmoMantiuk08->operator_options.mantiuk08options.contrastenhancement = contrastEnhancement; - tmoMantiuk08->operator_options.mantiuk08options.luminancelevel = luminanceLevel; - tmoMantiuk08->operator_options.mantiuk08options.setluminance = manualLuminanceLevel; - - addPreview(new PreviewLabel(0, tmoMantiuk08, index++), m_modelPreviews->record(selectedRow)); - } - - sqlQuery = "SELECT *, 'pattanaik' AS operator FROM pattanaik"; - m_modelPreviews->setQuery(sqlQuery); + colorSaturation = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("colorSaturation")) + .toFloat(); + contrastEnhancement = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("contrastEnhancement")) + .toFloat(); + luminanceLevel = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("luminanceLevel")) + .toFloat(); + manualLuminanceLevel = + m_modelPreviews->record(selectedRow) + .value(QStringLiteral("manualLuminanceLevel")) + .toBool(); + + fillCommonValues(tmoMantiuk08, origxsize, PREVIEW_WIDTH, mantiuk08, + m_modelPreviews->record(selectedRow)); + + tmoMantiuk08->operator_options.mantiuk08options.colorsaturation = + colorSaturation; + tmoMantiuk08->operator_options.mantiuk08options.contrastenhancement = + contrastEnhancement; + tmoMantiuk08->operator_options.mantiuk08options.luminancelevel = + luminanceLevel; + tmoMantiuk08->operator_options.mantiuk08options.setluminance = + manualLuminanceLevel; + + addPreview(new PreviewLabel(0, tmoMantiuk08, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'pattanaik' AS operator FROM pattanaik"); + m_modelPreviews->setQuery(sqlQuery, db); - float multiplier, - rod, - cone; - bool autolum, - local; + float multiplier, rod, cone; + bool autolum, local; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoPattanaik = new TonemappingOptions; - multiplier = m_modelPreviews->record(selectedRow).value("multiplier").toFloat(); - rod = m_modelPreviews->record(selectedRow).value("rod").toFloat(); - cone = m_modelPreviews->record(selectedRow).value("cone").toFloat(); - autolum = m_modelPreviews->record(selectedRow).value("autolum").toBool(); - local = m_modelPreviews->record(selectedRow).value("local").toBool(); + multiplier = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("multiplier")) + .toFloat(); + rod = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("rod")) + .toFloat(); + cone = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("cone")) + .toFloat(); + autolum = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("autolum")) + .toBool(); + local = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("local")) + .toBool(); - fillCommonValues(tmoPattanaik, origxsize, PREVIEW_WIDTH, pattanaik, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoPattanaik, origxsize, PREVIEW_WIDTH, pattanaik, + m_modelPreviews->record(selectedRow)); tmoPattanaik->operator_options.pattanaikoptions.autolum = autolum; tmoPattanaik->operator_options.pattanaikoptions.local = local; @@ -291,29 +364,42 @@ tmoPattanaik->operator_options.pattanaikoptions.rod = rod; tmoPattanaik->operator_options.pattanaikoptions.multiplier = multiplier; - addPreview(new PreviewLabel(0, tmoPattanaik, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoPattanaik, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'reinhard02' AS operator FROM reinhard02"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = + QStringLiteral("SELECT *, 'reinhard02' AS operator FROM reinhard02"); + m_modelPreviews->setQuery(sqlQuery, db); bool scales; - float key, - phi; - int irange, - lower, - upper; + float key, phi; + int irange, lower, upper; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoReinhard02 = new TonemappingOptions; - scales = m_modelPreviews->record(selectedRow).value("scales").toBool(); - key = m_modelPreviews->record(selectedRow).value("key").toFloat(); - phi = m_modelPreviews->record(selectedRow).value("phi").toFloat(); - irange = m_modelPreviews->record(selectedRow).value("range").toInt(); - lower = m_modelPreviews->record(selectedRow).value("lower").toInt(); - upper = m_modelPreviews->record(selectedRow).value("upper").toInt(); + scales = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("scales")) + .toBool(); + key = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("key")) + .toFloat(); + phi = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("phi")) + .toFloat(); + irange = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("range")) + .toInt(); + lower = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("lower")) + .toInt(); + upper = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("upper")) + .toInt(); - fillCommonValues(tmoReinhard02, origxsize, PREVIEW_WIDTH, reinhard02, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoReinhard02, origxsize, PREVIEW_WIDTH, reinhard02, + m_modelPreviews->record(selectedRow)); tmoReinhard02->operator_options.reinhard02options.scales = scales; tmoReinhard02->operator_options.reinhard02options.key = key; @@ -322,54 +408,177 @@ tmoReinhard02->operator_options.reinhard02options.lower = lower; tmoReinhard02->operator_options.reinhard02options.upper = upper; - addPreview(new PreviewLabel(0, tmoReinhard02, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoReinhard02, index++), + m_modelPreviews->record(selectedRow)); } - sqlQuery = "SELECT *, 'reinhard05' AS operator FROM reinhard05"; - m_modelPreviews->setQuery(sqlQuery); + sqlQuery = + QStringLiteral("SELECT *, 'reinhard05' AS operator FROM reinhard05"); + m_modelPreviews->setQuery(sqlQuery, db); - float brightness, - chromaticAdaptation, - lightAdaptation; + float brightness, chromaticAdaptation, lightAdaptation; - for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { TonemappingOptions *tmoReinhard05 = new TonemappingOptions; - brightness = m_modelPreviews->record(selectedRow).value("brightness").toFloat(); - chromaticAdaptation = m_modelPreviews->record(selectedRow).value("chromaticAdaptation").toFloat(); - lightAdaptation = m_modelPreviews->record(selectedRow).value("lightAdaptation").toFloat(); + brightness = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("brightness")) + .toFloat(); + chromaticAdaptation = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("chromaticAdaptation")) + .toFloat(); + lightAdaptation = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("lightAdaptation")) + .toFloat(); + + fillCommonValues(tmoReinhard05, origxsize, PREVIEW_WIDTH, reinhard05, + m_modelPreviews->record(selectedRow)); + + tmoReinhard05->operator_options.reinhard05options.brightness = + brightness; + tmoReinhard05->operator_options.reinhard05options.chromaticAdaptation = + chromaticAdaptation; + tmoReinhard05->operator_options.reinhard05options.lightAdaptation = + lightAdaptation; + + addPreview(new PreviewLabel(0, tmoReinhard05, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'ferwerda' AS operator FROM ferwerda"); + m_modelPreviews->setQuery(sqlQuery, db); + + float mul, adapt_lum; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { + TonemappingOptions *tmoFerwerda96 = new TonemappingOptions; + mul = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("maxlum")) + .toFloat(); + adapt_lum = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("adaptlum")) + .toFloat(); + + fillCommonValues(tmoFerwerda96, origxsize, PREVIEW_WIDTH, ferwerda, + m_modelPreviews->record(selectedRow)); + + tmoFerwerda96->operator_options.ferwerdaoptions.multiplier = + mul; + tmoFerwerda96->operator_options.ferwerdaoptions.adaptationluminance = + adapt_lum; + + addPreview(new PreviewLabel(0, tmoFerwerda96, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'kimkautz' AS operator FROM kimkautz"); + m_modelPreviews->setQuery(sqlQuery, db); + + float kk_c1, kk_c2; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { + TonemappingOptions *tmoKimKautz08 = new TonemappingOptions; + kk_c1 = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("kk_c1")) + .toFloat(); + kk_c2 = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("kk_c2")) + .toFloat(); + + fillCommonValues(tmoKimKautz08, origxsize, PREVIEW_WIDTH, kimkautz, + m_modelPreviews->record(selectedRow)); + + tmoKimKautz08->operator_options.kimkautzoptions.c1 = + kk_c1; + tmoKimKautz08->operator_options.kimkautzoptions.c2 = + kk_c2; + + addPreview(new PreviewLabel(0, tmoKimKautz08, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'vanhateren' AS operator FROM vanhateren"); + m_modelPreviews->setQuery(sqlQuery, db); + + float pupil_area; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { + TonemappingOptions *tmoVanHateren06 = new TonemappingOptions; + pupil_area = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("pupil_area")) + .toFloat(); + + fillCommonValues(tmoVanHateren06, origxsize, PREVIEW_WIDTH, vanhateren, + m_modelPreviews->record(selectedRow)); + + tmoVanHateren06->operator_options.vanhaterenoptions.pupil_area = + pupil_area; + + addPreview(new PreviewLabel(0, tmoVanHateren06, index++), + m_modelPreviews->record(selectedRow)); + } + + sqlQuery = + QStringLiteral("SELECT *, 'lischinski' AS operator FROM lischinski"); + m_modelPreviews->setQuery(sqlQuery, db); + + float lischinski_alpha; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); + selectedRow++) { + TonemappingOptions *tmoLischinski06 = new TonemappingOptions; + lischinski_alpha = m_modelPreviews->record(selectedRow) + .value(QStringLiteral("alpha")) + .toFloat(); - fillCommonValues(tmoReinhard05, origxsize, PREVIEW_WIDTH, reinhard05, m_modelPreviews->record(selectedRow)); + fillCommonValues(tmoLischinski06, origxsize, PREVIEW_WIDTH, lischinski, + m_modelPreviews->record(selectedRow)); - tmoReinhard05->operator_options.reinhard05options.brightness = brightness; - tmoReinhard05->operator_options.reinhard05options.chromaticAdaptation = chromaticAdaptation; - tmoReinhard05->operator_options.reinhard05options.lightAdaptation = lightAdaptation; + tmoLischinski06->operator_options.lischinskioptions.alpha = + lischinski_alpha; - addPreview(new PreviewLabel(0, tmoReinhard05, index++), m_modelPreviews->record(selectedRow)); + addPreview(new PreviewLabel(0, tmoLischinski06, index++), + m_modelPreviews->record(selectedRow)); } m_previewSettings->updatePreviews(m_frame); } -void TonemappingSettings::addPreview(PreviewLabel* previewLabel, const QSqlRecord& record) -{ - QString comment = record.value("comment").toString(); +void TonemappingSettings::addPreview(PreviewLabel *previewLabel, + const QSqlRecord &record) { + QString comment = record.value(QStringLiteral("comment")).toString(); m_previewLabelList.append(previewLabel); previewLabel->setComment(comment); - connect(previewLabel, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); - connect(previewLabel, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); - connect(previewLabel, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + connect(previewLabel, SIGNAL(clicked(int)), m_previewSettings, + SLOT(selectLabel(int))); + connect(previewLabel, SIGNAL(clicked(int)), this, + SLOT(updateListView(int))); + connect(previewLabel, SIGNAL(clicked(TonemappingOptions *)), this, + SLOT(tonemapPreview(TonemappingOptions *))); m_previewSettings->addPreviewLabel(previewLabel); m_Ui->listWidget->addItem(comment); } -void TonemappingSettings::fillCommonValues(TonemappingOptions * tmOptions, int origxsize, int previewWidth, TMOperator tOperator, const QSqlRecord& record) -{ - float pregamma = record.value("pregamma").toFloat(); +void TonemappingSettings::fillCommonValues(TonemappingOptions *tmOptions, + int origxsize, int previewWidth, + TMOperator tOperator, + const QSqlRecord &record) { + float pregamma = record.value(QStringLiteral("pregamma")).toFloat(); + float postsaturation = record.value(QStringLiteral("postsaturation")).toFloat(); + float postgamma = record.value(QStringLiteral("postgamma")).toFloat(); tmOptions->origxsize = origxsize; tmOptions->xsize = previewWidth; tmOptions->pregamma = pregamma; + tmOptions->postsaturation = postsaturation; + tmOptions->postgamma = postgamma; tmOptions->tmoperator = tOperator; } @@ -384,7 +593,8 @@ } TonemappingOptions *TonemappingSettings::getTonemappingOptions() { - return m_previewSettings->getPreviewLabel(m_currentIndex)->getTonemappingOptions(); + return m_previewSettings->getPreviewLabel(m_currentIndex) + ->getTonemappingOptions(); } void TonemappingSettings::sortPreviews(int index) { @@ -398,13 +608,13 @@ switch (index) { case 0: std::sort(l.begin(), l.end(), compareByComment); - break; + break; case 1: std::sort(l.begin(), l.end(), compareByOperator); - break; + break; case 2: std::sort(l.begin(), l.end(), compareByMostUsefulOperators); - break; + break; } for (int i = 0; i < listSize; i++) { PreviewLabel *pl = l.at(i); @@ -417,14 +627,12 @@ m_currentIndex = 0; } -void TonemappingSettings::tonemapPreview(TonemappingOptions* opt) -{ - m_wantsTonemap = true; +void TonemappingSettings::tonemapPreview(TonemappingOptions *opt) { + m_wantsTonemap = true; accept(); } -void TonemappingSettings::on_btnTonemap_clicked() -{ - m_wantsTonemap = true; +void TonemappingSettings::on_btnTonemap_clicked() { + m_wantsTonemap = true; accept(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingSettings.h luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingSettings.h --- luminance-hdr-2.5.1+dfsg/src/TonemappingPanel/TonemappingSettings.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TonemappingPanel/TonemappingSettings.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,46 +28,46 @@ #include #include -#include "Core/TonemappingOptions.h" +#include +#include +#include -#include "PreviewSettings/PreviewSettings.h" -#include "Libpfs/frame.h" - -namespace Ui -{ - class TonemappingSettings; +namespace Ui { +class TonemappingSettings; } -class TonemappingSettings: public QDialog -{ +class TonemappingSettings : public QDialog { Q_OBJECT -public: - TonemappingSettings(QWidget *parent = 0, pfs::Frame *frame = NULL); + public: + TonemappingSettings(QWidget *parent = 0, pfs::Frame *frame = NULL, QString databaseconnection = ""); ~TonemappingSettings(); - TonemappingOptions * getTonemappingOptions(); + TonemappingOptions *getTonemappingOptions(); bool wantsTonemap() { return m_wantsTonemap; } -protected: + protected: void fillPreviews(); pfs::Frame *m_frame; - PreviewSettings* m_previewSettings; - QSqlQueryModel* m_modelPreviews; + PreviewSettings *m_previewSettings; + QScopedPointer m_modelPreviews; int m_currentIndex; QList m_previewLabelList; bool m_wantsTonemap; + QString m_databaseconnection; QScopedPointer m_Ui; -protected Q_SLOTS: + protected Q_SLOTS: void listWidgetChanged(int row); void updateListView(int); void sortPreviews(int); void tonemapPreview(TonemappingOptions *); void on_btnTonemap_clicked(); -private: - void addPreview(PreviewLabel* previewLabel, const QSqlRecord& record); - void fillCommonValues(TonemappingOptions * tmOptions, int origxsize, int previewWidth, TMOperator tOperator, const QSqlRecord& record); + private: + void addPreview(PreviewLabel *previewLabel, const QSqlRecord &record); + void fillCommonValues(TonemappingOptions *tmOptions, int origxsize, + int previewWidth, TMOperator tOperator, + const QSqlRecord &record); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/TransplantExif/CMakeLists.txt luminance-hdr-2.6.0/src/TransplantExif/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/TransplantExif/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TransplantExif/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -10,8 +10,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(transplantexif ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(transplantexif Core Gui Widgets) +ADD_LIBRARY(transplantexif STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +TARGET_LINK_LIBRARIES(transplantexif Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} transplantexif PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/TransplantExif/TransplantExifDialog.cpp luminance-hdr-2.6.0/src/TransplantExif/TransplantExifDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/TransplantExif/TransplantExifDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TransplantExif/TransplantExifDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,57 +22,76 @@ */ #include -#include #include -#include +#include #include +#include +#include +// Make sure an EXIV2_TEST_VERSION macro exists: +#ifdef EXIV2_VERSION +# ifndef EXIV2_TEST_VERSION +# define EXIV2_TEST_VERSION(major,minor,patch) \ + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) ) +# endif +#else +# define EXIV2_TEST_VERSION(major,minor,patch) (false) +#endif -#include "Common/global.h" #include "Common/config.h" +#include "Common/global.h" #include "Exif/ExifOperations.h" -#include "TransplantExifDialog.h" -#include "ui_TransplantExifDialog.h" +#include "TransplantExif/TransplantExifDialog.h" +#include "TransplantExif/ui_TransplantExifDialog.h" -TransplantExifDialog::TransplantExifDialog(QWidget *p): - QDialog(p), - start_left(-1), - stop_left(-1), - start_right(-1), - stop_right(-1), - done(false), - m_Ui(new Ui::TransplantExifDialog) -{ +TransplantExifDialog::TransplantExifDialog(QWidget *p) + : QDialog(p), + start_left(-1), + stop_left(-1), + start_right(-1), + stop_right(-1), + done(false), + m_Ui(new Ui::TransplantExifDialog) { m_Ui->setupUi(this); m_Ui->progressBar->hide(); - if ( !QIcon::hasThemeIcon("arrow-up") ) - { + if (!QIcon::hasThemeIcon(QStringLiteral("arrow-up"))) { m_Ui->moveup_right_button->setIcon(QIcon(":/program-icons/arrow-up")); m_Ui->moveup_left_button->setIcon(QIcon(":/program-icons/arrow-up")); } - if ( !QIcon::hasThemeIcon("arrow-down") ) - { - m_Ui->movedown_right_button->setIcon(QIcon(":/program-icons/arrow-down")); - m_Ui->movedown_left_button->setIcon(QIcon(":/program-icons/arrow-down")); + if (!QIcon::hasThemeIcon(QStringLiteral("arrow-down"))) { + m_Ui->movedown_right_button->setIcon( + QIcon(":/program-icons/arrow-down")); + m_Ui->movedown_left_button->setIcon( + QIcon(":/program-icons/arrow-down")); } - m_Ui->Log_Widget->setWordWrap(true); - connect(m_Ui->moveup_left_button, SIGNAL(clicked()),this,SLOT(moveup_left())); - connect(m_Ui->moveup_right_button, SIGNAL(clicked()),this,SLOT(moveup_right())); - connect(m_Ui->movedown_left_button, SIGNAL(clicked()),this,SLOT(movedown_left())); - connect(m_Ui->movedown_right_button, SIGNAL(clicked()),this,SLOT(movedown_right())); - connect(m_Ui->removeleft, SIGNAL(clicked()),this,SLOT(remove_left())); - connect(m_Ui->removeright, SIGNAL(clicked()),this,SLOT(remove_right())); - connect(m_Ui->addleft, SIGNAL(clicked()),this,SLOT(append_left())); - connect(m_Ui->addright, SIGNAL(clicked()),this,SLOT(append_right())); - connect(m_Ui->TransplantButton, SIGNAL(clicked()),this,SLOT(transplant_requested())); - /* connect(HelpButton, SIGNAL(clicked()),this,SLOT(help_requested())); */ - - connect(m_Ui->filterComboBox, SIGNAL(activated(int)), this, SLOT(filterComboBoxActivated(int))); - connect(m_Ui->filterLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(filterChanged(const QString&))); + connect(m_Ui->moveup_left_button, &QAbstractButton::clicked, this, + &TransplantExifDialog::moveup_left); + connect(m_Ui->moveup_right_button, &QAbstractButton::clicked, this, + &TransplantExifDialog::moveup_right); + connect(m_Ui->movedown_left_button, &QAbstractButton::clicked, this, + &TransplantExifDialog::movedown_left); + connect(m_Ui->movedown_right_button, &QAbstractButton::clicked, this, + &TransplantExifDialog::movedown_right); + connect(m_Ui->removeleft, &QAbstractButton::clicked, this, + &TransplantExifDialog::remove_left); + connect(m_Ui->removeright, &QAbstractButton::clicked, this, + &TransplantExifDialog::remove_right); + connect(m_Ui->addleft, &QAbstractButton::clicked, this, + &TransplantExifDialog::append_left); + connect(m_Ui->addright, &QAbstractButton::clicked, this, + &TransplantExifDialog::append_right); + connect(m_Ui->TransplantButton, &QAbstractButton::clicked, this, + &TransplantExifDialog::transplant_requested); + /* connect(HelpButton, SIGNAL(clicked()),this,SLOT(help_requested())); */ + + connect(m_Ui->filterComboBox, SIGNAL(activated(int)), this, + SLOT(filterComboBoxActivated(int))); + connect(m_Ui->filterLineEdit, &QLineEdit::textChanged, this, + &TransplantExifDialog::filterChanged); full_Log_Model = new QStringListModel(); log_filter = new QSortFilterProxyModel(this); log_filter->setDynamicSortFilter(true); @@ -80,12 +99,15 @@ m_Ui->Log_Widget->setModel(log_filter); // TODO: clean up this implementation: this guys should not be here - RecentDirEXIFfrom = luminance_options.value(KEY_RECENT_PATH_EXIF_FROM,QDir::currentPath()).toString(); - RecentDirEXIFto = luminance_options.value(KEY_RECENT_PATH_EXIF_TO,QDir::currentPath()).toString(); + RecentDirEXIFfrom = + luminance_options.value(KEY_RECENT_PATH_EXIF_FROM, QDir::currentPath()) + .toString(); + RecentDirEXIFto = + luminance_options.value(KEY_RECENT_PATH_EXIF_TO, QDir::currentPath()) + .toString(); } -TransplantExifDialog::~TransplantExifDialog() -{ +TransplantExifDialog::~TransplantExifDialog() { m_Ui->leftlist->clear(); m_Ui->rightlist->clear(); @@ -93,185 +115,209 @@ delete log_filter; } -//TODO +// TODO void TransplantExifDialog::help_requested() { -/* QDialog *help=new QDialog(); - help->setAttribute(Qt::WA_DeleteOnClose); - Ui::HelpDialog ui; - ui.setupUi(help); - ui.tb->setSearchPaths(QStringList("/usr/share/luminance/html") << "/usr/local/share/luminance/html" << "./html"); - ui.tb->setSource(QUrl("manual.html#copyexif")); - help->exec();*/ + /* QDialog *help=new QDialog(); + help->setAttribute(Qt::WA_DeleteOnClose); + Ui::HelpDialog ui; + ui.setupUi(help); + ui.tb->setSearchPaths(QStringList("/usr/share/luminance/html") << + "/usr/local/share/luminance/html" << "./html"); + ui.tb->setSource(QUrl("manual.html#copyexif")); + help->exec();*/ } - void TransplantExifDialog::updateinterval(bool left) { if (left) { - start_left=m_Ui->leftlist->count(); - stop_left=-1; - for (int i=0; ileftlist->count(); i++) { + start_left = m_Ui->leftlist->count(); + stop_left = -1; + for (int i = 0; i < m_Ui->leftlist->count(); i++) { if (m_Ui->leftlist->isItemSelected(m_Ui->leftlist->item(i))) { - start_left= (start_left>i) ? i : start_left; - stop_left= (stop_left i) ? i : start_left; + stop_left = (stop_left < i) ? i : stop_left; } } -// qDebug("L %d-%d",start_left,stop_left); + // qDebug("L %d-%d",start_left,stop_left); } else { - start_right=m_Ui->rightlist->count(); - stop_right=-1; - for (int i=0; irightlist->count(); i++) - { - if (m_Ui->rightlist->isItemSelected(m_Ui->rightlist->item(i))) - { - start_right = (start_right>i) ? i : start_right; - stop_right = (stop_rightrightlist->count(); + stop_right = -1; + for (int i = 0; i < m_Ui->rightlist->count(); i++) { + if (m_Ui->rightlist->isItemSelected(m_Ui->rightlist->item(i))) { + start_right = (start_right > i) ? i : start_right; + stop_right = (stop_right < i) ? i : stop_right; } } -// qDebug("R %d-%d",start_right,stop_right); + // qDebug("R %d-%d",start_right,stop_right); } } void TransplantExifDialog::moveup_left() { updateinterval(true); - if (m_Ui->leftlist->count()==0 || start_left==-1 || stop_left==-1 || start_left==0) + if (m_Ui->leftlist->count() == 0 || start_left == -1 || stop_left == -1 || + start_left == 0) return; //"VIEW" - //copy the before-first element to the past-end of the selection - m_Ui->leftlist->insertItem(stop_left+1,QFileInfo(from.at(start_left-1)).fileName()); - //remove the before-first element - m_Ui->leftlist->takeItem(start_left-1); + // copy the before-first element to the past-end of the selection + m_Ui->leftlist->insertItem(stop_left + 1, + QFileInfo(from.at(start_left - 1)).fileName()); + // remove the before-first element + m_Ui->leftlist->takeItem(start_left - 1); //"MODEL" - from.insert(stop_left+1,from.at(start_left-1)); - from.removeAt(start_left-1); + from.insert(stop_left + 1, from.at(start_left - 1)); + from.removeAt(start_left - 1); start_left--; stop_left--; } void TransplantExifDialog::moveup_right() { updateinterval(false); - if (m_Ui->rightlist->count()==0 || start_right==-1 || stop_right==-1 || start_right==0) + if (m_Ui->rightlist->count() == 0 || start_right == -1 || + stop_right == -1 || start_right == 0) return; //"VIEW" - //copy the before-first element to the past-end of the selection - m_Ui->rightlist->insertItem(stop_right+1,QFileInfo(to.at(start_right-1)).fileName()); - //remove the before-first element - m_Ui->rightlist->takeItem(start_right-1); + // copy the before-first element to the past-end of the selection + m_Ui->rightlist->insertItem(stop_right + 1, + QFileInfo(to.at(start_right - 1)).fileName()); + // remove the before-first element + m_Ui->rightlist->takeItem(start_right - 1); //"MODEL" - to.insert(stop_right+1,to.at(start_right-1)); - to.removeAt(start_right-1); + to.insert(stop_right + 1, to.at(start_right - 1)); + to.removeAt(start_right - 1); start_right--; stop_right--; } void TransplantExifDialog::movedown_left() { updateinterval(true); - if (m_Ui->leftlist->count()==0 || start_left==-1 || stop_left==-1 || stop_left==m_Ui->leftlist->count()-1) + if (m_Ui->leftlist->count() == 0 || start_left == -1 || stop_left == -1 || + stop_left == m_Ui->leftlist->count() - 1) return; //"VIEW" - //copy the past-end to the before-first element of the selection - m_Ui->leftlist->insertItem(start_left,QFileInfo(from.at(stop_left+1)).fileName()); - //remove the past-end - m_Ui->leftlist->takeItem(stop_left+2); + // copy the past-end to the before-first element of the selection + m_Ui->leftlist->insertItem(start_left, + QFileInfo(from.at(stop_left + 1)).fileName()); + // remove the past-end + m_Ui->leftlist->takeItem(stop_left + 2); //"MODEL" - from.insert(start_left,from.at(stop_left+1)); - from.removeAt(stop_left+2); + from.insert(start_left, from.at(stop_left + 1)); + from.removeAt(stop_left + 2); start_left++; stop_left++; } void TransplantExifDialog::movedown_right() { updateinterval(false); - if (m_Ui->rightlist->count()==0 || start_right==-1 || stop_right==-1 || stop_right==m_Ui->rightlist->count()-1) + if (m_Ui->rightlist->count() == 0 || start_right == -1 || + stop_right == -1 || stop_right == m_Ui->rightlist->count() - 1) return; //"VIEW" - //copy the past-end to the before-first element of the selection - m_Ui->rightlist->insertItem(start_right,QFileInfo(to.at(stop_right+1)).fileName()); - //remove the past-end - m_Ui->rightlist->takeItem(stop_right+2); + // copy the past-end to the before-first element of the selection + m_Ui->rightlist->insertItem(start_right, + QFileInfo(to.at(stop_right + 1)).fileName()); + // remove the past-end + m_Ui->rightlist->takeItem(stop_right + 2); //"MODEL" - to.insert(start_right,to.at(stop_right+1)); - to.removeAt(stop_right+2); + to.insert(start_right, to.at(stop_right + 1)); + to.removeAt(stop_right + 2); start_right++; stop_right++; } void TransplantExifDialog::remove_left() { updateinterval(true); - if (m_Ui->leftlist->count()==0 || start_left==-1 || stop_left==-1) + if (m_Ui->leftlist->count() == 0 || start_left == -1 || stop_left == -1) return; - for (int i=stop_left-start_left+1; i>0; i--) { + for (int i = stop_left - start_left + 1; i > 0; i--) { m_Ui->leftlist->takeItem(start_left); from.removeAt(start_left); } - start_left=stop_left=-1; - m_Ui->TransplantButton->setEnabled( m_Ui->leftlist->count()==m_Ui->rightlist->count() && m_Ui->rightlist->count()!=0 ); + start_left = stop_left = -1; + m_Ui->TransplantButton->setEnabled(m_Ui->leftlist->count() == + m_Ui->rightlist->count() && + m_Ui->rightlist->count() != 0); } -void TransplantExifDialog::remove_right() -{ +void TransplantExifDialog::remove_right() { updateinterval(false); - if (m_Ui->rightlist->count()==0 || start_right==-1 || stop_right==-1) + if (m_Ui->rightlist->count() == 0 || start_right == -1 || stop_right == -1) return; - for (int i=stop_right-start_right+1; i>0; i--) { + for (int i = stop_right - start_right + 1; i > 0; i--) { m_Ui->rightlist->takeItem(start_right); to.removeAt(start_right); } - start_right=stop_right=-1; - m_Ui->TransplantButton->setEnabled( (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && (m_Ui->rightlist->count() != 0) ); + start_right = stop_right = -1; + m_Ui->TransplantButton->setEnabled( + (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && + (m_Ui->rightlist->count() != 0)); } void TransplantExifDialog::append_left() { QString filetypes = tr("All Supported formats"); - filetypes += " (*.jpeg *.jpg *.tif *.tiff *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.ptx *.pef *.x3f *.raw *.rw2 *.sr2 " - "*.JPEG *.JPG *.TIF *.TIFF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.PTX *.PEF *.X3F *.RAW *.RW2 *.SR2)"; - QStringList files = QFileDialog::getOpenFileNames(this, tr("Select the input images"), RecentDirEXIFfrom, filetypes ); + filetypes += + " (*.jpeg *.jpg *.tif *.tiff *.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc " + "*.dcr *.arw *.ptx *.pef *.x3f *.raw *.rw2 *.sr2 " + "*.JPEG *.JPG *.TIF *.TIFF *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC " + "*.DCR *.ARW *.PTX *.PEF *.X3F *.RAW *.RW2 *.SR2)"; + QStringList files = QFileDialog::getOpenFileNames( + this, tr("Select the input images"), RecentDirEXIFfrom, filetypes); if (!files.isEmpty()) { QFileInfo qfi(files.at(0)); - // if the new dir, the one just chosen by the user, is different from the one stored in the settings, update the luminance_options. + // if the new dir, the one just chosen by the user, is different from + // the + // one stored in the settings, update the luminance_options. if (RecentDirEXIFfrom != qfi.path()) { // update internal field variable - RecentDirEXIFfrom=qfi.path(); - luminance_options.setValue(KEY_RECENT_PATH_EXIF_FROM, RecentDirEXIFfrom); + RecentDirEXIFfrom = qfi.path(); + luminance_options.setValue(KEY_RECENT_PATH_EXIF_FROM, + RecentDirEXIFfrom); } QStringList::Iterator it = files.begin(); - while ( it != files.end() ) - { + while (it != files.end()) { QFileInfo *qfi = new QFileInfo(*it); - m_Ui->leftlist->addItem( qfi->fileName() ); //fill graphical list + m_Ui->leftlist->addItem(qfi->fileName()); // fill graphical list ++it; delete qfi; } - from += files; // add the new files to the "model" - m_Ui->TransplantButton->setEnabled( (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && (m_Ui->rightlist->count() != 0) ); + from += files; // add the new files to the "model" + m_Ui->TransplantButton->setEnabled( + (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && + (m_Ui->rightlist->count() != 0)); } } void TransplantExifDialog::append_right() { - QString filetypes = tr("All Supported formats") - + " (*.jpeg *.jpg *.JPEG *.JPG " -#if EXIV2_TEST_VERSION(0,18,0) - + "*.tif *.tiff *.TIF *.TIFF " + QString filetypes = tr("All Supported formats") + + " (*.jpeg *.jpg *.JPEG *.JPG " +#if EXIV2_TEST_VERSION(0, 18, 0) + + "*.tif *.tiff *.TIF *.TIFF " #endif - + "*.crw *.orf *.kdc *.dcr *.ptx *.x3f *.CRW *.ORF *.KDC *.DCR *.PTX *.X3F)"; - QStringList files = QFileDialog::getOpenFileNames(this, tr("Select the input images"), RecentDirEXIFto, filetypes ); + + + "*.crw *.orf *.kdc *.dcr *.ptx *.x3f *.CRW *.ORF *.KDC " + "*.DCR *.PTX *.X3F)"; + QStringList files = QFileDialog::getOpenFileNames( + this, tr("Select the input images"), RecentDirEXIFto, filetypes); if (!files.isEmpty()) { QFileInfo qfi(files.at(0)); - // if the new dir, the one just chosen by the user, is different from the one stored in the settings, update the luminance_options. + // if the new dir, the one just chosen by the user, is different from + // the + // one stored in the settings, update the luminance_options. if (RecentDirEXIFto != qfi.path()) { // update internal field variable - RecentDirEXIFto=qfi.path(); - luminance_options.setValue(KEY_RECENT_PATH_EXIF_TO, RecentDirEXIFto); + RecentDirEXIFto = qfi.path(); + luminance_options.setValue(KEY_RECENT_PATH_EXIF_TO, + RecentDirEXIFto); } QStringList::Iterator it = files.begin(); - while ( it != files.end() ) - { - QFileInfo *qfi=new QFileInfo(*it); - m_Ui->rightlist->addItem(qfi->fileName()); //fill graphical list + while (it != files.end()) { + QFileInfo *qfi = new QFileInfo(*it); + m_Ui->rightlist->addItem(qfi->fileName()); // fill graphical list ++it; delete qfi; } - to += files; // add the new files to the "model" - m_Ui->TransplantButton->setEnabled( (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && (m_Ui->rightlist->count() != 0) ); + to += files; // add the new files to the "model" + m_Ui->TransplantButton->setEnabled( + (m_Ui->leftlist->count() == m_Ui->rightlist->count()) && + (m_Ui->rightlist->count() != 0)); } } @@ -283,27 +329,34 @@ m_Ui->progressBar->show(); m_Ui->progressBar->setMaximum(m_Ui->leftlist->count()); - //initialize string iterators to the beginning of the lists. + // initialize string iterators to the beginning of the lists. QStringList::const_iterator i_source = from.constBegin(); QStringList::const_iterator i_dest = to.constBegin(); - int index=0; - //for all the input files + int index = 0; + // for all the input files for (; i_source != from.constEnd(); ++i_source, ++i_dest) { try { add_log_message(*i_source + "-->" + *i_dest); - //ExifOperations methods want a std::string, we need to use the QFile::encodeName(QString).constData() trick to cope with local 8-bit encoding determined by the user's locale. - ExifOperations::copyExifData(QFile::encodeName((*i_source)).constData(), QFile::encodeName((*i_dest)).constData(), m_Ui->checkBox_dont_overwrite->isChecked()); + // ExifOperations methods want a std::string, we need to use the + // QFile::encodeName(QString).constData() trick to cope with local + // 8-bit + // encoding determined by the user's locale. + ExifOperations::copyExifData( + QFile::encodeName((*i_source)).constData(), + QFile::encodeName((*i_dest)).constData(), + m_Ui->checkBox_dont_overwrite->isChecked()); m_Ui->rightlist->item(index)->setBackground(QBrush("#a0ff87")); - } catch (Exiv2::AnyError& e) { - add_log_message("ERROR:" + QString::fromStdString(e.what()) ); + } catch (Exiv2::AnyError &e) { + add_log_message("ERROR:" + QString::fromStdString(e.what())); m_Ui->rightlist->item(index)->setBackground(QBrush("#ff743d")); } - m_Ui->progressBar->setValue( m_Ui->progressBar->value()+1 ); // increment progressbar + m_Ui->progressBar->setValue(m_Ui->progressBar->value() + + 1); // increment progressbar index++; } - done=true; + done = true; m_Ui->TransplantButton->setText(tr("&Done")); m_Ui->moveup_left_button->setDisabled(true); m_Ui->moveup_right_button->setDisabled(true); @@ -316,15 +369,15 @@ m_Ui->cancelbutton->setDisabled(true); } -void TransplantExifDialog::add_log_message(const QString& message) -{ - full_Log_Model->insertRows(full_Log_Model->rowCount(),1); - full_Log_Model->setData(full_Log_Model->index(full_Log_Model->rowCount()-1), message, Qt::DisplayRole); +void TransplantExifDialog::add_log_message(const QString &message) { + full_Log_Model->insertRows(full_Log_Model->rowCount(), 1); + full_Log_Model->setData( + full_Log_Model->index(full_Log_Model->rowCount() - 1), message, + Qt::DisplayRole); m_Ui->Log_Widget->scrollToBottom(); } -void TransplantExifDialog::filterChanged(const QString& newtext) -{ +void TransplantExifDialog::filterChanged(const QString &newtext) { bool no_text = newtext.isEmpty(); m_Ui->filterComboBox->setEnabled(no_text); m_Ui->filterLabel1->setEnabled(no_text); @@ -332,30 +385,20 @@ if (no_text) filterComboBoxActivated(m_Ui->filterComboBox->currentIndex()); else - log_filter->setFilterRegExp(QRegExp(newtext, Qt::CaseInsensitive, QRegExp::RegExp)); + log_filter->setFilterRegExp( + QRegExp(newtext, Qt::CaseInsensitive, QRegExp::RegExp)); } void TransplantExifDialog::filterComboBoxActivated(int index) { QString regexp; switch (index) { - case 0: - regexp=".*"; - break; - case 1: - regexp="error"; - break; + case 0: + regexp = QStringLiteral(".*"); + break; + case 1: + regexp = QStringLiteral("error"); + break; } - log_filter->setFilterRegExp(QRegExp(regexp, Qt::CaseInsensitive, QRegExp::RegExp)); + log_filter->setFilterRegExp( + QRegExp(regexp, Qt::CaseInsensitive, QRegExp::RegExp)); } - - - - - - - - - - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/TransplantExif/TransplantExifDialog.h luminance-hdr-2.6.0/src/TransplantExif/TransplantExifDialog.h --- luminance-hdr-2.5.1+dfsg/src/TransplantExif/TransplantExifDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/TransplantExif/TransplantExifDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,33 +31,33 @@ #include "Common/LuminanceOptions.h" namespace Ui { - class TransplantExifDialog; +class TransplantExifDialog; } - class TransplantExifDialog : public QDialog { -Q_OBJECT -public: + Q_OBJECT + public: TransplantExifDialog(QWidget *); ~TransplantExifDialog(); -private: - int start_left,stop_left,start_right,stop_right; - QStringList from,to; + + private: + int start_left, stop_left, start_right, stop_right; + QStringList from, to; bool done; void updateinterval(bool); QString RecentDirEXIFfrom; QString RecentDirEXIFto; - //fuction that adds a log message to the model + // fuction that adds a log message to the model void add_log_message(const QString &); - //the class that performs regexp filtering + // the class that performs regexp filtering QSortFilterProxyModel *log_filter; - //the model that holds the data + // the model that holds the data QStringListModel *full_Log_Model; LuminanceOptions luminance_options; QScopedPointer m_Ui; -private slots: + private slots: void transplant_requested(); void help_requested(); void moveup_left(); @@ -68,7 +68,7 @@ void remove_right(); void append_left(); void append_right(); - void filterChanged(const QString&); + void filterChanged(const QString &); void filterComboBoxActivated(int); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/about.ui luminance-hdr-2.6.0/src/UI/about.ui --- luminance-hdr-2.5.1+dfsg/src/UI/about.ui 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/about.ui 2019-06-09 19:18:38.000000000 +0000 @@ -93,8 +93,15 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:12pt; font-weight:600; color:#0078dc;">Luminance HDR</span><span style=" font-family:'Sans Serif';"> — HDR imaging workflow application<br />(c) 2006-2009, Giuseppe Rota</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">(c) 2010-2017, Franco Comida, Davide Anastasia<br /></span><a href="http://qtpfsgui.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; font-weight:600; color:#55aaff;">Luminance HDR</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Create and tone-map HDR images.</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2006-2009 Giuseppe Rota</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2010-2018 Franco Comida, Davide Anastasia</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2019 Franco Comida</p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/LuminanceHDR/LuminanceHDR"><span style=" text-decoration: underline; color:#32a4e6;">https://github.com/LuminanceHDR/LuminanceHDR</span></a></p></body></html> Qt::AutoText @@ -121,26 +128,61 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Main developer QtPfsGui</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">grota@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Main Developers Luminance HDR</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Franco Comida</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">fcomida@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Davide Anastasia</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">davideanastasia@users.sourceforge.net</span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Improvements, bugfixing</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Daniel Kaneider</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">danielkaneider@users.sourceforge.net</span></a></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-family:'Sans Serif';"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-family:'Sans Serif';"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mantiuk@mpi-sb.mpg.de </span></a></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;"><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-family:'Sans Serif';"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">ngphillips@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-family:'Sans Serif';"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">alexandre.prokoudine@gmail.com</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Norwegian translator</span><span style=" font-family:'Sans Serif';"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">mandus@users.sourceforge.net</span></a><span style=" font-family:'Sans Serif';"><br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Turkish translator</span><span style=" font-family:'Sans Serif';"><br /> Mustafa GÜNAY<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">French translator</span><span style=" font-family:'Sans Serif';"><br /> Cyril Lavier<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Spanish translator</span><span style=" font-family:'Sans Serif';"><br /> Alberto Garcia<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">German translator</span><span style=" font-family:'Sans Serif';"><br /> Christian Raue<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Czech translator</span><span style=" font-family:'Sans Serif';"><br /> Jan Gemela<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Polish translator</span><span style=" font-family:'Sans Serif';"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Romanian translator</span><span style=" font-family:'Sans Serif';"><br /> Andrei Răcăşan<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Chinese translator</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';"> Lei Zhao</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">FreeBSD patches and maintainers</span><span style=" font-family:'Sans Serif';"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">DEVELOPERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main developer of QtPfsGui</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Giuseppe Rota, </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">grota@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Main Developers of Luminance HDR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Franco Comida, </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">fcomida@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Davide Anastasia, </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">davideanastasia@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Improvements, bugfixing</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ingo Weyrich, </span><a href="mailto:heckflosse67@gmx.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">heckflosse67@gmx.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Grzegorz Krawczyk, </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">krawczyk@mpi-sb.mpg.de</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Rafal Mantiuk, </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mantiuk@mpi-sb.mpg.de</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">G.Ward's Mean Threshold Bitmap (MTB) algorithm</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Nicholas Phillips, </span><a href="mailto:ngphillips@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">ngphillips@gmail.com</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">CONTRIBUTORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Arne Hagenah</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Ignacy Gawedzki</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Jean-Christophe Frisch, </span><a href="mailto:natureh.510@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">natureh.510@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Maciej Dworak, </span><a href="https://github.com/Beep6581"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Beep6581</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">PACKAGE MAINTAINERS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Linux:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> Fedora</span><span style=" font-size:10pt;">: Franco Comida</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> FreeBSD: </span><span style=" font-size:10pt;">Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Gentoo</span><span style=" font-size:10pt;">: Rene Zbinden</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;"> OpenSUSE</span><span style=" font-size:10pt;">: Peter Linnell, Rauch Christian</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">macOS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Robin Mills, </span><a href="mailto:robin@clanmills.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">robin@clanmills.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Richard Barber, </span><a href="https://github.com/Benitoite"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">https://github.com/Benitoite</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Windows</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Daniel Kaneider, </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">danielkaneider@users.sourceforge.net</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">TRANSLATORS</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><a href="https://www.transifex.com/luminance-hdr/teams/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Luminance HDR translation team</span></a><span style=" font-size:10pt;"> at Transifex</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Chinese</span><span style=" font-size:10pt;">: Lei Zhao</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Czech</span><span style=" font-size:10pt;">: Jan Gemela</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">French</span><span style=" font-size:10pt;">: Cyril Lavier</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">German</span><span style=" font-size:10pt;">: Christian Raue</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Norwegian</span><span style=" font-size:10pt;">: Åsmund Ødegård, </span><a href="mailto:mandus@users.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">mandus@users.sourceforge.net</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Polish</span><span style=" font-size:10pt;">: Maciej Dziardziel</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Romanian</span><span style=" font-size:10pt;">: Andrei Răcăşan</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Russian</span><span style=" font-size:10pt;">: Alexandre Prokoudine, </span><a href="mailto:alexandre.prokoudine@gmail.com"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">alexandre.prokoudine@gmail.com</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Spanish</span><span style=" font-size:10pt;">: Alberto Garcia</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> </span><span style=" font-size:10pt; font-weight:600;">Turkish</span><span style=" font-size:10pt;">: Mustafa Günay</span></p></body></html> true @@ -164,13 +206,22 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-family:'Sans Serif'; text-decoration: underline; color:#0078dc;">let me know</span></a><span style=" font-family:'Sans Serif';">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" font-family:'Sans Serif'; font-size:10pt; text-decoration: underline; color:#0078dc;">Flickr</span></a><span style=" font-family:'Sans Serif';"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Hugin's </span><span style=" font-family:'Sans Serif'; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-family:'Sans Serif'; font-weight:600;"> and more</span><span style=" font-family:'Sans Serif';"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-family:'Sans Serif';"><br /> Peter Linnell<br /> <br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">Fedora packager and bug reports</span><span style=" font-family:'Sans Serif';"><br /> Douglas E. Warner<br /><br /></span><span style=" font-family:'Sans Serif'; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-family:'Sans Serif';"><br /> Rauch Christian<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-family:'Sans Serif';"><br /> Rene Zbinden<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Various suggestions</span><span style=" font-family:'Sans Serif';"><br /> Arne Hagenah<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-family:'Sans Serif';"><br /> Ignacy Gawedzki<br /> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">DCRaw</span><span style=" font-family:'Sans Serif';"><br /> Dave Coffin<br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-weight:600;">And also</span><span style=" font-family:'Sans Serif';"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://discuss.pixls.us/c/software/luminancehdr"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Pixls.us</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">The community on </span><a href="https://www.flickr.com/groups/qtpfsgui/"><span style=" font-size:10pt; text-decoration: underline; color:#32a4e6;">Flickr</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Hugin's align_image_stack and more</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Pablo D'Angelo</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">DCRaw</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Dave Coffin</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">And also</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Erik Ouchterlony</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Antoine Latter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Frank Boehme</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Sloan Poe</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;"> Elizabeth Oldham</span></p></body></html> @@ -253,6 +304,7 @@ + diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/CMakeLists.txt luminance-hdr-2.6.0/src/UI/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/UI/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -5,6 +5,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/about.ui ${CMAKE_CURRENT_SOURCE_DIR}/ExportToHtmlDialog.ui ${CMAKE_CURRENT_SOURCE_DIR}/SupportedCamerasDialog.ui + ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.ui ) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/ExtWizardPage.h @@ -18,6 +19,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/FlowLayout.h ${CMAKE_CURRENT_SOURCE_DIR}/ExportToHtmlDialog.h ${CMAKE_CURRENT_SOURCE_DIR}/SupportedCamerasDialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.h ) SET(FILES_CPP ${CMAKE_CURRENT_SOURCE_DIR}/ExtWizardPage.cpp @@ -31,6 +33,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/SimplePreviewLabel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ExportToHtmlDialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/SupportedCamerasDialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.cpp ) IF(CFITSIO_FOUND) @@ -46,8 +49,15 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(ui ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) -qt5_use_modules(ui Core Concurrent Gui Widgets WebEngineWidgets) - +ADD_LIBRARY(ui STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +IF(MINGW) + TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql) +ELSE() + IF(Qt5WebEngineCore_FOUND) + TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebEngineWidgets Qt5::Sql) + ELSE() + TARGET_LINK_LIBRARIES(ui Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::WebKitWidgets Qt5::Sql) + ENDIF() +ENDIF() SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} ui PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ExportToHtmlDialog.cpp luminance-hdr-2.6.0/src/UI/ExportToHtmlDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/ExportToHtmlDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ExportToHtmlDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,43 +23,47 @@ #include "ExportToHtmlDialog.h" -#include -#include #include +#include +#include #include -#include "ui_ExportToHtmlDialog.h" +#include "UI/ui_ExportToHtmlDialog.h" #include "HdrHTML/pfsouthdrhtml.h" -#include "Libpfs/frame.h" #include "Libpfs/exception.h" -#include "Libpfs/manip/resize.h" +#include "Libpfs/frame.h" #include "Libpfs/manip/copy.h" +#include "Libpfs/manip/resize.h" +#include "ui_ExportToHtmlDialog.h" - -ExportToHtmlDialog::ExportToHtmlDialog(QWidget* parent, pfs::Frame *frame) - : QDialog(parent) - , m_frame(frame) - , m_pageName() - , m_outputFolder() - , m_imagesFolder() - , m_Ui(new Ui::ExportToHtmlDialog) -{ +ExportToHtmlDialog::ExportToHtmlDialog(QWidget *parent, pfs::Frame *frame) + : QDialog(parent), + m_frame(frame), + m_pageName(), + m_outputFolder(), + m_imagesFolder(), + m_Ui(new Ui::ExportToHtmlDialog) { m_Ui->setupUi(this); - connect(m_Ui->ExportButton, SIGNAL(clicked()), this, SLOT(onExportButtonClicked())); - connect(m_Ui->OutputFolderButton, SIGNAL(clicked()), this, SLOT(onOutputFolderButtonClicked())); - connect(m_Ui->lineEditPageName, SIGNAL(editingFinished()), this, SLOT(onEditPageNameFinished())); - connect(m_Ui->lineEditOutputFolder, SIGNAL(editingFinished()), this, SLOT(onEditOutputFolderFinished())); - connect(m_Ui->lineEditImagesFolder, SIGNAL(editingFinished()), this, SLOT(onEditImagesFolderFinished())); + connect(m_Ui->ExportButton, &QAbstractButton::clicked, this, + &ExportToHtmlDialog::onExportButtonClicked); + connect(m_Ui->OutputFolderButton, &QAbstractButton::clicked, this, + &ExportToHtmlDialog::onOutputFolderButtonClicked); + connect(m_Ui->lineEditPageName, &QLineEdit::editingFinished, this, + &ExportToHtmlDialog::onEditPageNameFinished); + connect(m_Ui->lineEditOutputFolder, &QLineEdit::editingFinished, this, + &ExportToHtmlDialog::onEditOutputFolderFinished); + connect(m_Ui->lineEditImagesFolder, &QLineEdit::editingFinished, this, + &ExportToHtmlDialog::onEditImagesFolderFinished); } -void ExportToHtmlDialog::onOutputFolderButtonClicked() -{ - QString dirname=QFileDialog::getExistingDirectory(this, tr("Choose a directory"), QDir::homePath() ); +void ExportToHtmlDialog::onOutputFolderButtonClicked() { + QString dirname = QFileDialog::getExistingDirectory( + this, tr("Choose a directory"), QDir::homePath()); QFileInfo test(dirname); - if (test.isWritable() && test.exists() && test.isDir() && !dirname.isEmpty()) - { + if (test.isWritable() && test.exists() && test.isDir() && + !dirname.isEmpty()) { m_outputFolder = dirname; m_Ui->lineEditOutputFolder->setText(dirname); @@ -67,36 +71,36 @@ } } -void ExportToHtmlDialog::onExportButtonClicked() -{ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); +void ExportToHtmlDialog::onExportButtonClicked() { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); bool quit = false; pfs::Frame *resized; int size_percent = m_Ui->spinBoxSize->value(); if (size_percent == 100) { resized = pfs::copy(m_frame); - } - else { - int resized_width = (int)((float)(size_percent*m_frame->getWidth()) / 100.f); + } else { + int resized_width = + (int)((float)(size_percent * m_frame->getWidth()) / 100.f); resized = pfs::resize(m_frame, resized_width, BilinearInterp); } try { - generate_hdrhtml(resized, - m_pageName.toStdString(), m_outputFolder.toStdString(), m_imagesFolder.toStdString(), - "", "", m_Ui->spinBoxQuality->value(), false); - } - catch( pfs::Exception &e) { + generate_hdrhtml(resized, m_pageName.toStdString(), + m_outputFolder.toStdString(), + m_imagesFolder.toStdString(), "", "", + m_Ui->spinBoxQuality->value(), false); + } catch (pfs::Exception &e) { delete resized; QApplication::restoreOverrideCursor(); - QMessageBox::critical(this, tr("Error: "), e.what() , - QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::critical(this, tr("Error: "), e.what(), QMessageBox::Ok, + QMessageBox::NoButton); quit = true; } if (!quit) { QApplication::restoreOverrideCursor(); if (m_Ui->checkBoxOpenOnBrowser->isChecked()) { - QString url = "file:///" + m_outputFolder + "/" + m_pageName + ".html"; + QString url = + "file:///" + m_outputFolder + "/" + m_pageName + ".html"; QDesktopServices::openUrl(QUrl(url)); } } @@ -104,8 +108,7 @@ accept(); } -void ExportToHtmlDialog::onEditPageNameFinished() -{ +void ExportToHtmlDialog::onEditPageNameFinished() { m_pageName = m_Ui->lineEditPageName->text(); QFileInfo qfi = QFileInfo(m_pageName); m_pageName = qfi.baseName(); @@ -114,31 +117,26 @@ check_enable_export(); } -void ExportToHtmlDialog::onEditOutputFolderFinished() -{ +void ExportToHtmlDialog::onEditOutputFolderFinished() { m_outputFolder = m_Ui->lineEditOutputFolder->text(); QFileInfo qfi = QFileInfo(m_outputFolder); if (!m_outputFolder.isEmpty() && !qfi.isDir()) - QMessageBox::critical(this, tr("Error: "), m_outputFolder + tr(" must be a directory.") , + QMessageBox::critical(this, tr("Error: "), + m_outputFolder + tr(" must be a directory."), QMessageBox::Ok, QMessageBox::NoButton); else check_enable_export(); } -void ExportToHtmlDialog::onEditImagesFolderFinished() -{ +void ExportToHtmlDialog::onEditImagesFolderFinished() { m_imagesFolder = m_Ui->lineEditImagesFolder->text(); check_enable_export(); } -void ExportToHtmlDialog::check_enable_export() -{ +void ExportToHtmlDialog::check_enable_export() { m_Ui->ExportButton->setEnabled( - (!m_Ui->lineEditPageName->text().isEmpty()) && - (!m_Ui->lineEditOutputFolder->text().isEmpty())); -} - -ExportToHtmlDialog::~ExportToHtmlDialog() -{ + (!m_Ui->lineEditPageName->text().isEmpty()) && + (!m_Ui->lineEditOutputFolder->text().isEmpty())); } +ExportToHtmlDialog::~ExportToHtmlDialog() {} diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ExportToHtmlDialog.h luminance-hdr-2.6.0/src/UI/ExportToHtmlDialog.h --- luminance-hdr-2.5.1+dfsg/src/UI/ExportToHtmlDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ExportToHtmlDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,22 +27,20 @@ #include #include -namespace Ui -{ - class ExportToHtmlDialog; +namespace Ui { +class ExportToHtmlDialog; } namespace pfs { - class Frame; +class Frame; } -class ExportToHtmlDialog : public QDialog -{ +class ExportToHtmlDialog : public QDialog { Q_OBJECT -public: - ExportToHtmlDialog(QWidget* parent, pfs::Frame *frame); + public: + ExportToHtmlDialog(QWidget *parent, pfs::Frame *frame); -private: + private: pfs::Frame *m_frame; QString m_pageName; QString m_outputFolder; @@ -52,15 +50,15 @@ QScopedPointer m_Ui; -private slots: + private slots: void onExportButtonClicked(); void onOutputFolderButtonClicked(); void onEditPageNameFinished(); void onEditOutputFolderFinished(); void onEditImagesFolderFinished(); -public: + public: ~ExportToHtmlDialog(); }; -#endif // EXPORTTOHTMLDIALOG_H +#endif // EXPORTTOHTMLDIALOG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ExtWizardPage.cpp luminance-hdr-2.6.0/src/UI/ExtWizardPage.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/ExtWizardPage.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ExtWizardPage.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -1,23 +1,22 @@ #include "ExtWizardPage.h" -ExtWizardPage::ExtWizardPage(QWidget* parent) : QWizardPage(parent), m_completeStatus(CompleteStatus::Undefined) -{ -} +ExtWizardPage::ExtWizardPage(QWidget *parent) + : QWizardPage(parent), m_completeStatus(CompleteStatus::Undefined) {} -void ExtWizardPage::registerExtField(const QString& name, QWidget* widget, const char* property, const char* changedSignal) -{ +void ExtWizardPage::registerExtField(const QString &name, QWidget *widget, + const char *property, + const char *changedSignal) { QWizardPage::registerField(name, widget, property, changedSignal); } -void ExtWizardPage::setCompleteStatus(CompleteStatus newStatus) -{ +void ExtWizardPage::setCompleteStatus(CompleteStatus newStatus) { m_completeStatus = newStatus; emit completeChanged(); } -bool ExtWizardPage::isComplete() const -{ +bool ExtWizardPage::isComplete() const { return m_completeStatus == AlwaysTrue - ? true - : (m_completeStatus == AlwaysFalse ? false : QWizardPage::isComplete()); + ? true + : (m_completeStatus == AlwaysFalse ? false + : QWizardPage::isComplete()); } diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ExtWizardPage.h luminance-hdr-2.6.0/src/UI/ExtWizardPage.h --- luminance-hdr-2.5.1+dfsg/src/UI/ExtWizardPage.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ExtWizardPage.h 2019-06-09 19:18:38.000000000 +0000 @@ -7,24 +7,24 @@ class ExtWizardPage; } -class ExtWizardPage : public QWizardPage -{ -public: - enum CompleteStatus {Undefined, AlwaysTrue, AlwaysFalse}; +class ExtWizardPage : public QWizardPage { + public: + enum CompleteStatus { Undefined, AlwaysTrue, AlwaysFalse }; Q_OBJECT -public: - ExtWizardPage(QWidget* parent = 0); + public: + ExtWizardPage(QWidget *parent = 0); - void registerExtField(const QString& name, QWidget* widget, const char* property = 0, const char* changedSignal = 0); + void registerExtField(const QString &name, QWidget *widget, + const char *property = 0, + const char *changedSignal = 0); void setCompleteStatus(CompleteStatus newStatus); virtual bool isComplete() const; -private: + private: CompleteStatus m_completeStatus; - }; -#endif // EXTWIZARDPAGE_H +#endif // EXTWIZARDPAGE_H diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/FitsImporter.cpp luminance-hdr-2.6.0/src/UI/FitsImporter.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/FitsImporter.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/FitsImporter.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,32 +21,32 @@ * @author Franco Comida */ -#include -#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include #include +#include +#include #include #include +#include +#include #include -#include "FitsImporter.h" -#include "ui_FitsImporter.h" +#include "UI/FitsImporter.h" +#include "UI/ui_FitsImporter.h" #include "Common/CommonFunctions.h" #include "HdrCreation/mtb_alignment.h" -#include -#include -#include #include #include +#include +#include +#include using namespace pfs; using namespace pfs::colorspace; @@ -54,40 +54,41 @@ static const int previewWidth = 300; static const int previewHeight = 200; -FitsImporter::~FitsImporter() -{ -} +FitsImporter::~FitsImporter() {} FitsImporter::FitsImporter(QWidget *parent) - : QWizard(parent) - , m_width(0) - , m_height(0) - , m_align() - , m_Ui(new Ui::FitsImporter) -{ + : QWizard(parent), + m_width(0), + m_height(0), + m_align(), + m_Ui(new Ui::FitsImporter) { m_Ui->setupUi(this); - if ( !QIcon::hasThemeIcon("upload-media") ) + if (!QIcon::hasThemeIcon(QStringLiteral("upload-media"))) m_Ui->pushButtonLoad->setIcon(QIcon(":/program-icons/upload-media")); - if ( !QIcon::hasThemeIcon("chronometer-reset") ) - m_Ui->pushButtonReset->setIcon(QIcon(":/program-icons/chronometer-reset")); - if ( !QIcon::hasThemeIcon("document-preview") ) - m_Ui->pushButtonPreview->setIcon(QIcon(":/program-icons/document-preview")); + if (!QIcon::hasThemeIcon(QStringLiteral("chronometer-reset"))) + m_Ui->pushButtonReset->setIcon( + QIcon(":/program-icons/chronometer-reset")); + if (!QIcon::hasThemeIcon(QStringLiteral("document-preview"))) + m_Ui->pushButtonPreview->setIcon( + QIcon(":/program-icons/document-preview")); -#ifdef WIN32 +#ifdef Q_OS_WIN setWizardStyle(WizardStyle::ModernStyle); #endif -#ifdef Q_OS_MAC - this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#ifdef Q_OS_MACOS + this->setWindowModality( + Qt::WindowModal); // In OS X, the QMessageBox is modal to the window #endif - setPixmap(WizardPixmap::LogoPixmap, QIcon(":/program-icons/Galaxy-icon").pixmap(48, 48)); + setPixmap(WizardPixmap::LogoPixmap, + QIcon(":/program-icons/Galaxy-icon").pixmap(48, 48)); m_previewLabel = new QLabel(this); - m_previewLabel->resize(600,400); + m_previewLabel->resize(600, 400); m_previewLabel->setScaledContents(true); - QPalette* palette = new QPalette(); - palette->setColor(QPalette::Foreground,Qt::red); + QPalette *palette = new QPalette(); + palette->setColor(QPalette::Foreground, Qt::red); m_previewLabel->setPalette(*palette); m_previewLabel->setFrameStyle(QFrame::Box); m_previewLabel->setLineWidth(3); @@ -96,155 +97,156 @@ m_previewFrame = new PreviewFrame; m_Ui->verticalLayoutPreviews->addWidget(m_previewFrame); - for (int i = 0; i < 5; i++) - { - SimplePreviewLabel* label = new SimplePreviewLabel(i); + for (int i = 0; i < 5; i++) { + SimplePreviewLabel *label = new SimplePreviewLabel(i); m_previewFrame->addLabel(label); label->setEnabled(false); - connect(label, SIGNAL(selected(int)), this, SLOT(previewLabelSelected(int))); + connect(label, &SimplePreviewLabel::selected, this, + &FitsImporter::previewLabelSelected); } m_previewFrame->show(); - connect(this, SIGNAL(setValue(int)), m_Ui->progressBar, SLOT(setValue(int)), Qt::DirectConnection); - connect(this, SIGNAL(setRange(int,int)), m_Ui->progressBar, SLOT(setRange(int,int)), Qt::DirectConnection); + connect(this, &FitsImporter::setValue, m_Ui->progressBar, + &QProgressBar::setValue, Qt::DirectConnection); + connect(this, &FitsImporter::setRange, m_Ui->progressBar, + &QProgressBar::setRange, Qt::DirectConnection); // wizard stuff - m_Ui->wizardPageLoadFiles->setCompleteStatus(ExtWizardPage::CompleteStatus::AlwaysFalse); - m_Ui->wizardPageLoadFiles->registerExtField("lineEditRed*", m_Ui->lineEditRed); - m_Ui->wizardPageLoadFiles->registerExtField("lineEditGreen*", m_Ui->lineEditGreen); - m_Ui->wizardPageLoadFiles->registerExtField("lineEditBlue*", m_Ui->lineEditBlue); + m_Ui->wizardPageLoadFiles->setCompleteStatus( + ExtWizardPage::CompleteStatus::AlwaysFalse); + m_Ui->wizardPageLoadFiles->registerExtField(QStringLiteral("lineEditRed*"), + m_Ui->lineEditRed); + m_Ui->wizardPageLoadFiles->registerExtField( + QStringLiteral("lineEditGreen*"), m_Ui->lineEditGreen); + m_Ui->wizardPageLoadFiles->registerExtField(QStringLiteral("lineEditBlue*"), + m_Ui->lineEditBlue); m_Ui->wizardPagePreview->setCommitPage(true); - m_Ui->wizardPageAlignment->setCompleteStatus(ExtWizardPage::CompleteStatus::AlwaysFalse); + m_Ui->wizardPageAlignment->setCompleteStatus( + ExtWizardPage::CompleteStatus::AlwaysFalse); } -pfs::Frame* FitsImporter::getFrame() -{ +pfs::Frame *FitsImporter::getFrame() { buildFrame(); return m_frame; } -void FitsImporter::selectInputFile(QLineEdit* textField, QString* channel) -{ - QString filetypes = "FITS (*.fit *.FIT *.fits *.FITS)"; - *channel = QFileDialog::getOpenFileName(this, tr("Load one FITS image..."), - m_luminance_options.getDefaultPathHdrIn(), - filetypes); +void FitsImporter::selectInputFile(QLineEdit *textField, QString *channel) { + QString filetypes = QStringLiteral("FITS (*.fit *.FIT *.fits *.FITS)"); + *channel = QFileDialog::getOpenFileName( + this, tr("Load one FITS image..."), + m_luminance_options.getDefaultPathHdrIn(), filetypes); textField->setText(*channel); checkLoadButton(); - if (!channel->isEmpty()) - { + if (!channel->isEmpty()) { QFileInfo qfi(*channel); - m_luminance_options.setDefaultPathHdrIn( qfi.path() ); + m_luminance_options.setDefaultPathHdrIn(qfi.path()); } - if (!m_luminosityChannel.isEmpty() && !m_redChannel.isEmpty() && !m_greenChannel.isEmpty() && - !m_blueChannel.isEmpty() && !m_hChannel.isEmpty()) - { + if (!m_luminosityChannel.isEmpty() && !m_redChannel.isEmpty() && + !m_greenChannel.isEmpty() && !m_blueChannel.isEmpty() && + !m_hChannel.isEmpty()) { on_pushButtonLoad_clicked(); } } -void FitsImporter::on_pushButtonLuminosity_clicked() -{ +void FitsImporter::on_pushButtonLuminosity_clicked() { selectInputFile(m_Ui->lineEditLuminosity, &m_luminosityChannel); } -void FitsImporter::on_pushButtonRed_clicked() -{ +void FitsImporter::on_pushButtonRed_clicked() { selectInputFile(m_Ui->lineEditRed, &m_redChannel); } -void FitsImporter::on_pushButtonGreen_clicked() -{ +void FitsImporter::on_pushButtonGreen_clicked() { selectInputFile(m_Ui->lineEditGreen, &m_greenChannel); } -void FitsImporter::on_pushButtonBlue_clicked() -{ +void FitsImporter::on_pushButtonBlue_clicked() { selectInputFile(m_Ui->lineEditBlue, &m_blueChannel); } -void FitsImporter::on_pushButtonH_clicked() -{ +void FitsImporter::on_pushButtonH_clicked() { selectInputFile(m_Ui->lineEditH, &m_hChannel); } -void FitsImporter::checkLoadButton() -{ - m_Ui->pushButtonLoad->setEnabled(!m_redChannel.isEmpty() || - !m_greenChannel.isEmpty() || - !m_blueChannel.isEmpty() || - !m_luminosityChannel.isEmpty() || - !m_hChannel.isEmpty()); +void FitsImporter::checkLoadButton() { + m_Ui->pushButtonLoad->setEnabled( + !m_redChannel.isEmpty() || !m_greenChannel.isEmpty() || + !m_blueChannel.isEmpty() || !m_luminosityChannel.isEmpty() || + !m_hChannel.isEmpty()); } -void FitsImporter::on_pushButtonLoad_clicked() -{ - m_Ui->wizardPageLoadFiles->setCompleteStatus(ExtWizardPage::CompleteStatus::AlwaysFalse); +void FitsImporter::on_pushButtonLoad_clicked() { + m_Ui->wizardPageLoadFiles->setCompleteStatus( + ExtWizardPage::CompleteStatus::AlwaysFalse); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_Ui->pushButtonLoad->setEnabled(false); m_tmpdata.clear(); - m_tmpdata.push_back( HdrCreationItem(m_redChannel) ); - m_tmpdata.push_back( HdrCreationItem(m_greenChannel) ); - m_tmpdata.push_back( HdrCreationItem(m_blueChannel) ); - m_tmpdata.push_back( HdrCreationItem(m_luminosityChannel) ); - m_tmpdata.push_back( HdrCreationItem(m_hChannel) ); + m_tmpdata.push_back(HdrCreationItem(m_redChannel)); + m_tmpdata.push_back(HdrCreationItem(m_greenChannel)); + m_tmpdata.push_back(HdrCreationItem(m_blueChannel)); + m_tmpdata.push_back(HdrCreationItem(m_luminosityChannel)); + m_tmpdata.push_back(HdrCreationItem(m_hChannel)); // parallel load of the data... - // connect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone()), Qt::DirectConnection); + // connect(&m_futureWatcher, SIGNAL(finished()), this, + // SLOT(loadFilesDone()), + // Qt::DirectConnection); // Start the computation. - // m_futureWatcher.setFuture( QtConcurrent::map(m_tmpdata.begin(), m_tmpdata.end(), LoadFile()) ); + // m_futureWatcher.setFuture( QtConcurrent::map(m_tmpdata.begin(), + // m_tmpdata.end(), LoadFile()) ); QString error_string; try { std::for_each(m_tmpdata.begin(), m_tmpdata.end(), LoadFile(true)); - } - catch (std::runtime_error &err) - { + } catch (std::runtime_error &err) { QApplication::restoreOverrideCursor(); error_string = QString(err.what()); qDebug() << err.what(); + } catch (...) { + QApplication::restoreOverrideCursor(); + error_string = QStringLiteral("unknown error"); } loadFilesDone(error_string); } -void FitsImporter::loadFilesDone(QString error_string) -{ +void FitsImporter::loadFilesDone(QString error_string) { qDebug() << "Data loaded ... move to internal structure!"; - //disconnect(&m_futureWatcher, SIGNAL(finished()), this, SLOT(loadFilesDone())); + // disconnect(&m_futureWatcher, SIGNAL(finished()), this, + // SLOT(loadFilesDone())); m_data.clear(); int idx = 0; - //BOOST_FOREACH(const HdrCreationItem& i, m_tmpdata) - for (HdrCreationItemContainer::iterator i = m_tmpdata.begin(); i != m_tmpdata.end(); ++i) - { - if ( i->isValid() ) - { - qDebug() << QString("Insert data for %1").arg(i->filename()); + // BOOST_FOREACH(const HdrCreationItem& i, m_tmpdata) + for (HdrCreationItemContainer::iterator i = m_tmpdata.begin(); + i != m_tmpdata.end(); ++i) { + if (i->isValid()) { + qDebug() << QStringLiteral("Insert data for %1").arg(i->filename()); + m_filenames << i->filename(); m_data.push_back(*i); - m_previewFrame->getLabel(idx)->setPixmap(QPixmap::fromImage(i->qimage())); + m_previewFrame->getLabel(idx)->setPixmap( + QPixmap::fromImage(i->qimage())); m_previewFrame->getLabel(idx)->setEnabled(true); - } - else if ( i->filename().isEmpty() ) - { + } else if (i->filename().isEmpty()) { m_data.push_back(*i); - } - else - { - QMessageBox::warning(0,"", tr("Cannot load FITS image %1. \nERROR: %2").arg(i->filename()).arg(error_string), QMessageBox::Ok, QMessageBox::NoButton); + } else { + QMessageBox::warning(0, QLatin1String(""), + tr("Cannot load FITS image %1. \nERROR: %2") + .arg(i->filename(), error_string), + QMessageBox::Ok, QMessageBox::NoButton); m_data.clear(); m_tmpdata.clear(); m_contents.clear(); m_qimages.clear(); m_Ui->pushButtonLoad->setEnabled(true); - //QApplication::restoreOverrideCursor(); + // QApplication::restoreOverrideCursor(); return; } idx++; @@ -252,12 +254,13 @@ size_t i; for (i = 0; i < m_tmpdata.size(); i++) - if (!m_tmpdata[i].filename().isEmpty()) - break; + if (!m_tmpdata[i].filename().isEmpty()) break; m_previewFrame->selectLabel(i); if (!framesHaveSameSize()) { - QMessageBox::warning(0,"", tr("FITS images have different size"), QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::warning(0, QLatin1String(""), + tr("FITS images have different size"), + QMessageBox::Ok, QMessageBox::NoButton); m_data.clear(); m_tmpdata.clear(); m_contents.clear(); @@ -272,85 +275,74 @@ m_Ui->pushButtonPreview->setEnabled(true); m_tmpdata.clear(); buildContents(); - //buildPreview(); + // buildPreview(); QApplication::restoreOverrideCursor(); - m_Ui->wizardPageLoadFiles->setCompleteStatus(ExtWizardPage::CompleteStatus::Undefined); + m_Ui->wizardPageLoadFiles->setCompleteStatus( + ExtWizardPage::CompleteStatus::Undefined); } -bool isValid(HdrCreationItem& item) -{ - return !item.filename().isEmpty(); -} +bool isValid(HdrCreationItem &item) { return !item.filename().isEmpty(); } -void FitsImporter::buildPreview() -{ +void FitsImporter::buildPreview() { float redRed = m_Ui->dsbRedRed->value(); float greenGreen = m_Ui->dsbGreenGreen->value(); float blueBlue = m_Ui->dsbBlueBlue->value(); - float gamma = (m_Ui->vsGamma->value()/10000.0f)*3.f; + float gamma = (m_Ui->vsGamma->value() / 10000.0f) * 3.f; Q_ASSERT(gamma >= 0.f); Q_ASSERT(gamma <= 3.f); qDebug() << "Gamma " << gamma; - QImage tempImage(previewWidth, previewHeight, QImage::Format_ARGB32_Premultiplied); + QImage tempImage(previewWidth, previewHeight, + QImage::Format_ARGB32_Premultiplied); ConvertSample toFloat; ConvertToQRgb convertToQRgb(1.f + gamma); - if (!m_luminosityChannel.isEmpty()) - { - for (int j = 0; j < previewHeight; j++) - { - for (int i = 0; i < previewWidth; i++) - { + if (!m_luminosityChannel.isEmpty()) { + for (int j = 0; j < previewHeight; j++) { + for (int i = 0; i < previewWidth; i++) { float red = toFloat(qRed(m_qimages[0].pixel(i, j))); float green = toFloat(qRed(m_qimages[1].pixel(i, j))); float blue = toFloat(qRed(m_qimages[2].pixel(i, j))); float luminance = toFloat(qRed(m_qimages[3].pixel(i, j))); float h_alpha = toFloat(qRed(m_qimages[4].pixel(i, j))); float r = redRed * red /*+ redGreen * green + redBlue * blue*/; - float g = /*greenRed * red +*/ greenGreen * green /*+ greenBlue * blue*/; - float b = /*blueRed * red + blueGreen * green + */blueBlue * blue; + float g = + /*greenRed * red +*/ greenGreen * + green /*+ greenBlue * blue*/; + float b = + /*blueRed * red + blueGreen * green + */ blueBlue * blue; float h, s, l; rgb2hsl(r, g, b, h, s, l); hsl2rgb(h, s, luminance, r, g, b); float redH = r + 0.2f * h_alpha; - if (r > 1.0f) - r = 1.0f; - if (g > 1.0f) - g = 1.0f; - if (b > 1.0f) - b = 1.0f; - if (redH > 1.0f) - redH = 1.0f; + if (r > 1.0f) r = 1.0f; + if (g > 1.0f) g = 1.0f; + if (b > 1.0f) b = 1.0f; + if (redH > 1.0f) redH = 1.0f; QRgb rgb; convertToQRgb(redH, g, b, rgb); tempImage.setPixel(i, j, rgb); } } - } - else - { - for (int j = 0; j < previewHeight; j++) - { - for (int i = 0; i < previewWidth; i++) - { + } else { + for (int j = 0; j < previewHeight; j++) { + for (int i = 0; i < previewWidth; i++) { float red = toFloat(qRed(m_qimages[0].pixel(i, j))); float green = toFloat(qRed(m_qimages[1].pixel(i, j))); float blue = toFloat(qRed(m_qimages[2].pixel(i, j))); float h_alpha = toFloat(qRed(m_qimages[4].pixel(i, j))); float r = redRed * red /*+ redGreen * green + redBlue * blue*/; - float g = /*greenRed * red +*/ greenGreen * green /*+ greenBlue * blue*/; - float b = /*blueRed * red + blueGreen * green +*/ blueBlue * blue; + float g = + /*greenRed * red +*/ greenGreen * + green /*+ greenBlue * blue*/; + float b = + /*blueRed * red + blueGreen * green +*/ blueBlue * blue; float redH = r + 0.2f * h_alpha; - if (r > 1.0f) - r = 1.0f; - if (g > 1.0f) - g = 1.0f; - if (b > 1.0f) - b = 1.0f; - if (redH > 1.0f) - redH = 1.0f; + if (r > 1.0f) r = 1.0f; + if (g > 1.0f) g = 1.0f; + if (b > 1.0f) b = 1.0f; + if (redH > 1.0f) redH = 1.0f; QRgb rgb; convertToQRgb(redH, g, b, rgb); @@ -361,60 +353,52 @@ m_Ui->previewLabel->setPixmap(QPixmap::fromImage(tempImage)); } -void FitsImporter::buildContents() -{ +void FitsImporter::buildContents() { HdrCreationItemContainer::iterator it = - std::find_if(m_data.begin(), m_data.end(), isValid); + std::find_if(m_data.begin(), m_data.end(), isValid); - if (it == m_data.end()) - return; + if (it == m_data.end()) return; m_width = it->frame()->getWidth(); m_height = it->frame()->getHeight(); - for (size_t i = 0; i < m_data.size(); i++) - { - m_contents.push_back(std::vector(m_width*m_height)); + for (size_t i = 0; i < m_data.size(); i++) { + m_contents.push_back(std::vector(m_width * m_height)); } float datamax = std::numeric_limits::min(); float datamin = std::numeric_limits::max(); - for (size_t i = 0; i < m_data.size(); i++) - { - if (!m_data[i].filename().isEmpty()) - { + for (size_t i = 0; i < m_data.size(); i++) { + if (!m_data[i].filename().isEmpty()) { datamin = std::min(datamin, m_data[i].getMin()); datamax = std::max(datamax, m_data[i].getMax()); } } #ifndef NDEBUG - std::cout << "FitsImporter datamin = " << datamin << std::endl; - std::cout << "FitsImporter datamax = " << datamax << std::endl; + std::cout << "FitsImporter datamin = " << datamin << std::endl; + std::cout << "FitsImporter datamax = " << datamax << std::endl; #endif - for (size_t i = 0; i < m_data.size(); i++) - { - if (m_data[i].filename().isEmpty()) - { + for (size_t i = 0; i < m_data.size(); i++) { + if (m_data[i].filename().isEmpty()) { std::fill(m_contents[i].begin(), m_contents[i].end(), 0.0f); - QImage tmpImage(previewWidth, previewHeight, QImage::Format_ARGB32_Premultiplied); + QImage tmpImage(previewWidth, previewHeight, + QImage::Format_ARGB32_Premultiplied); tmpImage.fill(0); m_qimages.push_back(tmpImage); - } - else - { + } else { Channel *C = m_data[i].frame()->getChannel("X"); pfs::colorspace::Normalizer normalize(datamin, datamax); std::transform(C->begin(), C->end(), C->begin(), normalize); std::copy(C->begin(), C->end(), m_contents[i].begin()); - m_qimages.push_back(m_data[i].qimage().scaled(previewWidth, previewHeight)); + m_qimages.push_back( + m_data[i].qimage().scaled(previewWidth, previewHeight)); } } } -void FitsImporter::buildFrame() -{ +void FitsImporter::buildFrame() { float redRed = m_Ui->dsbRedRed->value(); float greenGreen = m_Ui->dsbGreenGreen->value(); float blueBlue = m_Ui->dsbBlueBlue->value(); @@ -423,11 +407,9 @@ Channel *Xc, *Yc, *Zc; m_frame->createXYZChannels(Xc, Yc, Zc); - if (!m_luminosityChannel.isEmpty()) - { - for (size_t i = 0; i < m_width*m_height; i++) - { - //float r = redRed * m_contents[2][i]; + if (!m_luminosityChannel.isEmpty()) { + for (size_t i = 0; i < m_width * m_height; i++) { + // float r = redRed * m_contents[2][i]; float r = redRed * m_contents[0][i]; float g = greenGreen * m_contents[1][i]; float b = blueBlue * m_contents[2][i]; @@ -438,11 +420,8 @@ (*Yc)(i) = g; (*Zc)(i) = b; } - } - else - { - for (size_t i = 0; i < m_width*m_height; i++) - { + } else { + for (size_t i = 0; i < m_width * m_height; i++) { float r = redRed * m_contents[0][i]; float g = greenGreen * m_contents[1][i]; float b = blueBlue * m_contents[2][i]; @@ -453,67 +432,66 @@ } } -void FitsImporter::align_with_ais() -{ +void FitsImporter::align_with_ais() { m_contents.clear(); m_align.reset(new Align(m_data, false, 2, 0.0f, 65535.0f)); - connect(m_align.get(), SIGNAL(finishedAligning(int)), this, SLOT(ais_finished(int))); - connect(m_align.get(), SIGNAL(failedAligning(QProcess::ProcessError)), this, SLOT(ais_failed_slot(QProcess::ProcessError))); - connect(m_align.get(), SIGNAL(dataReady(QByteArray)), this, SLOT(readData(QByteArray))); + connect(m_align.get(), &Align::finishedAligning, this, + &FitsImporter::ais_finished); + connect(m_align.get(), &Align::failedAligning, this, + &FitsImporter::ais_failed_slot); + connect(m_align.get(), &Align::dataReady, this, &FitsImporter::readData); m_align->align_with_ais(m_Ui->autoCropCheckBox->isChecked()); } -void FitsImporter::ais_finished(int exitcode) -{ +void FitsImporter::ais_finished(int exitcode) { m_align->removeTempFiles(); - if (exitcode != 0) - { + if (exitcode != 0) { QApplication::restoreOverrideCursor(); qDebug() << "align_image_stack exited with exit code " << exitcode; - QMessageBox::warning(0,"", tr("align_image_stack exited with exit code %1").arg(exitcode), QMessageBox::Ok, QMessageBox::NoButton); - } - else { + QMessageBox::warning( + 0, QLatin1String(""), + tr("align_image_stack exited with exit code %1").arg(exitcode), + QMessageBox::Ok, QMessageBox::NoButton); + } else { QApplication::restoreOverrideCursor(); buildContents(); - //buildFrame(); + // buildFrame(); } - m_Ui->wizardPageAlignment->setCompleteStatus(ExtWizardPage::CompleteStatus::Undefined); + m_Ui->wizardPageAlignment->setCompleteStatus( + ExtWizardPage::CompleteStatus::Undefined); } -void FitsImporter::ais_failed_slot(QProcess::ProcessError error) -{ +void FitsImporter::ais_failed_slot(QProcess::ProcessError error) { qDebug() << "align_image_stack failed"; m_align->removeTempFiles(); QApplication::restoreOverrideCursor(); - QMessageBox::warning(0,"", tr("align_image_stack failed with error"), QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::warning(0, QLatin1String(""), + tr("align_image_stack failed with error"), + QMessageBox::Ok, QMessageBox::NoButton); } -bool FitsImporter::framesHaveSameSize() -{ +bool FitsImporter::framesHaveSameSize() { HdrCreationItemContainer::iterator it; it = std::find_if(m_data.begin(), m_data.end(), isValid); - if (it == m_data.end()) - return false; + if (it == m_data.end()) return false; const size_t width = it->frame()->getWidth(); const size_t height = it->frame()->getHeight(); - for ( HdrCreationItemContainer::const_iterator it = m_data.begin() + 1, - itEnd = m_data.end(); it != itEnd; ++it) { - if (it->filename().isEmpty()) - continue; - if (it->frame()->getWidth() != width || it->frame()->getHeight() != height) + for (HdrCreationItemContainer::const_iterator it = m_data.begin() + 1, + itEnd = m_data.end(); + it != itEnd; ++it) { + if (it->filename().isEmpty()) continue; + if (it->frame()->getWidth() != width || + it->frame()->getHeight() != height) return false; } return true; } -void FitsImporter::readData(QByteArray data) -{ +void FitsImporter::readData(QByteArray data) { qDebug() << data; - if (data.contains("[1A")) - data.replace("[1A", ""); - if (data.contains("[2A")) - data.replace("[2A", ""); + if (data.contains("[1A")) data.replace("[1A", ""); + if (data.contains("[2A")) data.replace("[2A", ""); if (data.contains(QChar(0x01B).toLatin1())) data.replace(QChar(0x01B).toLatin1(), ""); @@ -526,31 +504,30 @@ } } -void FitsImporter::align_with_mtb() -{ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); +void FitsImporter::align_with_mtb() { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_contents.clear(); // build temporary container... vector frames; for (size_t i = 0; i < m_data.size(); ++i) { if (!m_data[i].filename().isEmpty()) - frames.push_back( m_data[i].frame() ); + frames.push_back(m_data[i].frame()); } // run MTB libhdr::mtb_alignment(frames); QApplication::restoreOverrideCursor(); buildContents(); - //buildFrame(); + // buildFrame(); } -void FitsImporter::on_pushButtonClockwise_clicked() -{ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); +void FitsImporter::on_pushButtonClockwise_clicked() { + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_Ui->pushButtonClockwise->setEnabled(false); int index = m_previewFrame->getSelectedLabel(); - std::unique_ptr rotatedHalf(pfs::rotate(m_data[index].frame().get(), true)); + std::unique_ptr rotatedHalf( + pfs::rotate(m_data[index].frame().get(), true)); std::unique_ptr rotated(pfs::rotate(rotatedHalf.get(), true)); m_data[index].frame()->swap(*rotated); rotatedHalf.reset(); @@ -558,95 +535,88 @@ RefreshPreview refresh; refresh(m_data[index]); - m_previewFrame->getLabel(index)->setPixmap(QPixmap::fromImage(m_data[index].qimage())); - if (m_Ui->pushButtonPreview->isChecked()) - { - m_previewLabel->setPixmap(*m_previewFrame->getLabel(m_previewFrame->getSelectedLabel())->pixmap()); + m_previewFrame->getLabel(index)->setPixmap( + QPixmap::fromImage(m_data[index].qimage())); + if (m_Ui->pushButtonPreview->isChecked()) { + m_previewLabel->setPixmap( + *m_previewFrame->getLabel(m_previewFrame->getSelectedLabel()) + ->pixmap()); } Channel *C = m_data[index].frame()->getChannel("X"); std::copy(C->begin(), C->end(), m_contents[index].begin()); QImage tmp = m_data[index].qimage().scaled(previewWidth, previewHeight); m_qimages[index].swap(tmp); - //buildPreview(); + // buildPreview(); m_Ui->pushButtonClockwise->setEnabled(true); QApplication::restoreOverrideCursor(); } -void FitsImporter::on_pushButtonPreview_clicked() -{ +void FitsImporter::on_pushButtonPreview_clicked() { if (m_Ui->pushButtonPreview->isChecked()) { - m_previewLabel->setPixmap(*m_previewFrame->getLabel(m_previewFrame->getSelectedLabel())->pixmap()); + m_previewLabel->setPixmap( + *m_previewFrame->getLabel(m_previewFrame->getSelectedLabel()) + ->pixmap()); m_previewLabel->show(); - } - else + } else m_previewLabel->hide(); } -void FitsImporter::previewLabelSelected(int index) -{ +void FitsImporter::previewLabelSelected(int index) { if (m_Ui->pushButtonPreview->isChecked()) { - m_previewLabel->setPixmap(*m_previewFrame->getLabel(m_previewFrame->getSelectedLabel())->pixmap()); + m_previewLabel->setPixmap( + *m_previewFrame->getLabel(m_previewFrame->getSelectedLabel()) + ->pixmap()); } } -void FitsImporter::on_hsRedRed_valueChanged(int newValue) -{ - float value = ((float)newValue)/10000.f; +void FitsImporter::on_hsRedRed_valueChanged(int newValue) { + float value = ((float)newValue) / 10000.f; bool oldState = m_Ui->dsbRedRed->blockSignals(true); - m_Ui->dsbRedRed->setValue( value ); + m_Ui->dsbRedRed->setValue(value); m_Ui->dsbRedRed->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_dsbRedRed_valueChanged(double newValue) -{ +void FitsImporter::on_dsbRedRed_valueChanged(double newValue) { bool oldState = m_Ui->hsRedRed->blockSignals(true); - m_Ui->hsRedRed->setValue( (int)(newValue*10000) ); + m_Ui->hsRedRed->setValue((int)(newValue * 10000)); m_Ui->hsRedRed->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_hsGreenGreen_valueChanged(int newValue) -{ - float value = ((float)newValue)/10000.f; +void FitsImporter::on_hsGreenGreen_valueChanged(int newValue) { + float value = ((float)newValue) / 10000.f; bool oldState = m_Ui->dsbGreenGreen->blockSignals(true); - m_Ui->dsbGreenGreen->setValue( value ); + m_Ui->dsbGreenGreen->setValue(value); m_Ui->dsbGreenGreen->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_dsbGreenGreen_valueChanged(double newValue) -{ +void FitsImporter::on_dsbGreenGreen_valueChanged(double newValue) { bool oldState = m_Ui->hsGreenGreen->blockSignals(true); - m_Ui->hsGreenGreen->setValue( (int)(newValue*10000) ); + m_Ui->hsGreenGreen->setValue((int)(newValue * 10000)); m_Ui->hsGreenGreen->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_hsBlueBlue_valueChanged(int newValue) -{ - float value = ((float)newValue)/10000.f; +void FitsImporter::on_hsBlueBlue_valueChanged(int newValue) { + float value = ((float)newValue) / 10000.f; bool oldState = m_Ui->dsbBlueBlue->blockSignals(true); - m_Ui->dsbBlueBlue->setValue( value ); + m_Ui->dsbBlueBlue->setValue(value); m_Ui->dsbBlueBlue->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_dsbBlueBlue_valueChanged(double newValue) -{ +void FitsImporter::on_dsbBlueBlue_valueChanged(double newValue) { bool oldState = m_Ui->hsBlueBlue->blockSignals(true); - m_Ui->hsBlueBlue->setValue( (int)(newValue*10000) ); + m_Ui->hsBlueBlue->setValue((int)(newValue * 10000)); m_Ui->hsBlueBlue->blockSignals(oldState); buildPreview(); } -void FitsImporter::on_vsGamma_valueChanged(int newValue) -{ - buildPreview(); -} +void FitsImporter::on_vsGamma_valueChanged(int newValue) { buildPreview(); } -void FitsImporter::on_pushButtonReset_clicked() -{ +void FitsImporter::on_pushButtonReset_clicked() { m_data.clear(); m_tmpdata.clear(); m_contents.clear(); @@ -671,36 +641,30 @@ m_Ui->pushButtonClockwise->setEnabled(false); } -int FitsImporter::nextId() const -{ +int FitsImporter::nextId() const { int current = currentId(); - if (current == 21) // load files + if (current == 21) // load files { - return m_Ui->alignCheckBox->isChecked() - ? 22 // alignment progress - : 99; // preview page + return m_Ui->alignCheckBox->isChecked() ? 22 // alignment progress + : 99; // preview page } return QWizard::nextId(); } -bool FitsImporter::validateCurrentPage() -{ - //int current = currentId(); +bool FitsImporter::validateCurrentPage() { + // int current = currentId(); return QWizard::validateCurrentPage(); } -void FitsImporter::initializePage(int id) -{ +void FitsImporter::initializePage(int id) { int current = currentId(); if (current == 22) // alignment progress { if (m_Ui->ais_radioButton->isChecked()) { align_with_ais(); - } - else + } else align_with_mtb(); - } - else if (current == 99) // preview page + } else if (current == 99) // preview page { buildPreview(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/FitsImporter.h luminance-hdr-2.6.0/src/UI/FitsImporter.h --- luminance-hdr-2.5.1+dfsg/src/UI/FitsImporter.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/FitsImporter.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,38 +25,38 @@ #define FITSIMPORTER_H #include +#include #include #include -#include #include #include -#include "PreviewFrame.h" #include "Alignment/Align.h" #include "Common/LuminanceOptions.h" #include "HdrWizard/HdrCreationItem.h" +#include "PreviewFrame.h" namespace Ui { class FitsImporter; } -class FitsImporter : public QWizard -{ +class FitsImporter : public QWizard { Q_OBJECT -public: + public: explicit FitsImporter(QWidget *parent = 0); ~FitsImporter(); pfs::Frame *getFrame(); + QStringList &getFilenames() { return m_filenames; } -protected slots: + protected slots: void on_pushButtonLuminosity_clicked(); void on_pushButtonRed_clicked(); void on_pushButtonGreen_clicked(); void on_pushButtonBlue_clicked(); void on_pushButtonH_clicked(); - //void on_pushButtonOK_clicked(); + // void on_pushButtonOK_clicked(); void on_pushButtonLoad_clicked(); void on_pushButtonClockwise_clicked(); void on_pushButtonPreview_clicked(); @@ -75,16 +75,15 @@ void on_vsGamma_valueChanged(int newValue); void on_pushButtonReset_clicked(); -signals: + signals: void setValue(int); void setRange(int, int); -protected: + protected: virtual int nextId() const; virtual bool validateCurrentPage(); virtual void initializePage(int id); - void checkLoadButton(); bool framesHaveSameSize(); void buildContents(); @@ -98,7 +97,7 @@ pfs::Frame *m_frame; PreviewFrame *m_previewFrame; - QLabel* m_previewLabel; + QLabel *m_previewLabel; LuminanceOptions m_luminance_options; @@ -110,18 +109,19 @@ HdrCreationItemContainer m_data; HdrCreationItemContainer m_tmpdata; - std::vector > m_contents; + std::vector> m_contents; std::vector m_qimages; - //QFutureWatcher m_futureWatcher; + QStringList m_filenames; + // QFutureWatcher m_futureWatcher; // alignment std::unique_ptr m_align; QScopedPointer m_Ui; -private: - void selectInputFile(QLineEdit* textField, QString* channel); + private: + void selectInputFile(QLineEdit *textField, QString *channel); }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/FlowLayout.cpp luminance-hdr-2.6.0/src/UI/FlowLayout.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/FlowLayout.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/FlowLayout.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -43,37 +43,29 @@ #include "FlowLayout.h" //! [1] FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing) - : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing) -{ + : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing) { setContentsMargins(margin, margin, margin, margin); } FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing) - : m_hSpace(hSpacing), m_vSpace(vSpacing) -{ + : m_hSpace(hSpacing), m_vSpace(vSpacing) { setContentsMargins(margin, margin, margin, margin); } //! [1] //! [2] -FlowLayout::~FlowLayout() -{ +FlowLayout::~FlowLayout() { QLayoutItem *item; - while ((item = takeAt(0))) - delete item; + while ((item = takeAt(0))) delete item; } //! [2] //! [3] -void FlowLayout::addItem(QLayoutItem *item) -{ - itemList.append(item); -} +void FlowLayout::addItem(QLayoutItem *item) { itemList.append(item); } //! [3] //! [4] -int FlowLayout::horizontalSpacing() const -{ +int FlowLayout::horizontalSpacing() const { if (m_hSpace >= 0) { return m_hSpace; } else { @@ -81,8 +73,7 @@ } } -int FlowLayout::verticalSpacing() const -{ +int FlowLayout::verticalSpacing() const { if (m_vSpace >= 0) { return m_vSpace; } else { @@ -92,18 +83,13 @@ //! [4] //! [5] -int FlowLayout::count() const -{ - return itemList.size(); -} +int FlowLayout::count() const { return itemList.size(); } -QLayoutItem *FlowLayout::itemAt(int index) const -{ +QLayoutItem *FlowLayout::itemAt(int index) const { return itemList.value(index); } -QLayoutItem *FlowLayout::takeAt(int index) -{ +QLayoutItem *FlowLayout::takeAt(int index) { if (index >= 0 && index < itemList.size()) return itemList.takeAt(index); else @@ -112,74 +98,61 @@ //! [5] //! [6] -Qt::Orientations FlowLayout::expandingDirections() const -{ - return 0; -} +Qt::Orientations FlowLayout::expandingDirections() const { return 0; } //! [6] //! [7] -bool FlowLayout::hasHeightForWidth() const -{ - return true; -} +bool FlowLayout::hasHeightForWidth() const { return true; } -int FlowLayout::heightForWidth(int width) const -{ +int FlowLayout::heightForWidth(int width) const { int height = doLayout(QRect(0, 0, width, 0), true); return height; } //! [7] //! [8] -void FlowLayout::setGeometry(const QRect &rect) -{ +void FlowLayout::setGeometry(const QRect &rect) { QLayout::setGeometry(rect); doLayout(rect, false); } -QSize FlowLayout::sizeHint() const -{ - return minimumSize(); -} +QSize FlowLayout::sizeHint() const { return minimumSize(); } -QSize FlowLayout::minimumSize() const -{ +QSize FlowLayout::minimumSize() const { QSize size; QLayoutItem *item; foreach (item, itemList) size = size.expandedTo(item->minimumSize()); - size += QSize(2*margin(), 2*margin()); + size += QSize(2 * margin(), 2 * margin()); return size; } //! [8] //! [9] -int FlowLayout::doLayout(const QRect &rect, bool testOnly) const -{ +int FlowLayout::doLayout(const QRect &rect, bool testOnly) const { int left, top, right, bottom; getContentsMargins(&left, &top, &right, &bottom); QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom); int x = effectiveRect.x(); int y = effectiveRect.y(); int lineHeight = 0; -//! [9] + //! [9] -//! [10] - QLayoutItem *item; - foreach (item, itemList) { + //! [10] + foreach (QLayoutItem *item, itemList) { QWidget *wid = item->widget(); int spaceX = horizontalSpacing(); if (spaceX == -1) - spaceX = wid->style()->layoutSpacing( - QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal); + spaceX = wid->style()->layoutSpacing(QSizePolicy::PushButton, + QSizePolicy::PushButton, + Qt::Horizontal); int spaceY = verticalSpacing(); if (spaceY == -1) spaceY = wid->style()->layoutSpacing( QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical); -//! [10] -//! [11] + //! [10] + //! [11] int nextX = x + item->sizeHint().width() + spaceX; if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) { x = effectiveRect.x(); @@ -188,8 +161,7 @@ lineHeight = 0; } - if (!testOnly) - item->setGeometry(QRect(QPoint(x, y), item->sizeHint())); + if (!testOnly) item->setGeometry(QRect(QPoint(x, y), item->sizeHint())); x = nextX; lineHeight = qMax(lineHeight, item->sizeHint().height()); @@ -198,8 +170,7 @@ } //! [11] //! [12] -int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const -{ +int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const { QObject *parent = this->parent(); if (!parent) { return -1; diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/FlowLayout.h luminance-hdr-2.6.0/src/UI/FlowLayout.h --- luminance-hdr-2.5.1+dfsg/src/UI/FlowLayout.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/FlowLayout.h 2019-06-09 19:18:38.000000000 +0000 @@ -43,15 +43,15 @@ #include #include -#include #include +#include //! [0] -class FlowLayout : public QLayout -{ +class FlowLayout : public QLayout { Q_OBJECT -public: - FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); + public: + FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, + int vSpacing = -1); FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); ~FlowLayout(); @@ -69,7 +69,7 @@ QLayoutItem *takeAt(int index); int getSize() { return itemList.size(); } -private: + private: int doLayout(const QRect &rect, bool testOnly) const; int smartSpacing(QStyle::PixelMetric pm) const; diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/GammaAndLevels.cpp luminance-hdr-2.6.0/src/UI/GammaAndLevels.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/GammaAndLevels.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/GammaAndLevels.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,39 +21,34 @@ * @author Giuseppe Rota */ -#include #include +#include #include #include -#include #include +#include #include "UI/GammaAndLevels.h" -#include "ui_GammaAndLevels.h" +#include "UI/ui_GammaAndLevels.h" -namespace -{ -static inline -int clamp(const float& v, const float& minV, const float& maxV) -{ - if ( v <= minV ) return minV; - if ( v >= maxV ) return maxV; +namespace { +static inline int clamp(const float &v, const float &minV, const float &maxV) { + if (v <= minV) return minV; + if (v >= maxV) return maxV; return (int)(v + 0.5f); } - } -GammaAndLevels::GammaAndLevels(QWidget *parent, const QImage& data) : - QDialog(parent, Qt::Dialog), - m_ReferenceQImage(data), - blackin(0), - whitein(255), - blackout(0), - whiteout(255), - gamma(1.0f), - m_Ui(new Ui::LevelsDialog) -{ +GammaAndLevels::GammaAndLevels(QWidget *parent, const QImage &data) + : QDialog(parent, Qt::Dialog), + m_ReferenceQImage(data), + blackin(0), + whitein(255), + blackout(0), + whiteout(255), + gamma(1.0f), + m_Ui(new Ui::LevelsDialog) { m_Ui->setupUi(this); QVBoxLayout *qvl = new QVBoxLayout; @@ -63,108 +58,116 @@ histogram = new HistogramLDR(this); histogram->setData(&m_ReferenceQImage); - histogram->setFrame(false); // remove histogram frame + histogram->setFrame(false); // remove histogram frame - gb1=new GrayBar(m_Ui->inputStuffFrame); + gb1 = new GrayBar(m_Ui->inputStuffFrame); - connect(m_Ui->black_in_spinbox,SIGNAL(valueChanged(int)),gb1,SLOT(changeBlack(int))); - connect(m_Ui->gamma_spinbox,SIGNAL(valueChanged(double)),gb1,SLOT(changeGamma(double))); - connect(m_Ui->white_in_spinbox,SIGNAL(valueChanged(int)),gb1,SLOT(changeWhite(int))); - - connect(gb1,SIGNAL(black_changed(int)),this,SLOT(updateBlackIn(int))); - connect(gb1,SIGNAL(gamma_changed(double)),this,SLOT(updateGamma(double))); - connect(gb1,SIGNAL(white_changed(int)),this,SLOT(updateWhiteIn(int))); - connect(gb1,SIGNAL(default_gamma_black_white()),this,SLOT(defaultGammaBlackWhiteIn())); + connect(m_Ui->black_in_spinbox, SIGNAL(valueChanged(int)), gb1, + SLOT(changeBlack(int))); + connect(m_Ui->gamma_spinbox, SIGNAL(valueChanged(double)), gb1, + SLOT(changeGamma(double))); + connect(m_Ui->white_in_spinbox, SIGNAL(valueChanged(int)), gb1, + SLOT(changeWhite(int))); + + connect(gb1, &GrayBar::black_changed, this, &GammaAndLevels::updateBlackIn); + connect(gb1, &GrayBar::gamma_changed, this, &GammaAndLevels::updateGamma); + connect(gb1, &GrayBar::white_changed, this, &GammaAndLevels::updateWhiteIn); + connect(gb1, &GrayBar::default_gamma_black_white, this, + &GammaAndLevels::defaultGammaBlackWhiteIn); qvl->addWidget(histogram); qvl->addWidget(gb1); m_Ui->inputStuffFrame->setLayout(qvl); - QVBoxLayout *qvl2=new QVBoxLayout; + QVBoxLayout *qvl2 = new QVBoxLayout; qvl2->setMargin(0); qvl2->setSpacing(1); - gb2=new GrayBar(m_Ui->out_levels,true); - connect(m_Ui->black_out_spinbox,SIGNAL(valueChanged(int)),gb2,SLOT(changeBlack(int))); - connect(m_Ui->white_out_spinbox,SIGNAL(valueChanged(int)),gb2,SLOT(changeWhite(int))); - - connect(gb2,SIGNAL(black_changed(int)),this,SLOT(updateBlackOut(int))); - connect(gb2,SIGNAL(white_changed(int)),this,SLOT(updateWhiteOut(int))); - connect(gb2,SIGNAL(default_black_white()),this,SLOT(defaultBlackWhiteOut())); - - connect(m_Ui->ResetButton,SIGNAL(clicked()),gb1,SLOT(resetvalues())); - connect(m_Ui->ResetButton,SIGNAL(clicked()),gb2,SLOT(resetvalues())); - connect(m_Ui->ResetButton,SIGNAL(clicked()),this,SLOT(resetValues())); + gb2 = new GrayBar(m_Ui->out_levels, true); + connect(m_Ui->black_out_spinbox, SIGNAL(valueChanged(int)), gb2, + SLOT(changeBlack(int))); + connect(m_Ui->white_out_spinbox, SIGNAL(valueChanged(int)), gb2, + SLOT(changeWhite(int))); + + connect(gb2, &GrayBar::black_changed, this, + &GammaAndLevels::updateBlackOut); + connect(gb2, &GrayBar::white_changed, this, + &GammaAndLevels::updateWhiteOut); + connect(gb2, &GrayBar::default_black_white, this, + &GammaAndLevels::defaultBlackWhiteOut); + + connect(m_Ui->ResetButton, &QAbstractButton::clicked, gb1, + &GrayBar::resetvalues); + connect(m_Ui->ResetButton, &QAbstractButton::clicked, gb2, + &GrayBar::resetvalues); + connect(m_Ui->ResetButton, &QAbstractButton::clicked, this, + &GammaAndLevels::resetValues); qvl2->addWidget(gb2); m_Ui->out_levels->setLayout(qvl2); } -GammaAndLevels::~GammaAndLevels() -{ +GammaAndLevels::~GammaAndLevels() { delete gb1; delete gb2; delete histogram; } -void GammaAndLevels::defaultGammaBlackWhiteIn() -{ +void GammaAndLevels::defaultGammaBlackWhiteIn() { qDebug("GammaAndLevels::defaultGammaBlackWhiteIn"); - blackin=0; - gamma=1.0f; - whitein=255; + blackin = 0; + gamma = 1.0f; + whitein = 255; } -void GammaAndLevels::defaultBlackWhiteOut() -{ +void GammaAndLevels::defaultBlackWhiteOut() { qDebug("GammaAndLevels::defaultBlackWhiteOut"); - blackout=0; - whiteout=255; + blackout = 0; + whiteout = 255; } void GammaAndLevels::updateBlackIn(int v) { qDebug("GammaAndLevels::updateBlackIn"); - m_Ui->black_in_spinbox->setValue(v); - blackin=v; + m_Ui->black_in_spinbox->setValue(v); + blackin = v; refreshLUT(); } void GammaAndLevels::updateGamma(double v) { qDebug("GammaAndLevels::updateGamma"); - gb1->dont_emit=true; - m_Ui->gamma_spinbox->setValue(v); - gamma=v; + gb1->dont_emit = true; + m_Ui->gamma_spinbox->setValue(v); + gamma = v; refreshLUT(); } void GammaAndLevels::updateWhiteIn(int v) { qDebug("GammaAndLevels::updateWhiteIn"); - m_Ui->white_in_spinbox->setValue(v); - whitein=v; + m_Ui->white_in_spinbox->setValue(v); + whitein = v; refreshLUT(); } void GammaAndLevels::updateBlackOut(int v) { qDebug("GammaAndLevels::updateBlackOut"); - m_Ui->black_out_spinbox->setValue(v); - blackout=v; + m_Ui->black_out_spinbox->setValue(v); + blackout = v; refreshLUT(); } void GammaAndLevels::updateWhiteOut(int v) { qDebug("GammaAndLevels::updateWhiteOut"); - m_Ui->white_out_spinbox->setValue(v); - whiteout=v; + m_Ui->white_out_spinbox->setValue(v); + whiteout = v; refreshLUT(); } -void GammaAndLevels::resetValues() -{ +void GammaAndLevels::resetValues() { #ifdef QT_DEBUG qDebug("GammaAndLevels::resetValues"); #endif - blackin=0; - gamma=1.0f; - whitein=255; - blackout=0; - whiteout=255; - gb1->dont_emit=true; + blackin = 0; + gamma = 1.0f; + whitein = 255; + blackout = 0; + whiteout = 255; + gb1->dont_emit = true; m_Ui->black_in_spinbox->setValue(0); m_Ui->gamma_spinbox->setValue(1); m_Ui->white_in_spinbox->setValue(255); @@ -173,440 +176,416 @@ refreshLUT(); } -void GammaAndLevels::refreshLUT() -{ +void GammaAndLevels::refreshLUT() { #ifdef QT_DEBUG qDebug() << "Update Look-Up-Table and send update QImage to viewer"; #endif - //values in 0..1 range - float bin = static_cast(blackin)/255.0f; - float win = static_cast(whitein)/255.0f; - float expgamma = 1.0f/gamma; + // values in 0..1 range + float bin = static_cast(blackin) / 255.0f; + float win = static_cast(whitein) / 255.0f; + float expgamma = 1.0f / gamma; // Build new QImage from the reference one - const QRgb* src = reinterpret_cast(m_ReferenceQImage.bits()); + const QRgb *src = reinterpret_cast(m_ReferenceQImage.bits()); - QImage previewimage(m_ReferenceQImage.width(), m_ReferenceQImage.height(), QImage::Format_RGB32); - QRgb* dst = reinterpret_cast(previewimage.bits()); + QImage previewimage(m_ReferenceQImage.width(), m_ReferenceQImage.height(), + QImage::Format_RGB32); + QRgb *dst = reinterpret_cast(previewimage.bits()); #pragma omp parallel for shared(src, dst) - for (int i=0; i < m_ReferenceQImage.width()*m_ReferenceQImage.height(); ++i) - { - float red = static_cast(qRed(src[i]))/255.f; - float green = static_cast(qGreen(src[i]))/255.f; - float blue = static_cast(qBlue(src[i]))/255.f; - - float L = 0.2126f * red - + 0.7152f * green - + 0.0722f * blue; // number between [0..1] + for (int i = 0; i < m_ReferenceQImage.width() * m_ReferenceQImage.height(); + ++i) { + float red = static_cast(qRed(src[i])) / 255.f; + float green = static_cast(qGreen(src[i])) / 255.f; + float blue = static_cast(qBlue(src[i])) / 255.f; + + float L = 0.2126f * red + 0.7152f * green + + 0.0722f * blue; // number between [0..1] float c = powf(L, expgamma - 1.0f); - red = (red - bin) / (win-bin); + red = (red - bin) / (win - bin); red *= c; - green = (green - bin) / (win-bin); + green = (green - bin) / (win - bin); green *= c; - blue = (blue - bin) / (win-bin); + blue = (blue - bin) / (win - bin); blue *= c; - dst[i] = qRgb(clamp(blackout+red * (whiteout - blackout), 0.f, 255.f), - clamp(blackout+green * (whiteout - blackout), 0.f, 255.f), - clamp(blackout+blue * (whiteout - blackout), 0.f, 255.f)); + dst[i] = + qRgb(clamp(blackout + red * (whiteout - blackout), 0.f, 255.f), + clamp(blackout + green * (whiteout - blackout), 0.f, 255.f), + clamp(blackout + blue * (whiteout - blackout), 0.f, 255.f)); } emit updateQImage(previewimage); } -QImage GammaAndLevels::getReferenceQImage() -{ - return m_ReferenceQImage; -} +QImage GammaAndLevels::getReferenceQImage() { return m_ReferenceQImage; } -float GammaAndLevels::getBlackPointInput() -{ - return (float)blackin/255.f; -} +float GammaAndLevels::getBlackPointInput() { return (float)blackin / 255.f; } -float GammaAndLevels::getBlackPointOutput() -{ - return (float)blackout/255.f; -} +float GammaAndLevels::getBlackPointOutput() { return (float)blackout / 255.f; } -float GammaAndLevels::getWhitePointInput() -{ - return (float)whitein/255.f; -} +float GammaAndLevels::getWhitePointInput() { return (float)whitein / 255.f; } -float GammaAndLevels::getWhitePointOutput() -{ - return (float)whiteout/255.f; -} +float GammaAndLevels::getWhitePointOutput() { return (float)whiteout / 255.f; } -float GammaAndLevels::getGamma() -{ - return (1.0f/gamma); -} +float GammaAndLevels::getGamma() { return (1.0f / gamma); } -HistogramLDR::HistogramLDR(QWidget *parent): - QWidget(parent), - isDrawFrame(true), - isDrawColorHist(false) -{ +HistogramLDR::HistogramLDR(QWidget *parent) + : QWidget(parent), isDrawFrame(true), isDrawColorHist(false) { setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); } -void HistogramLDR::setData(const QImage* data) -{ +void HistogramLDR::setData(const QImage *data) { for (int i = 0; i < 256; ++i) m_GreyHist[i] = 0.0f; for (int i = 0; i < 256; ++i) m_RedHist[i] = 0.0f; for (int i = 0; i < 256; ++i) m_GreenHist[i] = 0.0f; for (int i = 0; i < 256; ++i) m_BlueHist[i] = 0.0f; - if ( data->isNull() ) return; + if (data->isNull()) return; // Build histogram - const QRgb* pixels = (const QRgb*)(data->bits()); - const int ELEMS = data->width()*data->height(); - for (int i = 0; i < ELEMS; ++i) - { - m_GreyHist[ qGray(pixels[i]) ] += 1.0f; - - m_RedHist[ qRed(pixels[i]) ] += 1.0f; - m_GreenHist[ qGreen(pixels[i]) ] += 1.0f; - m_BlueHist[ qBlue(pixels[i]) ] += 1.0f; + const QRgb *pixels = (const QRgb *)(data->bits()); + const int ELEMS = data->width() * data->height(); + for (int i = 0; i < ELEMS; ++i) { + m_GreyHist[qGray(pixels[i])] += 1.0f; + + m_RedHist[qRed(pixels[i])] += 1.0f; + m_GreenHist[qGreen(pixels[i])] += 1.0f; + m_BlueHist[qBlue(pixels[i])] += 1.0f; } - //find max + // find max float hist_max = m_GreyHist[0]; for (int i = 0; i < 256; ++i) hist_max = qMax(hist_max, m_GreyHist[i]); for (int i = 0; i < 256; ++i) hist_max = qMax(hist_max, m_RedHist[i]); for (int i = 0; i < 256; ++i) hist_max = qMax(hist_max, m_GreenHist[i]); for (int i = 0; i < 256; ++i) hist_max = qMax(hist_max, m_BlueHist[i]); - //normalize in the range [0...1] + // normalize in the range [0...1] for (int i = 0; i < 256; ++i) m_GreyHist[i] /= hist_max; for (int i = 0; i < 256; ++i) m_RedHist[i] /= hist_max; for (int i = 0; i < 256; ++i) m_GreenHist[i] /= hist_max; for (int i = 0; i < 256; ++i) m_BlueHist[i] /= hist_max; - //qDebug() << "hist_max = "<< hist_max << "grey_hist_max = " << grey_hist_max; + // qDebug() << "hist_max = "<< hist_max << "grey_hist_max = " << + // grey_hist_max; } -void HistogramLDR::paintEvent( QPaintEvent * ) -{ - const qreal skew = (qreal)width()/256; +void HistogramLDR::paintEvent(QPaintEvent *) { + const qreal skew = (qreal)width() / 256; QPainter painter(this); - //painter.setRenderHint(QPainter::Antialiasing, true); // antialiasing + // painter.setRenderHint(QPainter::Antialiasing, true); // antialiasing QPolygonF pol_grey; - if ( isDrawColorHist ) - { + if (isDrawColorHist) { // reuse pol_grey to print also red/green/blue components pol_grey.clear(); pol_grey << QPointF(0.0, height()); - for (int i = 0; i < 256; ++i) - { - pol_grey << QPointF(i*skew, (1.0 - m_RedHist[i])*height()); - pol_grey << QPointF((i+1)*skew, (1.0 - m_RedHist[i])*height()); + for (int i = 0; i < 256; ++i) { + pol_grey << QPointF(i * skew, (1.0 - m_RedHist[i]) * height()); + pol_grey << QPointF((i + 1) * skew, + (1.0 - m_RedHist[i]) * height()); } // last point, bottom right corner pol_grey << QPointF(width(), height()); // Draw histogram - painter.setBrush( Qt::NoBrush ); //( QColor(255, 0, 0, 160) ); // semi-transparent brush - painter.setPen( QPen(QBrush(QColor(255, 0, 0, 255)), 1.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); + painter.setBrush(Qt::NoBrush); //( QColor(255, 0, 0, 160) ); // + // semi-transparent brush + painter.setPen(QPen(QBrush(QColor(255, 0, 0, 255)), 1.0, Qt::SolidLine, + Qt::RoundCap, Qt::RoundJoin)); painter.drawConvexPolygon(pol_grey); // reuse pol_grey to print also red/green/blue components - pol_grey.clear(); // reuse of pol_grey + pol_grey.clear(); // reuse of pol_grey pol_grey << QPointF(0.0, height()); - for (int i = 0; i < 256; ++i) - { - pol_grey << QPointF(i*skew, (1.0 - m_GreenHist[i])*height()); - pol_grey << QPointF((i+1)*skew, (1.0 - m_GreenHist[i])*height()); + for (int i = 0; i < 256; ++i) { + pol_grey << QPointF(i * skew, (1.0 - m_GreenHist[i]) * height()); + pol_grey << QPointF((i + 1) * skew, + (1.0 - m_GreenHist[i]) * height()); } // last point, bottom right corner pol_grey << QPointF(width(), height()); // Draw histogram - painter.setBrush( Qt::NoBrush ); //( QColor(0, 255, 0, 160) ); // semi-transparent brush - painter.setPen( QPen(QBrush(QColor(0, 255, 0, 255)), 1.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); + painter.setBrush(Qt::NoBrush); //( QColor(0, 255, 0, 160) ); // + // semi-transparent brush + painter.setPen(QPen(QBrush(QColor(0, 255, 0, 255)), 1.0, Qt::SolidLine, + Qt::RoundCap, Qt::RoundJoin)); painter.drawConvexPolygon(pol_grey); - pol_grey.clear(); // reuse of pol_grey + pol_grey.clear(); // reuse of pol_grey pol_grey << QPointF(0.0, height()); - for (int i = 0; i < 256; ++i) - { - pol_grey << QPointF(i*skew, (1.0 - m_BlueHist[i])*height()); - pol_grey << QPointF((i+1)*skew, (1.0 - m_BlueHist[i])*height()); + for (int i = 0; i < 256; ++i) { + pol_grey << QPointF(i * skew, (1.0 - m_BlueHist[i]) * height()); + pol_grey << QPointF((i + 1) * skew, + (1.0 - m_BlueHist[i]) * height()); } // last point, bottom right corner pol_grey << QPointF(width(), height()); // Draw histogram - painter.setBrush( Qt::NoBrush ); //QColor(0, 0, 255, 160) ); // semi-transparent brush - painter.setPen( QPen(QBrush(QColor(0, 0, 255, 255)), 1.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); + painter.setBrush(Qt::NoBrush); // QColor(0, 0, 255, 160) ); // + // semi-transparent brush + painter.setPen(QPen(QBrush(QColor(0, 0, 255, 255)), 1.0, Qt::SolidLine, + Qt::RoundCap, Qt::RoundJoin)); painter.drawConvexPolygon(pol_grey); } // first point, left bottom corner pol_grey.clear(); pol_grey << QPointF(0.0, height()); - for (int i = 0; i < 256; ++i) - { - pol_grey << QPointF(i*skew, (1.0 - m_GreyHist[i])*height()); - pol_grey << QPointF((i+1)*skew, (1.0 - m_GreyHist[i])*height()); + for (int i = 0; i < 256; ++i) { + pol_grey << QPointF(i * skew, (1.0 - m_GreyHist[i]) * height()); + pol_grey << QPointF((i + 1) * skew, (1.0 - m_GreyHist[i]) * height()); } // last point, bottom right corner pol_grey << QPointF(width(), height()); // Draw histogram - painter.setBrush( QColor(160, 160, 160, 50) ); // semi-transparent brush - painter.setPen( QPen(QBrush(QColor(20, 20, 20, 255)), 1.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin) ); + painter.setBrush(QColor(160, 160, 160, 50)); // semi-transparent brush + painter.setPen(QPen(QBrush(QColor(20, 20, 20, 255)), 1.0, Qt::SolidLine, + Qt::RoundCap, Qt::RoundJoin)); painter.drawConvexPolygon(pol_grey); // Draw frame - if ( isDrawFrame ) - { + if (isDrawFrame) { painter.setPen(Qt::black); painter.setBrush(Qt::NoBrush); - painter.drawRect(QRect(0,0,width()-1,height()-1)); + painter.drawRect(QRect(0, 0, width() - 1, height() - 1)); } } -void HistogramLDR::mouseDoubleClickEvent( QMouseEvent * event ) -{ +void HistogramLDR::mouseDoubleClickEvent(QMouseEvent *event) { // repaint - if (event->button() == Qt::LeftButton) - { - isDrawColorHist = !isDrawColorHist; // revert condition + if (event->button() == Qt::LeftButton) { + isDrawColorHist = !isDrawColorHist; // revert condition repaint(); } } -void HistogramLDR::setFrame(bool b) -{ - isDrawFrame = b; -} +void HistogramLDR::setFrame(bool b) { isDrawFrame = b; } -void HistogramLDR::setColorHistogram(bool b) -{ - isDrawColorHist = b; -} +void HistogramLDR::setColorHistogram(bool b) { isDrawColorHist = b; } -QSize HistogramLDR::sizeHint () const -{ - return QSize( 255, 120 ); -} +QSize HistogramLDR::sizeHint() const { return QSize(255, 120); } -QSize HistogramLDR::minimumSizeHint () const -{ - return QSize( 255, 120 ); -} +QSize HistogramLDR::minimumSizeHint() const { return QSize(255, 120); } -HistogramLDR::~HistogramLDR() -{} +HistogramLDR::~HistogramLDR() {} -GrayBar::GrayBar(QWidget *parent, bool two_handles): - QWidget(parent), - dont_emit(false) -{ - twohandles=two_handles; - dragging=DRAGNONE; -// qDebug("width=%d, height=%d",width(),height()); +GrayBar::GrayBar(QWidget *parent, bool two_handles) + : QWidget(parent), dont_emit(false) { + twohandles = two_handles; + dragging = DRAGNONE; + // qDebug("width=%d, height=%d",width(),height()); } -QSize GrayBar::sizeHint () const { - return QSize( 500, 22 ); -} -QSize GrayBar::minimumSizeHint () const { - return QSize( 400, 22 ); -} +QSize GrayBar::sizeHint() const { return QSize(500, 22); } +QSize GrayBar::minimumSizeHint() const { return QSize(400, 22); } -void GrayBar::mouseMoveEvent( QMouseEvent * e ) { - if (dragging==DRAGNONE) - return; +void GrayBar::mouseMoveEvent(QMouseEvent *e) { + if (dragging == DRAGNONE) return; - //here we have to make sure that we keep the "order": black,(gray),white - if (dragging==DRAGBLACK) { - if (e->x()<=whitepos && e->x()>=0) { - //update graphical position of gray handle - gammapos=e->x()+(int)(blackgrayratio*(whitepos-e->x())); - //update graphical position of black handle - blackpos=e->x(); + // here we have to make sure that we keep the "order": black,(gray),white + if (dragging == DRAGBLACK) { + if (e->x() <= whitepos && e->x() >= 0) { + // update graphical position of gray handle + gammapos = e->x() + (int)(blackgrayratio * (whitepos - e->x())); + // update graphical position of black handle + blackpos = e->x(); update(); } return; } - if (dragging==DRAGWHITE) { - if (e->x()>=blackpos && e->x()<=width()) { - //update graphical position of gray handle - gammapos=e->x()-(int)((1.0f-blackgrayratio)*(e->x()-blackpos)); - //update graphical position of white handle - whitepos=e->x(); + if (dragging == DRAGWHITE) { + if (e->x() >= blackpos && e->x() <= width()) { + // update graphical position of gray handle + gammapos = + e->x() - (int)((1.0f - blackgrayratio) * (e->x() - blackpos)); + // update graphical position of white handle + whitepos = e->x(); update(); } return; } - if (dragging==DRAGGRAY) { - if (e->x()>=blackpos && e->x()<=whitepos) { - //update graphical position of gray handle - blackgrayratio=(float)(e->x()-blackpos)/(float)(whitepos-blackpos); - //update graphical position of white handle - gammapos=e->x(); + if (dragging == DRAGGRAY) { + if (e->x() >= blackpos && e->x() <= whitepos) { + // update graphical position of gray handle + blackgrayratio = + (float)(e->x() - blackpos) / (float)(whitepos - blackpos); + // update graphical position of white handle + gammapos = e->x(); update(); } return; } } -void GrayBar::mousePressEvent( QMouseEvent * e ) { - dragging=findHandle(e->x(),e->y()); +void GrayBar::mousePressEvent(QMouseEvent *e) { + dragging = findHandle(e->x(), e->y()); } -void GrayBar::mouseReleaseEvent( QMouseEvent * e) { - if (dragging==DRAGBLACK) { - emit black_changed( (int)(255*((float)(blackpos)/(float)(width()))) ); - } - if (dragging==DRAGWHITE) { - emit white_changed( (int)(255*((float)(whitepos)/(float)(width()))) ); - } - if (dragging==DRAGGRAY) { - float mediumpos = (float)blackpos+ ((float)whitepos-(float)blackpos)/2.0f; - if (e->x()>mediumpos) { -//exp10f is not defined on MinGW in windows. +void GrayBar::mouseReleaseEvent(QMouseEvent *e) { + if (dragging == DRAGBLACK) { + emit black_changed((int)(255 * ((float)(blackpos) / (float)(width())))); + } + if (dragging == DRAGWHITE) { + emit white_changed((int)(255 * ((float)(whitepos) / (float)(width())))); + } + if (dragging == DRAGGRAY) { + float mediumpos = + (float)blackpos + ((float)whitepos - (float)blackpos) / 2.0f; + if (e->x() > mediumpos) { +// exp10f is not defined on MinGW in windows. #ifdef _GNU_SOURCE - emit gamma_changed( exp10f( (mediumpos-(float)e->x())/((float)(whitepos)-mediumpos) ) ); + emit gamma_changed(exp10f((mediumpos - (float)e->x()) / + ((float)(whitepos)-mediumpos))); } else { - emit gamma_changed( exp10f( (mediumpos-(float)e->x())/(mediumpos-(float)(blackpos)) ) ); + emit gamma_changed(exp10f((mediumpos - (float)e->x()) / + (mediumpos - (float)(blackpos)))); #else - emit gamma_changed( powf(10.0f, (mediumpos-(float)e->x())/((float)(whitepos)-mediumpos) ) ); + emit gamma_changed(powf( + 10.0f, + (mediumpos - (float)e->x()) / ((float)(whitepos)-mediumpos))); } else { - emit gamma_changed( powf(10.0f, (mediumpos-(float)e->x())/(mediumpos-(float)(blackpos)) ) ); + emit gamma_changed(powf( + 10.0f, + (mediumpos - (float)e->x()) / (mediumpos - (float)(blackpos)))); #endif } } - dragging=DRAGNONE; + dragging = DRAGNONE; update(); } GrayBar::draggingT GrayBar::findHandle(int x, int y) { - - QRect black_rect(blackpos-25,1+(height()-1)/2, 50, (height()-1)-(1+(height()-1)/2)); - QRect white_rect(whitepos-25,1+(height()-1)/2, 50, (height()-1)-(1+(height()-1)/2)); - - //mouse click belongs to both white and black rects, and there's some space on the left of the black coordinate - if ( black_rect.contains(x,y,false) && white_rect.contains(x,y,false) && blackpos!=0 ) { + QRect black_rect(blackpos - 25, 1 + (height() - 1) / 2, 50, + (height() - 1) - (1 + (height() - 1) / 2)); + QRect white_rect(whitepos - 25, 1 + (height() - 1) / 2, 50, + (height() - 1) - (1 + (height() - 1) / 2)); + + // mouse click belongs to both white and black rects, and there's some space + // on the left of the black coordinate + if (black_rect.contains(x, y, false) && white_rect.contains(x, y, false) && + blackpos != 0) { return DRAGBLACK; } - //mouse click belongs to both white and black rects, and there's some space on the right of the white coordinate - if ( black_rect.contains(x,y,false) && white_rect.contains(x,y,false) && whitepos!=width() ) { + // mouse click belongs to both white and black rects, and there's some space + // on the right of the white coordinate + if (black_rect.contains(x, y, false) && white_rect.contains(x, y, false) && + whitepos != width()) { return DRAGWHITE; } - //check if we clicked on black handle - if ( black_rect.contains(x,y,false) ) { + // check if we clicked on black handle + if (black_rect.contains(x, y, false)) { return DRAGBLACK; } - //check if we clicked on white handle - if ( white_rect.contains(x,y,false) ) { + // check if we clicked on white handle + if (white_rect.contains(x, y, false)) { return DRAGWHITE; } - //check if we clicked on gray handle + // check if we clicked on gray handle if (!twohandles) { - QRect gray_rect(gammapos-25,1+(height() - 1)/2, 50, (height() - 1)-(1+(height() - 1)/2)); - if ( gray_rect.contains(x,y,false) ) { + QRect gray_rect(gammapos - 25, 1 + (height() - 1) / 2, 50, + (height() - 1) - (1 + (height() - 1) / 2)); + if (gray_rect.contains(x, y, false)) { return DRAGGRAY; } } return DRAGNONE; } -void GrayBar::resizeEvent ( QResizeEvent * ) { +void GrayBar::resizeEvent(QResizeEvent *) { qDebug("GrayBar::resizeEvent"); resetvalues(); -//this one below does not work, we resetvalues for the time being. -// float factor=(float)(e->size().width())/(float)(e->oldSize().width()); -// qDebug("factor=%f",factor); -// blackpos=(int)( (float)blackpos*( factor ) ); -// whitepos=(int)( (float)whitepos*( factor ) ); -// gammapos=(int)( (float)gammapos*( factor ) ); -// update(); + // this one below does not work, we resetvalues for the time being. + // float + // factor=(float)(e->size().width())/(float)(e->oldSize().width()); + // qDebug("factor=%f",factor); + // blackpos=(int)( (float)blackpos*( factor ) ); + // whitepos=(int)( (float)whitepos*( factor ) ); + // gammapos=(int)( (float)gammapos*( factor ) ); + // update(); } -void GrayBar::paintEvent( QPaintEvent * ) { +void GrayBar::paintEvent(QPaintEvent *) { QPainter painter(this); - QLinearGradient linearGradient(0, height()/2, width(), height()/2); + QLinearGradient linearGradient(0, height() / 2, width(), height() / 2); linearGradient.setColorAt(0.0, Qt::black); linearGradient.setColorAt(0.5, Qt::darkGray); linearGradient.setColorAt(1.0, Qt::white); painter.setBrush(linearGradient); painter.setPen(Qt::NoPen); - painter.drawRect(QRect(0, 0, width() - 1, (height() - 1)/2)); + painter.drawRect(QRect(0, 0, width() - 1, (height() - 1) / 2)); painter.setPen(Qt::black); - //draw black triangle + // draw black triangle static QPoint black_tri[3] = { - QPoint(blackpos, 1+(height() - 1)/2), - QPoint(blackpos-5, (height() - 1)), - QPoint(blackpos+5, (height() - 1)), + QPoint(blackpos, 1 + (height() - 1) / 2), + QPoint(blackpos - 5, (height() - 1)), + QPoint(blackpos + 5, (height() - 1)), }; black_tri[0].setX(blackpos); - black_tri[1].setX(blackpos-5); - black_tri[2].setX(blackpos+5); - black_tri[0].setY(1+(height() - 1)/2); - black_tri[1].setY(height()-1); - black_tri[2].setY(height()-1); + black_tri[1].setX(blackpos - 5); + black_tri[2].setX(blackpos + 5); + black_tri[0].setY(1 + (height() - 1) / 2); + black_tri[1].setY(height() - 1); + black_tri[2].setY(height() - 1); painter.setBrush(QBrush(Qt::black)); - painter.drawPolygon(black_tri,3); - //draw white triangle + painter.drawPolygon(black_tri, 3); + // draw white triangle static QPoint white_tri[3] = { - QPoint(whitepos, 1+(height() - 1)/2), - QPoint(whitepos-5, (height() - 1)), - QPoint(whitepos+5, (height() - 1)), + QPoint(whitepos, 1 + (height() - 1) / 2), + QPoint(whitepos - 5, (height() - 1)), + QPoint(whitepos + 5, (height() - 1)), }; white_tri[0].setX(whitepos); - white_tri[1].setX(whitepos-5); - white_tri[2].setX(whitepos+5); - white_tri[0].setY(1+(height()-1)/2); - white_tri[1].setY(height()-1); - white_tri[2].setY(height()-1); + white_tri[1].setX(whitepos - 5); + white_tri[2].setX(whitepos + 5); + white_tri[0].setY(1 + (height() - 1) / 2); + white_tri[1].setY(height() - 1); + white_tri[2].setY(height() - 1); painter.setBrush(QBrush(Qt::white)); - painter.drawPolygon(white_tri,3); - //in case, draw gray triangle + painter.drawPolygon(white_tri, 3); + // in case, draw gray triangle if (!twohandles) { static QPoint gray_tri[3] = { - QPoint(gammapos, 1+(height() - 1)/2), - QPoint(gammapos-5, (height() - 1)), - QPoint(gammapos+5, (height() - 1)), + QPoint(gammapos, 1 + (height() - 1) / 2), + QPoint(gammapos - 5, (height() - 1)), + QPoint(gammapos + 5, (height() - 1)), }; gray_tri[0].setX(gammapos); - gray_tri[1].setX(gammapos-5); - gray_tri[2].setX(gammapos+5); - gray_tri[0].setY(1+(height()-1)/2); - gray_tri[1].setY(height()-1); - gray_tri[2].setY(height()-1); + gray_tri[1].setX(gammapos - 5); + gray_tri[2].setX(gammapos + 5); + gray_tri[0].setY(1 + (height() - 1) / 2); + gray_tri[1].setY(height() - 1); + gray_tri[2].setY(height() - 1); painter.setBrush(QBrush(Qt::darkGray)); - painter.drawPolygon(gray_tri,3); + painter.drawPolygon(gray_tri, 3); } -// qDebug("paint width=%d, height=%d",width(),height()); -// qDebug("blackpos=%d, gammapos=%d, whitepos=%d",blackpos,gammapos,whitepos); + // qDebug("paint width=%d, height=%d",width(),height()); + // qDebug("blackpos=%d, gammapos=%d, + // whitepos=%d",blackpos,gammapos,whitepos); } void GrayBar::resetvalues() { qDebug("GrayBar::resetvalues"); - blackpos=0; - gammapos=width()/2; - blackgrayratio=0.5f; - whitepos=width(); + blackpos = 0; + gammapos = width() / 2; + blackgrayratio = 0.5f; + whitepos = width(); if (twohandles) emit default_black_white(); @@ -616,41 +595,44 @@ } void GrayBar::changeBlack(int v) { - if ((int)(255*((float)(blackpos)/(float)(width()))) == v) - return; + if ((int)(255 * ((float)(blackpos) / (float)(width()))) == v) return; qDebug("GrayBar::changeBlack"); - blackpos=(int) (v*width()/255.0f) < whitepos ? (int) (v*width()/255.0f) : blackpos; - gammapos=blackpos+(int)(blackgrayratio*(whitepos-blackpos)); + blackpos = (int)(v * width() / 255.0f) < whitepos + ? (int)(v * width() / 255.0f) + : blackpos; + gammapos = blackpos + (int)(blackgrayratio * (whitepos - blackpos)); update(); emit black_changed(v); } -void GrayBar::changeGamma(double v) -{ - float mediumpos = (float)blackpos+ ((float)whitepos-(float)blackpos)/2.0f; - if (v<1.0f) { - gammapos=(int)( mediumpos-((float)(whitepos)-mediumpos)*log10f(v) ); +void GrayBar::changeGamma(double v) { + float mediumpos = + (float)blackpos + ((float)whitepos - (float)blackpos) / 2.0f; + if (v < 1.0f) { + gammapos = (int)(mediumpos - ((float)(whitepos)-mediumpos) * log10f(v)); } else { - gammapos=(int)( mediumpos-(mediumpos-(float)(blackpos))*log10f(v) ); + gammapos = + (int)(mediumpos - (mediumpos - (float)(blackpos)) * log10f(v)); } - qDebug("GrayBar::changeGamma %f",v); - blackgrayratio=(float)(gammapos-blackpos)/(float)(whitepos-blackpos); + qDebug("GrayBar::changeGamma %f", v); + blackgrayratio = + (float)(gammapos - blackpos) / (float)(whitepos - blackpos); update(); if (dont_emit) { - dont_emit=false; + dont_emit = false; return; } - emit gamma_changed (v); + emit gamma_changed(v); } -void GrayBar::changeWhite(int v) -{ - if ((int)(255*((float)(whitepos)/(float)(width()))) == v) - return; +void GrayBar::changeWhite(int v) { + if ((int)(255 * ((float)(whitepos) / (float)(width()))) == v) return; qDebug("GrayBar::changeWhite, %d", v); - whitepos=(int) (v*width()/255.0f) > blackpos ? (int) (v*width()/255.0f) : whitepos; - gammapos=whitepos-(int)((1.0f-blackgrayratio)*(whitepos-blackpos)); + whitepos = (int)(v * width() / 255.0f) > blackpos + ? (int)(v * width() / 255.0f) + : whitepos; + gammapos = + whitepos - (int)((1.0f - blackgrayratio) * (whitepos - blackpos)); update(); emit white_changed(v); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/GammaAndLevels.h luminance-hdr-2.6.0/src/UI/GammaAndLevels.h --- luminance-hdr-2.5.1+dfsg/src/UI/GammaAndLevels.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/GammaAndLevels.h 2019-06-09 19:18:38.000000000 +0000 @@ -24,44 +24,44 @@ #ifndef GAMMA_AND_LEVELS_H #define GAMMA_AND_LEVELS_H -#include -#include #include +#include +#include #include "Viewers/GenericViewer.h" -namespace Ui -{ - class LevelsDialog; +namespace Ui { +class LevelsDialog; } -class GrayBar : public QWidget -{ -Q_OBJECT -public: - GrayBar(QWidget *parent, bool two_handles=false); - QSize sizeHint () const; - QSize minimumSizeHint () const; +class GrayBar : public QWidget { + Q_OBJECT + public: + GrayBar(QWidget *parent, bool two_handles = false); + QSize sizeHint() const; + QSize minimumSizeHint() const; bool dont_emit; -protected: - void paintEvent( QPaintEvent * ); - void resizeEvent ( QResizeEvent * event ); - void mouseMoveEvent ( QMouseEvent * event ); - void mousePressEvent ( QMouseEvent * event ); - void mouseReleaseEvent ( QMouseEvent * event ); -private: - //graphical coordinate, 0-width(), NOT 0-255 - int blackpos,gammapos,whitepos; + + protected: + void paintEvent(QPaintEvent *); + void resizeEvent(QResizeEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + + private: + // graphical coordinate, 0-width(), NOT 0-255 + int blackpos, gammapos, whitepos; float blackgrayratio; bool twohandles; - enum draggingT {DRAGNONE,DRAGBLACK,DRAGGRAY,DRAGWHITE} dragging; + enum draggingT { DRAGNONE, DRAGBLACK, DRAGGRAY, DRAGWHITE } dragging; draggingT findHandle(int x, int y); -public slots: + public slots: void resetvalues(); void changeBlack(int); void changeGamma(double); void changeWhite(int); -signals: + signals: void black_changed(int); void gamma_changed(double); void white_changed(int); @@ -69,30 +69,29 @@ void default_black_white(); }; -class HistogramLDR : public QWidget -{ +class HistogramLDR : public QWidget { Q_OBJECT -public: + public: HistogramLDR(QWidget *parent); ~HistogramLDR(); - QSize sizeHint () const; - QSize minimumSizeHint () const; - void setData(const QImage* data); + QSize sizeHint() const; + QSize minimumSizeHint() const; + void setData(const QImage *data); void setFrame(bool b = true); void setColorHistogram(bool b = true); - bool isFrame() { return isDrawFrame; } + bool isFrame() { return isDrawFrame; } bool isColorHistogram() { return isDrawColorHist; } -protected: + protected: //! \brief repaints canvas - void paintEvent( QPaintEvent * ); + void paintEvent(QPaintEvent *); //! \brief disable/enable color histogram on each double click - void mouseDoubleClickEvent( QMouseEvent * event ); + void mouseDoubleClickEvent(QMouseEvent *event); -private: - //LDR means 256 bins + private: + // LDR means 256 bins float m_GreyHist[256]; float m_RedHist[256]; float m_GreenHist[256]; @@ -102,11 +101,10 @@ bool isDrawColorHist; }; -class GammaAndLevels : public QDialog -{ +class GammaAndLevels : public QDialog { Q_OBJECT -private: - const QImage m_ReferenceQImage; // can only be read + private: + const QImage m_ReferenceQImage; // can only be read int blackin, whitein, blackout, whiteout; float gamma; @@ -118,22 +116,23 @@ QScopedPointer m_Ui; void refreshLUT(); -public: - GammaAndLevels(QWidget *parent, const QImage& image); + + public: + GammaAndLevels(QWidget *parent, const QImage &image); ~GammaAndLevels(); - QImage getReferenceQImage(); + QImage getReferenceQImage(); - float getBlackPointInput(); - float getBlackPointOutput(); - float getWhitePointInput(); - float getWhitePointOutput(); - float getGamma(); + float getBlackPointInput(); + float getBlackPointOutput(); + float getWhitePointInput(); + float getWhitePointOutput(); + float getGamma(); -signals: - void updateQImage(QImage image); + signals: + void updateQImage(QImage image); -private slots: + private slots: void resetValues(); void updateBlackIn(int); void updateGamma(double); diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/Gang.cpp luminance-hdr-2.6.0/src/UI/Gang.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/Gang.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/Gang.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -36,84 +36,88 @@ //#include using namespace std; -Gang::Gang(QSlider* slider, QDoubleSpinBox* doublespinbox, - QCheckBox *chkbox1, QCheckBox *chkbox2, QRadioButton *rb1, QRadioButton *rb2, - const float minvalue, const float maxvalue, - const float vv, const bool logs) : - s(slider), dsb(doublespinbox), cbx1(chkbox1), cbx2(chkbox2), rb1(rb1), rb2(rb2), - minv(minvalue), maxv(maxvalue), defaultv(vv), logscaling(logs), - undoState(false), redoState(false) -{ - if (cbx1) - isCbx1Checked_default = cbx1->isChecked(); - if (cbx2) - isCbx2Checked_default = cbx2->isChecked(); - if (rb1) - isRb1Checked_default = rb1->isChecked(); - if (rb2) - isRb2Checked_default = rb2->isChecked(); +Gang::Gang(QSlider *slider, QDoubleSpinBox *doublespinbox, QCheckBox *chkbox1, + QCheckBox *chkbox2, QRadioButton *rb1, QRadioButton *rb2, + const float minvalue, const float maxvalue, const float vv, + const bool logs) + : s(slider), + dsb(doublespinbox), + cbx1(chkbox1), + cbx2(chkbox2), + rb1(rb1), + rb2(rb2), + minv(minvalue), + maxv(maxvalue), + defaultv(vv), + logscaling(logs), + undoState(false), + redoState(false) { + if (cbx1) isCbx1Checked_default = cbx1->isChecked(); + if (cbx2) isCbx2Checked_default = cbx2->isChecked(); + if (rb1) isRb1Checked_default = rb1->isChecked(); + if (rb2) isRb2Checked_default = rb2->isChecked(); tmoSettingsList = new TmoSettingsList(); graphics_only = false; - if (s) - s->setTracking(false); + if (s) s->setTracking(false); if (s) { - connect( s, SIGNAL(sliderMoved(int)), this, SLOT(sliderMoved(int))); - connect( s, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int))); + connect(s, &QAbstractSlider::sliderMoved, this, &Gang::sliderMoved); + connect(s, &QAbstractSlider::valueChanged, this, + &Gang::sliderValueChanged); } if (dsb) - //connect( dsb, SIGNAL(editingFinished()), this, SLOT(spinboxFocusEnter())); - connect( dsb, SIGNAL(valueChanged(double)), this, SLOT(spinboxValueChanged(double))); + // connect( dsb, SIGNAL(editingFinished()), this, + // SLOT(spinboxFocusEnter())); + connect(dsb, SIGNAL(valueChanged(double)), this, + SLOT(spinboxValueChanged(double))); if (cbx1) - connect( cbx1, SIGNAL(toggled(bool)), this, SLOT(checkBox1Checked(bool))); + connect(cbx1, &QAbstractButton::toggled, this, &Gang::checkBox1Checked); if (cbx2) - connect( cbx2, SIGNAL(toggled(bool)), this, SLOT(checkBox2Checked(bool))); + connect(cbx2, &QAbstractButton::toggled, this, &Gang::checkBox2Checked); if (rb1) - connect( rb1, SIGNAL(clicked(bool)), this, SLOT(radioButton1Checked(bool))); + connect(rb1, &QAbstractButton::clicked, this, + &Gang::radioButton1Checked); if (rb2) - connect( rb2, SIGNAL(clicked(bool)), this, SLOT(radioButton2Checked(bool))); + connect(rb2, &QAbstractButton::clicked, this, + &Gang::radioButton2Checked); setDefault(); } -Gang::~Gang() -{ - delete tmoSettingsList; -} +Gang::~Gang() { delete tmoSettingsList; } -float Gang::p2v(const int p) const -{ - float x = (p-s->minimum())/( (float) (s->maximum() - s->minimum() ) ) ; - if( logscaling ) { - //cout << "p: " << p << ", x: " << x << ", " << minv*exp(log(maxv/minv)*x ) << endl; - return minv*exp(log(maxv/minv)*x ); +float Gang::p2v(const int p) const { + float x = (p - s->minimum()) / ((float)(s->maximum() - s->minimum())); + if (logscaling) { + // cout << "p: " << p << ", x: " << x << ", " << + // minv*exp(log(maxv/minv)*x + // ) << endl; + return minv * exp(log(maxv / minv) * x); } - return (maxv-minv)*x + minv; + return (maxv - minv) * x + minv; } -int Gang::v2p(const float x) const -{ - float y = (x - minv)/(maxv - minv); - if( logscaling ) { - y = (log(x)-log(minv))/(log(maxv)-log(minv)); - //cout << "x: " << x << ", y: " << y << ", " << log(x) << endl; +int Gang::v2p(const float x) const { + float y = (x - minv) / (maxv - minv); + if (logscaling) { + y = (log(x) - log(minv)) / (log(maxv) - log(minv)); + // cout << "x: " << x << ", y: " << y << ", " << log(x) << endl; } - return (int) ( (s->maximum() - s->minimum() )*y + s->minimum() ); + return (int)((s->maximum() - s->minimum()) * y + s->minimum()); } -void Gang::sliderMoved(int p) -{ - //qDebug("Slider moved"); - if( value_from_text ) { +void Gang::sliderMoved(int p) { + // qDebug("Slider moved"); + if (value_from_text) { value_from_text = false; - //qDebug("bailing out"); + // qDebug("bailing out"); return; } value_from_slider = true; @@ -122,14 +126,12 @@ changed_ = true; value_from_slider = false; } -void Gang::sliderValueChanged(int p) -{ - //qDebug("Slider changed"); - if( value_from_text ) { +void Gang::sliderValueChanged(int p) { + // qDebug("Slider changed"); + if (value_from_text) { value_from_text = false; - //qDebug("bailing out"); - if (!graphics_only) - emit finished(); + // qDebug("bailing out"); + if (!graphics_only) emit finished(); return; } value_from_slider = true; @@ -138,8 +140,7 @@ value = dsb->value(); changed_ = true; value_from_slider = false; - if (!graphics_only) - emit finished(); + if (!graphics_only) emit finished(); } // void Gang::spinboxFocusEnter() @@ -160,45 +161,39 @@ // return; // } -void Gang::spinboxValueChanged(double x) -{ - //qDebug("Spinbox value_changed"); - if( value_from_slider ) { +void Gang::spinboxValueChanged(double x) { + // qDebug("Spinbox value_changed"); + if (value_from_slider) { value_from_slider = false; - //qDebug("bailing out"); + // qDebug("bailing out"); return; } value = x; value_from_text = true; - s->setValue( v2p(value ) ); + s->setValue(v2p(value)); changed_ = true; } -void Gang::checkBox1Checked(bool b) { - isCbx1Checked = b; -} +void Gang::checkBox1Checked(bool b) { isCbx1Checked = b; } -void Gang::checkBox2Checked(bool b) { - isCbx2Checked = b; -} +void Gang::checkBox2Checked(bool b) { isCbx2Checked = b; } void Gang::radioButton1Checked(bool b) { isRb1Checked = b; isRb2Checked = !b; - //cout << "isRb1Checked: " << b << endl; - //cout << "isRb2Checked: " << !b << endl; + // cout << "isRb1Checked: " << b << endl; + // cout << "isRb2Checked: " << !b << endl; } void Gang::radioButton2Checked(bool b) { isRb2Checked = b; isRb1Checked = !b; - //cout << "isRb1Checked: " << !b << endl; - //cout << "isRb2Checked: " << b << endl; + // cout << "isRb1Checked: " << !b << endl; + // cout << "isRb2Checked: " << b << endl; } -void Gang::setDefault() -{ -// qDebug("def"); +void Gang::setDefault() { + // qDebug("def"); graphics_only = true; value = defaultv; value_from_slider = true; @@ -207,64 +202,52 @@ value = dsb->value(); } value_from_text = true; - if (s) - s->setValue( v2p(value) ); + if (s) s->setValue(v2p(value)); changed_ = false; value_from_text = false; value_from_slider = false; graphics_only = false; - if (cbx1) - isCbx1Checked = isCbx1Checked_default; - if (cbx2) - isCbx2Checked = isCbx2Checked_default; - if (rb1) - isRb1Checked = isRb1Checked_default; - if (rb2) - isRb2Checked = isRb2Checked_default; + if (cbx1) isCbx1Checked = isCbx1Checked_default; + if (cbx2) isCbx2Checked = isCbx2Checked_default; + if (rb1) isRb1Checked = isRb1Checked_default; + if (rb2) isRb2Checked = isRb2Checked_default; - //cout << "Gang::setDefault()" << endl; - //cout << "v: " << value << endl; - //cout << "cbx1: " << isCbx1Checked << endl; - //cout << "cbx2: " << isCbx2Checked << endl; - //cout << "rb1: " << isRb1Checked << endl; - //cout << "rb2: " << isRb2Checked << endl; - //cout << "/Gang::setDefault()" << endl; + // cout << "Gang::setDefault()" << endl; + // cout << "v: " << value << endl; + // cout << "cbx1: " << isCbx1Checked << endl; + // cout << "cbx2: " << isCbx2Checked << endl; + // cout << "rb1: " << isRb1Checked << endl; + // cout << "rb2: " << isRb2Checked << endl; + // cout << "/Gang::setDefault()" << endl; } -QString Gang::flag(const QString& f) const -{ - if ( !changed() ) return ""; +QString Gang::flag(const QString &f) const { + if (!changed()) return QLatin1String(""); - return QString(" %1 %2").arg(f).arg(value); + return QStringLiteral(" %1 %2").arg(f).arg(value); } -QString Gang::fname(const QString& f) const -{ - if ( !changed() ) return ""; +QString Gang::fname(const QString &f) const { + if (!changed()) return QLatin1String(""); - return QString(".%1%2").arg(f).arg(value); + return QStringLiteral(".%1%2").arg(f).arg(value); } -void Gang::setupUndo() -{ +void Gang::setupUndo() { bool isCbx1Checked = false; bool isCbx2Checked = false; bool isRb1Checked = false; bool isRb2Checked = false; float v = 0.0; - if (s) - v = value; - if (cbx1) - isCbx1Checked = cbx1->isChecked(); - if (cbx2) - isCbx2Checked = cbx2->isChecked(); - if (rb1) - isRb1Checked = rb1->isChecked(); - if (rb2) - isRb2Checked = rb2->isChecked(); + if (s) v = value; + if (cbx1) isCbx1Checked = cbx1->isChecked(); + if (cbx2) isCbx2Checked = cbx2->isChecked(); + if (rb1) isRb1Checked = rb1->isChecked(); + if (rb2) isRb2Checked = rb2->isChecked(); - tmoSettingsList->append( TmoSettings(this, v, isCbx1Checked, isCbx2Checked, isRb1Checked, isRb2Checked) ); + tmoSettingsList->append(TmoSettings(this, v, isCbx1Checked, isCbx2Checked, + isRb1Checked, isRb2Checked)); if (tmoSettingsList->index() == 1) { emit enableUndo(true); undoState = true; @@ -274,20 +257,19 @@ redoState = false; } - //cout << "Gang::setupUndo()" << endl; - //cout << "size: " << tmoSettingsList->size() << endl; - //cout << "index: " << tmoSettingsList->index() << endl; - //cout << "v: " << v << endl; - //cout << "cbx1: " << isCbx1Checked << endl; - //cout << "cbx2: " << isCbx2Checked << endl; - //cout << "rb: " << isRbChecked << endl; - //cout << "/Gang::setupUndo()" << endl; + // cout << "Gang::setupUndo()" << endl; + // cout << "size: " << tmoSettingsList->size() << endl; + // cout << "index: " << tmoSettingsList->index() << endl; + // cout << "v: " << v << endl; + // cout << "cbx1: " << isCbx1Checked << endl; + // cout << "cbx2: " << isCbx2Checked << endl; + // cout << "rb: " << isRbChecked << endl; + // cout << "/Gang::setupUndo()" << endl; } -void Gang::undo() -{ - //cout << "Gang::undo(): size: " << tmoSettingsList->size() << endl; - //cout << "Gang::undo(): index: " << tmoSettingsList->index() << endl; +void Gang::undo() { + // cout << "Gang::undo(): size: " << tmoSettingsList->size() << endl; + // cout << "Gang::undo(): index: " << tmoSettingsList->index() << endl; if (tmoSettingsList->index() == tmoSettingsList->size() - 1) { emit enableRedo(true); redoState = true; @@ -299,14 +281,14 @@ emit enableUndo(false); undoState = false; } - //cout << "/Gang::undo(): size: " << tmoSettingsList->size() << endl; - //cout << "/Gang::undo(): index: " << tmoSettingsList->index() << endl; + // cout << "/Gang::undo(): size: " << tmoSettingsList->size() << endl; + // cout << "/Gang::undo(): index: " << tmoSettingsList->index() << endl; } void Gang::redo() { - //cout << "Gang::redo()" << endl; - //cout << "Gang::redo(): size: " << tmoSettingsList->size() << endl; - //cout << "Gang::redo(): index: " << tmoSettingsList->index() << endl; + // cout << "Gang::redo()" << endl; + // cout << "Gang::redo(): size: " << tmoSettingsList->size() << endl; + // cout << "Gang::redo(): index: " << tmoSettingsList->index() << endl; if (tmoSettingsList->index() == 0) { emit enableUndo(true); undoState = true; @@ -319,25 +301,26 @@ redoState = false; } - //cout << "/Gang::redo(): size: " << tmoSettingsList->size() << endl; - //cout << "/Gang::redo(): index: " << tmoSettingsList->index() << endl; + // cout << "/Gang::redo(): size: " << tmoSettingsList->size() << endl; + // cout << "/Gang::redo(): index: " << tmoSettingsList->index() << endl; } void Gang::updateUndoState() { - //cout << "Gang::updateUndoState()" << endl; - //cout << "undoState: " << undoState << endl; - //cout << "redoState: " << redoState << endl; - //cout << "/Gang::updateUndoState()" << endl; + // cout << "Gang::updateUndoState()" << endl; + // cout << "undoState: " << undoState << endl; + // cout << "redoState: " << redoState << endl; + // cout << "/Gang::updateUndoState()" << endl; emit enableUndo(undoState); emit enableRedo(redoState); } // -//===================================== Undo/Redo ============================================ +//===================================== Undo/Redo +//============================================ // -TmoSettings::TmoSettings(Gang *gangPtr, float v, bool isCbx1, bool isCbx2, bool isRB1C, bool isRB2C): - gangPtr(gangPtr) -{ +TmoSettings::TmoSettings(Gang *gangPtr, float v, bool isCbx1, bool isCbx2, + bool isRB1C, bool isRB2C) + : gangPtr(gangPtr) { if (gangPtr->cbx1) { isCbx1Checked = isCbx1; } @@ -346,11 +329,9 @@ } if (gangPtr->rb1) { isRb1Checked = isRB1C; - } if (gangPtr->rb2) { isRb2Checked = isRB2C; - } if (gangPtr->s) { value = v; @@ -358,27 +339,22 @@ } void TmoSettings::apply() const { - //cout << "TmoSettings::apply()" << endl; - if (gangPtr->s) - gangPtr->s->setValue(gangPtr->v2p(value)); + // cout << "TmoSettings::apply()" << endl; + if (gangPtr->s) gangPtr->s->setValue(gangPtr->v2p(value)); if (gangPtr->dsb) { gangPtr->dsb->setValue(value); gangPtr->value = gangPtr->dsb->value(); } - if (gangPtr->cbx1) - gangPtr->cbx1->setChecked(isCbx1Checked); - if (gangPtr->cbx2) - gangPtr->cbx2->setChecked(isCbx2Checked); - if (gangPtr->rb1) - gangPtr->rb1->setChecked(isRb1Checked); - if (gangPtr->rb2) - gangPtr->rb2->setChecked(isRb2Checked); + if (gangPtr->cbx1) gangPtr->cbx1->setChecked(isCbx1Checked); + if (gangPtr->cbx2) gangPtr->cbx2->setChecked(isCbx2Checked); + if (gangPtr->rb1) gangPtr->rb1->setChecked(isRb1Checked); + if (gangPtr->rb2) gangPtr->rb2->setChecked(isRb2Checked); } // // TmoSettingsList Implementation // -TmoSettingsList::TmoSettingsList(): QList(), m_index(-1) {} +TmoSettingsList::TmoSettingsList() : QList(), m_index(-1) {} TmoSettingsList::~TmoSettingsList() {} void TmoSettingsList::previous() { @@ -395,9 +371,7 @@ } } -int TmoSettingsList::index() { - return m_index; -} +int TmoSettingsList::index() { return m_index; } void TmoSettingsList::append(const TmoSettings &value) { QList::append(value); diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/Gang.h luminance-hdr-2.6.0/src/UI/Gang.h --- luminance-hdr-2.5.1+dfsg/src/UI/Gang.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/Gang.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,25 +29,23 @@ #ifndef GANG_H #define GANG_H -#include -#include #include -#include +#include #include +#include +#include class TmoSettingsList; -class Gang : public QObject -{ +class Gang : public QObject { Q_OBJECT -public: + public: friend class TmoSettings; - Gang(QSlider* s = 0, QDoubleSpinBox* dsb = 0, - QCheckBox *cbx1 = 0, QCheckBox *cbx2 = 0, - QRadioButton *rb1 = 0, QRadioButton *rb2 = 0, - const float minv = 0.0, const float maxv = 0.0, - const float vv = 0.0, const bool logs = false); + Gang(QSlider *s = 0, QDoubleSpinBox *dsb = 0, QCheckBox *cbx1 = 0, + QCheckBox *cbx2 = 0, QRadioButton *rb1 = 0, QRadioButton *rb2 = 0, + const float minv = 0.0, const float maxv = 0.0, const float vv = 0.0, + const bool logs = false); ~Gang(); float v() const; @@ -59,14 +57,14 @@ int v2p(const float x) const; void setDefault(); bool changed() const; - QString flag(const QString& f) const; - QString fname(const QString& f) const; + QString flag(const QString &f) const; + QString fname(const QString &f) const; void setupUndo(); void undo(); void redo(); void updateUndoState(); -protected slots: + protected slots: void sliderMoved(int p); void sliderValueChanged(int p); void spinboxValueChanged(double); @@ -75,12 +73,12 @@ void radioButton1Checked(bool); void radioButton2Checked(bool); -signals: + signals: void finished(); void enableUndo(bool); void enableRedo(bool); -private: + private: QSlider *s; QDoubleSpinBox *dsb; QCheckBox *cbx1; @@ -109,34 +107,30 @@ TmoSettingsList *tmoSettingsList; }; -inline float Gang::v() const -{ return value; } +inline float Gang::v() const { return value; } -inline bool Gang::isCheckBox1Checked() const -{ return isCbx1Checked; } +inline bool Gang::isCheckBox1Checked() const { return isCbx1Checked; } -inline bool Gang::isCheckBox2Checked() const -{ return isCbx2Checked; } +inline bool Gang::isCheckBox2Checked() const { return isCbx2Checked; } -inline bool Gang::isRadioButton1Checked() const -{ return isRb1Checked; } +inline bool Gang::isRadioButton1Checked() const { return isRb1Checked; } -inline bool Gang::isRadioButton2Checked() const -{ return isRb2Checked; } +inline bool Gang::isRadioButton2Checked() const { return isRb2Checked; } -inline bool Gang::changed() const -{ return changed_; } +inline bool Gang::changed() const { return changed_; } // -//==================================== Undo/Redo =================================================== +//==================================== Undo/Redo +//=================================================== // // TmoSettings stores current applied settings // class TmoSettings { -public: + public: TmoSettings(Gang *gangPtr, float, bool, bool, bool, bool); void apply() const; -protected: + + protected: Gang *gangPtr; bool isCbx1Checked; bool isCbx2Checked; @@ -146,16 +140,16 @@ }; class TmoSettingsList : public QList { -public: + public: TmoSettingsList(); ~TmoSettingsList(); void previous(); void next(); int index(); void append(const TmoSettings &value); -private: + + private: int m_index; }; #endif - diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ImageQualityDialog.cpp luminance-hdr-2.6.0/src/UI/ImageQualityDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/ImageQualityDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ImageQualityDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,103 +21,93 @@ * @author Franco Comida */ -#include "ImageQualityDialog.h" -#include "ui_ImageQualityDialog.h" +#include + +#include "UI/ImageQualityDialog.h" +#include "UI/ui_ImageQualityDialog.h" -#include -#include -#include #include +#include #include +#include +#include #include #include -namespace -{ -const static QString IMAGE_QUALITY_KEY = "imagequalitydialog/quality"; +namespace { +const static QString IMAGE_QUALITY_KEY = + QStringLiteral("imagequalitydialog/quality"); const static int IMAGE_QUALITY_DEFAULT = 98; } -ImageQualityDialog::ImageQualityDialog(const pfs::Frame* frame, - const QString& fmt, int defaultValue, QWidget *parent) - : QDialog(parent) - , m_frame(frame) - , m_format(fmt) - , m_ui(new Ui::ImgQualityDialog) - , m_options(new LuminanceOptions()) -{ +ImageQualityDialog::ImageQualityDialog(const pfs::Frame *frame, + const QString &fmt, int defaultValue, + QWidget *parent) + : QDialog(parent), + m_frame(frame), + m_format(fmt), + m_ui(new Ui::ImgQualityDialog), + m_options(new LuminanceOptions()) { m_ui->setupUi(this); - if (defaultValue >= 0) - { + if (defaultValue >= 0) { m_ui->spinBox->setValue(defaultValue); - } - else if (frame) - { - m_ui->spinBox->setValue(m_options->value(IMAGE_QUALITY_KEY, IMAGE_QUALITY_DEFAULT).toInt()); - } - else - { + } else if (frame) { + m_ui->spinBox->setValue( + m_options->value(IMAGE_QUALITY_KEY, IMAGE_QUALITY_DEFAULT).toInt()); + } else { m_ui->spinBox->setValue(100); } - if (frame) - { - connect(m_ui->spinBox, SIGNAL(valueChanged(int)), - this, SLOT(reset(int))); - connect(m_ui->horizontalSlider, SIGNAL(valueChanged(int)), - this, SLOT(reset(int))); - } - else - { + if (frame) { + connect(m_ui->spinBox, SIGNAL(valueChanged(int)), this, + SLOT(reset(int))); + connect(m_ui->horizontalSlider, &QAbstractSlider::valueChanged, this, + &ImageQualityDialog::reset); + } else { m_ui->fileSizePanel->setVisible(false); } -#ifdef Q_OS_MAC - this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#ifdef Q_OS_MACOS + this->setWindowModality( + Qt::WindowModal); // In OS X, the QMessageBox is modal to the window #endif } -ImageQualityDialog::~ImageQualityDialog() -{ - if (m_frame) - { +ImageQualityDialog::~ImageQualityDialog() { + if (m_frame) { m_options->setValue(IMAGE_QUALITY_KEY, getQuality()); } } -int ImageQualityDialog::getQuality(void) const -{ +int ImageQualityDialog::getQuality(void) const { return m_ui->spinBox->value(); } -void ImageQualityDialog::on_getSizeButton_clicked() -{ - pfs::Params params( "quality", (size_t)getQuality() ); +void ImageQualityDialog::on_getSizeButton_clicked() { + pfs::Params params("quality", (size_t)getQuality()); setCursor(QCursor(Qt::WaitCursor)); int size = 0; - if (m_format.startsWith("jp")) - { + if (m_format.startsWith(QLatin1String("jp"))) { pfs::io::JpegWriter writer; writer.write(*m_frame, params); size = writer.getFileSize(); - } - else if (m_format.startsWith("png")) - { + } else if (m_format.startsWith(QLatin1String("png"))) { pfs::io::PngWriter writer; writer.write(*m_frame, params); size = writer.getFileSize(); + } else { + return; } - else { return; } -// else -// { -// QByteArray ba; -// QBuffer buffer(&ba); -// buffer.open(QIODevice::WriteOnly); -// m_image->save(&buffer, m_format.toLatin1().constData(), quality); -// size = ba.size(); -// } + // else + // { + // QByteArray ba; + // QBuffer buffer(&ba); + // buffer.open(QIODevice::WriteOnly); + // m_image->save(&buffer, m_format.toLatin1().constData(), quality); + // size = ba.size(); + // } QLocale def; QString s = def.toString(size); @@ -128,7 +118,6 @@ setCursor(QCursor(Qt::ArrowCursor)); } -void ImageQualityDialog::reset(int) -{ +void ImageQualityDialog::reset(int) { m_ui->label_filesize->setText(tr("Unknown")); } diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/ImageQualityDialog.h luminance-hdr-2.6.0/src/UI/ImageQualityDialog.h --- luminance-hdr-2.5.1+dfsg/src/UI/ImageQualityDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/ImageQualityDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -37,26 +37,26 @@ class Frame; } -class ImageQualityDialog : public QDialog -{ +class ImageQualityDialog : public QDialog { Q_OBJECT -public: - ImageQualityDialog(const pfs::Frame* frame, const QString& fmt, int defaultValue = -1, QWidget *parent = 0); + public: + ImageQualityDialog(const pfs::Frame *frame, const QString &fmt, + int defaultValue = -1, QWidget *parent = 0); ~ImageQualityDialog(); int getQuality(void) const; -protected slots: + protected slots: void on_getSizeButton_clicked(); void reset(int); -protected: - const pfs::Frame* m_frame; + protected: + const pfs::Frame *m_frame; QString m_format; QScopedPointer m_ui; QScopedPointer m_options; }; -#endif // IMAGEQUALITYDIALOG_H +#endif // IMAGEQUALITYDIALOG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/PreviewFrame.cpp luminance-hdr-2.6.0/src/UI/PreviewFrame.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/PreviewFrame.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/PreviewFrame.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,34 +21,27 @@ * @author Franco Comida */ - #include "PreviewFrame.h" -PreviewFrame::PreviewFrame(QWidget *parent) : - QFrame(parent), - m_index(0) -{ +PreviewFrame::PreviewFrame(QWidget *parent) : QFrame(parent), m_index(0) { m_flowLayout = new FlowLayout; setLayout(m_flowLayout); - QPalette* palette = new QPalette(); - palette->setColor(QPalette::Foreground,Qt::red); + QPalette *palette = new QPalette(); + palette->setColor(QPalette::Foreground, Qt::red); setPalette(*palette); } -PreviewFrame::~PreviewFrame() -{ -} +PreviewFrame::~PreviewFrame() {} -void PreviewFrame::addLabel(SimplePreviewLabel* label) -{ - connect(label, SIGNAL(selected(int)), this, SLOT(selectLabel(int))); +void PreviewFrame::addLabel(SimplePreviewLabel *label) { + connect(label, &SimplePreviewLabel::selected, this, + &PreviewFrame::selectLabel); label->setFrameStyle(QFrame::Box); m_labels.push_back(label); m_flowLayout->addWidget(label); } -void PreviewFrame::selectLabel(int index) -{ +void PreviewFrame::selectLabel(int index) { m_labels[m_index]->setLineWidth(1); m_index = index; m_labels[m_index]->setLineWidth(3); diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/PreviewFrame.h luminance-hdr-2.6.0/src/UI/PreviewFrame.h --- luminance-hdr-2.5.1+dfsg/src/UI/PreviewFrame.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/PreviewFrame.h 2019-06-09 19:18:38.000000000 +0000 @@ -29,22 +29,21 @@ #include "SimplePreviewLabel.h" -class PreviewFrame : public QFrame -{ +class PreviewFrame : public QFrame { Q_OBJECT -public: + public: PreviewFrame(QWidget *parent = 0); ~PreviewFrame(); - void addLabel(SimplePreviewLabel* label); - SimplePreviewLabel* getLabel(int index) { return m_labels[index]; } + void addLabel(SimplePreviewLabel *label); + SimplePreviewLabel *getLabel(int index) { return m_labels[index]; } int getSelectedLabel() { return m_index; } -public slots: + public slots: void selectLabel(int index); -protected: + protected: QList m_labels; int m_index; FlowLayout *m_flowLayout; diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.cpp luminance-hdr-2.6.0/src/UI/SavedParametersDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SavedParametersDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,93 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2011 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +SavedParametersDialog::SavedParametersDialog(QSqlDatabase &db, QWidget *parent) + : QDialog(parent), + m_model(new QSqlQueryModel()), + m_db(db), + m_Ui(new Ui::SavedParametersDialog) { + m_Ui->setupUi(this); + + QString sqlQuery; + sqlQuery += QLatin1String( + "SELECT comment, 'ashikhmin' AS operator FROM ashikhmin UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'drago' AS operator FROM drago UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'durand' AS operator FROM durand UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'fattal' AS operator FROM fattal UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'ferradans' AS operator FROM ferradans UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'mantiuk06' AS operator FROM mantiuk06 UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'mantiuk08' AS operator FROM mantiuk08 UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'pattanaik' AS operator FROM pattanaik UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'reinhard02' AS operator FROM reinhard02 UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'reinhard05' AS operator FROM reinhard05 UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'ferwerda' AS operator FROM ferwerda UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'kimkautz' AS operator FROM kimkautz UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'vanhateren' AS operator FROM vanhateren UNION "); + sqlQuery += QLatin1String( + "SELECT comment, 'lischinski' AS operator FROM lischinski"); + m_model->setQuery(sqlQuery, m_db); + + m_model->setHeaderData(0, Qt::Horizontal, tr("Comment")); + m_model->setHeaderData(1, Qt::Horizontal, tr("TM Operator")); + + m_Ui->tableView->setModel(m_model); + m_Ui->tableView->horizontalHeader()->setSectionResizeMode( + QHeaderView::ResizeToContents); + m_Ui->tableView->show(); +} + +SavedParametersDialog::~SavedParametersDialog() { delete m_model; } + +QModelIndex SavedParametersDialog::getCurrentIndex() { + return m_Ui->tableView->currentIndex(); +} + +QSqlQueryModel *SavedParametersDialog::getModel() { return m_model; } + +QModelIndexList SavedParametersDialog::getSelectedRows() { + return m_Ui->tableView->selectionModel()->selectedRows(); +} diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.h luminance-hdr-2.6.0/src/UI/SavedParametersDialog.h --- luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SavedParametersDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,55 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2011 Franco Comida + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Franco Comida + * + */ + +#ifndef SAVEDPARAMETERSDIALOG_H +#define SAVEDPARAMETERSDIALOG_H + +#include +#include + +#include + +namespace Ui { +class SavedParametersDialog; +} + +class SavedParametersDialog : public QDialog { + Q_OBJECT + + public: + //! \brief Default constructor + explicit SavedParametersDialog(QSqlDatabase &db, QWidget *parent = 0); + + ~SavedParametersDialog(); + + QModelIndex getCurrentIndex(); + QModelIndexList getSelectedRows(); + QSqlQueryModel *getModel(); + + protected: + QSqlQueryModel *m_model; + QSqlDatabase m_db; + QScopedPointer m_Ui; +}; +#endif diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.ui luminance-hdr-2.6.0/src/UI/SavedParametersDialog.ui --- luminance-hdr-2.5.1+dfsg/src/UI/SavedParametersDialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SavedParametersDialog.ui 2019-06-09 19:18:38.000000000 +0000 @@ -0,0 +1,103 @@ + + + SavedParametersDialog + + + Qt::ApplicationModal + + + + 0 + 0 + 835 + 300 + + + + Saved Parameters + + + + + + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SelectRows + + + true + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + + + + buttonBox + accepted() + SavedParametersDialog + accept() + + + 689 + 278 + + + 586 + 1 + + + + + buttonBox + rejected() + SavedParametersDialog + reject() + + + 762 + 283 + + + 721 + -2 + + + + + tableView + doubleClicked(QModelIndex) + SavedParametersDialog + accept() + + + 417 + 134 + + + 417 + 149 + + + + + diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SimplePreviewLabel.cpp luminance-hdr-2.6.0/src/UI/SimplePreviewLabel.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/SimplePreviewLabel.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SimplePreviewLabel.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -23,25 +23,18 @@ #include "SimplePreviewLabel.h" -SimplePreviewLabel::SimplePreviewLabel(int index, QWidget *parent): - QLabel(parent), - m_index(index), - m_selected(false) -{ +SimplePreviewLabel::SimplePreviewLabel(int index, QWidget *parent) + : QLabel(parent), m_index(index), m_selected(false) { setScaledContents(true); setMinimumSize(130, 100); setMaximumSize(130, 100); } -SimplePreviewLabel::~SimplePreviewLabel() -{ -} +SimplePreviewLabel::~SimplePreviewLabel() {} -void SimplePreviewLabel::mousePressEvent(QMouseEvent *event) -{ +void SimplePreviewLabel::mousePressEvent(QMouseEvent *event) { if (event->buttons() == Qt::LeftButton) { m_selected = true; emit selected(m_index); } } - diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SimplePreviewLabel.h luminance-hdr-2.6.0/src/UI/SimplePreviewLabel.h --- luminance-hdr-2.5.1+dfsg/src/UI/SimplePreviewLabel.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SimplePreviewLabel.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,20 +27,19 @@ #include #include -class SimplePreviewLabel : public QLabel -{ +class SimplePreviewLabel : public QLabel { Q_OBJECT -public: + public: SimplePreviewLabel(int index, QWidget *parent = 0); ~SimplePreviewLabel(); bool isSelected() { return m_selected; } -signals: + signals: void selected(int); -protected: + protected: void mousePressEvent(QMouseEvent *event); int m_index; bool m_selected; diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SupportedCamerasDialog.cpp luminance-hdr-2.6.0/src/UI/SupportedCamerasDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/SupportedCamerasDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SupportedCamerasDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -21,70 +21,68 @@ * @author Franco Comida */ +#include #include -#include "SupportedCamerasDialog.h" -#include "ui_SupportedCamerasDialog.h" +#include "UI/SupportedCamerasDialog.h" +#include "UI/ui_SupportedCamerasDialog.h" #include "Common/GitSHA1.h" #include "Common/config.h" -#ifdef __APPLE__ +#ifdef Q_OS_MACOS #include #else #include #endif -SupportedCamerasDialog::SupportedCamerasDialog(QWidget* parent) - : QDialog(parent) - , m_Ui(new Ui::SupportedCamerasDialog) -{ +SupportedCamerasDialog::SupportedCamerasDialog(QWidget *parent) + : QDialog(parent), m_Ui(new Ui::SupportedCamerasDialog) { m_Ui->setupUi(this); - m_Ui->labelVersion->setText(QString(LUMINANCEVERSION) + " [Build " + QString(g_GIT_SHA1).left(6) + "]"); + m_Ui->labelVersion->setText(QStringLiteral(LUMINANCEVERSION) + " [Build " + + QString(g_GIT_SHA1).left(6) + "]"); const char *version = LibRaw::version(); int count = LibRaw::cameraCount(); - m_Ui->labelLibRawVersion->setText(m_Ui->labelLibRawVersion->text() + " " + QString(version)); - m_Ui->labelCount->setText(QString("%1").arg(count) + " " + m_Ui->labelCount->text()); + m_Ui->labelLibRawVersion->setText(m_Ui->labelLibRawVersion->text() + " " + + QString(version).remove("-Release")); + m_Ui->labelCount->setText(QStringLiteral("%1").arg(count) + " " + + m_Ui->labelCount->text()); const char **list = LibRaw::cameraList(); - while (*list) - { + while (*list) { QListWidgetItem *item = new QListWidgetItem(*list++); m_Ui->listWidget->addItem(item); m_items.append(new QListWidgetItem(*item)); } - connect(m_Ui->lineEdit, SIGNAL(textEdited(const QString &)), this, SLOT(search(const QString &))); + connect(m_Ui->lineEdit, &QLineEdit::textEdited, this, + &SupportedCamerasDialog::search); } -SupportedCamerasDialog::~SupportedCamerasDialog() -{ - while (!m_items.isEmpty()) - delete m_items.takeFirst(); +SupportedCamerasDialog::~SupportedCamerasDialog() { + while (!m_items.isEmpty()) delete m_items.takeFirst(); } // I REALLY HATE this implementation!!! -void SupportedCamerasDialog::search(const QString &text) -{ +void SupportedCamerasDialog::search(const QString &text) { m_Ui->listWidget->clear(); - //for (auto i : m_items) - BOOST_FOREACH (QListWidgetItem *i, m_items) - { - m_Ui->listWidget->addItem(new QListWidgetItem(*i)); // listWidget takes ownership of its items + // for (auto i : m_items) + BOOST_FOREACH (QListWidgetItem *i, m_items) { + m_Ui->listWidget->addItem(new QListWidgetItem( + *i)); // listWidget takes ownership of its items } - QList tmp_found = m_Ui->listWidget->findItems(text, Qt::MatchContains); // still owned by listWidget + QList tmp_found = m_Ui->listWidget->findItems( + text, Qt::MatchContains); // still owned by listWidget QList found; - //for (auto i : tmp_found) - BOOST_FOREACH (QListWidgetItem *i, tmp_found) - { - found.append(new QListWidgetItem(*i)); // new copy owned by found QList + // for (auto i : tmp_found) + BOOST_FOREACH (QListWidgetItem *i, tmp_found) { + found.append(new QListWidgetItem(*i)); // new copy owned by found QList } m_Ui->listWidget->clear(); - //for (auto i : found) - BOOST_FOREACH (QListWidgetItem *i, found) - { - m_Ui->listWidget->addItem(i); // ownership transferred by found to listWidget + // for (auto i : found) + BOOST_FOREACH (QListWidgetItem *i, found) { + m_Ui->listWidget->addItem( + i); // ownership transferred by found to listWidget } } - diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/SupportedCamerasDialog.h luminance-hdr-2.6.0/src/UI/SupportedCamerasDialog.h --- luminance-hdr-2.5.1+dfsg/src/UI/SupportedCamerasDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/SupportedCamerasDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,24 +28,22 @@ #include #include -namespace Ui -{ - class SupportedCamerasDialog; +namespace Ui { +class SupportedCamerasDialog; } -class SupportedCamerasDialog : public QDialog -{ +class SupportedCamerasDialog : public QDialog { Q_OBJECT -public: - explicit SupportedCamerasDialog(QWidget* parent); + public: + explicit SupportedCamerasDialog(QWidget *parent); ~SupportedCamerasDialog(); -private: + private: QList m_items; QScopedPointer m_Ui; -public slots: + public slots: void search(const QString &); }; -#endif // SUPPORTEDCAMERASDIALOG_H +#endif // SUPPORTEDCAMERASDIALOG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/TiffModeDialog.cpp luminance-hdr-2.6.0/src/UI/TiffModeDialog.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/TiffModeDialog.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/TiffModeDialog.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -20,77 +20,71 @@ * */ -#include "TiffModeDialog.h" -#include "ui_TiffModeDialog.h" +#include -namespace -{ -const static QString TIFF_MODE_HDR_KEY = "tiffmodedialog/mode/hdr"; +#include "UI/TiffModeDialog.h" +#include "UI/ui_TiffModeDialog.h" + +namespace { +const static QString TIFF_MODE_HDR_KEY = + QStringLiteral("tiffmodedialog/mode/hdr"); const static int TIFF_MODE_HDR_VALUE = 0; -const static QString TIFF_MODE_LDR_KEY = "tiffmodedialog/mode/ldr"; +const static QString TIFF_MODE_LDR_KEY = + QStringLiteral("tiffmodedialog/mode/ldr"); const static int TIFF_MODE_LDR_VALUE = 0; } TiffModeDialog::TiffModeDialog(bool hdrMode, int defaultValue, QWidget *parent) - : QDialog(parent) - , m_hdrMode(hdrMode) - , m_ui(new Ui::TiffModeDialog) - , m_options(new LuminanceOptions()) -{ + : QDialog(parent), + m_hdrMode(hdrMode), + m_ui(new Ui::TiffModeDialog), + m_options(new LuminanceOptions()) { m_ui->setupUi(this); - if (m_hdrMode) - { - m_ui->comboBox->insertItem(0, "TIFF 32 bit/channel floating point"); - m_ui->comboBox->insertItem(1, "TIFF LogLuv"); + if (m_hdrMode) { + m_ui->comboBox->insertItem( + 0, QStringLiteral("TIFF 32 bit/channel floating point")); + m_ui->comboBox->insertItem(1, QStringLiteral("TIFF LogLuv")); - if (defaultValue >= 0) - { + if (defaultValue >= 0) { m_ui->comboBox->setCurrentIndex(defaultValue - 2); - } - else - m_ui->comboBox->setCurrentIndex(m_options->value(TIFF_MODE_HDR_KEY, TIFF_MODE_HDR_VALUE).toInt()); - } - else - { - m_ui->comboBox->insertItem(0, "TIFF 8 bit/channel"); - m_ui->comboBox->insertItem(1, "TIFF 16 bit/channel"); - m_ui->comboBox->insertItem(2, "TIFF 32 bit/channel floating point"); + } else + m_ui->comboBox->setCurrentIndex( + m_options->value(TIFF_MODE_HDR_KEY, TIFF_MODE_HDR_VALUE) + .toInt()); + } else { + m_ui->comboBox->insertItem(0, QStringLiteral("TIFF 8 bit/channel")); + m_ui->comboBox->insertItem(1, QStringLiteral("TIFF 16 bit/channel")); + m_ui->comboBox->insertItem( + 2, QStringLiteral("TIFF 32 bit/channel floating point")); - if (defaultValue >= 0) - { + if (defaultValue >= 0) { m_ui->comboBox->setCurrentIndex(defaultValue); - } - else - m_ui->comboBox->setCurrentIndex(m_options->value(TIFF_MODE_LDR_KEY, TIFF_MODE_LDR_VALUE).toInt()); + } else + m_ui->comboBox->setCurrentIndex( + m_options->value(TIFF_MODE_LDR_KEY, TIFF_MODE_LDR_VALUE) + .toInt()); } -#ifdef Q_OS_MAC - this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#ifdef Q_OS_MACOS + this->setWindowModality( + Qt::WindowModal); // In OS X, the QMessageBox is modal to the window #endif } -TiffModeDialog::~TiffModeDialog() -{ - if (m_hdrMode) - { +TiffModeDialog::~TiffModeDialog() { + if (m_hdrMode) { m_options->setValue(TIFF_MODE_HDR_KEY, m_ui->comboBox->currentIndex()); - } - else - { + } else { m_options->setValue(TIFF_MODE_LDR_KEY, m_ui->comboBox->currentIndex()); } } -int TiffModeDialog::getTiffWriterMode() -{ - if (m_hdrMode) - { +int TiffModeDialog::getTiffWriterMode() { + if (m_hdrMode) { return m_ui->comboBox->currentIndex() + 2; - } - else - { + } else { return m_ui->comboBox->currentIndex(); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/TiffModeDialog.h luminance-hdr-2.6.0/src/UI/TiffModeDialog.h --- luminance-hdr-2.5.1+dfsg/src/UI/TiffModeDialog.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/TiffModeDialog.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,25 +27,24 @@ #include "Common/LuminanceOptions.h" -namespace Ui -{ +namespace Ui { class TiffModeDialog; } -class TiffModeDialog : public QDialog -{ +class TiffModeDialog : public QDialog { Q_OBJECT -public: - explicit TiffModeDialog(bool hdrMode = false, int defaultValue = -1, QWidget *parent = 0); + public: + explicit TiffModeDialog(bool hdrMode = false, int defaultValue = -1, + QWidget *parent = 0); ~TiffModeDialog(); int getTiffWriterMode(); -private: + private: bool m_hdrMode; QScopedPointer m_ui; QScopedPointer m_options; }; -#endif // TIFFMODEDIALOG_H +#endif // TIFFMODEDIALOG_H diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/UMessageBox.cpp luminance-hdr-2.6.0/src/UI/UMessageBox.cpp --- luminance-hdr-2.5.1+dfsg/src/UI/UMessageBox.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/UMessageBox.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -26,65 +26,55 @@ * */ +#include + #include "UI/UMessageBox.h" #include "Common/GitSHA1.h" -#include "Common/config.h" #include "Common/archs.h" -#include "ui_about.h" +#include "Common/config.h" +#include "UI/ui_about.h" -namespace -{ -const int UMESSAGEBOX_WIDTH = 450; // pixel -} // end anonymous namespace - -void UMessageBox::init() -{ - QGridLayout* layout = reinterpret_cast(this->layout()); - layout->addItem(m_horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); +namespace { +const int UMESSAGEBOX_WIDTH = 450; // pixel +} // end anonymous namespace + +void UMessageBox::init() { + QGridLayout *layout = reinterpret_cast(this->layout()); + layout->addItem(m_horizontalSpacer, layout->rowCount(), 0, 1, + layout->columnCount()); this->setWindowTitle("Luminance HDR " LUMINANCEVERSION); -#ifdef Q_OS_MAC - this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#ifdef Q_OS_MACOS + this->setWindowModality( + Qt::WindowModal); // In OS X, the QMessageBox is modal to the window #endif } -UMessageBox::UMessageBox(QWidget *parent) : - QMessageBox(parent), - m_horizontalSpacer(new QSpacerItem(UMESSAGEBOX_WIDTH, - 0, - QSizePolicy::Minimum, - QSizePolicy::Expanding)) -{ +UMessageBox::UMessageBox(QWidget *parent) + : QMessageBox(parent), + m_horizontalSpacer(new QSpacerItem( + UMESSAGEBOX_WIDTH, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)) { init(); } -UMessageBox::~UMessageBox() -{} +UMessageBox::~UMessageBox() {} -UMessageBox::UMessageBox(const QString &title, - const QString &text, Icon icon, - int button0, - int button1, - int button2, - QWidget *parent, - Qt::WindowFlags f) : - QMessageBox(title, text, icon, button0, button1, button2, parent, f), - m_horizontalSpacer(new QSpacerItem(UMESSAGEBOX_WIDTH, - 0, - QSizePolicy::Minimum, - QSizePolicy::Expanding)) -{ +UMessageBox::UMessageBox(const QString &title, const QString &text, Icon icon, + int button0, int button1, int button2, QWidget *parent, + Qt::WindowFlags f) + : QMessageBox(title, text, icon, button0, button1, button2, parent, f), + m_horizontalSpacer(new QSpacerItem( + UMESSAGEBOX_WIDTH, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)) { init(); } -//void UMessageBox::showEvent(QShowEvent *event) +// void UMessageBox::showEvent(QShowEvent *event) //{ // QMessageBox::showEvent(event); //} -void UMessageBox::about(QWidget* parent) -{ +void UMessageBox::about(QWidget *parent) { QDialog *about = new QDialog(parent); about->setAttribute(Qt::WA_DeleteOnClose); Ui::AboutLuminance ui; @@ -92,62 +82,78 @@ ui.authorsBox->setOpenExternalLinks(true); ui.thanksToBox->setOpenExternalLinks(true); ui.GPLbox->setTextInteractionFlags(Qt::TextSelectableByMouse); - ui.label_version->setText(ui.label_version->text().append(QString(LUMINANCEVERSION)).append(" [Build ").append(QString(g_GIT_SHA1).left(6)).append("]")); + ui.label_version->setText(ui.label_version->text() + .append(QStringLiteral(LUMINANCEVERSION)) + .append(" [Build ") + .append(QString(g_GIT_SHA1).leftRef(6)) + .append("]")); - bool license_file_not_found=true; + bool license_file_not_found = true; QString docDir = QCoreApplication::applicationDirPath(); docDir.append("/../Resources"); - QStringList paths = QStringList( BASEDIR "/share/doc/luminance-hdr") << BASEDIR "/share/luminance-hdr" << docDir << "/Applications/luminance.app/Contents/Resources" << "./" << QCoreApplication::applicationDirPath(); - foreach (QString path,paths) - { - QString fname(path+QString("/LICENSE")); - if (QFile::exists(fname)) - { + QStringList paths = + QStringList(BASEDIR "/share/doc/luminance-hdr") + << BASEDIR "/share/luminance-hdr/doc" << docDir + << QStringLiteral("/Applications/luminance.app/Contents/Resources") + << QStringLiteral("./") << QCoreApplication::applicationDirPath(); + foreach (const QString &path, paths) { + QString fname(path + QStringLiteral("/LICENSE")); + if (QFile::exists(fname)) { QFile file(fname); - //try opening it - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) - break; + // try opening it + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) break; QTextStream ts(&file); ui.GPLbox->setAcceptRichText(false); ui.GPLbox->setPlainText(ts.readAll()); - license_file_not_found=false; + license_file_not_found = false; break; } } - if (license_file_not_found) - { + if (license_file_not_found) { ui.GPLbox->setOpenExternalLinks(true); ui.GPLbox->setTextInteractionFlags(Qt::TextBrowserInteraction); - ui.GPLbox->setHtml(tr("%1 License document not found, you can find it online: %2here%3","%2 and %3 are html tags").arg("").arg("").arg("")); - } - bool changelog_file_not_found=true; - foreach (QString path,paths) - { - QString fname(path+QString("/Changelog")); - if (QFile::exists(fname)) - { + ui.GPLbox->setHtml( + tr("%1 License document not found, you can find it online: " + "%2here%3", + "%2 and %3 are html tags") + .arg(QStringLiteral(""), + QStringLiteral(""), + QStringLiteral(""))); + } + bool changelog_file_not_found = true; + foreach (const QString &path, paths) { + QString fname(path + QStringLiteral("/Changelog")); + if (QFile::exists(fname)) { QFile file(fname); - //try opening it - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) - break; + // try opening it + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) break; QTextStream ts(&file); ui.ChangelogBox->setAcceptRichText(false); ui.ChangelogBox->setPlainText(ts.readAll()); - changelog_file_not_found=false; + changelog_file_not_found = false; break; } } - if (changelog_file_not_found) - { + if (changelog_file_not_found) { ui.ChangelogBox->setOpenExternalLinks(true); ui.ChangelogBox->setTextInteractionFlags(Qt::TextBrowserInteraction); - ui.ChangelogBox->setHtml(tr("%1 Changelog document not found, you can find it online: %2here%3","%2 and %3 are html tags").arg("").arg("").arg("")); + ui.ChangelogBox->setHtml( + tr("%1 Changelog document not found, you can find it online: " + "%2here%3", + "%2 and %3 are html tags") + .arg(QStringLiteral(""), + QStringLiteral(""), + QStringLiteral(""))); } about->show(); } -int UMessageBox::warning(const QString &title, const QString &description, QWidget* parent) -{ +int UMessageBox::warning(const QString &title, const QString &description, + QWidget *parent) { UMessageBox WarningMsgBox(parent); WarningMsgBox.setText(title); WarningMsgBox.setInformativeText(description); @@ -158,8 +164,8 @@ return WarningMsgBox.exec(); } -int UMessageBox::question(const QString &title, const QString &description, QWidget* parent) -{ +int UMessageBox::question(const QString &title, const QString &description, + QWidget *parent) { UMessageBox questionMsgBox(parent); questionMsgBox.setText(title); questionMsgBox.setInformativeText(description); @@ -170,43 +176,40 @@ return questionMsgBox.exec(); } -int UMessageBox::saveDialog(const QString &title, const QString &description, QWidget* parent) -{ +int UMessageBox::saveDialog(const QString &title, const QString &description, + QWidget *parent) { UMessageBox WarningMsgBox(parent); WarningMsgBox.setText(title); WarningMsgBox.setInformativeText(description); - WarningMsgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); + WarningMsgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | + QMessageBox::Cancel); WarningMsgBox.setDefaultButton(QMessageBox::Cancel); WarningMsgBox.setIcon(QMessageBox::Warning); return WarningMsgBox.exec(); } - -void UMessageBox::donationSplashMB(QWidget* parent) -{ +void UMessageBox::donationSplashMB(QWidget *parent) { UMessageBox donationMB(parent); donationMB.setText(tr("Donation")); donationMB.setInformativeText(tr("Would you like to donate?")); donationMB.setIcon(QMessageBox::Question); - QPushButton *yes = donationMB.addButton(tr("Yes, I'd love to!"), QMessageBox::ActionRole); - QPushButton *dontBother = donationMB.addButton(tr("Stop Bothering Me"), QMessageBox::ActionRole); - QPushButton *later = donationMB.addButton(tr("Remind me later"), QMessageBox::ActionRole); + QPushButton *yes = + donationMB.addButton(tr("Yes, I'd love to!"), QMessageBox::ActionRole); + QPushButton *dontBother = + donationMB.addButton(tr("Stop Bothering Me"), QMessageBox::ActionRole); + QPushButton *later = + donationMB.addButton(tr("Remind me later"), QMessageBox::ActionRole); donationMB.exec(); - if (donationMB.clickedButton() == yes) - { + if (donationMB.clickedButton() == yes) { qDebug() << "Open Donation Web page"; - } - else if (donationMB.clickedButton() == dontBother) - { + } else if (donationMB.clickedButton() == dontBother) { qDebug() << "Stop bother me"; - } else if (donationMB.clickedButton() == later) - { + } else if (donationMB.clickedButton() == later) { qDebug() << "Remind me later"; } - } diff -Nru luminance-hdr-2.5.1+dfsg/src/UI/UMessageBox.h luminance-hdr-2.6.0/src/UI/UMessageBox.h --- luminance-hdr-2.5.1+dfsg/src/UI/UMessageBox.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/UI/UMessageBox.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,49 +28,51 @@ #ifndef UMESSAGEBOX_H #define UMESSAGEBOX_H -#include -#include +#include #include -#include +#include #include +#include +#include +#include #include -#include #include -#include -class UMessageBox : public QMessageBox -{ +class UMessageBox : public QMessageBox { Q_OBJECT - public: + public: explicit UMessageBox(QWidget *parent = 0); UMessageBox(const QString &title, const QString &text, Icon icon, - int button0, int button1, int button2, - QWidget *parent = 0, - Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint); + int button0, int button1, int button2, QWidget *parent = 0, + Qt::WindowFlags f = Qt::Dialog | + Qt::MSWindowsFixedSizeDialogHint); virtual ~UMessageBox(); // virtual void showEvent(QShowEvent *event); - static void about(QWidget* parent = 0); + static void about(QWidget *parent = 0); - static int warning(const QString& title, const QString& description, QWidget* parent = 0); - static int question(const QString& title, const QString& description, QWidget* parent = 0); + static int warning(const QString &title, const QString &description, + QWidget *parent = 0); + static int question(const QString &title, const QString &description, + QWidget *parent = 0); - static int saveDialog(const QString& title, const QString& description, QWidget* parent = 0); + static int saveDialog(const QString &title, const QString &description, + QWidget *parent = 0); /* * Function not yet used, it will... :) */ - static void donationSplashMB(QWidget* parent); + static void donationSplashMB(QWidget *parent); -private: + private: // workaround to set size - QSpacerItem* m_horizontalSpacer; + QSpacerItem *m_horizontalSpacer; void init(); }; -#endif // UMESSAGEBOX_H +#endif // UMESSAGEBOX_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/CMakeLists.txt luminance-hdr-2.6.0/src/Viewers/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/src/Viewers/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -28,8 +28,8 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) # QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(viewers ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} -qt5_use_modules(viewers Core Gui Widgets) +ADD_LIBRARY(viewers STATIC ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX}) # ${FILES_UI_H} +TARGET_LINK_LIBRARIES(viewers Qt5::Core Qt5::Gui Qt5::Widgets) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_HXX} PARENT_SCOPE) # ${FILES_UI} SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} viewers PARENT_SCOPE) diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/GenericViewer.cpp luminance-hdr-2.6.0/src/Viewers/GenericViewer.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/GenericViewer.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/GenericViewer.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,37 +27,36 @@ * */ -#include #include #include #include +#include +#include "Libpfs/frame.h" #include "Viewers/GenericViewer.h" -#include "Viewers/PanIconWidget.h" -#include "Viewers/IGraphicsView.h" #include "Viewers/IGraphicsPixmapItem.h" -#include "Libpfs/frame.h" +#include "Viewers/IGraphicsView.h" +#include "Viewers/PanIconWidget.h" -namespace -{ -// define the number of pixels to count as border of the image, because of the shadow +namespace { +// define the number of pixels to count as border of the image, because of the +// shadow static const int BORDER_SIZE = 30; } -GenericViewer::GenericViewer(pfs::Frame* frame, QWidget *parent, bool ns): - QWidget(parent), - mViewerMode(FIT_WINDOW), - mNeedsSaving(ns), - mFrame(frame) -{ +GenericViewer::GenericViewer(pfs::Frame *frame, QWidget *parent, bool ns) + : QWidget(parent), + mViewerMode(FIT_WINDOW), + mNeedsSaving(ns), + mFrame(frame) { mVBL = new QVBoxLayout(this); mVBL->setSpacing(0); mVBL->setMargin(0); - mToolBar = new QToolBar("",this); + mToolBar = new QToolBar(QLatin1String(""), this); mToolBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); mToolBar->setFixedHeight(40); - mToolBar->setAutoFillBackground( true ); + mToolBar->setAutoFillBackground(true); mVBL->addWidget(mToolBar); @@ -67,79 +66,81 @@ mView->setCacheMode(QGraphicsView::CacheBackground); mView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); - connect(mView, SIGNAL(zoomIn()), this, SLOT(zoomIn())); - connect(mView, SIGNAL(zoomOut()), this, SLOT(zoomOut())); - connect(mView, SIGNAL(viewAreaChangedSize()), this, SLOT(updateView())); + connect(mView, &IGraphicsView::zoomIn, this, &GenericViewer::zoomIn); + connect(mView, &IGraphicsView::zoomOut, this, &GenericViewer::zoomOut); + connect(mView, &IGraphicsView::viewAreaChangedSize, this, + &GenericViewer::updateView); mView->horizontalScrollBar()->setTracking(true); mView->verticalScrollBar()->setTracking(true); - connect(mView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarChanged(int))); - connect(mView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarChanged(int))); + connect(mView->horizontalScrollBar(), &QAbstractSlider::valueChanged, this, + &GenericViewer::scrollBarChanged); + connect(mView->verticalScrollBar(), &QAbstractSlider::valueChanged, this, + &GenericViewer::scrollBarChanged); mCornerButton = new QToolButton(this); - mCornerButton->setIcon(QIcon::fromTheme("move", QIcon(":/program-icons/move"))); + mCornerButton->setIcon(QIcon::fromTheme(QStringLiteral("move"), + QIcon(":/program-icons/move"))); mView->setCornerWidget(mCornerButton); - connect(mCornerButton, SIGNAL(pressed()), this, SLOT(slotCornerButtonPressed())); + connect(mCornerButton, &QAbstractButton::pressed, this, + &GenericViewer::slotCornerButtonPressed); mVBL->addWidget(mView); mView->show(); mPixmap = new IGraphicsPixmapItem(); mScene->addItem(mPixmap); - connect(mPixmap, SIGNAL(selectionReady(bool)), this, SIGNAL(selectionReady(bool))); - connect(mPixmap, SIGNAL(startDragging()), this, SLOT(startDragging())); + connect(mPixmap, &IGraphicsPixmapItem::selectionReady, this, + &GenericViewer::selectionReady); + connect(mPixmap, &IGraphicsPixmapItem::startDragging, this, + &GenericViewer::startDragging); } -GenericViewer::~GenericViewer() -{ +GenericViewer::~GenericViewer() { + blockSignals(true); } -void GenericViewer::retranslateUi() -{ +void GenericViewer::retranslateUi() { mCornerButton->setToolTip(tr("Pan the image to a region")); } -void GenericViewer::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) - retranslateUi(); +void GenericViewer::changeEvent(QEvent *event) { + if (event->type() == QEvent::LanguageChange) retranslateUi(); QWidget::changeEvent(event); } -void GenericViewer::fitToWindow(bool /* checked */) -{ - // DO NOT de-comment: this line is not an optimization, it's a nice way to stop everything working correctly! - //if ( mViewerMode == FIT_WINDOW ) return; +void GenericViewer::fitToWindow(bool /* checked */) { + // DO NOT de-comment: this line is not an optimization, it's a nice way to + // stop everything working correctly! + // if ( mViewerMode == FIT_WINDOW ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = FIT_WINDOW; - const int w = mView->viewport()->size().width() - 2*BORDER_SIZE; - const int h = mView->viewport()->size().height() - 2*BORDER_SIZE; + const int w = mView->viewport()->size().width() - 2 * BORDER_SIZE; + const int h = mView->viewport()->size().height() - 2 * BORDER_SIZE; - qreal w_ratio = qreal(w)/getWidth(); - qreal h_ratio = qreal(h)/getHeight(); + qreal w_ratio = qreal(w) / getWidth(); + qreal h_ratio = qreal(h) / getHeight(); - qreal sf = qMin(w_ratio, h_ratio)/getScaleFactor(); + qreal sf = qMin(w_ratio, h_ratio) / getScaleFactor(); // update only if the change is above the 0.05% - if ( qAbs(sf - static_cast(1.0)) > 0.05 ) - { - mView->scale(sf,sf); + if (qAbs(sf - static_cast(1.0)) > 0.05) { + mView->scale(sf, sf); emit changed(this); } } -bool GenericViewer::isFittedToWindow() -{ +bool GenericViewer::isFittedToWindow() { return ((mViewerMode == FIT_WINDOW) ? true : false); } -void GenericViewer::fillToWindow() -{ - // DO NOT de-comment: this line is not an optimization, it's a nice way to stop everything working correctly! - //if ( mViewerMode == FILL_WINDOW ) return; +void GenericViewer::fillToWindow() { + // DO NOT de-comment: this line is not an optimization, it's a nice way to + // stop everything working correctly! + // if ( mViewerMode == FILL_WINDOW ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = FILL_WINDOW; @@ -147,153 +148,135 @@ const int w = mView->viewport()->size().width(); const int h = mView->viewport()->size().height(); - qreal w_ratio = qreal(w)/getWidth(); - qreal h_ratio = qreal(h)/getHeight(); + qreal w_ratio = qreal(w) / getWidth(); + qreal h_ratio = qreal(h) / getHeight(); - qreal sf = qMax(w_ratio, h_ratio)/getScaleFactor(); + qreal sf = qMax(w_ratio, h_ratio) / getScaleFactor(); // update only if the change is above the 0.05% - if ( qAbs(sf - static_cast(1.0)) > 0.05 ) - { - mView->scale(sf,sf); + if (qAbs(sf - static_cast(1.0)) > 0.05) { + mView->scale(sf, sf); emit changed(this); } } -bool GenericViewer::isFilledToWindow() -{ +bool GenericViewer::isFilledToWindow() { return ((mViewerMode == FILL_WINDOW) ? true : false); } -void GenericViewer::normalSize() -{ - //if ( mViewerMode == NORMAL_SIZE ) return; +void GenericViewer::normalSize() { + // if ( mViewerMode == NORMAL_SIZE ) return; mScene->setSceneRect(mPixmap->boundingRect()); mViewerMode = NORMAL_SIZE; qreal curr_scale_factor = getScaleFactor(); - qreal scale_by = 1.0f/curr_scale_factor; + qreal scale_by = 1.0f / curr_scale_factor; mView->scale(scale_by, scale_by); emit changed(this); } -bool GenericViewer::isNormalSize() -{ +bool GenericViewer::isNormalSize() { return ((mViewerMode == NORMAL_SIZE) ? true : false); } -GenericViewer::ViewerMode GenericViewer::getViewerMode() -{ - return mViewerMode; +GenericViewer::ViewerMode GenericViewer::getViewerMode() { return mViewerMode; } + +void GenericViewer::closeEvent(QCloseEvent *event) { + emit reparent(this, true); // true means user requested closing full screen viewer + event->ignore(); } -void GenericViewer::setViewerMode(GenericViewer::ViewerMode viewer_mode) -{ - switch (viewer_mode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FIT_WINDOW: - fitToWindow(); - break; - case FILL_WINDOW: - fillToWindow(); - break; +void GenericViewer::setViewerMode(GenericViewer::ViewerMode viewer_mode) { + switch (viewer_mode) { + case NORMAL_SIZE: + normalSize(); + break; + case FIT_WINDOW: + fitToWindow(); + break; + case FILL_WINDOW: + fillToWindow(); + break; } } -void GenericViewer::zoomIn() -{ +void GenericViewer::zoomIn() { // update the current view - switch (mViewerMode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FILL_WINDOW: - normalSize(); - break; - case FIT_WINDOW: - fillToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + normalSize(); + break; + case FILL_WINDOW: + normalSize(); + break; + case FIT_WINDOW: + fillToWindow(); + break; } emit changed(this); } -void GenericViewer::zoomOut() -{ +void GenericViewer::zoomOut() { // update the current view - switch (mViewerMode) - { - case NORMAL_SIZE: - fillToWindow(); - break; - case FILL_WINDOW: - fitToWindow(); - break; - case FIT_WINDOW: - fitToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + fillToWindow(); + break; + case FILL_WINDOW: + fitToWindow(); + break; + case FIT_WINDOW: + fitToWindow(); + break; } emit changed(this); } -void GenericViewer::updateView() -{ +void GenericViewer::updateView() { #ifdef QT_DEBUG qDebug() << "void GenericViewer::updateView()"; #endif - switch (mViewerMode) - { - case NORMAL_SIZE: - normalSize(); - break; - case FILL_WINDOW: - fillToWindow(); - break; - case FIT_WINDOW: - fitToWindow(); - break; + switch (mViewerMode) { + case NORMAL_SIZE: + normalSize(); + break; + case FILL_WINDOW: + fillToWindow(); + break; + case FIT_WINDOW: + fitToWindow(); + break; } } // Factor is a number between 0.01 and 1.0f (1% to 100%) -void GenericViewer::zoomToFactor(float /*factor*/) -{ - //scrollArea->zoomToFactor(factor); +void GenericViewer::zoomToFactor(float /*factor*/) { + // scrollArea->zoomToFactor(factor); emit changed(this); } -QRect GenericViewer::getSelectionRect(void) -{ +QRect GenericViewer::getSelectionRect(void) { return mPixmap->getSelectionRect(); } -void GenericViewer::setSelectionTool(bool toggled) -{ - if (toggled) mPixmap->enableSelectionTool(); - else mPixmap->disableSelectionTool(); +void GenericViewer::setSelectionTool(bool toggled) { + if (toggled) + mPixmap->enableSelectionTool(); + else + mPixmap->disableSelectionTool(); } -void GenericViewer::removeSelection(void) -{ - mPixmap->removeSelection(); -} +void GenericViewer::removeSelection(void) { mPixmap->removeSelection(); } -bool GenericViewer::hasSelection(void) -{ - return mPixmap->hasSelection(); -} +bool GenericViewer::hasSelection(void) { return mPixmap->hasSelection(); } -void GenericViewer::slotCornerButtonPressed() -{ +void GenericViewer::slotCornerButtonPressed() { mPanIconWidget = new PanIconWidget(this); // is there a way to avoid this call? @@ -306,85 +289,87 @@ float topviewpos = (float)(mView->verticalScrollBar()->value()); float wps_w = (float)(mView->maximumViewportSize().width()); float wps_h = (float)(mView->maximumViewportSize().height()); - QRect r((int)(leftviewpos/zf), (int)(topviewpos/zf), (int)(wps_w/zf), (int)(wps_h/zf)); + QRect r((int)(leftviewpos / zf), (int)(topviewpos / zf), (int)(wps_w / zf), + (int)(wps_h / zf)); mPanIconWidget->setRegionSelection(r); mPanIconWidget->setMouseFocus(); - connect(mPanIconWidget, SIGNAL(selectionMoved(QRect)), this, SLOT(slotPanIconSelectionMoved(QRect))); - connect(mPanIconWidget, SIGNAL(finished()), this, SLOT(slotPanIconHidden())); + connect(mPanIconWidget, &PanIconWidget::selectionMoved, this, + &GenericViewer::slotPanIconSelectionMoved); + connect(mPanIconWidget, &PanIconWidget::finished, this, + &GenericViewer::slotPanIconHidden); QPoint g = mView->mapToGlobal(mView->viewport()->pos()); - g.setX(g.x()+ mView->viewport()->size().width()); - g.setY(g.y()+ mView->viewport()->size().height()); - mPanIconWidget->popup(QPoint(g.x() - mPanIconWidget->width()/2, g.y() - mPanIconWidget->height()/2)); + g.setX(g.x() + mView->viewport()->size().width()); + g.setY(g.y() + mView->viewport()->size().height()); + mPanIconWidget->popup(QPoint(g.x() - mPanIconWidget->width() / 2, + g.y() - mPanIconWidget->height() / 2)); mPanIconWidget->setCursorToLocalRegionSelectionCenter(); } -void GenericViewer::slotPanIconSelectionMoved(QRect gotopos) -{ - mView->horizontalScrollBar()->setValue((int)(gotopos.x()*this->getScaleFactor())); - mView->verticalScrollBar()->setValue((int)(gotopos.y()*this->getScaleFactor())); +void GenericViewer::slotPanIconSelectionMoved(QRect gotopos) { + mView->horizontalScrollBar()->setValue( + (int)(gotopos.x() * this->getScaleFactor())); + mView->verticalScrollBar()->setValue( + (int)(gotopos.y() * this->getScaleFactor())); emit changed(this); } -void GenericViewer::slotPanIconHidden() -{ +void GenericViewer::slotPanIconHidden() { mPanIconWidget->close(); mCornerButton->blockSignals(true); mCornerButton->animateClick(); mCornerButton->blockSignals(false); } -void GenericViewer::scrollBarChanged(int /*value*/) -{ - emit changed(this); -} +void GenericViewer::scrollBarChanged(int /*value*/) { emit changed(this); } -void GenericViewer::syncViewer(GenericViewer *src) -{ +void GenericViewer::syncViewer(GenericViewer *src) { if (src == NULL) return; if (src == this) return; - setViewerMode( src->getViewerMode() ); + setViewerMode(src->getViewerMode()); - mView->horizontalScrollBar()->setValue( src->mView->horizontalScrollBar()->value() ); - mView->verticalScrollBar()->setValue( src->mView->verticalScrollBar()->value() ); + mView->horizontalScrollBar()->setValue( + src->mView->horizontalScrollBar()->value()); + mView->verticalScrollBar()->setValue( + src->mView->verticalScrollBar()->value()); } -float GenericViewer::getScaleFactor() -{ - return mView->transform().m11(); -} +float GenericViewer::getScaleFactor() { return mView->transform().m11(); } -QImage GenericViewer::getQImage() const -{ - return mPixmap->pixmap().toImage(); -} +QImage GenericViewer::getQImage() const { return mPixmap->pixmap().toImage(); } -void GenericViewer::setQImage(const QImage& qimage) -{ +void GenericViewer::setQImage(const QImage &qimage) { QPixmap pixmap = QPixmap::fromImage(qimage); pixmap.setDevicePixelRatio(m_devicePixelRatio); mPixmap->setPixmap(pixmap); } - -int GenericViewer::getWidth() -{ +int GenericViewer::getWidth() { if (mFrame) return mFrame->getWidth(); else return 0; } -int GenericViewer::getHeight() -{ +int GenericViewer::getHeight() { if (mFrame) return mFrame->getHeight(); else return 0; } -void GenericViewer::setFrame(pfs::Frame *new_frame, TonemappingOptions* tmopts) -{ +void GenericViewer::setFrameShared(std::shared_ptr new_frame) { + mFrame.swap(new_frame); + + // call virtual protected function + updatePixmap(); + + // reset boundaries + updateView(); +} + +void GenericViewer::setFrame(pfs::Frame *new_frame, + TonemappingOptions *tmopts) { mFrame.reset(new_frame); // call virtual protected function @@ -392,56 +377,43 @@ // update tonemappingoptions (if available) // in the current implementation, only LdrViewer redefines this function - if (tmopts != NULL) - setTonemappingOptions(tmopts); + if (tmopts != NULL) setTonemappingOptions(tmopts); // reset boundaries updateView(); } -pfs::Frame* GenericViewer::getFrame() const -{ - return mFrame.get(); -} +pfs::Frame *GenericViewer::getFrame() const { return mFrame.get(); } -void GenericViewer::startDragging() -{ +void GenericViewer::startDragging() { QDrag *drag = new QDrag(this); QMimeData *mimeData = new QMimeData; mimeData->setImageData(mPixmap->pixmap().toImage()); drag->setMimeData(mimeData); - drag->setPixmap(mPixmap->pixmap().scaledToHeight(mPixmap->pixmap().height()/10)); + drag->setPixmap( + mPixmap->pixmap().scaledToHeight(mPixmap->pixmap().height() / 10)); - /*Qt::DropAction dropAction =*/ drag->exec(); + /*Qt::DropAction dropAction =*/drag->exec(); } -void GenericViewer::keyPressEvent(QKeyEvent *event) -{ +void GenericViewer::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_F10) { emit reparent(this); - } - else if (event->key() == Qt::Key_N) { + } else if (event->key() == Qt::Key_N) { emit goNext(this); - } - else if (event->key() == Qt::Key_P) { + } else if (event->key() == Qt::Key_P) { emit goPrevious(this); - } - else if (event->key() == Qt::Key_S) { + } else if (event->key() == Qt::Key_S) { emit syncViewers(this); - } - else if (event->key() == Qt::Key_Plus) { + } else if (event->key() == Qt::Key_Plus) { zoomIn(); - } - else if (event->key() == Qt::Key_Minus) { + } else if (event->key() == Qt::Key_Minus) { zoomOut(); - } - else if (event->key() == Qt::Key_W) { + } else if (event->key() == Qt::Key_W) { fitToWindow(); - } - else if (event->key() == Qt::Key_F) { + } else if (event->key() == Qt::Key_F) { fillToWindow(); - } - else if (event->key() == Qt::Key_O) { + } else if (event->key() == Qt::Key_O) { normalSize(); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/GenericViewer.h luminance-hdr-2.6.0/src/Viewers/GenericViewer.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/GenericViewer.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/GenericViewer.h 2019-06-09 19:18:38.000000000 +0000 @@ -26,20 +26,20 @@ #include +#include +#include #include -#include #include -#include #include #include -#include -#include +#include +#include #include // Forward declaration namespace pfs { -class Frame; // #include "Libpfs/frame.h" +class Frame; // #include "Libpfs/frame.h" } class PanIconWidget; // #include "Common/PanIconWidget.h" @@ -47,24 +47,17 @@ class IGraphicsPixmapItem; // #include "Viewers/IGraphicsPixmapItem.h" class TonemappingOptions; -class GenericViewer : public QWidget -{ +class GenericViewer : public QWidget { Q_OBJECT -public: - + public: //! \brief Enum containing the list of possible view mode - enum ViewerMode - { - FIT_WINDOW = 0, - FILL_WINDOW = 1, - NORMAL_SIZE = 2 - }; + enum ViewerMode { FIT_WINDOW = 0, FILL_WINDOW = 1, NORMAL_SIZE = 2 }; -public: + public: //! \brief GenericViewer constructor //! \param[in] frame reference frame //! \param[in] ns need saving - GenericViewer(pfs::Frame* frame, QWidget *parent = 0, bool ns = false); + GenericViewer(pfs::Frame *frame, QWidget *parent = 0, bool ns = false); //! \brief GenericViewer virtual destructor virtual ~GenericViewer(); @@ -80,17 +73,21 @@ /*virtual*/ bool isNormalSize(); //! \brief Set tonemap options that generated the handled frame - //! \note GenericViewer holds only an empty implementation of this function. It is + //! \note GenericViewer holds only an empty implementation of this function. + //! It is //! up to the derived class to override this behaviour - virtual void setTonemappingOptions(TonemappingOptions* tmopts) {} + virtual void setTonemappingOptions(TonemappingOptions *tmopts) {} //! \brief Get tonemap options that generated the handled frame - //! \note GenericViewer holds only an empty implementation of this function. It is + //! \note GenericViewer holds only an empty implementation of this function. + //! It is //! up to the derived class to override this behaviour - virtual TonemappingOptions* getTonemappingOptions() { return NULL; } + virtual TonemappingOptions *getTonemappingOptions() { return NULL; } -public Q_SLOTS: - //! \brief Update viewer's pixmap when a new frame is set by setFrame() or AWB is performed + public Q_SLOTS: + //! \brief Update viewer's pixmap when a new frame is set by setFrame() or + //! AWB + //! is performed virtual void updatePixmap() = 0; /*virtual*/ void updateView(); // tells the Viewer to update the View area @@ -98,7 +95,8 @@ /*virtual*/ void zoomIn(); /*virtual*/ void zoomOut(); - /*virtual*/ void fitToWindow(bool checked = true); // checked is useless: kept for compatibility + /*virtual*/ void fitToWindow( + bool checked = true); // checked is useless: kept for compatibility /*virtual*/ void fillToWindow(); /*virtual*/ void normalSize(); @@ -118,14 +116,14 @@ void setNeedsSaving(bool); //! \brief get filename if set, or an empty string - const QString& getFileName() const; + const QString &getFileName() const; //! \brief set filename (overwrite previous status) - void setFileName(const QString&); + void setFileName(const QString &); //! \brief This function syncronizes scrollbars position and zoom mode //! \param[src] GenericViewer to syncronize with - void syncViewer(GenericViewer* src); + void syncViewer(GenericViewer *src); //! \brief tells is the viewer holds an LDR or an HDR frame virtual bool isHDR() = 0; @@ -137,10 +135,7 @@ virtual float getMinLuminanceValue() = 0; //! \brief returns the mapping method - virtual RGBMappingType getLuminanceMappingMethod() - { - return MAP_LINEAR; - } + virtual RGBMappingType getLuminanceMappingMethod() { return MAP_LINEAR; } //! \brief returns a filename postfix based on the viewer's content virtual QString getFileNamePostFix() = 0; @@ -152,50 +147,53 @@ QImage getQImage() const; //! \brief set new QImage - void setQImage(const QImage& qimage); + void setQImage(const QImage &qimage); //! \brief void setDevicePixelRatio(const float s); //! this function returns an handle to the internal data type //! it would be better if the return pointer is const - //! It requires to many changes at this stage and it does not worth the effort + //! It requires to many changes at this stage and it does not worth the + //! effort //! it will be done during the integration of LibHDR - pfs::Frame* getFrame() const; + pfs::Frame *getFrame() const; //! set a new reference frame to be shown in the viewport //! previous frame gets DELETED! - void setFrame(pfs::Frame* new_frame, TonemappingOptions* tmopts = NULL); + void setFrame(pfs::Frame *new_frame, TonemappingOptions *tmopts = NULL); + void setFrameShared(std::shared_ptr new_frame); -protected Q_SLOTS: - /*virtual*/ void slotPanIconSelectionMoved(QRect); - /*virtual*/ void slotPanIconHidden(); - /*virtual*/ void slotCornerButtonPressed(); - /*virtual*/ void scrollBarChanged(int /*value*/); + protected Q_SLOTS: + /*virtual*/ void slotPanIconSelectionMoved(QRect); + /*virtual*/ void slotPanIconHidden(); + /*virtual*/ void slotCornerButtonPressed(); + /*virtual*/ void scrollBarChanged(int /*value*/); void startDragging(); -protected: - + protected: virtual void retranslateUi(); - virtual void changeEvent(QEvent* event); + virtual void changeEvent(QEvent *event); - QToolBar* mToolBar; - QToolButton* mCornerButton; - PanIconWidget* mPanIconWidget; + void closeEvent(QCloseEvent *event); + + QToolBar *mToolBar; + QToolButton *mCornerButton; + PanIconWidget *mPanIconWidget; QVBoxLayout *mVBL; - QGraphicsScene* mScene; - IGraphicsView* mView; + QGraphicsScene *mScene; + IGraphicsView *mView; ViewerMode mViewerMode; - IGraphicsPixmapItem* mPixmap; + IGraphicsPixmapItem *mPixmap; QString mFileName; void keyPressEvent(QKeyEvent *event); -private: + private: //! \brief Zoom to the input factor //! \param[in] factor zoom factor to match //! \attention currently this function has an empty body @@ -206,48 +204,31 @@ float getScaleFactor(); bool mNeedsSaving; - std::unique_ptr mFrame; + std::shared_ptr mFrame; - QAction* m_actionClose; + QAction *m_actionClose; float m_devicePixelRatio = 1.0; -Q_SIGNALS: + Q_SIGNALS: void selectionReady(bool isReady); - void changed(GenericViewer *v); // emitted when zoomed in/out, scrolled .... - void reparent(GenericViewer *v); // emitted when exit fullscreen - void goNext(GenericViewer *v); // shows next image in fullscreen - void goPrevious(GenericViewer *v); // shows previous image in fullscreen - void syncViewers(GenericViewer *v); // toggle viewers syncronization + void changed( + GenericViewer *v); // emitted when zoomed in/out, scrolled .... + void reparent(GenericViewer *v, bool close = false); // emitted when exit fullscreen + void goNext(GenericViewer *v); // shows next image in fullscreen + void goPrevious(GenericViewer *v); // shows previous image in fullscreen + void syncViewers(GenericViewer *v); // toggle viewers syncronization }; -inline -bool GenericViewer::needsSaving(void) -{ - return mNeedsSaving; -} +inline bool GenericViewer::needsSaving(void) { return mNeedsSaving; } -inline -void GenericViewer::setNeedsSaving(bool s) -{ - mNeedsSaving = s; -} +inline void GenericViewer::setNeedsSaving(bool s) { mNeedsSaving = s; } -inline -const QString& GenericViewer::getFileName() const -{ - return mFileName; -} +inline const QString &GenericViewer::getFileName() const { return mFileName; } -inline -void GenericViewer::setFileName(const QString& fn) -{ - mFileName = fn; -} +inline void GenericViewer::setFileName(const QString &fn) { mFileName = fn; } -inline -void GenericViewer::setDevicePixelRatio(const float s) -{ +inline void GenericViewer::setDevicePixelRatio(const float s) { m_devicePixelRatio = s; } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/HdrViewer.cpp luminance-hdr-2.6.0/src/Viewers/HdrViewer.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/HdrViewer.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/HdrViewer.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,11 +27,11 @@ #include "HdrViewer.h" -#include #include +#include -#include #include +#include #include "arch/math.h" #include "Common/global.h" @@ -43,96 +43,99 @@ #include "Libpfs/array2d.h" #include "Libpfs/channel.h" #include "Libpfs/frame.h" -#include "Libpfs/utils/sse.h" #include "Libpfs/utils/msec_timer.h" +#include "Libpfs/utils/sse.h" -namespace // anonymous namespace +namespace // anonymous namespace { // Implementation details stay inside an anonymous namespace -// In this way, we let know the compiler it can mess up as much as it wants with the code, +// In this way, we let know the compiler it can mess up as much as it wants with +// the code, // because it will only used inside this compilation unit -const pfs::Array2Df* getPrimaryChannel(const pfs::Frame& frame) -{ +const pfs::Array2Df *getPrimaryChannel(const pfs::Frame &frame) { return frame.getChannel("Y"); } -} // end anonymous namespace +} // end anonymous namespace -HdrViewer::HdrViewer(pfs::Frame* frame, QWidget *parent, bool ns) - : GenericViewer(frame, parent, ns) - , m_mappingMethod(MAP_GAMMA2_2) - , m_minValue(0.f) - , m_maxValue(1.f) -{ +HdrViewer::HdrViewer(pfs::Frame *frame, QWidget *parent, bool ns) + : GenericViewer(frame, parent, ns), + m_mappingMethod(MAP_GAMMA2_2), + m_minValue(0.f), + m_maxValue(1.f) { initUi(); + if (frame != nullptr) + { // I prefer to do everything by hand, so the flow of the calls is clear m_lumRange->blockSignals(true); m_lumRange->setHistogramImage(getPrimaryChannel(*getFrame())); m_lumRange->fitToDynamicRange(); - m_mappingMethod = static_cast( m_mappingMethodCB->currentIndex() ); - m_minValue = powf( 10.0f, m_lumRange->getRangeWindowMin() ); - m_maxValue = powf( 10.0f, m_lumRange->getRangeWindowMax() ); + m_mappingMethod = + static_cast(m_mappingMethodCB->currentIndex()); + m_minValue = powf(10.0f, m_lumRange->getRangeWindowMin()); + m_maxValue = powf(10.0f, m_lumRange->getRangeWindowMax()); QScopedPointer qImage(mapFrameToImage(getFrame())); mPixmap->setPixmap(QPixmap::fromImage(*qImage)); updateView(); m_lumRange->blockSignals(false); + } } -void HdrViewer::initUi() -{ - m_mappingMethodLabel = new QLabel( mToolBar ); - m_mappingMethodLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); - m_mappingMethodCB = new QComboBox( mToolBar ); +void HdrViewer::initUi() { + m_mappingMethodLabel = new QLabel(mToolBar); + m_mappingMethodLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_mappingMethodCB = new QComboBox(mToolBar); mToolBar->addWidget(m_mappingMethodLabel); mToolBar->addWidget(m_mappingMethodCB); mToolBar->addSeparator(); - m_mappingMethodLabel->setBuddy( m_mappingMethodCB ); + m_mappingMethodLabel->setBuddy(m_mappingMethodCB); - m_histLabel = new QLabel( mToolBar ); - m_lumRange = new LuminanceRangeWidget( mToolBar ); + m_histLabel = new QLabel(mToolBar); + m_lumRange = new LuminanceRangeWidget(mToolBar); mToolBar->addWidget(m_histLabel); mToolBar->addWidget(m_lumRange); mToolBar->addSeparator(); - connect( m_lumRange, SIGNAL( updateRangeWindow() ), this, SLOT( updateRangeWindow() ) ); - mToolBar->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed); + connect(m_lumRange, &LuminanceRangeWidget::updateRangeWindow, this, + &HdrViewer::updateRangeWindow); + mToolBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); retranslateUi(); } -void HdrViewer::retranslateUi() -{ +void HdrViewer::retranslateUi() { m_mappingMethodLabel->setText(tr("&Mapping:")); m_histLabel->setText(tr("Histogram:")); int oldMappingMethodIndex = m_mappingMethodCB->currentIndex(); - disconnect( m_mappingMethodCB, SIGNAL( activated( int ) ), this, SLOT( setLumMappingMethod(int) ) ); + disconnect(m_mappingMethodCB, + static_cast(&QComboBox::activated), + this, &HdrViewer::setLumMappingMethod); QStringList methods; - methods << tr("Linear") - << tr("Gamma 1.4") - << tr("Gamma 1.8") - << tr("Gamma 2.2") - << tr("Gamma 2.6") - << tr("Logarithmic"); + methods << tr("Linear") << tr("Gamma 1.4") << tr("Gamma 1.8") + << tr("Gamma 2.2") << tr("Gamma 2.6") << tr("Logarithmic"); m_mappingMethodCB->clear(); m_mappingMethodCB->addItems(methods); - m_mappingMethodCB->setCurrentIndex( oldMappingMethodIndex >= 0 ? oldMappingMethodIndex : 3 ); - connect(m_mappingMethodCB, SIGNAL(activated( int )), this, SLOT(setLumMappingMethod(int))); - connect(m_mappingMethodCB, SIGNAL(currentIndexChanged(int)), m_mappingMethodCB, SLOT(setFocus())); + m_mappingMethodCB->setCurrentIndex( + oldMappingMethodIndex >= 0 ? oldMappingMethodIndex : 3); + connect(m_mappingMethodCB, + static_cast(&QComboBox::activated), this, + &HdrViewer::setLumMappingMethod); + connect(m_mappingMethodCB, SIGNAL(currentIndexChanged(int)), + m_mappingMethodCB, SLOT(setFocus())); // TODO convert to new style GenericViewer::retranslateUi(); } -void HdrViewer::refreshPixmap() -{ - setCursor( Qt::WaitCursor ); +void HdrViewer::refreshPixmap() { + setCursor(Qt::WaitCursor); QScopedPointer qImage(mapFrameToImage(getFrame())); mPixmap->setPixmap(QPixmap::fromImage(*qImage)); @@ -140,8 +143,7 @@ unsetCursor(); } -void HdrViewer::updatePixmap() -{ +void HdrViewer::updatePixmap() { #ifdef QT_DEBUG qDebug() << "void HdrViewer::updatePixmap()"; #endif @@ -156,93 +158,70 @@ m_lumRange->blockSignals(false); } -LuminanceRangeWidget* HdrViewer::lumRange() -{ - return m_lumRange; -} +LuminanceRangeWidget *HdrViewer::lumRange() { return m_lumRange; } -void HdrViewer::updateRangeWindow() -{ +void HdrViewer::updateRangeWindow() { setRangeWindow(powf(10.0f, m_lumRange->getRangeWindowMin()), powf(10.0f, m_lumRange->getRangeWindowMax())); } -void HdrViewer::setRangeWindow( float min, float max ) -{ +void HdrViewer::setRangeWindow(float min, float max) { m_minValue = min; m_maxValue = max; refreshPixmap(); } -int HdrViewer::getLumMappingMethod() -{ +int HdrViewer::getLumMappingMethod() { return m_mappingMethodCB->currentIndex(); } -void HdrViewer::setLumMappingMethod( int method ) -{ - m_mappingMethodCB->setCurrentIndex( method ); +void HdrViewer::setLumMappingMethod(int method) { + m_mappingMethodCB->setCurrentIndex(method); m_mappingMethod = static_cast(method); refreshPixmap(); } //! empty dtor -HdrViewer::~HdrViewer() -{} +HdrViewer::~HdrViewer() {} -QString HdrViewer::getFileNamePostFix() -{ - return QString("_hdr_preview"); +QString HdrViewer::getFileNamePostFix() { + return QStringLiteral("_hdr_preview"); } -QString HdrViewer::getExifComment() -{ - return QString("HDR Created with Luminance HDR"); +QString HdrViewer::getExifComment() { + return QStringLiteral("HDR Created with Luminance HDR"); } //! \brief returns max value of the handled frame -float HdrViewer::getMaxLuminanceValue() -{ - return m_maxValue; -} +float HdrViewer::getMaxLuminanceValue() { return m_maxValue; } //! \brief returns min value of the handled frame -float HdrViewer::getMinLuminanceValue() -{ - return m_minValue; -} +float HdrViewer::getMinLuminanceValue() { return m_minValue; } -RGBMappingType HdrViewer::getLuminanceMappingMethod() -{ +RGBMappingType HdrViewer::getLuminanceMappingMethod() { return m_mappingMethod; } -QImage* HdrViewer::mapFrameToImage(pfs::Frame* in_frame) -{ - return fromLDRPFStoQImage(in_frame, m_minValue, m_maxValue, m_mappingMethod); +QImage *HdrViewer::mapFrameToImage(pfs::Frame *in_frame) { + return fromLDRPFStoQImage(in_frame, m_minValue, m_maxValue, + m_mappingMethod); } -void HdrViewer::keyPressEvent(QKeyEvent *event) -{ +void HdrViewer::keyPressEvent(QKeyEvent *event) { GenericViewer::keyPressEvent(event); if (event->key() == Qt::Key_L) { m_lumRange->lowDynamicRange(); - } - else if (event->key() == Qt::Key_BracketLeft) { + } else if (event->key() == Qt::Key_BracketLeft) { m_lumRange->extendRange(); - } - else if (event->key() == Qt::Key_BracketRight) { + } else if (event->key() == Qt::Key_BracketRight) { m_lumRange->shrinkRange(); - } - else if (event->key() == Qt::Key_Backslash) { + } else if (event->key() == Qt::Key_Backslash) { m_lumRange->fitToDynamicRange(); - } - else if (event->key() == Qt::Key_0) { + } else if (event->key() == Qt::Key_0) { m_lumRange->decreaseExposure(); - } - else if (event->key() == Qt::Key_9) { + } else if (event->key() == Qt::Key_9) { m_lumRange->increaseExposure(); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/HdrViewer.h luminance-hdr-2.6.0/src/Viewers/HdrViewer.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/HdrViewer.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/HdrViewer.h 2019-06-09 19:18:38.000000000 +0000 @@ -31,32 +31,30 @@ #ifndef IMAGEHDRVIEWER_H #define IMAGEHDRVIEWER_H -#include -#include #include +#include +#include #include #include -#include +#include #include "GenericViewer.h" // Forward declaration -namespace pfs -{ +namespace pfs { class Frame; } class LuminanceRangeWidget; -class HdrViewer : public GenericViewer -{ +class HdrViewer : public GenericViewer { Q_OBJECT -public: - HdrViewer(pfs::Frame* frame, QWidget* parent = 0, bool ns = false); + public: + HdrViewer(pfs::Frame *frame, QWidget *parent = 0, bool ns = false); virtual ~HdrViewer(); - LuminanceRangeWidget* lumRange(); + LuminanceRangeWidget *lumRange(); QString getFileNamePostFix(); QString getExifComment(); @@ -73,27 +71,27 @@ RGBMappingType getLuminanceMappingMethod(); -public Q_SLOTS: + public Q_SLOTS: void updateRangeWindow(); int getLumMappingMethod(); - void setLumMappingMethod( int method ); + void setLumMappingMethod(int method); -protected Q_SLOTS: + protected Q_SLOTS: virtual void updatePixmap(); -protected: + protected: // Methods virtual void retranslateUi(); void setRangeWindow(float min, float max); void keyPressEvent(QKeyEvent *event); // UI - LuminanceRangeWidget* m_lumRange; - QComboBox* m_mappingMethodCB; - QLabel* m_mappingMethodLabel; - QLabel* m_histLabel; + LuminanceRangeWidget *m_lumRange; + QComboBox *m_mappingMethodCB; + QLabel *m_mappingMethodLabel; + QLabel *m_histLabel; -private: + private: void initUi(); void refreshPixmap(); @@ -101,12 +99,9 @@ float m_minValue; float m_maxValue; - QImage* mapFrameToImage(pfs::Frame* in_frame); + QImage *mapFrameToImage(pfs::Frame *in_frame); }; -inline bool HdrViewer::isHDR() -{ - return true; -} +inline bool HdrViewer::isHDR() { return true; } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/Histogram.cpp luminance-hdr-2.6.0/src/Viewers/Histogram.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/Histogram.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/Histogram.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,75 +27,64 @@ #include "Histogram.h" -#include #include +#include #include -Histogram::Histogram( int bins, int accuracy ) - : bins( bins ) - , accuracy( accuracy ) - , P( new float[bins] ) -{} - -Histogram::~Histogram() -{ - delete[] P; -} +Histogram::Histogram(int bins, int accuracy) + : bins(bins), accuracy(accuracy), P(new float[bins]) {} + +Histogram::~Histogram() { delete[] P; } -void Histogram::computeLog( const pfs::Array2Df *image ) -{ - const int size = image->getRows()*image->getCols(); - - float max, min; // Find min, max - { - min = 999999999.0f; - max = -999999999.0f; - - for( int i = 0; i < size; i += accuracy ) { - float v = (*image)(i); - if( v > max ) max = v; - else if( v < min ) min = v; +void Histogram::computeLog(const pfs::Array2Df *image) { + const int size = image->getRows() * image->getCols(); + + float max, min; // Find min, max + { + min = 999999999.0f; + max = -999999999.0f; + + for (int i = 0; i < size; i += accuracy) { + float v = (*image)(i); + if (v > max) + max = v; + else if (v < min) + min = v; + } } - } - computeLog( image, min, max ); + computeLog(image, min, max); } +void Histogram::computeLog(const pfs::Array2Df *image, float min, float max) { + const int size = image->getRows() * image->getCols(); + + // Empty all bins + for (int i = 0; i < bins; i++) P[i] = 0; -void Histogram::computeLog( const pfs::Array2Df *image, float min, float max ) -{ - const int size = image->getRows()*image->getCols(); - - // Empty all bins - for( int i = 0; i < bins; i++ ) - P[i] = 0; - - float count = 0; - float binWidth = (max-min)/(float)bins; - for( int i = 0; i < size; i += accuracy ) { - float v = (*image)(i); - if( v <= 0 ) continue; - v = log10(v); - int bin = (int)((v-min)/binWidth); - if( bin > bins || bin < 0 ) continue; - if( bin == bins ) bin = bins-1; - P[bin] += 1; - count++; - } - - // Normalize, to get probability - for( int i = 0; i < bins; i++ ) - P[i] /= (float)(count/accuracy); + float count = 0; + float binWidth = (max - min) / (float)bins; + for (int i = 0; i < size; i += accuracy) { + float v = (*image)(i); + if (v <= 0) continue; + v = log10(v); + int bin = (int)((v - min) / binWidth); + if (bin > bins || bin < 0) continue; + if (bin == bins) bin = bins - 1; + P[bin] += 1; + count++; + } + // Normalize, to get probability + for (int i = 0; i < bins; i++) P[i] /= (float)(count / accuracy); } -float Histogram::getMaxP() const -{ - float maxP = -1; - for( int i = 0; i < bins; i++ ) { - if( P[i] > maxP ) { - maxP = P[i]; +float Histogram::getMaxP() const { + float maxP = -1; + for (int i = 0; i < bins; i++) { + if (P[i] > maxP) { + maxP = P[i]; + } } - } - return maxP; + return maxP; } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/Histogram.h luminance-hdr-2.6.0/src/Viewers/Histogram.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/Histogram.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/Histogram.h 2019-06-09 19:18:38.000000000 +0000 @@ -30,34 +30,26 @@ #include #include "Libpfs/array2d_fwd.h" -class Histogram -{ - int bins; - int accuracy; - - float *P; - -public: - Histogram( int bins, int accuracy = 1 ); - ~Histogram(); - - void computeLog( const pfs::Array2Df *image ); - void computeLog( const pfs::Array2Df *image, float min, float max ); - - int getBins() const - { - return bins; - } +class Histogram { + int bins; + int accuracy; - float getMaxP() const; - float getP( int bin ) const - { - assert( bin < bins ); - return P[bin]; - } + float *P; + public: + Histogram(int bins, int accuracy = 1); + ~Histogram(); + void computeLog(const pfs::Array2Df *image); + void computeLog(const pfs::Array2Df *image, float min, float max); + int getBins() const { return bins; } + + float getMaxP() const; + float getP(int bin) const { + assert(bin < bins); + return P[bin]; + } }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsPixmapItem.cpp luminance-hdr-2.6.0/src/Viewers/IGraphicsPixmapItem.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsPixmapItem.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/IGraphicsPixmapItem.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,64 +29,53 @@ #include "Viewers/IGraphicsPixmapItem.h" #include "Viewers/ISelectionBox.h" -IGraphicsPixmapItem::IGraphicsPixmapItem(QGraphicsItem *parent): - QGraphicsPixmapItem(parent), - mDropShadow(new QGraphicsDropShadowEffect()), - mSelectionBox(NULL), - mIsSelectionEnabled(true) -{ +IGraphicsPixmapItem::IGraphicsPixmapItem(QGraphicsItem *parent) + : QGraphicsPixmapItem(parent), + mDropShadow(new QGraphicsDropShadowEffect()), + mSelectionBox(NULL), + mIsSelectionEnabled(true) { mDropShadow->setBlurRadius(10); - mDropShadow->setOffset(0,0); - //this->setGraphicsEffect(mDropShadow); + mDropShadow->setOffset(0, 0); + // this->setGraphicsEffect(mDropShadow); setTransformationMode(Qt::SmoothTransformation); } -IGraphicsPixmapItem::~IGraphicsPixmapItem() -{ - if ( mSelectionBox ) delete mSelectionBox; +IGraphicsPixmapItem::~IGraphicsPixmapItem() { + if (mSelectionBox) delete mSelectionBox; delete mDropShadow; } -QRect IGraphicsPixmapItem::getSelectionRect() -{ - if (mSelectionBox) - { +QRect IGraphicsPixmapItem::getSelectionRect() { + if (mSelectionBox) { return mSelectionBox->getSelection().toRect(); - } - else - { - return QRect(0,0,0,0); + } else { + return QRect(0, 0, 0, 0); } } -void IGraphicsPixmapItem::removeSelection() -{ - if (mSelectionBox) - { +void IGraphicsPixmapItem::removeSelection() { + if (mSelectionBox) { delete mSelectionBox; mSelectionBox = NULL; - //scene()->update(); + // scene()->update(); emit selectionReady(false); } } -void IGraphicsPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ +void IGraphicsPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (!mIsSelectionEnabled && event->button() == Qt::LeftButton) { emit startDragging(); return; } - if (event->button() == Qt::LeftButton) - { + if (event->button() == Qt::LeftButton) { setCursor(Qt::CrossCursor); } } -void IGraphicsPixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ +void IGraphicsPixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (!mIsSelectionEnabled) { event->ignore(); return; @@ -96,58 +85,46 @@ setCursor(Qt::CrossCursor); - if (mSelectionBox) - { - QPointF origin = ISelectionBox::checkBorders(event->buttonDownScenePos(Qt::LeftButton), this); + if (mSelectionBox) { + QPointF origin = ISelectionBox::checkBorders( + event->buttonDownScenePos(Qt::LeftButton), this); QPointF current = ISelectionBox::checkBorders(event->scenePos(), this); mSelectionBox->setSelection(QRectF(origin, current)); - } - else - { + } else { mSelectionBox = new ISelectionBox(this); - QPointF origin = ISelectionBox::checkBorders(event->buttonDownScenePos(Qt::LeftButton), this); + QPointF origin = ISelectionBox::checkBorders( + event->buttonDownScenePos(Qt::LeftButton), this); mSelectionBox->setSelection(QRectF(origin, QSizeF())); mSelectionBox->show(); } } -void IGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ +void IGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (!mIsSelectionEnabled) return; - if (event->button() == Qt::LeftButton) - { - switch (mMouseState) - { - case SELECTING: - { - if (mSelectionBox) - { - QPointF origin = ISelectionBox::checkBorders(event->buttonDownScenePos(Qt::LeftButton), this); - QPointF current = ISelectionBox::checkBorders(event->scenePos(), this); - mSelectionBox->setSelection(QRectF(origin, current)); - - emit selectionReady(true); - } - mMouseState = IDLE; - } - break; - - default: - case IDLE: - { - if (mSelectionBox) removeSelection(); - } - break; + if (event->button() == Qt::LeftButton) { + switch (mMouseState) { + case SELECTING: { + if (mSelectionBox) { + QPointF origin = ISelectionBox::checkBorders( + event->buttonDownScenePos(Qt::LeftButton), this); + QPointF current = + ISelectionBox::checkBorders(event->scenePos(), this); + mSelectionBox->setSelection(QRectF(origin, current)); + + emit selectionReady(true); + } + mMouseState = IDLE; + } break; + + default: + case IDLE: { + if (mSelectionBox) removeSelection(); + } break; } unsetCursor(); - } - else + } else event->ignore(); } - - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsPixmapItem.h luminance-hdr-2.6.0/src/Viewers/IGraphicsPixmapItem.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsPixmapItem.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/IGraphicsPixmapItem.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,21 +25,20 @@ #ifndef IGRAPHICSPIXMAPITEM_H #define IGRAPHICSPIXMAPITEM_H -#include -#include +#include #include #include #include #include -#include +#include +#include -class ISelectionBox; // forward declaration +class ISelectionBox; // forward declaration -class IGraphicsPixmapItem : public QObject, public virtual QGraphicsPixmapItem -{ +class IGraphicsPixmapItem : public QObject, public virtual QGraphicsPixmapItem { Q_OBJECT -public: - IGraphicsPixmapItem(QGraphicsItem * parent = 0); + public: + IGraphicsPixmapItem(QGraphicsItem *parent = 0); ~IGraphicsPixmapItem(); QRect getSelectionRect(); @@ -49,37 +48,35 @@ void enableSelectionTool(); void disableSelectionTool(); -Q_SIGNALS: + Q_SIGNALS: void selectionReady(bool); void startDragging(); -protected: + protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent *e); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *e); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *e); - //virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + // virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem + // *option, QWidget *widget); - QGraphicsDropShadowEffect* mDropShadow; - ISelectionBox* mSelectionBox; + QGraphicsDropShadowEffect *mDropShadow; + ISelectionBox *mSelectionBox; bool mIsSelectionEnabled; enum { IDLE, SELECTING } mMouseState; }; -inline bool IGraphicsPixmapItem::hasSelection() -{ +inline bool IGraphicsPixmapItem::hasSelection() { return (mSelectionBox != NULL); } -inline void IGraphicsPixmapItem::enableSelectionTool() -{ +inline void IGraphicsPixmapItem::enableSelectionTool() { mIsSelectionEnabled = true; } -inline void IGraphicsPixmapItem::disableSelectionTool() -{ +inline void IGraphicsPixmapItem::disableSelectionTool() { mIsSelectionEnabled = false; removeSelection(); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsView.cpp luminance-hdr-2.6.0/src/Viewers/IGraphicsView.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsView.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/IGraphicsView.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,50 +27,39 @@ #include -IGraphicsView::IGraphicsView(QWidget * parent): - QGraphicsView(parent) -{ +IGraphicsView::IGraphicsView(QWidget *parent) : QGraphicsView(parent) { init(); } -IGraphicsView::IGraphicsView(QGraphicsScene * scene, QWidget * parent): - QGraphicsView(scene, parent) -{ +IGraphicsView::IGraphicsView(QGraphicsScene *scene, QWidget *parent) + : QGraphicsView(scene, parent) { init(); } -void IGraphicsView::init() -{ - //setDragMode(QGraphicsView::RubberBandDrag); +void IGraphicsView::init() { + // setDragMode(QGraphicsView::RubberBandDrag); setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); } -IGraphicsView::~IGraphicsView() -{ } +IGraphicsView::~IGraphicsView() {} -void IGraphicsView::wheelEvent(QWheelEvent *event) -{ +void IGraphicsView::wheelEvent(QWheelEvent *event) { // get the focus! setFocus(); - if (event->modifiers() == Qt::ControlModifier) - { + if (event->modifiers() == Qt::ControlModifier) { if (event->delta() > 0) emit zoomIn(); if (event->delta() < 0) emit zoomOut(); - } - else - { + } else { // scrolls up/down - left/right QGraphicsView::wheelEvent(event); } } -void IGraphicsView::resizeEvent(QResizeEvent* event) -{ +void IGraphicsView::resizeEvent(QResizeEvent *event) { // default resizeEvent handling // keeps the center QGraphicsView::resizeEvent(event); emit viewAreaChangedSize(); } - diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsView.h luminance-hdr-2.6.0/src/Viewers/IGraphicsView.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/IGraphicsView.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/IGraphicsView.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,27 +28,27 @@ #include #include -#include #include +#include class IGraphicsView : public QGraphicsView { Q_OBJECT -private: + private: void init(); -public: - explicit IGraphicsView ( QWidget * parent = 0 ); - IGraphicsView ( QGraphicsScene * scene, QWidget * parent = 0 ); + public: + explicit IGraphicsView(QWidget *parent = 0); + IGraphicsView(QGraphicsScene *scene, QWidget *parent = 0); ~IGraphicsView(); -protected: + + protected: virtual void wheelEvent(QWheelEvent *event); - virtual void resizeEvent(QResizeEvent* event); + virtual void resizeEvent(QResizeEvent *event); -Q_SIGNALS: + Q_SIGNALS: void zoomIn(); void zoomOut(); void viewAreaChangedSize(); }; #endif - diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionAnchor.cpp luminance-hdr-2.6.0/src/Viewers/ISelectionAnchor.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionAnchor.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/ISelectionAnchor.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -27,13 +27,13 @@ #include "Viewers/ISelectionAnchor.h" -ISelectionAnchor::ISelectionAnchor(AnchorPosition position, QGraphicsItem *parent): - QGraphicsItem(parent), - mAnchorColor(Qt::black), - mSize(ANCHOR_SIZE), - mPosition(position), - mMouseState(MOUSE_BUTTON_RELEASED) -{ +ISelectionAnchor::ISelectionAnchor(AnchorPosition position, + QGraphicsItem *parent) + : QGraphicsItem(parent), + mAnchorColor(Qt::black), + mSize(ANCHOR_SIZE), + mPosition(position), + mMouseState(MOUSE_BUTTON_RELEASED) { setParentItem(parent); this->setAcceptHoverEvents(true); @@ -42,30 +42,27 @@ // we have to implement the mouse events to keep the linker happy, // just set accepted to false since are not actually handling them -//void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneDragDropEvent *event) +// void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneDragDropEvent *event) //{ // event->setAccepted(false); //} -//void ISelectionAnchor::mousePressEvent(QGraphicsSceneDragDropEvent *event) +// void ISelectionAnchor::mousePressEvent(QGraphicsSceneDragDropEvent *event) //{ // event->setAccepted(false); //} -void ISelectionAnchor::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) -{ +void ISelectionAnchor::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { mMouseState = MOUSE_BUTTON_RELEASED; event->setAccepted(false); } -void ISelectionAnchor::mousePressEvent(QGraphicsSceneMouseEvent* event) -{ +void ISelectionAnchor::mousePressEvent(QGraphicsSceneMouseEvent *event) { mMouseState = MOUSE_BUTTON_PRESSED; event->setAccepted(false); } -void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneMouseEvent* event) -{ +void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { mMouseState = MOUSE_MOVING; event->setAccepted(false); } @@ -73,65 +70,62 @@ // change the color on hover events to indicate to the use the object has // been captured by the mouse -void ISelectionAnchor::hoverLeaveEvent(QGraphicsSceneHoverEvent*) -{ +void ISelectionAnchor::hoverLeaveEvent(QGraphicsSceneHoverEvent *) { unsetCursor(); mAnchorColor = Qt::black; this->update(); } -void ISelectionAnchor::hoverEnterEvent(QGraphicsSceneHoverEvent*) -{ +void ISelectionAnchor::hoverEnterEvent(QGraphicsSceneHoverEvent *) { setCursor(Qt::CrossCursor); -// switch (mPosition) -// { -// case TOP_LEFT: -// case BOTTOM_RIGHT: -// setCursor(Qt::SizeFDiagCursor); -// break; -// case TOP_RIGHT: -// case BOTTOM_LEFT: -// setCursor(Qt::SizeBDiagCursor); -// break; -// case LEFT: case RIGHT: -// setCursor(Qt::SizeHorCursor); -// break; -// case TOP: case BOTTOM: -// setCursor(Qt::SizeVerCursor); -// break; -// } + // switch (mPosition) + // { + // case TOP_LEFT: + // case BOTTOM_RIGHT: + // setCursor(Qt::SizeFDiagCursor); + // break; + // case TOP_RIGHT: + // case BOTTOM_LEFT: + // setCursor(Qt::SizeBDiagCursor); + // break; + // case LEFT: case RIGHT: + // setCursor(Qt::SizeHorCursor); + // break; + // case TOP: case BOTTOM: + // setCursor(Qt::SizeVerCursor); + // break; + // } mAnchorColor = Qt::red; this->update(); } -QRectF ISelectionAnchor::boundingRect() const -{ - return QRectF(-mSize/qreal(2.), -mSize/qreal(2.), mSize, mSize).normalized() ; +QRectF ISelectionAnchor::boundingRect() const { + return QRectF(-mSize / qreal(2.), -mSize / qreal(2.), mSize, mSize) + .normalized(); } #include -void ISelectionAnchor::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) -{ - QList views = this->scene()->views(); +void ISelectionAnchor::paint(QPainter *painter, + const QStyleOptionGraphicsItem *, QWidget *) { + QList views = this->scene()->views(); // I only consider the first one for speed, being sure that - if ( views.count() >= 1) - { - QGraphicsView* view = views.at(0); - qreal sf = 1.0/view->transform().m11(); + if (views.count() >= 1) { + QGraphicsView *view = views.at(0); + qreal sf = 1.0 / view->transform().m11(); - mSize = qFloor(ANCHOR_SIZE*sf); - } - else - { + mSize = qFloor(ANCHOR_SIZE * sf); + } else { // default values mSize = ANCHOR_SIZE; } - painter->setPen( Qt::NoPen ); - painter->setBrush( QBrush(mAnchorColor, Qt::SolidPattern) ); - painter->drawEllipse( QRectF(-mSize/qreal(2.), -mSize/qreal(2.), mSize, mSize).normalized() ); + painter->setPen(Qt::NoPen); + painter->setBrush(QBrush(mAnchorColor, Qt::SolidPattern)); + painter->drawEllipse( + QRectF(-mSize / qreal(2.), -mSize / qreal(2.), mSize, mSize) + .normalized()); } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionAnchor.h luminance-hdr-2.6.0/src/Viewers/ISelectionAnchor.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionAnchor.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/ISelectionAnchor.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,30 +25,42 @@ #ifndef ISELECTIONANCHOR_H #define ISELECTIONANCHOR_H -#include +#include #include #include -#include #include #include -#include +#include +#include #include #include #include #define ANCHOR_SIZE (8) -enum AnchorPosition {TOP_LEFT, TOP, TOP_RIGHT, LEFT, RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT}; -enum AnchorMouseState {MOUSE_BUTTON_RELEASED, MOUSE_BUTTON_PRESSED, MOUSE_MOVING}; - -class ISelectionAnchor: public QGraphicsItem -{ +enum AnchorPosition { + TOP_LEFT, + TOP, + TOP_RIGHT, + LEFT, + RIGHT, + BOTTOM_LEFT, + BOTTOM, + BOTTOM_RIGHT +}; +enum AnchorMouseState { + MOUSE_BUTTON_RELEASED, + MOUSE_BUTTON_PRESSED, + MOUSE_MOVING +}; -public: - explicit ISelectionAnchor(AnchorPosition position, QGraphicsItem *parent = 0); +class ISelectionAnchor : public QGraphicsItem { + public: + explicit ISelectionAnchor(AnchorPosition position, + QGraphicsItem *parent = 0); // allows the owner to find out which coner this is - inline AnchorPosition getCorner() { return mPosition; } + inline AnchorPosition getCorner() { return mPosition; } // allows the owner to record the current mouse state inline void setMouseState(AnchorPosition position) { mPosition = position; } // allows the owner to get the current mouse state @@ -56,28 +68,29 @@ qreal getAnchorSize() { return mSize; } -private: - - // must be re-implemented in this class to provide the diminsions of the box to the QGraphicsView + private: + // must be re-implemented in this class to provide the diminsions of the box + // to the QGraphicsView virtual QRectF boundingRect() const; // must be re-implemented here to pain the box on the paint-event - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + virtual void paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, QWidget *widget); // must be re-implemented to handle mouse hover enter events - virtual void hoverEnterEvent(QGraphicsSceneHoverEvent * event); + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); // must be re-implemented to handle mouse hover leave events - virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent * event); + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); // once the hover event handlers are implemented in this class, // the mouse events must allow be implemented because of // some linkage issue - apparrently there is some connection // between the hover events and mouseMove/Press/Release // events which triggers a vtable issue - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event); - //virtual void mouseMoveEvent(QGraphicsSceneDragDropEvent *event); - virtual void mousePressEvent(QGraphicsSceneMouseEvent * event); - //virtual void mousePressEvent(QGraphicsSceneDragDropEvent *event); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event); + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + // virtual void mouseMoveEvent(QGraphicsSceneDragDropEvent *event); + virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); + // virtual void mousePressEvent(QGraphicsSceneDragDropEvent *event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); // the hover event handlers will toggle this between red and black QColor mAnchorColor; @@ -87,4 +100,4 @@ AnchorMouseState mMouseState; }; -#endif // ISELECTIONANCHOR_H +#endif // ISELECTIONANCHOR_H diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionBox.cpp luminance-hdr-2.6.0/src/Viewers/ISelectionBox.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionBox.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/ISelectionBox.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -22,17 +22,15 @@ * */ +#include #include #include #include -#include #include "Viewers/ISelectionBox.h" -ISelectionBox::ISelectionBox(QGraphicsPixmapItem * parent): - QGraphicsItem(parent), - mParent(parent), mSelectedArea(0, 0, 0, 0) -{ +ISelectionBox::ISelectionBox(QGraphicsPixmapItem *parent) + : QGraphicsItem(parent), mParent(parent), mSelectedArea(0, 0, 0, 0) { // 0 ---- 1 -----2 // | | // 7 + 3 @@ -63,8 +61,7 @@ this->update(); } -ISelectionBox::~ISelectionBox() -{ +ISelectionBox::~ISelectionBox() { delete mAnchors[0]; delete mAnchors[1]; delete mAnchors[2]; @@ -75,25 +72,30 @@ delete mAnchors[7]; } -void ISelectionBox::setCornerPositions() -{ +void ISelectionBox::setCornerPositions() { mAnchors[0]->setPos(mSelectedArea.topLeft()); - mAnchors[1]->setPos(QPointF((mSelectedArea.left() + mSelectedArea.right())/2, mSelectedArea.top())); // top + mAnchors[1]->setPos( + QPointF((mSelectedArea.left() + mSelectedArea.right()) / 2, + mSelectedArea.top())); // top mAnchors[2]->setPos(mSelectedArea.topRight()); - mAnchors[3]->setPos(QPointF(mSelectedArea.right(), (mSelectedArea.top()+mSelectedArea.bottom())/2)); // right + mAnchors[3]->setPos( + QPointF(mSelectedArea.right(), + (mSelectedArea.top() + mSelectedArea.bottom()) / 2)); // right mAnchors[4]->setPos(mSelectedArea.bottomRight()); - mAnchors[5]->setPos(QPointF((mSelectedArea.left() + mSelectedArea.right())/2, mSelectedArea.bottom())); // bottom + mAnchors[5]->setPos( + QPointF((mSelectedArea.left() + mSelectedArea.right()) / 2, + mSelectedArea.bottom())); // bottom mAnchors[6]->setPos(mSelectedArea.bottomLeft()); - mAnchors[7]->setPos(QPointF(mSelectedArea.left(), (mSelectedArea.top()+mSelectedArea.bottom())/2 )); // left + mAnchors[7]->setPos( + QPointF(mSelectedArea.left(), + (mSelectedArea.top() + mSelectedArea.bottom()) / 2)); // left } -void ISelectionBox::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ +void ISelectionBox::mousePressEvent(QGraphicsSceneMouseEvent *event) { setCursor(Qt::ClosedHandCursor); } -void ISelectionBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ +void ISelectionBox::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { // simply, no? This is the power of OOP! setCursor(Qt::ClosedHandCursor); @@ -105,171 +107,149 @@ QPointF motion_vector = current - start; // left/right - if (mSelectedArea.left() + motion_vector.x() < bounding_rect.left()) motion_vector.setX(bounding_rect.left() - mSelectedArea.left()); - if (mSelectedArea.right() + motion_vector.x() > bounding_rect.right()) motion_vector.setX(bounding_rect.right() - mSelectedArea.right()); - - if (mSelectedArea.top() + motion_vector.y() < bounding_rect.top()) motion_vector.setY(bounding_rect.top() - mSelectedArea.top()); - if (mSelectedArea.bottom() + motion_vector.y() > bounding_rect.bottom()) motion_vector.setY(bounding_rect.bottom() - mSelectedArea.bottom()); + if (mSelectedArea.left() + motion_vector.x() < bounding_rect.left()) + motion_vector.setX(bounding_rect.left() - mSelectedArea.left()); + if (mSelectedArea.right() + motion_vector.x() > bounding_rect.right()) + motion_vector.setX(bounding_rect.right() - mSelectedArea.right()); + + if (mSelectedArea.top() + motion_vector.y() < bounding_rect.top()) + motion_vector.setY(bounding_rect.top() - mSelectedArea.top()); + if (mSelectedArea.bottom() + motion_vector.y() > bounding_rect.bottom()) + motion_vector.setY(bounding_rect.bottom() - mSelectedArea.bottom()); // move! mSelectedArea.moveTopLeft(mSelectedArea.topLeft() + motion_vector); this->update(); } -void ISelectionBox::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - this->mousePressEvent(event); // reuse the same code! +void ISelectionBox::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { + this->mousePressEvent(event); // reuse the same code! setCursor(Qt::OpenHandCursor); } -void ISelectionBox::hoverEnterEvent(QGraphicsSceneHoverEvent * event) -{ +void ISelectionBox::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { setCursor(Qt::OpenHandCursor); } -void ISelectionBox::hoverLeaveEvent(QGraphicsSceneHoverEvent * event) -{ +void ISelectionBox::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) {} -} - -QRectF ISelectionBox::boundingRect() const -{ +QRectF ISelectionBox::boundingRect() const { return mSelectedArea.normalized(); } -void ISelectionBox::setSelection(QRectF selection) -{ +void ISelectionBox::setSelection(QRectF selection) { mSelectedArea = selection.normalized(); this->update(); } -QRectF ISelectionBox::getSelection() -{ - return mSelectedArea.normalized(); -} +QRectF ISelectionBox::getSelection() { return mSelectedArea.normalized(); } -void ISelectionBox::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) -{ +void ISelectionBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *, + QWidget *) { // draw outside region - QRegion outsideArea = mParent->boundingRegion(mParent->sceneTransform()) - QRegion(getSelection().toRect()); + QRegion outsideArea = mParent->boundingRegion(mParent->sceneTransform()) - + QRegion(getSelection().toRect()); painter->setPen(Qt::NoPen); - painter->setBrush(QColor(127,127,127,188)); + painter->setBrush(QColor(127, 127, 127, 188)); painter->drawRects(outsideArea.rects()); // draw border - //QPen pen(QColor(255,255,255,255)); + // QPen pen(QColor(255,255,255,255)); QPen pen(Qt::yellow); pen.setWidth(1); pen.setStyle(Qt::DashLine); pen.setCapStyle(Qt::RoundCap); pen.setJoinStyle(Qt::MiterJoin); - painter->setPen( pen ); - painter->setBrush( Qt::NoBrush ); - painter->drawRect( mSelectedArea.normalized() ); + painter->setPen(pen); + painter->setBrush(Qt::NoBrush); + painter->drawRect(mSelectedArea.normalized()); // draw corners setCornerPositions(); } -QPointF ISelectionBox::checkBorders(QPointF in, QGraphicsItem* area) -{ +QPointF ISelectionBox::checkBorders(QPointF in, QGraphicsItem *area) { QRectF parents_rect = area->boundingRect(); - if (in.x() < parents_rect.left()) in.setX(parents_rect.left()); - else if (in.x() > parents_rect.right()) in.setX(parents_rect.right()); - - if (in.y() < parents_rect.top()) in.setY(parents_rect.top()); - else if (in.y() > parents_rect.bottom()) in.setY(parents_rect.bottom()); + if (in.x() < parents_rect.left()) + in.setX(parents_rect.left()); + else if (in.x() > parents_rect.right()) + in.setX(parents_rect.right()); + + if (in.y() < parents_rect.top()) + in.setY(parents_rect.top()); + else if (in.y() > parents_rect.bottom()) + in.setY(parents_rect.bottom()); return in; } -bool ISelectionBox::sceneEventFilter(QGraphicsItem* watched, QEvent* event) -{ - ISelectionAnchor* anchor = dynamic_cast(watched); - if (anchor == NULL) return false; // not expected to get here +bool ISelectionBox::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { + ISelectionAnchor *anchor = dynamic_cast(watched); + if (anchor == NULL) return false; // not expected to get here - QGraphicsSceneMouseEvent* mouse_event = dynamic_cast(event); + QGraphicsSceneMouseEvent *mouse_event = + dynamic_cast(event); // this is not one of the mouse events we are interested in if (mouse_event == NULL) return false; - //if (mouse_event->button() != Qt::LeftButton) return true; + // if (mouse_event->button() != Qt::LeftButton) return true; - switch (mouse_event->type()) - { - case QEvent::GraphicsSceneMouseMove: - case QEvent::GraphicsSceneMouseRelease: - { - QPointF currCoord = checkBorders(mouse_event->scenePos(), mParent); - - // TOP_LEFT, TOP, TOP_RIGHT, LEFT, RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT - switch(anchor->getCorner()) - { - case TOP_LEFT: - { - mSelectedArea.setTopLeft(currCoord); - } - break; - case TOP_RIGHT: - { - mSelectedArea.setTopRight(currCoord); - } - break; - case BOTTOM_RIGHT: - { - mSelectedArea.setBottomRight(currCoord); - } + switch (mouse_event->type()) { + case QEvent::GraphicsSceneMouseMove: + case QEvent::GraphicsSceneMouseRelease: { + QPointF currCoord = checkBorders(mouse_event->scenePos(), mParent); + + // TOP_LEFT, TOP, TOP_RIGHT, LEFT, RIGHT, BOTTOM_LEFT, BOTTOM, + // BOTTOM_RIGHT + switch (anchor->getCorner()) { + case TOP_LEFT: { + mSelectedArea.setTopLeft(currCoord); + } break; + case TOP_RIGHT: { + mSelectedArea.setTopRight(currCoord); + } break; + case BOTTOM_RIGHT: { + mSelectedArea.setBottomRight(currCoord); + } break; + case BOTTOM_LEFT: { + mSelectedArea.setBottomLeft(currCoord); + } break; + case TOP: { + mSelectedArea.setTop(currCoord.y()); + } break; + case BOTTOM: { + mSelectedArea.setBottom(currCoord.y()); + } break; + case LEFT: { + mSelectedArea.setLeft(currCoord.x()); + } break; + case RIGHT: { + mSelectedArea.setRight(currCoord.x()); + } break; + } + + if (mouse_event->type() == QEvent::GraphicsSceneMouseRelease) { + mSelectedArea = mSelectedArea.normalized(); + } + this->update(); break; - case BOTTOM_LEFT: - { - mSelectedArea.setBottomLeft(currCoord); } - break; - case TOP: - { - mSelectedArea.setTop(currCoord.y()); - } - break; - case BOTTOM: - { - mSelectedArea.setBottom(currCoord.y()); - } - break; - case LEFT: - { - mSelectedArea.setLeft(currCoord.x()); - } - break; - case RIGHT: - { - mSelectedArea.setRight(currCoord.x()); - } - break; - } - - if (mouse_event->type() == QEvent::GraphicsSceneMouseRelease) - { - mSelectedArea = mSelectedArea.normalized(); - } - this->update(); - break; - } - case QEvent::GraphicsSceneMousePress: { } break; - - // so the compiler doesn't bitch - default: { } break; + case QEvent::GraphicsSceneMousePress: { + } break; - } + // so the compiler doesn't bitch + default: { } break; } return true; } -//void ISelectionBox::mouseMoveEvent(QGraphicsSceneDragDropEvent *event) +// void ISelectionBox::mouseMoveEvent(QGraphicsSceneDragDropEvent *event) //{ // event->setAccepted(false); //} -//void ISelectionBox::mousePressEvent(QGraphicsSceneDragDropEvent *event) +// void ISelectionBox::mousePressEvent(QGraphicsSceneDragDropEvent *event) //{ // event->setAccepted(false); //} diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionBox.h luminance-hdr-2.6.0/src/Viewers/ISelectionBox.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/ISelectionBox.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/ISelectionBox.h 2019-06-09 19:18:38.000000000 +0000 @@ -25,54 +25,56 @@ #ifndef ISELECTIONTOOL_H #define ISELECTIONTOOL_H -#include -#include #include +#include #include #include -#include #include +#include +#include #include "Viewers/ISelectionAnchor.h" -class ISelectionBox : public QGraphicsItem -{ -public: - ISelectionBox(QGraphicsPixmapItem * parent = 0); +class ISelectionBox : public QGraphicsItem { + public: + ISelectionBox(QGraphicsPixmapItem *parent = 0); ~ISelectionBox(); void setSelection(QRectF selection); QRectF getSelection(); // checks and modifies that a certain point is not outside the parent's area - static QPointF checkBorders(QPointF, QGraphicsItem*); -protected: - // must be re-implemented in this class to provide the diminsions of the box to the QGraphicsView + static QPointF checkBorders(QPointF, QGraphicsItem *); + + protected: + // must be re-implemented in this class to provide the diminsions of the box + // to the QGraphicsView virtual QRectF boundingRect() const; // must be re-implemented here to pain the box on the paint-event - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + virtual void paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, QWidget *widget); // must be re-implemented to handle mouse hover enter events - virtual void hoverEnterEvent(QGraphicsSceneHoverEvent * event); + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); // must be re-implemented to handle mouse hover leave events - virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent * event); + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); - // allows the main object to be moved in the scene by capturing the mouse move events - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event); - virtual void mousePressEvent(QGraphicsSceneMouseEvent * event); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event); - - //virtual void mouseMoveEvent(QGraphicsSceneDragDropEvent *event); - //virtual void mousePressEvent(QGraphicsSceneDragDropEvent *event); - virtual bool sceneEventFilter(QGraphicsItem * watched, QEvent * event); + // allows the main object to be moved in the scene by capturing the mouse + // move + // events + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + + // virtual void mouseMoveEvent(QGraphicsSceneDragDropEvent *event); + // virtual void mousePressEvent(QGraphicsSceneDragDropEvent *event); + virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event); void setCornerPositions(); - QGraphicsPixmapItem* mParent; + QGraphicsPixmapItem *mParent; - ISelectionAnchor* mAnchors[8]; + ISelectionAnchor *mAnchors[8]; QRectF mSelectedArea; - }; #endif - diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/LdrViewer.cpp luminance-hdr-2.6.0/src/Viewers/LdrViewer.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/LdrViewer.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/LdrViewer.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -25,43 +25,37 @@ * */ +#include #include +#include +#include #include #include -#include -#include -#include -#include "Viewers/LdrViewer.h" -#include "Viewers/IGraphicsPixmapItem.h" +#include "Common/LuminanceOptions.h" #include "Core/TonemappingOptions.h" #include "Fileformat/pfsoutldrimage.h" -#include "Common/LuminanceOptions.h" +#include "Viewers/IGraphicsPixmapItem.h" +#include "Viewers/LdrViewer.h" #include #include using namespace pfs; -namespace -{ -void parseOptions(TonemappingOptions *opts, QString& caption) -{ - if (opts == NULL) - { +namespace { +void parseOptions(TonemappingOptions *opts, QString &caption) { + if (opts == NULL) { caption.clear(); - } - else - { + } else { TMOptionsOperations tmopts(opts); - //postfix = opts->getPostfix(); + // postfix = opts->getPostfix(); caption = opts->getCaption(); - //exif_comment = tmopts.getExifComment(); + // exif_comment = tmopts.getExifComment(); } } -bool doCMSTransform(QImage& qImage, bool doProof, bool doGamutCheck) -{ +bool doCMSTransform(QImage &qImage, bool doProof, bool doGamutCheck) { LuminanceOptions luminance_opts; QString monitor_fname = luminance_opts.getMonitorProfileFileName(); qDebug() << "Monitor profile: " << monitor_fname; @@ -69,110 +63,104 @@ qDebug() << "Printer profile: " << printer_fname; // Check Monitor Profile - if ( monitor_fname.isEmpty() ) - { + if (monitor_fname.isEmpty()) { return false; } - utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - utils::ScopedCmsProfile hOut( - cmsOpenProfileFromFile( - QFile::encodeName( monitor_fname ).constData(), "r") - ); + utils::ScopedCmsProfile hsRGB(cmsCreate_sRGBProfile()); + utils::ScopedCmsProfile hOut(cmsOpenProfileFromFile( + QFile::encodeName(monitor_fname).constData(), "r")); utils::ScopedCmsProfile hProof; utils::ScopedCmsTransform xform; // Check whether the output profile is open - if ( !hOut ) - { - QMessageBox::warning(0, - QObject::tr("Warning"), - QObject::tr("I cannot open monitor profile. Please select a different one."), + if (!hOut) { + QMessageBox::warning(0, QObject::tr("Warning"), + QObject::tr("I cannot open monitor profile. " + "Please select a different one."), QMessageBox::Ok, QMessageBox::NoButton); return false; } // - if (doProof && !printer_fname.isEmpty()) - { - hProof.reset( - cmsOpenProfileFromFile( - QFile::encodeName( printer_fname ).constData(), "r") - ); - if ( !hProof ) - { - QMessageBox::warning(0, - QObject::tr("Warning"), - QObject::tr("I cannot open printer profile. Please select a different one."), + if (doProof && !printer_fname.isEmpty()) { + hProof.reset(cmsOpenProfileFromFile( + QFile::encodeName(printer_fname).constData(), "r")); + if (!hProof) { + QMessageBox::warning(0, QObject::tr("Warning"), + QObject::tr("I cannot open printer profile. " + "Please select a different one."), QMessageBox::Ok, QMessageBox::NoButton); doProof = false; } - } - else if (doProof) - { - QMessageBox::warning(0, - QObject::tr("Warning"), + } else if (doProof) { + QMessageBox::warning(0, QObject::tr("Warning"), QObject::tr("Please select a printer profile ."), QMessageBox::Ok, QMessageBox::NoButton); doProof = false; } - if (doProof) - { - cmsUInt32Number dwFlags = doGamutCheck ? cmsFLAGS_SOFTPROOFING | cmsFLAGS_GAMUTCHECK : cmsFLAGS_SOFTPROOFING; - cmsUInt16Number alarmCodes[cmsMAXCHANNELS] = { 0 }; + if (doProof) { + cmsUInt32Number dwFlags = + doGamutCheck ? cmsFLAGS_SOFTPROOFING | cmsFLAGS_GAMUTCHECK + : cmsFLAGS_SOFTPROOFING; + cmsUInt16Number alarmCodes[cmsMAXCHANNELS] = {0}; alarmCodes[1] = 0xFFFF; cmsSetAlarmCodes(alarmCodes); - xform.reset( cmsCreateProofingTransform(hsRGB.data(), TYPE_BGRA_8, //TYPE_RGBA_8, - hOut.data(), TYPE_BGRA_8, //TYPE_RGBA_8, - hProof.data(), INTENT_PERCEPTUAL, INTENT_ABSOLUTE_COLORIMETRIC, dwFlags) ); - } - else - { - xform.reset( cmsCreateTransform(hsRGB.data(), TYPE_BGRA_8, //TYPE_RGBA_8, - hOut.data(), TYPE_BGRA_8, //TYPE_RGBA_8, - INTENT_PERCEPTUAL, 0) ); - } - - if ( !xform ) - { - QMessageBox::warning(0, - QObject::tr("Warning"), - QObject::tr("I cannot perform the color transform. Please select a different monitor profile."), - QMessageBox::Ok, QMessageBox::NoButton); + xform.reset(cmsCreateProofingTransform( + hsRGB.data(), TYPE_BGRA_8, // TYPE_RGBA_8, + hOut.data(), TYPE_BGRA_8, // TYPE_RGBA_8, + hProof.data(), INTENT_PERCEPTUAL, INTENT_ABSOLUTE_COLORIMETRIC, + dwFlags)); + } else { + xform.reset(cmsCreateTransform(hsRGB.data(), + TYPE_BGRA_8, // TYPE_RGBA_8, + hOut.data(), + TYPE_BGRA_8, // TYPE_RGBA_8, + INTENT_PERCEPTUAL, 0)); + } + + if (!xform) { + QMessageBox::warning( + 0, QObject::tr("Warning"), + QObject::tr("I cannot perform the color transform. Please select a " + "different monitor profile."), + QMessageBox::Ok, QMessageBox::NoButton); return false; } - cmsDoTransform( xform.data(), qImage.bits(), qImage.bits(), - qImage.width()*qImage.height() ); + cmsDoTransform(xform.data(), qImage.bits(), qImage.bits(), + qImage.width() * qImage.height()); return true; } } // This constructor is a bit of a mess! -LdrViewer::LdrViewer(pfs::Frame* frame, TonemappingOptions* opts, QWidget *parent, bool ns, const float devicePixelRatio) - : GenericViewer(frame, parent, ns) - , informativeLabel(new QLabel(mToolBar)) - , mTonemappingOptions(opts) -{ - informativeLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - informativeLabel->setMinimumSize(QSize(200,36)); +LdrViewer::LdrViewer(pfs::Frame *frame, TonemappingOptions *opts, + QWidget *parent, bool ns, const float devicePixelRatio) + : GenericViewer(frame, parent, ns), + informativeLabel(new QLabel(mToolBar)), + mTonemappingOptions(opts) { + informativeLabel->setSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Preferred); + informativeLabel->setMinimumSize(QSize(200, 36)); mToolBar->addWidget(informativeLabel); setDevicePixelRatio(devicePixelRatio); - mPixmap->disableSelectionTool(); // disable by default crop functionalities + mPixmap->disableSelectionTool(); // disable by default crop functionalities // I shouldn't call a virtual function straight from the constructor, - // but specifing correctly which version of this virtual function I want to call, + // but specifing correctly which version of this virtual function I want to + // call, // I am safe LdrViewer::setTonemappingOptions(opts); - QScopedPointer temp_qimage( fromLDRPFStoQImage(getFrame()) ); + QScopedPointer temp_qimage(fromLDRPFStoQImage(getFrame())); doCMSTransform(*temp_qimage, false, false); setQImage(*temp_qimage); @@ -180,95 +168,84 @@ retranslateUi(); } -LdrViewer::~LdrViewer() -{ +LdrViewer::~LdrViewer() { #ifdef QT_DEBUG qDebug() << "LdrViewer::~LdrViewer()"; #endif } -void LdrViewer::retranslateUi() -{ +void LdrViewer::retranslateUi() { parseOptions(mTonemappingOptions, caption); - informativeLabel->setText( tr("LDR image [%1 x %2]: %3").arg(getWidth()).arg(getHeight()).arg( caption )); + informativeLabel->setText(tr("LDR image [%1 x %2]: %3") + .arg(getWidth()) + .arg(getHeight()) + .arg(caption)); GenericViewer::retranslateUi(); } -QString LdrViewer::getFileNamePostFix() -{ +QString LdrViewer::getFileNamePostFix() { return mTonemappingOptions ? mTonemappingOptions->getPostfix() : QString(); } -QString LdrViewer::getExifComment() -{ - if ( mTonemappingOptions ) - { +QString LdrViewer::getExifComment() { + if (mTonemappingOptions) { TMOptionsOperations tm_ops(mTonemappingOptions); return tm_ops.getExifComment(); - } - else - { + } else { return QString(); } } -void LdrViewer::updatePixmap() -{ +void LdrViewer::updatePixmap() { #ifdef QT_DEBUG qDebug() << "void LdrViewer::updatePixmap()"; #endif - QScopedPointer temp_qimage( fromLDRPFStoQImage(getFrame())); + QScopedPointer temp_qimage(fromLDRPFStoQImage(getFrame())); doCMSTransform(*temp_qimage, false, false); mPixmap->setPixmap(QPixmap::fromImage(*temp_qimage)); parseOptions(mTonemappingOptions, caption); - informativeLabel->setText( tr("LDR image [%1 x %2]: %3").arg(getWidth()).arg(getHeight()).arg( caption )); + informativeLabel->setText(tr("LDR image [%1 x %2]: %3") + .arg(getWidth()) + .arg(getHeight()) + .arg(caption)); } -void LdrViewer::setTonemappingOptions(TonemappingOptions* tmopts) -{ +void LdrViewer::setTonemappingOptions(TonemappingOptions *tmopts) { mTonemappingOptions = tmopts; parseOptions(tmopts, caption); setWindowTitle(caption); - //setToolTip(caption); - informativeLabel->setText( tr("LDR image [%1 x %2]: %3").arg(getWidth()).arg(getHeight()).arg( caption )); + // setToolTip(caption); + informativeLabel->setText(tr("LDR image [%1 x %2]: %3") + .arg(getWidth()) + .arg(getHeight()) + .arg(caption)); } -TonemappingOptions* LdrViewer::getTonemappingOptions() -{ +TonemappingOptions *LdrViewer::getTonemappingOptions() { return mTonemappingOptions; } //! \brief returns max value of the handled frame -float LdrViewer::getMaxLuminanceValue() -{ - return 1.0f; -} +float LdrViewer::getMaxLuminanceValue() { return 1.0f; } //! \brief returns min value of the handled frame -float LdrViewer::getMinLuminanceValue() -{ - return 0.0f; -} +float LdrViewer::getMinLuminanceValue() { return 0.0f; } -void LdrViewer::doSoftProofing(bool doGamutCheck) -{ - QScopedPointer src_image( fromLDRPFStoQImage(getFrame()) ); - if ( doCMSTransform(*src_image, true, doGamutCheck) ) - { +void LdrViewer::doSoftProofing(bool doGamutCheck) { + QScopedPointer src_image(fromLDRPFStoQImage(getFrame())); + if (doCMSTransform(*src_image, true, doGamutCheck)) { mPixmap->setPixmap(QPixmap::fromImage(*src_image)); } } -void LdrViewer::undoSoftProofing() -{ - QScopedPointer src_image( fromLDRPFStoQImage(getFrame()) ); - if ( doCMSTransform(*src_image, false, false) ) - { +void LdrViewer::undoSoftProofing() { + QScopedPointer src_image(fromLDRPFStoQImage(getFrame())); + if (doCMSTransform(*src_image, false, false)) { mPixmap->setPixmap(QPixmap::fromImage(*src_image)); } } diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/LdrViewer.h luminance-hdr-2.6.0/src/Viewers/LdrViewer.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/LdrViewer.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/LdrViewer.h 2019-06-09 19:18:38.000000000 +0000 @@ -35,13 +35,14 @@ #include "GenericViewer.h" // Forward declaration -class TonemappingOptions; // #include "Core/TonemappingOptions.h" +class TonemappingOptions; // #include "Core/TonemappingOptions.h" -class LdrViewer: public GenericViewer -{ +class LdrViewer : public GenericViewer { Q_OBJECT -public: - LdrViewer(pfs::Frame* frame, TonemappingOptions* opts = 0, QWidget *parent = 0, bool ns = 0, const float devicePixelRatio = 1.0); + public: + LdrViewer(pfs::Frame *frame, TonemappingOptions *opts = 0, + QWidget *parent = 0, bool ns = 0, + const float devicePixelRatio = 1.0); virtual ~LdrViewer(); QString getFileNamePostFix(); QString getExifComment(); @@ -52,11 +53,11 @@ //! \brief Set tonemap options that generated the handled frame //! \note Override default empty behavioru of GenericViewer - virtual void setTonemappingOptions(TonemappingOptions* tmopts); + virtual void setTonemappingOptions(TonemappingOptions *tmopts); //! \brief Get tonemap options that generated the handled frame //! \note Override default empty behavioru of GenericViewer - virtual TonemappingOptions* getTonemappingOptions(); + virtual TonemappingOptions *getTonemappingOptions(); //! \brief returns max value of the handled frame float getMaxLuminanceValue(); @@ -67,21 +68,18 @@ void doSoftProofing(bool); void undoSoftProofing(); -protected Q_SLOTS: + protected Q_SLOTS: virtual void updatePixmap(); -protected: + protected: virtual void retranslateUi(); -private: - QString caption; // ,postfix,exif_comment; + private: + QString caption; // ,postfix,exif_comment; QLabel *informativeLabel; - TonemappingOptions* mTonemappingOptions; + TonemappingOptions *mTonemappingOptions; }; -inline bool LdrViewer::isHDR() -{ - return false; -} +inline bool LdrViewer::isHDR() { return false; } #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/LuminanceRangeWidget.cpp luminance-hdr-2.6.0/src/Viewers/LuminanceRangeWidget.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/LuminanceRangeWidget.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/LuminanceRangeWidget.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -29,8 +29,8 @@ #include "LuminanceRangeWidget.h" -#include #include +#include #include #include @@ -46,315 +46,293 @@ static const float shrinkStep = 0.1f; static const float minWindowSize = 0.1f; -static const int dragZoneMargin = 5; // How many pizels from the range window border should draging be activated - -#define min(x,y) ( (x)<(y) ? (x) : (y) ) -#define max(x,y) ( (x)>(y) ? (x) : (y) ) - -LuminanceRangeWidget::LuminanceRangeWidget( QWidget *parent ): - QFrame( parent ), dragMode(DRAG_NO), showVP( false ), valuePointer(0.f), histogram( NULL ), histogramImage( NULL ) - -{ - setFrameStyle( QFrame::Panel|QFrame::Sunken ); - setMouseTracking( true ); - - minValue = -6; - maxValue = 8; - windowMin = 0; - windowMax = 2; +static const int dragZoneMargin = 5; // How many pizels from the range window + // border should draging be activated - mouseDragStart = -1; - dragShift = 0; +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) -} - -LuminanceRangeWidget::~LuminanceRangeWidget() -{ - delete histogram; - -} - - -QSize LuminanceRangeWidget::sizeHint () const -{ - return QSize( 300, 22 ); -} - -#define getWindowX( x ) ((int)((x-minValue) / (maxValue-minValue) * (float)fRect.width()) + fRect.left()) - -void LuminanceRangeWidget::paintEvent( QPaintEvent */*pe */) -{ - QPainter p( this ); - - QRect fRect = getPaintRect(); +LuminanceRangeWidget::LuminanceRangeWidget(QWidget *parent) + : QFrame(parent), + dragMode(DRAG_NO), + showVP(false), + valuePointer(0.f), + histogram(NULL), + histogramImage(NULL) + +{ + setFrameStyle(QFrame::Panel | QFrame::Sunken); + setMouseTracking(true); + + minValue = -6; + maxValue = 8; + windowMin = 0; + windowMax = 2; + + mouseDragStart = -1; + dragShift = 0; +} + +LuminanceRangeWidget::~LuminanceRangeWidget() { delete histogram; } + +QSize LuminanceRangeWidget::sizeHint() const { return QSize(300, 22); } + +#define getWindowX(x) \ + ((int)((x - minValue) / (maxValue - minValue) * (float)fRect.width()) + \ + fRect.left()) + +void LuminanceRangeWidget::paintEvent(QPaintEvent * /*pe */) { + QPainter p(this); + + QRect fRect = getPaintRect(); + + if (fRect.width() < 50) // Does not make sense to paint anything + return; + // p.begin(this); + // Paint range window + { + int x1, x2; + x1 = getWindowX(draggedMin()); + x2 = getWindowX(draggedMax()); + QColor selectionColor = mouseDragStart == DRAGNOTSTARTED + ? QColor(0, 100, 255) + : QColor(0, 150, 255); + p.fillRect(x1, fRect.top(), x2 - x1, fRect.height(), + QBrush(selectionColor)); + } - if( fRect.width() < 50 ) // Does not make sense to paint anything - return; -// p.begin(this); - // Paint range window - { - int x1, x2; - x1 = getWindowX( draggedMin() ); - x2 = getWindowX( draggedMax() ); - QColor selectionColor = mouseDragStart == DRAGNOTSTARTED ? - QColor( 0, 100, 255 ) : QColor( 0, 150, 255 ); - p.fillRect( x1, fRect.top(), x2-x1, fRect.height(), QBrush( selectionColor ) ); - } - - // Paint histogram - if( histogramImage != NULL ) { - if( histogram == NULL || histogram->getBins() != fRect.width() ) { - delete histogram; - // Build histogram from at least 5000 pixels - int accuracy = histogramImage->getRows()*histogramImage->getCols()/5000; -// int accuracy =1; - if( accuracy < 1 ) accuracy = 1; - histogram = new Histogram( fRect.width(), accuracy ); - histogram->computeLog( histogramImage, minValue, maxValue ); + // Paint histogram + if (histogramImage != NULL) { + if (histogram == NULL || histogram->getBins() != fRect.width()) { + delete histogram; + // Build histogram from at least 5000 pixels + int accuracy = + histogramImage->getRows() * histogramImage->getCols() / 5000; + // int accuracy =1; + if (accuracy < 1) accuracy = 1; + histogram = new Histogram(fRect.width(), accuracy); + histogram->computeLog(histogramImage, minValue, maxValue); + } + + float maxP = histogram->getMaxP(); + int i = 0; + p.setPen(Qt::green); + for (int x = fRect.left(); i < histogram->getBins(); x++, i++) { + if (histogram->getP(i) > 0) { + int barSize = + (int)((float)fRect.height() * histogram->getP(i) / maxP); + p.drawLine(x, fRect.bottom(), x, fRect.bottom() - barSize); + } + } } - float maxP = histogram->getMaxP(); - int i = 0; - p.setPen( Qt::green ); - for( int x = fRect.left(); i < histogram->getBins(); x++, i++ ) { - if( histogram->getP(i) > 0 ) { - int barSize = (int)((float)fRect.height() * histogram->getP(i)/maxP); - p.drawLine( x, fRect.bottom(), x, fRect.bottom() - barSize ); - } + // Paint scale + QFont labelFont(QStringLiteral("SansSerif"), 8); + p.setFont(labelFont); + p.setPen(Qt::black); + QRect textBounding = p.boundingRect( + fRect, Qt::AlignHCenter | Qt::AlignBottom, QStringLiteral("-8")); + for (float x = ceil(minValue); x <= floor(maxValue); x++) { + int rx = getWindowX(x); + p.drawLine(rx, fRect.top(), rx, textBounding.top()); + char str[15]; + sprintf(str, "%g", x); + p.drawText(rx - 20, textBounding.top(), 40, textBounding.height(), + Qt::AlignHCenter | Qt::AlignBottom, str); } - } - // Paint scale - QFont labelFont( "SansSerif", 8 ); - p.setFont( labelFont ); - p.setPen( Qt::black ); - QRect textBounding = p.boundingRect( fRect, Qt::AlignHCenter|Qt::AlignBottom, "-8" ); - for( float x = ceil( minValue ); x <= floor( maxValue ); x++ ) { - int rx = getWindowX(x); - p.drawLine( rx, fRect.top(), rx, textBounding.top() ); - char str[10]; - sprintf( str, "%g", x ); - p.drawText( rx-20, textBounding.top(), 40, textBounding.height(), - Qt::AlignHCenter|Qt::AlignBottom, str ); - } - -// Paint value pointer - if( showVP ) - { - int x = getWindowX( valuePointer ); - if( fRect.contains( x, fRect.y() ) ) { - p.setPen( Qt::yellow ); - p.drawLine( x, fRect.top(), x, fRect.bottom() ); + // Paint value pointer + if (showVP) { + int x = getWindowX(valuePointer); + if (fRect.contains(x, fRect.y())) { + p.setPen(Qt::yellow); + p.drawLine(x, fRect.top(), x, fRect.bottom()); + } } - } } -float LuminanceRangeWidget::draggedMin() -{ - if( mouseDragStart == DRAGNOTSTARTED ) return windowMin; - if( dragMode == DRAG_MIN ) { - float draggedPos = windowMin+dragShift; - return min( draggedPos, windowMax - minWindowSize ); - } else if( dragMode == DRAG_MINMAX ) { - return windowMin+dragShift; - } - return windowMin; +float LuminanceRangeWidget::draggedMin() { + if (mouseDragStart == DRAGNOTSTARTED) return windowMin; + if (dragMode == DRAG_MIN) { + float draggedPos = windowMin + dragShift; + return min(draggedPos, windowMax - minWindowSize); + } else if (dragMode == DRAG_MINMAX) { + return windowMin + dragShift; + } + return windowMin; } -float LuminanceRangeWidget::draggedMax() -{ - if( mouseDragStart == DRAGNOTSTARTED ) return windowMax; - if( dragMode == DRAG_MAX ) { - float draggedPos = windowMax+dragShift; - return max( draggedPos, windowMin + minWindowSize ); - } else if( dragMode == DRAG_MINMAX ) { - return windowMax+dragShift; - } - return windowMax; +float LuminanceRangeWidget::draggedMax() { + if (mouseDragStart == DRAGNOTSTARTED) return windowMax; + if (dragMode == DRAG_MAX) { + float draggedPos = windowMax + dragShift; + return max(draggedPos, windowMin + minWindowSize); + } else if (dragMode == DRAG_MINMAX) { + return windowMax + dragShift; + } + return windowMax; } +void LuminanceRangeWidget::mousePressEvent(QMouseEvent *me) { + if (dragMode == DRAG_NO) return; - -void LuminanceRangeWidget::mousePressEvent ( QMouseEvent * me ) -{ - if( dragMode == DRAG_NO ) return; - - mouseDragStart = me->x(); - dragShift = 0; - update(); + mouseDragStart = me->x(); + dragShift = 0; + update(); } -void LuminanceRangeWidget::mouseReleaseEvent ( QMouseEvent * ) -{ - - float newWindowMin = draggedMin(); - float newWindowMax = draggedMax(); - mouseDragStart = DRAGNOTSTARTED; - windowMin = newWindowMin; - windowMax = newWindowMax; - dragShift = 0; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::mouseReleaseEvent(QMouseEvent *) { + float newWindowMin = draggedMin(); + float newWindowMax = draggedMax(); + mouseDragStart = DRAGNOTSTARTED; + windowMin = newWindowMin; + windowMax = newWindowMax; + dragShift = 0; + update(); + emit updateRangeWindow(); } -void LuminanceRangeWidget::mouseMoveEvent( QMouseEvent *me ) -{ -// printf( "MouseButton: %d\n", me->button() ); - - if( (me->buttons() & Qt::LeftButton) != 0 && dragMode != DRAG_NO ) { - - if( mouseDragStart != DRAGNOTSTARTED ) { - QRect fRect = getPaintRect(); - - int windowCordShift = me->x() - mouseDragStart; - dragShift = (float)windowCordShift / (float)fRect.width() * (maxValue - minValue); - update(); - } +void LuminanceRangeWidget::mouseMoveEvent(QMouseEvent *me) { + // printf( "MouseButton: %d\n", me->button() ); - } else { + if ((me->buttons() & Qt::LeftButton) != 0 && dragMode != DRAG_NO) { + if (mouseDragStart != DRAGNOTSTARTED) { + QRect fRect = getPaintRect(); + + int windowCordShift = me->x() - mouseDragStart; + dragShift = (float)windowCordShift / (float)fRect.width() * + (maxValue - minValue); + update(); + } - QRect fRect = rect(); - int winBegPos = getWindowX( windowMin ); - int winEndPos = getWindowX( windowMax ); - if( abs( me->x() - winBegPos ) < dragZoneMargin ) { - setCursor( QCursor( QCursor(Qt::SplitHCursor) ) ); - dragMode = DRAG_MIN; - } else if( abs( me->x() - winEndPos ) < dragZoneMargin ) { - setCursor( QCursor( QCursor(Qt::SplitHCursor) ) ); - dragMode = DRAG_MAX; - } else if( me->x() > winBegPos && me->x() < winEndPos ) { - setCursor( QCursor( Qt::PointingHandCursor ) ); - dragMode = DRAG_MINMAX; } else { - unsetCursor(); - dragMode = DRAG_NO; + QRect fRect = rect(); + int winBegPos = getWindowX(windowMin); + int winEndPos = getWindowX(windowMax); + if (abs(me->x() - winBegPos) < dragZoneMargin) { + setCursor(QCursor(QCursor(Qt::SplitHCursor))); + dragMode = DRAG_MIN; + } else if (abs(me->x() - winEndPos) < dragZoneMargin) { + setCursor(QCursor(QCursor(Qt::SplitHCursor))); + dragMode = DRAG_MAX; + } else if (me->x() > winBegPos && me->x() < winEndPos) { + setCursor(QCursor(Qt::PointingHandCursor)); + dragMode = DRAG_MINMAX; + } else { + unsetCursor(); + dragMode = DRAG_NO; + } } - - } - } -void LuminanceRangeWidget::increaseExposure() -{ - windowMin -= exposureStep; - windowMax -= exposureStep; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::increaseExposure() { + windowMin -= exposureStep; + windowMax -= exposureStep; + update(); + emit updateRangeWindow(); } -void LuminanceRangeWidget::decreaseExposure() -{ - windowMin += exposureStep; - windowMax += exposureStep; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::decreaseExposure() { + windowMin += exposureStep; + windowMax += exposureStep; + update(); + emit updateRangeWindow(); } -void LuminanceRangeWidget::extendRange() -{ - if( windowMax - windowMin > 10 ) return; - windowMin -= shrinkStep; - windowMax += shrinkStep; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::extendRange() { + if (windowMax - windowMin > 10) return; + windowMin -= shrinkStep; + windowMax += shrinkStep; + update(); + emit updateRangeWindow(); } -void LuminanceRangeWidget::shrinkRange() -{ - if( windowMax - windowMin < 0.19 ) return; - windowMin += shrinkStep; - windowMax -= shrinkStep; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::shrinkRange() { + if (windowMax - windowMin < 0.19) return; + windowMin += shrinkStep; + windowMax -= shrinkStep; + update(); + emit updateRangeWindow(); } -void LuminanceRangeWidget::setHistogramImage( const pfs::Array2Df *image ) -{ - histogramImage = image; - delete histogram; - histogram = NULL; - update(); +void LuminanceRangeWidget::setHistogramImage(const pfs::Array2Df *image) { + histogramImage = image; + delete histogram; + histogram = NULL; + update(); } -void LuminanceRangeWidget::fitToDynamicRange() -{ - if( histogramImage != NULL ) { - float min = 99999999.0f; - float max = -99999999.0f; - - int size = histogramImage->getRows()*histogramImage->getCols(); - for( int i = 0; i < size; i++ ) { - float v = (*histogramImage)(i); - if( v > max ) max = v; - else if( v < min ) min = v; +void LuminanceRangeWidget::fitToDynamicRange() { + if (histogramImage != NULL) { + float min = 99999999.0f; + float max = -99999999.0f; + + int size = histogramImage->getRows() * histogramImage->getCols(); + for (int i = 0; i < size; i++) { + float v = (*histogramImage)(i); + if (v > max) + max = v; + else if (v < min) + min = v; + } + + if (min <= 0.000001f) + min = 0.000001f; // If data contains negative values + + windowMin = log10(min); + windowMax = log10(max); + + if (windowMax - windowMin < 0.5) { // Window too small + float m = (windowMin + windowMax) / 2.f; + windowMax = m + 0.25; + windowMin = m - 0.25; + } + update(); + emit updateRangeWindow(); } +} - if( min <= 0.000001f ) min = 0.000001f; // If data contains negative values - - windowMin = log10( min ); - windowMax = log10( max ); +void LuminanceRangeWidget::lowDynamicRange() { + windowMin = 1.0f; + windowMax = 3.0f; - if( windowMax - windowMin < 0.5 ) { // Window too small - float m = (windowMin + windowMax)/2.f; - windowMax = m + 0.25; - windowMin = m - 0.25; - } update(); emit updateRangeWindow(); - } } -void LuminanceRangeWidget::lowDynamicRange() -{ - windowMin = 1.0f; - windowMax = 3.0f; - - update(); - emit updateRangeWindow(); +QRect LuminanceRangeWidget::getPaintRect() const { + QRect fRect = frameRect(); + fRect.setLeft(fRect.left() + 1); + fRect.setTop(fRect.top() + 1); + fRect.setBottom(fRect.bottom() - 1); + fRect.setRight(fRect.right() - 1); + return fRect; } -QRect LuminanceRangeWidget::getPaintRect() const -{ - QRect fRect = frameRect(); - fRect.setLeft( fRect.left()+1 ); - fRect.setTop( fRect.top()+1 ); - fRect.setBottom( fRect.bottom()-1 ); - fRect.setRight( fRect.right()-1 ); - return fRect; -} - -void LuminanceRangeWidget::showValuePointer( float value ) -{ - QRect fRect = getPaintRect(); - int oldx = showVP ? getWindowX( valuePointer ) : -1; - - valuePointer = value; - showVP = true; +void LuminanceRangeWidget::showValuePointer(float value) { + QRect fRect = getPaintRect(); + int oldx = showVP ? getWindowX(valuePointer) : -1; - int newx = getWindowX( valuePointer ); - if( oldx == -1 ) oldx = newx; + valuePointer = value; + showVP = true; - QRect updateRect( min( oldx, newx ), fRect.top(), - max( oldx, newx ) - min(oldx, newx )+1, fRect.height() ); + int newx = getWindowX(valuePointer); + if (oldx == -1) oldx = newx; + QRect updateRect(min(oldx, newx), fRect.top(), + max(oldx, newx) - min(oldx, newx) + 1, fRect.height()); - update( updateRect ); + update(updateRect); } -void LuminanceRangeWidget::setRangeWindowMinMax( float min, float max ) -{ - assert( min < max ); - windowMin = min; - windowMax = max; - update(); - emit updateRangeWindow(); +void LuminanceRangeWidget::setRangeWindowMinMax(float min, float max) { + assert(min < max); + windowMin = min; + windowMax = max; + update(); + emit updateRangeWindow(); } - -void LuminanceRangeWidget::hideValuePointer() -{ - showVP = false; - update(); +void LuminanceRangeWidget::hideValuePointer() { + showVP = false; + update(); } - - - diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/LuminanceRangeWidget.h luminance-hdr-2.6.0/src/Viewers/LuminanceRangeWidget.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/LuminanceRangeWidget.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/LuminanceRangeWidget.h 2019-06-09 19:18:38.000000000 +0000 @@ -28,79 +28,67 @@ #define LUMINANCERANGE_WIDGET_H #include -#include "Viewers/Histogram.h" #include "Libpfs/array2d_fwd.h" +#include "Viewers/Histogram.h" class LuminanceRangeWidget : public QFrame { - Q_OBJECT -public: - explicit LuminanceRangeWidget( QWidget *parent=0 ); - ~LuminanceRangeWidget(); - - QSize sizeHint () const; - -protected: - void paintEvent( QPaintEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void mousePressEvent( QMouseEvent * me ); - void mouseReleaseEvent( QMouseEvent * me ); - - float draggedMin(); - float draggedMax(); - -signals: - void updateRangeWindow(); -public slots: - void decreaseExposure(); - void increaseExposure(); - void extendRange(); - void shrinkRange(); - void fitToDynamicRange(); - void lowDynamicRange(); - -private: - float minValue; - float maxValue; - - float windowMin; - float windowMax; - - - static const int DRAGNOTSTARTED = -1; - int mouseDragStart; - float dragShift; - enum DragMode - { - DRAG_MIN, DRAG_MAX, DRAG_MINMAX, DRAG_NO - }; - DragMode dragMode; - - - bool showVP; - float valuePointer; - - Histogram *histogram; - const pfs::Array2Df *histogramImage; - - QRect getPaintRect() const; - -public: - float getRangeWindowMin() const - { - return windowMin; - } - float getRangeWindowMax() const - { - return windowMax; - } + Q_OBJECT + public: + explicit LuminanceRangeWidget(QWidget *parent = 0); + ~LuminanceRangeWidget(); + + QSize sizeHint() const; + + protected: + void paintEvent(QPaintEvent *); + void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *me); + void mouseReleaseEvent(QMouseEvent *me); + + float draggedMin(); + float draggedMax(); + + signals: + void updateRangeWindow(); + public slots: + void decreaseExposure(); + void increaseExposure(); + void extendRange(); + void shrinkRange(); + void fitToDynamicRange(); + void lowDynamicRange(); + + private: + float minValue; + float maxValue; + + float windowMin; + float windowMax; + + static const int DRAGNOTSTARTED = -1; + int mouseDragStart; + float dragShift; + enum DragMode { DRAG_MIN, DRAG_MAX, DRAG_MINMAX, DRAG_NO }; + DragMode dragMode; + + bool showVP; + float valuePointer; + + Histogram *histogram; + const pfs::Array2Df *histogramImage; + + QRect getPaintRect() const; + + public: + float getRangeWindowMin() const { return windowMin; } + float getRangeWindowMax() const { return windowMax; } - void setRangeWindowMinMax( float min, float max ); + void setRangeWindowMinMax(float min, float max); - void setHistogramImage( const pfs::Array2Df *image ); + void setHistogramImage(const pfs::Array2Df *image); - void showValuePointer( float value ); - void hideValuePointer(); + void showValuePointer(float value); + void hideValuePointer(); }; - #endif diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/PanIconWidget.cpp luminance-hdr-2.6.0/src/Viewers/PanIconWidget.cpp --- luminance-hdr-2.5.1+dfsg/src/Viewers/PanIconWidget.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/PanIconWidget.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -24,57 +24,63 @@ #include -#include -#include -#include #include +#include +#include +#include #include #include "arch/math.h" #include "PanIconWidget.h" -PanIconWidget::PanIconWidget(QWidget *parent, Qt::WindowFlags flags) : - QFrame(parent,flags), xpos(0), ypos(0), m_width(0), m_height(0), - m_orgWidth(0), m_orgHeight(0) -{ +PanIconWidget::PanIconWidget(QWidget *parent, Qt::WindowFlags flags) + : QFrame(parent, flags), + xpos(0), + ypos(0), + m_width(0), + m_height(0), + m_orgWidth(0), + m_orgHeight(0) { this->setAttribute(Qt::WA_DeleteOnClose); -// this->setFrameStyle(QFrame::Box|QFrame::Plain); -// setLineWidth(1); -// setMidLineWidth(2); -// setContentsMargins(2,2,2,2); - m_image=NULL; + // this->setFrameStyle(QFrame::Box|QFrame::Plain); + // setLineWidth(1); + // setMidLineWidth(2); + // setContentsMargins(2,2,2,2); + m_image = NULL; moveSelection = false; - setMouseTracking(true); //necessary? + setMouseTracking(true); // necessary? } -void PanIconWidget::setImage(const QImage *fullsize) -{ - m_image = new QImage(fullsize->scaled(180,120,Qt::KeepAspectRatio)); - m_width = m_image->width(); - m_height = m_image->height(); - m_orgWidth = fullsize->width(); - m_orgHeight = fullsize->height(); - setFixedSize(m_width+2*frameWidth(), m_height+2*frameWidth()); -// m_rect = QRect(width()/2-m_width/2, height()/2-m_height/2, m_width, m_height); - //KPopupFrame::setMainWidget = resize - resize(m_width+2*frameWidth(), m_height+2*frameWidth()); -// qDebug("wanted w=%d, h=%d",m_width+2*frameWidth(), m_height+2*frameWidth()); -} - -void PanIconWidget::regionSelectionMoved() -{ - int x = (int)boost::math::round( ((float)m_localRegionSelection.x() /*- (float)m_rect.x()*/ ) * - ((float)m_orgWidth / (float)m_width) ); - - int y = (int)boost::math::round( ((float)m_localRegionSelection.y() /*- (float)m_rect.y()*/ ) * - ((float)m_orgHeight / (float)m_height) ); +void PanIconWidget::setImage(const QImage *fullsize) { + m_image = new QImage(fullsize->scaled(180, 120, Qt::KeepAspectRatio)); + m_width = m_image->width(); + m_height = m_image->height(); + m_orgWidth = fullsize->width(); + m_orgHeight = fullsize->height(); + setFixedSize(m_width + 2 * frameWidth(), m_height + 2 * frameWidth()); + // m_rect = QRect(width()/2-m_width/2, height()/2-m_height/2, m_width, + // m_height); + // KPopupFrame::setMainWidget = resize + resize(m_width + 2 * frameWidth(), m_height + 2 * frameWidth()); + // qDebug("wanted w=%d, h=%d",m_width+2*frameWidth(), + // m_height+2*frameWidth()); +} + +void PanIconWidget::regionSelectionMoved() { + int x = (int)boost::math::round( + ((float)m_localRegionSelection.x() /*- (float)m_rect.x()*/) * + ((float)m_orgWidth / (float)m_width)); + + int y = (int)boost::math::round( + ((float)m_localRegionSelection.y() /*- (float)m_rect.y()*/) * + ((float)m_orgHeight / (float)m_height)); - int w = (int)boost::math::round( (float)m_localRegionSelection.width() * - ((float)m_orgWidth / (float)m_width) ); + int w = (int)boost::math::round((float)m_localRegionSelection.width() * + ((float)m_orgWidth / (float)m_width)); - int h = (int)boost::math::round( (float)m_localRegionSelection.height() * - ((float)m_orgHeight / (float)m_height) ); + int h = (int)boost::math::round((float)m_localRegionSelection.height() * + ((float)m_orgHeight / (float)m_height)); regionSelection.setX(x); regionSelection.setY(y); @@ -82,58 +88,53 @@ regionSelection.setHeight(h); update(); - emit selectionMoved( regionSelection ); + emit selectionMoved(regionSelection); } -void PanIconWidget::setMouseFocus() -{ +void PanIconWidget::setMouseFocus() { raise(); - xpos = m_localRegionSelection.center().x(); - ypos = m_localRegionSelection.center().y(); + xpos = m_localRegionSelection.center().x(); + ypos = m_localRegionSelection.center().y(); moveSelection = true; -// emit signalSelectionTakeFocus(); //start moving? hook? + // emit signalSelectionTakeFocus(); //start moving? hook? } -void PanIconWidget::setCursorToLocalRegionSelectionCenter(void) -{ +void PanIconWidget::setCursorToLocalRegionSelectionCenter(void) { QCursor::setPos(mapToGlobal(m_localRegionSelection.center())); } void PanIconWidget::setRegionSelection(QRect rs) { - //rs is the rect of viewport (xy,wh) over entire image area (corrected considering zoom) - //store it + // rs is the rect of viewport (xy,wh) over entire image area (corrected + // considering zoom) + // store it this->regionSelection = rs; - //and now scale it to this widget's size/original_image_size - m_localRegionSelection.setX( /*m_rect.x() +*/ (int)((float)rs.x() * - ((float)m_width / (float)m_orgWidth)) ); - - m_localRegionSelection.setY( /*m_rect.y() +*/ (int)((float)rs.y() * - ((float)m_height / (float)m_orgHeight)) ); - - m_localRegionSelection.setWidth( (int)((float)rs.width() * - ((float)m_width / (float)m_orgWidth)) ); - - m_localRegionSelection.setHeight( (int)((float)rs.height() * - ((float)m_height / (float)m_orgHeight)) ); -} - -void PanIconWidget::mousePressEvent ( QMouseEvent * e ) -{ - if ( (e->button() == Qt::LeftButton || e->button() == Qt::MidButton) && - m_localRegionSelection.contains( e->x(), e->y() ) ) - { - xpos = e->x(); - ypos = e->y(); + // and now scale it to this widget's size/original_image_size + m_localRegionSelection.setX(/*m_rect.x() +*/ ( + int)((float)rs.x() * ((float)m_width / (float)m_orgWidth))); + + m_localRegionSelection.setY(/*m_rect.y() +*/ ( + int)((float)rs.y() * ((float)m_height / (float)m_orgHeight))); + + m_localRegionSelection.setWidth( + (int)((float)rs.width() * ((float)m_width / (float)m_orgWidth))); + + m_localRegionSelection.setHeight( + (int)((float)rs.height() * ((float)m_height / (float)m_orgHeight))); +} + +void PanIconWidget::mousePressEvent(QMouseEvent *e) { + if ((e->button() == Qt::LeftButton || e->button() == Qt::MidButton) && + m_localRegionSelection.contains(e->x(), e->y())) { + xpos = e->x(); + ypos = e->y(); moveSelection = true; -// emit signalSelectionTakeFocus(); + // emit signalSelectionTakeFocus(); } } -void PanIconWidget::mouseMoveEvent ( QMouseEvent * e ) -{ - if ( moveSelection && - (e->buttons() == Qt::LeftButton || e->buttons() == Qt::MidButton) ) - { +void PanIconWidget::mouseMoveEvent(QMouseEvent *e) { + if (moveSelection && + (e->buttons() == Qt::LeftButton || e->buttons() == Qt::MidButton)) { int newxpos = e->x(); int newypos = e->y(); @@ -144,35 +145,31 @@ // Perform normalization of selection area. - if (m_localRegionSelection.left() < /*m_rect.left()*/0) - m_localRegionSelection.moveLeft(/*m_rect.left()*/0); + if (m_localRegionSelection.left() < /*m_rect.left()*/ 0) + m_localRegionSelection.moveLeft(/*m_rect.left()*/ 0); - if (m_localRegionSelection.top() < /*m_rect.top()*/0) - m_localRegionSelection.moveTop(/*m_rect.top()*/0); + if (m_localRegionSelection.top() < /*m_rect.top()*/ 0) + m_localRegionSelection.moveTop(/*m_rect.top()*/ 0); - if (m_localRegionSelection.right() > /*m_rect.right()*/width()) - m_localRegionSelection.moveRight(/*m_rect.right()*/width()); + if (m_localRegionSelection.right() > /*m_rect.right()*/ width()) + m_localRegionSelection.moveRight(/*m_rect.right()*/ width()); - if (m_localRegionSelection.bottom() > /*m_rect.bottom()*/height()) - m_localRegionSelection.moveBottom(/*m_rect.bottom()*/height()); + if (m_localRegionSelection.bottom() > /*m_rect.bottom()*/ height()) + m_localRegionSelection.moveBottom(/*m_rect.bottom()*/ height()); update(); regionSelectionMoved(); return; - } - else - { - if ( m_localRegionSelection.contains( e->x(), e->y() ) ) - QApplication::setOverrideCursor( QCursor(Qt::PointingHandCursor)); + } else { + if (m_localRegionSelection.contains(e->x(), e->y())) + QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor)); else QApplication::restoreOverrideCursor(); } } -void PanIconWidget::mouseReleaseEvent ( QMouseEvent * ) -{ - if ( moveSelection ) - { +void PanIconWidget::mouseReleaseEvent(QMouseEvent *) { + if (moveSelection) { moveSelection = false; QApplication::restoreOverrideCursor(); regionSelectionMoved(); @@ -185,24 +182,19 @@ } void PanIconWidget::paintEvent(QPaintEvent *e) { - if (m_image==NULL) - return; + if (m_image == NULL) return; QPainter p(this); - p.drawImage(e->rect(),*m_image); + p.drawImage(e->rect(), *m_image); p.setPen(QPen(Qt::white, 1, Qt::SolidLine)); - p.drawRect(m_localRegionSelection.x(), - m_localRegionSelection.y(), - m_localRegionSelection.width(), - m_localRegionSelection.height()); + p.drawRect(m_localRegionSelection.x(), m_localRegionSelection.y(), + m_localRegionSelection.width(), m_localRegionSelection.height()); p.setPen(QPen(Qt::red, 1, Qt::DotLine)); - p.drawRect(m_localRegionSelection.x(), - m_localRegionSelection.y(), - m_localRegionSelection.width(), - m_localRegionSelection.height()); -// qDebug("m_image w=%d, h=%d",m_image->width(), m_image->height()); + p.drawRect(m_localRegionSelection.x(), m_localRegionSelection.y(), + m_localRegionSelection.width(), m_localRegionSelection.height()); + // qDebug("m_image w=%d, h=%d",m_image->width(), m_image->height()); } void PanIconWidget::popup(const QPoint &pos) { @@ -211,14 +203,10 @@ int y = pos.y(); int w = width(); int h = height(); - if (x+w > d.x()+d.width()) - x = d.width() - w; - if (y+h > d.y()+d.height()) - y = d.height() - h; - if (x < d.x()) - x = 0; - if (y < d.y()) - y = 0; + if (x + w > d.x() + d.width()) x = d.width() - w; + if (y + h > d.y() + d.height()) y = d.height() - h; + if (x < d.x()) x = 0; + if (y < d.y()) y = 0; // Pop the thingy up. move(x, y); diff -Nru luminance-hdr-2.5.1+dfsg/src/Viewers/PanIconWidget.h luminance-hdr-2.6.0/src/Viewers/PanIconWidget.h --- luminance-hdr-2.5.1+dfsg/src/Viewers/PanIconWidget.h 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/src/Viewers/PanIconWidget.h 2019-06-09 19:18:38.000000000 +0000 @@ -27,42 +27,42 @@ #include -class PanIconWidget : public QFrame -{ -Q_OBJECT -public: - PanIconWidget(QWidget *parent=0, Qt::WindowFlags flags=Qt::Popup); +class PanIconWidget : public QFrame { + Q_OBJECT + public: + PanIconWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Popup); ~PanIconWidget(); - void setImage(const QImage * fullsize_zoomed_image); + void setImage(const QImage *fullsize_zoomed_image); void popup(const QPoint &pos); void setRegionSelection(QRect regionSelection); void setMouseFocus(void); void setCursorToLocalRegionSelectionCenter(void); -signals: - //void signalSelectionMoved( QRect rect, bool targetDone ); - void selectionMoved( QRect rect ); + signals: + // void signalSelectionMoved( QRect rect, bool targetDone ); + void selectionMoved(QRect rect); void signalHidden(void); void finished(); -public slots: -protected: + public slots: + protected: void paintEvent(QPaintEvent *); void mousePressEvent(QMouseEvent *); void mouseReleaseEvent(QMouseEvent *); void mouseMoveEvent(QMouseEvent *); -private: + + private: /** Recalculate the target selection position and emit 'selectionMoved'.*/ - void regionSelectionMoved( ); - //coordinates relative to this widget - int xpos; - int ypos; - bool moveSelection; - QRect regionSelection; // Original size image selection. - QRect m_localRegionSelection; // Thumbnail size selection. - int m_width; - int m_height; - int m_orgWidth; - int m_orgHeight; - QImage *m_image; + void regionSelectionMoved(); + // coordinates relative to this widget + int xpos; + int ypos; + bool moveSelection; + QRect regionSelection; // Original size image selection. + QRect m_localRegionSelection; // Thumbnail size selection. + int m_width; + int m_height; + int m_orgWidth; + int m_orgHeight; + QImage *m_image; }; #endif diff -Nru luminance-hdr-2.5.1+dfsg/test/CMakeLists.txt luminance-hdr-2.6.0/test/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/test/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/test/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -55,7 +55,7 @@ ADD_LIBRARY(PrintArray2D STATIC PrintArray2D.cpp PrintArray2D.h) -qt5_use_modules(ContrastDomain Core) +TARGET_LINK_LIBRARIES(ContrastDomain Qt5::Core) # Mantiuk06 @@ -74,7 +74,7 @@ ${CMAKE_THREAD_LIBS_INIT} ${LIBS} -lrt) ENDIF() -qt5_use_modules(TestMantiuk06Basic Core) +TARGET_LINK_LIBRARIES(TestMantiuk06Basic Qt5::Core) ADD_TEST(TestMantiuk06Basic TestMantiuk06Basic) @@ -94,7 +94,7 @@ ${CMAKE_THREAD_LIBS_INIT} ${LIBS} -lrt) ENDIF() -qt5_use_modules(TestMantiuk06Pyramid Core) +TARGET_LINK_LIBRARIES(TestMantiuk06Pyramid Qt5::Core) ADD_TEST(TestMantiuk06Pyramid TestMantiuk06Pyramid) ADD_EXECUTABLE(TestVex TestVex.cpp) @@ -146,7 +146,7 @@ ${CMAKE_THREAD_LIBS_INIT} ${LIBS}) ADD_TEST(TestFloatRgb TestFloatRgb) -qt5_use_modules(TestFloatRgb Core Gui Widgets) +TARGET_LINK_LIBRARIES(TestFloatRgb Qt5::Core Qt5::Gui Qt5::Widgets) ADD_EXECUTABLE(TestMTB TestMTB.cpp) TARGET_LINK_LIBRARIES(TestMTB common pfs hdrcreation @@ -161,7 +161,7 @@ ADD_EXECUTABLE(TestImageQualityDialog TestImageQualityDialog.cpp) TARGET_LINK_LIBRARIES(TestImageQualityDialog ui fileformat pfs common ${LIBS}) -qt5_use_modules(TestImageQualityDialog Core Gui Widgets) +TARGET_LINK_LIBRARIES(TestImageQualityDialog Qt5::Core Qt5::Gui Qt5::Widgets) ADD_EXECUTABLE(TestHdrCreationWizard TestHdrCreationWizard.cpp) IF(APPLE OR MSVC) @@ -172,7 +172,7 @@ -Xlinker --start-group ${LUMINANCE_MODULES_GUI} -Xlinker --end-group ${LIBS}) ENDIF() -qt5_use_modules(TestHdrCreationWizard Core Gui Widgets) +TARGET_LINK_LIBRARIES(TestHdrCreationWizard Qt5::Core Qt5::Gui Qt5::Widgets) ADD_EXECUTABLE(TestFusionOperator TestFusionOperator.cpp) IF(APPLE OR MSVC) @@ -184,7 +184,7 @@ ${Boost_PROGRAM_OPTIONS_LIBRARY} -Xlinker --start-group ${LUMINANCE_MODULES_CLI} ${LUMINANCE_MODULES_GUI} -Xlinker --end-group ${LIBS}) ENDIF() -qt5_use_modules(TestFusionOperator Core Gui Widgets) +TARGET_LINK_LIBRARIES(TestFusionOperator Qt5::Core Qt5::Gui Qt5::Widgets) ADD_EXECUTABLE(TestPoissonSolver TestPoissonSolver.cpp) TARGET_LINK_LIBRARIES(TestPoissonSolver hdrwizard pfs pfstmo diff -Nru luminance-hdr-2.5.1+dfsg/test/ImageInspector/CMakeLists.txt luminance-hdr-2.6.0/test/ImageInspector/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/test/ImageInspector/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/test/ImageInspector/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -3,7 +3,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H}) -qt5_use_modules(ImageInspector Core Gui Widgets) +TARGET_LINK_LIBRARIES(ImageInspector Qt5::Core Qt5::Gui Qt5::Widgets) # Link sub modules IF(MSVC OR APPLE) diff -Nru luminance-hdr-2.5.1+dfsg/test/TestPoissonSolver.cpp luminance-hdr-2.6.0/test/TestPoissonSolver.cpp --- luminance-hdr-2.5.1+dfsg/test/TestPoissonSolver.cpp 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/test/TestPoissonSolver.cpp 2019-06-09 19:18:38.000000000 +0000 @@ -43,7 +43,7 @@ } solve_pde_dct(divergence, U); - float residual = residual_pde(&U, &divergence); + float residual = residual_pde(U, divergence); ASSERT_LE(residual, 1e-2); } diff -Nru luminance-hdr-2.5.1+dfsg/test/WhiteBalance/CMakeLists.txt luminance-hdr-2.6.0/test/WhiteBalance/CMakeLists.txt --- luminance-hdr-2.5.1+dfsg/test/WhiteBalance/CMakeLists.txt 2017-05-10 19:14:06.000000000 +0000 +++ luminance-hdr-2.6.0/test/WhiteBalance/CMakeLists.txt 2019-06-09 19:18:38.000000000 +0000 @@ -5,7 +5,7 @@ WhiteBalanceMain.cpp ${FILES_MOC}) -qt5_use_modules(WhiteBalance Core Gui Widgets) +TARGET_LINK_LIBRARIES(WhiteBalance Qt5::Core Qt5::Gui Qt5::Widgets) # Link sub modules IF(MSVC OR APPLE)