diff -Nru luminance-hdr-2.3.0/.gitignore luminance-hdr-2.3.1/.gitignore --- luminance-hdr-2.3.0/.gitignore 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/.gitignore 2013-04-07 18:41:14.000000000 +0000 @@ -1,4 +1,5 @@ *.project CMakeLists.txt.user /.settings -**.rule \ No newline at end of file +**.rule +CMakeLists.txt.user.2.6pre1 diff -Nru luminance-hdr-2.3.0/AUTHORS luminance-hdr-2.3.1/AUTHORS --- luminance-hdr-2.3.0/AUTHORS 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/AUTHORS 2013-04-07 18:41:14.000000000 +0000 @@ -1,29 +1,28 @@ If I forgot to add someone to this list please let me know. -Main developer, improvements, bug fixing -Davide Anastasia (Lead Project Mantainer & Mac OS X support) -Franco Comida -Daniel Kaneider (windows setup, head of i18n efforts) +Main developer, improvements, bug fixing: +Davide Anastasia (Lead Project Mantainer & Mac OS X support) + +Daniel Kaneider (Windows Setup and Optimisation, Head of i18n Support) +Franco Comida (Maintainer Fedora Package) + Bruce Guenter Contributors: -Christian Raue (German Translator) - -Mandus (Norwegian translator) -Nicholas Phillips (MTB alignment code) -Mustafa GÜNAY (Turkish translator) -Douglas E. Warner (fc6 packager and bug reports) -Jan Gemela (Cezk translator) -Peter Gaal (Hungarian translator) -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) +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 Antoine Latter -Markus Schmaus (found and fixed bug in Debevec and Robertson02) +Markus Schmaus (found and fixed bug in Debevec and Robertson02) + +Translators: +http://qtpfsgui.sourceforge.net/?page_id=23 Original author: Giuseppe Rota diff -Nru luminance-hdr-2.3.0/CMakeGlobal.txt luminance-hdr-2.3.1/CMakeGlobal.txt --- luminance-hdr-2.3.0/CMakeGlobal.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/CMakeGlobal.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -# Holds al the file that will be translated -SET(FILES_TO_TRANSLATE ) - -SET(LUMINANCE_MODULES_CLI ) -SET(LUMINANCE_MODULES_GUI ) - -IF(APPLE) -SET(I18NDIR QCoreApplication::applicationDirPath\(\)+"/../Resources/i18n") -#ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/../Resources/i18n") -ELSEIF(UNIX) -#ADD_DEFINITIONS(-DPREFIX=${CMAKE_INSTALL_PREFIX}) -#ADD_DEFINITIONS(-DI18NDIR="${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n") -SET(I18NDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n\"") -SET(HELPDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/help\"") -ELSEIF(WIN32) -#ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/i18n") -SET(I18NDIR QCoreApplication::applicationDirPath\(\)+"/i18n") -ENDIF() - -IF(UNIX) -ADD_DEFINITIONS(-Wall -Wno-unknown-pragmas) -ENDIF() - -OPTION(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files (WARNING: make clean will delete the source .ts files! Danger!)") -OPTION(LUPDATE_NOOBSOLETE "While doing an lupdate, remove obsolete entries.") diff -Nru luminance-hdr-2.3.0/CMakeLists.txt luminance-hdr-2.3.1/CMakeLists.txt --- luminance-hdr-2.3.0/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,317 +1,307 @@ -PROJECT(luminance-hdr) -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) - -# set include path for FindXXX.cmake files -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") - -# Global variable for CMake -INCLUDE(CMakeGlobal.txt) - -IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "RelWithDebInfo" ) -ENDIF() - -# MESSAGE(${CMAKE_BUILD_TYPE}) - -IF(${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel") -ADD_DEFINITIONS("-DQT_NO_DEBUG_OUTPUT") -ENDIF() - -# find and setup Qt4 for this project -FIND_PACKAGE(Qt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebkit QtSql REQUIRED) - -# add Qt modules here, the include will setup QT_LIBRARIES -SET(QT_USE_QTXML TRUE) -SET(QT_USE_QTWEBKIT TRUE) -SET(QT_USE_QTSQL TRUE) - -# Include the qtmain lib if we are on the windows platform -IF(WIN32) -# LINK_LIBRARIES(${QT_QTMAIN_LIBRARY}) - SET(LIBS ${LIBS} ${QT_QTMAIN_LIBRARY}) -ENDIF(WIN32) - -INCLUDE(${QT_USE_FILE}) -ADD_DEFINITIONS(${QT_DEFINITIONS}) - -set(LIBS ${LIBS} ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) - -FIND_PACKAGE(Git) -#FIND_PACKAGE(Git QUIET) -IF(NOT GIT_FOUND) - FIND_FILE(GIT_EXECUTABLE git.exe - $ENV{CYGWIN_DIR}\\bin - $ENV{CYGWIN_DIR} - ) - IF (EXISTS ${GIT_EXECUTABLE}) - SET(GIT_FOUND 1) - ENDIF() -ENDIF() - -IF(GIT_FOUND) - include(GetGitRevisionDescription) - get_git_head_revision(GIT_REFSPEC GIT_SHA1) - message(STATUS "Git found") -ELSE() - message(STATUS "Git not found") -ENDIF() - -IF(WIN32) - # Windows Section - - SET(OPENEXR_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/OpenEXR") - SET(TIFF_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libtiff") - SET(LIBRAW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libraw") - SET(FFTWF_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/fftw3") - SET(GSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/gsl") - SET(GSLCBLAS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/gsl") - SET(EXIV2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/exiv2") - SET(LCMS2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/lcms2") - SET(JPEGLIB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libjpeg") - SET(LIBPNG_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libpng") - - # Enable multi processor compilation - ADD_DEFINITIONS(/MP) - - # Enable SSE2 - ADD_DEFINITIONS(/arch:SSE2) - - # Don't "Treat WChar_t As Build in Type", in order to be able to use Qts (from|to)StdWString functions - ADD_DEFINITIONS(/Zc:wchar_t-) - - ADD_DEFINITIONS(-DUNICODE ) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DOPENEXR_DLL -D_REENTRANT) - SET(FFTWF_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/fftw3/libfftw3f-3.lib") - ADD_DEFINITIONS(-DHAVE_FFTW3F) - - SET(OPENEXR_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/Half.lib") - SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/Iex.lib") - SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/IlmImf.lib") - - SET(TIFF_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libtiff/libtiff.lib") - - SET(LIBRAW_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libraw/libraw.lib") - - SET(GSL_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/gsl/gsl.lib") - SET(GSLCBLAS_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/gsl/cblas.lib") - - SET(EXIV2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/exiv2/exiv2.lib") - #SET(LCMS2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms2.lib") - #SET(LCMS_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms.lib") - SET(LCMS2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms2_dll.lib") - #ADD_DEFINITIONS(-DLCMS_DLL) - ADD_DEFINITIONS(-DCMS_DLL) - ADD_DEFINITIONS(-DUSE_LCMS2) - - SET(LIBPNG_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libpng/libpng.lib") - -ELSE() - - # Unix & Apple part - FIND_PACKAGE(OpenEXR REQUIRED) - FIND_PACKAGE(TIFF REQUIRED) - FIND_PACKAGE(LibRAW REQUIRED) - FIND_PACKAGE(fftwf REQUIRED) - FIND_PACKAGE(GSL REQUIRED) - FIND_PACKAGE(exiv2 REQUIRED) - FIND_PACKAGE(libjpeg REQUIRED) - FIND_PACKAGE(lcms2 REQUIRED) - FIND_PACKAGE(libpng REQUIRED) - -ENDIF() - - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${OPENEXR_INCLUDE_DIR} "${OPENEXR_INCLUDE_DIR}/OpenEXR") -SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${TIFF_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${TIFF_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${LIBRAW_INCLUDE_DIR} "${LIBRAW_INCLUDE_DIR}/libraw") -SET(LIBS ${LIBS} ${LIBRAW_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${FFTWF_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${FFTWF_LIBRARIES}) -ADD_DEFINITIONS(-DHAVE_FFTW3F) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${GSL_INCLUDE_DIR} ${GSLCBLAS_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${EXIV2_INCLUDE_DIR} "${EXIV2_INCLUDE_DIR}/exiv2") -SET(LIBS ${LIBS} ${EXIV2_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${JPEGLIB_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${JPEGLIB_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${LCMS2_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${LCMS2_LIBRARIES}) - -SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${LIBPNG_INCLUDE_DIR}) -SET(LIBS ${LIBS} ${LIBPNG_LIBRARIES}) - -#OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3 -IF(MSVC) - FIND_PACKAGE(OpenMP REQUIRED) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") -ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX) - EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - #MESSAGE(STATUS ${GCC_VERSION}) - IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) - MESSAGE(STATUS "GCC >= 4.3") - 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() -ENDIF() -# END OpenMP Support - -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/" ${INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) - -SET(LUMINANCE_HDR_H ) -SET(LUMINANCE_HDR_SRC ) - -IF(MSVC) - SET(LUMINANCE_HDR_H ${LUMINANCE_HDR_H} src/arch/msvc/getopt_win32.h) - SET(LUMINANCE_HDR_CPP ${LUMINANCE_HDR_CPP} src/arch/msvc/getopt_win32.c) -ENDIF() - -SET(LUMINANCE_HDR_H ${LUMINANCE_HDR_H} - src/arch/math.h - src/arch/malloc.h - src/arch/minmax.h - src/arch/string.h - src/arch/freebsd/math.h - src/arch/msvc/math.h -) - -SET(LUMINANCE_HDR_RCCS icons.qrc) -QT4_ADD_RESOURCES(LUMINANCE_HDR_RCCS_SRCS ${LUMINANCE_HDR_RCCS}) - -ADD_SUBDIRECTORY(src) - -# translations -FILE(GLOB LUMINANCE_TS i18n/*.ts) - -IF(UPDATE_TRANSLATIONS) - IF(LUPDATE_NOOBSOLETE) - QT4_CREATE_TRANSLATION(LUMINANCE_QM ${FILES_TO_TRANSLATE} ${LUMINANCE_TS} OPTIONS -noobsolete) - ELSE() - QT4_CREATE_TRANSLATION(LUMINANCE_QM ${FILES_TO_TRANSLATE} ${LUMINANCE_TS}) - ENDIF() -ELSE(UPDATE_TRANSLATIONS) - QT4_ADD_TRANSLATION(LUMINANCE_QM ${LUMINANCE_TS}) -ENDIF(UPDATE_TRANSLATIONS) - -ADD_CUSTOM_TARGET(translations_target DEPENDS ${LUMINANCE_QM}) - -SET(LUMINANCE_FILES - ${LUMINANCE_HDR_H} - ${LUMINANCE_HDR_CPP} - ${LUMINANCE_HDR_RCCS_SRCS} - ${LUMINANCE_QM}) - -# Apple Mac OS X -IF(APPLE) - FILE(GLOB LUMINANCE_QT_QM i18n-qt/*.qm) # ${QT_TRANSLATIONS_DIR}/qt_*.qm) - SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${LUMINANCE_QT_QM}) - - # icon files to copy in the bundle - SET( OSX_ICON_FILES "${CMAKE_SOURCE_DIR}/images/luminance.icns") - # set where in the bundle to put the icns files - 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_QT_QM} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/i18n) - - # include the icns files in the target - SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${OSX_ICON_FILES}) - - SET( PROGNAME luminance-hdr ) - SET( MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/images/luminance.icns" ) - #SET( MACOSX_BUNDLE_SHORT_VERSION_STRING 0.7-beta2 ) - #SET( MACOSX_BUNDLE_VERSION 0.7-beta2 ) - #SET( MACOSX_BUNDLE_LONG_VERSION_STRING Version 0.7-beta2 ) - #SET( CMAKE_OSX_ARCHITECTURES x86_64;i386 ) # Universal build - - ADD_EXECUTABLE(luminance-hdr MACOSX_BUNDLE ${LUMINANCE_FILES}) - ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) - - SET_TARGET_PROPERTIES(luminance-hdr PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/build/macosx/Info.plist") -# Unix -ELSEIF(UNIX) - FILE(GLOB LUMINANCE_QT_QM i18n-qt/*.qm) - SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${LUMINANCE_QT_QM}) - - ADD_EXECUTABLE(luminance-hdr ${LUMINANCE_FILES}) - ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) - - # make install directivies - INSTALL(TARGETS luminance-hdr RUNTIME DESTINATION bin) # main GUI exec - INSTALL(TARGETS luminance-hdr-cli RUNTIME DESTINATION bin) # main CLI exec - INSTALL(FILES ${LUMINANCE_QM} DESTINATION share/luminance-hdr/i18n) # i18n - INSTALL(FILES ${LUMINANCE_QT_QM} DESTINATION share/luminance-hdr/i18n) # i18n - - INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/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}/AUTHORS - ${CMAKE_SOURCE_DIR}/README - ${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 -# Microsoft Windows -ELSEIF(WIN32) - # icon files to copy in the bundle - SET(LUMINANCE_FILES ${LUMINANCE_FILES} "${CMAKE_SOURCE_DIR}/images/luminance_ico.rc") - - # Subsystem console: - ADD_EXECUTABLE(luminance-hdr WIN32 ${LUMINANCE_FILES}) - ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) - - # copies all necessary Qt dlls from the Qt binary dir to the output folder - SET(QT_RELEASE_DLLS - phonon4.dll - QtCore4.dll - QtGui4.dll - QtMultimedia4.dll - QtNetwork4.dll - QtSql4.dll - QtWebKit4.dll - QtXml4.dll - QtXmlPatterns4.dll - ) - FOREACH(dll ${QT_RELEASE_DLLS}) - FILE(COPY "${QT_BINARY_DIR}/${dll}" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release") - STRING(REPLACE "4" "d4" debugdll ${dll}) - FILE(COPY "${QT_BINARY_DIR}/${debugdll}" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug") - ENDFOREACH() - - FILE(COPY "${QT_PLUGINS_DIR}/imageformats/qjpeg4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release/imageformats") - FILE(COPY "${QT_PLUGINS_DIR}/imageformats/qjpegd4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug/imageformats") - FILE(COPY "${QT_PLUGINS_DIR}/sqldrivers/qsqlite4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release/sqldrivers") - FILE(COPY "${QT_PLUGINS_DIR}/sqldrivers/qsqlited4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug/sqldrivers") - - FILE(GLOB QtI18nAll "${QT_TRANSLATIONS_DIR}/qt_*.qm") - FILE(GLOB QtI18nHelp "${QT_TRANSLATIONS_DIR}/qt_help_*.qm") - LIST(LENGTH QtI18nHelp QtI18nHelp_length) - IF(${QtI18nHelp_length} GREATER 0) - LIST(REMOVE_ITEM QtI18nAll ${QtI18nHelp}) - ENDIF() - - FILE(COPY ${QtI18nAll} DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/i18n/") -ENDIF() - -# Link sub modules -IF(MSVC OR APPLE) - TARGET_LINK_LIBRARIES(luminance-hdr ${LUMINANCE_MODULES_GUI}) - TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI}) -ELSE() - 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) -ENDIF() -# Link shared library -TARGET_LINK_LIBRARIES(luminance-hdr ${LIBS}) -TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LIBS}) +PROJECT("Luminance HDR") # luminance-hdr) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) + +# set include path for FindXXX.cmake files +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") + +# Global variables for CMake +include(cmake/Version.cmake) +include(cmake/GlobalSettings.cmake) +include(cmake/CompilerSettings.cmake) +include(cmake/Internationalization.cmake) + +# find and setup Qt4 for this project +FIND_PACKAGE(Qt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebkit QtSql QtNetwork REQUIRED) + +# add Qt modules here, the include will setup QT_LIBRARIES +SET(QT_USE_QTXML TRUE) +SET(QT_USE_QTWEBKIT TRUE) +SET(QT_USE_QTSQL TRUE) +SET(QT_USE_QTNETWORK TRUE) + +# Include the qtmain lib if we are on the windows platform +IF(WIN32) +# LINK_LIBRARIES(${QT_QTMAIN_LIBRARY}) + SET(LIBS ${LIBS} ${QT_QTMAIN_LIBRARY}) +ENDIF(WIN32) + +INCLUDE(${QT_USE_FILE}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +set(LIBS ${LIBS} + ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES} + ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES}) + +FIND_PACKAGE(Git) +IF(GIT_FOUND) + include(GetGitRevisionDescription) + get_git_head_revision(GIT_REFSPEC GIT_SHA1) +ENDIF() + +IF(WIN32) + # Windows Section + + # to not define min/max macros, which cause troubles with STL and boost + ADD_DEFINITIONS(-DNOMINMAX) + + SET(OPENEXR_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/OpenEXR") + SET(LIBRAW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libraw") + SET(FFTWF_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/fftw3") + SET(GSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/gsl") + SET(GSLCBLAS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/gsl") + SET(LCMS2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/lcms2") + SET(JPEGLIB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../DEPs/include/libjpeg") + + # 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() + + # Don't "Treat WChar_t As Build in Type", in order to be able to use Qts (from|to)StdWString functions + ADD_DEFINITIONS(/Zc:wchar_t-) + + 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(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/Half.lib") + SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/Iex.lib") + SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/IlmImf.lib") + SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/IlmThread.lib") + SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/Imath.lib") + SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} "${CMAKE_SOURCE_DIR}/../DEPs/lib/OpenEXR/IexMath.lib") + + SET(LIBRAW_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/libraw/libraw.lib") + ADD_DEFINITIONS("-DDEMOSAICING_GPL2") + ADD_DEFINITIONS("-DDEMOSAICING_GPL3") + + SET(GSL_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/gsl/gsl.lib") + SET(GSLCBLAS_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/gsl/cblas.lib") + + SET(LCMS2_LIBRARIES "${CMAKE_SOURCE_DIR}/../DEPs/lib/lcms2/lcms2_dll.lib") + ADD_DEFINITIONS(-DCMS_DLL) + ADD_DEFINITIONS(-DUSE_LCMS2) +ELSE() + # Unix & Apple part + FIND_PACKAGE(OpenEXR REQUIRED) + FIND_PACKAGE(LibRAW REQUIRED) + FIND_PACKAGE(fftwf REQUIRED) + FIND_PACKAGE(GSL REQUIRED) + FIND_PACKAGE(libjpeg REQUIRED) + FIND_PACKAGE(lcms2 REQUIRED) + +ENDIF() + + +FIND_PACKAGE(Boost REQUIRED) +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) + +FIND_PACKAGE(exiv2 REQUIRED) +INCLUDE_DIRECTORIES(${EXIV2_INCLUDE_DIR} "${EXIV2_INCLUDE_DIR}/exiv2") + +FIND_PACKAGE(TIFF REQUIRED) +INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) + +FIND_PACKAGE(PNG REQUIRED) +INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) + +INCLUDE_DIRECTORIES(${OPENEXR_INCLUDE_DIR} "${OPENEXR_INCLUDE_DIR}/OpenEXR") +INCLUDE_DIRECTORIES(${LIBRAW_INCLUDE_DIR} "${LIBRAW_INCLUDE_DIR}/libraw") +INCLUDE_DIRECTORIES(${FFTWF_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${GSL_INCLUDE_DIR} ${GSLCBLAS_INCLUDE_DIR}) + +INCLUDE_DIRECTORIES(${JPEGLIB_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) + +SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES}) +SET(LIBS ${LIBS} ${TIFF_LIBRARIES}) +SET(LIBS ${LIBS} ${LIBRAW_LIBRARIES}) +SET(LIBS ${LIBS} ${FFTWF_LIBRARIES}) +ADD_DEFINITIONS(-DHAVE_FFTW3F) +SET(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES}) +SET(LIBS ${LIBS} ${EXIV2_LIBRARIES}) +SET(LIBS ${LIBS} ${JPEGLIB_LIBRARIES}) +SET(LIBS ${LIBS} ${LCMS2_LIBRARIES}) +SET(LIBS ${LIBS} ${PNG_LIBRARIES}) + +INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/") +INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src/") +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + +SET(LUMINANCE_HDR_H ) +SET(LUMINANCE_HDR_SRC ) + +IF(MSVC) + SET(LUMINANCE_HDR_H ${LUMINANCE_HDR_H} src/arch/msvc/getopt_win32.h) + SET(LUMINANCE_HDR_CPP ${LUMINANCE_HDR_CPP} src/arch/msvc/getopt_win32.c) +ENDIF() + +SET(LUMINANCE_HDR_H ${LUMINANCE_HDR_H} + src/arch/math.h + src/arch/malloc.h + src/arch/string.h + src/arch/freebsd/math.h + src/arch/msvc/math.h +) + +SET(LUMINANCE_HDR_RCCS icons.qrc) +QT4_ADD_RESOURCES(LUMINANCE_HDR_RCCS_SRCS ${LUMINANCE_HDR_RCCS}) + +ENABLE_TESTING() + +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(test) + +# translations +FILE(GLOB LUMINANCE_TS i18n/*.ts) + +IF(UPDATE_TRANSLATIONS) + IF(LUPDATE_NOOBSOLETE) + QT4_CREATE_TRANSLATION(LUMINANCE_QM ${FILES_TO_TRANSLATE} ${LUMINANCE_TS} OPTIONS -noobsolete) + ELSE() + QT4_CREATE_TRANSLATION(LUMINANCE_QM ${FILES_TO_TRANSLATE} ${LUMINANCE_TS}) + ENDIF() +ELSE(UPDATE_TRANSLATIONS) + QT4_ADD_TRANSLATION(LUMINANCE_QM ${LUMINANCE_TS}) +ENDIF(UPDATE_TRANSLATIONS) + +ADD_CUSTOM_TARGET(translations_target DEPENDS ${LUMINANCE_QM}) + +SET(LUMINANCE_FILES + ${LUMINANCE_HDR_H} + ${LUMINANCE_HDR_CPP} + ${LUMINANCE_HDR_RCCS_SRCS} + ${LUMINANCE_QM}) + +# Apple Mac OS X +IF(APPLE) + SET(CMAKE_INSTALL_PREFIX "/Applications") + + # 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_SHORT_VERSION_STRING "${LHDR_VERSION}") + set(MACOSX_BUNDLE_VERSION "${LHDR_VERSION}") + set(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/images/luminance.icns") + set(MACOSX_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/images/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/macosx/Info.plist.in + ${CMAKE_BINARY_DIR}/Info.plist ) + configure_file( ${CMAKE_SOURCE_DIR}/build/macosx/create-dmg.sh.in + ${CMAKE_BINARY_DIR}/create-dmg.sh ) + + FILE(GLOB LUMINANCE_QT_QM i18n-qt/*.qm) # ${QT_TRANSLATIONS_DIR}/qt_*.qm) + SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${LUMINANCE_QT_QM}) + + # icon files to copy in the bundle + SET(OSX_ICON_FILES "${CMAKE_SOURCE_DIR}/images/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 + set_property(TARGET ${LHDR_OSX_EXECUTABLE_TARGET} PROPERTY OUTPUT_NAME ${LHDR_OSX_EXECUTABLE_NAME}) + ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) + + 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 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_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) + + # Link libraries + TARGET_LINK_LIBRARIES(${LHDR_OSX_EXECUTABLE_TARGET} ${LUMINANCE_MODULES_GUI} ${LIBS}) + TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) +# Unix +ELSEIF(UNIX) + FILE(GLOB LUMINANCE_QT_QM i18n-qt/*.qm) + SET(LUMINANCE_FILES ${LUMINANCE_FILES} ${LUMINANCE_QT_QM}) + + ADD_EXECUTABLE(luminance-hdr ${LUMINANCE_FILES}) + ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) + + # 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}) + + # make install directivies + INSTALL(TARGETS luminance-hdr RUNTIME DESTINATION bin) # main GUI exec + INSTALL(TARGETS luminance-hdr-cli RUNTIME DESTINATION bin) # main CLI exec + INSTALL(FILES ${LUMINANCE_QM} DESTINATION share/luminance-hdr/i18n) # i18n + INSTALL(FILES ${LUMINANCE_QT_QM} DESTINATION share/luminance-hdr/i18n) # i18n + + INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/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}/AUTHORS + ${CMAKE_SOURCE_DIR}/README + ${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 +# Microsoft Windows +ELSEIF(WIN32) + # icon files to copy in the bundle + SET(LUMINANCE_FILES ${LUMINANCE_FILES} "${CMAKE_SOURCE_DIR}/images/luminance_ico.rc") + + # Subsystem console: + ADD_EXECUTABLE(luminance-hdr WIN32 ${LUMINANCE_FILES}) + ADD_EXECUTABLE(luminance-hdr-cli ${LUMINANCE_FILES}) + + # Link libraries + TARGET_LINK_LIBRARIES(luminance-hdr ${LUMINANCE_MODULES_GUI} ${LIBS}) + TARGET_LINK_LIBRARIES(luminance-hdr-cli ${LUMINANCE_MODULES_CLI} ${LIBS}) + + # copies all necessary Qt dlls from the Qt binary dir to the output folder + SET(QT_RELEASE_DLLS + phonon4.dll + QtCore4.dll + QtGui4.dll + QtMultimedia4.dll + QtNetwork4.dll + QtSql4.dll + QtWebKit4.dll + QtXml4.dll + QtXmlPatterns4.dll + ) + FOREACH(dll ${QT_RELEASE_DLLS}) + FILE(COPY "${QT_BINARY_DIR}/${dll}" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release") + #STRING(REPLACE "4" "d4" debugdll ${dll}) + #FILE(COPY "${QT_BINARY_DIR}/${debugdll}" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug") + ENDFOREACH() + + FILE(COPY "${QT_PLUGINS_DIR}/imageformats/qjpeg4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release/imageformats") + #FILE(COPY "${QT_PLUGINS_DIR}/imageformats/qjpegd4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug/imageformats") + FILE(COPY "${QT_PLUGINS_DIR}/sqldrivers/qsqlite4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Release/sqldrivers") + #FILE(COPY "${QT_PLUGINS_DIR}/sqldrivers/qsqlited4.dll" DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/Debug/sqldrivers") + + FILE(GLOB QtI18nAll "${QT_TRANSLATIONS_DIR}/qt_*.qm") + FILE(GLOB QtI18nHelp "${QT_TRANSLATIONS_DIR}/qt_help_*.qm") + LIST(LENGTH QtI18nHelp QtI18nHelp_length) + IF(${QtI18nHelp_length} GREATER 0) + LIST(REMOVE_ITEM QtI18nAll ${QtI18nHelp}) + ENDIF() + + FILE(COPY ${QtI18nAll} DESTINATION "${CMAKE_BINARY_DIR}/QtDlls/i18n/") +ENDIF() + +# Packaging must go at the bottom +include(${CMAKE_SOURCE_DIR}/build/Packaging.cmake) diff -Nru luminance-hdr-2.3.0/Changelog luminance-hdr-2.3.1/Changelog --- luminance-hdr-2.3.0/Changelog 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/Changelog 2013-04-07 18:41:14.000000000 +0000 @@ -1,3 +1,20 @@ +Changes 2.3.1 +* 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 Polk) +* 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 + Changes 2.3.0 * New Fattal02 solver based on FFT (thanks to Tino Kluge) * Port of color management system to LCMS2 @@ -6,14 +23,12 @@ * Update translations * Bug fixes - Changes 2.3.0-beta1 * 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 -* Changes 2.2.1 * NEW: splitted executable luminance-hdr-cli for commandline mode diff -Nru luminance-hdr-2.3.0/build/Packaging.cmake luminance-hdr-2.3.1/build/Packaging.cmake --- luminance-hdr-2.3.0/build/Packaging.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/Packaging.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,18 @@ +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_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_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README") +set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README") + +if(APPLE) +include(${CMAKE_SOURCE_DIR}/build/PackagingApple.cmake) +endif() diff -Nru luminance-hdr-2.3.0/build/PackagingApple.cmake luminance-hdr-2.3.1/build/PackagingApple.cmake --- luminance-hdr-2.3.0/build/PackagingApple.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/PackagingApple.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,60 @@ +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/macosx/align_image_stack + 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 a qt.conf file +install(FILES ${CMAKE_SOURCE_DIR}/build/macosx/qt.conf + DESTINATION ${LHDR_OSX_EXECUTABLE_NAME}.app/Contents/Resources) + +# install README and other files +install(FILES + ${CMAKE_SOURCE_DIR}/AUTHORS + ${CMAKE_SOURCE_DIR}/README + ${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) diff -Nru luminance-hdr-2.3.0/build/linux/find_demosaicing_gpl2.sh luminance-hdr-2.3.1/build/linux/find_demosaicing_gpl2.sh --- luminance-hdr-2.3.0/build/linux/find_demosaicing_gpl2.sh 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/linux/find_demosaicing_gpl2.sh 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,4 @@ +#!/bin/bash + +readelf -a $1 | grep lmms + diff -Nru luminance-hdr-2.3.0/build/linux/find_demosaicing_gpl3.sh luminance-hdr-2.3.1/build/linux/find_demosaicing_gpl3.sh --- luminance-hdr-2.3.0/build/linux/find_demosaicing_gpl3.sh 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/linux/find_demosaicing_gpl3.sh 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,4 @@ +#!/bin/bash + +readelf -a $1 | grep amaze + diff -Nru luminance-hdr-2.3.0/build/macosx/Info.plist luminance-hdr-2.3.1/build/macosx/Info.plist --- luminance-hdr-2.3.0/build/macosx/Info.plist 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/Info.plist 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - CFBundleIconFile - luminance.icns - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by Davide Anastasia <davideanastasia@users.sourceforge.net> - CFBundleSignature - ???? - CFBundleExecutable - luminance-hdr - CFBundleIdentifier - com.yourcompany.luminance-hdr - NOTE - Created by Davide Anastasia <davideanastasia@users.sourceforge.net> - - diff -Nru luminance-hdr-2.3.0/build/macosx/Info.plist.in luminance-hdr-2.3.1/build/macosx/Info.plist.in --- luminance-hdr-2.3.0/build/macosx/Info.plist.in 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/Info.plist.in 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + CFBundleIconFile + luminance.icns + CFBundlePackageType + APPL + CFBundleGetInfoString + Created by Davide Anastasia <davideanastasia@users.sourceforge.net> + CFBundleSignature + ???? + CFBundleExecutable + @LHDR_OSX_EXECUTABLE_NAME@ + CFBundleIdentifier + @LHDR_DOMAIN_SECOND@.@LHDR_DOMAIN_FIRST@ + NOTE + Created by Davide Anastasia <davideanastasia@users.sourceforge.net> + + Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/build/macosx/align_image_stack and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/build/macosx/align_image_stack differ diff -Nru luminance-hdr-2.3.0/build/macosx/create-dmg.sh.in luminance-hdr-2.3.1/build/macosx/create-dmg.sh.in --- luminance-hdr-2.3.0/build/macosx/create-dmg.sh.in 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/create-dmg.sh.in 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,3 @@ +#!/bin/bash +# +hdiutil create -format UDBZ -quiet -srcfolder @CMAKE_INSTALL_PREFIX@/@LHDR_OSX_EXECUTABLE_NAME@.app @LHDR_OSX_EXECUTABLE_NAME@.dmg diff -Nru luminance-hdr-2.3.0/build/macosx/find_demosaicing_gpl2.sh luminance-hdr-2.3.1/build/macosx/find_demosaicing_gpl2.sh --- luminance-hdr-2.3.0/build/macosx/find_demosaicing_gpl2.sh 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/find_demosaicing_gpl2.sh 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,4 @@ +#!/bin/bash + +nm $1 | grep lmms + diff -Nru luminance-hdr-2.3.0/build/macosx/find_demosaicing_gpl3.sh luminance-hdr-2.3.1/build/macosx/find_demosaicing_gpl3.sh --- luminance-hdr-2.3.0/build/macosx/find_demosaicing_gpl3.sh 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/find_demosaicing_gpl3.sh 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,4 @@ +#!/bin/bash + +nm $1 | grep amaze + diff -Nru luminance-hdr-2.3.0/build/macosx/qt.conf luminance-hdr-2.3.1/build/macosx/qt.conf --- luminance-hdr-2.3.0/build/macosx/qt.conf 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/build/macosx/qt.conf 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,2 @@ +[Paths] +Plugins = PlugIns diff -Nru luminance-hdr-2.3.0/build/msvc/README.txt luminance-hdr-2.3.1/build/msvc/README.txt --- luminance-hdr-2.3.0/build/msvc/README.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/build/msvc/README.txt 2013-04-07 18:41:14.000000000 +0000 @@ -16,10 +16,10 @@ This build process requires: * Windows -* MS Visual Studio 2008 or higher +* MS Visual Studio 2008 or higher, ExpressEditions should work (currently testing with VS2012) * Qt for MSVC installed - - official 32 bit Qt from: http://qt.nokia.com/downloads/downloads#qt-lib - - Qt self compiled + - either official 32 bit Qt from: http://qt.nokia.com/downloads/downloads#qt-lib + - or Qt self compiled ATTENTION: Do not mix the compilation with different versions of MSVC. If you compile Luminance with VC2010 you should also have Qt compiled with VC2010. If you don't find any precompiled Qt with a @@ -47,7 +47,7 @@ command prompt (x64 or Win32) and change (cd) to that directory. If there are some problems the batch script should tell you! -Open the setenv.cmd file and adjust the variables paths for your needs. +Open the setenv.cmd file and adjust the variables paths and options for your needs. Start the compilation with > build.cmd diff -Nru luminance-hdr-2.3.0/build/msvc/build.cmd luminance-hdr-2.3.1/build/msvc/build.cmd --- luminance-hdr-2.3.0/build/msvc/build.cmd 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/build/msvc/build.cmd 2013-04-07 18:41:14.000000000 +0000 @@ -1,6 +1,32 @@ @echo off SETLOCAL +REM http://dev.exiv2.org/projects/exiv2/repository/ +SET EXIV2_COMMIT=3015 +REM sourceforge.net/p/libjpeg-turbo/code/ +SET LIBJPEG_COMMIT=942 + + +rem https://github.com/madler/zlib/commits +rem SET ZLIB_COMMIT=0b16609 +rem SET ZLIB_COMMIT_LONG=0b166094092efa2b92200cbb67f390e86c181ab4 +SET ZLIB_COMMIT=b06dee4 +SET ZLIB_COMMIT_LONG=b06dee43696b5057ee8e1b9700655ad9e7d89669 + +SET OPENEXR_COMMIT=3c2f7b9 +SET OPENEXR_COMMIT_LONG=3c2f7b956e57d8569f53823b4889921716276474 + + +SET LCMS_COMMIT=cde00fd +SET LCMS_COMMIT_LONG=cde00fd7dbe74e275aceb4a9055bbb1ae6bf93b2 + +SET LIBRAW_COMMIT=869ed7e +SET LIBRAW_COMMIT_LONG=869ed7e2ebca24c654401008903f188ac3e0d287 +SET LIBRAW_DEMOS2_COMMIT=028c410 +SET LIBRAW_DEMOS2_COMMIT_LONG=028c41031044c8f2bece04c3fb68d2d01368b7ae +SET LIBRAW_DEMOS3_COMMIT=f089589 +SET LIBRAW_DEMOS3_COMMIT_LONG=f0895891fdaa775255af02275fce426a5bf5c9fc + devenv /? > NUL IF ERRORLEVEL 1 ( echo. @@ -21,11 +47,22 @@ IF ERRORLEVEL 1 ( set Platform=Win32 set RawPlatform=x86 + set CpuPlatform=ia32 ) ELSE ( set Platform=x64 set RawPlatform=x64 + set CpuPlatform=intel64 ) -IF DEFINED VS100COMNTOOLS ( + +SET VISUAL_STUDIO_VC_REDIST=%VCINSTALLDIR%\redist\%RawPlatform% + +IF DEFINED VS110COMNTOOLS ( + REM Visual Studio 2012 + set VS_SHORT=vc11 + set VS_CMAKE=Visual Studio 11 + set VS_PROG_FILES=Microsoft Visual Studio 11.0 + +) ELSE IF DEFINED VS100COMNTOOLS ( REM Visual Studio 2010 set VS_SHORT=vc10 set VS_CMAKE=Visual Studio 10 @@ -43,11 +80,19 @@ call setenv.cmd +IF NOT EXIST %CMAKE_DIR%\bin\cmake.exe ( + echo. + echo.ERROR: CMake not found: %CMAKE_DIR%\bin\cmake.exe + echo. + goto error_end +) +IF NOT EXIST %CYGWIN_DIR%\bin\cp.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\cvs.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\git.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\gzip.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\mv.exe GOTO cygwin_error +IF NOT EXIST %CYGWIN_DIR%\bin\nasm.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\sed.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\ssh.exe GOTO cygwin_error IF NOT EXIST %CYGWIN_DIR%\bin\svn.exe GOTO cygwin_error @@ -58,10 +103,12 @@ :cygwin_error echo ERROR: Cygwin with +echo cp echo cvs echo git echo gzip echo mv +echo nasm echo sed echo ssh echo svn @@ -77,11 +124,15 @@ IF NOT DEFINED Configuration ( set Configuration=Release ) +IF NOT DEFINED ConfigurationLuminance ( + set ConfigurationLuminance=RelWithDebInfo +) cls echo. echo.--- %VS_CMAKE% --- echo.Configuration = %Configuration% +echo.ConfigurationLuminance = %ConfigurationLuminance% echo.Platform = %Platform% (%RawPlatform%) echo. @@ -89,39 +140,61 @@ mkdir %TEMP_DIR% ) -IF NOT EXIST %TEMP_DIR%\align_image_stack_%RawPlatform%.exe ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/align_image_stack_%RawPlatform%.exe qtpfsgui.sourceforge.net/win/align_image_stack_%RawPlatform%.exe + +IF NOT EXIST vcDlls ( + mkdir vcDlls + robocopy "%vcinstalldir%redist\%RawPlatform%" vcDlls /MIR >nul ) -IF NOT EXIST %TEMP_DIR%\zlib127.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/zlib127.zip http://zlib.net/zlib127.zip +IF NOT EXIST vcDlls\selected ( + mkdir vcDlls\selected + + %CYGWIN_DIR%\bin\cp.exe vcDlls/**/vcomp* vcDlls/selected + %CYGWIN_DIR%\bin\cp.exe vcDlls/**/msv* vcDlls/selected ) -IF NOT EXIST zlib-1.2.7 ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/zlib127.zip - pushd zlib-1.2.7\contrib\masmx64 - call bld_ml64.bat - cd ..\masmx86 - call bld_ml32.bat - cd ..\vstudio\%VS_SHORT% - devenv zlibvc.sln /build "%Configuration%|%Platform%" - popd + +IF NOT EXIST %TEMP_DIR%\%RawPlatform% ( + mkdir %TEMP_DIR%\%RawPlatform% ) -REM zlib copy for libpng -IF NOT EXIST zlib ( - mkdir zlib - copy zlib-1.2.7\*.h zlib - copy zlib-1.2.7\contrib\vstudio\%VS_SHORT%\%RawPlatform%\ZlibDll%Configuration%\*.lib zlib - copy zlib-1.2.7\contrib\vstudio\%VS_SHORT%\%RawPlatform%\ZlibDll%Configuration%\*.dll zlib +IF NOT EXIST %TEMP_DIR%\%RawPlatform%\align_image_stack.exe ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%RawPlatform%/align_image_stack.exe qtpfsgui.sourceforge.net/win/%RawPlatform%/align_image_stack.exe + IF %Platform% EQU Win32 ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%RawPlatform%/huginbase.dll qtpfsgui.sourceforge.net/win/%RawPlatform%/huginbase.dll + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%RawPlatform%/huginvigraimpex.dll qtpfsgui.sourceforge.net/win/%RawPlatform%/huginvigraimpex.dll + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%RawPlatform%/msvcp100.dll qtpfsgui.sourceforge.net/win/%RawPlatform%/msvcp100.dll + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%RawPlatform%/msvcr100.dll qtpfsgui.sourceforge.net/win/%RawPlatform%/msvcr100.dll + ) ) -IF NOT EXIST %TEMP_DIR%\lpng1511.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/lpng1511.zip http://prdownloads.sourceforge.net/libpng/lpng1511.zip?download +IF NOT EXIST %TEMP_DIR%\zlib-%ZLIB_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/zlib-%ZLIB_COMMIT%.zip --no-check-certificate http://github.com/madler/zlib/zipball/%ZLIB_COMMIT_LONG% ) -IF NOT EXIST lpng1511 ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/lpng1511.zip - pushd lpng1511 - nmake /f scripts\makefile.vcwin32 + +IF NOT EXIST zlib-%ZLIB_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/zlib-%ZLIB_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe madler-zlib-* zlib-%ZLIB_COMMIT% + + REM zlib must be compiled in the source folder, else exiv2 compilation + REM fails due to zconf.h rename/compile problems, due to cmake + pushd zlib-%ZLIB_COMMIT% + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" + IF errorlevel 1 goto error_end + devenv zlib.sln /build "%Configuration%|%Platform%" /Project zlib + IF errorlevel 1 goto error_end + popd +) + +IF NOT EXIST %TEMP_DIR%\lpng161.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/lpng161.zip http://sourceforge.net/projects/libpng/files/libpng16/1.6.1/lpng161.zip/download +) +IF NOT EXIST lpng161 ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/lpng161.zip + pushd lpng161 + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" . -DZLIB_ROOT=..\zlib-%ZLIB_COMMIT%;..\zlib-%ZLIB_COMMIT%\%Configuration% + IF errorlevel 1 goto error_end + devenv libpng.sln /build "%Configuration%|%Platform%" /Project png16 + IF errorlevel 1 goto error_end popd ) @@ -131,118 +204,122 @@ ) IF NOT EXIST expat-2.1.0 ( %CYGWIN_DIR%\bin\tar.exe -xf %TEMP_DIR%/expat-2.1.0.tar -) - - -IF NOT EXIST exiv2-trunk ( - set exiv2-compile=true - %CYGWIN_DIR%\bin\svn.exe co -r 2756 svn://dev.exiv2.org/svn/trunk exiv2-trunk -) ELSE ( - %CYGWIN_DIR%\bin\svn.exe update -r 2756 exiv2-trunk - set exiv2-compile=true -) - -IF DEFINED exiv2-compile ( - REM msvc64 is the right one for Win32 too - pushd exiv2-trunk\msvc64 - devenv exiv2.sln /upgrade - devenv exiv2.sln /build "%Configuration%DLL|%Platform%" /Project exiv2 + + pushd expat-2.1.0 + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" + IF errorlevel 1 goto error_end + devenv expat.sln /build "%Configuration%|%Platform%" /Project expat + IF errorlevel 1 goto error_end popd ) - -IF NOT EXIST %TEMP_DIR%\jpegsr8d.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/jpegsr8d.zip http://www.ijg.org/files/jpegsr8d.zip +IF NOT EXIST exiv2-%EXIV2_COMMIT% ( + %CYGWIN_DIR%\bin\svn.exe co -r %EXIV2_COMMIT% svn://dev.exiv2.org/svn/trunk exiv2-%EXIV2_COMMIT% + + pushd exiv2-%EXIV2_COMMIT% + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" -DZLIB_ROOT=..\zlib-%ZLIB_COMMIT%;..\zlib-%ZLIB_COMMIT%\Release + IF errorlevel 1 goto error_end + devenv exiv2.sln /build "%Configuration%|%Platform%" /Project exiv2 + IF errorlevel 1 goto error_end + copy bin\%Platform%\Dynamic\*.h include + popd ) -IF NOT EXIST libjpeg ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/jpegsr8d.zip - ren jpeg-8d libjpeg - - pushd libjpeg - copy jconfig.vc jconfig.h - copy makejsln.v10 makejsln.sln - copy makeasln.v10 makeasln.sln - copy makejvcx.v10 jpeg.vcxproj - copy makecvcx.v10 cjpeg.vcxproj - copy makedvcx.v10 djpeg.vcxproj - copy maketvcx.v10 jpegtran.vcxproj - copy makewvcx.v10 wrjpgcom.vcxproj - copy makervcx.v10 rdjpgcom.vcxpr - nmake /f makefile.vc +IF NOT EXIST libjpeg-turbo-%LIBJPEG_COMMIT% ( + %CYGWIN_DIR%\bin\svn.exe co -r %LIBJPEG_COMMIT% svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk libjpeg-turbo-%LIBJPEG_COMMIT% + IF NOT EXIST libjpeg-turbo-%LIBJPEG_COMMIT%.build ( + mkdir libjpeg-turbo-%LIBJPEG_COMMIT%.build + ) + pushd libjpeg-turbo-%LIBJPEG_COMMIT%.build + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" -DCMAKE_BUILD_TYPE=%Configuration% -DNASM="%CYGWIN_DIR%\bin\nasm.exe" -DWITH_JPEG8=TRUE ..\libjpeg-turbo-%LIBJPEG_COMMIT% + IF errorlevel 1 goto error_end + devenv libjpeg-turbo.sln /build "%Configuration%|%Platform%" + IF errorlevel 1 goto error_end + copy jconfig.h ..\libjpeg-turbo-%LIBJPEG_COMMIT% popd ) -IF NOT EXIST %TEMP_DIR%\lcms2-9e246e.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/lcms2-9e246e.zip --no-check-certificate https://github.com/mm2/Little-CMS/zipball/9e246ece55017da090a842e0cf3273483f32afa1 +IF NOT EXIST %TEMP_DIR%\lcms2-%LCMS_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/lcms2-%LCMS_COMMIT%.zip --no-check-certificate https://github.com/mm2/Little-CMS/zipball/%LCMS_COMMIT_LONG% ) -IF NOT EXIST lcms2-9e246e ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/lcms2-9e246e.zip - %CYGWIN_DIR%\bin\mv.exe mm2-Little-CMS-* lcms2-9e246e +IF NOT EXIST lcms2-%LCMS_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/lcms2-%LCMS_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe mm2-Little-CMS-* lcms2-%LCMS_COMMIT% - pushd lcms2-9e246e + pushd lcms2-%LCMS_COMMIT% devenv Projects\VC2010\lcms2.sln /Upgrade devenv Projects\VC2010\lcms2.sln /build "%Configuration%|%Platform%" /Project lcms2_DLL + IF errorlevel 1 goto error_end popd ) -IF NOT EXIST %TEMP_DIR%\tiff-4.0.2.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/tiff-4.0.2.zip http://download.osgeo.org/libtiff/tiff-4.0.2.zip +IF NOT EXIST %TEMP_DIR%\tiff-4.0.3.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/tiff-4.0.3.zip http://download.osgeo.org/libtiff/tiff-4.0.3.zip ) -IF NOT EXIST tiff-4.0.2 ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/tiff-4.0.2.zip +IF NOT EXIST tiff-4.0.3 ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/tiff-4.0.3.zip - echo.JPEG_SUPPORT=^1> tiff-4.0.2\qtpfsgui_commands.in - echo.JPEGDIR=..\..\libjpeg>> tiff-4.0.2\qtpfsgui_commands.in - echo.JPEG_INCLUDE=-I$^(JPEGDIR^)>> tiff-4.0.2\qtpfsgui_commands.in - echo.JPEG_LIB=$^(JPEGDIR^)\libjpeg.lib>> tiff-4.0.2\qtpfsgui_commands.in - echo.ZIP_SUPPORT=^1>> tiff-4.0.2\qtpfsgui_commands.in - echo.ZLIBDIR=..\..\zlib-1.2.7\contrib\vstudio\%VS_SHORT%\%RawPlatform%\ZlibDll%Configuration%>> tiff-4.0.2\qtpfsgui_commands.in - echo.ZLIB_INCLUDE=-I..\..\zlib-1.2.7>> tiff-4.0.2\qtpfsgui_commands.in - echo.ZLIB_LIB=$^(ZLIBDIR^)\zlibwapi.lib>> tiff-4.0.2\qtpfsgui_commands.in + echo.JPEG_SUPPORT=^1> tiff-4.0.3\qtpfsgui_commands.in + echo.JPEGDIR=%CD%\libjpeg-turbo-%LIBJPEG_COMMIT%>> tiff-4.0.3\qtpfsgui_commands.in + echo.JPEG_INCLUDE=-I%CD%\libjpeg-turbo-%LIBJPEG_COMMIT%>> tiff-4.0.3\qtpfsgui_commands.in + echo.JPEG_LIB=%CD%\libjpeg-turbo-%LIBJPEG_COMMIT%.build\sharedlib\%Configuration%\jpeg.lib>> tiff-4.0.3\qtpfsgui_commands.in + echo.ZIP_SUPPORT=^1>> tiff-4.0.3\qtpfsgui_commands.in + echo.ZLIBDIR=..\..\zlib-%ZLIB_COMMIT%\%Configuration%>> tiff-4.0.3\qtpfsgui_commands.in + echo.ZLIB_INCLUDE=-I..\..\zlib-%ZLIB_COMMIT%>> tiff-4.0.3\qtpfsgui_commands.in + echo.ZLIB_LIB=$^(ZLIBDIR^)\zlib.lib>> tiff-4.0.3\qtpfsgui_commands.in - pushd tiff-4.0.2 + pushd tiff-4.0.3 nmake /s /c /f Makefile.vc @qtpfsgui_commands.in + IF errorlevel 1 goto error_end popd ) +IF NOT EXIST %TEMP_DIR%\LibRaw-%LIBRAW_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/LibRaw-%LIBRAW_COMMIT%.zip --no-check-certificate https://github.com/LibRaw/LibRaw/zipball/%LIBRAW_COMMIT_LONG% +) -IF NOT EXIST %TEMP_DIR%\LibRaw-4ad62bd.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/LibRaw-4ad62bd.zip --no-check-certificate https://github.com/LibRaw/LibRaw/zipball/4ad62bd3a4face10222fec8884e8b21d858aa48b +IF NOT EXIST %TEMP_DIR%\LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT%.zip --no-check-certificate https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/zipball/%LIBRAW_DEMOS2_COMMIT_LONG% ) -IF NOT EXIST %TEMP_DIR%\LibRaw-demosaic-pack-GPL2-0.14.6.tar ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-0.14.6.tar.gz http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-0.14.6.tar.gz - %CYGWIN_DIR%\bin\gzip.exe -d %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-0.14.6.tar.gz + +IF NOT EXIST LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe LibRaw-LibRaw-* LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT% ) -IF NOT EXIST LibRaw-demosaic-pack-GPL2-0.14.6 ( - rem %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-0.14.6.tar.gz - - %CYGWIN_DIR%\bin\tar.exe -xf %TEMP_DIR%/LibRaw-demosaic-pack-GPL2-0.14.6.tar + +IF NOT EXIST %TEMP_DIR%\LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT%.zip --no-check-certificate https://github.com/LibRaw/LibRaw-demosaic-pack-GPL3/zipball/%LIBRAW_DEMOS3_COMMIT_LONG% ) -IF NOT EXIST LibRaw-4ad62bd ( - %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/LibRaw-4ad62bd.zip - %CYGWIN_DIR%\bin\mv.exe LibRaw-LibRaw-* LibRaw-4ad62bd +IF NOT EXIST LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe LibRaw-LibRaw-* LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT% +) + +IF NOT EXIST LibRaw-%LIBRAW_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/LibRaw-%LIBRAW_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe LibRaw-LibRaw-* LibRaw-%LIBRAW_COMMIT% - pushd LibRaw-4ad62bd + pushd LibRaw-%LIBRAW_COMMIT% rem echo.COPT_OPT="/openmp"> qtpfsgui_commands.in - echo.CFLAGS_DP2=/I..\LibRaw-demosaic-pack-GPL2-0.14.6> qtpfsgui_commands.in + echo.CFLAGS_DP2=/I..\LibRaw-demosaic-pack-GPL2-%LIBRAW_DEMOS2_COMMIT%> qtpfsgui_commands.in echo.CFLAGSG2=/DLIBRAW_DEMOSAIC_PACK_GPL2>> qtpfsgui_commands.in - echo.LCMS_DEF="/DUSE_LCMS2 /DCMS_DLL /I..\lcms2-9e246e\include">> qtpfsgui_commands.in - echo.LCMS_LIB="..\lcms2-9e246e\bin\lcms2_dll.lib">> qtpfsgui_commands.in - rem echo.LCMS_DEF="/DUSE_LCMS /DLCMS_DLL /I..\lcms-1.19\include">> qtpfsgui_commands.in - rem echo.LCMS_LIB="..\lcms-1.19\bin\lcms.lib">> qtpfsgui_commands.in - + echo.CFLAGS_DP3=/I..\LibRaw-demosaic-pack-GPL3-%LIBRAW_DEMOS3_COMMIT%>> qtpfsgui_commands.in + echo.CFLAGSG3=/DLIBRAW_DEMOSAIC_PACK_GPL3>> qtpfsgui_commands.in + echo.LCMS_DEF="/DUSE_LCMS2 /DCMS_DLL /I..\lcms2-%LCMS_COMMIT%\include">> qtpfsgui_commands.in + echo.LCMS_LIB="..\lcms2-%LCMS_COMMIT%\bin\lcms2_dll.lib">> qtpfsgui_commands.in + echo.JPEG_DEF="/DUSE_JPEG8 /DUSE_JPEG /I..\libjpeg-turbo-%LIBJPEG_COMMIT%">> qtpfsgui_commands.in + echo.JPEG_LIB="..\libjpeg-turbo-%LIBJPEG_COMMIT%.build\sharedlib\%Configuration%\jpeg.lib">> qtpfsgui_commands.in + nmake /f Makefile.msvc @qtpfsgui_commands.in clean nmake /f Makefile.msvc @qtpfsgui_commands.in bin\libraw.dll popd ) - IF NOT EXIST %TEMP_DIR%\gsl-1.15.tar ( %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/gsl-1.15.tar.gz ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz %CYGWIN_DIR%\bin\gzip -d %TEMP_DIR%/gsl-1.15.tar.gz @@ -275,85 +352,143 @@ ) popd - copy zlib-1.2.7\*.h OpenExrStuff\Deploy\include - copy zlib-1.2.7\contrib\vstudio\%VS_SHORT%\%RawPlatform%\ZlibDll%Configuration%\*.lib OpenExrStuff\Deploy\lib\%Platform%\%Configuration% - copy zlib-1.2.7\contrib\vstudio\%VS_SHORT%\%RawPlatform%\ZlibDll%Configuration%\*.dll OpenExrStuff\Deploy\bin\%Platform%\%Configuration% -) - -pushd OpenExrStuff\openexr-cvs -IF NOT EXIST IlmBase ( - %CYGWIN_DIR%\bin\cvs.exe -d :pserver:anonymous:anonymous@cvs.savannah.nongnu.org:/sources/openexr co IlmBase - set openexr-compile=true -) ELSE ( - rem %CYGWIN_DIR%\bin\cvs.exe -d :pserver:anonymous:anonymous@cvs.savannah.nongnu.org:/sources/openexr update IlmBase -) -IF NOT EXIST OpenEXR ( - %CYGWIN_DIR%\bin\cvs.exe -d :pserver:anonymous:anonymous@cvs.savannah.nongnu.org:/sources/openexr co OpenEXR - set openexr-compile=true -) ELSE ( - rem %CYGWIN_DIR%\bin\cvs.exe -d :pserver:anonymous:anonymous@cvs.savannah.nongnu.org:/sources/openexr update OpenEXR -) -popd - -IF DEFINED openexr-compile ( - pushd OpenExrStuff\openexr-cvs\IlmBase\vc\vc9\IlmBase - devenv IlmBase.sln /Upgrade + copy zlib-%ZLIB_COMMIT%\*.h OpenExrStuff\Deploy\include + copy zlib-%ZLIB_COMMIT%\%Configuration%\*.lib OpenExrStuff\Deploy\lib\%Platform%\%Configuration% + copy zlib-%ZLIB_COMMIT%\%Configuration%\*.dll OpenExrStuff\Deploy\bin\%Platform%\%Configuration% +) + +IF NOT EXIST %TEMP_DIR%\OpenEXR-%OPENEXR_COMMIT%.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/OpenEXR-%OPENEXR_COMMIT%.zip --no-check-certificate https://github.com/openexr/openexr/zipball/%OPENEXR_COMMIT_LONG% +) + +IF NOT EXIST OpenEXR-%OPENEXR_COMMIT% ( + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/OpenEXR-%OPENEXR_COMMIT%.zip + %CYGWIN_DIR%\bin\mv.exe openexr-openexr-* OpenEXR-%OPENEXR_COMMIT% + + pushd OpenEXR-%OPENEXR_COMMIT% + + IF NOT EXIST zlib ( + mkdir zlib + mkdir zlib\include + mkdir zlib\lib + robocopy ..\zlib-%ZLIB_COMMIT%\ zlib\include *.h >nul + robocopy ..\zlib-%ZLIB_COMMIT%\%Configuration%\ zlib\lib *.dll *.exp *.lib >nul + ) + + IF NOT EXIST IlmBase.build ( + mkdir IlmBase.build + ) + pushd IlmBase.build + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" -DCMAKE_BUILD_TYPE=%Configuration% ../IlmBase -DCMAKE_INSTALL_PREFIX=output + IF errorlevel 1 goto error_end devenv IlmBase.sln /build "%Configuration%|%Platform%" - popd - - pushd OpenExrStuff\openexr-cvs\OpenEXR\vc\vc8\OpenEXR - devenv OpenEXR.sln /Upgrade + IF errorlevel 1 goto error_end + devenv IlmBase.sln /build "%Configuration%|%Platform%" /Project INSTALL + IF errorlevel 1 goto error_end + popd + + copy IlmBase\Half\halfExport.h IlmBase.build\output\include\OpenEXR + + IF NOT EXIST OpenEXR.build ( + mkdir OpenEXR.build + ) + + pushd OpenEXR.build + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" -DCMAKE_BUILD_TYPE=%Configuration% ^ + -DZLIB_ROOT=..\zlib ^ + -DILMBASE_PACKAGE_PREFIX=%CD%\OpenEXR-%OPENEXR_COMMIT%\IlmBase.build\output ^ + -DCMAKE_INSTALL_PREFIX=output ^ + ../OpenEXR + IF errorlevel 1 goto error_end devenv OpenEXR.sln /build "%Configuration%|%Platform%" /Project IlmImf + rem IF errorlevel 1 goto error_end + popd + copy OpenEXR\IlmImf\*.h IlmBase.build\output\include\OpenEXR + copy OpenEXR.build\IlmImf\%Configuration%\*.lib IlmBase.build\output\lib + copy OpenEXR\config\*.h IlmBase.build\output\include\OpenEXR + popd ) - + IF %Platform% EQU Win32 ( - IF NOT EXIST %TEMP_DIR%\fftw-3.3.2-dll32.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/fftw-3.3.2-dll32.zip ftp://ftp.fftw.org/pub/fftw/fftw-3.3.2-dll32.zip + IF NOT EXIST %TEMP_DIR%\fftw-3.3.3-dll32.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/fftw-3.3.3-dll32.zip ftp://ftp.fftw.org/pub/fftw/fftw-3.3.3-dll32.zip ) ) ELSE ( - IF NOT EXIST %TEMP_DIR%\fftw-3.3.2-dll64.zip ( - %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/fftw-3.3.2-dll64.zip ftp://ftp.fftw.org/pub/fftw/fftw-3.3.2-dll64.zip + IF NOT EXIST %TEMP_DIR%\fftw-3.3.3-dll64.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/fftw-3.3.3-dll64.zip ftp://ftp.fftw.org/pub/fftw/fftw-3.3.3-dll64.zip ) ) -IF NOT EXIST fftw-3.3.2-dll ( +IF NOT EXIST fftw-3.3.3-dll ( IF %Platform% EQU Win32 ( - %CYGWIN_DIR%\bin\unzip.exe -q -d fftw-3.3.2-dll %TEMP_DIR%/fftw-3.3.2-dll32.zip + %CYGWIN_DIR%\bin\unzip.exe -q -d fftw-3.3.3-dll %TEMP_DIR%/fftw-3.3.3-dll32.zip ) ELSE ( - %CYGWIN_DIR%\bin\unzip.exe -q -d fftw-3.3.2-dll %TEMP_DIR%/fftw-3.3.2-dll64.zip + %CYGWIN_DIR%\bin\unzip.exe -q -d fftw-3.3.3-dll %TEMP_DIR%/fftw-3.3.3-dll64.zip ) - pushd fftw-3.3.2-dll + pushd fftw-3.3.3-dll lib /def:libfftw3-3.def lib /def:libfftw3f-3.def lib /def:libfftw3l-3.def popd ) -REM IF NOT DEFINED L_BOOST_DIR ( -REM set L_BOOST_DIR=. +REM IF NOT EXIST %TEMP_DIR%\tbb40_20120613oss_win.zip ( +REM %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/tbb40_20120613oss_win.zip "http://threadingbuildingblocks.org/uploads/77/187/4.0 update 5/tbb40_20120613oss_win.zip" REM ) REM -REM IF NOT EXIST %TEMP_DIR%\boost_1_47_0.tar.gz ( -REM %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/boost_1_47_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.47.0/boost_1_47_0.tar.gz/download -REM %CYGWIN_DIR%\bin\gzip.exe -d %TEMP_DIR%/boost_1_47_0.tar.gz -REM +REM IF NOT EXIST tbb40_20120613oss ( +REM %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/tbb40_20120613oss_win.zip +REM REM Everthing is already compiled, nothing to do! +REM ) + +REM GTest Patch for VS2012: +REM in internal_utils.cmake ~60 +REM if (MSVC_VERSION EQUAL 1700) +REM set(cxx_base_flags "${cxx_base_flags} -D_VARIADIC_MAX=10") +REM endif () +REM +REM IF NOT EXIST %TEMP_DIR%\gtest-1.6.0.zip ( +REM %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/gtest-1.6.0.zip http://googletest.googlecode.com/files/gtest-1.6.0.zip REM ) REM -REM IF NOT EXIST %L_BOOST_DIR%\boost_1_47_0 ( -REM echo.Extracting boost. Be patient! -REM -REM pushd %L_BOOST_DIR% -REM %CYGWIN_DIR%\bin\tar.exe -xf %TEMP_DIR%/boost_1_47_0.tar +REM IF NOT EXIST gtest-1.6.0 ( +REM %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/gtest-1.6.0.zip +REM +REM mkdir gtest-1.6.0.build +REM pushd gtest-1.6.0.build +REM %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" ..\gtest-1.6.0 -DBUILD_SHARED_LIBS=1 +REM devenv gtest.sln /build "%Configuration%|%Platform%" REM popd +REM ) + + +IF NOT DEFINED L_BOOST_DIR ( + set L_BOOST_DIR=. +) + +IF NOT EXIST %TEMP_DIR%\boost_1_53_0.zip ( + %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/boost_1_53_0.zip http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.zip/download +) + +IF NOT EXIST %L_BOOST_DIR%\boost_1_53_0 ( + echo.Extracting boost. Be patient! + + pushd %L_BOOST_DIR% + %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/boost_1_53_0.zip + popd + + REM Currently only the header files are required of boost. + REM Therefore the following code block is commented out. + REM -REM pushd %L_BOOST_DIR%\boost_1_47_0 +REM pushd %L_BOOST_DIR%\boost_1_53_0 REM bootstrap.bat REM popd REM -REM pushd %L_BOOST_DIR%\boost_1_47_0 +REM pushd %L_BOOST_DIR%\boost_1_53_0 REM IF %Platform% EQU Win32 ( REM IF %Configuration% EQU Release ( REM b2.exe toolset=msvc variant=release @@ -367,20 +502,20 @@ REM b2.exe toolset=msvc variant=debug address-model=64 REM ) REM ) -REM popd -REM ) -REM -REM REM Set Boost-directory as ENV variable (needed for CMake) -REM pushd %L_BOOST_DIR%\boost_1_47_0 -REM SET BOOST_ROOT=%CD% -REM popd + popd +) + +REM Set Boost-directory as ENV variable (needed for CMake) +pushd %L_BOOST_DIR%\boost_1_53_0 +SET BOOST_ROOT=%CD% +popd IF NOT EXIST LuminanceHdrStuff ( mkdir LuminanceHdrStuff ) IF NOT EXIST LuminanceHdrStuff\qtpfsgui ( pushd LuminanceHdrStuff - %CYGWIN_DIR%\bin\git.exe clone git://qtpfsgui.git.sourceforge.net/gitroot/qtpfsgui/qtpfsgui qtpfsgui + %CYGWIN_DIR%\bin\git.exe clone git://git.code.sf.net/p/qtpfsgui/code qtpfsgui popd ) ELSE ( pushd LuminanceHdrStuff\qtpfsgui @@ -406,47 +541,57 @@ mkdir LuminanceHdrStuff\DEPs\bin\%%v ) - - copy lpng1511\*.h LuminanceHdrStuff\DEPs\include\libpng - copy lpng1511\*.lib LuminanceHdrStuff\DEPs\lib\libpng - rem copy lpng1511\*.dll LuminanceHdrStuff\DEPs\bin\libpng - - copy libjpeg\*.h LuminanceHdrStuff\DEPs\include\libjpeg - - copy lcms2-9e246e\include\*.h LuminanceHdrStuff\DEPs\include\lcms2 - copy lcms2-9e246e\bin\*.lib LuminanceHdrStuff\DEPs\lib\lcms2 - copy lcms2-9e246e\bin\*.dll LuminanceHdrStuff\DEPs\bin\lcms2 - - copy exiv2-trunk\msvc64\include\* LuminanceHdrStuff\DEPs\include\exiv2 - copy exiv2-trunk\msvc64\include\exiv2\* LuminanceHdrStuff\DEPs\include\exiv2 - - copy exiv2-trunk\msvc64\exiv2lib\%Platform%\%Configuration%DLL\*.lib LuminanceHdrStuff\DEPs\lib\exiv2 - copy exiv2-trunk\msvc64\exiv2lib\%Platform%\%Configuration%DLL\*.dll LuminanceHdrStuff\DEPs\bin\exiv2 - - copy tiff-4.0.2\libtiff\*.h LuminanceHdrStuff\DEPs\include\libtiff - copy tiff-4.0.2\libtiff\*.lib LuminanceHdrStuff\DEPs\lib\libtiff - copy tiff-4.0.2\libtiff\*.dll LuminanceHdrStuff\DEPs\bin\libtiff - mkdir LuminanceHdrStuff\DEPs\include\libraw\libraw - copy LibRaw-4ad62bd\libraw\*.h LuminanceHdrStuff\DEPs\include\libraw\libraw - copy LibRaw-4ad62bd\lib\*.lib LuminanceHdrStuff\DEPs\lib\libraw - copy LibRaw-4ad62bd\bin\*.dll LuminanceHdrStuff\DEPs\bin\libraw - - copy OpenExrStuff\Deploy\include\*.h LuminanceHdrStuff\DEPs\include\OpenEXR - copy OpenExrStuff\Deploy\lib\%Platform%\%Configuration%\*.lib LuminanceHdrStuff\DEPs\lib\OpenEXR - copy OpenExrStuff\Deploy\bin\%Platform%\%Configuration%\*.dll LuminanceHdrStuff\DEPs\bin\OpenEXR - - copy fftw-3.3.2-dll\*.h LuminanceHdrStuff\DEPs\include\fftw3 - copy fftw-3.3.2-dll\*.lib LuminanceHdrStuff\DEPs\lib\fftw3 - copy fftw-3.3.2-dll\*.dll LuminanceHdrStuff\DEPs\bin\fftw3 + + + + copy OpenEXR-%OPENEXR_COMMIT%\IlmBase.build\output\include\OpenEXR\*.h LuminanceHdrStuff\DEPs\include\OpenEXR + copy OpenEXR-%OPENEXR_COMMIT%\IlmBase.build\output\lib\*.lib LuminanceHdrStuff\DEPs\lib\OpenEXR + rem copy OpenExrStuff\Deploy\bin\%Platform%\%Configuration%\*.dll LuminanceHdrStuff\DEPs\bin\OpenEXR mkdir LuminanceHdrStuff\DEPs\include\gsl\gsl copy gsl-1.15\gsl\*.h LuminanceHdrStuff\DEPs\include\gsl\gsl copy gsl-1.15\build.vc10\lib\%Platform%\%Configuration%\*.lib LuminanceHdrStuff\DEPs\lib\gsl rem copy gsl-1.15\build.vc10\dll\*.dll LuminanceHdrStuff\DEPs\bin\gsl - ) +robocopy fftw-3.3.3-dll LuminanceHdrStuff\DEPs\include\fftw3 *.h /MIR >nul +robocopy fftw-3.3.3-dll LuminanceHdrStuff\DEPs\lib\fftw3 *.lib /MIR /NJS >nul +robocopy fftw-3.3.3-dll LuminanceHdrStuff\DEPs\bin\fftw3 *.dll /MIR /NJS >nul + + +robocopy tiff-4.0.3\libtiff LuminanceHdrStuff\DEPs\include\libtiff *.h /MIR >nul +robocopy tiff-4.0.3\libtiff LuminanceHdrStuff\DEPs\lib\libtiff *.lib /MIR /NJS >nul +robocopy tiff-4.0.3\libtiff LuminanceHdrStuff\DEPs\bin\libtiff *.dll /MIR /NJS >nul + +rem robocopy expat: included indirectly in in exiv2 +rem robocopy zlib: included indirectly in in exiv2 +robocopy exiv2-%EXIV2_COMMIT%\include LuminanceHdrStuff\DEPs\include\exiv2 *.h *.hpp /MIR >nul +robocopy exiv2-%EXIV2_COMMIT%\bin\%Platform%\Dynamic\%Configuration% LuminanceHdrStuff\DEPs\lib\exiv2 *.lib /MIR >nul +robocopy exiv2-%EXIV2_COMMIT%\bin\%Platform%\Dynamic\%Configuration% LuminanceHdrStuff\DEPs\bin\exiv2 *.dll /MIR >nul + +robocopy lpng161 LuminanceHdrStuff\DEPs\include\libpng *.h /MIR >nul +robocopy lpng161\%Configuration% LuminanceHdrStuff\DEPs\lib\libpng *.lib /MIR >nul +robocopy lpng161\%Configuration% LuminanceHdrStuff\DEPs\bin\libpng *.dll /MIR >nul + + +robocopy LibRaw-%LIBRAW_COMMIT%\libraw LuminanceHdrStuff\DEPs\include\libraw\libraw /MIR >nul +robocopy LibRaw-%LIBRAW_COMMIT%\lib LuminanceHdrStuff\DEPs\lib\libraw *.lib /MIR >nul +robocopy LibRaw-%LIBRAW_COMMIT%\bin LuminanceHdrStuff\DEPs\bin\libraw *.dll /MIR >nul + +robocopy lcms2-%LCMS_COMMIT%\include LuminanceHdrStuff\DEPs\include\lcms2 *.h /MIR >nul +robocopy lcms2-%LCMS_COMMIT%\bin LuminanceHdrStuff\DEPs\lib\lcms2 *.lib /MIR /NJS >nul +robocopy lcms2-%LCMS_COMMIT%\bin LuminanceHdrStuff\DEPs\bin\lcms2 *.dll /MIR /NJS >nul + +robocopy libjpeg-turbo-%LIBJPEG_COMMIT% LuminanceHdrStuff\DEPs\include\libjpeg *.h /MIR >nul +robocopy libjpeg-turbo-%LIBJPEG_COMMIT%.build\sharedlib\%Configuration% LuminanceHdrStuff\DEPs\lib\libjpeg *.lib /MIR /NJS >nul +robocopy libjpeg-turbo-%LIBJPEG_COMMIT%.build\sharedlib\%Configuration% LuminanceHdrStuff\DEPs\bin\libjpeg *.dll /MIR /NJS >nul + +REM robocopy tbb40_20120613oss\include LuminanceHdrStuff\DEPs\include\tbb /MIR >nul +REM robocopy tbb40_20120613oss\lib\%CpuPlatform%\%VS_SHORT% LuminanceHdrStuff\DEPs\lib\tbb /MIR >nul +REM robocopy tbb40_20120613oss\bin\%CpuPlatform%\%VS_SHORT% LuminanceHdrStuff\DEPs\bin\tbb /MIR >nul + + IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build ( mkdir LuminanceHdrStuff\qtpfsgui.build ) @@ -463,53 +608,92 @@ ) ELSE ( set CMAKE_OPTIONS=%CMAKE_OPTIONS% -ULUPDATE_NOOBSOLETE ) + + +set L_CMAKE_INCLUDE=..\DEPs\include\libtiff;..\DEPs\include\libpng;..\..\zlib-%ZLIB_COMMIT% +set L_CMAKE_LIB=..\DEPs\lib\libtiff;..\DEPs\lib\libpng;..\..\zlib-%ZLIB_COMMIT%\%Configuration% +set L_CMAKE_PROGRAM_PATH=%CYGWIN_DIR%\bin +set L_CMAKE_PREFIX_PATH=%QTDIR% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPC_EXIV2_INCLUDEDIR=..\DEPs\include\exiv2 -DPC_EXIV2_LIBDIR=..\DEPs\lib\exiv2 -DCMAKE_INCLUDE_PATH=%L_CMAKE_INCLUDE% -DCMAKE_LIBRARY_PATH=%L_CMAKE_LIB% -DCMAKE_PROGRAM_PATH=%L_CMAKE_PROGRAM_PATH% -DCMAKE_PREFIX_PATH=%L_CMAKE_PREFIX_PATH% -DPNG_NAMES=libpng16 + +IF EXIST ..\..\gtest-1.6.0 ( + SET GTEST_ROOT=%CD%\..\..\gtest-1.6.0 +) + %CMAKE_DIR%\bin\cmake.exe -G "%VS_CMAKE%" ..\qtpfsgui %CMAKE_OPTIONS% popd -IF EXIST LuminanceHdrStuff\qtpfsgui.build\luminance-hdr.sln ( +IF EXIST LuminanceHdrStuff\qtpfsgui.build\Luminance HDR.sln ( pushd LuminanceHdrStuff\qtpfsgui.build - devenv luminance-hdr.sln /Upgrade - devenv luminance-hdr.sln /build "%Configuration%|%Platform%" + rem devenv luminance-hdr.sln /Upgrade + devenv "Luminance HDR.sln" /build "%ConfigurationLuminance%|%Platform%" + IF errorlevel 1 goto error_end popd ) -IF EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\luminance-hdr.exe ( - IF EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration% ( +IF EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\luminance-hdr.exe ( + IF EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance% ( - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\LICENSE.txt ( - copy LuminanceHdrStuff\qtpfsgui\LICENSE LuminanceHdrStuff\qtpfsgui.build\%Configuration%\LICENSE.txt - ) - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\align_image_stack.exe ( - copy %TEMP_DIR%\align_image_stack_%RawPlatform%.exe LuminanceHdrStuff\qtpfsgui.build\%Configuration%\align_image_stack.exe - ) + robocopy LuminanceHdrStuff\qtpfsgui LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance% LICENSE >nul + + IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\align_image_stack.exe ( + copy vcDlls\selected\* LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\ + ) + + robocopy %TEMP_DIR%\%RawPlatform% LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance% align_image_stack.exe >nul + IF %Platform% EQU Win32 ( + rem robocopy %TEMP_DIR%\%RawPlatform% LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance% huginbase.dll huginvigraimpex.dll msvcp100.dll msvcr100.dll >nul + ) - IF EXIST LuminanceHdrStuff\qtpfsgui.build\QtDlls\%Configuration%\ ( - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\zlib1.dll ( - mkdir LuminanceHdrStuff\qtpfsgui.build\%Configuration%\imageformats\ - mkdir LuminanceHdrStuff\qtpfsgui.build\%Configuration%\sqldrivers\ - copy LuminanceHdrStuff\qtpfsgui.build\QtDlls\%Configuration%\* LuminanceHdrStuff\qtpfsgui.build\%Configuration%\ - copy LuminanceHdrStuff\qtpfsgui.build\QtDlls\%Configuration%\imageformats\* LuminanceHdrStuff\qtpfsgui.build\%Configuration%\imageformats\ - copy LuminanceHdrStuff\qtpfsgui.build\QtDlls\%Configuration%\sqldrivers\* LuminanceHdrStuff\qtpfsgui.build\%Configuration%\sqldrivers\ - ) - ) + pushd LuminanceHdrStuff\DEPs\bin + robocopy libjpeg ..\..\qtpfsgui.build\%ConfigurationLuminance% jpeg8.dll >nul + robocopy exiv2 ..\..\qtpfsgui.build\%ConfigurationLuminance% exiv2.dll >nul + robocopy exiv2 ..\..\qtpfsgui.build\%ConfigurationLuminance% expat.dll >nul + robocopy exiv2 ..\..\qtpfsgui.build\%ConfigurationLuminance% zlib.dll >nul + robocopy OpenEXR ..\..\qtpfsgui.build\%ConfigurationLuminance% Half.dll >nul + robocopy OpenEXR ..\..\qtpfsgui.build\%ConfigurationLuminance% Iex.dll >nul + robocopy OpenEXR ..\..\qtpfsgui.build\%ConfigurationLuminance% IlmImf.dll >nul + robocopy OpenEXR ..\..\qtpfsgui.build\%ConfigurationLuminance% IlmThread.dll >nul + robocopy libraw ..\..\qtpfsgui.build\%ConfigurationLuminance% libraw.dll >nul + robocopy fftw3 ..\..\qtpfsgui.build\%ConfigurationLuminance% libfftw3f-3.dll >nul + robocopy libpng ..\..\qtpfsgui.build\%ConfigurationLuminance% libpng16.dll >nul + popd + + IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\lcms2.dll ( + pushd LuminanceHdrStuff\DEPs\bin + for %%v in ("lcms2\lcms2_DLL.dll", ) do ( + copy %%v ..\..\qtpfsgui.build\%ConfigurationLuminance% + ) + popd + ren LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\lcms2_DLL.dll lcms2.dll + ) - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\zlib1.dll ( - pushd LuminanceHdrStuff\DEPs\bin - for %%v in ("lcms2\lcms2_DLL.dll", "lcms2\lcms.dll", "exiv2\exiv2.dll", "exiv2\libexpat.dll", "exiv2\zlib1.dll", "OpenEXR\Half.dll", "OpenEXR\Iex.dll", "OpenEXR\IlmImf.dll", "OpenEXR\IlmThread.dll", "OpenEXR\zlibwapi.dll", "libraw\libraw.dll", "fftw3\libfftw3f-3.dll") do ( - copy %%v ..\..\qtpfsgui.build\%Configuration% - ) - popd - ren LuminanceHdrStuff\qtpfsgui.build\%Configuration%\lcms2_DLL.dll lcms2.dll - ) - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\i18n\ ( - mkdir LuminanceHdrStuff\qtpfsgui.build\%Configuration%\i18n - copy LuminanceHdrStuff\qtpfsgui.build\QtDlls\i18n\*.qm LuminanceHdrStuff\qtpfsgui.build\%Configuration%\i18n - copy LuminanceHdrStuff\qtpfsgui.build\*.qm LuminanceHdrStuff\qtpfsgui.build\%Configuration%\i18n + IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\i18n\ ( + mkdir LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\i18n ) - IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%Configuration%\help\ ( - mkdir LuminanceHdrStuff\qtpfsgui.build\%Configuration%\help - xcopy LuminanceHdrStuff\qtpfsgui\help LuminanceHdrStuff\qtpfsgui.build\%Configuration%\help /D /E /C /R /H /I /K /Y + IF NOT EXIST LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\help\ ( + mkdir LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\help ) + + robocopy LuminanceHdrStuff\qtpfsgui.build LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\i18n lang_*.qm >nul + robocopy LuminanceHdrStuff\qtpfsgui\help LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance%\help /MIR >nul + + + REM ----- QT Stuff (Dlls, translations) -------------------------------------------- + pushd LuminanceHdrStuff\qtpfsgui.build\%ConfigurationLuminance% + for %%v in ( "QtCore4.dll", "QtGui4.dll", "QtMultimedia4.dll", "QtNetwork4.dll", "QtSql4.dll", "QtWebkit4.dll", "QtXml4.dll", "QtXmlPatterns4.dll") do ( + robocopy %QTDIR%\bin . %%v >nul + ) + for %%v in ("imageformats", "sqldrivers") do ( + IF NOT EXIST %%v ( + mkdir %%v + ) + ) + robocopy %QTDIR%\plugins\imageformats imageformats qjpeg4.dll >nul + robocopy %QTDIR%\plugins\sqldrivers sqldrivers qsqlite4.dll >nul + robocopy %QTDIR%\translations i18n qt_??.qm >nul + robocopy %QTDIR%\translations i18n qt_??_*.qm >nul + popd ) ) diff -Nru luminance-hdr-2.3.0/build/msvc/setenv.cmd luminance-hdr-2.3.1/build/msvc/setenv.cmd --- luminance-hdr-2.3.0/build/msvc/setenv.cmd 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/build/msvc/setenv.cmd 2013-04-07 18:41:14.000000000 +0000 @@ -1,13 +1,16 @@ @echo off SET CYGWIN_DIR=c:\cygwin SET TEMP_DIR=.downloaddir -SET CMAKE_DIR=C:\Data\Programs\cmake-2.8.7-win32-x86 +SET CMAKE_DIR=C:\Data\Programs\cmake-2.8.10.1-win32-x86 SET VISUAL_STUDIO_VC_REDIST=C:\Program Files (x86)\%VS_PROG_FILES%\VC\redist\%RawPlatform% +rem SET QTDIR=C:\Data\Develop\Qt\5.0.1-x64\qtbase +SET QTDIR=C:\Data\Develop\Qt\4.8.4-x64 REM Options: ------------------------------------------- -REM enable another configuration (defaulting to Release) +REM enable another configuration (defaulting to Release, RelWithDebInfo) REM SET Configuration=Debug +REM SET ConfigurationLuminance=Release REM updates/overwrites the original .ts files doing a Qt lupdate SET OPTION_LUMINANCE_UPDATE_TRANSLATIONS=0 diff -Nru luminance-hdr-2.3.0/cmake/CompilerSettings.cmake luminance-hdr-2.3.1/cmake/CompilerSettings.cmake --- luminance-hdr-2.3.0/cmake/CompilerSettings.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/CompilerSettings.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,54 @@ +IF(UNIX) +ADD_DEFINITIONS(-Wall -Wno-unknown-pragmas) +ADD_DEFINITIONS(-ffast-math -msse2 -msse) + +IF(APPLE) +# optimize for 64-bit core 2 architecture on Apple +ADD_DEFINITIONS(-march=core2) +ENDIF() +ENDIF() + +#Activate C++11 support, when available +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + 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_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") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") # add_definitions("-std=gnu++0x") + add_definitions(-DLHDR_CXX11_ENABLED) + else() + message(WARNING "C++11 NOT available. GCC >= 4.3 is needed.") + endif() +elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + message(STATUS "C++11 activated for Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + add_definitions(-DLHDR_CXX11_ENABLED) + 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") +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.") +endif() + +#OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3 +IF(MSVC) + FIND_PACKAGE(OpenMP REQUIRED) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX) + EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) + IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) + MESSAGE(STATUS "GCC >= 4.3") + 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() +ENDIF() diff -Nru luminance-hdr-2.3.0/cmake/FindGit.cmake luminance-hdr-2.3.1/cmake/FindGit.cmake --- luminance-hdr-2.3.0/cmake/FindGit.cmake 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/FindGit.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -FIND_PROGRAM(GIT_EXECUTABLE git /usr/bin /usr/local/bin) - -IF (EXISTS ${GIT_EXECUTABLE}) - SET(GIT_FOUND 1) -ENDIF() diff -Nru luminance-hdr-2.3.0/cmake/FindLibRAW.cmake luminance-hdr-2.3.1/cmake/FindLibRAW.cmake --- luminance-hdr-2.3.0/cmake/FindLibRAW.cmake 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/FindLibRAW.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -21,6 +21,39 @@ SET( LIBRAW_LIBRARIES ${LIBRAW_LIBRARY} ) MESSAGE(STATUS "Found LibRAW (LIBRAW_INCLUDE_DIR = ${LIBRAW_INCLUDE_DIR})") MESSAGE(STATUS "Found LibRAW (LIBRAW_LIBRARIES = ${LIBRAW_LIBRARIES})") + IF(UNIX) + IF(APPLE) + EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/build/macosx/find_demosaicing_gpl2.sh + ${LIBRAW_LIBRARY} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE _output OUTPUT_STRIP_TRAILING_WHITESPACE) + ELSE() + EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/build/linux/find_demosaicing_gpl2.sh + ${LIBRAW_LIBRARY} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE _output OUTPUT_STRIP_TRAILING_WHITESPACE) + ENDIF() + IF(_output) + MESSAGE(STATUS "Found demosaicing pack GPL2") + ADD_DEFINITIONS("-DDEMOSAICING_GPL2") + ELSE(_output) + MESSAGE(STATUS "Demosaicing pack GPL2 not found") + ENDIF(_output) + + IF(APPLE) + EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/build/macosx/find_demosaicing_gpl3.sh + ${LIBRAW_LIBRARY} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE _output OUTPUT_STRIP_TRAILING_WHITESPACE) + ELSE() + EXECUTE_PROCESS(COMMAND ${CMAKE_SOURCE_DIR}/build/linux//find_demosaicing_gpl3.sh + ${LIBRAW_LIBRARY} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE _output OUTPUT_STRIP_TRAILING_WHITESPACE) + ENDIF() + IF(_output) + MESSAGE(STATUS "Found demosaicing pack GPL3") + ADD_DEFINITIONS("-DDEMOSAICING_GPL3") + ELSE(_output) + MESSAGE(STATUS "Demosaicing pack GPL3 not found") + ENDIF(_output) + ENDIF(UNIX) ELSE(LIBRAW_FOUND) MESSAGE(FATAL_ERROR "Could not find LibRAW") ENDIF(LIBRAW_FOUND) diff -Nru luminance-hdr-2.3.0/cmake/Findexiv2.cmake luminance-hdr-2.3.1/cmake/Findexiv2.cmake --- luminance-hdr-2.3.0/cmake/Findexiv2.cmake 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/Findexiv2.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -1,8 +1,8 @@ # - Try to find the Exiv2 library # -# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need +# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need # before doing FIND_PACKAGE(Exiv2). The default is 0.12. -# +# # Once done this will define # # EXIV2_FOUND - system has libexiv2 @@ -10,40 +10,71 @@ # EXIV2_LIBRARIES - Link these to use libexiv2 # EXIV2_DEFINITIONS - Compiler switches required for using libexiv2 # +# The minimum required version of Exiv2 can be specified using the +# standard syntax, e.g. find_package(Exiv2 0.17) +# +# For compatiblity, also the variable EXIV2_MIN_VERSION can be set to the minimum version +# you need before doing FIND_PACKAGE(Exiv2). The default is 0.12. +# Copyright (c) 2010, Alexander Neundorf, # Copyright (c) 2008, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# Support EXIV2_MIN_VERSION for compatibility: +if(NOT Exiv2_FIND_VERSION) + set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}") +endif(NOT Exiv2_FIND_VERSION) + +# the minimum version of exiv2 we require +if(NOT Exiv2_FIND_VERSION) + set(Exiv2_FIND_VERSION "0.12") +endif(NOT Exiv2_FIND_VERSION) + + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_EXIV2 QUIET exiv2) + set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER}) +endif (NOT WIN32) + + +find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp + HINTS + ${PC_EXIV2_INCLUDEDIR} + ${PC_EXIV2_INCLUDE_DIRS} + ) + +find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 + HINTS + ${PC_EXIV2_LIBDIR} + ${PC_EXIV2_LIBRARY_DIRS} + ) + + +# Get the version number from exiv2/version.hpp and store it in the cache: +if(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) + file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT) + string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") -FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exif.hpp - /usr/local/include - /usr/include - /opt/local/include -) - -SET(EXIV2_NAMES ${EXIV2_NAMES} exiv2) -FIND_LIBRARY(EXIV2_LIBRARY NAMES ${EXIV2_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set EXIV2_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXIV2 DEFAULT_MSG EXIV2_LIBRARY EXIV2_INCLUDE_DIR) - -IF(EXIV2_FOUND) - SET( EXIV2_LIBRARIES ${EXIV2_LIBRARY} ) - IF(NOT EXIV2_FIND_QUIETLY) - MESSAGE(STATUS "Found Exiv2 (EXIV2_LIBRARIES = ${EXIV2_LIBRARIES})") - MESSAGE(STATUS "Found Exiv2 (EXIV2_INCLUDE_DIR = ${EXIV2_INCLUDE_DIR})") - ENDIF(NOT EXIV2_FIND_QUIETLY) -ELSE(EXIV2_FOUND) - IF(EXIV2_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Exiv2") - ENDIF(EXIV2_FIND_REQUIRED) -ENDIF(EXIV2_FOUND) + set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE STRING "Version number of Exiv2" FORCE) +endif(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) +set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}") +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR + VERSION_VAR EXIV2_VERSION) -MARK_AS_ADVANCED(EXIV2_INCLUDE_DIR EXIV2_LIBRARY) +mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY) diff -Nru luminance-hdr-2.3.0/cmake/Findlibpng.cmake luminance-hdr-2.3.1/cmake/Findlibpng.cmake --- luminance-hdr-2.3.0/cmake/Findlibpng.cmake 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/Findlibpng.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -FIND_PATH(LIBPNG_INCLUDE_DIR png.h - /usr/local/include - /usr/include - /opt/local/include -) - -SET(LIBPNG_NAMES ${LIBPNG_NAMES} png) -FIND_LIBRARY(LIBPNG_LIBRARY NAMES ${LIBPNG_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set LIBPNG_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBPNG DEFAULT_MSG LIBPNG_LIBRARY LIBPNG_INCLUDE_DIR) - -IF(LIBPNG_FOUND) - SET( LIBPNG_LIBRARIES ${LIBPNG_LIBRARY} ) - IF(NOT LIBPNG_FIND_QUIETLY) - MESSAGE(STATUS "Found libpng (LIBPNG_LIBRARIES = ${LIBPNG_LIBRARIES})") - MESSAGE(STATUS "Found libpng (LIBPNG_INCLUDE_DIR = ${LIBPNG_INCLUDE_DIR})") - ENDIF(NOT LIBPNG_FIND_QUIETLY) -ELSE(LIBPNG_FOUND) - IF(LIBPNG_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find libpng") - ENDIF(LIBPNG_FIND_REQUIRED) -ENDIF(LIBPNG_FOUND) - - - -MARK_AS_ADVANCED(LIBPNG_INCLUDE_DIR LIBPNG_LIBRARY) - diff -Nru luminance-hdr-2.3.0/cmake/GlobalSettings.cmake luminance-hdr-2.3.1/cmake/GlobalSettings.cmake --- luminance-hdr-2.3.0/cmake/GlobalSettings.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/GlobalSettings.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,14 @@ +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 ) + + diff -Nru luminance-hdr-2.3.0/cmake/Internationalization.cmake luminance-hdr-2.3.1/cmake/Internationalization.cmake --- luminance-hdr-2.3.0/cmake/Internationalization.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/Internationalization.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,22 @@ +IF(APPLE) +# ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/../Resources/i18n") +SET(I18NDIR QCoreApplication::applicationDirPath\(\)+"/../Resources/i18n") +SET(HELPDIR QCoreApplication::applicationDirPath\(\)+"/../Resources/help") +ELSEIF(UNIX) +# ADD_DEFINITIONS(-DPREFIX=${CMAKE_INSTALL_PREFIX}) +# ADD_DEFINITIONS(-DI18NDIR="${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n") +SET(I18NDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n\"") +SET(HELPDIR "\"${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/help\"") +ELSEIF(WIN32) +# ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/i18n") +SET(I18NDIR QCoreApplication::applicationDirPath\(\)+"/i18n") +SET(HELPDIR QCoreApplication::applicationDirPath\(\)+"/help") +ENDIF() + +OPTION(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files (WARNING: make clean will delete the source .ts files! Danger!)") +OPTION(LUPDATE_NOOBSOLETE "While doing an lupdate, remove obsolete entries.") + +# Holds al the file that will be translated +SET(FILES_TO_TRANSLATE ) + +# add a function here that creates the translation when necessary diff -Nru luminance-hdr-2.3.0/cmake/Version.cmake luminance-hdr-2.3.1/cmake/Version.cmake --- luminance-hdr-2.3.0/cmake/Version.cmake 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/cmake/Version.cmake 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,14 @@ +SET(LHDR_NAME "Luminance HDR") +SET(LHDR_VERSION_MAJOR "2") +SET(LHDR_VERSION_MINOR "3") +SET(LHDR_VERSION_PATCH "1") +SET(LHDR_VERSION "${LHDR_VERSION_MAJOR}.${LHDR_VERSION_MINOR}.${LHDR_VERSION_PATCH}") +SET(LHDR_VENDOR "Luminance HDR Development Team") +SET(LHDR_COPYRIGHT_YEAR "2006-2013") + +SET(LHDR_OSX_EXECUTABLE_NAME "${LHDR_NAME} ${LHDR_VERSION}") +SET(LHDR_OSX_EXECUTABLE_TARGET "Luminance_HDR_${LHDR_VERSION}") + +SET(LHDR_DOMAIN_FIRST "luminance-hdr") +SET(LHDR_DOMAIN_SECOND "com") +SET(LHDR_DOMAIN "${LHDR_DOMAIN_FIRST}.${LHDR_DOMAIN_SECOND}") diff -Nru luminance-hdr-2.3.0/debian/README.Debian luminance-hdr-2.3.1/debian/README.Debian --- luminance-hdr-2.3.0/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/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.3.0/debian/README.source luminance-hdr-2.3.1/debian/README.source --- luminance-hdr-2.3.0/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/README.source 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,9 @@ +luminance for Debian +-------------------- + + + + + + diff -Nru luminance-hdr-2.3.0/debian/changelog luminance-hdr-2.3.1/debian/changelog --- luminance-hdr-2.3.0/debian/changelog 2013-01-12 10:07:14.000000000 +0000 +++ luminance-hdr-2.3.1/debian/changelog 2013-04-08 09:10:07.000000000 +0000 @@ -1,202 +1,101 @@ -luminance-hdr (2.3.0-3) unstable; urgency=low +luminance-hdr (2.3.1-1dhor~precise) precise; 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.
+  * 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~precise) precise; 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~precise) precise; 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~precise) precise; 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~precise) precise; 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~precise) precise; 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~precise) precise; 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
 
- -- 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.3.0/debian/compat luminance-hdr-2.3.1/debian/compat
--- luminance-hdr-2.3.0/debian/compat	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/debian/compat	2011-03-22 06:45:39.000000000 +0000
@@ -1 +1 @@
-9
+7
diff -Nru luminance-hdr-2.3.0/debian/control luminance-hdr-2.3.1/debian/control
--- luminance-hdr-2.3.0/debian/control	2013-01-12 09:59:24.000000000 +0000
+++ luminance-hdr-2.3.1/debian/control	2013-04-08 09:16:32.000000000 +0000
@@ -1,41 +1,17 @@
 Source: luminance-hdr
 Section: graphics
 Priority: extra
-Maintainer: Debian PhotoTools Maintainers 
-Uploaders: Andreas Metzler ,
- Leonardo Montecchi 
-Build-Depends: debhelper (>= 9), libqt4-dev, libexiv2-dev, libfftw3-dev,
- libopenexr-dev, libtiff-dev, cmake (>= 2.6.0), libqtwebkit-dev, libraw-dev,
- libgsl0-dev, libpng-dev, liblcms2-dev, libjpeg-dev
-Standards-Version: 3.9.4
+Maintainer: Dariusz Duma 
+Build-Depends: debhelper (>= 7.0.50~), cmake, libqt4-dev, qt4-qmake, libexiv2-dev, libopenexr-dev, libfftw3-dev, libtiff4-dev, libraw-dev, qt4-dev-tools, libgsl0-dev, libqtwebkit-dev, libpng12-dev, libboost-dev
+Standards-Version: 3.8.4
 Homepage: http://qtpfsgui.sourceforge.net/
-Vcs-Browser: http://git.debian.org/?p=pkg-phototools/luminance-hdr.git
-Vcs-Git: git://git.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: ${shlibs:Depends}, ${misc:Depends}, dcraw, libqt4-sql-sqlite, hugin-tools
-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}, libqt4-sql-sqlite
+Description: HDR image creator
+ Luminance HDR is a graphical user interface (based on trolltech's Qt4) that
+ provides a workflow for HDR imaging.
 
-Package: qtpfsgui
-Architecture: all
-Depends: luminance-hdr, ${misc:Depends}
-Section: oldlibs
-Description: luminance-hdr transitional package
- Empty package to facilitate upgrades, can be safely removed.
diff -Nru luminance-hdr-2.3.0/debian/copyright luminance-hdr-2.3.1/debian/copyright
--- luminance-hdr-2.3.0/debian/copyright	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/debian/copyright	2011-03-22 06:45:39.000000000 +0000
@@ -1,216 +1,37 @@
-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.
-
-It was downloaded from 
-
-Upstream Authors:
-
-  Main developer, improvements, bug fixing
-  Davide Anastasia (Lead Project Mantainer & Mac OS X support) 
-  Franco Comida 
-  Daniel Kaneider (windows setup, head of i18n efforts)
-  Bruce Guenter
-
-  Contributors:
-  Christian Raue (German Translator)
-
-  Mandus (Norwegian translator)
-  Nicholas Phillips (MTB alignment code)
-  Mustafa GÜNAY (Turkish translator)
-  Douglas E. Warner (fc6 packager and bug reports)
-  Jan Gemela (Cezk translator)
-  Peter Gaal (Hungarian translator)
-  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
-  Antoine Latter
-  Markus Schmaus (found and fixed bug in Debevec and Robertson02)
+This work was packaged for Debian by:
 
-  Original author:
-  Giuseppe Rota 
+    Dariusz Duma  on Tue, 22 Mar 2011 07:45:36 +0100
 
+It was downloaded from:
 
-Copyright:
+    
+
+Upstream Author(s):
 
-  Copyright (c) 2000 The NetBSD Foundation, Inc.
-  Copyright (C) 2002-2005 Nicholas Phillips
-  Copyright (C) 2002-2007 Nicholas Phillips
-  Copyright (C) 2003,2004,2005,2006,2007 Rafal Mantiuk and Grzegorz Krawczyk
-  Copyright (C) 2003,2004 Grzegorz Krawczyk
-  Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk
-  Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk, Alexander Efremov
-  Copyright (C) 2003-2007 Grzegorz Krawczyk
-  Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk
-  Copyright (C) 2003-2008 Rafal Mantiuk
-  Copyright (C) 2004 by Craig Bradney
-  Copyright (C) 2004 Grzegorz Krawczyk
-  Copyright (C) 2005-2007 Trolltech ASA. All rights reserved.
-  Copyright (C) 2005 by Petr Vanek
-  Copyright (C) 2006,2007,2008 Giuseppe Rota
-  Copyright (C) 2006-2007 Giuseppe Rota
-  Copyright (C) 2006,2007 Giuseppe Rota
-  Copyright (C) 2006-2008 Giuseppe Rota
-  Copyright (C) 2006-2010, Giuseppe Rota 
-  Copyright (C) 2006 Davide Anastasia
-  Copyright (C) 2006 Giuseppe Rota
-  Copyright (C) 2007 by Nicholas Phillips
-  Copyright (C) 2007 Giuseppe Rota
-  Copyright (C) 2007 Grzegorz Krawczyk
-  Copyright (c) 2007 John Resig (jquery.com)
-  Copyright (C) 2008,2007 Giuseppe Rota
-  Copyright (c) 2008, Gilles Caulier, 
-  Copyright (C) 2008 Giuseppe Rota
-  Copyright (C) 2009 Franco Comida
-  Copyright (C) 2010, 2011 Davide Anastasia
-  Copyright (C) 2010 Davide Anastasia
-  Copyright (C) 2010 Davide Anastasia (Luminance HDR)
-  Copyright (C) 2010 Elizabeth Oldham
-  Copyright (C) 2010 Franco Comida
-  Copyright (C) 2011 Davide Anastasia
-  Copyright (C) 2011 Franco Comida
-  Copyright (C) 2012 Davide Anastasia
-  Copyright Iowa State University 2009-2010.
-  Pierre Marchand , (C) 2008
+    
+    
 
+Copyright:
+
+    
+    
 
 License:
 
- 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
-
-On Debian systems, the complete text of the GNU General Public License
-version 2 can be found in “/usr/share/common-licenses/GPL-2”.
-
-The Debian packaging is licensed under the GPL, see above:
- © 2007-2008 Cyril Brulebois 
-
-
-Files: src/arch/msvc/getopt_win32.c
-Copyright: 2000 The NetBSD Foundation, Inc.
-License: All rights reserved.
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
-
-
-Files: src/arch/msvc/getopt_win32.h
-Copyright: 1987, 1993, 1994, 1996 The Regents of the University of
- California.
-License: All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *  This product includes software developed by the University of
- *  California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
-
-Files: src/Libpfs/array2d.cpp src/Libpfs/array2d.h src/Libpfs/channel.cpp
- src/Libpfs/channel.h src/Libpfs/domio.cpp src/Libpfs/domio.h
- src/Libpfs/frame.cpp src/Libpfs/frame.h src/Libpfs/tag.cpp
- src/Libpfs/tag.h
-Copyright: Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk
- Copyright (C) 2011 Davide Anastasia
-License: LGPL-2.1+
-
-
-Files: src/Libpfs/colorspace.cpp src/Libpfs/colorspace.h
- src/Libpfs/pfs.h 
-Copyright: Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk
-License: LGPL-2.1+
-
-
-
-Files: src/HelpBrowser/schelptreemodel.cpp src/HelpBrowser/schelptreemodel.h
- src/HelpBrowser/treeitem.cpp src/HelpBrowser/treeitem.h
- src/HelpBrowser/treemodel.cpp src/HelpBrowser/treemodel.h
-Copyright: Copyright (C) 2005-2007 Trolltech ASA. All rights reserved.
-License: GPL-2.0
-Comment: These have been relicensed to 3-clause BSD in later QT releases.
-
-
-Files: src/TonemappingOperators/reinhard02/*
-Comment: Source code courtesy of Erik Reinhard
-  File taken from:
-  http://www.cs.utah.edu/~reinhard/cdrom/source.html
-  Port to PFS tools library by Grzegorz Krawczyk 
-
-Files: src/MainCli/ezETAProgressBar.hpp
-Copyright: Copyright (C) 2011 Remik Ziemlinski
-License: GPL-3+
-Comment: File taken from ezProgressBar
-
-Files: src/OsIntegration/ecwin7.cpp src/OsIntegration/ecwin7.h
-Copyright: Copyright (C) 2010 Emanuele Colombo
-License: GPL-2+
-Comment: EcWin7 - Support library for integrating Windows 7 taskbar features
-
-Files: src/TonemappingOperators/fattal02/pde_fft.cpp
-Copyright: Tino Kluge (tino.kluge@hrz.tu-chemnitz.de)
-License: GPL-2+
-Comment: License header added in upstream GIT post 2.3.0.
+    
+
+The Debian packaging is:
+
+    Copyright (C) 2011 Dariusz Duma 
+
+# 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.
+
+and is licensed under the GPL version 3,
+see "/usr/share/common-licenses/GPL-3".
+
+# 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.3.0/debian/doc-base luminance-hdr-2.3.1/debian/doc-base
--- luminance-hdr-2.3.0/debian/doc-base	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/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.3.0/debian/docs luminance-hdr-2.3.1/debian/docs
--- luminance-hdr-2.3.0/debian/docs	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/debian/docs	2011-03-22 06:45:39.000000000 +0000
@@ -1,3 +1,3 @@
-AUTHORS
+BUGS
 README
 TODO
diff -Nru luminance-hdr-2.3.0/debian/emacsen-install.ex luminance-hdr-2.3.1/debian/emacsen-install.ex
--- luminance-hdr-2.3.0/debian/emacsen-install.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/emacsen-install.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/luminance
+
+# Written by Jim Van Zandt , borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+#  and octave by Dirk Eddelbuettel .
+
+FLAVOR=$1
+PACKAGE=luminance
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+#    SITEFLAG="-no-site-file"
+#else
+#    SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+    echo install/${PACKAGE}: install Info links for ${FLAVOR}
+    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff -Nru luminance-hdr-2.3.0/debian/emacsen-remove.ex luminance-hdr-2.3.1/debian/emacsen-remove.ex
--- luminance-hdr-2.3.0/debian/emacsen-remove.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/emacsen-remove.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/luminance
+
+FLAVOR=$1
+PACKAGE=luminance
+
+if [ ${FLAVOR} != emacs ]; then
+    if test -x /usr/sbin/install-info-altdir; then
+        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/luminance.info.gz
+    fi
+
+    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff -Nru luminance-hdr-2.3.0/debian/emacsen-startup.ex luminance-hdr-2.3.1/debian/emacsen-startup.ex
--- luminance-hdr-2.3.0/debian/emacsen-startup.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/emacsen-startup.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,25 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50luminance.el
+;; for the Debian luminance package
+;;
+;; Originally contributed by Nils Naumann 
+;; Modified by Dirk Eddelbuettel 
+;; Adapted for dh-make by Jim Van Zandt 
+
+;; The luminance package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...).  The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+                           (symbol-name flavor)
+                           "/site-lisp/luminance")))
+;; If package-dir does not exist, the luminance package must have
+;; removed but not purged, and we should skip the setup.
+  (when (file-directory-p package-dir)
+    (setq load-path (cons package-dir load-path))
+    (autoload 'luminance-mode "luminance-mode"
+      "Major mode for editing luminance files." t)
+    (add-to-list 'auto-mode-alist '("\\.luminance$" . luminance-mode))))
+
diff -Nru luminance-hdr-2.3.0/debian/init.d.ex luminance-hdr-2.3.1/debian/init.d.ex
--- luminance-hdr-2.3.0/debian/init.d.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/init.d.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,154 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          luminance
+# Required-Start:    $network $local_fs
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: 
+# Description:       
+#                    <...>
+#                    <...>
+### END INIT INFO
+
+# Author: Dariusz Duma 
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC=luminance             # Introduce a short description here
+NAME=luminance             # Introduce the short server's name here
+DAEMON=/usr/sbin/luminance # Introduce the server's location here
+DAEMON_ARGS=""             # Arguments to run the daemon with
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	#
+	# If the daemon can reload its configuration without
+	# restarting (for example, when it is sent a SIGHUP),
+	# then implement that here.
+	#
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  #reload|force-reload)
+	#
+	# If do_reload() is not implemented then leave this commented out
+	# and leave 'force-reload' as an alias for 'restart'.
+	#
+	#log_daemon_msg "Reloading $DESC" "$NAME"
+	#do_reload
+	#log_end_msg $?
+	#;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
diff -Nru luminance-hdr-2.3.0/debian/links luminance-hdr-2.3.1/debian/links
--- luminance-hdr-2.3.0/debian/links	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/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.3.0/debian/luminance-hdr-cli.1 luminance-hdr-2.3.1/debian/luminance-hdr-cli.1
--- luminance-hdr-2.3.0/debian/luminance-hdr-cli.1	2013-01-12 09:59:24.000000000 +0000
+++ luminance-hdr-2.3.1/debian/luminance-hdr-cli.1	1970-01-01 00:00:00.000000000 +0000
@@ -1,81 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.10.
-.TH LUMINANCE-HDR-CLI "1" "November 2012" "luminance-hdr-cli 2.3.0" "User Commands"
-.SH NAME
-luminance-hdr-cli \- manual page for luminance-hdr-cli 2.3.0
-.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).
-.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
-(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)
-contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06)
-colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08)
-localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin)
-sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand)
-bias=VALUE (for drago)
-local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik)
-scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02)
-brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05)
-(default is contrast=0.3:equalization=false:saturation=1.8, see also \fB\-o\fR)
-.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).
-(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"
-The full documentation for
-.B luminance-hdr-cli
-is maintained as a Texinfo manual.  If the
-.B info
-and
-.B luminance-hdr-cli
-programs are properly installed at your site, the command
-.IP
-.B info luminance-hdr-cli
-.PP
-should give you access to the complete manual.
diff -Nru luminance-hdr-2.3.0/debian/luminance-hdr.pod luminance-hdr-2.3.1/debian/luminance-hdr.pod
--- luminance-hdr-2.3.0/debian/luminance-hdr.pod	2012-07-14 08:46:52.000000000 +0000
+++ luminance-hdr-2.3.1/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.3.0/debian/luminance.cron.d.ex luminance-hdr-2.3.1/debian/luminance.cron.d.ex
--- luminance-hdr-2.3.0/debian/luminance.cron.d.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/luminance.cron.d.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the luminance package
+#
+0 4	* * *	root	[ -x /usr/bin/luminance_maintenance ] && /usr/bin/luminance_maintenance
diff -Nru luminance-hdr-2.3.0/debian/luminance.default.ex luminance-hdr-2.3.1/debian/luminance.default.ex
--- luminance-hdr-2.3.0/debian/luminance.default.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/luminance.default.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,10 @@
+# Defaults for luminance initscript
+# sourced by /etc/init.d/luminance
+# installed at /etc/default/luminance by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=""
diff -Nru luminance-hdr-2.3.0/debian/luminance.doc-base.EX luminance-hdr-2.3.1/debian/luminance.doc-base.EX
--- luminance-hdr-2.3.0/debian/luminance.doc-base.EX	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/luminance.doc-base.EX	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,20 @@
+Document: luminance
+Title: Debian luminance Manual
+Author: 
+Abstract: This manual describes what luminance is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/luminance/luminance.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/luminance/luminance.ps.gz
+
+Format: text
+Files: /usr/share/doc/luminance/luminance.text.gz
+
+Format: HTML
+Index: /usr/share/doc/luminance/html/index.html
+Files: /usr/share/doc/luminance/html/*.html
diff -Nru luminance-hdr-2.3.0/debian/manpage.1.ex luminance-hdr-2.3.1/debian/manpage.1.ex
--- luminance-hdr-2.3.0/debian/manpage.1.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/manpage.1.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,59 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH LUMINANCE SECTION "March 22, 2011"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp     insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+luminance \- program to do something
+.SH SYNOPSIS
+.B luminance
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B luminance
+and
+.B bar
+commands.
+.PP
+.\" TeX users may be more comfortable with the \fB\fP and
+.\" \fI\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBluminance\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+luminance was written by .
+.PP
+This manual page was written by Dariusz Duma ,
+for the Debian project (and may be used by others).
diff -Nru luminance-hdr-2.3.0/debian/manpage.sgml.ex luminance-hdr-2.3.1/debian/manpage.sgml.ex
--- luminance-hdr-2.3.0/debian/manpage.sgml.ex	1970-01-01 00:00:00.000000000 +0000
+++ luminance-hdr-2.3.1/debian/manpage.sgml.ex	2011-03-22 06:45:39.000000000 +0000
@@ -0,0 +1,154 @@
+ manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+
+
+	The docbook-to-man binary is found in the docbook-to-man package.
+	Please remember that if you create the nroff version in one of the
+	debian/rules file targets (such as build), you will need to include
+	docbook-to-man in your Build-Depends control field.
+
+  -->
+
+  
+  FIRSTNAME">
+  SURNAME">
+  
+  March 22, 2011">
+  
+  SECTION">
+  dhor@toxic.net.pl">
+  
+  LUMINANCE">
+  
+
+  Debian">
+  GNU">
+  GPL">
+]>
+
+
+  
+    
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (and may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + diff -Nru luminance-hdr-2.3.0/debian/manpage.xml.ex luminance-hdr-2.3.1/debian/manpage.xml.ex --- luminance-hdr-2.3.0/debian/manpage.xml.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/manpage.xml.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,291 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A typical entry +in a Makefile or Makefile.am is: + +DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl +XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" + +manpage.1: manpage.xml + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The XSL files are in +docbook-xsl. A description of the parameters you can use can be found in the +docbook-xsl-doc-* packages. Please remember that if you create the nroff +version in one of the debian/rules file targets (such as build), you will need +to include xsltproc and docbook-xsl in your Build-Depends control field. +Alternatively use the xmlto command/package. That will also automatically +pull in xsltproc and docbook-xsl. + +Notes for using docbook2x: docbook2x-man does not automatically create the +AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as + ... . + +To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections +read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be +found in the docbook-xsl-doc-html package. + +Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` + +General documentation about man-pages and man-page-formatting: +man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ + +--> + + + + + + + + + + + + + +]> + + + + &dhtitle; + &dhpackage; + + + &dhfirstname; + &dhsurname; + Wrote this manpage for the Debian system. +
+ &dhemail; +
+
+
+ + 2007 + &dhusername; + + + This manual page was written for the Debian system + (and may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
+ + &dhucpackage; + &dhsection; + + + &dhpackage; + program to do something + + + + &dhpackage; + + + + + + + + + this + + + + + + + + this + that + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + DESCRIPTION + This manual page documents briefly the + &dhpackage; and bar + commands. + This manual page was written for the Debian distribution + because the original program does not have a manual page. + Instead, it has documentation in the GNU + info + 1 + format; see below. + &dhpackage; is a program that... + + + OPTIONS + The program follows the usual GNU command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + + info + 1 + files. + + + + + + + Does this and that. + + + + + + + Show summary of options. + + + + + + + Show version of program. + + + + + + FILES + + + /etc/foo.conf + + The system-wide configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + ${HOME}/.foo.conf + + The per-user configuration file to control the + behaviour of &dhpackage;. See + + foo.conf + 5 + for further details. + + + + + + ENVIONMENT + + + FOO_CONF + + If used, the defined file is used as configuration + file (see also ). + + + + + + DIAGNOSTICS + The following diagnostics may be issued + on stderr: + + + Bad configuration file. Exiting. + + The configuration file seems to contain a broken configuration + line. Use the option, to get more info. + + + + + &dhpackage; provides some return codes, that can + be used in scripts: + + Code + Diagnostic + + 0 + Program exited successfully. + + + 1 + The configuration file seems to be broken. + + + + + + BUGS + The program is currently limited to only work + with the foobar library. + The upstreams BTS can be found + at . + + + SEE ALSO + + + bar + 1 + , + baz + 1 + , + foo.conf + 5 + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + info + 1 + system. + +
+ diff -Nru luminance-hdr-2.3.0/debian/manpages luminance-hdr-2.3.1/debian/manpages --- luminance-hdr-2.3.0/debian/manpages 2013-01-12 09:58:46.000000000 +0000 +++ luminance-hdr-2.3.1/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.3.0/debian/menu luminance-hdr-2.3.1/debian/menu --- luminance-hdr-2.3.0/debian/menu 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -?package(luminance-hdr):needs="X11" section="Applications/Graphics"\ - title="luminance-hdr" command="/usr/bin/luminance-hdr" diff -Nru luminance-hdr-2.3.0/debian/menu.ex luminance-hdr-2.3.1/debian/menu.ex --- luminance-hdr-2.3.0/debian/menu.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/menu.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,2 @@ +?package(luminance):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="luminance" command="/usr/bin/luminance" diff -Nru luminance-hdr-2.3.0/debian/patches/10_remove_encoding_from_desktop_file luminance-hdr-2.3.1/debian/patches/10_remove_encoding_from_desktop_file --- luminance-hdr-2.3.0/debian/patches/10_remove_encoding_from_desktop_file 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/patches/10_remove_encoding_from_desktop_file 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -Author: Cyril Brulebois -Description: Drop deprecated encoding field. - UTF-8 is the default value for encoding, the field is marked deprecated. -Last-Update: 2012-05-12 - -diff -Nurbbp luminance-hdr-2.2.1.orig/luminance-hdr.desktop luminance-hdr-2.2.1/luminance-hdr.desktop ---- luminance-hdr-2.2.1.orig/luminance-hdr.desktop 2012-03-11 21:13:12.000000000 +0100 -+++ luminance-hdr-2.2.1/luminance-hdr.desktop 2012-05-12 18:32:53.000000000 +0200 -@@ -1,5 +1,4 @@ - [Desktop Entry] --Encoding=UTF-8 - Name=Luminance HDR - GenericName=HDR imaging tool - GenericName[de]=Workflow für HDR-Bilder diff -Nru luminance-hdr-2.3.0/debian/patches/20_usrsharedoc.diff luminance-hdr-2.3.1/debian/patches/20_usrsharedoc.diff --- luminance-hdr-2.3.0/debian/patches/20_usrsharedoc.diff 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/patches/20_usrsharedoc.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +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 -Last-Update: 2012-05-12 - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -260,8 +260,8 @@ - ${CMAKE_SOURCE_DIR}/README - ${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 - # Microsoft Windows - ELSEIF(WIN32) - # icon files to copy in the bundle ---- a/CMakeGlobal.txt -+++ b/CMakeGlobal.txt -@@ -11,7 +11,7 @@ - #ADD_DEFINITIONS(-DPREFIX=${CMAKE_INSTALL_PREFIX}) - #ADD_DEFINITIONS(-DI18NDIR="${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n") - 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\"") - ELSEIF(WIN32) - #ADD_DEFINITIONS(-DI18NDIR=QCoreApplication::applicationDirPath\(\)+"/i18n") - SET(I18NDIR QCoreApplication::applicationDirPath\(\)+"/i18n") diff -Nru luminance-hdr-2.3.0/debian/patches/series luminance-hdr-2.3.1/debian/patches/series --- luminance-hdr-2.3.0/debian/patches/series 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -10_remove_encoding_from_desktop_file -20_usrsharedoc.diff diff -Nru luminance-hdr-2.3.0/debian/postinst.ex luminance-hdr-2.3.1/debian/postinst.ex --- luminance-hdr-2.3.0/debian/postinst.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/postinst.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,39 @@ +#!/bin/sh +# postinst script for luminance +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru luminance-hdr-2.3.0/debian/postrm.ex luminance-hdr-2.3.1/debian/postrm.ex --- luminance-hdr-2.3.0/debian/postrm.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/postrm.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,37 @@ +#!/bin/sh +# postrm script for luminance +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru luminance-hdr-2.3.0/debian/preinst.ex luminance-hdr-2.3.1/debian/preinst.ex --- luminance-hdr-2.3.0/debian/preinst.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/preinst.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/sh +# preinst script for luminance +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru luminance-hdr-2.3.0/debian/prerm.ex luminance-hdr-2.3.1/debian/prerm.ex --- luminance-hdr-2.3.0/debian/prerm.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/prerm.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for luminance +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru luminance-hdr-2.3.0/debian/rules luminance-hdr-2.3.1/debian/rules --- luminance-hdr-2.3.0/debian/rules 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/rules 2012-03-25 09:31:27.000000000 +0000 @@ -1,28 +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 INSTALL LICENSE README Changelog -DEB_DESTDIR = $(CURDIR)/debian/luminance-hdr -MANPAGE = debian/luminance-hdr.1 - -export DEB_BUILD_MAINT_OPTIONS=hardening=+relro,+bindnow -export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed - -override_dh_auto_build: - # Normal auto_build: - dh_auto_build --verbose - # Build the minimal manpage: - pod2man --center='Minimal luminance-hdr manpage' \ - --release='' \ - 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 - cd "$(DEB_DESTDIR)" && rm -rv usr/share/doc/luminance-hdr/help/js/ %: - dh $@ + 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.3.0/debian/watch luminance-hdr-2.3.1/debian/watch --- luminance-hdr-2.3.0/debian/watch 2012-07-14 08:46:52.000000000 +0000 +++ luminance-hdr-2.3.1/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -version=3 - -http://sf.net/qtpfsgui/luminance-hdr-([0-9.]+)\.tar\.bz2 diff -Nru luminance-hdr-2.3.0/debian/watch.ex luminance-hdr-2.3.1/debian/watch.ex --- luminance-hdr-2.3.0/debian/watch.ex 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/debian/watch.ex 2011-03-22 06:45:39.000000000 +0000 @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php luminance-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/luminance-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/luminance-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/luminance/luminance-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html luminance-(.*)\.tar\.gz diff -Nru luminance-hdr-2.3.0/help/js/jquery.js luminance-hdr-2.3.1/help/js/jquery.js --- luminance-hdr-2.3.0/help/js/jquery.js 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/help/js/jquery.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -/* - * jQuery 1.2.2 - New Wave Javascript - * - * Copyright (c) 2007 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-01-14 17:56:07 -0500 (Mon, 14 Jan 2008) $ - * $Rev: 4454 $ - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.19)L w=1e.19;L E=1e.19=J(a,b){K 1D E.2m.4Y(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1i=E.2m={4Y:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1v d=="25"){L c=u.39(d);7(c&&(c[1]||!b)){7(c[1])d=E.5c([c[1]],b);N{L a=T.5N(c[3]);7(a)7(a.2s!=c[3])K E().2r(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1D E(b).2r(d)}N 7(E.1q(d))K 1D E(T)[E.1i.21?"21":"43"](d);K 6.6G(d.1n==1N&&d||(d.5j||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2H(d)||[d])},5j:"1.2.2",82:J(){K 6.M},M:0,22:J(a){K a==10?E.2H(6):6[a]},2E:J(b){L a=E(b);a.56=6;K a},6G:J(a){6.M=0;1N.2m.1h.1j(6,a);K 6},V:J(a,b){K E.V(6,a,b)},5E:J(b){L a=-1;6.V(J(i){7(6==b)a=i});K a},1K:J(c,a,b){L d=c;7(c.1n==4d)7(a==10)K 6.M&&E[b||"1K"](6[0],c)||10;N{d={};d[c]=a}K 6.V(J(i){P(c 1r d)E.1K(b?6.Y:6,c,E.1l(6,d[c],b,i,c))})},1m:J(b,a){7((b==\'29\'||b==\'1P\')&&2M(a)<0)a=10;K 6.1K(b,a,"2q")},1t:J(b){7(1v b!="4D"&&b!=W)K 6.4B().3t((6[0]&&6[0].2u||T).5v(b));L a="";E.V(b||6,J(){E.V(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6M:E.1i.1t([6])})});K a},5r:J(b){7(6[0])E(b,6[0].2u).5J().3n(6[0]).2a(J(){L a=6;2e(a.1B)a=a.1B;K a}).3t(6);K 6},8t:J(a){K 6.V(J(){E(6).6C().5r(a)})},8m:J(a){K 6.V(J(){E(6).5r(a)})},3t:J(){K 6.3P(1a,R,S,J(a){7(6.15==1)6.3k(a)})},6s:J(){K 6.3P(1a,R,R,J(a){7(6.15==1)6.3n(a,6.1B)})},6o:J(){K 6.3P(1a,S,S,J(a){6.1b.3n(a,6)})},5a:J(){K 6.3P(1a,S,R,J(a){6.1b.3n(a,6.2J)})},3h:J(){K 6.56||E([])},2r:J(b){L c=E.2a(6,J(a){K E.2r(b,a)});K 6.2E(/[^+>] [^+>]/.17(b)||b.1g("..")>-1?E.57(c):c)},5J:J(e){L f=6.2a(J(){7(E.14.1d&&!E.3W(6)){L a=6.6c(R),5u=T.2R("1u"),4T=T.2R("1u");5u.3k(a);4T.38=5u.38;K 4T.1B}N K 6.6c(R)});L d=f.2r("*").4R().V(J(){7(6[F]!=10)6[F]=W});7(e===R)6.2r("*").4R().V(J(i){7(6.15==3)K;L c=E.Q(6,"2N");P(L a 1r c)P(L b 1r c[a])E.16.1c(d[i],a,c[a][b],c[a][b].Q)});K f},1F:J(b){K 6.2E(E.1q(b)&&E.3x(6,J(a,i){K b.1O(a,i)})||E.3d(b,6))},4I:J(b){7(b.1n==4d)7(G.17(b))K 6.2E(E.3d(b,6,R));N b=E.3d(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1F(J(){K a?E.35(6,b)<0:6!=b})},1c:J(a){K!a?6:6.2E(E.34(6.22(),a.1n==4d?E(a).22():a.M!=10&&(!a.12||E.12(a,"3i"))?a:[a]))},3K:J(a){K a?E.3d(a,6).M>0:S},7g:J(a){K 6.3K("."+a)},5P:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2y")){L e=c.44,5L=[],11=c.11,30=c.U=="2y-30";7(e<0)K W;P(L i=30?e:0,2b=30?e+1:11.M;i<2b;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9s.1C.9o?d.1t:d.1C;7(30)K b;5L.1h(b)}}K 5L}N K(6[0].1C||"").1p(/\\r/g,"")}K 10}K 6.V(J(){7(6.15!=1)K;7(b.1n==1N&&/5w|5y/.17(6.U))6.3o=(E.35(6.1C,b)>=0||E.35(6.37,b)>=0);N 7(E.12(6,"2y")){L a=b.1n==1N?b:[b];E("90",6).V(J(){6.2p=(E.35(6.1C,a)>=0||E.35(6.1t,a)>=0)});7(!a.M)6.44=-1}N 6.1C=b})},3q:J(a){K a==10?(6.M?6[0].38:W):6.4B().3t(a)},6P:J(a){K 6.5a(a).1Y()},6N:J(i){K 6.2V(i,i+1)},2V:J(){K 6.2E(1N.2m.2V.1j(6,1a))},2a:J(b){K 6.2E(E.2a(6,J(a,i){K b.1O(a,i,a)}))},4R:J(){K 6.1c(6.56)},3P:J(g,f,h,d){L e=6.M>1,3m;K 6.V(J(){7(!3m){3m=E.5c(g,6.2u);7(h)3m.8I()}L b=6;7(f&&E.12(6,"1V")&&E.12(3m[0],"4x"))b=6.3V("1S")[0]||6.3k(6.2u.2R("1S"));L c=E([]);E.V(3m,J(){L a=e?E(6).5J(R)[0]:6;7(E.12(a,"1o")){c=c.1c(a)}N{7(a.15==1)c=c.1c(E("1o",a).1Y());d.1O(b,a)}});c.V(6D)})}};E.2m.4Y.2m=E.2m;J 6D(i,a){7(a.3R)E.3Q({1f:a.3R,3l:S,1G:"1o"});N E.5l(a.1t||a.6A||a.38||"");7(a.1b)a.1b.2X(a)}E.1s=E.1i.1s=J(){L b=1a[0]||{},i=1,M=1a.M,5i=S,11;7(b.1n==8f){5i=b;b=1a[1]||{};i=2}7(1v b!="4D"&&1v b!="J")b={};7(M==1){b=6;i=0}P(;i-1}},6e:J(b,c,a){L e={};P(L d 1r c){e[d]=b.Y[d];b.Y[d]=c[d]}a.1O(b);P(L d 1r c)b.Y[d]=e[d]},1m:J(d,e,c){7(e=="29"||e=="1P"){L b,3S={3C:"4Z",4X:"23",18:"3u"},3r=e=="29"?["7P","7M"]:["7L","7K"];J 4S(){b=e=="29"?d.7J:d.7I;L a=0,3a=0;E.V(3r,J(){a+=2M(E.2q(d,"7H"+6,R))||0;3a+=2M(E.2q(d,"3a"+6+"62",R))||0});b-=1Z.7E(a+3a)}7(E(d).3K(":4b"))4S();N E.6e(d,3S,4S);K 1Z.2b(0,b)}K E.2q(d,e,c)},2q:J(e,k,j){L d;J 3y(b){7(!E.14.26)K S;L a=T.4a.4L(b,W);K!a||a.4K("3y")==""}7(k=="1y"&&E.14.1d){d=E.1K(e.Y,"1y");K d==""?"1":d}7(E.14.2B&&k=="18"){L c=e.Y.18;e.Y.18="3u";e.Y.18=c}7(k.1E(/4c/i))k=y;7(!j&&e.Y&&e.Y[k])d=e.Y[k];N 7(T.4a&&T.4a.4L){7(k.1E(/4c/i))k="4c";k=k.1p(/([A-Z])/g,"-$1").2w();L h=T.4a.4L(e,W);7(h&&!3y(e))d=h.4K(k);N{L f=[],2L=[];P(L a=e;a&&3y(a);a=a.1b)2L.4U(a);P(L i=0;i<2L.M;i++)7(3y(2L[i])){f[i]=2L[i].Y.18;2L[i].Y.18="3u"}d=k=="18"&&f[2L.M-1]!=W?"2D":(h&&h.4K(k))||"";P(L i=0;i]*?)\\/>/g,J(b,a,c){K c.1E(/^(7k|7h|5Q|7f|48|5O|a3|3v|9Y|9W|9T)$/i)?b:a+">"});L f=E.3f(d).2w(),1u=h.2R("1u");L e=!f.1g("<9R")&&[1,"<2y 78=\'78\'>",""]||!f.1g("<9O")&&[1,"<77>",""]||f.1E(/^<(9K|1S|9I|9F|9A)/)&&[1,"<1V>",""]||!f.1g("<4x")&&[2,"<1V><1S>",""]||(!f.1g("<9y")||!f.1g("<9v"))&&[3,"<1V><1S><4x>",""]||!f.1g("<5Q")&&[2,"<1V><1S><76>",""]||E.14.1d&&[1,"1u<1u>",""]||[0,"",""];1u.38=e[1]+d+e[2];2e(e[0]--)1u=1u.5D;7(E.14.1d){L g=!f.1g("<1V")&&f.1g("<1S")<0?1u.1B&&1u.1B.3p:e[1]=="<1V>"&&f.1g("<1S")<0?1u.3p:[];P(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1S")&&!g[j].3p.M)g[j].1b.2X(g[j]);7(/^\\s/.17(d))1u.3n(h.5v(d.1E(/^\\s*/)[0]),1u.1B)}d=E.2H(1u.3p)}7(d.M===0&&(!E.12(d,"3i")&&!E.12(d,"2y")))K;7(d[0]==10||E.12(d,"3i")||d.11)k.1h(d);N k=E.34(k,d)});K k},1K:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3W(d)?{}:E.3S;7(e=="2p"&&E.14.26)d.1b.44;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="Y")K E.1K(d.Y,"9r",c);N 7(c==10&&E.14.1d&&E.12(d,"3i")&&(e=="9q"||e=="9p"))K d.9n(e).6M;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"48")&&d.1b)6Z"U 9i 9g\'t 9b 9a";d.99(e,""+c)}7(E.14.1d&&/6T|3R/.17(e)&&!E.3W(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1y"&&E.14.1d){7(c!=10){d.6q=1;d.1F=(d.1F||"").1p(/6W\\([^)]*\\)/,"")+(2M(c).3D()=="93"?"":"6W(1y="+c*6S+")")}K d.1F&&d.1F.1g("1y=")>=0?(2M(d.1F.1E(/1y=([^)]*)/)[1])/6S).3D():""}e=e.1p(/-([a-z])/92,J(a,b){K b.2F()});7(c!=10)d[e]=c;K d[e]}},3f:J(a){K(a||"").1p(/^\\s+|\\s+$/g,"")},2H:J(b){L a=[];7(1v b!="91")P(L i=0,M=b.M;i*",6).1Y();2e(6.1B)6.2X(6.1B)}},J(a,b){E.1i[a]=J(){K 6.V(b,1a)}});E.V(["8e","62"],J(i,c){L b=c.2w();E.1i[b]=J(a){K 6[0]==1e?E.14.2B&&T.1k["5h"+c]||E.14.26&&1e["8d"+c]||T.6I=="6H"&&T.1I["5h"+c]||T.1k["5h"+c]:6[0]==T?1Z.2b(1Z.2b(T.1k["5g"+c],T.1I["5g"+c]),1Z.2b(T.1k["5f"+c],T.1I["5f"+c])):a==10?(6.M?E.1m(6[0],b):W):6.1m(b,a.1n==4d?a:a+"2P")}});L C=E.14.26&&4t(E.14.5n)<8c?"(?:[\\\\w*4s-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4s-]|\\\\\\\\.)",6w=1D 4r("^>\\\\s*("+C+"+)"),6v=1D 4r("^("+C+"+)(#)("+C+"+)"),6u=1D 4r("^([#.]?)("+C+"*)");E.1s({5d:{"":"m[2]==\'*\'||19.12(a,m[2])","#":"a.4z(\'2s\')==m[2]",":":{88:"im[3]-0",31:"m[3]-0==i",6N:"m[3]-0==i",3j:"i==0",3M:"i==r.M-1",6r:"i%2==0",6p:"i%2","3j-4m":"a.1b.3V(\'*\')[0]==a","3M-4m":"19.31(a.1b.5D,1,\'4v\')==a","84-4m":"!19.31(a.1b.5D,2,\'4v\')",6E:"a.1B",4B:"!a.1B",83:"(a.6A||a.80||19(a).1t()||\'\').1g(m[3])>=0",4b:\'"23"!=a.U&&19.1m(a,"18")!="2D"&&19.1m(a,"4X")!="23"\',23:\'"23"==a.U||19.1m(a,"18")=="2D"||19.1m(a,"4X")=="23"\',7Y:"!a.2W",2W:"a.2W",3o:"a.3o",2p:"a.2p||19.1K(a,\'2p\')",1t:"\'1t\'==a.U",5w:"\'5w\'==a.U",5y:"\'5y\'==a.U",5b:"\'5b\'==a.U",3J:"\'3J\'==a.U",59:"\'59\'==a.U",6n:"\'6n\'==a.U",6m:"\'6m\'==a.U",2G:\'"2G"==a.U||19.12(a,"2G")\',48:"/48|2y|6l|2G/i.17(a.12)",3E:"19.2r(m[3],a).M",7X:"/h\\\\d/i.17(a.12)",7W:"19.3x(19.3I,J(1i){K a==1i.O;}).M"}},6j:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1D 4r("^([:.#]*)("+C+"+)")],3d:J(a,c,b){L d,2o=[];2e(a&&a!=d){d=a;L f=E.1F(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2o=b?c=f.r:E.34(2o,f.r)}K 2o},2r:J(t,p){7(1v t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2j=[],3M,12;2e(t&&3M!=t){L r=[];3M=t;t=E.3f(t);L o=S;L g=6w;L m=g.39(t);7(m){12=m[1].2F();P(L i=0;d[i];i++)P(L c=d[i].1B;c;c=c.2J)7(c.15==1&&(12=="*"||c.12.2F()==12))r.1h(c);d=r;t=t.1p(g,"");7(t.1g(" ")==0)6z;o=R}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.39(t))!=W){r=[];L l={};12=m[2].2F();m=m[1];P(L j=0,3g=d.M;j<3g;j++){L n=m=="~"||m=="+"?d[j].2J:d[j].1B;P(;n;n=n.2J)7(n.15==1){L h=E.Q(n);7(m=="~"&&l[h])1T;7(!12||n.12.2F()==12){7(m=="~")l[h]=R;r.1h(n)}7(m=="+")1T}}d=r;t=E.3f(t.1p(g,""));o=R}}7(t&&!o){7(!t.1g(",")){7(p==d[0])d.4k();2j=E.34(2j,d);r=d=[p];t=" "+t.6i(1,t.M)}N{L k=6v;L m=k.39(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6u;m=k.39(t)}m[2]=m[2].1p(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5N&&!E.3W(f)){L q=f.5N(m[2]);7((E.14.1d||E.14.2B)&&q&&1v q.2s=="25"&&q.2s!=m[2])q=E(\'[@2s="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{P(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2w()=="4D")a="3v";r=E.34(r,d[i].3V(a))}7(m[1]==".")r=E.58(r,m[2]);7(m[1]=="#"){L e=[];P(L i=0;r[i];i++)7(r[i].4z("2s")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}7(t){L b=E.1F(t,r);d=r=b.r;t=E.3f(b.t)}}7(t)d=[];7(d&&p==d[0])d.4k();2j=E.34(2j,d);K 2j},58:J(r,m,a){m=" "+m+" ";L c=[];P(L i=0;r[i];i++){L b=(" "+r[i].1w+" ").1g(m)>=0;7(!a&&b||a&&!b)c.1h(r[i])}K c},1F:J(t,r,h){L d;2e(t&&t!=d){d=t;L p=E.6j,m;P(L i=0;p[i];i++){m=p[i].39(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1p(/\\\\/g,"");1T}}7(!m)1T;7(m[1]==":"&&m[2]=="4I")r=G.17(m[3])?E.1F(m[3],r,R).r:E(r).4I(m[3]);N 7(m[1]==".")r=E.58(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];P(L i=0,3g=r.M;i<3g;i++){L a=r[i],z=a[E.3S[m[2]]||m[2]];7(z==W||/6T|3R|2p/.17(m[2]))z=E.1K(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1g(m[5])||U=="$="&&z.6i(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1g(m[5])>=0)^h)g.1h(a)}r=g}N 7(m[1]==":"&&m[2]=="31-4m"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.39(m[3]=="6r"&&"2n"||m[3]=="6p"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;P(L i=0,3g=r.M;i<3g;i++){L j=r[i],1b=j.1b,2s=E.Q(1b);7(!e[2s]){L c=1;P(L n=1b.1B;n;n=n.2J)7(n.15==1)n.4p=c++;e[2s]=R}L b=S;7(3j==0){7(j.4p==d)b=R}N 7((j.4p-d)%3j==0&&(j.4p-d)/3j>=0)b=R;7(b^h)g.1h(j)}r=g}N{L f=E.5d[m[1]];7(1v f!="25")f=E.5d[m[1]][m[2]];f=4A("S||J(a,i){K "+f+"}");r=E.3x(r,f,h)}}K{r:r,t:t}},4w:J(b,c){L d=[];L a=b[c];2e(a&&a!=T){7(a.15==1)d.1h(a);a=a[c]}K d},31:J(a,e,c,b){e=e||1;L d=0;P(;a;a=a[c])7(a.15==1&&++d==e)1T;K a},5m:J(n,a){L r=[];P(;n;n=n.2J){7(n.15==1&&(!a||n!=a))r.1h(n)}K r}});E.16={1c:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.54!=10)f=1e;7(!g.2A)g.2A=6.2A++;7(e!=10){L h=g;g=J(){K h.1j(6,1a)};g.Q=e;g.2A=h.2A}L j=E.Q(f,"2N")||E.Q(f,"2N",{}),1x=E.Q(f,"1x")||E.Q(f,"1x",J(){L a;7(1v E=="10"||E.16.52)K a;a=E.16.1x.1j(1a.3G.O,1a);K a});1x.O=f;E.V(i.2d(/\\s+/),J(c,b){L a=b.2d(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2l[b]||E.16.2l[b].4i.1O(f)===S){7(f.3F)f.3F(b,1x,S);N 7(f.6h)f.6h("4h"+b,1x)}}d[g.2A]=g;E.16.2g[b]=R});f=W},2A:1,2g:{},1Y:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.Q(e,"2N"),2f,5E;7(i){7(h==10)P(L g 1r i)6.1Y(e,g);N{7(h.U){f=h.2k;h=h.U}E.V(h.2d(/\\s+/),J(b,a){L c=a.2d(".");a=c[0];7(i[a]){7(f)2T i[a][f.2A];N P(f 1r i[a])7(!c[1]||i[a][f].U==c[1])2T i[a][f];P(2f 1r i[a])1T;7(!2f){7(!E.16.2l[a]||E.16.2l[a].4g.1O(e)===S){7(e.6f)e.6f(a,E.Q(e,"1x"),S);N 7(e.6d)e.6d("4h"+a,E.Q(e,"1x"))}2f=W;2T i[a]}}})}P(2f 1r i)1T;7(!2f){L d=E.Q(e,"1x");7(d)d.O=W;E.3H(e,"2N");E.3H(e,"1x")}}},1U:J(f,b,c,d,g){b=E.2H(b||[]);7(!c){7(6.2g[f])E("*").1c([1e,T]).1U(f,b)}N{7(c.15==3||c.15==8)K 10;L a,2f,1i=E.1q(c[f]||W),16=!b[0]||!b[0].32;7(16)b.4U(6.51({U:f,2K:c}));b[0].U=f;7(E.1q(E.Q(c,"1x")))a=E.Q(c,"1x").1j(c,b);7(!1i&&c["4h"+f]&&c["4h"+f].1j(c,b)===S)a=S;7(16)b.4k();7(g&&E.1q(g)){2f=g.1j(c,a==W?b:b.6Q(a));7(2f!==10)a=2f}7(1i&&d!==S&&a!==S&&!(E.12(c,\'a\')&&f=="50")){6.52=R;1R{c[f]()}1W(e){}}6.52=S}K a},1x:J(c){L a;c=E.16.51(c||1e.16||{});L b=c.U.2d(".");c.U=b[0];L f=E.Q(6,"2N")&&E.Q(6,"2N")[c.U],3B=1N.2m.2V.1O(1a,1);3B.4U(c);P(L j 1r f){L d=f[j];3B[0].2k=d;3B[0].Q=d.Q;7(!b[1]||d.U==b[1]){L e=d.1j(6,3B);7(a!==S)a=e;7(e===S){c.32();c.41()}}}7(E.14.1d)c.2K=c.32=c.41=c.2k=c.Q=W;K a},51:J(c){L a=c;c=E.1s({},a);c.32=J(){7(a.32)a.32();a.7T=S};c.41=J(){7(a.41)a.41();a.7S=R};7(!c.2K)c.2K=c.7R||T;7(c.2K.15==3)c.2K=a.2K.1b;7(!c.4W&&c.4V)c.4W=c.4V==c.2K?c.7Q:c.4V;7(c.6b==W&&c.6a!=W){L b=T.1I,1k=T.1k;c.6b=c.6a+(b&&b.2i||1k&&1k.2i||0)-(b.68||0);c.7O=c.7N+(b&&b.2x||1k&&1k.2x||0)-(b.67||0)}7(!c.3r&&((c.4f||c.4f===0)?c.4f:c.66))c.3r=c.4f||c.66;7(!c.65&&c.64)c.65=c.64;7(!c.3r&&c.2G)c.3r=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2l:{21:{4i:J(){5A();K},4g:J(){K}},47:{4i:J(){7(E.14.1d)K S;E(6).2z("4Q",E.16.2l.47.2k);K R},4g:J(){7(E.14.1d)K S;E(6).42("4Q",E.16.2l.47.2k);K R},2k:J(a){7(I(a,6))K R;1a[0].U="47";K E.16.1x.1j(6,1a)}},46:{4i:J(){7(E.14.1d)K S;E(6).2z("4P",E.16.2l.46.2k);K R},4g:J(){7(E.14.1d)K S;E(6).42("4P",E.16.2l.46.2k);K R},2k:J(a){7(I(a,6))K R;1a[0].U="46";K E.16.1x.1j(6,1a)}}}};E.1i.1s({2z:J(c,a,b){K c=="4O"?6.30(c,a,b):6.V(J(){E.16.1c(6,c,b||a,b&&a)})},30:J(d,b,c){K 6.V(J(){E.16.1c(6,d,J(a){E(6).42(a);K(c||b).1j(6,1a)},c&&b)})},42:J(a,b){K 6.V(J(){E.16.1Y(6,a,b)})},1U:J(c,a,b){K 6.V(J(){E.16.1U(c,a,6,R,b)})},63:J(c,a,b){7(6[0])K E.16.1U(c,a,6[0],S,b);K 10},2h:J(){L b=1a;K 6.50(J(a){6.4N=0==6.4N?1:0;a.32();K b[6.4N].1j(6,1a)||S})},7F:J(a,b){K 6.2z(\'47\',a).2z(\'46\',b)},21:J(a){5A();7(E.2Q)a.1O(T,E);N E.3w.1h(J(){K a.1O(6,E)});K 6}});E.1s({2Q:S,3w:[],21:J(){7(!E.2Q){E.2Q=R;7(E.3w){E.V(E.3w,J(){6.1j(T)});E.3w=W}E(T).63("21")}}});L x=S;J 5A(){7(x)K;x=R;7(T.3F&&!E.14.2B)T.3F("61",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1R{T.1I.7D("2c")}1W(3e){3z(1a.3G,0);K}E.21()})();7(E.14.2B)T.3F("61",J(){7(E.2Q)K;P(L i=0;i=0){L i=g.2V(e,g.M);g=g.2V(0,e)}c=c||J(){};L f="4J";7(d)7(E.1q(d)){c=d;d=W}N{d=E.3v(d);f="5Z"}L h=6;E.3Q({1f:g,U:f,1G:"3q",Q:d,1z:J(a,b){7(b=="1X"||b=="5Y")h.3q(i?E("<1u/>").3t(a.4e.1p(/<1o(.|\\s)*?\\/1o>/g,"")).2r(i):a.4e);h.V(c,[a.4e,b,a])}});K 6},7q:J(){K E.3v(6.5X())},5X:J(){K 6.2a(J(){K E.12(6,"3i")?E.2H(6.7p):6}).1F(J(){K 6.37&&!6.2W&&(6.3o||/2y|6l/i.17(6.12)||/1t|23|3J/i.17(6.U))}).2a(J(i,c){L b=E(6).5P();K b==W?W:b.1n==1N?E.2a(b,J(a,i){K{37:c.37,1C:a}}):{37:c.37,1C:b}}).22()}});E.V("5W,5V,5U,69,5T,5S".2d(","),J(i,o){E.1i[o]=J(f){K 6.2z(o,f)}});L B=(1D 3O).3N();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=W}K E.3Q({U:"4J",1f:d,Q:b,1X:a,1G:c})},7o:J(b,a){K E.22(b,W,a,"1o")},7n:J(c,b,a){K E.22(c,b,a,"2O")},7m:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3Q({U:"5Z",1f:d,Q:b,1X:a,1G:c})},7Z:J(a){E.1s(E.4H,a)},4H:{2g:R,U:"4J",2U:0,5R:"49/x-7j-3i-7i",6x:R,3l:R,Q:W,6t:W,3J:W,4n:{3L:"49/3L, 1t/3L",3q:"1t/3q",1o:"1t/4l, 49/4l",2O:"49/2O, 1t/4l",1t:"1t/7e",4o:"*/*"}},4q:{},3Q:J(s){L f,2Y=/=\\?(&|$)/g,1A,Q;s=E.1s(R,s,E.1s(R,{},E.4H,s));7(s.Q&&s.6x&&1v s.Q!="25")s.Q=E.3v(s.Q);7(s.1G=="4u"){7(s.U.2w()=="22"){7(!s.1f.1E(2Y))s.1f+=(s.1f.1E(/\\?/)?"&":"?")+(s.4u||"7d")+"=?"}N 7(!s.Q||!s.Q.1E(2Y))s.Q=(s.Q?s.Q+"&":"")+(s.4u||"7d")+"=?";s.1G="2O"}7(s.1G=="2O"&&(s.Q&&s.Q.1E(2Y)||s.1f.1E(2Y))){f="4u"+B++;7(s.Q)s.Q=(s.Q+"").1p(2Y,"="+f+"$1");s.1f=s.1f.1p(2Y,"="+f+"$1");s.1G="1o";1e[f]=J(a){Q=a;1X();1z();1e[f]=10;1R{2T 1e[f]}1W(e){}7(h)h.2X(g)}}7(s.1G=="1o"&&s.1Q==W)s.1Q=S;7(s.1Q===S&&s.U.2w()=="22"){L i=(1D 3O()).3N();L j=s.1f.1p(/(\\?|&)4s=.*?(&|$)/,"$a2="+i+"$2");s.1f=j+((j==s.1f)?(s.1f.1E(/\\?/)?"&":"?")+"4s="+i:"")}7(s.Q&&s.U.2w()=="22"){s.1f+=(s.1f.1E(/\\?/)?"&":"?")+s.Q;s.Q=W}7(s.2g&&!E.5M++)E.16.1U("5W");7((!s.1f.1g("9Z")||!s.1f.1g("//"))&&(s.1G=="1o"||s.1G=="2O")&&s.U.2w()=="22"){L h=T.3V("6k")[0];L g=T.2R("1o");g.3R=s.1f;7(s.7c)g.9X=s.7c;7(!f){L l=S;g.9V=g.9U=J(){7(!l&&(!6.3c||6.3c=="60"||6.3c=="1z")){l=R;1X();1z();h.2X(g)}}}h.3k(g);K 10}L m=S;L k=1e.7a?1D 7a("9S.9Q"):1D 79();k.9P(s.U,s.1f,s.3l,s.6t,s.3J);1R{7(s.Q)k.4G("9N-9M",s.5R);7(s.5I)k.4G("9L-5H-9J",E.4q[s.1f]||"9H, 9G 9E 9B 5G:5G:5G 9z");k.4G("X-9x-9u","79");k.4G("9t",s.1G&&s.4n[s.1G]?s.4n[s.1G]+", */*":s.4n.4o)}1W(e){}7(s.75)s.75(k);7(s.2g)E.16.1U("5S",[k,s]);L c=J(a){7(!m&&k&&(k.3c==4||a=="2U")){m=R;7(d){74(d);d=W}1A=a=="2U"&&"2U"||!E.73(k)&&"3e"||s.5I&&E.72(k,s.1f)&&"5Y"||"1X";7(1A=="1X"){1R{Q=E.71(k,s.1G)}1W(e){1A="5C"}}7(1A=="1X"){L b;1R{b=k.5B("70-5H")}1W(e){}7(s.5I&&b)E.4q[s.1f]=b;7(!f)1X()}N E.5t(s,k,1A);1z();7(s.3l)k=W}};7(s.3l){L d=54(c,13);7(s.2U>0)3z(J(){7(k){k.9m();7(!m)c("2U")}},s.2U)}1R{k.9l(s.Q)}1W(e){E.5t(s,k,W,e)}7(!s.3l)c();J 1X(){7(s.1X)s.1X(Q,1A);7(s.2g)E.16.1U("5T",[k,s])}J 1z(){7(s.1z)s.1z(k,1A);7(s.2g)E.16.1U("5U",[k,s]);7(s.2g&&!--E.5M)E.16.1U("5V")}K k},5t:J(s,a,b,e){7(s.3e)s.3e(a,b,e);7(s.2g)E.16.1U("69",[a,s,e])},5M:0,73:J(r){1R{K!r.1A&&9k.9j=="5b:"||(r.1A>=6Y&&r.1A<9h)||r.1A==6X||r.1A==9e||E.14.26&&r.1A==10}1W(e){}K S},72:J(a,c){1R{L b=a.5B("70-5H");K a.1A==6X||b==E.4q[c]||E.14.26&&a.1A==10}1W(e){}K S},71:J(r,b){L c=r.5B("9d-U");L d=b=="3L"||!b&&c&&c.1g("3L")>=0;L a=d?r.9c:r.4e;7(d&&a.1I.28=="5C")6Z"5C";7(b=="1o")E.5l(a);7(b=="2O")a=4A("("+a+")");K a},3v:J(a){L s=[];7(a.1n==1N||a.5j)E.V(a,J(){s.1h(3s(6.37)+"="+3s(6.1C))});N P(L j 1r a)7(a[j]&&a[j].1n==1N)E.V(a[j],J(){s.1h(3s(j)+"="+3s(6))});N s.1h(3s(j)+"="+3s(a[j]));K s.6g("&").1p(/%20/g,"+")}});E.1i.1s({1J:J(c,b){K c?6.27({1P:"1J",29:"1J",1y:"1J"},c,b):6.1F(":23").V(J(){6.Y.18=6.5x||"";7(E.1m(6,"18")=="2D"){L a=E("<"+6.28+" />").6B("1k");6.Y.18=a.1m("18");7(6.Y.18=="2D")6.Y.18="3u";a.1Y()}}).3h()},1H:J(b,a){K b?6.27({1P:"1H",29:"1H",1y:"1H"},b,a):6.1F(":4b").V(J(){6.5x=6.5x||E.1m(6,"18");6.Y.18="2D"}).3h()},6U:E.1i.2h,2h:J(a,b){K E.1q(a)&&E.1q(b)?6.6U(a,b):a?6.27({1P:"2h",29:"2h",1y:"2h"},a,b):6.V(J(){E(6)[E(6).3K(":23")?"1J":"1H"]()})},98:J(b,a){K 6.27({1P:"1J"},b,a)},97:J(b,a){K 6.27({1P:"1H"},b,a)},96:J(b,a){K 6.27({1P:"2h"},b,a)},95:J(b,a){K 6.27({1y:"1J"},b,a)},94:J(b,a){K 6.27({1y:"1H"},b,a)},9f:J(c,a,b){K 6.27({1y:a},c,b)},27:J(l,k,j,h){L i=E.6V(k,j,h);K 6[i.2S===S?"V":"2S"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3K(":23"),4y=6;P(L p 1r l){7(l[p]=="1H"&&f||l[p]=="1J"&&!f)K E.1q(g.1z)&&g.1z.1j(6);7(p=="1P"||p=="29"){g.18=E.1m(6,"18");g.36=6.Y.36}}7(g.36!=W)6.Y.36="23";g.40=E.1s({},l);E.V(l,J(c,a){L e=1D E.2v(4y,g,c);7(/2h|1J|1H/.17(a))e[a=="2h"?f?"1J":"1H":a](l);N{L b=a.3D().1E(/^([+-]=)?([\\d+-.]+)(.*)$/),24=e.2o(R)||0;7(b){L d=2M(b[2]),2C=b[3]||"2P";7(2C!="2P"){4y.Y[c]=(d||1)+2C;24=((d||1)/e.2o(R))*24;4y.Y[c]=24+2C}7(b[1])d=((b[1]=="-="?-1:1)*d)+24;e.3Z(24,d,2C)}N e.3Z(24,a,"")}});K R})},2S:J(a,b){7(E.1q(a)||(a&&a.1n==1N)){b=a;a="2v"}7(!a||(1v a=="25"&&!b))K A(6[0],a);K 6.V(J(){7(b.1n==1N)A(6,a,b);N{A(6,a).1h(b);7(A(6,a).M==1)b.1j(6)}})},8Z:J(b,c){L a=E.3I;7(b)6.2S([]);6.V(J(){P(L i=a.M-1;i>=0;i--)7(a[i].O==6){7(c)a[i](R);a.6R(i,1)}});7(!c)6.5z();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2v";L q=E.Q(b,c+"2S");7(!q||a)q=E.Q(b,c+"2S",a?E.2H(a):[]);K q};E.1i.5z=J(a){a=a||"2v";K 6.V(J(){L q=A(6,a);q.4k();7(q.M)q[0].1j(6)})};E.1s({6V:J(b,a,c){L d=b&&b.1n==8Y?b:{1z:c||!c&&a||E.1q(b)&&b,2t:b,3Y:c&&a||a&&a.1n!=8W&&a};d.2t=(d.2t&&d.2t.1n==53?d.2t:{9w:8U,8T:6Y}[d.2t])||8S;d.5o=d.1z;d.1z=J(){7(d.2S!==S)E(6).5z();7(E.1q(d.5o))d.5o.1j(6)};K d},3Y:{6O:J(p,n,b,a){K b+a*p},5F:J(p,n,b,a){K((-1Z.9C(p*1Z.9D)/2)+0.5)*a+b}},3I:[],3T:W,2v:J(b,c,a){6.11=c;6.O=b;6.1l=a;7(!c.3U)c.3U={}}});E.2v.2m={4C:J(){7(6.11.33)6.11.33.1j(6.O,[6.2I,6]);(E.2v.33[6.1l]||E.2v.33.4o)(6);7(6.1l=="1P"||6.1l=="29")6.O.Y.18="3u"},2o:J(a){7(6.O[6.1l]!=W&&6.O.Y[6.1l]==W)K 6.O[6.1l];L r=2M(E.1m(6.O,6.1l,a));K r&&r>-8N?r:2M(E.2q(6.O,6.1l))||0},3Z:J(c,b,d){6.5s=(1D 3O()).3N();6.24=c;6.3h=b;6.2C=d||6.2C||"2P";6.2I=6.24;6.4E=6.4F=0;6.4C();L e=6;J t(a){K e.33(a)}t.O=6.O;E.3I.1h(t);7(E.3T==W){E.3T=54(J(){L a=E.3I;P(L i=0;i6.11.2t+6.5s){6.2I=6.3h;6.4E=6.4F=1;6.4C();6.11.40[6.1l]=R;L b=R;P(L i 1r 6.11.40)7(6.11.40[i]!==R)b=S;7(b){7(6.11.18!=W){6.O.Y.36=6.11.36;6.O.Y.18=6.11.18;7(E.1m(6.O,"18")=="2D")6.O.Y.18="3u"}7(6.11.1H)6.O.Y.18="2D";7(6.11.1H||6.11.1J)P(L p 1r 6.11.40)E.1K(6.O.Y,p,6.11.3U[p])}7(b&&E.1q(6.11.1z))6.11.1z.1j(6.O);K S}N{L n=t-6.5s;6.4F=n/6.11.2t;6.4E=E.3Y[6.11.3Y||(E.3Y.5F?"5F":"6O")](6.4F,n,0,1,6.11.2t);6.2I=6.24+((6.3h-6.24)*6.4E);6.4C()}K R}};E.2v.33={2i:J(a){a.O.2i=a.2I},2x:J(a){a.O.2x=a.2I},1y:J(a){E.1K(a.O.Y,"1y",a.2I)},4o:J(a){a.O.Y[a.1l]=a.2I+a.2C}};E.1i.5f=J(){L b=0,3b=0,O=6[0],5q;7(O)8K(E.14){L d=O.1b,45=O,1M=O.1M,1L=O.2u,5p=26&&4t(5n)<8H,2Z=E.1m(O,"3C")=="2Z";7(O.7b){L c=O.7b();1c(c.2c+1Z.2b(1L.1I.2i,1L.1k.2i),c.3b+1Z.2b(1L.1I.2x,1L.1k.2x));1c(-1L.1I.68,-1L.1I.67)}N{1c(O.5k,O.5K);2e(1M){1c(1M.5k,1M.5K);7(3X&&!/^t(8F|d|h)$/i.17(1M.28)||26&&!5p)3a(1M);7(!2Z&&E.1m(1M,"3C")=="2Z")2Z=R;45=/^1k$/i.17(1M.28)?45:1M;1M=1M.1M}2e(d&&d.28&&!/^1k|3q$/i.17(d.28)){7(!/^a0|1V.*$/i.17(E.1m(d,"18")))1c(-d.2i,-d.2x);7(3X&&E.1m(d,"36")!="4b")3a(d);d=d.1b}7((5p&&(2Z||E.1m(45,"3C")=="4Z"))||(3X&&E.1m(45,"3C")!="4Z"))1c(-1L.1k.5k,-1L.1k.5K);7(2Z)1c(1Z.2b(1L.1I.2i,1L.1k.2i),1Z.2b(1L.1I.2x,1L.1k.2x))}5q={3b:3b,2c:b}}J 3a(a){1c(E.2q(a,"a1",R),E.2q(a,"8D",R))}J 1c(l,t){b+=4t(l)||0;3b+=4t(t)||0}K 5q}})();',62,624,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|elem|for|data|true|false|document|type|each|null||style||undefined|options|nodeName||browser|nodeType|event|test|display|jQuery|arguments|parentNode|add|msie|window|url|indexOf|push|fn|apply|body|prop|css|constructor|script|replace|isFunction|in|extend|text|div|typeof|className|handle|opacity|complete|status|firstChild|value|new|match|filter|dataType|hide|documentElement|show|attr|doc|offsetParent|Array|call|height|cache|try|tbody|break|trigger|table|catch|success|remove|Math||ready|get|hidden|start|string|safari|animate|tagName|width|map|max|left|split|while|ret|global|toggle|scrollLeft|done|handler|special|prototype||cur|selected|curCSS|find|id|duration|ownerDocument|fx|toLowerCase|scrollTop|select|bind|guid|opera|unit|none|pushStack|toUpperCase|button|makeArray|now|nextSibling|target|stack|parseFloat|events|json|px|isReady|createElement|queue|delete|timeout|slice|disabled|removeChild|jsre|fixed|one|nth|preventDefault|step|merge|inArray|overflow|name|innerHTML|exec|border|top|readyState|multiFilter|error|trim|rl|end|form|first|appendChild|async|elems|insertBefore|checked|childNodes|html|which|encodeURIComponent|append|block|param|readyList|grep|color|setTimeout|runtimeStyle|args|position|toString|has|addEventListener|callee|removeData|timers|password|is|xml|last|getTime|Date|domManip|ajax|src|props|timerId|orig|getElementsByTagName|isXMLDoc|mozilla|easing|custom|curAnim|stopPropagation|unbind|load|selectedIndex|offsetChild|mouseleave|mouseenter|input|application|defaultView|visible|float|String|responseText|charCode|teardown|on|setup|currentStyle|shift|javascript|child|accepts|_default|nodeIndex|lastModified|RegExp|_|parseInt|jsonp|previousSibling|dir|tr|self|getAttribute|eval|empty|update|object|pos|state|setRequestHeader|ajaxSettings|not|GET|getPropertyValue|getComputedStyle|styleSheets|lastToggle|unload|mouseout|mouseover|andSelf|getWH|container2|unshift|fromElement|relatedTarget|visibility|init|absolute|click|fix|triggered|Number|setInterval|removeAttribute|prevObject|unique|classFilter|submit|after|file|clean|expr|windowData|offset|scroll|client|deep|jquery|offsetLeft|globalEval|sibling|version|old|safari2|results|wrapAll|startTime|handleError|container|createTextNode|radio|oldblock|checkbox|dequeue|bindReady|getResponseHeader|parsererror|lastChild|index|swing|00|Modified|ifModified|clone|offsetTop|values|active|getElementById|link|val|col|contentType|ajaxSend|ajaxSuccess|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|POST|loaded|DOMContentLoaded|Width|triggerHandler|ctrlKey|metaKey|keyCode|clientTop|clientLeft|ajaxError|clientX|pageX|cloneNode|detachEvent|swap|removeEventListener|join|attachEvent|substr|parse|head|textarea|reset|image|before|odd|zoom|even|prepend|username|quickClass|quickID|quickChild|processData|uuid|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|setArray|CSS1Compat|compatMode|cssFloat|styleFloat|webkit|nodeValue|eq|linear|replaceWith|concat|splice|100|href|_toggle|speed|alpha|304|200|throw|Last|httpData|httpNotModified|httpSuccess|clearInterval|beforeSend|colgroup|fieldset|multiple|XMLHttpRequest|ActiveXObject|getBoundingClientRect|scriptCharset|callback|plain|img|hasClass|br|urlencoded|www|abbr|pixelLeft|post|getJSON|getScript|elements|serialize|keypress|keydown|change|mouseup|mousedown|dblclick|resize|focus|blur|stylesheet|rel|mousemove|doScroll|round|hover|keyup|padding|offsetHeight|offsetWidth|Bottom|Top|Right|clientY|pageY|Left|toElement|srcElement|cancelBubble|returnValue|0n|substring|animated|header|enabled|ajaxSetup|innerText|noConflict|size|contains|only|line|gt|weight|lt|font|uFFFF|u0128|417|inner|Height|Boolean|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|wrap|prependTo|contentWindow|contentDocument|iframe|children|siblings|wrapInner|prevAll|nextAll|prev|next|parents|maxLength|maxlength|readOnly|readonly|borderTopWidth|class|able|htmlFor|522|reverse|boxModel|with|1px|compatible|10000|ie|ra|it|rv|400|fast|600|userAgent|Function|navigator|Object|stop|option|array|ig|NaN|fadeOut|fadeIn|slideToggle|slideUp|slideDown|setAttribute|changed|be|responseXML|content|1223|fadeTo|can|300|property|protocol|location|send|abort|getAttributeNode|specified|method|action|cssText|attributes|Accept|With|th|slow|Requested|td|GMT|cap|1970|cos|PI|Jan|colg|01|Thu|tfoot|Since|thead|If|Type|Content|leg|open|XMLHTTP|opt|Microsoft|embed|onreadystatechange|onload|area|charset|hr|http|inline|borderLeftWidth|1_|meta'.split('|'),0,{})) \ No newline at end of file diff -Nru luminance-hdr-2.3.0/help/js/jquery.jtabs.pack.js luminance-hdr-2.3.1/help/js/jquery.jtabs.pack.js --- luminance-hdr-2.3.0/help/js/jquery.jtabs.pack.js 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/help/js/jquery.jtabs.pack.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ - -/** - * Ridiculously small sized tab implementation with all the - * features you'll need. - * - * Features - * - API is similar to $.ui.tabs. - * - inline and ajaxed content - * - tab enable / disable - * - next- prev tab functionality for wizards - * - initial tab loading - * - + more - * - * @TODO: - * - NOT supported: (+ corresponding workarounds) - * - * Few examples: - * $("ul.tabs").jtabs(); - * $("ul.tabs").jtabs("click", 1); - * $("ul.tabs").jtabs("next"); - * $("ul.tabs").jtabs(function(tabIndex) { }); - * - * - * If you want this plugin to be released at http://plugins.jquery.com - * please drop a note to: tero.piirainen@piimaa.fi. - * - * - * @since 01.02.2008 - * @version 25.02.2008 - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.I.q({8:4(c,d){l 2.o(4(){5(H c=="E"){3 a=$.B(2,"z");3 b=[d];a[c].y(a,b)}p{L $.8(2,c)}})}});$.8=4(c,d){$.B(c,"z",2);3 e=2;2.9={i:2.i};2.9=$.q(2.9,d);2.7=c;3 f=0;3 g=0;$("u",c).o(4(a){3 b=$(2);b.t("a").6(4(){e.6(a,c)});5(b.A(".k"))f=a;5(b.t("a").j("r")==R.P)g=a});5(g>0)e.6(g);p 5(f>0)e.6(f);p e.6(0)};$.q($.8.O,{i:4(a){l N},6:4(a){3 b=$("a:x("+a+")",2.7);5(!2.9.i.y(b.h(),[a]))l;5(b.w()==0||b.h().A(".m"))l;2.n=a;$("a",2.7).o(4(){$($(2).j("r")).K()});3 c=b.j("r").J(1);3 d=$("#"+c);3 e=b.j("v");5(e){d.G(e);b.F("v")}d.M();$("u.k",2.7).s("k");b.h().D("k").s("m")},C:4(a){3 b=2.n+1;3 c=$("a:x("+b+")",2.7);5(c.w()>0){5(a)c.h().s("m");2.6(b)}},Q:4(){2.6(2.n-1)}})})(S);',55,55,'||this|var|function|if|click|root|jtabs|opts||||||||parent|before|attr|current|return|disabled|index|each|else|extend|href|removeClass|find|li|url|size|eq|apply|el|is|data|next|addClass|string|removeAttr|load|typeof|fn|substring|hide|new|fadeIn|true|prototype|hash|prev|location|jQuery'.split('|'),0,{})) diff -Nru luminance-hdr-2.3.0/i18n/lang_cs.ts luminance-hdr-2.3.1/i18n/lang_cs.ts --- luminance-hdr-2.3.0/i18n/lang_cs.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_cs.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Vybrat adresář - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -308,58 +315,10 @@ Hromadné přemapování (Batch Tone Mapping) - Add all the HDRs in a directory to the list - Přidat do seznamu všechny HDR v adresáři - - - Add &Directory - Přidat a&dresář - - - Add single HDR files to the list - Přidat jeden HDR do seznamu - - - &Add Files - &Přidat soubory - - - Remove single HDR files to the list - Odstranit jeden HDR ze seznamu - - - &Remove Files - Odst&ranit soubory - - List of HDRs that will be tone mapped Seznam HDR, které budou přemapovány - Add all the Tone Mapping Setting files in a directory to the list - Přidat do seznamu všechny soubory nastavení přemapování z adresáře - - - Add D&irectory - Přidat a&dresář - - - Add single Tone Mapping Setting files to the list - Přidat do seznamu jeden soubor nastavení přemapování - - - Add Fi&les - Přidat &soubory - - - Remove single Tone Mapping Setting files to the list - Odstranit ze seznamu jeden soubor nastavení přemapování - - - R&emove Files - O&dstranit soubory - - 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 @@ -372,10 +331,6 @@ Výstup - Select &Output Folder... - Vybrat &výstupní adresář... - - Batch operations report Zpráva hromadného zpracování @@ -464,10 +419,6 @@ - LuminanceHDR tone mapping settings text file (*.txt) - - - Start processing... @@ -492,10 +443,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -567,6 +514,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -646,14 +625,6 @@ CHYBA: Nemohu uložit do souboru: %1 - Cannot convert %1 to a float - Nemohu konvertovat %1 do plovoucí rádové čárky - - - Cannot convert %1 to an integer - Nemohu konvertovat %1 do celých čísel - - Error: Unknown weight function specified. Chyba: Určena neznámá váhová funkce. @@ -670,164 +641,168 @@ - -h --help Display this help. + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - -v --verbose Print more messages during execution. + (Default is weight=triangular:response_curve=linear:model=debevec) - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + (Default is mantiuk06) - -c --config HDR creation config. Possible values: + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - (Default is weight=triangular:response_curve=linear:model=debevec) + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - -l --load HDR_FILE Load an HDR instead of creating a new one. + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + bias=VALUE (for drago) - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - -t --tmo Tone mapping operator. Legal values are: + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - (Default is mantiuk06) + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - -p --tmoptions Tone mapping operator options. Legal values are: + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + Load file %1 failed - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + EV values have been assigned. - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + Creating (in memory) the HDR. - localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + Saving to file %1. - sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + Image %1 saved successfully - bias=VALUE (for drago) + Could not save %1 - local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + NOT Saving HDR image to file. %1 - scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + Tonemapping requested, saving to file %1. - brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + Failed loading images - (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + Failed aligning images. - -o --output LDR_FILE File name you want to save your tone mapped LDR to. + Error: Quality must be in the range [0-100]. - (No tonemapping is performed unless -o is specified). + -h --help Display this help. - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - + -v --verbose Print more messages during execution. - Load file %1 failed + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - EV values have been assigned. + -d --savealigned prefix Save aligned images to files which names start with prefix - Creating (in memory) the HDR. + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - Saving to file %1. + -c --config HDR creation config. Possible values: - Image %1 saved successfully + -l --load HDR_FILE Load an HDR instead of creating a new one. - Could not save %1 + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - NOT Saving HDR image to file. %1 + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - Tonemapping requested, saving to file %1. + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - Failed loading images + -t --tmo Tone mapping operator. Legal values are: - Failed aligning images. + -p --tmoptions Tone mapping operator options. Legal values are: - Error: Quality must be in the range [0-100]. + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Quality of the saved tone mapped file (0-100). + (No tonemapping is performed unless -o is specified). @@ -876,6 +851,22 @@ Pan the image to a region + + Maskable + + + + Good image + + + + Ed&itable + Edi&tovatelný + + + R&eference + R&eferenční + EditingToolsDialog @@ -920,10 +911,6 @@ Od&dálit - Preview &Mode: - &Mód náhledu: - - Pivot Only (P) Pouze pivot (P) @@ -932,10 +919,6 @@ Maska potlačení duchů - Mask Color - Maska barvy - - Images List Seznam obrázků @@ -1002,22 +985,10 @@ Ctrl+S - A&dd Mask - Při&dat masku - - - Remove Mas&k - Odebrat mas&ku - - Size: Rozměr: - pixels - body - - &Strength: &Síla: @@ -1171,6 +1142,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + + + + Apply saved mask + + GenericViewer @@ -1419,35 +1434,10 @@ Podle kalibrace - From File - Ze souboru - - HDR Creation Wizard - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Currently Loaded &Files @@ -1624,13 +1614,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1662,6 +1645,50 @@ align_image_stack failed to align images. + + Auto-crop + + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + HelpBrowser @@ -1865,23 +1892,23 @@ - Quality: + Unknown - File size: + Ca&lculate - Unknown + &Save - Ca&lculate + File size - &Save + Quality @@ -2072,34 +2099,10 @@ Kopírovat Exif Data - &Align Images... - &Vyrovnat obrázky... - - - WORK IN PROGRESS - PRÁCE PROBÍHÁ - - &About Qt &O Qt - &Tile - &Vedle sebe - - - &Cascade - &Kaskáda - - - Cascade - Kaskáda - - - Toolbars - Lišty nástrojů - - &Icons Only Jen &ikony @@ -2555,32 +2558,42 @@ Gamut Check - - - PreferencesDialog - Tone Mapping - Tone Mapping + Preview Panel + - JPEG - JPEG + Show on the right + - PNG - PNG + Show on the bottom + + + + Realtime Previews + + + + Update + - PPM - PPM + Fattal Warning + - PBM - PBM + 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? + + + + PreferencesDialog - BMP - BMP + Tone Mapping + Tone Mapping &Cancel @@ -2647,14 +2660,6 @@ - Which LDR image format to save to - - - - TIFF - - - Amount of threads to use on multicore/SMP machines @@ -2962,10 +2967,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3061,47 +3062,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Reinhard '02 - Reinhard '02 - - - Reinhard '05 - Reinhard '05 - - - Mantiuk '06 - - - - Mantiuk '08 - - - - Fattal - - - Drago + Saves the settings along the program files, to be portable - Durand + Portable mode - Ashikhmin + Restart - Pattanaik + For the settings to take effect, please restart the application! + + + PreviewSettings - Preview + Load settings @@ -3198,14 +3179,6 @@ QObject - Aborting... - Přerušuji... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Nemohu najít Qt JPEG plugin...<br>Rozbalte archív s volbou "zachovat strukturu adresářů". - - Save as... Uložit jako... @@ -3309,151 +3282,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Změnit rozlišení obrázku + PreGamma=%1 + - Hdr Image Size - Rozlišení HDR obrázku + Contrast Equalization + Varovnání kontrastu (Contrast Equalization) - Width: - Šířka: + Contrast + - Switch between pixels or percentage - Vyberte pixely nebo procenta + Saturation + - Pixels - Pixely + Detail + - Percent - Procenta + Luminance Level + - Height: - Výška: + Luminance Level=Auto + - Result size - Výsledné rozlišení + Color Saturation + Saturace barev<br>(Color Saturation) - Restore original size - Obnovit původní velikost + Contrast Enhancement + - &Reset - &Obnovit + Alpha + - &Cancel - &Storno + Beta + - &Scale - &Změň + NoiseRedux + - - - SavedParameters - Simple - Jednoduchý + FFTSolver + - Local Contrast Threshold - Práh lokálního kontrastu<br>(Local Contrast Threshold) + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Síla<br>(Bias) + Síla<br>(Bias) - Spatial Kernel Sigma - Prostorové zrno<br>(Spatial Kernel Sigma) + Spatial + - Range Kernel Sigma - Rádius<br>(Range Kernel Sigma) + Range + Rozsah<br>(Range) - Base Contrast - Základní kontrast<br>(Base Contrast) + Base + - Color Saturation - Saturace barev<br>(Color Saturation) + Multiplier + Násobitel<br>(Multiplier) - Noise Reduction - Redukce šumu<br>(Noise Reduction) + AutoLuminance + - Contrast Equalization - Varovnání kontrastu (Contrast Equalization) + Cone + - Contrast Factor - Koeficient kontrastu<br>(Contrast Factor) + Rod + - Saturation Factor - Koeficient saturace<br>(Saturation Factor) + Key + - Cone and Rod based on Luminance - Cone a Rod podle jasu (Cone and Rod based on Luminance) + Phi + - Cone Level - Úroveň Cone<br>(Cone Level) + Scales: + - Rod Level - Úroveň Rod<br>(Rod Level) + Lower + - Multiplier - Násobitel<br>(Multiplier) + Upper + - Use Scales - Použít stupnice (Use Scales) + Brightness + Jas<br>(Brightness) - Key Value - Klíčová hodnota<br>(Key Value) + Chromatic Adaptation + Adaptace barev<br>(Chromatic Adaptation) - Range - Rozsah<br>(Range) + Light Adaptation + Adaptace světel<br>(Light Adaptation) + + + ResizeDialog - Lower Scale - Nižší stupnice<br>(Lower Scale) + Scale Image + Změnit rozlišení obrázku - Upper Scale - Vyšší stupnice<br>(Upper Scale) + Hdr Image Size + Rozlišení HDR obrázku - Brightness - Jas<br>(Brightness) + Width: + Šířka: - Chromatic Adaptation - Adaptace barev<br>(Chromatic Adaptation) + Switch between pixels or percentage + Vyberte pixely nebo procenta - Light Adaptation - Adaptace světel<br>(Light Adaptation) + Pixels + Pixely + + + Percent + Procenta + + + Height: + Výška: + + + Result size + Výsledné rozlišení + + + Restore original size + Obnovit původní velikost + + + &Reset + &Obnovit + + + &Cancel + &Storno + + + &Scale + &Změň @@ -3653,6 +3663,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Load a tonemapping settings text file... @@ -3919,10 +3936,6 @@ - Load parameters by comment - - - ... @@ -4046,15 +4059,41 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning + Load Custom Settings - 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? + Sort by + + + + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4081,10 +4120,6 @@ Přidat soubory do seznamu - Log: - Log: - - Exif operations report Zpráva o Exif operaci @@ -4177,4 +4212,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_da.ts luminance-hdr-2.3.1/i18n/lang_da.ts --- luminance-hdr-2.3.0/i18n/lang_da.ts 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_da.ts 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,4432 @@ + + + + + AboutLuminance + + About Luminance + Om Luminance + + + <!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:#00007f;">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:#00007f;">Luminance HDR</span></p></body></html> + + + &About + O&m + + + <!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: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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR imaging workflow application<br />(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-2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'Sans Serif'; 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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR billed-workflow-program<br />(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-2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Romanian translator</span><span style=" font-size:9pt; color:#000000;"><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-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;"></span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">Lad mig venligst vide</span></a><span style=" font-size:9pt;">, hvis jeg har glemt at tilføje nogen til denne liste.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; font-weight:600;">Hovedudvikler 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:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Hovedudviklere 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:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; font-weight:600;">Forbedringer, fejlrettelser</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algoritme</span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russisk oversætter, anvendelighedsrettelser, brugermanual, .desktop-fil</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norsk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Tyrkisk oversætter</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Fransk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spansk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Tysk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Tjekkisk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polsk oversætter</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Romænsk oversætter</span><span style=" font-size:9pt; color:#000000;"><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-size:9pt; font-weight:600; color:#000000;">Kinesisk oversætter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches og vedligeholdere</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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:'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-size:9pt;">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-size:9pt; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" text-decoration: underline; color:#0057ae;">Flickr</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Hugin's </span><span style=" font-size:9pt; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-size:9pt; font-weight:600;"> and more</span><span style=" font-size:9pt;"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-size:9pt;"><br /> Peter Linnell<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Fedora packager and bug reports</span><span style=" font-size:9pt;"><br /> Douglas E. Warner<br /><br /></span><span style=" font-size:9pt; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Various suggestions</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">And also</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> 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:'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-size:9pt;">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">Lad mig venligst vide</span></a><span style=" font-size:9pt;">, hvis jeg har glemt at tilføje nogen til denne liste.<br /><br /></span><span style=" font-size:9pt; font-weight:600;">Hele community'et på </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" text-decoration: underline; color:#0057ae;">Flickr</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Hugins </span><span style=" font-size:9pt; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-size:9pt; font-weight:600;"> med mere</span><span style=" font-size:9pt;"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Opensuse 10.2 og 10.3 pakker</span><span style=" font-size:9pt;"><br /> Peter Linnell<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Fedora pakker og fejlreporter</span><span style=" font-size:9pt;"><br /> Douglas E. Warner<br /><br /></span><span style=" font-size:9pt; font-weight:600;">openSUSE 10.2 pakker</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Diverse forslag</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Tiff LDR fejlrettelser og forslag</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Samt</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> + + + Changelog + Ændringer + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + + + &License Agreement + &Licensaftale + + + <!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 align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></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 align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + &OK + &OK + + + + BatchHDRDialog + + Batch HDR Dialog + HDR-jobliste + + + Number of bracketed images: + Antal grupperede billeder: + + + Select the number of bracketed pictures used to create the HDRs + Vælg antallet af grupperede billeder, der bruges for at skabe HDR'er + + + Output + Output + + + Predefined profile: + Prædefineret profil: + + + Choose an HDR output file format + Vælg et HDR-output-filformat + + + hdr + hdr + + + exr + exr + + + PFS + PFS + + + tiff + tiff + + + 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: + + + Alignment + Justering + + + Auto align the bracketed pictures + Autojustér de grupperede billeder + + + Auto-align images + Autojustér billeder + + + Use MTB (Median Threshold Bitmap) engine + Brug MTB (Median Threshold Bitmap) programmet + + + MTB + MTB + + + Use Hugin's align_image_stack engine + Brug Hugins align_image_stack program + + + Hugin's align_image_stack + Hugins align_image_stack + + + Auto-crop + Autobeskær + + + Progress + Fremgang + + + 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: + + + &Cancel + &Annuller + + + &Start + &Start + + + &Close + &Luk + + + 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. + +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... + + + Creating HDR... + Opretter HDR... + + + Completed with errors + Gennemført med fejl + + + Completed without errors + Gennemført uden fejl + + + Error: missing EXIF data + Fejl: Manglende EXIF-data + + + Aligning... + Justerer... + + + Written + Skrevet + + + Error: + Fejl: + + + Aborting... + Afbryder... + + + + BatchTMDialog + + Batch Tone Mapping + Tone mapping jobliste + + + HDR Images to Convert + HDR-billeder der skal konverteres + + + List of HDRs that will be tone mapped + Liste over alle HDR'er, som skal tone mappes + + + Add Directory (Alt+D) + Tilføj mappe (Alt+D) + + + ... + ... + + + Alt+D + Alt+D + + + Add Files (Alt+F) + Tilføj filer (Alt+F) + + + Alt+F + Alt+F + + + Remove Files (Alt+R) + Fjern filer (Alt+R) + + + Alt+R + Alt+R + + + Tone Mapping Settings + Tone mapping-indstillinger + + + Add Directory (Alt+I) + Tilføj mappe (Alt+I) + + + Alt+I + Alt+I + + + Add Files (Alt+L) + Tilføj filer (Alt+L) + + + Alt+L + Alt+L + + + 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 + + + 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 + + + Specify output folder for the tone mapped files + Specificér outputmappe til de tone mappede filer + + + Output + Output + + + Ouput Image Width: + Bredde på outputbillede: + + + % + % + + + Output Image Quality + Kvalitet på outputbillede + + + Output Format: + Outputformat: + + + JPEG + JPEG + + + TIFF (16 bits) + TIFF (16 bit) + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Output Folder: + Outputmappe: + + + Selec&t... + &Vælg... + + + Conversion Log + Konverteringslog + + + Batch operations report + Jobliste-udførselslog + + + &Show only: + Vi&s kun: + + + 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: + &Filtrér logbeskeder: + + + Clear filter text + Nulstil filtertekst + + + Overall completion progress + Overordnet fremgang + + + &Cancel + &Annuller + + + Start batch tone mapping + Start jobliste-tone mapping + + + &Start + &Start + + + Using %1 thread(s) + Bruger %1 tråd(e) + + + 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) + + + Processing... + Beregner... + + + Start processing... + Start beregning... + + + Close + Luk + + + &Done + &Færdig + + + All tasks completed. + Alle jobs gennemført. + + + Aborting... + Afbryder... + + + + BatchTMJob + + [T%1] Start processing %2 + [T%1] Start beregning %2 + + + [T%1] Successfully load %2 + [T%1] Indlæst succesfuldt %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 + + + + CommandLineInterfaceManager + + Error: Alignment engine not recognized. + Fejl: Positionerings-applikation ikke genkendt. + + + Error: Wrong HDR creation format. + Fejl: Forkert HDR-oprettelsesformat. + + + 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 HDR creation format specified. + Fejl: Ukendt HDR-oprettelsesformat specificeret. + + + Error: Unknown tone mapping operator specified. + Fejl: Ukendt tone mapping-operator specificeret. + + + Error: Wrong tone mapping option format. + Fejl: Forkert tone mapping-option format. + + + Error: Unknown tone mapping option specified. + Fejl: Ukendt tone mapping option specificeret. + + + Error: Quality must be in the range [0-100]. + Fejl: Kvalitet skal være i intervalet [0-100]. + + + Error: Unknown option %1. + Fejl: Ukendt option %1. + + + Error: Missing argument for %1. + Fejl: Manglende argument for %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. + + + 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 + + + Tonemapping requested, saving to file %1. + Tone mapping efterspurgt, gemmer til fil %1. + + + ERROR: Cannot save to file: %1 + FEJL: Kan ikke gemme til fil: %1 + + + Failed loading images + Indlæsning af billeder mislykkedes + + + Usage: %1 [OPTIONS]... [INPUTFILES]... + Anvendelse: %1 [OPTIONS]... [INPUTFILER]... + + + Commandline interface to %1. + Kommandolinie-interface til %1. + + + -h --help Display this help. + -h --help Vis denne hjælp. + + + -v --verbose Print more messages during execution. + -v --verbose Print flere beskeder under kørsel. + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + -a --align AIS|MTB Positionerings-applikation for brug under HDR-oprettelse (standard: ingen positionering). + + + -d --savealigned prefix Save aligned images to files which names start with prefix + -d --savealigned præfix Gem positionerede billeder til filer, hvis navne starter med præfix + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + -e --ev EV1,EV2,... Specificér numeriske EV-værdier (samme antal som INPUTFILER). + + + -c --config HDR creation config. Possible values: + -c --config HDR-oprettelses-konfig. Mulige værdier: + + + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=din_fil_her.m + + + (Default is weight=triangular:response_curve=linear:model=debevec) + (Standard er weight=triangular:response_curve=linear:model=debevec) + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + -l --load HDR_FIL Indlæs en HDR i stedet for at oprette en ny. + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + -s --save HDR_FIL gem til et HDR-filformat. (standard: gem ikke) + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + -g --gamma VÆRDI Gammaværdi til brug for tone mapping. (standard: 1) + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + -r --resize VÆRDI Bredde, som du ønsker at skalere dit HDR til (skaleres før gamma og tone mapping) + + + -t --tmo Tone mapping operator. Legal values are: + -t --tmo Tone mapping operator. Gyldige værdier er: + + + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + + (Default is mantiuk06) + (Standard er mantiuk06) + + + -p --tmoptions Tone mapping operator options. Legal values are: + -p --tmoptions Tone mapping operator indstillinger. Gyldige værdier er: + + + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + alpha=VÆRDI:beta=VÆRDI:color=VÆRDI:noise=VÆRDI:new=true|false (for fattal) + + + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + contrast=VÆRDI:saturation=VÆRDI:detail=VÆRDI:equalization=true|false (for mantiuk06) + + + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + colorsaturation=VÆRDI:contrastenhancement=VÆRDI:luminancelevel=VÆRDI:setluminance=true|false (for mantiuk08) + + + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + localcontrast=VÆRDI:eq=2|4:simple=true|false (for ashikhmin) + + + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + sigma_s=VÆRDI:sigma_r=VÆRDI:base=VÆRDI (for durand) + + + bias=VALUE (for drago) + bias=VÆRDI (for drago) + + + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + local=true|false:autolum=true|false:cone=VÆRDI:rod=VÆRDI:multiplier=VÆRDI (for pattanaik) + + + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + scales=true|false:key=VÆRDI:phi=VÆRDI:num=VÆRDI:low=VÆRDI:high=VÆRDI (for reinhard02) + + + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + brightness=VÆRDI:chroma=VÆRDI:lightness=VÆRDI (for reinhard05) + + + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + (standard er contrast=0.3:equalization=false:saturation=1.8, se også -o) + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + -o --output LDR_FIL Filnavn du vil gemme din tone mappede LDR til. + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + -q --quality VÆRDI Kvalitet af den gemte tone mappede fil (0-100). + + + (No tonemapping is performed unless -o is specified). + (Ingen tone mapping udføres med mindre -o specificeres). + + + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + + Du skal enten indlæse en eksisterende HDR-fil (via -l option) eller specificere INPUTFILER for at oprette en ny HDR. + + + + DnDOption + + Drag and Drop + Træk og slip + + + <b>What would you like to do with the file(s)?</b> + <b>Hvad vil du gerne gøre med filen(erne)?</b> + + + &Open + &Indlæs + + + Open an existing HDR image + Indlæs et eksisterende HDR-billede + + + &New + &Ny + + + Create a new HDR image from one or more images + Opret et nyt HDR-billede udfra et eller flere billeder + + + &Cancel + &Annuller + + + Cancel the drag and drop process and return to the main window + Annuller træk og slip-processen og returnér til hovedvinduet + + + + EditingTools + + Pan the image to a region + Panorér billedet to en region + + + Maskable + Maskérbart + + + Good image + Godt billede + + + Ed&itable + Red&igerbart + + + R&eference + R&eference + + + Choose a directory and a prefix + Vælg en mappe og et præfiks + + + + EditingToolsDialog + + Editing Tools + Redigeringsværktøjer + + + Visualization and Navigation + Visualisering og navigering + + + Fit to window + Tilpas til vindue + + + &Fit to Window + &Tilpas til vindue + + + Original size + Original størrelse + + + Origina&l Size + Origina&l størrelse + + + Zoom In + Zoom ind + + + Zoom &In + Zoom &ind + + + Zoom Out + Zoom ud + + + Zoom &Out + Zoom &ud + + + &Mode: + Til&stand: + + + Difference (E-P) + Forskel (E-P) + + + Overlay (E+P) + Overlapning (E+P) + + + Editable Only (E) + Kun redigerbart (E) + + + Pivot Only (P) + Kun pivot (P) + + + Antighosting Mask + Antighosting-maske + + + Brush + Pensel + + + Lasso + Lasso + + + Images List + Billedliste + + + Ed&itable + Red&igerbart + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The currently selected image is the one that you can shift and paint an anti-ghosting mask on.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Det valgte billede er det, du kan forskyde og tegne antighosting-maske på.</p></body></html> + + + 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. + + + Select the previous image in both lists + Vælg det forrige billede i begge lister + + + Use this button to move the selection to the previous image in both lists. + Brug denne knap for at vælge det forrige billede i begge lister. + + + Select the next image in both lists + Vælg det næste billede i begge lister + + + Use this button to move the selection to the next image in both lists. + Brug denne knap for at vælge det næste billede i begge lister. + + + R&eference + R&eference + + + The reference image is the one currently selected + Referencebilledet er det, der i øjeblikket er valgt + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The image currently selected in this list serves as a reference position for the editable image</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Det valgte billede i denne liste fungerer som referenceposition for det redigerbare billede</p></body></html> + + + Tools + Værktøjer + + + Crop the stack of images after a selection with the left mouse button has been made + Beskær billedstakken efter en markering er lavet med venstre musetast + + + Clicking this button you will be able to crop all the images to the size that you have previously selected with the left mouse button (press and hold the left mouse button and move the pointer to select a crop area, then press this button). + Ved at klikke på denne knap kan du beskære alle billederne til den størrelse, du tidligere har markeret med venstre musetast (klik og hold venstre musetast og flyt musemarkøren for at markere et beskæringsområde, og klik derefter denne knap). + + + &Crop All Images + &Beskær alle billeder + + + Ctrl+X + Ctrl+X + + + &Anti Ghosting + &Anti-ghosting + + + &Save Images + &Gem billeder + + + Ctrl+S + Ctrl+S + + + Mask + Maske + + + A&dd + &Tilføj + + + &Remove + &Fjern + + + Size: + Størrelse: + + + &Strength: + &Styrke: + + + Lasso - Draw a free hand selection area + Lasso - frihåndstegn markeringsområde + + + Brush - Paint the mask using the brush + Pensel - tegn masken ved hjælp af penslen + + + Save mask + Gem maske + + + ... + ... + + + Apply saved mask + Anvend gemt maske + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This area shows the preview (using the preview mode on the left) between the editable and reference image.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the same image is selected in both the editable and reference list, this area will show the image itself.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicking and holding the left mouse button you will be able to select a crop area.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dette område viser preview (ved hjælp af preview-tilstand til venstre) mellem det redigerbare og reference-billedet.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hvis det samme billede vælges i både redigerbar-listen og reference-listen, vil dette område vise selve billedet.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ved at klikke og holde venstre musetast kan du vælge et beskæringsområde.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Shift values for the currently selected editable image</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Forskydningsværdier for det valgte redigerbare billede</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here the user can view and set the shift values for the currently selected editable image</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Her kan brugeren se og sætte forskydningsværdierne for det valgte redigerbare billede</p></body></html> + + + Shift values for editable image + Forskydningsværdier for redigerbart billede + + + Reset the shift values for the currently selected movable image + Nulstil forskydningsværdierne for det valgte flytbare billede + + + &Reset + &Nulstil + + + Reset the shift values for all the images + Nulstil forskydningsværdierne for alle billederne + + + Reset &All + Nulstil &alle + + + &Horizontal: + &Vandret: + + + &Vertical: + &Lodret: + + + Insert an horizontal shift value for the currently selected movable image + Indsæt en vandret forskydningsværdi for det valgte flytbare billede + + + px + px + + + Insert a vertical shift value for the currently selected movable image + Indsæt en lodret forskydningsværdi for det valgte flytbare billede + + + Move up of 1 pixel the currently selected movable image + Flyt det valgte flytbare billede 1 pixel op + + + Move down of 1 pixel the currently selected movable image + Flyt det valgte flytbare billede 1 pixel ned + + + Move right of 1 pixel the currently selected movable image + Flyt det valgte flytbare billede 1 pixel til højre + + + Move left of 1 pixel the currently selected movable image + Flyt det valgte flytbare billede 1 pixel til venstre + + + Histogram + Histogram + + + Get information about the graphical elements + Få information om de grafiske elementer + + + &What's this? + &Hvad er dette? + + + Shift+F1 + Shift+F1 + + + &Next > + &Næste > + + + &Cancel + &Annuller + + + + GenericViewer + + Pan the image to a region + Panorér billedet to en region + + + + HdrCreationManager + + The image %1 is an 8 bit format (LDR) while the previous ones are not. + Billedet %1 er et 8-bit-format (LDR), mens de forrige ikke er det. + + + The image %1 has an invalid size. + Billedet %1 har en ugyldig størrelse. + + + The image %1 is an 16 bit format while the previous ones are not. + Billedet %1 er et 16-bit-format, mens de forrige ikke er det. + + + + HdrInputLoader + + ERROR loading %1 + FEJL under indlæsning af %1 + + + ERROR: The file<br>%1<br> is not a 8 bit or 16 bit tiff. + FEJL: Filen<br>%1<br> er ikke en 8-bit eller 16-bit tiff. + + + ERROR: %1 + FEJL: %1 + + + ERROR: Failed Loading file: %1 + FEJL: Fejl under indlæsning af fil: %1 + + + + 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 + + + Logarithmic + Logaritmisk + + + + HdrWizard + + HDR Creation Wizard + HDR-oprettelsesguide + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">HDR-oprettelsesguide</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dette værktøj hjælper dig med at sammensætte grupperede billeder, som er taget med forskellige eksponeringer, for oprettelse af et <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR-billede</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">De grupperede billeder skal være taget med det samme kamera under de samme forhold og helst med et stativ.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Denne guide vil hjælpe dig igennem alle skridtene: importering af billeder, positionering af dem, valg af en profil for oprettelse af et HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Begrænsninger:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle billeder skal have samme dimensioner</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle billeder skal have samme farvedybde</p></body></html> + + + [1/2] Load Input Images + [1/2] Indlæs inputbilleder + + + Currently Loaded &Files + Indlæste &filer + + + Add Images + Tilføj billeder + + + ... + ... + + + Remove Selected Image + Fjern valgt billede + + + Clear List + Ryd liste + + + Preview + Preview + + + + Selected Image &Exposure + Valgt billedes &eksponering + + + EV: + EV: + + + Alignment + Positionering + + + &Autoalign images + &Autopositionér billeder + + + Hugin's align_image_stack + Hugins align_image_stack + + + MTB + MTB + + + Auto-crop + Autobeskær + + + <!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 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:12pt; font-weight:600;">Start loading a set of images with different exposure</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 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:12pt; font-weight:600;">Start indlæsning en mængde billeder med forskellig eksponering</span></p></body></html> + + + [2/2] Choose Settings for HDR Creation + [2/2] Vælg indstillinger for HDR-oprettelse + + + Choose one of the predefined profiles: + Vælg en af de prædefinerede profiler: + + + <!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:'DejaVu 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';">The first predefined profile in the list usually leads to best results. Change it only if the resulting HDR image is not good enough.</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:'DejaVu 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';">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 2 + Profil 2 + + + Profile 3 + Profil 3 + + + Profile 4 + Profil 4 + + + Profile 5 + Profil 5 + + + Profile 6 + Profil 6 + + + Weighting function: + Vægtningsfunktion: + + + Triangular + Triangulær + + + Response curve: + Responskurve: + + + Linear + Lineær + + + HDR creation model: + HDR-oprettelsesmodel: + + + Debevec + Debevec + + + Anti-ghosting (beta!) + Anti-ghosting (beta!) + + + Gamma + Gamma + + + Log + Log + + + Calibration + Kalibrering + + + Amount of iterations: + Antal iterationer: + + + Keep it small + Hold det lavt + + + 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 + Brugerdefinerert konfiguration + + + <!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 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:12pt; font-weight:600;">Choose one of the predefined profiles or use a custom configuration</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 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:12pt; font-weight:600;">Vælg en af de prædefinerede profiler eller brug en brugerdefineret konfiguration</span></p></body></html> + + + [2/2] Choose Custom Configuration + [2/2] Vælg brugerdefineret konfiguration + + + Weights: + Vægte: + + + Choose confidence function over all the possible pixel values: + Vælg en tillidsfunktion over alle mulige pixelværdier: + + + Gaussian + Gaussian + + + Plateau + Plateau + + + Response Curve: + Responskurve: + + + Predefined response curves: + Prædefinerede responskurver: + + + Load response function from file + Indlæs responsfunktion fra fil + + + Load... + Indlæs... + + + Use calibration to find response curve (robertson02 algorithm) + Brug kalibrering for at finde responskurve (robertson02-algoritme) + + + Save response function to file: + Gem responsfunktion til fil: + + + Save As... + Gem som... + + + HDR Creation Equation: + HDR-oprettelsesligning: + + + Choose model: + Vælg model: + + + Robertson + Robertson + + + Save Settings + Gem indstillinger + + + <!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 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:12pt; font-weight:600;">Here you can customize the HDR creation process</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 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:12pt; font-weight:600;">Her kan du lave brugerindstillinger for HDR-oprettelsesprocessen</span></p></body></html> + + + &Next > + &Næste > + + + &Cancel + &Annuller + + + Image Filename + Billedfilnavn + + + Exposure + Eksponering + + + Custom config %1 + Brugerdefineret konfiguration %1 + + + 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 + + + Loading... + Indlæser... + + + Start loading a set of images with different exposure + Start indlæsning af en mængde billeder med forskellig eksponering + + + <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> + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + <font color="#FF0000"><h3><b>ADVARSEL:</b></h3></font> Luminance HDR kunne ikke finde de relevante <i>EXIF</i>-tags +for de følgende billeder: + <ul> %1</ul> <hr>Du kan stadig fortsætte med at oprette et HDR. For at gøre dette, skal du <b>manualt</b> indsætte EV (eksponeringsværdier) eller stop-forskelsværdier. <hr>Hvis du vil have Luminance HDR til at gøre dette <b>automatically</b>, skal du indlæse billeder, der har mindst det følgende EXIF-data: <ul><li>Lukkerhastighed (seconder)</li> <li>Blænde (f-tal)</li></ul> <hr><b>HINT:</b> Bearbejdning af billeder leder ofte til tab af EXIF-data.<br> Du kan foretage en <b>en-til-en-kopiering af EXIF-data</b> mellem to mængder af billeder via <i><b>"Værktøjer->Kopiér EXIF-data..."</b></i>-menupunktet. + + + EXIF data not found + EXIF-data ikke fundet + + + <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> + + + Loading Error: + Indlæsningsfejl: + + + Unknown + Ukendt + + + Error... + Fejl... + + + align_image_stack failed to align images. + align_image_stack kunne ikke positionere billeder. + + + 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>" crashede... + + + 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 + + + &Finish + &Færdig + + + Aligning... + Positionerer... + + + Processing... + Beregner... + + + Load a camera response curve file + Indlæs en kamera-responskurve-fil + + + Camera response curve (*.m);;All Files (*) + Kamera-responskurve (*.m);;Alle filer (*) + + + Save a camera response curve file + Gem en kamera-responskurve-fil + + + Weights: + Vægte: + + + - Response curve: + - Responskurve: + + + - Model: + - Model: + + + Logarithmic + Logaritmisk + + + From Calibration + Fra kalibrering + + + From File: + Fra fil: + + + <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> + + + + HelpBrowser + + Luminance HDR Help + Luminance HDR hjælp + + + Luminance Help + Luminance hjælp + + + &Print... + &Udskriv... + + + &Exit + &Afslut + + + &Find... + &Find... + + + Find &Next... + Find &næste... + + + Find &Previous... + Find &forrige... + + + &Add + &Tilføj + + + &Delete + &Slet + + + D&elete All + S&let alle + + + Help SideBar + Hjælp sidebar + + + LuminanceHDR Online Help + Luminance HDR online hjælp + + + &File + &Fil + + + &Edit + &Redigér + + + &View + &Vis + + + &Bookmarks + &Bogmærker + + + &Quit + &Afslut + + + Find &Next + Find &næste + + + Find &Previous + Find &forrige + + + &Contents + &Indhold + + + &Search + &Søg + + + &Add Bookmark + &Tilføj bogmærke + + + 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 +associated with the protocol? + Denne protokol kan ikke håndteres af hjælpebrowseren. +Vil du åbne linket med standardapplikationen, +der er associeret med protokollen? + + + + HelpSideBar + + Contents + Indhold + + + &Contents + &Indhold + + + Se&arch + S&øg + + + Searching is case insensitive + Søgning er ikke versalfølsom + + + &Search + &Søg + + + 1 + 1 + + + Book&marks + Bog&mærker + + + &Add + &Tilføj + + + &Remove + &Fjern + + + R&emove All + F&jern alle + + + + IOWorker + + ERROR: The following file is not readable: %1 + FEJL: Den følgende fil er ikke læsbar: %1 + + + ERROR: File %1 has unsupported extension. + FEJL: Fil %1 har en ikke understøttet endelse. + + + ERROR: Failed loading file: %1 + FEJL: Fejl ved indlæsning af fil: %1 + + + + ImageQualityDialog + + Unknown + Ukendt + + + + ImgQualityDialog + + Save as + Gem som + + + Saved File Quality + Gemt filkvalitet + + + Unknown + Ukendt + + + Ca&lculate + &Beregn + + + &Save + &Gem + + + &Cancel + &Annuller + + + File size + Filstørrelse + + + Quality + Kvalitet + + + + LdrViewer + + LDR image [%1 x %2] + LDR-billede [%1 × %2] + + + + LevelsDialog + + Levels and Gamma + Niveauer og gamma + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Adjust Color Levels</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Justér farveniveauer</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Input Levels</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Inputniveauer</span></p></body></html> + + + Clip black + Beskær sort + + + Gamma + Gamma + + + Clip White + Beskær hvid + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Output Levels</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<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;">Output-niveauer</span></p></body></html> + + + &Reset + &Nulstil + + + &Cancel + &Annuller + + + &OK + &Ok + + + + MainWindow + + Luminance HDR + Luminance HDR + + + &Tools + Værk&tøjer + + + &Help + &Hjælp + + + &Windows + &Vinduer + + + &View + V&is + + + HDR &Histogram + HDR &Histogram + + + &Toolbars + &Værktøjslinier + + + Preview Panel + Preview-panel + + + &File + &Fil + + + &Edit + &Redigér + + + Main Toolbar + Hoved-værktøjslinie + + + &New HDR image... + &Nyt HDR-billede... + + + New HDR image + Nyt HDR-billede + + + Create a new HDR image from a set of LDR or Raw images + Opret et nyt HDR-billede fra en mængde LDR- eller RAW-billeder + + + Create a new HDR image from a set of JPEG, Raw, or 8/16 bpc TIFF files + Opret et nyt HDR-billede fra en mængde JPEG-, RAW eller 8/16-bpc TIFF-filer + + + Ctrl+N + Ctrl+N + + + &Open HDR image... + &Åbn HDR-billede... + + + Open HDR image + Åbn HDR-billede + + + Load an existing HDR image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) + Indlæs n eksisterende HDR-billedfil (OpenEXR, Radiance RGBE, PFS-strøm, RAW eller TIFF) + + + Ctrl+O + Ctrl+O + + + &Save as... + &Gem som... + + + Save as... + Gem som... + + + Save image (HDR or LDR) + Gem billede (HDR eller LDR) + + + Ctrl+S + Ctrl+S + + + &Quit + &Afslut + + + Quit Luminance HDR + Afslut Luminance HDR + + + Exit + Afslut + + + Ctrl+Q + Ctrl+Q + + + Rotate c&ounter-clockwise + Rotér m&od uret + + + Rotate counter-clockwise + Rotér mod uret + + + Rotate counter-clockwise the HDR image + Rotér HDR-billedet mod uret + + + < + < + + + Rotate c&lockwise + Rotér m&ed uret + + + Rotate clockwise + Rotér med uret + + + Rotate clockwise the HDR image + Rotér HDR-billedet med uret + + + > + > + + + Low Dynamic Range + Low Dynamic Range + + + L + L + + + Fit to Dynamic Range + Tilpas til dynamic range + + + Fit to dynamic range + Tilpas til dynamic range + + + \ + \ + + + Shrink Dynamic Range + Indskrænk dynamic range + + + [ + [ + + + Extend Dynamic Range + Udvid til dynamic range + + + ] + ] + + + Decrease Exposure + Formindsk eksponering + + + 0 + 0 + + + &Increase Exposure + &Forøg eksponering + + + 9 + 9 + + + &Contents... + &Indhold... + + + About... + Om... + + + Open user manual for Luminance HDR + Åbn brugermanual for Luminance HDR + + + F1 + F1 + + + &Normal Size + &Normal størrelse + + + Normal size + Normal størrelse + + + View HDR image at its normal size + Vis HDR-billede i sit normale størrelse + + + O + O + + + Zoom &In + Zoom &ind + + + Zoom in + Zoom ind + + + + + + + + + Zoom &Out + Zoom &ud + + + Zoom out + Zoom ud + + + - + - + + + &Fit in Window + &Tilpas til vindue + + + Fit in Window + Tilpas til vindue + + + Make the HDR image fit its window + Vis HDR-billedet så det passer til vinduet + + + W + W + + + &Preferences... + &Indstillinger... + + + Luminance Options + Luminance indstillinger + + + Set various options of Luminance + Sæt diverse indstillinger for Luminance + + + Ctrl+P + Ctrl+P + + + &Resize... + &Skalér + + + Resize the HDR image + Skalér HDR-billedet + + + Change size of the HDR image + Ændr størrelsen på HDR-billedet + + + Ctrl+R + Ctrl+R + + + Copy &Exif Data... + Kopiér &EXIF-data... + + + Copy Exif Data + Kopiér EXIF-data + + + Copy Exif data between two sets of files + Kopiér EXIF-data mellem to mængder af filer + + + Ctrl+E + Ctrl+E + + + &About Qt + &Om Qt + + + Show information about Qt + Vis information om Qt + + + Show information about Qt library that is used by Luminance + Vis information om Qt-biblioteket, som bruges af Luminance + + + Text &under Icons + Tekst &under ikoner + + + &Icons Only + Kun &ikoner + + + &Text Only + Kun &tekst + + + Text &Alongside Icons + Tekst ved &siden af ikoner + + + &Batch Tone Mapping... + Tone mapping jobliste... + + + Convert multiple HDR images to LDR + Konvertér flere HDR-billeder til LDR + + + Convert multiple HDR images to LDR using existing settings files + Konvertér flere HDR-billeder til LDR ved hjælp af eksisterende indstillingsfiler + + + Ctrl+B + Ctrl+B + + + &What's This? + &Hvad er dette? + + + Get verbose information about user interface elements + Få uddybet information om brugerfladeelementer + + + Shift+F1 + Shift+F1 + + + About &Luminance HDR + Om &Luminance HDR + + + Show information about Luminance HDR + Vis information om Luminance HDR + + + Show information about Luminance HDR, its authors and contributors + Vis information om Luminance HDR, dets forfattere og bidragsydere + + + Save HDR image &preview... + Gem HDR-billede preview... + + + Save the current HDR Preview to an LDR file + Gem det aktuelle HDR-preview som en LDR-fil + + + &Projective Transformation... + &Projektiv transformering... + + + Apply projective transformation to the current HDR image + Anvend projektiv transformering til det aktuelle HDR-billede + + + &Crop to Selection + &Beskær til markering + + + Crop to Selection + Beskær til markering + + + Crop the image to selection rectangle + Beskær billedet til det markerede rektangel + + + Click and drag inside image area to create a selection, then use this button to crop to a new HDR image + Klik og træk i billedeområdet for at lave en markering, og brug derefter denne knap til at beskære til et nye HDR-billede + + + Remove &Selection + Fjern &markering + + + Remove selection rectangle + Fjern det markerede rektangel + + + Remove selection rectangle from image area + Fjern det markerede rektangel fra billedområdet + + + Make a &Donation + Gør en &donering + + + Ctrl+D + Ctrl+D + + + Lock Viewers + Lås viewers + + + Synchronize viewers mode (fit, fill or 1:1). + Synkronisér viewers-tilstand (tilpas, udfyld eller 1:1). + + + Lock the images for sync view + Lås billederne for synk view + + + Minimize + Minimér + + + Maximize + Maksimér + + + Bring All to Front + Bring alt til forgrunden + + + Show Preview Panel + Vis preview-panel + + + Show/Hide Preview Panel + Vis/gem preview-panel + + + Ctrl+V + Ctrl+V + + + Adjust &Levels + Justér &niveauer + + + Adjust Levels + Justér niveauer + + + Tune the histogram for the current LDR + Finjustér histogrammet efter det aktive LDR + + + Ctrl+L + Ctrl+L + + + Save All + Gem alle + + + Save All LDR files + Gem alle LDR-filer + + + Remove Tab + Fjern faneblad + + + Ctrl+W + Ctrl+W + + + Fill Window + Udfyld vindue + + + Fill window with the current viewer + Udfyld vindue med den aktive viewer + + + Batch HDR... + HDR jobliste... + + + Ctrl+H + Ctrl+H + + + Soft Proofing + Soft proofing + + + Gamut Check + Gamut-check + + + Show on the right + Vis til højre + + + Show on the bottom + Vis i bunden + + + Realtime Previews + Realtids-previews + + + Ready. Now open an existing HDR image or create a new one! + 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 + Fejl under gemning + + + Done! + Færdig! + + + Aborting... + Afbryder... + + + Cropped Image + Beskåret billede + + + 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? + + + Untitled + Ikke-navngivet + + + Untitled %1 + Ikke-navngivet %1 + + + Error: %1 + Fejl: %1 + + + 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. + +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? + + + Update + Opdatér + + + + PreferencesDialog + + Preferences + Indstillinger + + + External Tools + Eksterne værktøjer + + + HDR Options + HDR-indstillinger + + + Interface + + + + Tone Mapping + Tone mapping + + + RAW Conversion + RAW-konvertering + + + Color Management + Farvehåndtering + + + Language + Sprog + + + Default Previews Width + Standard-preview-bredde + + + px + px + + + Saves the settings along the program files, to be portable + Gemmer indstillinger sammen med programfiler, for at være portabelt + + + Portable mode + Portabel tilstand + + + Always show Preview Panel + Vis altid preview-panel + + + Always show Wizard first page + Vis altid guidens første side + + + HDR TIFF Default File Format + HDR TIDD standard-filformat + + + Good quality and smaller file size + God kvalitet og mindre filstørrelse + + + LogLuv TIFF (float, 16bit per color channel) + LogLuv TIFF (float, 16 bit pr. farvekanal) + + + Better quality, larger file size, better compatibility with other applications + Bedre kvalitet, større filstørrelse, bedre kompabilitet med andre programmer + + + Float TIFF (float, 32bit per color channel) + Float Tiff (float, 32 bit per farvekanal) + + + Show negative numbers as: + Vis negative tal som: + + + Show nan and +/-Inf values as: + Vis nan- og +/-uendelig-værdier som: + + + Temporary Working Folder + Midlertidig arbejdsmappe + + + &Browse... + &Gennemse... + + + Amount of threads to use on multicore/SMP machines + Antal tråde, der skal bruges på multikerne-/SMP-maskiner + + + Batch Tonemapping Number of Threads + Antal tråde for tone mapping-jobliste + + + General + Generelt + + + Quality: + Kvalitet: + + + <!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;">Quality (interpolation)</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 demosaicing RAW images decoding interpolation method. A demosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw data received from the color-filtered image sensor internal to many digital cameras in form of a matrix of colored pixels. Also known as CFA interpolation or color reconstruction, another common spelling is demosaicing. There are 4 methods to demosaicing RAW images:</p> +<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;">Bilinear</span>: use high-speed but low-quality bilinear interpolation (default - for slow computer). In this method, the red value of a non-red pixel is computed as the average of the adjacent red pixels, and similar for blue and green.</p> +<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;">VNG</span>: use Variable Number of Gradients interpolation. This method computes gradients near the pixel of interest and uses the lower gradients (representing smoother and more similar parts of the image) to make an estimate.</p> +<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;">PPG</span>: use Patterned Pixel Grouping interpolation. Pixel Grouping uses assumptions about natural scenery in making estimates. It has fewer color artifacts on natural images than the Variable Number of Gradients 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;">AHD</span>: use Adaptive Homogeneity-Directed interpolation. This method selects the direction of interpolation so as to maximize a homogeneity metric, thus typically minimizing color artifacts.</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;">Kvalitet (interpolering)</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 dekodnings-interpoleringsmetode for demosaicing af RAW-billeder. En demosaicing-algoritme er en digital billedbehandlingsproces, der bruges til at interpolere et komplet billede fra den delvise rådata (RAW), der modtages fra den farvefiltrerede billedsensor, der sidder i mange digitalkameraer, som en matrice af farvelagte pixels. Også kendt som CFA-interpolering eller farverekonstruktion, en anden almindelig stavemåde er demosaicing. Der er 4 metoder for demosaicing af RAW-billeder:</p> +<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;">Bilineær</span>: brug højhastigheds men lavkvalitets-bilineær interpolering (standard - for langsomme computere). Med denne metode bliver rødværdien for en ikke-rød pixel beregnet som gennemsnittet for de tilstødende røde pixels, og ligeledes for blå og grønne.</p> +<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;">VNG</span>: brug Variable Number of Gradients interpolering. Denne metode beregner gradienter nær den ønskede pixel og bruger de lavere gradients (der repræsenterer blødere og mere ensartede dele af billedet) for at gøre et estimat.</p> +<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;">PPG</span>: brug Patterned Pixel Grouping interpolering. Pixel Grouping bruger antagelser om naturlige scener for at gøre estimater. Den har færre farveartifakter på naturbilleder end Variable Number of Gradients metoden.</p> +<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;">AHD</span>: brug Adaptive Homogeneity-Directed interpolering. Denne metode vælger retningen for interpolering, sådan at den maksimerer en homogen måling, og dermed typisk minimerer farveartifakter.</p></body></html> + + + Bilinear + Bilineær + + + VNG + VNG + + + PPG + PPG + + + AHD + AHD + + + ... + ... + + + Median: + Median: + + + <!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;">Median Filter</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 passes used by median filter applied after interpolation to Red-Green and Blue-Green channels.</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;">Median-filter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indstil her antal bearbejdninger med medianfilter, udført efter interpolering til rød-grøn- og blå-grøn-kanaler.</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;">Do not stretch or rotate pixels</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For Fuji Super CCD cameras, show the image tilted 45 degrees. For cameras with non-square pixels, do not stretch the image to its correct aspect ratio. In any case, this option guarantees that each output pixel corresponds to one RAW pixel.</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;">Stræk og rotér ikke pixels</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For Fuji Super CCD-kameraer, vil billedet roteret 45°. For kameraer med ikke-kvadratiske pixels, stræk ikke billedet til dets korrekte højde/breddeforhold. Uanset, + + + Do not stretch or rotate pixels + Stræk og rotér ikke pixels + + + <!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;">Interpolate RGB as four colors</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The default is to assume that all green pixels are the same. If even-row green pixels are more sensitive to ultraviolet light than odd-row this difference causes a mesh pattern in the output; using this option solves this problem with minimal loss of detail.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To resume, this option blurs the image a little, but it eliminates false 2x2 mesh patterns with VNG quality method or mazes with AHD quality method.</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;">Interpolér RGB som fire farver</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Standardindstillinger er at formode, at alle grønne pixels er de samme. Hvis grønne pixels i lige rækker er mere sensitive for ultraviolet lys end grønne pixels i ulige rækker, forårsager denne forskel et netmønster i output'et; ved at bruge denne indstilling løses problemet med et minimalt tab af detaljer.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Gentagne gange slører denne indstilling billedet en smule, men den eliminerer falske 2×2 netmønstre med VNG-kvalitetsmetode eller mazes med AHD-kvalitetsmetode.</p></body></html> + + + Interpolate RGB using 4 colours + Interpolér RGB ved brug af 4 farver + + + White Balance + Hvidbalance + + + Method + Metode + + + <!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;">White Balance Method</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Configure the raw white balance :</p> +<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;">Default D65</span>: Use a standard daylight D65 white balance (dcraw defaults)</p> +<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;">Camera</span>: Use the white balance specified by the camera. If not available, reverts to default neutral white balance</p> +<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;">Automatic</span>: Calculates an automatic white balance averaging the entire image</p> +<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;">Manual</span>: Set a custom temperature and green level values</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;">Hvidbalancemetode</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Konfigurér RAW-hvidbalance:</p> +<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;">Standard D65</span>: Brug en standard dagslys-D65 hvidbalance (dcraw standard)</p> +<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;">Kamera</span>: Brug den hvidbalance, kameraet har specificeret. Hvis ikke tilgængelig, brug i stedet standard neutral hvidbalance</p> +<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;">Automatisk</span>: Udregner en automatisk hvidbalance over et gennemsnit af hele billedet</p> +<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;">Manuelt</span>: Sæt en brugerdefineret temperatur og grøn-level-værdi</p></body></html> + + + Predefined D65 + Prædefineret D65 + + + Camera + Kamera + + + Auto + Auto + + + Manual + Manuelt + + + Temperature (Kelvin) + Temperatur (Kelvin) + + + <!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;">Temperature</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 color temperature in Kelvin.</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;">Temperatur</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt her farvetemperaturen i Kelvin.</p></body></html> + + + Green + Grøn + + + Set here the green component to set magenta color cast removal level + Sæt her den grønne komponent for at sætte fjernelsesniveau for magenta farveskygge + + + Highlights + Højlys + + + <!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> + + + Solid White + Solid hvid + + + Do not transform + Transformér ikke + + + Blend + Bland + + + Reconstruct + Rekonstruér + + + Level + Niveau + + + <!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;">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;">Niveau</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt højlys-genopbygnings-niveau. Lave værdier favoriserer hvide nuancer, og høje værdier favoriserer farver.</p></body></html> + + + Correct false colors in highlights + Ret falske farver i højlys + + + Auto Brightness + Auto-lysstyrke + + + Brightness + Lysstyrke + + + <!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;">Brighness</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 brightness level of output image. The default value is 1.0</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;">Lysstyrke</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt lysstyrkeniveauet for output-billedet. Standardværdien er 1,0</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;">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;">Sortpunkt</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Brug en specifik sortpunkt-værdi under RAW-dekodning af billeder. Hvis du slår denne indstilling fra, vil sortpunkt-værdien blive automatisk udregnet.</p></body></html> + + + Black + Sort + + + <!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;">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;">Sortpunkt-værdi</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Angiv specifik sortpunkt-værdi for output-billedet.</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;">White 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 white point value to decode RAW pictures. If you set this option to off, the White 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;">Hvidpunkt</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Brug en specifik hvidpunkt-værdi under RAW-dekodning af billeder. Hvis du slår denne indstilling fra, vil hvidpunkt-værdien blive automatisk udregnet.</p></body></html> + + + Saturation + Farvemætning + + + <!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;">White 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 white 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;">Hvidpunkt-værdi</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Angiv specifik sortpunkt-værdi for output-billedet.</p></body></html> + + + NR and CA Correction + NR og CA rettelse + + + <!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;">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;">Slå støjreduktion til</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Brug wavelets for at fjerne støj men samtidigt beholde rigtige detaljer.</p></body></html> + + + Enable noise reduction + Slå støjreduktion 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:'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;">Grænseværdi</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt her grænseværdi til brug for støjreduktion.</p></body></html> + + + Threshold: + Grænseværdi: + + + <!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;">Enable Chromatic Aberration correction</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Enlarge the raw red and blue layers by the given factors, typically 0.999 to 1.001, to correct chromatic aberration.</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;">Slå kromatisk aberrationsrettelse til</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Forstør RAW rød og blå lag med de givne faktorer, typisk 0,999 til 1,001, for at rette kromatisk aberration.</p></body></html> + + + Enable Chromatic Aberration correction + Slå kromatisk aberrationsrettelse 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:'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;">Rød multiplikator</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt her forstørrelsesfaktoren for det røde lag</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;">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> + Sæt her forstørrelsesfaktoren for det røde lag + <!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;">Blå multiplikator</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sæt her forstørrelsesfaktoren for det blå lag</p></body></html> + + + Red Component + Rød komponent + + + Blue Component + Blå komponent + + + Monitor + Skærm + + + Monitor Profile + Skærmprofil + + + Browse... + Gennemse... + + + Camera profile + Kameraprofil + + + Printer + Printer + + + Printer profile + Printerprofil + + + align_image_stack command line arguments + align_image_stack kommandolinie-argumenter + + + <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</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:'DejaVu 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';">Læs </span><span style=" font-family:'Sans Serif'; font-style:italic;">Hjælp &gt; Indhold &gt; Indstilling af Luminance &gt; Eksterne værktøjer</span><span style=" font-family:'Sans Serif';"> for at finde ud af mere om align_image_stack kommandolinie-argumenter</span></p></body></html> + + + &Cancel + &Annuller + + + &OK + &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) + + + Color profile (*.icc) + Farveprofil (*.icc) + + + + PreviewSettings + + Load settings + Indlæs indstillinger + + + + ProjectionsDialog + + Projective Transformation + Projektiv transformation + + + Projections + Projekteringer + + + Source Projection: + Kildeprojektering: + + + Polar + Polbaseret + + + Angular + Vinklet + + + Cylindrical + Cylindrisk + + + Mirror Ball + Spejlbold + + + Destination Projection: + Destinationsprojektering: + + + Angles: + Vinkler: + + + ° + ° + + + Bilinear Interpolation + Bilineær interpolering + + + Oversample factor: + Oversamplings-faktor: + + + Rotation (degrees) + Rotering (grader) + + + Yaw: + Yaw: + + + Pitch: + Pitch: + + + Roll: + Roll: + + + &Cancel + &Annuller + + + &OK + &Ok + + + + 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: + + + + QObject + + 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. + + + Option -v -a... + Option -v -a... + + + LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. + Luminance HDR kræver align_image_stack for at kunne køre med "-v -a aligned_" options. Kommandolinie-options er rettet til. + + + Error Opening RAW File + Fejl under indlæsning af RAW-fil + + + Error Unpacking RAW File + Fejl under udpakning af RAW-fil + + + Error Processing RAW File + Fejl under behandling af RAW-fil + + + Memory Error in processing RAW File + Hukommelsesfejl under behandling af RAW-fil + + + Error Creating PFS Frame + Fejl under oprettelse af PFS Frame + + + Cannot convert %1 to a float + Kan ikke konvertere %1 til en float + + + Cannot convert %1 to an integer + Kan ikke konvertere %1 til et heltal + + + 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 %1 threads. + Bruger %1 tråde. + + + Loading file %1 + Indlæser til %1 + + + Successfully loaded file %1. + Indlæste succesfult fil %1. + + + All LDR formats + Alle LDR-formater + + + Save the LDR image as... + Gem LDR-billedet som... + + + All HDR formats + Alle HDR-formater + + + Save the HDR image as... + Gem HDR-billedet som... + + + Save as... + Gem som... + + + 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 + + + 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 + + + + ResizeDialog + + Scale Image + Skalér billede + + + Hdr Image Size + HDR-billede-størrelse + + + Width: + Bredde: + + + Switch between pixels or percentage + Skift mellem pixels og procent + + + Pixels + Pixels + + + Percent + Procent + + + Height: + Højde: + + + Result size + Resulterende størrelse + + + Restore original size + Genopret original størrelse + + + &Reset + &Nulstil + + + &Cancel + &Annuller + + + &Scale + &Skalér + + + + 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 + + + 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 + + Saving Parameters + Gemmer parametre + + + Enter a short comment for the saved parameters: + Skriv en kort kommentar for de gemte parametre: + + + + SplashLuminance + + Luminance HDR - Make a Donation + Luminance HDR - Gør en donering + + + <!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:'Droid Sans'; 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-weight:600; color:#000000;">Luminance HDR</span><span style=" font-family:'Sans Serif'; color:#000000;"> is open-source software and its development required hundreds of hours of work.<br /><br />If you like it, if you use it in your work and you would like to see it gradually improved,<br />please support its authors by making a donation.<br /><br />Would you like to make a donation for Luminance HDR now?</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:'Droid Sans'; 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-weight:600; color:#000000;">Luminance HDR</span><span style=" font-family:'Sans Serif'; color:#000000;"> er open-source software, og udviklingen har taget hundredevis af arbejdstimer.<br /><br />Hvis du kan lide det, hvis du bruger det i dit arbejde, og du kunne tænke dig at se det gradvist forbedret,<br />så støt venligst forfatterne ved at gøre en donering.<br /><br />Kunne du tænke dig at gøre en donering til Luminance HDR nu?</span></p></body></html> + + + Yes, I'd love to! + Ja, det vil jeg gerne! + + + Ask me again later + Spørg mig igen senere + + + No, Stop bothering me! + Nej, stor med at forstyrre mig! + + + + TMOProgressIndicator + + Abort computation + Afbryd beregning + + + + TiffModeDialog + + Save as ...TIFF + Gem som ...TIFF + + + + TonemappingPanel + + Tone mapping operators and their options + Tone mapping operatorer og deres indstillinger + + + Start tonemapping (CTRL+T) + Start tone mapping (Ctrl+T) + + + 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 + + + &Tonemap + &Tone map + + + Ctrl+T + Ctrl+T + + + Update current LDR + Opdatér aktuel LDR + + + Tonemap + Tone map + + + Mantiuk '06 + Mantiuk '06 + + + Mantiuk '08 + Mantiuk '08 + + + Fattal + Fattal + + + Drago + Drago + + + Durand + Durand + + + Reinhard '02 + Reinhard '02 + + + Reinhard '05 + Reinhard '05 + + + Ashikhmin + Ashikhmin + + + Pattanaik + Pattanaik + + + Operator + Operator + + + Contrast Factor + Kontrastfaktor + + + Saturation Factor + Farvemærningsfaktor + + + Detail Factor + Detaljefaktor + + + Contrast Equalization + Kontrast-equalisering + + + Predefined Display + Prædefineret skærm + + + Lcd Office + LCD kontor + + + Lcd + LCD + + + Lcd Bright + LCD lys + + + CRT + CRT + + + Color Saturation + Farvemætning + + + Contrast Enhancement + Kontrastforbedring + + + Enable +Luminace Level + Slå luminansniveau til + + + Luminance Level + Luminansniveau + + + Alpha + Alfa + + + Beta + Beta + + + Noise Reduction + Støjreduktion + + + Version 2.3.0 + Version 2.3.0 + + + Bias + Bias + + + Spatial Kernel Sigma + Spatial kernel sigma + + + Range Kernel Sigma + Range kernel sigma + + + Base Contrast + Base kontrast + + + Key Value + Nøgleværdi + + + Phi + Phi + + + Use Scales + Brug skalaer + + + Range + Interval + + + Lower Scale + Lav skala + + + Upper Scale + Høj skala + + + Brightness + Lysstyrke + + + Chromatic Adaptation + Kromatisk adaptering + + + Light Adaptation + Lysadaptering + + + Local Contrast Threshold + Lokal kontrast-grænseværdi + + + Simple + Simpel + + + Equation Number + Ligning nummer + + + Eqn 2 + Lign 2 + + + Eqn 4 + Lign 4 + + + Multiplier + Multiplikator + + + Local Tone Mapping + Lokal tone mapping + + + Auto Cone/Rod + Auto Cone/Rod + + + Cone Level + Cone-niveau + + + Rod Level + Rod-niveau + + + Restore operator's default values + Genopret operators standardværdier + + + Restore + Genopret + + + Previous applied settings + Forrige anvendte indstillinger + + + Previous + Forrige + + + Next applied settings + Næste anvendte indstillinger + + + Next + Næste + + + 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. + + + Tone Mapping Settings + Tone mapping-indstillinger + + + Save current parameters to a text file + Gem aktuelle parametre til en tekstfil + + + Save current parameters (pregamma and TMO) to a text file. + Gem aktuelle parametre (præ-gamma og TMO) til en tekstfil. + + + &Save to File + &Gem til fil + + + Load an existing text file containing pregamma and TMO settings + Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger + + + Load an existing text file containing pregamma and TMO settings. + Indlæs en eksisterende tekstfil med prægamma- og TMO-indstillinger. + + + &Load from File + &Indlæs fra fil + + + Save current parameters + Gem aktuelle parametre + + + ... + ... + + + Load saved parameters + Indlæs gemte parametre + + + 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. + + + Process + Fremgang + + + &Result Size + &Resultatstørrelse + + + Gamma applied before tonemapping + Gamma anvendt før tone mapping + + + Pre-gamma + Præ-gamma + + + Restore pregamma's default value (1) + Genopret standardværdi for præ-gamma (1) + + + Size of the resulting LDR image + Størrelse af den resulterende LDR-fil + + + Here you can choose the size of the resulting LDR image. + Her kan du vælge størrelsen af den resulterende LDR-billede. + + + 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. + + + 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: + + + + TonemappingSettings + + Load Custom Settings + Indlæs brugerdefinerede indstillinger + + + Sort by + Sortér efter + + + Comment + Kommentar + + + Operator + Operator + + + Most Useful Operators + Mest brugbare operators + + + Cancel + Annuller + + + Comments: + Kommentarer: + + + Tonemap + Tone map + + + Load + Indlæs + + + + TransplantExifDialog + + Copy Exif data + Kopiér EXIF-data + + + From + Fra + + + Append files to the list + Tilføj filer til listen + + + Remove selected file(s) from the list + Fjern valgt(e) fil(er) fra listen + + + Move up selected file(s) + Flyt valgt(e) fil(er) op + + + Move down selected file(s) + Flyt valgt(e) fil(er) ned + + + To + Til + + + Log + Log + + + Exif operations report + EXIF-operationsrapport + + + &Show only: + &Vis kun: + + + Filter messages based on severity + Filtrér beskeder baseret på alvorlighed + + + All messages + Alle beskeder + + + Errors only + Kun fejl + + + &Filter log messages: + &Filtrér logbeskeder: + + + Clear filter text + Nulstil filtertekst + + + Keep existing Exif tags in destination file + Behold eksisterende EXIF-tags i destinationsfil + + + &Cancel + &Annuller + + + &Start + &Start + + + All Supported formats + Alle understøttede formater + + + Select the input images + Vælg inputbilleder + + + &Done + &Færdig + + + + 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 + + + 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 + + + + UpdateChecker + + A new release is ready for download! + En ny udgivelse er klar til download! + + + Click to download, or select Help->Update! + Klik for at downloade, eller vælg Hjælp->Opdatér! + + + Do you want to open the webpage for download now? + Vil du åbne websiden for download nu? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_de.ts luminance-hdr-2.3.1/i18n/lang_de.ts --- luminance-hdr-2.3.0/i18n/lang_de.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_de.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,13 +90,16 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + Änderungshistorie + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + @@ -299,6 +302,14 @@ Fortfahren? + + Auto-crop + Bilder automatisch zuschneiden + + + Custom config %1 + Eigene Konfiguration %1 + BatchTMDialog @@ -415,10 +426,6 @@ Lade Dateien mit Dynamikkompressionsvorgaben ... - LuminanceHDR tone mapping settings text file (*.txt) - Datei mit Dynamikkompressionsvorgaben für Luminance HDR (*.txt) - - All tasks completed. Alle Aufgaben abgeschlossen. @@ -439,10 +446,6 @@ Qualität des Ausgabebildes - Saving using file format: %1 - Speichere im Dateiformat: %1 - - Ouput Image Width: Breite des Ausgabebildes: @@ -514,6 +517,38 @@ Alt+M + + Output Format: + Ausgabeformat: + + + JPEG + + + + TIFF (16 bits) + TIFF (16 Bit) + + + PNG + + + + BMP + + + + PPM + + + + PBM + + + + Luminance HDR tone mapping settings text file (*.txt) + Datei mit Dynamikkompressionsvorgaben für Luminance HDR (*.txt) + BatchTMJob @@ -609,64 +644,12 @@ Kommandozeilenschnittstelle zu %1. - -h --help Display this help. - -h --help Zeigt diese Hilfe. - - - -v --verbose Print more messages during execution. - -v --verbose Zeigt während der Ausführung mehr Meldungen an. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB Die für die HDR-Erzeugung zu verwendende Ausrichtungsmethode (Standard: keine Ausrichtung). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Gibt die numerischen Belichtungswerte (EV-Werte) an (so viele wie QUELLDATEIEN). - - - -c --config HDR creation config. Possible values: - -c --config Optionen zur HDR-Erzeugung. Mögliche Werte: - - - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load HDR_FILE Lädt eine HDR-Datei anstatt eine neue zu erzeugen. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save HDR_FILE Speichert eine HDR-Datei. (Standard: nicht speichern) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VALUE Gamma-Wert für die Dynamikkompression. (Standard: 1) - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize VALUE Breite, auf die das HDR-Bild skaliert wird (geschieht vor Gammakorrektur und Dynamikkompression) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Operator für die Dynamikkompression. Mögliche Werte sind: - - - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions Einstellungen für Dynamikkompressionsoperatoren. Mögliche Werte sind: - - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (für mantiuk06) colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (für mantiuk08) - - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output LDR_FILE Dateiname, unter dem das dynamikkomprimierte LDR-Bild gespeichert wird. - - - (No tonemapping is performed unless -o is specified). - (Dynamikkompression wird nur ausgeführt, falls -o angegeben ist). + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (für mantiuk08) You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. @@ -767,8 +750,64 @@ Fehler: Qualität muss im Bereich [0-100] liegen. - -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Qualität der gespeicherten dynamikkomprimierten Datei (0-100). + -h --help Display this help. + -h --help Zeigt diese Hilfe. + + + -v --verbose Print more messages during execution. + -v --verbose Zeigt während der Ausführung mehr Meldungen an. + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + -a --align AIS|MTB Die für die HDR-Erzeugung zu verwendende Ausrichtungsmethode (Standard: keine Ausrichtung). + + + -d --savealigned prefix Save aligned images to files which names start with prefix + -d --savealigned prefix Speichert ausgerichtete Bilder in Dateien, deren Namen mit prefix beginnen + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + -e --ev EV1,EV2,... Gibt die numerischen Belichtungswerte (EV-Werte) an (so viele wie QUELLDATEIEN). + + + -c --config HDR creation config. Possible values: + -c --config Optionen zur HDR-Erzeugung. Mögliche Werte: + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + -l --load HDR_FILE Lädt eine HDR-Datei anstatt eine neue zu erzeugen. + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + -s --save HDR_FILE Speichert eine HDR-Datei. (Standard: nicht speichern) + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + -g --gamma VALUE Gamma-Wert für die Dynamikkompression. (Standard: 1) + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + -r --resize VALUE Breite, auf die das HDR-Bild skaliert wird (geschieht vor Gammakorrektur und Dynamikkompression) + + + -t --tmo Tone mapping operator. Legal values are: + -t --tmo Operator für die Dynamikkompression. Mögliche Werte sind: + + + -p --tmoptions Tone mapping operator options. Legal values are: + -p --tmoptions Einstellungen für Dynamikkompressionsoperatoren. Mögliche Werte sind: + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + -o --output LDR_FILE Dateiname, unter dem das dynamikkomprimierte LDR-Bild gespeichert wird. + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + -q --quality VALUE Qualität der gespeicherten dynamikkomprimierten Datei (0-100). + + + (No tonemapping is performed unless -o is specified). + (Dynamikkompression wird nur ausgeführt, falls -o angegeben ist). @@ -816,6 +855,22 @@ Choose a directory and a prefix Verzeichnis und Präfix wählen + + Maskable + Maskierbar + + + Good image + Gutes Bild + + + Ed&itable + Ed&itierbar + + + R&eference + R&eferenz + EditingToolsDialog @@ -860,10 +915,6 @@ Ver&kleinern - Preview &Mode: - Vorschau&modus: - - Pivot Only (P) Nur Pivot (P) @@ -872,10 +923,6 @@ Anti-Ghosting-Maske - Mask Color - Maskierungsfarbe - - Images List Bilderliste @@ -942,22 +989,10 @@ Strg+S - A&dd Mask - Maske h&inzufügen - - - Remove Mas&k - Maske e&ntfernen - - Size: Größe: - pixels - Pixel - - &Strength: S&tärke: @@ -1111,6 +1146,50 @@ Histogram Histogramm + + &Mode: + &Modus: + + + Brush + Pinsel + + + Lasso + Lasso + + + Mask + Maske + + + A&dd + H&inzufügen + + + &Remove + E&ntfernen + + + Lasso - Draw a free hand selection area + Lasso - Einen Bereich freihändig auswählen + + + Brush - Paint the mask using the brush + Pinsel - Die Maske mit dem Pinsel malen + + + Save mask + Maske speichern + + + ... + + + + Apply saved mask + Gespeicherte Maske anwenden + GenericViewer @@ -1231,44 +1310,6 @@ Assistent zur HDR-Erzeugung - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">Assistent zur HDR-Erzeugung</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dieses Werkzeug hilft dabei, aus Fotos, die mit unterschiedlicher Belichtung aufgenommen wurden, ein <a href="http://de.wikipedia.org/wiki/High_Dynamic_Range_Image"><span style=" text-decoration: underline; color:#0057ae;">HDR-Bild</span></a> zu erzeugen. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Die unterschiedlich belichteten Fotos müssen mit derselben Kamera, unter gleichen Bedingungen und möglichst mit einem Stativ aufgenommen werden.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dieser Assistent führt durch alle Schritte: Bildimport, Ausrichtung und Wahl des Profils zur HDR-Erzeugung.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bedingungen:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle Bilder müssen dasselbe Ausmaß haben.</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle Bilder müssen dieselbe Farbtiefe besitzen.</p></body></html> - - Add Images Bilder hinzufügen @@ -1545,14 +1586,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - <font color="#FF0000"><h3><b>WARNUNG:</b></h3></font> Luminance HDR konnte die relevanten <i>EXIF</i>-Tags in den folgenden Bildern nicht finden: - <ul> %1</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>Verschlusszeit (in Sekunden)</li> <li>Blende (f-Wert)</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 <i><b>"Extras -> EXIF-Daten kopieren ..."</b></i> zur Verfügung. - - Loading Error: Fehler beim Laden: @@ -1621,10 +1654,6 @@ Von Kalibrierung - From File - Aus Datei - - <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> @@ -1636,6 +1665,68 @@ align_image_stack failed to align images. align_image_stack konnte die Bilder nicht ausrichten. + + Auto-crop + Bilder automatisch zuschneiden + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">Assistent zur HDR-Erzeugung</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dieses Werkzeug hilft dabei, aus Fotos, die mit unterschiedlicher Belichtung aufgenommen wurden, ein <a href="http://de.wikipedia.org/wiki/High_Dynamic_Range_Image"><span style=" text-decoration: underline; color:#0057ae;">HDR-Bild</span></a> zu erzeugen. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Die unterschiedlich belichteten Fotos müssen mit derselben Kamera, unter gleichen Bedingungen und möglichst mit einem Stativ aufgenommen werden.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dieser Assistent führt durch alle Schritte: Bildimport, Ausrichtung und Wahl des Profils zur HDR-Erzeugung.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bedingungen:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle Bilder müssen dasselbe Ausmaß haben.</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle Bilder müssen dieselbe Farbtiefe besitzen.</p></body></html> + + + Save Settings + Einstellungen speichern + + + Custom config %1 + Eigene Konfiguration %1 + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + <font color="#FF0000"><h3><b>WARNUNG:</b></h3></font> Luminance HDR konnte die relevanten <i>EXIF</i>-Tags in den folgenden Bildern nicht finden: + <ul> %1</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>Verschlusszeit (in Sekunden)</li> <li>Blende (f-Wert)</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 <i><b>"Extras -> EXIF-Daten kopieren ..."</b></i> zur Verfügung. + + + From File: + Aus Datei: + HelpBrowser @@ -1837,14 +1928,6 @@ Qualität der zu speichernden Datei - Quality: - Qualität: - - - File size: - Dateigröße: - - Unknown Unbekannt @@ -1860,6 +1943,14 @@ &Cancel Abbre&chen + + File size + Dateigröße + + + Quality + Qualität + LdrViewer @@ -2100,30 +2191,10 @@ Strg+E - &Align Images... - Bilder a&usrichten ... - - - WORK IN PROGRESS - WIRD VERARBEITET - - &About Qt Über &Qt - &Tile - &Nebeneinander - - - &Cascade - &Gestapelt - - - Cascade - Gestapelt - - Convert multiple HDR images to LDR Mehrere HDR- in LDR-Bilder konvertieren @@ -2300,10 +2371,6 @@ Fehler: %1 - Toolbars - Symbolleisten - - &Preferences... &Einstellungen ... @@ -2531,36 +2598,48 @@ Gamut Check Farbumfang-Prüfung - - - PreferencesDialog - Tone Mapping - Dynamikkompression + Preview Panel + Vorschaubereich - External Tools - Externe Programme + Show on the right + Am rechten Rand anzeigen - JPEG - + Show on the bottom + Am unteren Rand anzeigen - PNG - + Realtime Previews + Echtzeit-Vorschau - PPM - + Fattal Warning + Fattal-Warnung - PBM - + 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. + +Willst du ihn dennoch anwenden? - BMP - + Update + Aktualisierung + + + + PreferencesDialog + + Tone Mapping + Dynamikkompression + + + External Tools + Externe Programme Preferences @@ -2595,10 +2674,6 @@ Negative Werte anzeigen als: - Which LDR image format to save to - Auswahl des zu speichernden LDR-Bildformats - - Amount of threads to use on multicore/SMP machines Anzahl zu verwendender Threads auf Mehrkern- bzw. Mehrprozessormaschinen @@ -2665,14 +2740,6 @@ Ablageort für temporäre Daten - Batch Tonemapping Default Output Format - Standardausgabeformat für Stapel-Dynamikkompression - - - TIFF - - - Batch Tonemapping Number of Threads Anzahl Threads für Stapel-Dynamikkompression @@ -3144,48 +3211,28 @@ Color profile (*.icc *.ICC *.icm *.ICM) Farbprofil (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Mantiuk '06 - - - - Mantiuk '08 - - - - Fattal - - - - Drago - - - Durand - + Saves the settings along the program files, to be portable + Speichert die Einstellungen zusammen mit den Programmdateien, um portabel zu sein - Reinhard '02 - + Portable mode + Portabler Modus - Reinhard '05 - + Restart + Neu starten - Ashikhmin - - - - Pattanaik - + For the settings to take effect, please restart the application! + Um die Änderungen zu übernehmen, muss die Anwendung neu gestartet werden! + + + PreviewSettings - Preview - Vorschau + Load settings + Einstellungen laden @@ -3281,14 +3328,6 @@ QObject - Aborting... - Abbrechen ... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Kann das Qt-JPEG-Plug-in nicht finden ...<br>Das DLL-Paket sollte mit der Option "Pfadangaben verwenden" entpackt werden. - - All LDR formats Alle LDR-Formate @@ -3392,6 +3431,138 @@ I cannot perform the color transform. Please select a different monitor profile. Farbraumkonvertierung konnte nicht durchgeführt werden. Bitte anderes Bildschirmprofil wählen. + + 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 + + + + Beta + + + + NoiseRedux + Rauschunterdrückung + + + FFTSolver + FFT-Funktion + + + simple + einfach + + + Equation 2 + Eqn 2 + + + Equation 4 + Eqn 4 + + + Local + Schwellenwert + + + Bias + + + + 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 + ResizeDialog @@ -3645,6 +3816,13 @@ + TiffModeDialog + + Save as ...TIFF + Speichern als TIFF ... + + + TonemappingPanel TM Database Problem @@ -3800,10 +3978,6 @@ Aus Datei &laden - Load parameters by comment - Parameter per Kommentar laden - - Load saved parameters Gespeicherte Parameter laden @@ -4038,18 +4212,42 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning - Fattal-Warnung + Load Custom Settings + Eigene Einstellungen laden - 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. - -Willst du ihn dennoch anwenden? + Sort by + Sortieren nach + + + Comment + Kommentar + + + Operator + + + + Most Useful Operators + Gebräuchlichste Operatoren + + + Cancel + Abbrechen + + + Comments: + Kommentare: + + + Tonemap + Anwenden + + + Load + Laden @@ -4167,4 +4365,19 @@ Später erinnern + + UpdateChecker + + A new release is ready for download! + Eine neue Version kann heruntergeladen werden! + + + Click to download, or select Help->Update! + Klicken zum Herunterladen oder Hilfe -> Aktualisierung wählen! + + + Do you want to open the webpage for download now? + Möchtest du jetzt die Webseite für den Download öffnen? + + diff -Nru luminance-hdr-2.3.0/i18n/lang_es.ts luminance-hdr-2.3.1/i18n/lang_es.ts --- luminance-hdr-2.3.0/i18n/lang_es.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_es.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Seleccione un directorio - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -308,42 +315,14 @@ Toneado en serie - Add &Directory - Añadir &Directorio - - - &Add Files - &Añadir Archivos - - - &Remove Files - &Borrar Archivos - - List of HDRs that will be tone mapped Lista de HDR que serán toneados - Add D&irectory - Añadir &Directorio - - - Add Fi&les - Añadir A&rchivos - - - R&emove Files - B&orrar archivos - - Output Salida - Select &Output Folder... - Seleccione carpeta de &destino... - - &Show only: &Mostrar solo: @@ -376,30 +355,6 @@ &Hecho - Add all the HDRs in a directory to the list - Añadir todos los HDRs del directorio a la lista - - - Add single HDR files to the list - Añadir archivos HDR a la lista - - - Remove single HDR files to the list - Eliminar archivos HDR de la lista - - - Add all the Tone Mapping Setting files in a directory to the list - Añadir a la lista todos los archivos de configuración en el directorio - - - Add single Tone Mapping Setting files to the list - Añadir a la lista archivos de configuración - - - Remove single Tone Mapping Setting files to the list - Eliminar de la lista archivos de configuración - - List of Tone Mapping Setting files that will be used to tone map each HDR Lista de configuraciones de toneados que serán utilizados para tonear cada HDR @@ -464,10 +419,6 @@ - LuminanceHDR tone mapping settings text file (*.txt) - - - Start processing... @@ -492,10 +443,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -567,6 +514,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -646,14 +625,6 @@ Error: No puedo guardar el archivo %1 - Cannot convert %1 to a float - No puedo convertir %1 a flotante - - - Cannot convert %1 to an integer - No puedo convertir %1 a entero - - Error: Unknown weight function specified. Error: Indicada función de altura desconocida. @@ -670,164 +641,168 @@ - -h --help Display this help. + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - -v --verbose Print more messages during execution. + (Default is weight=triangular:response_curve=linear:model=debevec) - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + (Default is mantiuk06) - -c --config HDR creation config. Possible values: + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - (Default is weight=triangular:response_curve=linear:model=debevec) + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - -l --load HDR_FILE Load an HDR instead of creating a new one. + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + bias=VALUE (for drago) - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - -t --tmo Tone mapping operator. Legal values are: + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - (Default is mantiuk06) + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - -p --tmoptions Tone mapping operator options. Legal values are: + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + Load file %1 failed - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + EV values have been assigned. - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + Creating (in memory) the HDR. - localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + Saving to file %1. - sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + Image %1 saved successfully - bias=VALUE (for drago) + Could not save %1 - local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + NOT Saving HDR image to file. %1 - scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + Tonemapping requested, saving to file %1. - brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + Failed loading images - (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + Failed aligning images. - -o --output LDR_FILE File name you want to save your tone mapped LDR to. + Error: Quality must be in the range [0-100]. - (No tonemapping is performed unless -o is specified). + -h --help Display this help. - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - + -v --verbose Print more messages during execution. - Load file %1 failed + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - EV values have been assigned. + -d --savealigned prefix Save aligned images to files which names start with prefix - Creating (in memory) the HDR. + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - Saving to file %1. + -c --config HDR creation config. Possible values: - Image %1 saved successfully + -l --load HDR_FILE Load an HDR instead of creating a new one. - Could not save %1 + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - NOT Saving HDR image to file. %1 + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - Tonemapping requested, saving to file %1. + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - Failed loading images + -t --tmo Tone mapping operator. Legal values are: - Failed aligning images. + -p --tmoptions Tone mapping operator options. Legal values are: - Error: Quality must be in the range [0-100]. + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Quality of the saved tone mapped file (0-100). + (No tonemapping is performed unless -o is specified). @@ -876,6 +851,22 @@ Pan the image to a region + + Maskable + + + + Good image + + + + Ed&itable + E&ditables + + + R&eference + R&eferencia + EditingToolsDialog @@ -920,10 +911,6 @@ R&educir ampliación - Preview &Mode: - Modo &Previsualización: - - Pivot Only (P) Solo puntos de anclaje (P) @@ -932,10 +919,6 @@ Mascara Antighosting - Mask Color - Máscara de color - - Images List Lista de imágenes @@ -1002,22 +985,10 @@ Ctrl+S - A&dd Mask - &Añadir máscara - - - Remove Mas&k - &Eliminar máscara - - Size: Tamaño: - pixels - pixels - - &Strength: &Fuerza: @@ -1171,6 +1142,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + + + + Apply saved mask + + GenericViewer @@ -1435,35 +1450,10 @@ Desde calibración - From File - Desde archivo - - HDR Creation Wizard - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Currently Loaded &Files @@ -1628,13 +1618,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1662,6 +1645,50 @@ align_image_stack failed to align images. + + Auto-crop + + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + HelpBrowser @@ -1865,23 +1892,23 @@ - Quality: + Unknown - File size: + Ca&lculate - Unknown + &Save - Ca&lculate + File size - &Save + Quality @@ -2108,30 +2135,10 @@ Ctrl+E - &Align Images... - &Alinear imágenes... - - - WORK IN PROGRESS - TAREA EN PROCESO - - &About Qt Ac&erca de Qt - &Tile - &Mosaico - - - &Cascade - &Cascada - - - Cascade - Cascada - - Ctrl+N Ctrl+N @@ -2144,10 +2151,6 @@ Modificaciones no guardadas... - Toolbars - Barra de Herramientas - - &Preferences... &Preferencias... @@ -2555,32 +2558,42 @@ Gamut Check - - - PreferencesDialog - Tone Mapping - Tone Mapping + Preview Panel + - JPEG - JPEG + Show on the right + + + + Show on the bottom + + + + Realtime Previews + - PNG - PNG + Update + - PPM - PPM + Fattal Warning + - PBM - PBM + 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? + + + + PreferencesDialog - BMP - BMP + Tone Mapping + Tone Mapping &Cancel @@ -2647,14 +2660,6 @@ - Which LDR image format to save to - - - - TIFF - - - Amount of threads to use on multicore/SMP machines @@ -2962,10 +2967,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3061,47 +3062,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Reinhard '02 - Reinhard '02 - - - Reinhard '05 - Reinhard '05 - - - Mantiuk '06 - - - - Mantiuk '08 - - - - Fattal - - - Drago + Saves the settings along the program files, to be portable - Durand + Portable mode - Ashikhmin + Restart - Pattanaik + For the settings to take effect, please restart the application! + + + PreviewSettings - Preview + Load settings @@ -3198,14 +3179,6 @@ QObject - Aborting... - Cancelando... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - No puedo encontrar complemento de Qt's para JPEGs... <br>Por favor descomprima el paquete de DLL con la opción "usar nombres de directorios" activado. - - Save as... Guardar como... @@ -3309,159 +3282,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Reescalar imagen + PreGamma=%1 + - Width: - Anchura: + Contrast Equalization + Equalización de Contraste - Pixels - Pixels + Contrast + - Percent - Porcentaje + Saturation + - Height: - Altura: + Detail + - Restore original size - Restaurar dimensiones originales + Luminance Level + - &Reset - &Restaurar + Luminance Level=Auto + - &Cancel - &Cancelar + Color Saturation + Saturación de color - &Scale - R&eescalar + Contrast Enhancement + - Hdr Image Size - Dimensiones de imagen Hdr + Alpha + Alpha - Switch between pixels or percentage - Intercambiar entre porcentajes de pixels + Beta + Beta - Result size - Tamaño resultante + NoiseRedux + - - - SavedParameters - Simple - Simple + FFTSolver + - Local Contrast Threshold - Umbral de contraste local + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Bias + Bias - Spatial Kernel Sigma - Spatial Kernel Sigma + Spatial + - Range Kernel Sigma - Range Kernel Sigma + Range + Rango - Base Contrast - Contraste + Base + - Alpha - Alpha + Multiplier + Multiplicador - Beta - Beta + AutoLuminance + - Color Saturation - Saturación de color + Cone + - Noise Reduction - Reducción de ruido + Rod + - Contrast Equalization - Equalización de Contraste + Key + - Contrast Factor - Facto de Constraste + Phi + Phi - Saturation Factor - Factor de Saturacion + Scales: + - Cone and Rod based on Luminance - Cono y barra basado en luminancia + Lower + - Cone Level - Nivel de cono + Upper + - Rod Level - Nivel de cono + Brightness + Brillo - Multiplier - Multiplicador + Chromatic Adaptation + Adaptación cromática - Use Scales - Usar escalas + Light Adaptation + Adaptación lumínicia + + + ResizeDialog - Key Value - Valor clave + Scale Image + Reescalar imagen - Range - Rango + Width: + Anchura: - Lower Scale - Escala baja + Pixels + Pixels - Upper Scale - Escala alta + Percent + Porcentaje - Brightness - Brillo + Height: + Altura: - Chromatic Adaptation - Adaptación cromática + Restore original size + Restaurar dimensiones originales - Light Adaptation - Adaptación lumínicia + &Reset + &Restaurar + + + &Cancel + &Cancelar + + + &Scale + R&eescalar + + + Hdr Image Size + Dimensiones de imagen Hdr + + + Switch between pixels or percentage + Intercambiar entre porcentajes de pixels + + + Result size + Tamaño resultante @@ -3661,6 +3663,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Load a tonemapping settings text file... @@ -3927,10 +3936,6 @@ - Load parameters by comment - - - ... @@ -4054,15 +4059,41 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning + Load Custom Settings - 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? + Sort by + + + + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4097,10 +4128,6 @@ &Hecho - Log: - Log: - - Exif operations report Informe de operaciones EXIF @@ -4185,4 +4212,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_fi.ts luminance-hdr-2.3.1/i18n/lang_fi.ts --- luminance-hdr-2.3.0/i18n/lang_fi.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_fi.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Valitse hakemisto - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -313,62 +320,10 @@ Muunnettavat HDR-kuvat - Add all the HDRs in a directory to the list - Lisää kaikki hakemiston HDR-kuvat listaan - - - Add &Directory - Lisää &Hakemisto - - - Add single HDR files to the list - Lisää HDR-kuva listalle - - - &Add Files - &Lisää tiedostot - - - Remove single HDR files to the list - Poista yksittäisiä HDR-kuvia listalta - - - &Remove Files - &Poista Tiedostot - - List of HDRs that will be tone mapped Lista tonemapattavista HDR-kuvista - Tone Mapping Settings Files - Tonemappauksen asetustiedostot - - - Add all the Tone Mapping Setting files in a directory to the list - Lisää kaikki tonemappauksen asetustiedostot hakemistosta listalle - - - Add D&irectory - Lisää &Hakemisto - - - Add single Tone Mapping Setting files to the list - Lisää yksittäinen tonemappauksen asetustiedosto listalle - - - Add Fi&les - &Lisää tiedostot - - - Remove single Tone Mapping Setting files to the list - Poista yksittäisiä tonemappauksen asetustiedostoja listalta - - - R&emove Files - &Poista Tiedostot - - List of Tone Mapping Setting files that will be used to tone map each HDR Lista HDR-kuvien tonemappaukseen käytettävistä asetustiedostoista @@ -381,10 +336,6 @@ Lopputulos - Select &Output Folder... - Valitse &kohdekansio... - - Conversion Log Muuntoloki @@ -457,10 +408,6 @@ Lataa tonemappauksen asetusten tekstitiedostot... - LuminanceHDR tone mapping settings text file (*.txt) - LuminanceHDR tonemappauksen asetusten tekstitiedosto(*.txt) - - Processing... Prosessoidaan... @@ -497,10 +444,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -572,6 +515,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -659,14 +634,6 @@ VIRHE: Ei voida tallentaa tiedostoon: %1 - Cannot convert %1 to a float - Ei voida muuntaa %1 liukuluvuksi - - - Cannot convert %1 to an integer - Ei voida muuntaa %1 kokonaisluvuksi - - Usage: %1 [OPTIONS]... [INPUTFILES]... Käyttö: %1 [OPTIONS]... [INPUTFILES]... @@ -675,26 +642,6 @@ Komentorivirajapinta %1. - -h --help Display this help. - -h --help Näytä apua. - - - -v --verbose Print more messages during execution. - -v --verbose Näytä enemmän viestejä ajon aikana. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB HDR-kuvan luomisessa käytettävä kohdistusmoottori (oletus: ei kohdistusta). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Määritä numeeriset EV-arvot (niin monta kuin TIEDOSTOJA). - - - -c --config HDR creation config. Possible values: - -c --config HDR:n luomisen määritys. Mahdollisest arvot: - - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=sinun_tiedostosi_tähän.m @@ -703,34 +650,10 @@ (Oletus on weight=triangular:response_curve=linear:model=debevec) - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load HDR_FILE Lataa HDR uuden luomisen sijasta. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save HDR_FILE Tallenna HDR tiedostoformaatissa. (oletus: älä tallenna) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VALUE Gamma-arvo, jota käytetään tonemappauksessa. (oletus: 1) - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize VALUE Leveys, johon HDR:n koko muutetaan (koko muutetaan ennen gammaa ja tonemappausta) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Tonemappausoperaattori. Sallitut arvot ovat: - - (Default is mantiuk06) (Oletus on mantiuk06) - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions Tonemappausoperaattorien asetukset. Sallitut arvot ovat: - - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (fattalille) @@ -767,14 +690,6 @@ (oletus on contrast=0.3:equalization=false:saturation=1.8, katso myös -o) - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output LDR_FILE Tiedostonimi tallennettavalle LDR:lle. - - - (No tonemapping is performed unless -o is specified). - (Tonemappausta ei tehdä mikäli -o ei ole määritetty). - - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. Sinun täytyy joko ladata olemassa oleva HDR-tiedosto ( -l asetuksella) tai määrittää INPUTFILES luodaksesi uuden HDR:n. @@ -832,7 +747,63 @@ - -q --quality VALUE Quality of the saved tone mapped file (0-100). + -h --help Display this help. + + + + -v --verbose Print more messages during execution. + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + -c --config HDR creation config. Possible values: + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + -t --tmo Tone mapping operator. Legal values are: + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + (No tonemapping is performed unless -o is specified). @@ -881,6 +852,22 @@ Pan the image to a region Panoroi kuva alueelle + + Maskable + + + + Good image + + + + Ed&itable + &Muokattava + + + R&eference + Ve&rtaus + EditingToolsDialog @@ -925,10 +912,6 @@ L&oitonna - Preview &Mode: - &Esikatselutila: - - Difference (E-P) Ero (E-P) @@ -949,10 +932,6 @@ Haamukuvamaski - Mask Color - Maskin väri - - Images List Kuvalista @@ -1043,22 +1022,10 @@ Ctrl+S - A&dd Mask - &Lisää maski - - - Remove Mas&k - &Poista maski - - Size: Koko: - pixels - pikselit - - &Strength: &Voimakkuus: @@ -1176,6 +1143,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + &Poista + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + ... + + + Apply saved mask + + GenericViewer @@ -1260,44 +1271,6 @@ HDR-luontivelho - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">HDR-luontivelho</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tämä työkalu auttaa sinua yhdistämään eri valotuksilla haarukoidut kuvat luodaksesi <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR-kuvan</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Haarukoidut kuvat pitää ottaa samalla kameralla, samoissa olosuhteissa ja mahdollisesti kolmijalkaa käyttäen.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tämä avustaja auttaa sinut kaikkien tarvittavien vaiheiden läpi: kuvien tuominen, niiden kohdistaminen sekä profiilin valitseminen HDR-kuvan luomiseksi.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Rajoitukset:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Kaikkien kuvien pitää olla saman kokoisia</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Kaikissa kuvissa pitää olla sama värisyvyys</p></body></html> - - [1/2] Load Input Images [1/2] Lataa syötettävät kuvat @@ -1638,10 +1611,6 @@ Kalibroinnista - From File - Tiedostosta - - <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> @@ -1678,13 +1647,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1700,17 +1662,61 @@ align_image_stack failed to align images. - - - HelpBrowser - Luminance HDR Help - Luminance HDR-ohje + Auto-crop + - Luminance Help - Luminance ohje - + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + + + + HelpBrowser + + Luminance HDR Help + Luminance HDR-ohje + + + Luminance Help + Luminance ohje + &Print... &Tulosta... @@ -1901,14 +1907,6 @@ Tallennetun tiedoston laatu - Quality: - Laatu: - - - File size: - Tiedoston koko: - - Unknown Tuntematon @@ -1924,6 +1922,14 @@ &Cancel &Peruuta + + File size + + + + Quality + + LdrViewer @@ -2292,14 +2298,6 @@ Ctrl+E - &Align Images... - &Kohdista kuvat... - - - WORK IN PROGRESS - TYÖ KÄYNNISSÄ - - &About Qt &Tietoja Qt:sta @@ -2312,22 +2310,6 @@ Näyttää tietoa Qt-kirjastosta jota Luminance käyttää - &Tile - &Järjestä vierekkäin - - - &Cascade - &Limitä - - - Cascade - Limitä - - - Toolbars - Työkaluvalikot - - Text &under Icons Teksti ikonien &alla @@ -2472,14 +2454,6 @@ Tallenna nimellä... - Next Image - Seuraava kuva - - - Previous Image - Edellinen kuva - - Adjust &Levels Säädä &tasoja @@ -2603,68 +2577,54 @@ Gamut Check - - - PreferencesDialog - - Preferences - Asetukset - - Interface - Käyttöliittymä - - - Tone Mapping - Tonemappaus - - - External Tools - Lisätyökalut - - - Czech - Tsekki + Preview Panel + - English - Englanti + Show on the right + - French - Ranska + Show on the bottom + - German - Saksa + Realtime Previews + - Indonesian - Indonesia + Update + - Italian - Italia + Fattal Warning + - Polish - Puola + 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? + + + + PreferencesDialog - Russian - Venäjä + Preferences + Asetukset - Spanish - Espanja + Interface + Käyttöliittymä - Turkish - Turkki + Tone Mapping + Tonemappaus - Hungarian - Unkari + External Tools + Lisätyökalut HDR Options @@ -2695,34 +2655,6 @@ Nan- ja +/-Inf-arvojen väri: - C&hoose - &Valitse - - - Which LDR image format to save to - Mihin LDR-formaattiin tallennetaan - - - JPEG - JPEG - - - PNG - PNG - - - PPM - PPM - - - PBM - PBM - - - BMP - BMP - - Amount of threads to use on multicore/SMP machines Käytettävien säikeiden määrä moniydin/SMP-koneissa @@ -3108,84 +3040,6 @@ <!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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</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;">Kameran profiili</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vailtse väriavaruus, jolla tulkitaan RAW-kuvaa.</p> -<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;">Ei mitän</span>: ei käytetä väriprofiilia RAW-kuvan käännön aikana.</p> -<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;">Sisäinen</span>: käytä RAW-tiedoston sisäistä profiilia jos on olemassa.</p> -<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;">Kustomoitu</span>: käytä kustomoitua väriavaruusprofiilia.</p></body></html> - - - None - Ei mitään - - - Built in - Sisäänrakennettu - - - Custom - Kustomoitu - - - <!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;">Workspace</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 output color space used to decode RAW data.</p> -<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;">Raw (linear)</span>: in this mode, no output color space is used during RAW decoding.</p> -<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;">sRGB</span>: this is a RGB color space, created cooperatively by Hewlett-Packard and Microsoft. It is the best choice for images destined for the Web and portrait photography.</p> -<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;">Adobe RGB</span>: this color space is an extended RGB color space, developed by Adobe. It is used for photography applications such as advertising and fine art.</p> -<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;">Wide Gamut</span>: this color space is an expanded version of the Adobe RGB color space.</p> -<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;">Pro-Photo</span>: this color space is an RGB color space, developed by Kodak, that offers an especially large gamut designed for use with photographic outputs in mind.</p> -<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;">Custom</span>: use a custom output color space profile.</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;">Työtila</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Valitse tässä antoväriavaruus, jolla käännetään RAW-dataa.</p> -<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;">Raw (lineaarinen)</span>: tässä tilassa ei käytetä antoväriavaruutta RAW-kännön aikana.</p> -<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;">sRGB</span>: RGB-väriavaruus, luonut Hewlett-Packard ja Microsoft. Paras valinta nettiin ja muotokuviin.</p> -<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;">Adobe RGB</span>: laajennettu RGB-väriavaruus, kehittänyt Adobe. Käytetään esim. mainoksissa ja huipputaiteessa.</p> -<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;">Wide Gamut</span>: .laajennettu versio Adobe RGB:stä.</p> -<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;">Pro-Photo</span>: RGB-väriavaruus, kehittänyt Kodak. Tarjoaa suuren gamutin, suunniteltu käytettäväksi erityisesti valokuvauksessa.</p> -<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;">Kustomoitu</span>: käytä kustomoitua väriavaruusprofiilia.</p></body></html> - - - RAW - RAW - - - sRGB - sRGB - - - Adobe RGB - Adobe RGB - - - Wide Gamut - Wide Gamut - - - Pro Photo - Pro Photo - - - <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3203,22 +3057,10 @@ &OK - Please restart... - Ole hyvä ja käynnistä uudelleen... - - - Please restart LuminanceHDR to use the new language (%1). - Ole hyvä ja käynnistä LuminanceHDR uudelleen jotta voit käyttää uutta kieltä (%1). - - Choose a directory Valitse hakemisto - Finnish - Suomi - - RAW Conversion @@ -3231,10 +3073,6 @@ - TIFF - - - Language @@ -3255,10 +3093,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3354,48 +3188,28 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Mantiuk '06 - Mantiuk '06 - - - Mantiuk '08 - Mantiuk '08 - - Fattal - Fattal - - - Drago - Drago - - - Durand - Durand - - - Reinhard '02 - Reinhard '02 + Saves the settings along the program files, to be portable + - Reinhard '05 - Reinhard '05 + Portable mode + - Ashikhmin - Ashikhmin + Restart + - Pattanaik - Pattanaik + For the settings to take effect, please restart the application! + + + + PreviewSettings - Preview - Esikatselu + Load settings + @@ -3503,14 +3317,6 @@ Tallenna nimellä... - Aborting... - Keskeytetään... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Qt:n JPEG-pluginia ei löydy...<br>Ole hyvä ja pura DLL-paketti asetus "käytä kansioiden nimiä" aktivoituna. - - All HDR formats Kaikki HDR-formaatit @@ -3602,171 +3408,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Muuta kuvan kokoa + PreGamma=%1 + - Hdr Image Size - HDR-kuvan koko + Contrast Equalization + Kontrastin tasoitus - Width: - Leveys: + Contrast + - Switch between pixels or percentage - Vaihda pikseleiden ja prosenttien välillä + Saturation + - Pixels - Pikselit + Detail + - Percent - Prosentti + Luminance Level + Luminanssin taso - Height: - Korkeus: + Luminance Level=Auto + - Result size - Valmiin kuvan koko + Color Saturation + Värin saturaatio - Restore original size - Palauta alkuperäinen koko + Contrast Enhancement + Kontrastin parannus - &Reset - &Nollaa + Alpha + Alpha - &Cancel - &Peruuta + Beta + Beta - &Scale - &Muuta kuvan kokoa + NoiseRedux + - - - SavedParameters - Simple - Yksinkertainen + FFTSolver + - Local Contrast Threshold - Paikallisen kontrastin kynnysarvo + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Bias + Bias - Spatial Kernel Sigma - Spatial Kernel Sigma + Spatial + - Range Kernel Sigma - Range Kernel Sigma + Range + Range - Base Contrast - Base Contrast + Base + - Alpha - Alpha + Multiplier + Kerroin - Beta - Beta + AutoLuminance + - Color Saturation - Värin saturaatio + Cone + - Noise Reduction - Kohinanpoisto + Rod + - Contrast Equalization - Kontrastin tasoitus + Key + - Contrast Factor - Kontrastin kerroin + Phi + Phi - Saturation Factor - Värikylläisyyden kerroin + Scales: + - Detail Factor - Yksityiskohtien kerroin + Lower + - Contrast Enhancement - Kontrastin parannus + Upper + - Luminance Level - Luminanssin taso + Brightness + Kirkkaus - Cone and Rod based on Luminance - Cone and Rod based on Luminance + Chromatic Adaptation + Kromaattinen adaptaatio - Cone Level - Cone Level + Light Adaptation + Valon adaptaatio + + + + ResizeDialog + + Scale Image + Muuta kuvan kokoa - Rod Level - Rod Level + Hdr Image Size + HDR-kuvan koko - Multiplier - Kerroin + Width: + Leveys: - Use Scales - Use Sclaes + Switch between pixels or percentage + Vaihda pikseleiden ja prosenttien välillä - Key Value - Key Value + Pixels + Pikselit - Range - Range + Percent + Prosentti - Lower Scale - Lower Scale + Height: + Korkeus: - Upper Scale - Upper Scale + Result size + Valmiin kuvan koko - Brightness - Kirkkaus + Restore original size + Palauta alkuperäinen koko - Chromatic Adaptation - Kromaattinen adaptaatio + &Reset + &Nollaa - Light Adaptation - Valon adaptaatio + &Cancel + &Peruuta + + + &Scale + &Muuta kuvan kokoa @@ -3970,6 +3793,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Tone mapping operators and their options @@ -4248,14 +4078,6 @@ &Tonemappaa - undo - Kumoa - - - redo - Tee uudelleen - - Load a tonemapping settings text file... Lataa tonemappauksen asetusten tekstitiedosto... @@ -4284,10 +4106,6 @@ 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. - Virhe, tonemappauksen asetustiedoston formaatti on muuttunut. Tätä (vanhaa) tiedostoa ei voida käyttää LuminanceHDR:n tämän version kanssa. Luo uusi. - - Enter the width of the new size: Sytö uuden koon leveys: @@ -4296,10 +4114,6 @@ Ctrl+T - Load parameters by comment - - - Load saved parameters @@ -4375,31 +4189,41 @@ - TonemappingWarningDialog + TonemappingSettings - Attention! - Huomio! + Load Custom Settings + - Ask again - Kysy uudelleen + Sort by + - 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? - Tämä tonemappausoperaattori on riipuvainen annetun kuvan koosta. Lopputulos on todennäköisesti erilainen, kun operaattoria käytetään täysikokoiseen kuvaan. - -Haluatko jatkaa? + Comments: + - Fattal Warning + Comment - 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? + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4426,34 +4250,6 @@ Lisää tiedostot listalle - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Mistä:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Mihin:</span></p></body></html> - - - Log: - Loki: - - Exif operations report Exif-toimintojen raportti @@ -4546,4 +4342,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_fr.ts luminance-hdr-2.3.1/i18n/lang_fr.ts --- luminance-hdr-2.3.0/i18n/lang_fr.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_fr.ts 2013-04-07 18:41:14.000000000 +0000 @@ -4,69 +4,41 @@ AboutLuminance + About Luminance - À propos de Luminance - - - &About - À &propos - - - A&uthors - A&uteurs - - - &Thanks To - &Remerciements - - - &License Agreement - Termes de &Licence - - - &OK - &OK + À propos de Luminance + <!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:#00007f;">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: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-size:9pt;">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-size:9pt; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" text-decoration: underline; color:#0057ae;">Flickr</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Hugin's </span><span style=" font-size:9pt; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-size:9pt; font-weight:600;"> and more</span><span style=" font-size:9pt;"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-size:9pt;"><br /> Peter Linnell<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Fedora packager and bug reports</span><span style=" font-size:9pt;"><br /> Douglas E. Warner<br /><br /></span><span style=" font-size:9pt; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Various suggestions</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">And also</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> 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:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - + + &About + À &propos + <!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: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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR imaging workflow application<br />(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-2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'Sans Serif'; 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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — Traitement d'image HDR<br />(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, 2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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; } @@ -90,1097 +62,1465 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;">SVP </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">informez-moi</span></a><span style=" font-size:9pt;">, si j'ai oublié quelqu'un sur cette liste.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; font-weight:600;">Développeur Principal 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:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Développeurs Principaux 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:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; font-weight:600;">Améliorations, débogage</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">code de pfs{tools|calibration|tmo}</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Algorithme Mean Threshold Bitmap (MTB) selon G.Ward</span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction russe, amélioration de la convivialité, manuel utilisateur, .fichier de bureau</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction norvégienne</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction turque</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction française</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction espagnole</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction allemande</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction tchèque</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction polonaise</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Traduction roumaine</span><span style=" font-size:9pt; color:#000000;"><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-size:9pt; font-weight:600; color:#000000;">Traduction chinoise</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> - - - - - BatchHDRDialog - - Batch HDR Dialog - - - - Number of bracketed images: - +<span style=" font-size:9pt; font-weight:600; color:#000000;">Rustines FreeBSD et maintenance</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> - Select the number of bracketed pictures used to create the HDRs - + + <!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-size:9pt;">Please </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, if I forgot to add someone to this list.<br /><br /></span><span style=" font-size:9pt; font-weight:600;">All the community on </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" text-decoration: underline; color:#0057ae;">Flickr</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Hugin's </span><span style=" font-size:9pt; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-size:9pt; font-weight:600;"> and more</span><span style=" font-size:9pt;"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Opensuse 10.2 and 10.3 packager</span><span style=" font-size:9pt;"><br /> Peter Linnell<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Fedora packager and bug reports</span><span style=" font-size:9pt;"><br /> Douglas E. Warner<br /><br /></span><span style=" font-size:9pt; font-weight:600;">openSUSE 10.2 packager</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Gentoo Linux Ebuild</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Various suggestions</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">And also</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> 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:'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-size:9pt;">SVP </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">informez-moi</span></a><span style=" font-size:9pt;">, si j'ai oublié quelqu'un sur cette liste.</span></p><br /><br /></span><span style=" font-size:9pt; font-weight:600;">Toute la communauté sur </span><a href="http://www.flickr.com/groups/qtpfsgui"><span style=" text-decoration: underline; color:#0057ae;">Flickr</span></a><span style=" font-size:9pt;"><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-size:9pt; font-weight:600; font-style:italic;">align_image_stack</span><span style=" font-size:9pt; font-weight:600;"> et bien plus de Hugin</span><span style=" font-size:9pt;"><br /> Pablo D'Angelo<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Packageur Opensuse 10.2 et 10.3</span><span style=" font-size:9pt;"><br /> Peter Linnell<br /> <br /></span><span style=" font-size:9pt; font-weight:600;">Packageur Fedora et signalisation de bogues</span><span style=" font-size:9pt;"><br /> Douglas E. Warner<br /><br /></span><span style=" font-size:9pt; font-weight:600;">Packageur openSUSE 10.2 </span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Ebuild Gentoo Linux</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Suggestions diverses</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Débogage et suggestions LDR pour le format Tiff</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">Mais aussi</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - Predefined profile: + + Changelog - Choose one of the creation predefined profiles. -See documentation for more information. + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master - Profile 1 - Profil 1 + + <!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 align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + - Profile 2 - Profil 2 + + A&uthors + A&uteurs - Profile 3 - Profil 3 + + &Thanks To + &Remerciements - Profile 4 - Profil 4 + + &License Agreement + Termes de &Licence - Profile 5 - Profil 5 + + &OK + &OK + + + BatchHDRDialog - Profile 6 - Profil 6 + + Batch HDR Dialog + Dialogue de HDR par lot - Alignment - Alignement + + Number of bracketed images: + Nombre d'images: - Auto align the bracketed pictures - + + + Select the number of bracketed pictures used to create the HDRs + Sélectionner le nombre d'images en fourchette pour la création des HDR - MTB - + + Output + Sortie + Output format: - + Format de sortie: + Choose an HDR output file format - + Choisir un format pour le fichier HDR + hdr - + + exr - + + PFS - + + tiff - + - Folder where bracketed pictures are located (in alphabetical order) - + + Predefined profile: + Profil prédéfini: - Folder where created HDRs are saved - + + 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. - Choose a directory - Choisir un dossier + + Profile 1 + Profil 1 - Started processing... - + + Profile 2 + Profil 2 - Completed with errors - + + Profile 3 + Profil 3 - Completed without errors - + + Profile 4 + Profil 4 - Error: missing EXIF data - + + Profile 5 + Profil 5 - Aligning... - Alignement en cours... + + Profile 6 + Profil 6 - Creating HDR... - + + Alignment + Alignement - Written - + + Auto align the bracketed pictures + Alignement automatique des images en fourchette - Error: - + + Auto-align images + Alignement automatique des images - Auto-align images - + + Auto-crop + Rognage automatique + Use Hugin's align_image_stack engine - + Utiliser align_image_stack de Hugin + Hugin's align_image_stack - Utiliser align_image_stack de Hugin + align_image_stack de Hugin + Use MTB (Median Threshold Bitmap) engine - + Utiliser MTB (Median Threshold Bitmap) - &Cancel - &Annuler - - - &Start - &Lancer + + MTB + - &Close - &Fermer + + Progress + Avancement - Aborting... - Abandon... + + Folder where created HDRs are saved + Dossier où les images HDR sont sauvergardées - Warning - + + + Select... + Sélectionner... - Total number of pictures must be a multiple of number of bracketed images. - + + Folder where bracketed pictures are located (in alphabetical order) + Dossier où les images prises en fourchette sont situées (par ordre alphabétique) - Output - Sortie + + Input folder: + Dossier source: - Progress - + + Output folder: + Dossier de sortie: - Select... - + + &Cancel + &Annuler - Input folder: - + + &Start + &Lancer - Output folder: - + + &Close + &Fermer + Choose a source directory - + Choisir un dossier source + Choose a output directory - + Choisir un dossier de sortie + + + + + + Warning + Attention + + + + + 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. + 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. + +Continuer? + + + + Custom config %1 - - - BatchTMDialog - Batch Tone Mapping - Tone Mapping en groupe + + Started processing... + Processus initié... - Add &Directory - Ajouter &Répertoire + + Creating HDR... + Création du HDR... - &Add Files - &Ajouter Fichiers + + Completed with errors + Achevé avec des erreurs - &Remove Files - Efface&r Fichiers + + Completed without errors + Achevé sans erreurs - List of HDRs that will be tone mapped - Liste des HDRs qui seront tone mappés + + Error: missing EXIF data + Erreur: des données EXIF manquent + + + + Aligning... + Alignement en cours... + + + + Written + Écrit - Add D&irectory - Ajouter Réperto&ire + + Error: + Erreur: - Add Fi&les - Ajouter Fi&chiers + + Aborting... + Abandon... + + + BatchTMDialog - R&emove Files - Effac&er Fichiers + + Batch Tone Mapping + Tone Mapping en groupe - Output - Sortie + + List of HDRs that will be tone mapped + Liste des HDRs qui seront tone mappés - Select &Output Folder... - Ch&oisir le répertoire de sortie... + + Output + Sortie + &Show only: - Montrer &seulement : + Montrer &seulement : + All messages - Tous les messages + Tous les messages + Errors only - Seulement les erreurs + Seulement les erreurs + Clear filter text - Effacer le filtre + Effacer le filtre + &Cancel - &Annuler + &Annuler + + + Choose a directory - Choisir un dossier + Choisir un dossier + + + + Luminance HDR tone mapping settings text file (*.txt) + + Processing... - En cours... + En cours... + Start processing... - Initier le processus... + Initier le processus... + Close - Fermer + Fermer + &Done - &Fini + &Fini + HDR Images to Convert - Images HDR à Convertir + Images HDR à Convertir - Add all the HDRs in a directory to the list - Ajouter tous les HDRs d'un répertoire à la liste + + Add Directory (Alt+D) + Ajouter Dossier (Alt+D) - Add single HDR files to the list - Ajouter les HDR séparément à la liste + + + + + + + + ... + - Remove single HDR files to the list - Retirer les HDR séparément à la liste + + Alt+D + - Tone Mapping Settings Files - Fichiers de configuration pour le Tone Mapping + + Add Files (Alt+F) + Ajouter Fichiers (Alt+F) - Add all the Tone Mapping Setting files in a directory to the list - Ajouter tous les fichiers de paramètres tone mapping à la liste + + Alt+F + - Add single Tone Mapping Setting files to the list - Ajouter séparément les fichiers de paramètres tone mapping à la liste + + Remove Files (Alt+R) + Retirer Fichiers (Alt+R) - Remove single Tone Mapping Setting files to the list - Retirer séparément les fichiers de paramètres tone mapping à la liste + + Alt+R + - 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 + + Tone Mapping Settings + Paramètres de tone mapping - Specify output folder for the tone mapped files - Indiquer le répertoire de sortie pour les fichiers tone mappés + + Add Directory (Alt+I) + Ajouter Dossier (Alt+I) - Conversion Log - Journal de Conversion + + Alt+I + - Batch operations report - Rapport du traitement groupée + + Add Files (Alt+L) + Ajouter Fichiers (Alt+L) - Filter messages based on severity - Trier les messages en fonction de la gravité + + Alt+L + - Success messages - Messages de réussite + + Add from Database (Alt+B) + Ajouter à partir d'une base de donnée (Alt+B) - &Filter log messages: - Filtre du journal: + + Alt+B + - Overall completion progress - Achèvement global + + Remove Settings (Alt+M) + Retirer les réglages (Alt+M) - Start batch tone mapping - Lancer le tone mapping groupé + + Alt+M + - &Start - &Lancer + + 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 - Using %1 thread(s) - %1 processus en cours d'utilisation + + Specify output folder for the tone mapped files + Indiquer le répertoire de sortie pour les fichiers tone mappés - All HDR images - Toutes les images HDR + + Ouput Image Width: + Largeur Image de Sortie: - Select input images - Sélection des images à traiter - - - Load tone mapping settings text files... - Charger les fichiers de configuation pour le tone mapping... + + % + - LuminanceHDR tone mapping settings text file (*.txt) - Fichier de configuatiorn pour le tone mapping de LuminanceHDR (*.txt) + + Output Image Quality + Qualité Image de Sortie - All tasks completed. - Toutes les tâches sont accomplies. + + Output Format: + - Aborting... - Abandon... + + JPEG + - Tone Mapping Settings - Paramètres de tone mapping + + TIFF (16 bits) + - % + + PNG - Output Image Quality + + BMP - Saving using file format: %1 + + PPM - Ouput Image Width: + + PBM + Output Folder: - + Dossier de sortie: + Selec&t... - - - - Add Directory (Alt+D) - + Sélec&tionner... - ... - + + Conversion Log + Journal de Conversion - Alt+D - + + Batch operations report + Rapport du traitement groupée - Add Files (Alt+F) - + + Filter messages based on severity + Trier les messages en fonction de la gravité - Alt+F - + + Success messages + Messages de réussite - Remove Files (Alt+R) - + + &Filter log messages: + &Filtre du journal: - Alt+R - + + Overall completion progress + Achèvement global - Add Directory (Alt+I) - + + Start batch tone mapping + Lancer le tone mapping groupé - Alt+I - + + &Start + &Lancer - Add Files (Alt+L) - + + Using %1 thread(s) + %1 processus en cours d'utilisation - Alt+L - + + All HDR images + Toutes les images HDR - Add from Database (Alt+B) - + + Select input images + Sélection des images à traiter - Alt+B - + + Load tone mapping settings text files... + Charger les fichiers de configuation pour le tone mapping... - Remove Settings (Alt+M) - + + All tasks completed. + Toutes les tâches sont accomplies. - Alt+M - + + Aborting... + Abandon... BatchTMJob + [T%1] Start processing %2 - [T%1] Initie le processus %2 + [T%1] Initie le processus %2 + [T%1] Successfully load %2 - [T%1] Chargé avec succès %2 + [T%1] Chargé avec succès %2 + [T%1] ERROR: Cannot save to file: %2 - [T%1] ERREUR: Sauvegarde du fichier impossible: %2 + [T%1] ERREUR: Sauvegarde du fichier impossible: %2 + [T%1] Successfully saved LDR file: %2 - [T%1] Sauvegarde du LDR accomplie: %2 + [T%1] Sauvegarde du LDR accomplie: %2 + [T%1] ERROR: Loading of %2 failed - [T%1] ERREUR: Le chargement de %2 a échoué + [T%1] ERREUR: Le chargement de %2 a échoué CommandLineInterfaceManager + Error: Alignment engine not recognized. - Erreur : Opérateur d'alignement non reconnu. - - - Error: Wrong HDR creation format. - Erreur : Mauvais format de création HDR. + Erreur : Opérateur d'alignement non reconnu. + Error: Unknown response curve specified. - Erreur : la courbe de réponse spécifiée est inconnue. + 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. + Erreur : le modèle de création HDR spécifié est inconnu. + Error: Unknown HDR creation format specified. - Erreur : le format de création HDR spécifié est inconnu. + Erreur : le format 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. + Erreur : l'opérateur de tone mapping spécifié est inconnu. + Error: Wrong tone mapping option format. - Erreur : le format des options de tone mapping est inconnu. + Erreur : le format des options de tone mapping est inconnu. + Error: Unknown tone mapping option specified. - Erreur : l'option de tone mapping spécifiée est inconnue. + Erreur : l'option de tone mapping spécifiée est inconnue. + Error: Unknown option %1. - Erreur : l'option %1 est inconnue. + Erreur : l'option %1 est inconnue. + Error: Missing argument for %1. - Erreur : argument manquant pour %1. + Erreur : argument manquant pour %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. - - - Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - Erreur : les données exif manquantes et les valeurs d'exposition ne sont pas renseignées dans la ligne de commande, abandon. + Erreur : le nombre de valeurs d'exposition est différent du nombre de fichiers en entrée. + ERROR: Cannot save to file: %1 - Erreur : impossible d'enregistrer dans le fichier %1 - - - Cannot convert %1 to a float - Impossible de convertir %1 en nombre à virgule flottante - - - Cannot convert %1 to an integer - Impossible de convertir %1 en nombre entier + Erreur : impossible d'enregistrer dans le fichier %1 + Error: Unknown weight function specified. - Erreur : la fonction de poids spécifiée est inconnue. + Erreur : la fonction de poids spécifiée est inconnue. - Failed executing align_image_stack - Échec de l'opération align_image_stack + + Error: Quality must be in the range [0-100]. + Erreur: La qualité doit être dans l'intervalle [0-100]. - Usage: %1 [OPTIONS]... [INPUTFILES]... - Utilisation: %1 [OPTIONS]... [IMAGES D'ENTRÉE]... + + Load file %1 failed + Échec du chargement du fichier %1 - Commandline interface to %1. - Interface en lignes de commande pour %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. - -h --help Display this help. - -h --help Afficher cette aide. + + EV values have been assigned. + Les valeurs EV ont été renseignées. - -v --verbose Print more messages during execution. - -v --verbose Afficher plus d'information pendant l'exécution. + + Failed executing align_image_stack + Échec de l'opération align_image_stack - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB programme d'alignement à utiliser (défaut: aucun alignement). + + Failed aligning images. + Échec de l'alignement des images. - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Préciser les valeurs d'EV (autant que d'IMAGES D'ENTRÉE). + + Creating (in memory) the HDR. + Création (en mémoire) du HDR. - -c --config HDR creation config. Possible values: - -c --config configuration pour la création du HDR. Valeurs possibles: + + Saving to file %1. + Enregistrer dans le fichier %1. - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load IMAGE_HDR Charger un HDR plutôt que d'en créer un nouveau. + + + Image %1 saved successfully + Image %1 enregistrée avec succès - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save IMAGE_HDR Sauvegarde dans un format HDR. (défaut: pas de sauvegarde) + + Could not save %1 + Échec de l'enregistrement de %1 - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VALEUR Correction gamma à utiliser pour le tone mapping. (default: 1) + + NOT Saving HDR image to file. %1 + NE PAS enregistrer l'image HDR dans le fichier %1 - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize VALUE Largeur à donner au HDR (redimensionné avant la correction gamma et le tone mapping) + + Tonemapping requested, saving to file %1. + Tonemapping requis, enregistrement dans %1. - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Opérateur de tone mapping. Valeurs autorisées: + + Failed loading images + Échec du chargement des images - -p --tmoptions Tone mapping operator options. Legal values are: - -t --tmoptions Options pour l'opérateur de tone mapping. Valeurs autorisées: + + Usage: %1 [OPTIONS]... [INPUTFILES]... + Utilisation: %1 [OPTIONS]... [IMAGES D'ENTRÉE]... - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (pour mantiuk06) + + Commandline interface to %1. + Interface en lignes de commande pour %1. - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output IMAGE_LDR Nom de fichier pour la sauvegarde de l'image LDR tonemappée. + + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (pour mantiuk06) - (No tonemapping is performed unless -o is specified). - (Aucun tonemapping n'est appliqué à moins que -o soit utilisé). + + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (pour mantiuk08) + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - Vous devez soit charger une image HDR (via l'option -l) ou préciser des IMAGES D'ENTRÉE pour générer un nouveau HDR. + Vous devez soit charger une image HDR (via l'option -l) ou préciser des IMAGES D'ENTRÉE pour générer un nouveau HDR. + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - weight=triangular|gaussian|plateau:response_curve=depuis_fichier|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=le_fichier.m + weight=triangular|gaussian|plateau:response_curve=depuis_fichier|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=le_fichier.m - (Default is weight=triangular:response_curve=linear:model=debevec) - (Par défault: weight=triangular:response_curve=linear:model=debevec) + + Error: Wrong HDR creation format. + Erreur: Mauvais format de création HDR. - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - alpha=VALEUR:beta=VALEUR:color=VALEUR:noise=VALEUR:new=true|false (pour fattal) + + -h --help Display this help. + - localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - localcontrast=VALEUR:eq=2|4:simple=true|false (pour ashikhmin) + + -v --verbose Print more messages during execution. + - sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - sigma_s=VALEUR:sigma_r=VALEUR:base=VALEUR (pour durand) + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + - bias=VALUE (for drago) - bias=VALEUR (pour drago) + + -d --savealigned prefix Save aligned images to files which names start with prefix + - local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - local=true|false:autolum=true|false:cone=VALEUR:rod=VALEUR:multiplier=VALEUR (pour pattanaik) + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + - scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - scales=true|false:key=VALEUR:phi=VALEUR:num=VALEUR:low=VALEUR:high=VALEUR (pour reinhard02) + + -c --config HDR creation config. Possible values: + - brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - brightness=VALEUR:chroma=VALEUR:lightness=VALEUR (pour reinhard05) + + (Default is weight=triangular:response_curve=linear:model=debevec) + (Par défault: weight=triangular:response_curve=linear:model=debevec) - (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - (par défaut: contrast=0.3:equalization=false:saturation=1.8, voir aussi -o) + + -l --load HDR_FILE Load an HDR instead of creating a new one. + - (Default is mantiuk06) - (Par défaut: mantiuk06) + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - Load file %1 failed + + -t --tmo Tone mapping operator. Legal values are: - EV values have been assigned. + + -p --tmoptions Tone mapping operator options. Legal values are: - Creating (in memory) the HDR. - + + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + alpha=VALEUR:beta=VALEUR:color=VALEUR:noise=VALEUR:new=true|false (pour fattal) - Saving to file %1. - + + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + localcontrast=VALEUR:eq=2|4:simple=true|false (pour ashikhmin) - Image %1 saved successfully - + + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + sigma_s=VALEUR:sigma_r=VALEUR:base=VALEUR (pour durand) - Could not save %1 - + + bias=VALUE (for drago) + bias=VALEUR (pour drago) - NOT Saving HDR image to file. %1 - + + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + local=true|false:autolum=true|false:cone=VALEUR:rod=VALEUR:multiplier=VALEUR (pour pattanaik) - Tonemapping requested, saving to file %1. - + + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + scales=true|false:key=VALEUR:phi=VALEUR:num=VALEUR:low=VALEUR:high=VALEUR (pour reinhard02) - Failed loading images - + + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + brightness=VALEUR:chroma=VALEUR:lightness=VALEUR (pour reinhard05) - Failed aligning images. + + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + (par défaut: contrast=0.3:equalization=false:saturation=1.8, voir aussi -o) + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. - Error: Quality must be in the range [0-100]. + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Quality of the saved tone mapped file (0-100). + + (No tonemapping is performed unless -o is specified). + + + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + + + + (Default is mantiuk06) + (Par défaut: mantiuk06) + DnDOption + Drag and Drop - Glisser et Déposer + Glisser et Déposer + <b>What would you like to do with the file(s)?</b> - <b>Que faire avec le(s) fichier(s)?</b> + <b>Que faire avec le(s) fichier(s)?</b> + &Open - &Ouvrir + &Ouvrir + Open an existing HDR image - Ouvrir un HDR existant + Ouvrir un HDR existant + &New - &Nouveau + &Nouveau + Create a new HDR image from one or more images - Créer un nouvel HDR à partir d'une ou plusieur images + Créer un nouvel HDR à partir d'une ou plusieur images + 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 retourner à la fenêtre principale + &Cancel - &Annuler + &Annuler EditingTools + Pan the image to a region je ne suis pas sûr de la signification de "pan" dans ce contexte Faire un panoramique de l'image dans une région + + Maskable + + + + + Good image + + + + + Ed&itable + Mod&ifiable + + + + R&eference + Référ&ence + + + Choose a directory and a prefix - Choisir un dossier et un préfixe + Choisir un dossier et un préfixe EditingToolsDialog + Editing Tools - Outils d'édition + Outils d'édition + Visualization and Navigation - Visualisation et Navigation + Visualisation et Navigation + Fit to window - Adapter à la Fenêtre + Adapter à la Fenêtre + &Fit to Window - Adapter à la &Fenêtre + Adapter à la &Fenêtre + Original size - Taille originale + Taille originale + Origina&l Size - Taille origin&ale + Taille origin&ale + Zoom In - Zoom + + Zoom + + Zoom &In - Zoom &+ + Zoom &+ + Zoom Out - Zoom - + Zoom - + Zoom &Out - Zoom &- - - - Preview &Mode: - A&perçu : + Zoom &- + Pivot Only (P) - Pivoter uniquement (P) + Pivoter uniquement (P) + Antighosting Mask - Masque Anti-"image fantôme" - - - Mask Color - Couleur du masque + Masque Anti-"image fantôme" + Images List - Liste d'images + Liste d'images + 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. + L'image actuellement sélectionnée dans cette liste peut être bougée en utilisant les contrôles ci-dessous. L'histogramme de l'image est affiché dans le widget ci-dessus. + Select the previous image in both lists - Sélectionner l'image précédente dans chaque liste + Sélectionner l'image précédente dans chaque liste + Use this button to move the selection to the previous image in both lists. - Utiliser ce bouton pour passer à la sélection de l'image précédente dans chaque liste. + Utiliser ce bouton pour passer à la sélection de l'image précédente dans chaque liste. + Select the next image in both lists - Sélectionner l'image suivante dans chaque liste + Sélectionner l'image suivante dans chaque liste + Use this button to move the selection to the next image in both lists. - Utiliser ce bouton pour passer à la sélection de l'image suivante dans chaque liste. + Utiliser ce bouton pour passer à la sélection de l'image suivante dans chaque liste. + R&eference - Référ&ence + Référ&ence + The reference image is the one currently selected - L'image de référence est celle seléctionée + L'image de référence est celle seléctionée + Tools - Outils + Outils + 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 + Modifier la pile d'image après une sélection avec le bouton gauche de la souris + Clicking this button you will be able to crop all the images to the size that you have previously selected with the left mouse button (press and hold the left mouse button and move the pointer to select a crop area, then press this button). - En cliquant sur ce bouton, vous pourrez couper toutes les images à la taille précédement sélectionnée avec le bouton gauche de la souris (appuyez et maintenez le pointeur pour sélectionner la zone de coupe, ensuite appuyez sur ce bouton). + En cliquant sur ce bouton, vous pourrez couper toutes les images à la taille précédement sélectionnée avec le bouton gauche de la souris (appuyez et maintenez le pointeur pour sélectionner la zone de coupe, ensuite appuyez sur ce bouton). + &Crop All Images - &Couper toutes les images + &Couper toutes les images + Ctrl+X - Ctrl+X + Ctrl+X + &Anti Ghosting - &Anti-"image fantôme" + &Anti-"image fantôme" + &Save Images - Enregi&strer les images + Enregi&strer les images + Ctrl+S - Ctrl+S - - - A&dd Mask - A&jouter Masque - - - Remove Mas&k - Retirer Mas&que + Ctrl+S + Size: - Taille : - - - pixels - pixels + Taille : + &Strength: - &Force : + &Force : + Reset the shift values for the currently selected movable image - Réinitialiser les valeurs de déplacement pour l'image sélectionnée + Réinitialiser les valeurs de déplacement pour l'image sélectionnée + &Reset - &Réinitialiser + &Réinitialiser + Reset the shift values for all the images - Réinitialiser les valeurs de déplacement pour toutes les images + Réinitialiser les valeurs de déplacement pour toutes les images + Reset &All - Tout réiniti&aliser + Tout réiniti&aliser + &Horizontal: - &Horizontal : + &Horizontal : + &Vertical: - &Vertical : + &Vertical : + 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éplacement horizontal pour l'image sélectionnée + + + px - px + px + + + + &Mode: + + + + + + Brush + + + + + + Lasso + + + + + Mask + + + + + A&dd + + + + + &Remove + &Retirer + + + + Lasso - Draw a free hand selection area + + + + + Brush - Paint the mask using the brush + + + + + Save mask + + + + + + ... + + + + + Apply saved mask + + 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éplacement vertical pour l'image sélectionnée + Move up of 1 pixel the currently selected movable image - Bouger l'image sélectionnée d'un pixel vers le haut + Bouger l'image sélectionnée d'un pixel vers le haut + Move down of 1 pixel the currently selected movable image - Bouger l'image sélectionnée d'un pixel vers le bas + Bouger l'image sélectionnée d'un pixel vers le bas + Move right of 1 pixel the currently selected movable image - Bouger l'image sélectionnée d'un pixel vers la droite + Bouger l'image sélectionnée d'un pixel vers la droite + Move left of 1 pixel the currently selected movable image - Bouger l'image sélectionnée d'un pixel vers la gauche + Bouger l'image sélectionnée d'un pixel vers la gauche + + + + Histogram + Histogramme + Get information about the graphical elements - Avoir de l'information à propos des éléments graphiques + Avoir de l'information à propos des éléments graphiques + &What's this? - &Qu'est-ce ? + &Qu'est-ce ? + Shift+F1 - Shift+F1 + Shift+F1 + &Next > - &Suivant > + &Suivant > + &Cancel - &Annuler + &Annuler + Difference (E-P) - Différence (E-P) + Différence (E-P) + Overlay (E+P) - Superposition (E+P) + Superposition (E+P) + Editable Only (E) - Modifiable Uniquement (E) + Modifiable Uniquement (E) + Ed&itable - Mod&ifiable + Mod&ifiable + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The currently selected image is the one that you can shift and paint an anti-ghosting mask on.</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'image sélectionnée est cette que vous pouvez bouger et y ajouter un masque anti "images-fantômes.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The image currently selected in this list serves as a reference position for the editable image</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'image sélectionnées sert de position de référence pour les images modifiables</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Shift values for the currently selected editable image</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Valeurs de déplacement pour l'image modifiable sélectionnée</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here the user can view and set the shift values for the currently selected editable image</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ici, l'utilisateur peut voir et modifier les valeurs de dépalcement pour l'image modifiable sélectionnée</p></body></html> + Shift values for editable image - Valeurs de déplacement pour l'image modifiable + Valeurs de déplacement pour l'image modifiable + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This area shows the preview (using the preview mode on the left) between the editable and reference image.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the same image is selected in both the editable and reference list, this area will show the image itself.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicking and holding the left mouse button you will be able to select a crop area.</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cette zone montre un aperçu (en utilisant le mode paerçu sur la gauche) de l'image de référence et de l'image modifiable.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Si la même image est sélectionnée des deux côtés, cette zone montrera l'image elle même.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">En cliquant et en maintenant le bouton gauche de la souris, vous pourrez sélectionner une zone de découpe.</p></body></html> - - Histogram - - GenericViewer + Pan the image to a region pas sûr Faire un panoramique de l'image dans une région @@ -1189,112 +1529,181 @@ HdrCreationManager + The image %1 is an 8 bit format (LDR) while the previous ones are not. - L'image %1 est au format 8 bit (LDR) alors que les images précédentes ne le sont pas. + L'image %1 est au format 8 bit (LDR) alors que les images précédentes ne le sont pas. + + The image %1 has an invalid size. - La taille de l'image %1 est incorrecte. + La taille de l'image %1 est incorrecte. + The image %1 is an 16 bit format while the previous ones are not. - L'image %1 est au format 16 bit alors que les images précédentes ne le sont pas. + L'image %1 est au format 16 bit alors que les images précédentes ne le sont pas. HdrInputLoader + ERROR: The file<br>%1<br> is not a 8 bit or 16 bit tiff. - ERREUR : Le fichier <br>%1<br> n'est ni un tiff 8 bit ni un tiff 16 bit. + ERREUR : Le fichier <br>%1<br> n'est ni un tiff 8 bit ni un tiff 16 bit. - ERROR: %1 - ERREUR: %1 + + + + + ERROR loading %1 + ERREUR chargement de %1 - ERROR: Failed Loading file: %1 - ERREUR : Le chargement du fichier %1 a échoué + + ERROR: %1 + ERREUR: %1 - ERROR loading %1 - + + ERROR: Failed Loading file: %1 + ERREUR : Le chargement du fichier %1 a échoué HdrViewer + Linear - Linéaire + Linéaire + Gamma 1.4 - Gamma 1.4 + Gamma 1.4 + Gamma 1.8 - Gamma 1.8 + Gamma 1.8 + Gamma 2.2 - Gamma 2.2 + Gamma 2.2 + Gamma 2.6 - Gamma 2.6 + Gamma 2.6 + Logarithmic - Logarithmique + Logarithmique + Histogram: - Histogramme : + Histogramme : + &Mapping: je vois pas mieux... - &Mapping: + &Mapping: HdrWizard + [1/2] Load Input Images - [1/2] Charger les images d'entrée + [1/2] Charger les images d'entrée + Currently Loaded &Files - &Fichiers Actuellement Chargés + &Fichiers Actuellement Chargés + Preview - Prévisualisation + Prévisualisation + Selected Image &Exposure - Sélectionner l'&Exposition de l'Image + Sélectionner l'&Exposition de l'Image + + EV: + + + + Alignment - Alignement + Alignement + <!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 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:12pt; font-weight:600;">Start loading a set of images with different exposure</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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 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:12pt; font-weight:600;">Charger des images avec des expositions différentes</span></p></body></html> + HDR Creation Wizard - Assistant à la création de HDR + Assistant à la création de HDR + + + + Add Images + Ajouter des Images + + + + + + ... + + + + + Remove Selected Image + Retirer les images sélectionnées + + + + Clear List + Effacer la liste + + + + &Autoalign images + &Alignement automatique + + + + Auto-crop + Rognage automatique + + Hugin's align_image_stack + Utiliser align_image_stack de Hugin + + + <!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; } @@ -1303,7 +1712,7 @@ <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:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> @@ -1313,518 +1722,621 @@ <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">Assistant à la création de HDR</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cet outil vous assiste dans la fusion des images prises avec des expositions différentes pour réaliser une <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">Image HDR</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Les images doivent provenir du même boitier et être prises dans les mêmes conditions (utilisation d'un trépied recommandée).</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cet assistant vous guidera à traver différentes étapes: chargement des images, leur alignement et le choix d'un profil de paramètre pour la génération du HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Contraintes:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Toutes les images doivent avoir des dimensions identiques</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Toutes les images doivent avoir le même nombre de couleurs</p></body></html> - - - &Autoalign images - &Alignement automatique + - Hugin's align_image_stack - Utiliser align_image_stack de Hugin + + MTB + WTF? + + [2/2] Choose Settings for HDR Creation - [2/2] Choisir les paramètres pour la création du HDR + [2/2] Choisir les paramètres pour la création du HDR + Choose one of the predefined profiles: - Choisoir un des profils prédéfinis: + Choisoir un des profils prédéfinis: + <!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:'DejaVu 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';">The first predefined profile in the list usually leads to best results. Change it only if the resulting HDR image is not good enough.</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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:'DejaVu 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';">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 + Profil 1 + Profile 2 - Profil 2 + Profil 2 + Profile 3 - Profil 3 + Profil 3 + Profile 4 - Profil 4 + Profil 4 + Profile 5 - Profil 5 + Profil 5 + Profile 6 - Profil 6 + Profil 6 + Weighting function: - Fonction de pondération : + Fonction de pondération : + + + Triangular - Triangulaire + Triangulaire + + Response curve: - Courbe de réponse: + Courbe de réponse: + HDR creation model: - Modèle de création HDR: + Modèle de création HDR: + Anti-ghosting (beta!) - Anti-fantôme (bêta!) + Anti-fantôme (bêta!) + Amount of iterations: - Nombre d'itérations: + Nombre d'itérations: + Keep it small - À maintenir petit + À maintenir petit + Use this only if the default profiles above do not yield good results - À utiliser uniquement si les résultats par défaut sont insatisfaisants + À utiliser uniquement si les résultats par défaut sont insatisfaisants + Use custom configuration - Utiliser une configuration maison + Utiliser une configuration maison + <!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 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:12pt; font-weight:600;">Choose one of the predefined profiles or use a custom configuration</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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 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:12pt; font-weight:600;">Choisir un des profils prédéfinis ou une configuation maison</span></p></body></html> + Choose confidence function over all the possible pixel values: - Choisir une function de confiance sur toutes les valeurs possibles des pixels: + Choisir une function de confiance sur toutes les valeurs possibles des pixels: + Response Curve: - Courbe de réponse: + Courbe de réponse: + Save response function to file: - Sauver la function de réponse dans un fichier: + Sauver la function de réponse dans un fichier: + Save As... - Enregistrer sous... + Enregistrer sous... + HDR Creation Equation: - Équation pour la création HDR: + Équation pour la création HDR: + Choose model: - Choisir un modèle: + Choisir un modèle: + + + + Linear - Linéaire + Linéaire + + + + + + Debevec + + + + + + + Gamma + + + Log - Log + Log + Calibration - Calibrage + Calibrage + [2/2] Choose Custom Configuration - [2/2] Choisir la configuration maison + [2/2] Choisir la configuration maison + Weights: - Poids : + Poids : + + Gaussian - Gaussien + Gaussien + + Plateau - Plateau + Plateau + Predefined response curves: - Courbes de réponse prédéfinies : + Courbes de réponse prédéfinies : + Load response function from file - Charger la function de réponse depuis un fichier + Charger la function de réponse depuis un fichier + Load... - Charger... + Charger... + Use calibration to find response curve (robertson02 algorithm) - Utilisez le calibrage pour trouver la courbe de réponse (algorithme robertson02) + Utilisez le calibrage pour trouver la courbe de réponse (algorithme robertson02) + + + + + Robertson + + + Save Settings + + + + <!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 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:12pt; font-weight:600;">Here you can customize the HDR creation process</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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 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:12pt; font-weight:600;">Ici vous pouvez personnaliser le processus de création HDR</span></p></body></html> + + &Next > - &Suivant > + &Suivant > + &Cancel - &Annuler + &Annuler + Image Filename - Nom du fichier Image + Nom du fichier Image + Exposure - Exposition + Exposition + + + + JPEG (*.jpeg *.jpg *.JPEG *.JPG);; + + TIFF Images (*.tiff *.tif *.TIFF *.TIF);; - Images TIFF (*.tiff *.tif *.TIFF *.TIF);; + Images TIFF (*.tiff *.tif *.TIFF *.TIF);; + Select the input images - Selectionnez les images d'entrée + Selectionnez les images d'entrée + <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><font color="#008400"><h3><b>Images Chargées.</b></h3></font></center> + Loading... - Chargement... + Chargement... + EXIF data not found - Données EXIF introuvables + Données EXIF introuvables + + <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><h3><b>Pour continuer, vous devez renseigner les valeurs d'exposition.<br><font color="#FF0000">%1</font> valeurs toujours requises.</b></h3></center> + + Start loading a set of images with different exposure - Initier le chargement d'un ensemble d'images à différentes expositions - - - Unknown - Inconnu - - - Error... - Erreur... - - - 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 - - - &Finish - &Terminer + Initier le chargement d'un ensemble d'images à différentes expositions - Aligning... - Alignement en cours... - - - Processing... - En cours... - - - Load a camera response curve file - Charger le fichier de courbe de réponse d'un appareil - - - Camera response curve (*.m);;All Files (*) - Coube de réponse d'appareil photo (*.m);;Tous les fichiers (*) + + Loading Error: + Erreur de chargement: - Save a camera response curve file - Sauvegarder un fichier de courbe de réponse d'appareil + + Unknown + Inconnu - - Response curve: - - Courbe de réponse : + + + + + Error... + Erreur... - - Model: - - Modèle : + + Custom config %1 + - Logarithmic - Logarithmique + + 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 - From Calibration - Depuis le calibrage + + *.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);; + - From File - Depuis un fichier + + 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 - <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> + + *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) + - Add Images + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - ... - + + align_image_stack failed to align images. + échec de l'alignement par align_image_stack. - Remove Selected Image - + + 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. - Clear List - + + The external application "<em>align_image_stack</em>" crashed... + L'application externe "<em>align_image_stack</em>" est tombée en panne... - EV: - + + 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>"... - MTB - + + Now click on next button + Appuyez sur Suivant - Debevec - Debevec + + + + &Finish + &Terminer - Gamma - Gamma + + Aligning... + Alignement en cours... - Robertson - Robertson + + + Processing... + En cours... - 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 - + + Load a camera response curve file + Charger le fichier de courbe de réponse d'un appareil - *.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);; - + + + Camera response curve (*.m);;All Files (*) + Coube de réponse d'appareil photo (*.m);;Tous les fichiers (*) - JPEG (*.jpeg *.jpg *.JPEG *.JPG);; - + + Save a camera response curve file + Sauvegarder un fichier de courbe de réponse d'appareil - RAW Images (*.crw *.cr2 *.nef *.dng *.mrw *.orf *.kdc *.dcr *.arw *.raf *.ptx *.pef *.x3f *.raw *.sr2 *.rw2 *.3fr *.mef *.mos *.erf *.nrw *.srw + + From File: - *.CRW *.CR2 *.NEF *.DNG *.MRW *.ORF *.KDC *.DCR *.ARW *.RAF *.PTX *.PEF *.X3F *.RAW *.SR2 *.RW2 *.3FR *.MEF *.MOS *.ERF *.NRW *.SRW) - + + - Response curve: + - Courbe de réponse : - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - + + - Model: + - Modèle : - Loading Error: - + + Weights: + Poids: - Failed to start external application "<em>align_image_stack</em>".<br>Please read "Help -> Contents... -> Setting up -> External Tools" for more information. - + + Logarithmic + Logarithmique - Weights: - Poids: + + From Calibration + Depuis le calibrage - align_image_stack failed to align images. - + + <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> HelpBrowser + Luminance Help - Aide + Aide + Luminance HDR Help - Aide de Luminance HDR + Aide de Luminance HDR + + &Print... - &Imprimer... + &Imprimer... + &Exit - &Quitter + &Quitter + + &Find... - &Chercher... + &Chercher... + Find &Next... - Chercher &Suivant... + Chercher &Suivant... + Find &Previous... - Chercher &Précédent... + Chercher &Précédent... + &Add - &Ajouter + &Ajouter + + &Delete - &Effacer + &Effacer + + D&elete All - Effacer &Tout + Effacer &Tout + Help SideBar - Panneau d'Aide + Panneau d'Aide + LuminanceHDR Online Help - Aide de Luminance HDR en ligne + Aide de Luminance HDR en ligne + &File - &Fichier + &Fichier + &Edit - &Modifier + &Modifier + &View - &Affichage + &Affichage + + &Bookmarks - Si&gnets + Si&gnets + &Quit - &Quitter + &Quitter + Find &Next - Chercher &Suivant + Chercher &Suivant + Find &Previous - Chercher &Précédent + Chercher &Précédent + &Contents pas sûr pour celle-ci... - &Contenus + &Contenus + &Search - &Chercher + &Chercher + &Add Bookmark - &Ajouter Signet + &Ajouter Signet + Find - Chercher + Chercher + Search Term: - Chercher: + Chercher: + New Bookmark - Nouveau Signet + Nouveau Signet + New Bookmark's Title: - Titre du Nouveau Signet: + 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> + <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 + LuminanceHDR - Documentation d'Aide + This protocol is not handled by the help browser. 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. + 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? @@ -1832,887 +2344,1071 @@ HelpSideBar + Contents not sure - Contenus + Contenus + &Contents pas sûr - &Contenus + &Contenus + Se&arch - C&hercher + C&hercher + Searching is case insensitive - La recherche est insensible à la casse + La recherche est insensible à la casse + &Search - &Chercher + &Chercher + + + 1 + + + + Book&marks - Si&gnets + Si&gnets + &Add - &Ajouter + &Ajouter + &Remove - &Retirer + &Retirer + R&emove All - Retirer &Tout - - - 1 - + Retirer &Tout IOWorker + ERROR: The following file is not readable: %1 - ERREUR : Le fichier %1 n'est pas lisible + ERREUR : Le fichier %1 n'est pas lisible + ERROR: File %1 has unsupported extension. - ERREUR : L'extension du fichier %1 n'est pas supportée. + ERREUR : L'extension du fichier %1 n'est pas supportée. + ERROR: Failed loading file: %1 - ERREUR : Le chargement du fichier %1 a échoué + ERREUR : Le chargement du fichier %1 a échoué ImageQualityDialog + Unknown - Inconnu + Inconnu ImgQualityDialog + Save as - Enregistrer sous + Enregistrer sous + Saved File Quality - Qualité de l'Image Enregistrée + Qualité de l'Image Enregistrée - Quality: - Qualité: + + File size + - File size: - Taille du fichier: + + Quality + + Unknown - Inconnu + Inconnu + Ca&lculate - &Calculer + &Calculer + &Save - &Enregistrer + &Enregistrer + &Cancel - &Annuler + &Annuler LdrViewer + + LDR image [%1 x %2] - Image LDR [%1 x %2] + Image LDR [%1 x %2] LevelsDialog + Levels and Gamma - Niveaux et Gamma + Niveaux et Gamma + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Adjust Color Levels</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Ajustement des niveaux de couleur</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Input Levels</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Niveaux d'entrée</span></p></body></html> + Clip black - Clip Black + Clip Black + Gamma - Gamma + Gamma + Clip White - Clip White + Clip White + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Output Levels</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> <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;">Niveaux de sortie</span></p></body></html> + &Reset - &Réinitialiser + &Réinitialiser + &Cancel - &Annuler + &Annuler + &OK - &OK + &OK MainWindow + &File - &Fichier + &Fichier + &View - &Affichage + &Affichage + &Tools - &Outils + &Outils + + + + + Luminance HDR + + &Windows - &Fenêtres + &Fenêtres + &Help - &Aide + &Aide + Ctrl+N - Ctrl+N + Ctrl+N + Ctrl+O - Ctrl+O + Ctrl+O + Ctrl+S - Ctrl+S + Ctrl+S + Exit - Quitter + Quitter + Ctrl+Q - Ctrl+Q + Ctrl+Q + < - < + < + > - > + > + Low Dynamic Range - Basse Gamme Dynamique + Basse Gamme Dynamique + + L - L + L + Fit to Dynamic Range - Ajuster à la Gamme Dynamique + Ajuster à la Gamme Dynamique + \ - \ + \ + Shrink Dynamic Range - Rétrécir la Gamme Dynamique + Rétrécir la Gamme Dynamique + [ - [ + [ + Extend Dynamic Range - Étendre la Gamme Dynamique + Étendre la Gamme Dynamique + ] - ] + ] + Decrease Exposure - Diminuer l'exposition + Diminuer l'exposition + 0 - 0 + 0 + &Increase Exposure - Augmenter l'expos&ition + Augmenter l'expos&ition + 9 - 9 + 9 + About... - A propos... + A propos... + Ctrl+H - Ctrl+H + + &Normal Size - Taille &normale + Taille &normale + + + + Preview Panel + + O - O + O + Zoom &In - Zoom &+ + Zoom &+ + + - + + + + Zoom &Out - Zoom &- + Zoom &- + - - - + - + W - W + W + Luminance Options - Options de Luminance + Options de Luminance + Ctrl+P - Ctrl+P + Ctrl+P + Ctrl+R - Ctrl+R + Ctrl+R + Copy &Exif Data... - Copier données &Exif... + Copier données &Exif... + Copy Exif Data - Copier données Exif + Copier données Exif + Ctrl+E - Ctrl+E - - - &Align Images... - &Aligner Images... - - - WORK IN PROGRESS - TRAVAIL EN COURS + Ctrl+E + &About Qt - &A propos de Qt - - - &Tile - &Tuile - - - &Cascade - &Cascade - - - Cascade - Cascade + &A propos de Qt + Convert multiple HDR images to LDR - Convertir plusieurs images HDR en LDR + Convertir plusieurs images HDR en LDR + + Convert multiple HDR images to LDR using existing settings files - Convertir plusieurs images HDR en LDR avec des fichiers de paramètres + Convertir plusieurs images HDR en LDR avec des fichiers de paramètres + + Get verbose information about user interface elements - Obtenir des information détaillées sur les éléments de l'interface graphique + Obtenir des informations détaillées sur les éléments de l'interface graphique + About &Luminance HDR - À propos de &Luminance HDR + À propos de &Luminance HDR + Show information about Luminance HDR - Afficher les information à propos de Luminance HDR + Afficher les informations à propos de Luminance HDR + + Show information about Luminance HDR, its authors and contributors - Afficher les information à propos de Luminance HDR, ses auteurs et contributeurs + Afficher les informations à propos de Luminance HDR, ses auteurs et contributeurs + Save HDR image &preview... - Enregistrer la &prévisualisation du HDR... + Enregistrer la &prévisualisation du HDR... + + + Save the current HDR Preview to an LDR file - Enregistrer le HDR actuel en image LDR + Enregistrer le HDR actuel en image LDR + + + Apply projective transformation to the current HDR image - Appliquer une projection au HDR actuel + Appliquer une projection au HDR actuel + Crop to Selection - Découper la Sélection + Découper la Sélection + Remove &Selection - &Désélectionner + &Désélectionner + Aborting... - Abandon... + Abandon... + Ready. Now open an existing HDR image or create a new one! - Prêt. Ouvrez un HDR existant ou créez-en un nouveau! + Prêt. Ouvrez un HDR existant ou créez-en un nouveau! + All HDR formats - Tous les formats HDR + Tous les formats HDR + Load one or more HDR images... - Charger un ou plusieurs HDR... + Charger un ou plusieurs HDR... + Save files in - Enregistrer sous + Enregistrer les fichiers sous + + + + Failed to save + Echec de l'enregistrement + + + + 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 + Avertissement 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. + +Do you want to continue? + L'effet de cet opérateur de tonemapping varie selon la taille de l'image. L'aspect en pleine résolution sera sans doute différent. + +Continuer? + + + + Untitled %1 + Sans Titre %1 + + + Error: %1 - Erreur: %1 + Erreur: %1 - Unsaved changes... - Changements non sauvegardés... + + Done! + Fait! - Cropped Image - Image Rognée + + Unsaved changes... + Changements non sauvegardés... - Toolbars - Barres d'outils + + Cropped Image + Image Rognée + &Preferences... - &Préférences... + &Préférences... + &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 Icones + &Toolbars - &Barres d'outils + &Barres d'outils + HDR &Histogram - &Histogramme du HDR + &Histogramme du HDR + &Edit - &Modifier + &Modifier + &New HDR image... - &Nouveau HDR... + &Nouveau HDR... + New HDR image - Nouveau HDR + Nouveau HDR + + 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 ensemble d'images LDR ou RAW + Create a new HDR image from a set of JPEG, Raw, or 8/16 bpc TIFF files - Générer un nouvel HDR à partir d'un ensemble de fichiers JPEG, Raw ou Tiff 8/16-bits + Générer un nouvel HDR à partir d'un ensemble de fichiers JPEG, Raw ou Tiff 8/16-bits + &Open HDR image... - &Ouvrir une image HDR... + &Ouvrir une image HDR... + Open HDR image - Ouvrir une image HDR + Ouvrir une image HDR + + + Load an existing HDR image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) - Charger un HDR existant (OpenEXR, Radiance RGBE, PFS stream, RAW ou TIFF) + Charger un HDR existant (OpenEXR, Radiance RGBE, PFS stream, RAW ou TIFF) + + + + Main Toolbar + Barre d'outils principale + &Save as... - &Enregistrer sous... + &Enregistrer sous... + Save as... - Enregistrer sous... + Enregistrer sous... + + + + + + Save image (HDR or LDR) + Enregistrer l'image (HDR ou LDR) + &Quit - &Quitter + &Quitter + + Quit Luminance HDR - Quitter Luminance HDR + Quitter Luminance HDR + Rotate c&ounter-clockwise - Tourner dans le sens &anti-horaire + Tourner dans le sens &anti-horaire + Rotate counter-clockwise - Tourner dans le sens anti-horaire + Tourner dans le sens anti-horaire + + + Rotate counter-clockwise the HDR image - Tourner le HDR dans le sens anti-horaire + Tourner le HDR dans le sens anti-horaire + Rotate c&lockwise - Tourner dans le sens &horaire + Tourner dans le sens &horaire + Rotate clockwise - Tourner dans le sens horaire + Tourner dans le sens horaire + + + Rotate clockwise the HDR image - Tourner le HDR dans le sens horaire + Tourner le HDR dans le sens horaire + Fit to dynamic range - Adapter à la gamme dynamique + Adapter à la gamme dynamique + &Contents... - &Contenus... + &Contenus... + + + Open user manual for Luminance HDR - Ouvrir le manuel utilisateur de Luminance HDR + Ouvrir le manuel utilisateur de Luminance HDR + + + + F1 + + Normal size - Échelle normale + Échelle normale + + + View HDR image at its normal size - Afficher le HDR à l'échelle normale + Afficher le HDR à l'échelle normale + + + Zoom in - Agrandir + Agrandir + + + Zoom out - Rétrécir + Rétrécir + &Fit in Window - Adapter à la &fenêtre + Adapter à la &fenêtre + + Fit in Window - Adapter à la fenêtre + Adapter à la fenêtre + + Make the HDR image fit its window - Adapter les dimensions du HDR à sa fenêtre + Adapter les dimensions du HDR à sa fenêtre + + + Set various options of Luminance - Paramétrer Luminance + Paramétrer Luminance + &Resize... - &Redimensionner... + &Redimensionner... + Resize the HDR image - Redimensionner le HDR + Redimensionner le HDR + + + Change size of the HDR image - Modifier les dimensions du HDR + Modifier les dimensions du HDR + + + 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 ensembles de fichiers + Show information about Qt - Afficher les information sur Qt + Afficher les informations sur Qt + + Show information about Qt library that is used by Luminance - Afficher les information sur la librairie Qt utilisée par Luminance + Afficher les informations sur la librairie Qt utilisée par Luminance + Text &under Icons - Texte &sous les icônes + Texte &sous les icônes + &Batch Tone Mapping... - &Tone Mapping groupé... + &Tone Mapping groupé... + + Crop the image to selection rectangle - Découper l'image suivant sélection + Découper l'image suivant sélection + Click and drag inside image area to create a selection, then use this button to crop to a new HDR image - Cliquer et déplacer dans l'image pour effectuer une sélection, puis utiliser ce bouton pour découper le HDR + Cliquer et déplacer dans l'image pour effectuer une sélection, puis utiliser ce bouton pour découper le HDR + Remove selection rectangle - Retirer le rectangle de sélection + Retirer le rectangle de sélection + + Remove selection rectangle from image area - Retirer le rectangle de sélection de l'image + Retirer le rectangle de sélection de l'image + Make a &Donation - Effectuer un &don + Effectuer un &don - Next Image - Image suivante - - - Previous Image - Image précédente - - - Adjust &Levels - Ajuster les &Niveaux - - - Adjust Levels - Ajuster les Niveaux + + Ctrl+D + - Tune the histogram for the current LDR - Accorder l'histogramme pour le LDR courant + + Lock Viewers + Verrouiller les visualisations - Ctrl+L - Ctrl+L + + Synchronize viewers mode (fit, fill or 1:1). + Mode visualisations synchronizées (fit, fill ou 1:1). - Save All - Sauver Tout + + Fill Window + Remplir fenêtre - &What's This? - &Qu'est-ce ? + + Fill window with the current viewer + Remplir fenêtre avec la visualisation courante - Shift+F1 - Shift+F1 + + Batch HDR... + HDR par lot... - &Projective Transformation... - &Projection... + + Soft Proofing + Épreuve sur écran - Untitled - Sans Titre + + Gamut Check + Vérification Gamut - &Crop to Selection - &Découper suivant la Sélection + + Show on the right + - Luminance HDR + + Show on the bottom - Main Toolbar + + Realtime Previews - Save image (HDR or LDR) + + Update - F1 - + + Lock the images for sync view + Verrouiller les images pour la visualisation synchronisée - Ctrl+B - + + Minimize + Minimiser - Ctrl+D - Ctrl+D + + Maximize + Maximiser - Lock Viewers - + + Bring All to Front + Mettre tous au premier plan - Synchronize viewers mode (fit, fill or 1:1). - + + Show Preview Panel + Montrer le panneau de prévisualisation - Lock the images for sync view - + + Show/Hide Preview Panel + Montrer/Cacher le panneau de prévisualisation - Minimize - + + Ctrl+V + - Maximize - + + Adjust &Levels + Ajuster les &Niveaux - Bring All to Front - + + + Adjust Levels + Ajuster les Niveaux - Show Preview Panel - + + + Tune the histogram for the current LDR + Accorder l'histogramme pour le LDR courant - Show/Hide Preview Panel - + + Ctrl+L + Ctrl+L - Ctrl+V - + + Save All + Enregistrer Tout + + Save All LDR files - + Enregistrer tous les fichiers LDR + Remove Tab - + Retirer l'onglet + Ctrl+W - + - Fill Window - + + Ctrl+B + - Fill window with the current viewer - + + &What's This? + &Qu'est-ce ? - Batch HDR... - - - - Failed to save - - - - Done! - - - - This HDR image has unsaved changes.<br>Do you want to save it? - + + Shift+F1 + Shift+F1 - Untitled %1 - + + &Projective Transformation... + &Projection... - Soft Proofing - + + Untitled + Sans Titre - Gamut Check - + + &Crop to Selection + &Découper suivant la Sélection PreferencesDialog + Tone Mapping - Tone Mapping + Tone Mapping + External Tools - Outils Externes + Outils Externes + Preferences - Préférences + Préférences + Interface - Interface - - - Czech - Tchèque - - - English - Anglais - - - Finnish - Finnois - - - French - Français - - - German - Allemand - - - Indonesian - Indonésien - - - Italian - Italien - - - Polish - Polonais - - - Romanian - Roumain - - - Russian - Russe - - - Spanish - Espagnol - - - Turkish - Turc + Interface + HDR Options - Options HDR + Options HDR + Good quality and smaller file size - Bonne qualité et taille de fichier réduite + Bonne qualité et taille de fichier réduite + LogLuv TIFF (float, 16bit per color channel) - LogLuv TIFF (float, 16bit par canal couleur) + LogLuv TIFF (float, 16bit par canal couleur) + Better quality, larger file size, better compatibility with other applications - Meilleure qualité, plus grande taille de fichier, meilleure compatibilité avec les autres applications + Meilleure qualité, plus grande taille de fichier, meilleure compatibilité avec les autres applications + Float TIFF (float, 32bit per color channel) - TIFF avec virgules flottante (32bits par canal couleur) + TIFF avec virgules flottante (32bits par canal couleur) + Show negative numbers as: - Afficher les valeurs négatives comme: - - - C&hoose - C&hoisir - - - Which LDR image format to save to - Enregistrer dans quel format LDR + Afficher les valeurs négatives comme: + + Amount of threads to use on multicore/SMP machines - Nombre de tâches à utiliser pour une machine multicoeurs/SMP + Nombre de tâches à utiliser pour une machine multicoeurs/SMP + <!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; } @@ -2720,7 +3416,7 @@ <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;">Interpolate RGB as four colors</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The default is to assume that all green pixels are the same. If even-row green pixels are more sensitive to ultraviolet light than odd-row this difference causes a mesh pattern in the output; using this option solves this problem with minimal loss of detail.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To resume, this option blurs the image a little, but it eliminates false 2x2 mesh patterns with VNG quality method or mazes with AHD quality method.</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2729,17 +3425,19 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Pour résumer, cette méthode floute très légèrement l'image, mais évite les effets indésirables de grille ou de labyrinthe obtenus avec la méthode VNG ou respectivement AHD.</p></body></html> + Interpolate RGB using 4 colours - Interpoler RVB avec 4 couleurs + Interpoler RVB avec 4 couleurs + <!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;">Do not stretch or rotate pixels</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For Fuji Super CCD cameras, show the image tilted 45 degrees. For cameras with non-square pixels, do not stretch the image to its correct aspect ratio. In any case, this option guarantees that each output pixel corresponds to one RAW pixel.</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2747,25 +3445,151 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Pour les boitiers Fuji Super CCD, afficher l'image inclinée à 45 degrés. Pour les appareils à pixels non-carrés, ne pas étirer l'image à ses proportions naturelles. Dans tous les cas, cette option garanti que chaque pixel de sortie correspond à un pixel du RAW.</p></body></html> + Do not stretch or rotate pixels - Ne pas étirer ou tourner les pixels + Ne pas étirer ou tourner les pixels + Quality: - Qualité: + Qualité: + + Language + Langue + + + + Default Previews Width + Largeur par défautpour la prévisualisation + + + + px + + + + + Saves the settings along the program files, to be portable + + + + + Portable mode + + + + + HDR TIFF Default File Format + HDR TIFF format de fichier par défaut + + + + Temporary Working Folder + Dossier de travail temporaire + + + + &Browse... + &Naviguer... + + + + Batch Tonemapping Number of Threads + Nombre de threads pour le tonemapping par lot + + + + General + Général + + + Bilinear - Bilinéaire + Bilinéaire + + + + VNG + + + + + PPG + + + + + AHD + + + + + + + + + + + + + + + + + ... + + + + + Method + Méthode + + + + Temperature (Kelvin) + Température (Kelvin) + + + + Green + Vert + + + + Highlights + Hautes lumières + + + + Level + Niveau + + + + Brightness + Luminosité + + Saturation + Saturation + + + + NR and CA Correction + Correction NR et CA + + + <!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;">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"> + <!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;"> @@ -2773,10 +3597,59 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici le facteur multiplicatif pour le canal bleu</p></body></html> + + Red Component + Composante Rouge + + + + Blue Component + Composante Bleue + + + + Monitor + Dispositif de contrôle + + + + Monitor Profile + Profil de contrôle + + + + + + Browse... + Naviguer... + + + + Camera profile + Profil d'appareil + + + + Printer + Imprimante + + + + Printer profile + Profil d'imprimante + + + + align_image_stack command line arguments + Arguments pour align_image_stack + + + Median: - Médian: + Médian: + <!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; } @@ -2784,7 +3657,7 @@ <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;">Median Filter</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 passes used by median filter applied after interpolation to Red-Green and Blue-Green channels.</p></body></html> à améliorer - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2792,10 +3665,12 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici les passes du filtre médian appliquées après interpolation des canaux Rouge-Vert et Bleu-Vert.</p></body></html> + White Balance - Balance des Blancs + Balance des Blancs + <!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; } @@ -2806,7 +3681,7 @@ <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;">Camera</span>: Use the white balance specified by the camera. If not available, reverts to default neutral white balance</p> <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;">Automatic</span>: Calculates an automatic white balance averaging the entire image</p> <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;">Manual</span>: Set a custom temperature and green level values</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2818,29 +3693,35 @@ <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;">Manuel</span>: Indiquer une température et les valeurs de vert</p></body></html> + Predefined D65 - Défault D65 + Défault D65 + + Camera - Boîtier + Boîtier + Auto - Auto + Auto + Manual - Manuel + Manuel + <!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;">Temperature</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 color temperature in Kelvin.</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2848,11 +3729,13 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choisir ici la température de couleur en Kelvins.</p></body></html> + Set here the green component to set magenta color cast removal level je comprends pas... - Indiquer ici la composante de vert + Indiquer ici la composante de vert + <!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; } @@ -2863,8 +3746,7 @@ <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> - valeur de niveau? - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2872,33 +3754,38 @@ <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 unprogression 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 selon un niveau</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-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> + Solid White - Blanc + Blanc + Do not transform - Ne pas transformer + Ne pas transformer + Blend - Assembler + Assembler + Reconstruct - Reconstruire + Reconstruire + <!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;">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"> + <!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;"> @@ -2906,21 +3793,24 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sélectionner un niveau de reconstruction de hautes lumières. Les petites valeurs favorisent le blanc tandis que les valeurs élevées favorisent les couleurs.</p></body></html> + Correct false colors in highlights - Corriger les fausses couleurs dans les hautes lumières + Corriger les fausses couleurs dans les hautes lumières + Auto Brightness - Luminosité Automatique + Luminosité Automatique + <!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;">Brighness</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 brightness level of output image. The default value is 1.0</p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2928,13 +3818,14 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sélectionner le niveau de luminosité de l'image de sortie. Valeur par défaut: 1.0</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;">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"> + <!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;"> @@ -2942,17 +3833,19 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Utiliser une valeur spécifique pour le noir au cours du décodage des RAW. Si l'option n'est pas sélectionnée, le niveau de noir sera ajusté automatiquement.</p></body></html> + Black - Noir + Noir + <!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;">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"> + <!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;"> @@ -2960,13 +3853,14 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Utiliser une valeur spécifique pour le noir dans l'image de sortie.</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;">White 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 white point value to decode RAW pictures. If you set this option to off, the White 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"> + <!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;"> @@ -2974,13 +3868,14 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Utiliser une valeur spécifique pour le blanc au cours du décodage des RAW. Si l'option n'est pas sélectionnée, le niveau de blanc sera ajusté automatiquement.</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;">White 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 white 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"> + <!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;"> @@ -2988,1566 +3883,1641 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer une valeur de blanc spécifique pour l'image de sortie.</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;">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"> + <!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;">Réduction de bruit</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Utiliser des ondelettes pour réduire le bruit tout en préservant les détails.</p></body></html> - - - Enable noise reduction - Réduction de bruit - - - Threshold: - Seuil: - - - <!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;">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;">Seuil</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici un seuil pour la réduction de bruit.</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;">Enable Chromatic Aberration correction</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Enlarge the raw red and blue layers by the given factors, typically 0.999 to 1.001, to correct chromatic aberration.</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;">Correction des Aberrations Chromatiques</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Multiplier les canaux rouge et bleu du RAW, typiquement par des facteurs de 0.999 à 1.001, pour compenser les aberration chromatiques.</p></body></html> - - - Enable Chromatic Aberration correction - Correction des Aberrations Chromatiques - - - <!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;">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;">Facteur de rouge</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici le facteur multiplicatif pour le canal rouge</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;">Quality (interpolation)</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 demosaicing RAW images decoding interpolation method. A demosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw data received from the color-filtered image sensor internal to many digital cameras in form of a matrix of colored pixels. Also known as CFA interpolation or color reconstruction, another common spelling is demosaicing. There are 4 methods to demosaicing RAW images:</p> -<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;">Bilinear</span>: use high-speed but low-quality bilinear interpolation (default - for slow computer). In this method, the red value of a non-red pixel is computed as the average of the adjacent red pixels, and similar for blue and green.</p> -<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;">VNG</span>: use Variable Number of Gradients interpolation. This method computes gradients near the pixel of interest and uses the lower gradients (representing smoother and more similar parts of the image) to make an estimate.</p> -<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;">PPG</span>: use Patterned Pixel Grouping interpolation. Pixel Grouping uses assumptions about natural scenery in making estimates. It has fewer color artifacts on natural images than the Variable Number of Gradients 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;">AHD</span>: use Adaptive Homogeneity-Directed interpolation. This method selects the direction of interpolation so as to maximize a homogeneity metric, thus typically minimizing color artifacts.</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;">Qualité (interpolation)</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Selectionner ici la méthode de dématriçage des RAW. Un algorithme de dématriçage est un processus d'imagerie utilisé pour interpoler une image complete à partir des données partielles de l'image Raw issues d'un capteur d'appareil numérique qui prend la forme d'une matrice de pixels sensibles à l'une des trois couleurs RVB. Il existe 4 méthodes principales pour le dématriçage:</p> -<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;">Bilinéaire</span>: utiliser une méthode d'interpolation rapide mais de faible qualité (défaut - pour les ordinateurs peu puissants). Selon cette méthode, les valeurs de chaque couleur sont obtenues par pondération des pixels voisins de la même couleur.</p> -<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;">VNG</span>: utiliser la méthode d'interpolation Nombre Variable de Gradients (VNG). Cette méthode calcule des gradients à proximité du pixel courant et utilise les faibles gradients (qui représentent les parties les plus lisses de l'image) pour estimer sa valeur.</p> -<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;">PPG</span>: utiliser l'interpolation par Motifs de Groupe de Pixels (PPG). L'estimation est basée sur des hypothèses quant aux scènes naturelles. Pour les images naturelles, cette méthode présente moins de défauts de couleur que la méthode VNG.</p> -<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;">AHD</span>: utiliser l'interpolation Adaptive Homogeneity-Directed (AHD). Cette méthode selectionne la direction d'interpolation de manière à maximiser une mesure d'homogeneïté et typiquement minimiser les défauts de couleur.</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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</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;">Profil du Boîtier</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sélectionner ici l'espace couleur pour convertir le RAW.</p> -<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;">Aucun</span>: aucun espace couleur n'est utilisé pour la conversion.</p> -<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;">Inclu</span>: utilisé l'espace couleur inclu dans le RAW s'il est présent.</p> -<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;">Personnalisé</span>: utiliser un espace couleur personnalisé.</p></body></html> - - - None - Aucun - - - Built in - Intégré - - - Custom - Personnalisé - - - <!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;">Workspace</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 output color space used to decode RAW data.</p> -<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;">Raw (linear)</span>: in this mode, no output color space is used during RAW decoding.</p> -<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;">sRGB</span>: this is a RGB color space, created cooperatively by Hewlett-Packard and Microsoft. It is the best choice for images destined for the Web and portrait photography.</p> -<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;">Adobe RGB</span>: this color space is an extended RGB color space, developed by Adobe. It is used for photography applications such as advertising and fine art.</p> -<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;">Wide Gamut</span>: this color space is an expanded version of the Adobe RGB color space.</p> -<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;">Pro-Photo</span>: this color space is an RGB color space, developed by Kodak, that offers an especially large gamut designed for use with photographic outputs in mind.</p> -<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;">Custom</span>: use a custom output color space profile.</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;">Espace de travail</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 l'espace couleur de sortie utilisé pour la conversion du RAW.</p> -<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;">Raw (linéaire)</span>: das ce mode, aucun espace couleur n'est utilisé lors de la conversion du RAW.</p> -<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;">sRVB</span>: espace couleur RVB créé par Hewlett-Packard et Microsoft. Meilleur choix pour les images destinées au Web et aux portaits photo.</p> -<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;">RVB Adobe</span>: espace couleur étendu, developpé par Adobe. Utilisé dans les applications comme la publicité ou l'art.</p> -<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;">Wide Gamut</span>: cet espace couleur est une extension du RVB d'Adobe.</p> -<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;">Pro-Photo</span>: cest espace couleur RVB, developpé par Kodak, offre une gamme de sortie particulièrement large, conçue pour l'impression photo.</p> -<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;">Personnalisé</span>: utiliser un profil d'espace couleur personnalisé.</p></body></html> - - - sRGB - sRVB - - - Adobe RGB - RVB Adobe - - - Wide Gamut - Gamme étendue - - - <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</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:'DejaVu 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';">Lire </span><span style=" font-family:'Sans Serif'; font-style:italic;">Aide &gt; Contenus &gt; Configuration de Luminance &gt; Outils Externes</span><span style=" font-family:'Sans Serif';"> en savoir plus sur les options de align_image_stack</span></p></body></html> - - - Show nan and +/-Inf values as: - Afficher les valeur indéterminées (NAN ou infini) comme: - - - &Cancel - &Annuler - - - &OK - &OK - - - Hungarian - Hongrois - - - Please restart LuminanceHDR to use the new language (%1). - Le nouveau langage (%1) sera disponible au prochain lancement de Luminance HDR. - - - Please restart... - Relancez SVP... - - - Choose a directory - Choisir un dossier - - - RAW Conversion - - - - Always show Preview Panel - - - - Always show Wizard first page - - - - JPEG - - - - PNG - - - - PPM - - - - PBM - - - - BMP - - - - TIFF - - - - VNG - - - - PPG - - - - AHD - - - - ... - - - - Language - - - - Default Previews Width - - - - px - - - - HDR TIFF Default File Format - - - - Temporary Working Folder - - - - Batch Tonemapping Default Output Format - - - - Batch Tonemapping Number of Threads - - - - General - - - - Method - - - - Temperature (Kelvin) - - - - Green - - - - Highlights - - - - Level - - - - Brightness - Luminosité - - - Saturation - - - - NR and CA Correction - - - - Red Component - - - - Blue Component - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Utiliser des ondelettes pour réduire le bruit tout en préservant les détails.</p></body></html> - Camera profile - + + Enable noise reduction + Réduction de bruit - align_image_stack command line arguments - + + Threshold: + Seuil: - Color Management - + + <!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;">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;">Seuil</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici un seuil pour la réduction de bruit.</p></body></html> - Monitor - + + <!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;">Enable Chromatic Aberration correction</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Enlarge the raw red and blue layers by the given factors, typically 0.999 to 1.001, to correct chromatic aberration.</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;">Correction des Aberrations Chromatiques</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Multiplier les canaux rouge et bleu du RAW, typiquement par des facteurs de 0.999 à 1.001, pour compenser les aberration chromatiques.</p></body></html> - Monitor Profile - + + Enable Chromatic Aberration correction + Correction des Aberrations Chromatiques - Printer - + + <!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;">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;">Facteur de rouge</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Indiquer ici le facteur multiplicatif pour le canal rouge</p></body></html> - Printer profile - + + RAW Conversion + Conversion de RAW - Open ICC Profile - + + Always show Preview Panel + Toujours montrer un panneau de prévisualisation - Color profile (*.icc) - + + Always show Wizard first page + Toujours montrer la première page de l'assistant - &Browse... - + + <!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;">Quality (interpolation)</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 demosaicing RAW images decoding interpolation method. A demosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw data received from the color-filtered image sensor internal to many digital cameras in form of a matrix of colored pixels. Also known as CFA interpolation or color reconstruction, another common spelling is demosaicing. There are 4 methods to demosaicing RAW images:</p> +<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;">Bilinear</span>: use high-speed but low-quality bilinear interpolation (default - for slow computer). In this method, the red value of a non-red pixel is computed as the average of the adjacent red pixels, and similar for blue and green.</p> +<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;">VNG</span>: use Variable Number of Gradients interpolation. This method computes gradients near the pixel of interest and uses the lower gradients (representing smoother and more similar parts of the image) to make an estimate.</p> +<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;">PPG</span>: use Patterned Pixel Grouping interpolation. Pixel Grouping uses assumptions about natural scenery in making estimates. It has fewer color artifacts on natural images than the Variable Number of Gradients 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;">AHD</span>: use Adaptive Homogeneity-Directed interpolation. This method selects the direction of interpolation so as to maximize a homogeneity metric, thus typically minimizing color artifacts.</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;">Qualité (interpolation)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Selectionner ici la méthode de dématriçage des RAW. Un algorithme de dématriçage est un processus d'imagerie utilisé pour interpoler une image complete à partir des données partielles de l'image Raw issues d'un capteur d'appareil numérique qui prend la forme d'une matrice de pixels sensibles à l'une des trois couleurs RVB. Il existe 4 méthodes principales pour le dématriçage:</p> +<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;">Bilinéaire</span>: utiliser une méthode d'interpolation rapide mais de faible qualité (défaut - pour les ordinateurs peu puissants). Selon cette méthode, les valeurs de chaque couleur sont obtenues par pondération des pixels voisins de la même couleur.</p> +<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;">VNG</span>: utiliser la méthode d'interpolation Nombre Variable de Gradients (VNG). Cette méthode calcule des gradients à proximité du pixel courant et utilise les faibles gradients (qui représentent les parties les plus lisses de l'image) pour estimer sa valeur.</p> +<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;">PPG</span>: utiliser l'interpolation par Motifs de Groupe de Pixels (PPG). L'estimation est basée sur des hypothèses quant aux scènes naturelles. Pour les images naturelles, cette méthode présente moins de défauts de couleur que la méthode VNG.</p> +<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;">AHD</span>: utiliser l'interpolation Adaptive Homogeneity-Directed (AHD). Cette méthode selectionne la direction d'interpolation de manière à maximiser une mesure d'homogeneïté et typiquement minimiser les défauts de couleur.</p></body></html> - Browse... - + + Color Management + Gestion de la Couleur - Color profile (*.icc *.ICC *.icm *.ICM) - + + <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</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:'DejaVu 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';">Lire </span><span style=" font-family:'Sans Serif'; font-style:italic;">Aide &gt; Contenus &gt; Configuration de Luminance &gt; Outils Externes</span><span style=" font-family:'Sans Serif';"> en savoir plus sur les options de align_image_stack</span></p></body></html> - - - PreviewPanel - Reinhard '02 - Reinhard '02 + + Show nan and +/-Inf values as: + Afficher les valeur indéterminées (NAN ou infini) comme: - Reinhard '05 - Reinhard '05 + + &Cancel + &Annuler - Mantiuk '06 - + + &OK + &OK - Mantiuk '08 + + Restart - Fattal + + For the settings to take effect, please restart the application! - Drago - + + Choose a directory + Choisir un dossier - Durand - + + + + Open ICC Profile + Ouvrir profil ICC - Ashikhmin - + + Color profile (*.icc *.ICC *.icm *.ICM) + Profil de couleur (*.icc *.ICC *.icm *.ICM) - Pattanaik - + + + Color profile (*.icc) + Profil de couleur (*.icc) + + + PreviewSettings - Preview - Prévisualisation + + Load settings + ProjectionsDialog + Projective Transformation - Projection + Projection + Projections - Projections + Projections + Source Projection: - Projection d'Origine: + Projection d'Origine: + + Polar - Polaire + Polaire + + Angular - Angulaire + Angulaire + + Cylindrical - Cylindrique + Cylindrique + + Mirror Ball - Miroir sphérique + Miroir sphérique + Destination Projection: - Projection de Rendu: + Projection de Rendu: + Angles: - Angles: + Angles: + Bilinear Interpolation - Interpolation bilinéaire + Interpolation bilinéaire + Oversample factor: - Facteur de sur-échantillonnage: + Facteur de sur-échantillonnage: + Rotation (degrees) - Rotation (degrés) + Rotation (degrés) + Yaw: - Lacet: + Lacet: + Pitch: - Tangage: + Tangage: + Roll: - Roulis: + Roulis: + &Cancel - &Annuler + &Annuler + &OK - &OK + &OK + + + + ° - + QApplication + ERROR: cannot load Tone Mapping Setting file: - ERREUR : Impossible de charger le fichier de configuration Tone Mapping : + 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 : + 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 : + ERREUR : Impossible d'analyser le fichier de configuration Tone Mapping : QObject - Aborting... - Abandon... + + All LDR formats + Tous les formats LDR - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Le Plugin JPEG de Qt est introuvable...<br>Veuillez décompresser le pack des DLL avec l'option "use folder names" activée. + + Save the LDR image as... + Enregistrer l'image LDR sous... - All LDR formats - Tous les formats LDR + + All HDR formats + Tous les formats HDR - Save the LDR image as... - Enregistrer l'image LDR sous... + + Save the HDR image as... + Enregistrer le HDR sous... + Save as... - Enregistrer sous... + Enregistrer sous... - All HDR formats - Tous les formats HDR + + + Error Opening RAW File + Erreur d'ouverture du fichier RAW - Save the HDR image as... - Enregistrer le HDR sous... + + Error Unpacking RAW File + Erreur de dépacketage du fichier RAW - Option -v -a... - + + Error Processing RAW File + Erreur de traitement du fichier RAW - LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. - + + Memory Error in processing RAW File + Erreur mémoire dans le traitement du fichier RAW + + + + Error Creating PFS Frame + référence? + Erreur dans la création de la référence PFS + Cannot convert %1 to a float - Impossible de convertir %1 en nombre à virgule flottante + Impossible de convertir %1 en nombre à virgule flottante + Cannot convert %1 to an integer - Impossible de convertir %1 en nombre entier + Impossible de convertir %1 en nombre entier + 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 %1 threads. - + Utilisation de %1 threads. + Loading file %1 - + Chargement du fichier %1 + Successfully loaded file %1. - + Fichier %1 chargé avec succès. + + + + Option -v -a... + Option -v -a... + + + + LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. + Luminance HDR a besoin de l'appel de align_image_stack avec les arguments "-v -a aligned_". Ces arguments ont été ajoutés. + + + + Warning - + Attention - Error Opening RAW File - + + I cannot open monitor profile. Please select a different one. + Ouverture du profil de contrôle impossible. Sélectionner-en un autre. - Error Unpacking RAW File - + + I cannot open printer profile. Please select a different one. + Ouverture du profil d'imprimante impossible. Sélectionner-en un autre. - Error Processing RAW File - + + Please select a printer profile . + SVP, sélectionner un profil d'imprimante. - Memory Error in processing RAW File - + + I cannot perform the color transform. Please select a different monitor profile. + Transformation couleur impossible. SVP, sélectionner un autre profil de contrôle. - Error Creating PFS Frame + + PreGamma=%1 - I cannot open monitor profile. Please select a different one. - + + Contrast Equalization + Égalisation du contraste - I cannot open printer profile. Please select a different one. + + Contrast - Please select a printer profile . - + + + Saturation + Saturation - I cannot perform the color transform. Please select a different monitor profile. + + Detail - - - ResizeDialog - Scale Image - Redimensionner l'image + + Luminance Level + Niveau de luminance - Width: - Largeur : + + Luminance Level=Auto + - Pixels - Pixels + + Color Saturation + Saturation de couleur - Percent - Pourcents + + Contrast Enhancement + Amélioration de contraste - Height: - Hauteur : + + Alpha + Alpha - Restore original size - Rétablir la taille originale + + Beta + Bêta - &Reset - &Remise à zéro + + NoiseRedux + - &Cancel - &Annuler + + FFTSolver + - &Scale - &Redimensionner + + simple + - Hdr Image Size - Taille de l'image Hdr + + Equation 2 + Équation 2 - Switch between pixels or percentage - Échanger entre pixels et poucentage + + Equation 4 + Équation 4 - Result size - Dimensions finales + + + Local + - - - SavedParameters - Simple - Simple + + Bias + Bais - Local Contrast Threshold - Seuil de contraste local + + Spatial + - Bias - Bais + + + Range + Étendue - Spatial Kernel Sigma - Spatial Kernel Sigma + + Base + - Range Kernel Sigma - Range Kernel Sigma + + Multiplier + Facteur - Base Contrast - Contraste de base + + AutoLuminance + - Alpha - Alpha + + Cone + - Beta - Bêta + + Rod + - Color Saturation - Saturation de couleur + + Key + - Noise Reduction - Réduction du bruit + + Phi + Phi - Contrast Equalization - Égalisation du contraste + + Scales: + - Contrast Factor - Facteur de contraste + + Lower + - Saturation Factor - Facteur de saturation + + Upper + - Detail Factor - Facteur de détail + + Brightness + Luminosité - Contrast Enhancement - Amélioration de contraste + + Chromatic Adaptation + Adaptation Chromatique - Luminance Level - Niveau de luminance + + Light Adaptation + Adaptation de lumière + + + ResizeDialog - Cone and Rod based on Luminance - Cône et bâtonnets basés sur la luminance + + Scale Image + Redimensionner l'image - Cone Level - Quantité de cônes + + Width: + Largeur : - Rod Level - Quantité de bâtonnets + + Pixels + Pixels - Multiplier - Facteur + + Percent + Pourcents - Use Scales - Utiliser des échelles + + Height: + Hauteur : - Key Value - Valeur clé + + Restore original size + Rétablir la taille originale - Range - Étendue + + &Reset + &Remise à zéro - Lower Scale - Échelle la plus basse + + &Cancel + &Annuler - Upper Scale - Échelle la plus haute + + &Scale + &Redimensionner - Brightness - Luminosité + + Hdr Image Size + Taille de l'image Hdr - Chromatic Adaptation - Adaptation Chromatique + + Switch between pixels or percentage + Échanger entre pixels et poucentage - Light Adaptation - Adaptation de lumière + + Result size + Dimensions finales SavedParametersDialog + Saved Parameters - + Paramètres sauvegardés + + Comment - + Commentaire + TM Operator - + Opérateur de TM + Simple - Simple + Simple + Equation 2 - + Équation 2 + Local Contrast Threshold - Seuil de contraste local - - - Pre-gamma - + Seuil de contraste local + Bias - Bais + Bais + Spatial Kernel Sigma - Spatial Kernel Sigma + Sigma du Noyau Spatial + Range Kernel Sigma - Range Kernel Sigma + ??? + Sigma du Noyau d'étendue + Base Contrast - Contraste de base + Contraste de base + Alpha - Alpha + Alpha + Beta - Bêta + Bêta + + Color Saturation - Saturation de couleur + Saturation de couleur + Noise Reduction - Réduction du bruit + Réduction du bruit + Old Fattal - + Ancien Fattal + Contrast Equalization - Égalisation du contraste + Égalisation du contraste + Contrast Factor - Facteur de contraste + Facteur de contraste + Saturation Factor - Facteur de saturation + Facteur de saturation + Detail Factor - Facteur de détail + Facteur de détail + Contrast Enhancement - Amélioration de contraste + Amélioration de contraste + Luminance Level - Niveau de luminance + 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 + Cône et bâtonnets basés sur la luminance + Local Tonemapping - + Tonemapping local + Cone Level - Quantité de cônes + Quantité de cônes + Rod Level - Quantité de bâtonnets + Quantité de bâtonnets + Multiplier - Facteur + Facteur + Use Scales - Utiliser des échelles + Utiliser des échelles + Key Value - Valeur clé + Valeur clé + Phi Value - + Valeur Phi + Range - Étendue + Étendue + Lower Scale - Échelle la plus basse + Échelle la plus basse + Upper Scale - Échelle la plus haute + Échelle la plus haute + Brightness - Luminosité + Luminosité + Chromatic Adaptation - Adaptation Chromatique + Adaptation Chromatique + Light Adaptation - Adaptation de lumière + Adaptation de lumière + + + + Pre-gamma + Précorrection gamma SavingParameters + Saving Parameters - + Enregistrer les paramètres + Enter a short comment for the saved parameters: - + Entrer un commentaire court pour les paramètres sauvés: SplashLuminance + Luminance HDR - Make a Donation - Luminance HDR - Faire un don + Luminance HDR - Faire un don + <!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:'Droid Sans'; 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-weight:600; color:#000000;">Luminance HDR</span><span style=" font-family:'Sans Serif'; color:#000000;"> is open-source software and its development required hundreds of hours of work.<br /><br />If you like it, if you use it in your work and you would like to see it gradually improved,<br />please support its authors by making a donation.<br /><br />Would you like to make a donation for Luminance HDR now?</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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:'Droid Sans'; 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-weight:600; color:#000000;">Luminance HDR</span><span style=" font-family:'Sans Serif'; color:#000000;"> est un logiciel open source dont le développement a nécessité des centaines d'heures de travail.<br /><br />Si vous l'appréciez, si vous l'utilisez professionnellement et que vous souhaitez le voir amélioré graduellement,<br />vous êtes priés de soutenir les auteurs par vos dons.<br /><br />Voulez-vous effectuer un don pour Luminance HDR maintenant?</span></p></body></html> + Yes, I'd love to! - Oui, avec plaisir! + Oui, avec plaisir! + Ask me again later - Redemander plus tard + Redemander plus tard + No, Stop bothering me! - Non. Ne parlons plus de ça! + Non. Ne parlons plus de ça! TMOProgressIndicator + Abort computation - Interrompre les calculs + Interrompre les calculs + + + + TiffModeDialog + + + Save as ...TIFF + TonemappingPanel + Load a tonemapping settings text file... - Charger un fichier texte de paramètres tonemapping... + Charger un fichier texte de paramètres tonemapping... + + + + TM Database Problem + Problème de base de données de 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. +Erreur: %1 + + LuminanceHDR tonemapping settings text file (*.txt) - Fichier texte de paramètre tonemapping de LuminanceHDR (*.txt) + Fichier texte de paramètre tonemapping de LuminanceHDR + + + + Aborting... - Abandon... + Abandon... + File is not readable (check existence, permissions,...) - Fichier illisible (vérifier son existance, permissions,...) + Fichier illisible (vérifier son existance, permissions,...) + Save tonemapping settings text file to... - Enregistrer le fichier texte des paramètres tonemapping vers... + 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...) + Fichier non inscriptible (vérifier les permissions, le chemin...) + File is not readable (check permissions, path...) - Fichier illisible (vérifier les permissions, le chemin...) + 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 de fichier de paramètres de tonemapping a changé. Cet ancien fichier ne peut pas être utilisé avec cette version de LuminanceHDR. Créez-en un nouveau. + + 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. + Enter the width of the new size: - Indiquer la nouvelle largeur: + Indiquer la nouvelle largeur: + Custom LDR size - Nouvelle taille du LDR + Nouvelle taille du LDR + Alpha - Alpha + Alpha + + Color Saturation - Saturation de couleur + Saturation de couleur + Simple - Simple + Simple + Equation Number - Numéro d'équation + Numéro d'équation + Eqn 2 - Eq. 2 + Eq. 2 + Eqn 4 - Eq. 4 + Eq. 4 + Local Contrast Threshold - Seuil de contraste local + Seuil de contraste local + Spatial Kernel Sigma - Spatial Kernel Sigma + Spatial Kernel Sigma + Range Kernel Sigma - Range Kernel Sigma + Range Kernel Sigma + Base Contrast - Contraste de base + Contraste de base + Bias - Bais + Bais + Multiplier - Facteur + Facteur + Local Tone Mapping - Tone Mapping local + Tone Mapping local + Cone Level - Quantité de cônes + Quantité de cônes + Rod Level - Quantité de bâtonnets + Quantité de bâtonnets + Tone mapping operators and their options - Opérateurs de tonemapping et leurs options + Opérateurs de tonemapping et leurs options + Use Scales - Utiliser des échelles + Utiliser des échelles + Key Value - Valeur clé + Valeur clé + Phi - Phi + Phi + Range - Étendue + Étendue + Lower Scale - Échelle la plus basse + Échelle la plus basse + Upper Scale - Échelle la plus haute + Échelle la plus haute + Brightness - Luminosité + Luminosité + Restore - Restaurer + Restaurer + + + + Load saved parameters + Charger des paramètres enregistrés + + Save current parameters + Enregistrer les paramètres courants + + + Previous applied settings - Paramètres utilisés précédemment + Paramètres utilisés précédemment + Next applied settings - Derniers paramètres utilisés + Derniers paramètres utilisés + Tone Mapping Settings - Paramètres de tone mapping + Paramètres de tone mapping + Size of the resulting LDR image - Dimensions du HDR final + Dimensions du HDR final + + Gamma applied before tonemapping - Correction gamma appliquée avant le tonemapping + Correction gamma appliquée avant le tonemapping + 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 + Utiliser les paramètres ci-dessus (gamma et opérateur de tonemapping) pour générer l'image LDR + &Tonemap - &Tonemapper + &Tonemapper + Load an existing text file containing pregamma and TMO settings - Charger un fichier texte contenant les paramètres pregamma et tonemapping + Charger un fichier texte contenant les paramètres pregamma et tonemapping + Beta - Bêta + Bêta + Here you can choose the size of the resulting LDR image. - Ici vous pouvez choisir la taille du LDR final. + Ici vous pouvez choisir la taille du LDR final. + + Set Custom Output Size + Fixer dimensions de sortie personnalisées + + + 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. + 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. + 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. + Ici vous pouvez appliquer une correction gamma sur le HDR.<br>La correction sera appliquée avant le tone mapping. + + + + &Result Size + &Dimension de sortie + + + + Pre-gamma + Précorrection gamma + Restore pregamma's default value (1) - Restaurer le gamma par défaut (1) + Restaurer le gamma par défaut (1) + Contrast Equalization - Égalisation du contraste + Égalisation du contraste + Contrast Factor - Facteur de contraste + Facteur de contraste + Saturation Factor - Facteur de saturation + Facteur de saturation + Restore operator's default values - Restaurer les valeurs par défaut de l'opérateur + Restaurer les valeurs par défaut de l'opérateur + Noise Reduction - Réduction du bruit + Réduction du bruit + Chromatic Adaptation - Adaptation Chromatique + Adaptation Chromatique + Light Adaptation - Adaptation de lumière + Adaptation de lumière + 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é. + Ici vous pouvez charger et enregistrer un fichier de paramètres tone mapping.<br>Vous pouvez aussi appliquer le contenu du fichier chargé. + Save current parameters to a text file - Enregistrer les paramètres actuels dans un fichier texte + 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. + 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 gamma et opérateur. + Charger un fichier texte contenant les paramètres gamma et opérateur. + Detail Factor - Facteur de détail + Facteur de détail - Reinhard '02 - Reinhard '02 + + Fattal + - Reinhard '05 - Reinhard '05 + + Drago + - Process - Traiter + + Durand + - Predefined Display - Écran prédéfini + + Reinhard '02 + Reinhard '02 - Lcd Office - Cristaux liq. de bureau + + Reinhard '05 + Reinhard '05 - Lcd - Cristaux liquides + + Ashikhmin + - Lcd Bright - Cristaux liq. lumineux + + Pattanaik + - CRT - Cathodique + + Version 2.3.0 + Version 2.3.0 - Contrast Enhancement - Amélioration de contraste + + Auto Cone/Rod + Auto Cône/Bâtonnets - Luminance Level - Niveau de luminance + + Previous + Précédent - Start tonemapping (CTRL+T) - Initier le tonemapping (CTRL+T) + + Next + Suivant - Ctrl+T - Ctrl+T + + &Save to File + &Enregistrer dans le fichier - undo - défaire + + &Load from File + &Charger à partir du fichier - redo - refaire + + Process + Traiter + Mantiuk '06 - - - - Mantiuk '08 - - - - Fattal - - - - Drago - - - - Durand - - - - Ashikhmin - + - Pattanaik - + + Update current LDR + Mettre à jour le LDR courant - Load parameters by comment - + + Tonemap + Tonemapper - ... - + + Mantiuk '08 + - Load saved parameters - + + Operator + Opérateur - Save current parameters - + + Predefined Display + Écran prédéfini - TM Database Problem - + + Lcd Office + Cristaux liq. de bureau - The database used for saving TM parameters cannot be opened. -Error: %1 - + + Lcd + Cristaux liquides - Update current LDR - + + Lcd Bright + Cristaux liq. lumineux - Tonemap - + + CRT + Cathodique - Operator - + + Contrast Enhancement + Amélioration de contraste + Enable Luminace Level - + Activer +Niveau de luminance - Auto Cone/Rod - + + Luminance Level + Niveau de luminance - Previous - + + + ... + - Next - + + Start tonemapping (CTRL+T) + Initier le tonemapping (CTRL+T) - &Save to File - + + Ctrl+T + Ctrl+T + + + TonemappingSettings - &Load from File + + Load Custom Settings - &Result Size + + Sort by - Pre-gamma + + Comments: - Set Custom Output Size - + + Comment + Commentaire - Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - + + Operator + Opérateur - Version 2.3.0 + + Most Useful Operators - - - TonemappingWarningDialog - - Attention! - Attention! - - Ask again - Redemander - - - 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? - L'effet de cet opérateur de tonemapping varie selon la taille de l'image. L'aspect en pleine résolution sera sans doute différent. - -Continuer? + + Tonemap + Tonemapper - Fattal Warning + + Load - 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? + + Cancel TransplantExifDialog + Copy Exif data - Copier données Exif + Copier données Exif + + + + From + Depuis + + Move up selected file(s) - Relever le(s) fichier(s) sélectionné(s) + Relever le(s) fichier(s) sélectionné(s) + + Move down selected file(s) - Abaisser le(s) fichier(s) sélectionné(s) + Abaisser le(s) fichier(s) sélectionné(s) + + Remove selected file(s) from the list - Retirer le(s) fichier(s) selectionné(s) de la liste + Retirer le(s) fichier(s) selectionné(s) de la liste + + Append files to the list - Ajouter des fichiers à la liste + Ajouter des fichiers à la liste + + Select the input images - Selectionnez les images d'entrée + Selectionnez les images d'entrée + &Done - &Fait - - - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Depuis:</span></p></body></html> + &Fait - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Vers:</span></p></body></html> + + To + Vers - Log: - Journal : + + Log + Journal + Exif operations report - Rapport des opérations Exif + Rapport des opérations Exif + &Show only: - Montrer &seulement: + Montrer &seulement: + Filter messages based on severity - Trier les messages en fonction de la gravité + Trier les messages en fonction de la gravité + All messages - Tous les messages + Tous les messages + Errors only - Seulement les erreurs + Seulement les erreurs + &Filter log messages: - &Filtre du journal: + &Filtre du journal: + &Start - &Lancer + &Lancer + Clear filter text - Effacer le filtre + Effacer le filtre + Keep existing Exif tags in destination file - Converser les champs Exif de la destination + Converser les champs Exif de la destination + &Cancel - &Annuler + &Annuler + + All Supported formats - Tous les formats supportés - - - From - - - - To - - - - Log - Log + Tous les formats supportés 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 + Document de licence %1 introuvable, vous pouvez le trouver en ligne : %2ici%3 + + + + Donation + Don + + + + Would you like to donate? + Voulez-vous effectuer un don? + Yes, I'd love to! - Oui, avec plaisir! + Oui, avec plaisir! - Donation - + + Stop Bothering Me + Ne m'embêtez plus avec ça - Would you like to donate? + + Remind me later + Rappeler-le moi plus tard + + + + UpdateChecker + + + A new release is ready for download! - Stop Bothering Me + + Click to download, or select Help->Update! - Remind me later + + Do you want to open the webpage for download now? diff -Nru luminance-hdr-2.3.0/i18n/lang_hi.ts luminance-hdr-2.3.1/i18n/lang_hi.ts --- luminance-hdr-2.3.0/i18n/lang_hi.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_hi.ts 2013-04-07 18:41:14.000000000 +0000 @@ -62,21 +62,16 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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; } @@ -91,12 +86,22 @@ - + + Changelog + + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + + + + &License Agreement - + <!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; } @@ -105,7 +110,7 @@ - + &OK @@ -124,237 +129,249 @@ - + Select the number of bracketed pictures used to create the HDRs - + Output - + Output format: - + Choose an HDR output file format - + hdr - + exr - + PFS - + tiff - + Predefined profile: - + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 - + Profile 2 - + Profile 3 - + Profile 4 - + Profile 5 - + Profile 6 - + Alignment - + Auto align the bracketed pictures - + Auto-align images - + + Auto-crop + + + + Use Hugin's align_image_stack engine - + Hugin's align_image_stack - + Use MTB (Median Threshold Bitmap) engine - + MTB - + Progress - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + &Cancel - + &Start - + &Close - + Choose a source directory - + Choose a output directory - - + + + Warning - + + Total number of pictures must be a multiple of number of bracketed images. - + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - + + Custom config %1 + + + + Started processing... - + Creating HDR... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... - + Written - + Error: - + Aborting... @@ -494,76 +511,111 @@ + Output Format: + + + + + JPEG + + + + + TIFF (16 bits) + + + + + PNG + + + + + BMP + + + + + PPM + + + + + PBM + + + + Output Folder: - + Selec&t... - + Conversion Log - + Batch operations report - + &Show only: - + 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 @@ -573,11 +625,6 @@ - - Saving using file format: %1 - - - @@ -601,36 +648,36 @@ - LuminanceHDR tone mapping settings text file (*.txt) + Luminance HDR tone mapping settings text file (*.txt) - + Processing... - + Start processing... - + Close - + &Done - + All tasks completed. - + Aborting... @@ -638,27 +685,27 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -666,288 +713,293 @@ CommandLineInterfaceManager - + Error: Alignment engine not recognized. - + Error: Wrong HDR creation format. - + Error: Unknown weight function specified. - + Error: Unknown response curve specified. - + Error: Unknown HDR creation model specified. - + Error: Unknown HDR creation format specified. - + Error: Unknown tone mapping operator specified. - + Error: Wrong tone mapping option format. - + Error: Unknown tone mapping option specified. - + Error: Quality must be in the range [0-100]. - + Error: Unknown option %1. - + Error: Missing argument for %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. - + 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 - + Tonemapping requested, saving to file %1. - + ERROR: Cannot save to file: %1 - + Failed loading images - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Commandline interface to %1. - - -h --help Display this help. + + -h --help Display this help. - - -v --verbose Print more messages during execution. + + -v --verbose Print more messages during execution. - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + -d --savealigned prefix Save aligned images to files which names start with prefix - - -c --config HDR creation config. Possible values: + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + + -c --config HDR creation config. Possible values: - - (Default is weight=triangular:response_curve=linear:model=debevec) + + -l --load HDR_FILE Load an HDR instead of creating a new one. - - -l --load HDR_FILE Load an HDR instead of creating a new one. + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + -t --tmo Tone mapping operator. Legal values are: - - -t --tmo Tone mapping operator. Legal values are: + + -p --tmoptions Tone mapping operator options. Legal values are: - - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. - - (Default is mantiuk06) + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - - -p --tmoptions Tone mapping operator options. Legal values are: + + (No tonemapping is performed unless -o is specified). - + + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + + + + + (Default is weight=triangular:response_curve=linear:model=debevec) + + + + + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + + + + (Default is mantiuk06) + + + + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - + bias=VALUE (for drago) - + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - - - - - -q --quality VALUE Quality of the saved tone mapped file (0-100). - - - - - (No tonemapping is performed unless -o is specified). - - - - + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. @@ -999,12 +1051,32 @@ EditingTools - + Pan the image to a region - + + Maskable + + + + + Good image + + + + + Ed&itable + + + + + R&eference + + + + Choose a directory and a prefix @@ -1062,11 +1134,6 @@ - - Preview &Mode: - - - Difference (E-P) @@ -1092,22 +1159,17 @@ - - Mask Color - - - - + Images List - + Ed&itable - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1115,43 +1177,43 @@ - + 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. - + Select the previous image in both lists - + Use this button to move the selection to the previous image in both lists. - + Select the next image in both lists - + Use this button to move the selection to the next image in both lists. - + R&eference - + The reference image is the one currently selected - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1159,72 +1221,57 @@ - + Tools - + Crop the stack of images after a selection with the left mouse button has been made - + Clicking this button you will be able to crop all the images to the size that you have previously selected with the left mouse button (press and hold the left mouse button and move the pointer to select a crop area, then press this button). - + &Crop All Images - + Ctrl+X - + &Anti Ghosting - + &Save Images - + Ctrl+S - - A&dd Mask - - - - - Remove Mas&k - - - - + Size: - - pixels - - - - + &Strength: - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1234,7 +1281,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1242,7 +1289,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1250,103 +1297,162 @@ - + Shift values for editable image - + Reset the shift values for the currently selected movable image - + &Reset - + Reset the shift values for all the images - + Reset &All - + &Horizontal: - + &Vertical: - + Insert an horizontal shift value for the currently selected movable image - - + + + px - + + &Mode: + + + + + + Brush + + + + + + Lasso + + + + + Mask + + + + + A&dd + + + + + &Remove + + + + + Lasso - Draw a free hand selection area + + + + + Brush - Paint the mask using the brush + + + + + Save mask + + + + + + ... + + + + + Apply saved mask + + + + Insert a vertical shift value for the currently selected movable image - + Move up of 1 pixel the currently selected movable image - + Move down of 1 pixel the currently selected movable image - + Move right of 1 pixel the currently selected movable image - + Move left of 1 pixel the currently selected movable image - + Histogram - + Get information about the graphical elements - + &What's this? - + Shift+F1 - + &Next > - + &Cancel @@ -1354,7 +1460,7 @@ GenericViewer - + Pan the image to a region @@ -1362,18 +1468,18 @@ HdrCreationManager - + The image %1 is an 8 bit format (LDR) while the previous ones are not. - - + + The image %1 has an invalid size. - + The image %1 is an 16 bit format while the previous ones are not. @@ -1381,25 +1487,25 @@ HdrInputLoader - - - - + + + + ERROR loading %1 - + ERROR: The file<br>%1<br> is not a 8 bit or 16 bit tiff. - + ERROR: %1 - + ERROR: Failed Loading file: %1 @@ -1407,42 +1513,42 @@ HdrViewer - + &Mapping: - + Histogram: - + Linear - + Gamma 1.4 - + Gamma 1.8 - + Gamma 2.2 - + Gamma 2.6 - + Logarithmic @@ -1455,28 +1561,6 @@ - - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - [1/2] Load Input Images @@ -1529,22 +1613,49 @@ - + &Autoalign images - + + Auto-crop + + + + Hugin's align_image_stack - + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + MTB - + <!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; } @@ -1553,17 +1664,17 @@ - + [2/2] Choose Settings for HDR Creation - + Choose one of the predefined profiles: - + <!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; } @@ -1572,118 +1683,118 @@ - + Profile 1 - + Profile 2 - + Profile 3 - + Profile 4 - + Profile 5 - + Profile 6 - + Weighting function: - - - + + + Triangular - - + + Response curve: - - - - + + + + Linear - + HDR creation model: - - - + + + Debevec - + Anti-ghosting (beta!) - - - + + + Gamma - - + + Log - + Calibration - + Amount of iterations: - + Keep it small - + Use this only if the default profiles above do not yield good results - + Use custom configuration - + <!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; } @@ -1692,85 +1803,90 @@ - + [2/2] Choose Custom Configuration - + Weights: - + Choose confidence function over all the possible pixel values: - - + + Gaussian - - + + Plateau - + Response Curve: - + Predefined response curves: - + Load response function from file - + Load... - + Use calibration to find response curve (robertson02 algorithm) - + Save response function to file: - + Save As... - + HDR Creation Equation: - + Choose model: - - + + Robertson - + + Save Settings + + + + <!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; } @@ -1779,205 +1895,210 @@ - - + + &Next > - + &Cancel - + Image Filename - + Exposure - + + Custom config %1 + + + + 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 - + Loading... - - + + Start loading a set of images with different exposure - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> - - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - + EXIF data not found - - + + <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> - + Loading Error: - + Unknown - - - - + + + + Error... - + align_image_stack failed to align images. - + 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 - - - + + + &Finish - + Aligning... - - + + Processing... - + Load a camera response curve file - - + + Camera response curve (*.m);;All Files (*) - + Save a camera response curve file - + Weights: - + - Response curve: - + - Model: - + Logarithmic - + From Calibration - - From File + + From File: - + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> @@ -1996,7 +2117,7 @@ - + &Print... @@ -2007,7 +2128,7 @@ - + &Find... @@ -2028,110 +2149,110 @@ - + &Delete - + D&elete All - + Help SideBar - + LuminanceHDR Online Help - + &File - + &Edit - + &View - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Add Bookmark - + 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 associated with the protocol? @@ -2195,17 +2316,17 @@ IOWorker - + ERROR: The following file is not readable: %1 - + ERROR: File %1 has unsupported extension. - + ERROR: Failed loading file: %1 @@ -2213,7 +2334,7 @@ ImageQualityDialog - + Unknown @@ -2221,42 +2342,42 @@ ImgQualityDialog - + Save as - + Saved File Quality - - Quality: + + File size - - File size: + + Quality - + Unknown - + Ca&lculate - + &Save - + &Cancel @@ -2264,8 +2385,8 @@ LdrViewer - - + + LDR image [%1 x %2] @@ -2336,7 +2457,7 @@ MainWindow - + Luminance HDR @@ -2346,785 +2467,789 @@ - + &Help - + &Windows - + &View - + HDR &Histogram - + &Toolbars - + + Preview Panel + + + + &File - + &Edit - + Main Toolbar - + &New HDR image... - + New HDR image - - + + Create a new HDR image from a set of LDR or Raw images - + Create a new HDR image from a set of JPEG, Raw, or 8/16 bpc TIFF files - + Ctrl+N - + &Open HDR image... - + Open HDR image - - - + + + Load an existing HDR image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) - + Ctrl+O - + &Save as... - + Save as... - - - + + + Save image (HDR or LDR) - + Ctrl+S - + &Quit - - + + Quit Luminance HDR - + Exit - + Ctrl+Q - + Rotate c&ounter-clockwise - + Rotate counter-clockwise - - - + + + Rotate counter-clockwise the HDR image - + < - + Rotate c&lockwise - + Rotate clockwise - - - + + + Rotate clockwise the HDR image - + > - + Low Dynamic Range - - + + L - + Fit to Dynamic Range - + Fit to dynamic range - + \ - + Shrink Dynamic Range - + [ - + Extend Dynamic Range - + ] - + Decrease Exposure - + 0 - + &Increase Exposure - + 9 - + &Contents... - + About... - - - + + + Open user manual for Luminance HDR - + F1 - + &Normal Size - + Normal size - - - + + + View HDR image at its normal size - + O - + Zoom &In - - - + + + Zoom in - + + - + Zoom &Out - - - + + + Zoom out - + - - + &Fit in Window - - + + Fit in Window - - + + Make the HDR image fit its window - + W - + &Preferences... - + Luminance Options - - - + + + Set various options of Luminance - + Ctrl+P - + &Resize... - + Resize the HDR image - - - + + + Change size of the HDR image - + Ctrl+R - + Copy &Exif Data... - + Copy Exif Data - - - + + + Copy Exif data between two sets of files - + Ctrl+E - - &Align Images... - - - - - - - WORK IN PROGRESS - - - - - &About Qt + + Show on the right - - Show information about Qt + + Show on the bottom - - - Show information about Qt library that is used by Luminance + + Realtime Previews - - &Tile + + Update - - &Cascade + + &About Qt - - - Cascade + + Show information about Qt - - Toolbars + + + Show information about Qt library that is used by Luminance - + Text &under Icons - + &Icons Only - + &Text Only - + Text &Alongside Icons - + &Batch Tone Mapping... - + Convert multiple HDR images to LDR - - + + Convert multiple HDR images to LDR using existing settings files - + Ctrl+B - + &What's This? - - + + Get verbose information about user interface elements - + Shift+F1 - + About &Luminance HDR - + Show information about Luminance HDR - - + + Show information about Luminance HDR, its authors and contributors - + Save HDR image &preview... - - - + + + Save the current HDR Preview to an LDR file - + &Projective Transformation... - - - + + + Apply projective transformation to the current HDR image - + &Crop to Selection - + Crop to Selection - - + + Crop the image to selection rectangle - + Click and drag inside image area to create a selection, then use this button to crop to a new HDR image - + Remove &Selection - + Remove selection rectangle - - + + Remove selection rectangle from image area - + Make a &Donation - + Ctrl+D - + Lock Viewers - + Synchronize viewers mode (fit, fill or 1:1). - + Lock the images for sync view - + Minimize - + Maximize - + Bring All to Front - + Show Preview Panel - + Show/Hide Preview Panel - + Ctrl+V - + Adjust &Levels - - + + Adjust Levels - - + + Tune the histogram for the current LDR - + Ctrl+L - + Save All - - + + Save All LDR files - + Remove Tab - + Ctrl+W - + Fill Window - + Fill window with the current viewer - + Batch HDR... - + Ctrl+H - + Soft Proofing - + Gamut Check - + Ready. Now open an existing HDR image or create a new one! - + All HDR formats - + Load one or more HDR images... - + Save files in - + Failed to save - + Done! - + Aborting... - + Cropped Image - + 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. + +Do you want to continue? + + + + Untitled - + Untitled %1 - + Error: %1 @@ -3172,134 +3297,103 @@ - - Default Previews Width - - - - - px - - - - - Always show Preview Panel - - - - - Always show Wizard first page - - - - - HDR TIFF Default File Format - - - - - Good quality and smaller file size - - - - - LogLuv TIFF (float, 16bit per color channel) + + Default Previews Width - - Better quality, larger file size, better compatibility with other applications + + px - - Float TIFF (float, 32bit per color channel) + + Saves the settings along the program files, to be portable - - Show negative numbers as: + + Portable mode - - Show nan and +/-Inf values as: + + Always show Preview Panel - - Temporary Working Folder + + Always show Wizard first page - - &Browse... + + HDR TIFF Default File Format - - - Which LDR image format to save to + + Good quality and smaller file size - - Batch Tonemapping Default Output Format + + LogLuv TIFF (float, 16bit per color channel) - - JPEG + + Better quality, larger file size, better compatibility with other applications - - PNG + + Float TIFF (float, 32bit per color channel) - - PPM + + Show negative numbers as: - - PBM + + Show nan and +/-Inf values as: - - BMP + + Temporary Working Folder - - TIFF + + &Browse... - - + + Amount of threads to use on multicore/SMP machines - + Batch Tonemapping Number of Threads - + General - + Quality: - + <!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; } @@ -3313,49 +3407,49 @@ - + Bilinear - + VNG - + PPG - + AHD - - - - - - - - - - - - - + + + + + + + + + + + + + ... - + Median: - + <!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; } @@ -3365,7 +3459,7 @@ - + <!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; } @@ -3375,12 +3469,12 @@ - + Do not stretch or rotate pixels - + <!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; } @@ -3391,22 +3485,22 @@ - + Interpolate RGB using 4 colours - + White Balance - + Method - + <!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; } @@ -3420,33 +3514,33 @@ - + Predefined D65 - - + + Camera - + Auto - + Manual - + Temperature (Kelvin) - + <!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; } @@ -3456,22 +3550,22 @@ - + Green - + Set here the green component to set magenta color cast removal level - + Highlights - + <!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; } @@ -3485,32 +3579,32 @@ - + Solid White - + Do not transform - + Blend - + Reconstruct - + Level - + <!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; } @@ -3520,22 +3614,22 @@ - + Correct false colors in highlights - + Auto Brightness - + Brightness - + <!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; } @@ -3545,7 +3639,7 @@ - + <!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; } @@ -3555,12 +3649,12 @@ - + Black - + <!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; } @@ -3570,7 +3664,7 @@ - + <!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; } @@ -3580,12 +3674,12 @@ - + Saturation - + <!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; } @@ -3595,12 +3689,12 @@ - + NR and CA Correction - + <!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; } @@ -3610,12 +3704,12 @@ - + Enable noise reduction - + <!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; } @@ -3625,12 +3719,12 @@ - + Threshold: - + <!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; } @@ -3640,12 +3734,12 @@ - + Enable Chromatic Aberration correction - + <!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; } @@ -3655,7 +3749,7 @@ - + <!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; } @@ -3665,54 +3759,54 @@ - + Red Component - + Blue Component - + Monitor - + Monitor Profile - - - + + + Browse... - + Camera profile - + Printer - + Printer profile - + align_image_stack command line arguments - + <!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; } @@ -3721,89 +3815,54 @@ - + &Cancel - + &OK - - Choose a directory - - - - - - - Open ICC Profile - - - - - Color profile (*.icc *.ICC *.icm *.ICM) - - - - - - Color profile (*.icc) - - - - - PreviewPanel - - - Preview - - - - - Mantiuk '06 - - - - - Mantiuk '08 - - - - - Fattal + + Restart - - Drago + + For the settings to take effect, please restart the application! - - Durand + + Choose a directory - - Reinhard '02 + + + + Open ICC Profile - - Reinhard '05 + + Color profile (*.icc *.ICC *.icm *.ICM) - - Ashikhmin + + + Color profile (*.icc) + + + PreviewSettings - - Pattanaik + + Load settings @@ -3910,17 +3969,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: @@ -3928,149 +3987,307 @@ QObject - - + + Error Opening RAW File - + Error Unpacking RAW File - + Error Processing RAW File - + Memory Error in processing RAW File - + Error Creating PFS Frame - + Cannot convert %1 to a float - + Cannot convert %1 to an integer - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - + Using %1 threads. - + Loading file %1 - + Successfully loaded file %1. - - Aborting... - - - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - - - - + All LDR formats - + Save the LDR image as... - + All HDR formats - + Save the HDR image as... - + Save as... - + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. - - - - + + + + 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. + + + PreGamma=%1 + + + + + Contrast Equalization + + + + + Contrast + + + + + + Saturation + + + + + Detail + + + + + Luminance Level + + + + + Luminance Level=Auto + + + + + Color Saturation + + + + + Contrast Enhancement + + + + + Alpha + + + + + Beta + + + + + NoiseRedux + + + + + FFTSolver + + + + + simple + + + + + Equation 2 + + + + + Equation 4 + + + + + + Local + + + + + Bias + + + + + Spatial + + + + + + Range + + + + + Base + + + + + Multiplier + + + + + AutoLuminance + + + + + Cone + + + + + Rod + + + + + Key + + + + + Phi + + + + + Scales: + + + + + Lower + + + + + Upper + + + + + Brightness + + + + + Chromatic Adaptation + + + + + Light Adaptation + + ResizeDialog @@ -4379,6 +4596,14 @@ + TiffModeDialog + + + Save as ...TIFF + + + + TonemappingPanel @@ -4744,150 +4969,177 @@ - - + ... - + Load saved parameters - - Load parameters by comment - - - - + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - + Process - + &Result Size - - + + Gamma applied before tonemapping - + Pre-gamma - + Restore pregamma's default value (1) - + Size of the resulting LDR image - + Here you can choose the size of the resulting LDR image. - + 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. - + 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... - + 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: - TonemappingWarningDialog + TonemappingSettings - - Fattal Warning + + Load Custom Settings - - 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? + + Sort by + + + + + Comments: + + + + + Comment + + + + + Operator + + + + + Most Useful Operators + + + + + Tonemap + + + + + Load + + + + + Cancel @@ -5039,4 +5291,22 @@ + + UpdateChecker + + + A new release is ready for download! + + + + + Click to download, or select Help->Update! + + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_hu.ts luminance-hdr-2.3.1/i18n/lang_hu.ts --- luminance-hdr-2.3.0/i18n/lang_hu.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_hu.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Válasszon egy mappát - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -308,42 +315,14 @@ Köteges árnyalatnövelés - Add &Directory - &Mappa hozzáadása - - - &Add Files - &Fájlok hozzáadása - - - &Remove Files - Fájlok &törlése - - List of HDRs that will be tone mapped Feldolgozandó HDR képek listája - Add D&irectory - Ma&ppa hozzáadása - - - Add Fi&les - Fá&jlok hozzáadása - - - R&emove Files - Fájlok tö&rlése - - Output Eredmény - Select &Output Folder... - &Eredmények mappája... - - &Show only: &Csak ez látsszon: @@ -376,30 +355,6 @@ &Kész - Add all the HDRs in a directory to the list - A mappában levő összes HDR hozzáadása - - - Add single HDR files to the list - HDR fájlok hozzáadása egyenként - - - Remove single HDR files to the list - HDR fájlok törlése egyenként - - - Add all the Tone Mapping Setting files in a directory to the list - A mappában levő összes árnyalatnövelési jellemző fájl hozzáadása - - - Add single Tone Mapping Setting files to the list - Árnyalatnövelési jellemző fájlok hozzáadása egyenként - - - Remove single Tone Mapping Setting files to the list - Árnyalatnövelési jellemző fájlok törlése egyenként - - 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 @@ -464,10 +419,6 @@ - LuminanceHDR tone mapping settings text file (*.txt) - - - Start processing... @@ -492,10 +443,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -567,6 +514,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -654,14 +633,6 @@ HIBA: Nem lehet menteni: %1 - Cannot convert %1 to a float - Nem lehet %1-t floattá változtatni - - - Cannot convert %1 to an integer - Nem lehet %1-t egész számra változtatni - - Usage: %1 [OPTIONS]... [INPUTFILES]... Használat: %1 [lehetőségek]... [bemeneti fájl]... @@ -670,58 +641,6 @@ %1 parancssora. - -h --help Display this help. - -h --help(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)Ennek a használati útmutatónak a megjelenítése. - - - -v --verbose Print more messages during execution. - -v --verbose(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)Bővebb tájékoztatás a művelet közben. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB(sp)(sp)(sp)(sp)(sp)HDR-hez használandó igazítómű (alapból: igazítás nélkül). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,...(sp)(sp)(sp)(sp)Adja meg a megvilágítási értékeket (a bemeneti képek számának megfelelően). - - - -c --config HDR creation config. Possible values: - -c --config(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)HDR beállítások. Lehetséges értékek: - - - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load HDR_FÁJL(sp)(sp)(sp)(sp)(sp)Kész HDR képet megnyitni új készítése helyett. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save HDR_FÁJL(sp)(sp)(sp)(sp)(sp)Mentés HDR-ként. (alapból: ne ments)(sp) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma ÉRTÉK(sp)(sp)(sp)(sp)(sp)(sp)(sp)Árnyalatnöveléshez felhasználandó gammakorrektúra (alapból: 1)(sp) - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize ÉRTÉK(sp)(sp)(sp)(sp)(sp)(sp)A készítendő HDR szélessége (átméretezés gammakorrektúra és árnyalatnövelés előtt)(sp) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)Árnyalatnövelési művelet. Megengedett változatok: - - - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)(sp)Az árnyalatnövelési művelet opciói. Megengedett értékek: - - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output LDR_FÁJLsp)(sp)(sp)A megnövelt árnyalatú kép (LDR) mentéséhez használandó név. - - - (No tonemapping is performed unless -o is specified). - (Nincs árnyalatnövelés, hacsak -o nincs megadva). - - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. Meg kell adni vagy egy létező HDR fájlt (az -l kapcsolóval), vagy a KIINDULÁSI_FÁJLOK-at egy új HDR létrehozásához.(new line) @@ -827,7 +746,63 @@ - -q --quality VALUE Quality of the saved tone mapped file (0-100). + -h --help Display this help. + + + + -v --verbose Print more messages during execution. + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + -c --config HDR creation config. Possible values: + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + -t --tmo Tone mapping operator. Legal values are: + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + (No tonemapping is performed unless -o is specified). @@ -876,6 +851,22 @@ Pan the image to a region + + Maskable + + + + Good image + + + + Ed&itable + &Szerkeszthető + + + R&eference + Mo&zdulatlan + EditingToolsDialog @@ -920,10 +911,6 @@ &Kicsinyítés - Preview &Mode: - Előné&zet: - - Difference (E-P) Különbség (Sz-F) @@ -944,10 +931,6 @@ Szellemképcsökkentő maszk - Mask Color - Színmaszk - - Images List Képlista @@ -1038,22 +1021,10 @@ Ctrl+S - A&dd Mask - Masz&k hozzáadása - - - Remove Mas&k - Maszk el&távolítása - - Size: Méret: - pixels - képpont - - &Strength: &Vastagság: @@ -1171,6 +1142,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + + + + Apply saved mask + + GenericViewer @@ -1427,35 +1442,10 @@ A kalibrálásból eredő - From File - Fájlból - - HDR Creation Wizard - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Currently Loaded &Files @@ -1628,13 +1618,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1662,6 +1645,50 @@ align_image_stack failed to align images. + + Auto-crop + + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + HelpBrowser @@ -1865,23 +1892,23 @@ - Quality: + Unknown - File size: + Ca&lculate - Unknown + &Save - Ca&lculate + File size - &Save + Quality @@ -2112,30 +2139,10 @@ Ctrl+E - &Align Images... - Képek &igazítása... - - - WORK IN PROGRESS - Feldolgozás - - &About Qt Qt &névjegye - &Tile - Egymás &mellé - - - &Cascade - Egymás mö&gé - - - Cascade - Egymás mögé - - Aborting... Megszakítás... @@ -2148,10 +2155,6 @@ Fennálló változtatások... - Toolbars - Eszköztárak - - &Preferences... &Beállítások... @@ -2555,80 +2558,50 @@ Gamut Check - - - PreferencesDialog - - Tone Mapping - LDR - - Language - Nyelv - - - External Tools - Programok - - - JPEG - JPEG - - - PNG - PNG - - - PPM - PPM - - - PBM - PBM - - - BMP - BMP - - - Czech - cseh + Preview Panel + - English - angol + Show on the right + - French - francia + Show on the bottom + - German - német + Realtime Previews + - Indonesian - indonéziai + Update + - Italian - olasz + Fattal Warning + - Polish - lengyel + 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? + + + + PreferencesDialog - Russian - orosz + Tone Mapping + LDR - Spanish - spanyol + Language + Nyelv - Turkish - török + External Tools + Programok Show nan and +/-Inf values as: @@ -2643,14 +2616,6 @@ &OK - Hungarian - magyar - - - Please restart... - Kérem újraindítani... - - Choose a directory Válasszon egy mappát @@ -2699,14 +2664,6 @@ - Which LDR image format to save to - - - - TIFF - - - Amount of threads to use on multicore/SMP machines @@ -3010,10 +2967,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3109,47 +3062,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Fattal - Fattal - - Drago - Drago - - - Durand - Durand - - - Reinhard '02 - Reinhard '02 - - - Reinhard '05 - Reinhard '05 - - - Ashikhmin - Ashikhmin + Saves the settings along the program files, to be portable + - Pattanaik - Pattanaik + Portable mode + - Mantiuk '06 + Restart - Mantiuk '08 + For the settings to take effect, please restart the application! + + + PreviewSettings - Preview + Load settings @@ -3246,14 +3179,6 @@ QObject - Aborting... - Megszakítás... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Nem található a Qt JPEG modulja...<br>Csomagolja ki a DLL archívumát a mappák nevének használatával. - - Save as... Mentés másként... @@ -3357,163 +3282,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Kép átméretezése + PreGamma=%1 + - Width: - Szélesség: + Contrast Equalization + Kontraszt kiegyenlítés - Pixels - képpont + Contrast + - Percent - százalék + Saturation + - Height: - Magasság: + Detail + - Restore original size - Eredeti méret visszaállítása + Luminance Level + - &Reset - &Visszaállítás + Luminance Level=Auto + - &Cancel - Mé&gsem + Color Saturation + Színtelítettség - &Scale - Átmére&tezés + Contrast Enhancement + - Hdr Image Size - HDR kép mérete + Alpha + Alfa - Switch between pixels or percentage - Képpontok és százalék között átkapcsolni + Beta + Béta - Result size - Keletkező kép mérete + NoiseRedux + - - - SavedParameters - Simple - Egyszerű + FFTSolver + - Local Contrast Threshold - Heli kontraszt küszöb + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Eltolás (bias) + Eltolás (bias) - Spatial Kernel Sigma - Térbeli szigma mag + Spatial + - Range Kernel Sigma - Tartományi szigma mag + Range + Tartomány - Base Contrast - Alapkontraszt + Base + - Alpha - Alfa + Multiplier + Szorzó - Beta - Béta + AutoLuminance + - Color Saturation - Színtelítettség + Cone + - Noise Reduction - Zajcsökkentés + Rod + - Contrast Equalization - Kontraszt kiegyenlítés + Key + - Contrast Factor - Kontraszt tényező + Phi + Fi - Saturation Factor - Telítettségi tényező + Scales: + - Detail Factor - Részlettényező + Lower + - Cone and Rod based on Luminance - Fényességen alapuló kúp és rúd + Upper + - Cone Level - Kúp szintje + Brightness + Fényesség - Rod Level - Rúd szintje + Chromatic Adaptation + Színmódosítás - Multiplier - Szorzó + Light Adaptation + Fénymódosítás + + + ResizeDialog - Use Scales - Fokozatokat használni + Scale Image + Kép átméretezése - Key Value - Kulcsérték + Width: + Szélesség: - Range - Tartomány + Pixels + képpont - Lower Scale - Alsó fokozat + Percent + százalék - Upper Scale - Felső fokozat + Height: + Magasság: - Brightness - Fényesség + Restore original size + Eredeti méret visszaállítása - Chromatic Adaptation - Színmódosítás + &Reset + &Visszaállítás - Light Adaptation - Fénymódosítás + &Cancel + Mé&gsem + + + &Scale + Átmére&tezés + + + Hdr Image Size + HDR kép mérete + + + Switch between pixels or percentage + Képpontok és százalék között átkapcsolni + + + Result size + Keletkező kép mérete @@ -3713,6 +3663,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Load a tonemapping settings text file... @@ -3987,10 +3944,6 @@ - Load parameters by comment - - - ... @@ -4106,15 +4059,41 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning + Load Custom Settings - 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? + Sort by + + + + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4149,10 +4128,6 @@ &Kész - Log: - Napló: - - Exif operations report Jelentés az EXIF műveletekről @@ -4237,4 +4212,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_id.ts luminance-hdr-2.3.1/i18n/lang_id.ts --- luminance-hdr-2.3.0/i18n/lang_id.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_id.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Pilih direktori - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -308,58 +315,10 @@ Batch Tone Mapping - Add all the HDRs in a directory to the list - Tambah semua HDR kedalam direktory dalam daftar - - - Add &Directory - Tambah &Direktori - - - Add single HDR files to the list - Tambah file single HDR ke dalam daftar - - - &Add Files - &Tambah File - - - Remove single HDR files to the list - Buang file single HDR ke dalam daftar - - - &Remove Files - &Buang File - - List of HDRs that will be tone mapped Daftar HDR yang akan di tone mapped - Add all the Tone Mapping Setting files in a directory to the list - Tambah semua file di direktori Tone Mapping Setting ke dalam daftar - - - Add D&irectory - Tambah D&irektori - - - Add single Tone Mapping Setting files to the list - Tambah file single Tone Mapping Setting ke dalam daftar - - - Add Fi&les - Tambah Fi&les - - - Remove single Tone Mapping Setting files to the list - Buang file single Tone Mapping Setting ke dalam daftar - - - R&emove Files - &Hapus File - - 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 @@ -372,10 +331,6 @@ Output - Select &Output Folder... - Pilih folder &output... - - Batch operations report Laporan operasi Batch @@ -464,10 +419,6 @@ - LuminanceHDR tone mapping settings text file (*.txt) - - - Start processing... @@ -492,10 +443,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -567,6 +514,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -650,14 +629,6 @@ Error: Tidak dapat menyimpan ke file: %1 - Cannot convert %1 to a float - Tidak dapat mengkonversi %1 ke float - - - Cannot convert %1 to an integer - Tidak dapat mengkonversi %1 ke sebuah integer - - Failed executing align_image_stack @@ -670,164 +641,168 @@ - -h --help Display this help. + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - -v --verbose Print more messages during execution. + (Default is weight=triangular:response_curve=linear:model=debevec) - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + (Default is mantiuk06) - -c --config HDR creation config. Possible values: + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - (Default is weight=triangular:response_curve=linear:model=debevec) + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - -l --load HDR_FILE Load an HDR instead of creating a new one. + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + bias=VALUE (for drago) - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - -t --tmo Tone mapping operator. Legal values are: + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - (Default is mantiuk06) + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - -p --tmoptions Tone mapping operator options. Legal values are: + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + Load file %1 failed - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + EV values have been assigned. - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + Creating (in memory) the HDR. - localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + Saving to file %1. - sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + Image %1 saved successfully - bias=VALUE (for drago) + Could not save %1 - local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + NOT Saving HDR image to file. %1 - scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + Tonemapping requested, saving to file %1. - brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + Failed loading images - (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + Failed aligning images. - -o --output LDR_FILE File name you want to save your tone mapped LDR to. + Error: Quality must be in the range [0-100]. - (No tonemapping is performed unless -o is specified). + -h --help Display this help. - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - + -v --verbose Print more messages during execution. - Load file %1 failed + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - EV values have been assigned. + -d --savealigned prefix Save aligned images to files which names start with prefix - Creating (in memory) the HDR. + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - Saving to file %1. + -c --config HDR creation config. Possible values: - Image %1 saved successfully + -l --load HDR_FILE Load an HDR instead of creating a new one. - Could not save %1 + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - NOT Saving HDR image to file. %1 + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - Tonemapping requested, saving to file %1. + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - Failed loading images + -t --tmo Tone mapping operator. Legal values are: - Failed aligning images. + -p --tmoptions Tone mapping operator options. Legal values are: - Error: Quality must be in the range [0-100]. + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Quality of the saved tone mapped file (0-100). + (No tonemapping is performed unless -o is specified). @@ -876,6 +851,22 @@ Pan the image to a region + + Maskable + + + + Good image + + + + Ed&itable + Ed&itable + + + R&eference + R&eferensi + EditingToolsDialog @@ -920,10 +911,6 @@ Zoom &Out - Preview &Mode: - Preview &Mode: - - Difference (E-P) Difference (E-P) @@ -944,10 +931,6 @@ Antighosting Mask - Mask Color - Mask Color - - Images List Daftar Image @@ -1038,22 +1021,10 @@ Ctrl+S - A&dd Mask - Ta&mbahkan Mask - - - Remove Mas&k - Buang Mas&k - - Size: Size: - pixels - Pixels - - &Strength: &Strength: @@ -1166,6 +1137,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + + + + Apply saved mask + + GenericViewer @@ -1430,35 +1445,10 @@ Dari Kalibrasi - From File - Dari File - - HDR Creation Wizard - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Currently Loaded &Files @@ -1623,13 +1613,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1657,6 +1640,50 @@ align_image_stack failed to align images. + + Auto-crop + + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + HelpBrowser @@ -1860,23 +1887,23 @@ - Quality: + Unknown - File size: + Ca&lculate - Unknown + &Save - Ca&lculate + File size - &Save + Quality @@ -2135,34 +2162,10 @@ Ctrl+E - &Align Images... - &Align Images... - - - WORK IN PROGRESS - MASIH DALAM PENGERJAAN - - &About Qt &Tentang Qt - &Tile - &Tile - - - &Cascade - &Cascade - - - Cascade - Cascade - - - Toolbars - Toolbars - - &Icons Only Hanya &Icon @@ -2550,32 +2553,42 @@ Gamut Check - - - PreferencesDialog - Tone Mapping - Tone Mapping + Preview Panel + - JPEG - JPEG + Show on the right + - PNG - PNG + Show on the bottom + + + + Realtime Previews + + + + Update + - PPM - PPM + Fattal Warning + - PBM - PBM + 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? + + + + PreferencesDialog - BMP - BMP + Tone Mapping + Tone Mapping &Cancel @@ -2642,14 +2655,6 @@ - Which LDR image format to save to - - - - TIFF - - - Amount of threads to use on multicore/SMP machines @@ -2957,10 +2962,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3056,47 +3057,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Reinhard '02 - Reinhard '02 - - - Reinhard '05 - Reinhard '05 - - - Mantiuk '06 - - - - Mantiuk '08 - - - - Fattal - - - Drago + Saves the settings along the program files, to be portable - Durand + Portable mode - Ashikhmin + Restart - Pattanaik + For the settings to take effect, please restart the application! + + + PreviewSettings - Preview + Load settings @@ -3193,14 +3174,6 @@ QObject - Aborting... - Membatalkan... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Tidak menemukan Plugin Qt's JPEG...<br>Dimohon unzip paket DLL menggunakan opsi "use folder names" telah diaktifkan. - - Save as... Simpan sebagai... @@ -3304,151 +3277,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Scale Image + PreGamma=%1 + - Hdr Image Size - Ukuran Image HDR + Contrast Equalization + Contrast Equalization - Width: - Lebar: + Contrast + - Switch between pixels or percentage - Mengalihkan antara pixels atau persen + Saturation + - Pixels - Pixels + Detail + - Percent - Persen + Luminance Level + - Height: - Tinggi: + Luminance Level=Auto + - Result size - Hasil ukuran + Color Saturation + Color Saturation - Restore original size - Kembalikan ke ukuran semula + Contrast Enhancement + - &Reset - &Reset + Alpha + - &Cancel - &Batal + Beta + Beta - &Scale - &Skala + NoiseRedux + - - - SavedParameters - Simple - Simple + FFTSolver + + + + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Bias + Bias - Spatial Kernel Sigma - Spatial Kernel Sigma + Spatial + - Range Kernel Sigma - Range Kernel Sigma + Range + Range - Base Contrast - Base Contrast + Base + - Beta - Beta + Multiplier + Multiplier - Color Saturation - Color Saturation + AutoLuminance + - Noise Reduction - Noise Reduction + Cone + - Contrast Equalization - Contrast Equalization + Rod + - Contrast Factor - Contrast Factor + Key + - Saturation Factor - Saturation Factor + Phi + Phi - Cone and Rod based on Luminance - Cone and Rod based on Luminance + Scales: + - Cone Level - Cone Level + Lower + - Rod Level - Rod Level + Upper + - Multiplier - Multiplier + Brightness + Brightness - Use Scales - Gunakan Skala + Chromatic Adaptation + Chromatic Adaptation - Key Value - Niai Kunci + Light Adaptation + Light Adaptation + + + ResizeDialog - Range - Range + Scale Image + Scale Image - Lower Scale - Lower Scale + Hdr Image Size + Ukuran Image HDR - Upper Scale - Upper Scale + Width: + Lebar: - Brightness - Brightness + Switch between pixels or percentage + Mengalihkan antara pixels atau persen - Chromatic Adaptation - Chromatic Adaptation + Pixels + Pixels - Light Adaptation - Light Adaptation + Percent + Persen + + + Height: + Tinggi: + + + Result size + Hasil ukuran + + + Restore original size + Kembalikan ke ukuran semula + + + &Reset + &Reset + + + &Cancel + &Batal + + + &Scale + &Skala @@ -3648,6 +3658,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Load a tonemapping settings text file... @@ -3914,10 +3931,6 @@ - Load parameters by comment - - - ... @@ -4041,15 +4054,41 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning + Load Custom Settings - 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? + Sort by + + + + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4076,10 +4115,6 @@ Tambah file ke dalam daftar - Log: - Log: - - Exif operations report Laporan operasi Exif @@ -4172,4 +4207,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_it.ts luminance-hdr-2.3.1/i18n/lang_it.ts --- luminance-hdr-2.3.0/i18n/lang_it.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_it.ts 2013-04-07 18:41:14.000000000 +0000 @@ -33,7 +33,8 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + Why is HTML code under translation? + <!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;"> @@ -63,7 +64,7 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Tiff LDR bugfixes and suggestion</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">DCRaw</span><span style=" font-size:9pt;"><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-size:9pt; font-weight:600;">And also</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -72,7 +73,7 @@ </style></head><body style=" font-family:'Sans Serif'; 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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR imaging workflow application<br />(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-2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -98,13 +99,16 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + Lista dei cambiamenti + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + @@ -200,14 +204,6 @@ Cartella dove gli HDR verranno salvati - Messages - Messaggi - - - Choose a directory - Seleziona una directory - - Started processing... Elaborazione in corso... @@ -256,14 +252,6 @@ Usa MTB (Median Threshold Bitmap) - Select &Input Folder - Seleziona la cartella &sorgente - - - Select &Output Folder - Seleziona la cartella &destinazione - - &Cancel A&nnulla @@ -284,18 +272,10 @@ Attenzione - The chosen output directory contains HDR files. Those files might be overwritten, - La directory di output selezionata contiene files HDR. Questi files potrebbero venir sovrascritti. - - 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. - The chosen output directory contains HDR files. Those files might be overwritten. - La directory di output selezionata contiene files HDR. Questi files potrebbero venir sovrascritti. - - Output Destinazione @@ -309,11 +289,11 @@ Input folder: - Cartella di input + Cartella di input: Output folder: - Cartella di output + Cartella di output: Choose a source directory @@ -331,6 +311,14 @@ Continuare? + + Auto-crop + Auto-ritaglio + + + Custom config %1 + Configurazione personalizzata %1 + BatchTMDialog @@ -339,42 +327,14 @@ Tone Mapping Multiplo - Add &Directory - Aggiungi &Cartella - - - &Add Files - &Aggiungi File - - - &Remove Files - &Rimuovi File - - List of HDRs that will be tone mapped Lista di Hdr su cui verra' eseguito il tone mapping - Add D&irectory - Aggiungi Ca&rtella - - - Add Fi&les - Aggiungi Fi&le - - - R&emove Files - &Rimuovi dei File - - Output Uscita - Select &Output Folder... - Selezione una cartella di &uscita... - - &Show only: &Mostra solo: @@ -419,34 +379,6 @@ Immagini HDR da convertire - Add all the HDRs in a directory to the list - Aggiungi tutti gli HDR in una directory alla lista - - - Add single HDR files to the list - Aggiungi singoli file HDR alla lista - - - Remove single HDR files to the list - Rimuovi singoli file HDR dalla lista - - - Tone Mapping Settings Files - Files parametri di Tonemapping - - - Add all the Tone Mapping Setting files in a directory to the list - Aggiungi tutti i file di impostazioni di tone mapping presenti in una directory alla lista - - - Add single Tone Mapping Setting files to the list - Aggiungi dei singoli file di impostazioni di tone mapping alla lista - - - Remove single Tone Mapping Setting files to the list - Rimuovi file di impostazioni di tone mapping dalla lista - - List of Tone Mapping Setting files that will be used to tone map each HDR Lista di file di impostazioni di tone mapping che saranno usati per eseguire il tone mapping su ciascuna HDR @@ -503,18 +435,10 @@ Carica il file di testo impostazioni tonemapping... - LuminanceHDR tone mapping settings text file (*.txt) - File di testo impostazioni Luminance (*.txt) - - All tasks completed. Tutti i task sono stati completati. - Saving using file format: %1, (quality - if applicable): %2 - Salvataggio in formato %1, (qualità - se applicabile): %2 - - Aborting... Operazione interrotta... @@ -523,18 +447,6 @@ Impostazioni tone mapping - From Database - Da Database - - - R&emove - R&imuovi - - - Ouput Image Width - Larghezza immagine - - % % @@ -543,14 +455,6 @@ Qualità immagine - Saving using file format: %1 - Salvataggio usando formato file: %1 - - - From Data&base - Da Data&base - - Ouput Image Width: Larghezza Immagine: @@ -622,6 +526,38 @@ Alt+M Alt+M + + Output Format: + Formato di uscita: + + + JPEG + JPEG + + + TIFF (16 bits) + TIFF (16 bits) + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + File configurazione tone mapping di Luminance HDR (*.txt) + BatchTMJob @@ -701,14 +637,6 @@ ERRORE: Impossibile salvare il file %1 - Cannot convert %1 to a float - Impossibile convertire %1 in un valore floating point - - - Cannot convert %1 to an integer - Impossibile convertire %1 in un valore intero - - Error: Unknown weight function specified. Errore: Funzione peso specificata sconosciuta. @@ -725,62 +653,10 @@ interfaccia a linea di comando per %1. - -h --help Display this help. - -h --help Mostra questo testo. - - - -v --verbose Print more messages during execution. - -v --verbose Stampa maggiori informazioni durante l'esecuzione. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB Tipo di allineamento usato per la creazione di un HDR (default: nessun allineamento). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Specifica valori EV numerici (tanti quanti INPUTFILES). - - - -c --config HDR creation config. Possible values: - -c --config Configurazione per la creazione di HDR. Valori possibili: - - - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load HDR_FILE Va a caricare il file HDR specificato invece di crearne uno nuovo. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save HDR_FILE Salva il file HDR. (default: non salvare) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VALORE Valore di gamma da usare per il tone mapping. (default: 1) - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize VALORE Larghezza a cui viene ridimensionato l'HDR (ridimensionato prima del gamma e tone mapping) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo operatore di Tone mapping. Valori possibili sono: - - - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions Opzioni dell'operatore di Tone mapping. Valori possibili sono: - - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) contrast=VALORE:saturation=VALORE:detail=VALORE:equalization=true|false (per mantiuk06) - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output LDR_FILE Nome del file su cui viene salvata l'immagine LDR. - - - (No tonemapping is performed unless -o is specified). - (Il tone mapping non viene eseguito a meno che -o venga specificato). - - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. O viene caricato un file HDR esistente (usando l'opzione -l) o vanno specificati INPUTFILES per creare un nuovo HDR. @@ -831,10 +707,6 @@ (Predefinito è Mantiux '06) - -u --gui Start in gui mode with input files. - -u --gui Avvia in modalità grafica con file di input. - - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 @@ -887,8 +759,64 @@ Errore: La qualità deve essere nell'intervallo [0-100]. - -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALORE Qualità del file che viene salvato (0-100). + -h --help Display this help. + -h --help Mostra help. + + + -v --verbose Print more messages during execution. + -v --verbose Mostra messaggi durante l'esecuzione. + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + -a --align AIS|MTB Metodo di allineamento da usare durante la creazione dell'HDR (default: nessun allineamento). + + + -d --savealigned prefix Save aligned images to files which names start with prefix + -d --savealigned prefix Salva le immagini allineate in file che iniziano con prefix + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + -e --ev EV1,EV2,... Specifica il valore numerico per EV (tanti quanti INPUTFILES). + + + -c --config HDR creation config. Possible values: + -c --config Processo creazione HDR. Valori possibili: + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + -l --load HDR_FILE Carica un HDR invece di crearne uno nuovo. + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + -s --save HDR_FILE Salva in un formato HDR. (default: nessun salvataggio) + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + -g --gamma VALUE Gamma da utilizzare durante il tone mapping. (default: 1) + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + -r --resize VALUE Larghezza alla quale vuole ridimensione l'HDR (ridimensionamento applicato prima del gamma e del tone mapping) + + + -t --tmo Tone mapping operator. Legal values are: + -t --tmo Operatore Tone mapping. Valori possibili sono: + + + -p --tmoptions Tone mapping operator options. Legal values are: + -p --tmoptions Opzioni operatori Tone mapping. Valori possibili sono: + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + -o --output LDR_FILE Name del file in cui salvare l'immagine dopo il tone mapping. + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + -q --quality VALUE Qualità dell'immagine che contiene il tone mapping (0-100). + + + (No tonemapping is performed unless -o is specified). + (Nessun tonemapping verrà effettuato senza specificare -o). @@ -936,6 +864,23 @@ Choose a directory and a prefix Seleziona una directory e un prefisso + + Maskable + :S + Mascherabile + + + Good image + Immagine di riferimento + + + Ed&itable + Mod&ificabile + + + R&eference + &Riferimento + EditingToolsDialog @@ -980,10 +925,6 @@ Zoom &Out - Preview &Mode: - Modalita' di &anteprima: - - Pivot Only (P) Solo Pivot (P) @@ -992,10 +933,6 @@ Maschera antighosting - Mask Color - Colore Maschera - - Images List Lista delle Immagini @@ -1062,22 +999,10 @@ Ctrl+S - A&dd Mask - &Aggiungi Maschera - - - Remove Mas&k - Rimuovi Ma&schera - - Size: Dimensioni: - pixels - pixels - - &Strength: &Forza: @@ -1177,7 +1102,7 @@ <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'immagine correntemente selezionata e' quella che puoi traslare e' che e' possibile marcare con una maschera anti-ghosting.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'immagine correntemente selezionata è quella che puoi traslare e su cui puoi disegnare una maschera anti-ghosting.</p></body></html> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -1187,7 +1112,7 @@ <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'immagine correntemente selezionata in questa lista funge da posizione di riferimento per l'immagine editabile</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'immagine correntemente selezionata in questa lista è la posizione di riferimento per l'immagine editabile</p></body></html> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -1207,7 +1132,7 @@ <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qui e' possibilie visualizzare e settare i valori di shift per l'immagine editabile correntemente selezionata</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qui è possibilie visualizzare e settare i valori di traslazione per l'immagine editabile correntemente selezionata</p></body></html> Shift values for editable image @@ -1231,6 +1156,50 @@ Histogram Istogramma + + &Mode: + &Modalità: + + + Brush + Pennello + + + Lasso + Lazo + + + Mask + Maschera + + + A&dd + A&ggiungi + + + &Remove + &Rimuovi + + + Lasso - Draw a free hand selection area + Lazo - Disegna una selezione a mano libera + + + Brush - Paint the mask using the brush + Pennello - Disegna una maschera usando il pennello + + + Save mask + Salva maschera + + + ... + ... + + + Apply saved mask + Applica la maschera salvata + GenericViewer @@ -1347,44 +1316,6 @@ Wizard Creazione HDR - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">Assistente creazione HDR</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Questo assistente vi guiderà nel fondere più immagini con differenti esposizioni in un unica <a href="http://it.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">immagine HDR</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Le immagini devono essere riprese da una sola macchina fotografica nelle medesime condizioni e possibilmente utilizzando un cavalletto.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sarete guidati attraverdo tutti i passaggi: importare le immagini, allinearle, scegliere un profilo per creare l'HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vincoli:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tutte le immagini devono avere la stessa dimensione</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tutte le immagini devono avere la stessa profondità di colore</p></body></html> - - Add Images Aggiungi Immagini @@ -1629,16 +1560,6 @@ Inizia col caricare un insieme di immagini con differente esposizione - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - <font color="#FF0000"><h3><b>ATTENZIONE:</b></h3></font> Luminance HDR non ha trovato gli <i>EXIF</i> tags rilevanti -per le immagini seguenti: - <ul> %1</ul> <hr>Potete ancora procedere nel creare una Hdr. Per questo dovete inserire <b>manualmente</b> gli EV (valori di esposizione) o le differenze di apertura. <hr>Se volete che Luminance HDR lo faccia <b>automaticamente</b>, dovete caricare delle immagini con almeno -i seguenti dati EXIF: <ul><li>Velocità otturatore (secondi)</li> <li>Apertura (f-number)</li></ul> <hr><b>Suggerimento:</b> La perdita dei dati EXIF usualmente accade quando preprocessate le vostre immagini.<br> Potete effettuare una <b>copia dei dati EXIF</b> tra due insiemi di immagini utilizzando <i><b>"Copia i dati Exif..."</b></i> dal menu Strumenti. - - Loading Error: Errore caricamento: @@ -1707,10 +1628,6 @@ Via calibrazione - From File - Da File - - <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> @@ -1758,23 +1675,68 @@ align_image_stack failed to align images. align_image_stack ha fallito nell'allineare le immagini. - - - HelpBrowser - - Luminance Help - Documentazione Luminance - - - Luminance HDR Help - Luminance HDR Help - - &Print... - &Stampa... + Auto-crop + Auto-ritaglio - &Exit + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + Salva parametri + + + Custom config %1 + Configurazione personalizzata %1 + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + <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> %1</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>. + + + From File: + Da file: + + + + HelpBrowser + + Luminance Help + Documentazione Luminance + + + Luminance HDR Help + Luminance HDR Help + + + &Print... + &Stampa... + + + &Exit &Esci @@ -1958,14 +1920,6 @@ Qualità file - Quality: - Qualità: - - - File size: - Dimensione File: - - Unknown Sconosciuto @@ -1981,6 +1935,14 @@ &Cancel A&nnulla + + File size + Dimensione file + + + Quality + Qualità + LdrViewer @@ -1988,26 +1950,6 @@ LDR image [%1 x %2] Immagine LDR [%1x%2] - - 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. - LevelsDialog @@ -2225,30 +2167,10 @@ Ctrl+E - &Align Images... - &Allinea Immagini... - - - WORK IN PROGRESS - LAVORO DA FINIRE - - &About Qt Informazioni su &Qt - &Tile - &Affianca - - - &Cascade - &Disponi - - - Cascade - Disponi - - Convert multiple HDR images to LDR Convertire più immagini HDR in LDR @@ -2333,10 +2255,6 @@ Modifiche non salvate... - Toolbars - Barre degli Strumenti - - &Preferences... &Opzioni... @@ -2550,30 +2468,6 @@ Ctrl+D - Next - Successivo - - - Next Image - Immagine successiva - - - Show Next Image - Visualizza l'immagine successiva - - - Previous - Precedente - - - Previous Image - Immagine precedente - - - Show Previous Image - Visualizza l'immagine precedente - - Lock the images for sync view Sincronizza le immagini @@ -2691,53 +2585,58 @@ Soft Proofing - + Gamut Check - + Controllo Gamut - - - ParametersDialog - Saved Parameters - Parametri salvati + Preview Panel + Panello Anteprima - - - PreferencesDialog - Tone Mapping - Tone Mapping + Show on the right + Mostra alla destra - Language - Lingua + Show on the bottom + Mostra in basso - External Tools - Strumenti esterni + Realtime Previews + - JPEG - JPEG + Update + Aggiorna - PNG - PNG + Fattal Warning + Avvertimento per Fattal - PPM - PPM + 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. + +Vuoi continuare? + + + PreferencesDialog - PBM - PBM + Tone Mapping + Tone Mapping - BMP - BMP + Language + Lingua + + + External Tools + Strumenti esterni Preferences @@ -2748,54 +2647,6 @@ Interfaccia - Czech - Ceco - - - English - Inglese - - - Finnish - Finlandese - - - French - Francese - - - German - Tedesco - - - Indonesian - Indonesiano - - - Italian - Italiano - - - Polish - Polacco - - - Romanian - Rumeno - - - Russian - Russo - - - Spanish - Spagnolo - - - Turkish - Turco - - HDR Options Opzioni HDR @@ -2820,14 +2671,6 @@ Mostra i numeri negativi come: - C&hoose - &Scegli - - - Which LDR image format to save to - Formato immagine LDR - - Amount of threads to use on multicore/SMP machines Numero di threads da usare su macchine multicore/SMP @@ -3225,84 +3068,6 @@ <!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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</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;">Profilo fotocamera</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 lo spazio di colore di ingresso usato per la decodifica dei dati RAW.</p> -<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;">Nessuno</span>: Nessun profilo è usato durante la decodifica RAW.</p> -<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;">Incorporato</span>: usa il profilo di colore incorporato nel file RAW se esiste.</p> -<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;">Personalizzato</span>: usa un peofilo di colore di ingresso personalizzato.</p></body></html> - - - None - Nessuno - - - Built in - Incorporato - - - Custom - Personalizzato - - - <!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;">Workspace</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 output color space used to decode RAW data.</p> -<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;">Raw (linear)</span>: in this mode, no output color space is used during RAW decoding.</p> -<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;">sRGB</span>: this is a RGB color space, created cooperatively by Hewlett-Packard and Microsoft. It is the best choice for images destined for the Web and portrait photography.</p> -<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;">Adobe RGB</span>: this color space is an extended RGB color space, developed by Adobe. It is used for photography applications such as advertising and fine art.</p> -<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;">Wide Gamut</span>: this color space is an expanded version of the Adobe RGB color space.</p> -<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;">Pro-Photo</span>: this color space is an RGB color space, developed by Kodak, that offers an especially large gamut designed for use with photographic outputs in mind.</p> -<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;">Custom</span>: use a custom output color space profile.</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;">Spazio di lavoro</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 lo spazio di lavoro di uscita usato per la decodifica RAW.</p> -<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;">Raw (lineare)</span>: in questa modalità, nessuno spazio di colore di uscita è usato durante la decodifica.</p> -<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;">sRGB</span>: queto è uno spazio di colore RGB, creato congiuntamente da Hewlett-Packard e Microsoft. E' la scelta migliore per immagini destinate al Web e ritratti.</p> -<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;">Adobe RGB</span>: questo è uno spazio di colore RGB esteso, sviluppato da Adobe. E' usato per applicazioni fotografiche come pubblicità e arte.</p> -<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;">Ampio Gamut</span>: è una versione estesa dello spazio di lavoro Adobe RGB.</p> -<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;">Pro-Photo</span>: questo è uno spazio di lavoro RGB sviluppato da Kodak, il quale offre un gamut particolarmente ampio, progettato con in mente un utilizzo fotografico.</p> -<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;">Personalizzato</span>: usa un profilo di colore di uscita personalizzato.</p></body></html> - - - RAW - RAW - - - sRGB - sRGB - - - Adobe RGB - Adobe RGB - - - Wide Gamut - Ampio Gamut - - - Pro Photo - Pro Photo - - - <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3324,26 +3089,10 @@ &OK - Hungarian - Ungherese - - - Please restart LuminanceHDR to use the new language (%1). - Riavviare Luminance per usare la lingua: (%1). - - - Please restart... - Riavviare... - - Choose a directory Seleziona una directory - TIFF - TIFF - - Default Previews Width Largezza predefinita anteprima @@ -3360,18 +3109,10 @@ Cartella di lavoro temporanea - Batch Tonemapping Default Output Format - Formato di uscita di default per il Batch Tonemapping - - Batch Tonemapping Number of Threads Numero di thread per il Batch Tonemapping - Batch Tonemapping Default Output Quality - Qualità predefinita del salvataggio per il Batch Tonemapping - - General Generale @@ -3416,18 +3157,10 @@ Componente Blue - Camera Profile - Profilo Camera - - Camera profile Profilo della fotocamera - Color Space - Spazio colore - - align_image_stack command line arguments Argomenti linea di comando align_image_stack @@ -3468,63 +3201,31 @@ Sfoglia... - Chinese - Cinese - - - Hindi - Hindi - - Color profile (*.icc *.ICC *.icm *.ICM) Profilo di colore (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Fattal - Fattal - - - Drago - Drago - - - Durand - Durand - - - Reinhard '02 - Reinhard '02 - - Reinhard '05 - Reinhard '05 - - - Ashikhmin - Ashikhmin - - - Pattanaik - Pattanaik + Saves the settings along the program files, to be portable + Salva i parametri insieme ai file del programma, in modo da essere portable - Form - Form + Portable mode + Modalità portable - Mantiuk '06 - + Restart + Riavvia - Mantiuk '08 - + For the settings to take effect, please restart the application! + Affinchè i nuovi settaggi abbiano effetto, per favore riavvia l'applicazione! + + + PreviewSettings - Preview - Anteprima + Load settings + Carica parametri @@ -3620,14 +3321,6 @@ QObject - Aborting... - Operazione interrotta... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Non e' stato possibile trovare il plugin JPEG di Qt...<br> Scompatta il pacchetto delle DLL con l'opzione "utilizza i nomi di cartelle" attivata. - - All LDR formats Tutti i formati LDR @@ -3696,18 +3389,6 @@ Attenzione - I cannot perform the color transform. - Non posso eseguire la trasformazioe di colore. - - - I cannot open camera profile. Please select a different one. - Non posso aprire il profilo della fotocamera. Selezionarne uno differente. - - - I cannot perform the color transform. Please select a different camera profile. - Non posso eseguire la trasformazione di colore. Selezionare un profilo della fotocamera differente. - - Error Opening RAW File Errore nell'apertura del file RAW @@ -3743,203 +3424,188 @@ 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. - - - ResizeDialog - Scale Image - Ridimensiona l'immagine + PreGamma=%1 + - Width: - Largezza: + Contrast Equalization + Equalizza contrasto - Pixels - Pixel + Contrast + Contrasto - Percent - Percento + Saturation + Saturazione - Height: - Altezza: + Detail + Dettaglio - Restore original size - Ripristina dimensione originale + Luminance Level + Livello Luminanza - &Reset - &Ripristina + Luminance Level=Auto + Livello Luminanza=Auto - &Cancel - A&nnulla + Color Saturation + Saturazione colore - &Scale - Ridimensi&ona + Contrast Enhancement + Miglioramento contrasto - Hdr Image Size - Dimensione dell'immagine Hdr + Alpha + Alpha - Switch between pixels or percentage - Cicla tra pixel o percentuale + Beta + Beta - Result size - Dimensioni del risultato + NoiseRedux + - - - SavedParameters - Simple - Semplice + FFTSolver + - Equation 2 - Equazione 2 + simple + - Local Contrast Threshold - Soglia Contrasto Locale + Equation 2 + Equazione 2 - Pre-gamma - Pre-gamma + Equation 4 + Equazione 4 - Comment - Commento + Local + Locale Bias - Bias - - - Spatial Kernel Sigma - Spatial Kernel Sigma - - - Range Kernel Sigma - Range Kernel Sigma + Bias - Base Contrast - Contrasto base + Spatial + Spaziale - Alpha - Alpha - - - Beta - Beta + Range + Intervallo - Color Saturation - Saturazione colore + Base + Base - Noise Reduction - Riduzione rumore + Multiplier + Moltiplicatore - Old Fattal - Vecchio Fattal + AutoLuminance + AutoLuminance - Contrast Equalization - Equalizzazione contrasto + Cone + Coni - Contrast Factor - Fattore di contrasto + Rod + Bastoncelli - Saturation Factor - Fattore di saturazione + Key + Key - Detail Factor - Fattore dettaglio + Phi + Phi - Contrast Enhancement - Miglioramento contrasto + Scales: + - Luminance Level - Livello luminanza + Lower + - Manual Luminance Level - Livello Luminanza Manuale + Upper + - Cone and Rod based on Luminance - Coni e bastoncelli basati sulla luminanza + Brightness + Luminosità - Local Tonemapping - Tonemapping Locale + Chromatic Adaptation + Adattamento cromatico - Cone Level - Livello coni + Light Adaptation + Adattamento luce + + + ResizeDialog - Rod Level - Livello bastoncelli + Scale Image + Ridimensiona l'immagine - Multiplier - Moltiplicatore + Width: + Largezza: - Use Scales - Usa Scale + Pixels + Pixel - Key Value - Parametro Key + Percent + Percento - Phi Value - Parametro Phi + Height: + Altezza: - Range - Intervallo + Restore original size + Ripristina dimensione originale - Lower Scale - Scala inferiore + &Reset + &Ripristina - Upper Scale - Scala superiore + &Cancel + A&nnulla - Brightness - Luminosità + &Scale + Ridimensi&ona - Chromatic Adaptation - Adattamento cromatico + Hdr Image Size + Dimensione dell'immagine Hdr - Light Adaptation - Adattamento luce + Switch between pixels or percentage + Cicla tra pixel o percentuale - TM Operator - Operatore TM + Result size + Dimensioni del risultato @@ -3974,15 +3640,15 @@ Bias - Bias + Bias Spatial Kernel Sigma - + Spatial Kernel Sigma Range Kernel Sigma - + Range Kernel Sigma Base Contrast @@ -4143,6 +3809,13 @@ + TiffModeDialog + + Save as ...TIFF + Salva come ...TIFF + + + TonemappingPanel Load a tonemapping settings text file... @@ -4291,10 +3964,6 @@ Ripristina - Load parameters by comment - Carica i parametri secondo il commento - - Load saved parameters Carica i parametri salvati @@ -4463,14 +4132,6 @@ Ctrl+T - undo - annulla - - - redo - ripeti - - Mantiuk '06 Mantiuk '06 @@ -4509,10 +4170,6 @@ livello luminanza - Version Pre 1.8.4 - Versione Pre 1.8.4 - - Auto Cone/Rod Coni/bastoncelli automatici @@ -4546,41 +4203,47 @@ Definisci dimensione finale personalizzata - Version 2.3.0 (FFT) - Versione 2.3.0 (FFT) - - Version 2.3.0 - + Versione 2.3.0 - TonemappingWarningDialog + TonemappingSettings - Attention! - Attenzione! + Load Custom Settings + Carica Parametri Personalizzati - Ask again - Chiedi ancora + Sort by + Ordina per - 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. -Vuoi continuare? + Comments: + Commenti: - Fattal Warning - Avvertimento per Fattal + Comment + Commento - 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. -Vuoi continuare? + Operator + Operatore + + + Most Useful Operators + Operatori più utilizzati + + + Tonemap + Tonemap + + + Load + Carica + + + Cancel + Cancella @@ -4614,34 +4277,6 @@ &Fatto - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Da:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">A:</span></p></body></html> - - - Log: - Log: - - Exif operations report Log sulle operazioni Exif @@ -4726,4 +4361,19 @@ Richiedimelo più tardi + + UpdateChecker + + A new release is ready for download! + Una nuova versione è pronta per il download! + + + Click to download, or select Help->Update! + Clicca per scaricare, o seleziona Aiuto->Aggiorna! + + + Do you want to open the webpage for download now? + Vuoi aprire una pagina web per il download adesso? + + diff -Nru luminance-hdr-2.3.0/i18n/lang_pl.ts luminance-hdr-2.3.1/i18n/lang_pl.ts --- luminance-hdr-2.3.0/i18n/lang_pl.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_pl.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -191,10 +194,6 @@ - Choose a directory - Wybierz katalog - - Started processing... @@ -300,6 +299,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -400,10 +407,6 @@ - LuminanceHDR tone mapping settings text file (*.txt) - - - Processing... @@ -440,10 +443,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -515,6 +514,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -610,164 +641,168 @@ - -h --help Display this help. + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + + + + (Default is weight=triangular:response_curve=linear:model=debevec) - -v --verbose Print more messages during execution. + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + (Default is mantiuk06) - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - -c --config HDR creation config. Possible values: + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - (Default is weight=triangular:response_curve=linear:model=debevec) + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - -l --load HDR_FILE Load an HDR instead of creating a new one. + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + bias=VALUE (for drago) - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - -t --tmo Tone mapping operator. Legal values are: + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - (Default is mantiuk06) + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + - -p --tmoptions Tone mapping operator options. Legal values are: + Load file %1 failed - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) + EV values have been assigned. - contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) + Creating (in memory) the HDR. - colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) + Saving to file %1. - localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) + Image %1 saved successfully - sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) + Could not save %1 - bias=VALUE (for drago) + NOT Saving HDR image to file. %1 - local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) + Tonemapping requested, saving to file %1. - scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) + Failed loading images - brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) + Failed aligning images. - (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) + Error: Quality must be in the range [0-100]. - -o --output LDR_FILE File name you want to save your tone mapped LDR to. + -h --help Display this help. - (No tonemapping is performed unless -o is specified). + -v --verbose Print more messages during execution. - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - Load file %1 failed + -d --savealigned prefix Save aligned images to files which names start with prefix - EV values have been assigned. + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - Creating (in memory) the HDR. + -c --config HDR creation config. Possible values: - Saving to file %1. + -l --load HDR_FILE Load an HDR instead of creating a new one. - Image %1 saved successfully + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - Could not save %1 + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - NOT Saving HDR image to file. %1 + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - Tonemapping requested, saving to file %1. + -t --tmo Tone mapping operator. Legal values are: - Failed loading images + -p --tmoptions Tone mapping operator options. Legal values are: - Failed aligning images. + -o --output LDR_FILE File name you want to save your tone mapped LDR to. - Error: Quality must be in the range [0-100]. + -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --quality VALUE Quality of the saved tone mapped file (0-100). + (No tonemapping is performed unless -o is specified). @@ -816,6 +851,22 @@ Choose a directory and a prefix + + Maskable + + + + Good image + + + + Ed&itable + + + + R&eference + + EditingToolsDialog @@ -876,10 +927,6 @@ - Preview &Mode: - - - Difference (E-P) @@ -900,10 +947,6 @@ - Mask Color - - - Images List @@ -983,22 +1026,10 @@ - A&dd Mask - - - - Remove Mas&k - - - Size: - pixels - - - &Strength: @@ -1093,6 +1124,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + + + + Apply saved mask + + GenericViewer @@ -1305,35 +1380,10 @@ Z kalibracji - From File - Z pliku - - HDR Creation Wizard - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Currently Loaded &Files @@ -1522,13 +1572,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - <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> @@ -1584,6 +1627,50 @@ align_image_stack failed to align images. + + Auto-crop + + + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + HelpBrowser @@ -1787,23 +1874,23 @@ - Quality: + Unknown - File size: + Ca&lculate - Unknown + &Save - Ca&lculate + File size - &Save + Quality @@ -2034,30 +2121,10 @@ Ctrl+E - &Align Images... - Wyrówn&aj obrazy... - - - WORK IN PROGRESS - PRACA W TOKU - - &About Qt &O Qt - &Tile - &Sąsiadująco - - - &Cascade - Kas&kadowo - - - Cascade - Kaskada - - Aborting... Przerywam... @@ -2066,10 +2133,6 @@ Niezachowane zmiany... - Toolbars - Paski narzędziowe - - &Preferences... &Preferencje... @@ -2477,32 +2540,42 @@ Gamut Check - - - PreferencesDialog - Tone Mapping - Mapowanie tonów + Preview Panel + - JPEG - JPEG + Show on the right + - PNG - PNG + Show on the bottom + - PPM - PPM + Realtime Previews + - PBM - PBM + Update + - BMP - BMP + 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. + +Do you want to continue? + + + + + PreferencesDialog + + Tone Mapping + Mapowanie tonów &Cancel @@ -2569,14 +2642,6 @@ - Which LDR image format to save to - - - - TIFF - - - Amount of threads to use on multicore/SMP machines @@ -2884,10 +2949,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -2983,47 +3044,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Reinhard '02 - Reinhard '02 - - - Reinhard '05 - Reinhard '05 - - - Mantiuk '06 - - - Mantiuk '08 + Saves the settings along the program files, to be portable - Fattal + Portable mode - Drago + Restart - Durand - - - - Ashikhmin - - - - Pattanaik + For the settings to take effect, please restart the application! + + + PreviewSettings - Preview + Load settings @@ -3120,10 +3161,6 @@ QObject - Aborting... - Przerywam... - - All LDR formats @@ -3136,10 +3173,6 @@ - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - - - All HDR formats @@ -3231,135 +3264,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Skaluj obraz + PreGamma=%1 + - Width: - Szrokość: + Contrast Equalization + - Pixels - Pikseli + Contrast + - Percent - Procent + Saturation + - Height: - Wysokość: + Detail + - Restore original size - Przywróć oryginalny rozmiar + Luminance Level + - &Reset - &Reset + Luminance Level=Auto + - &Cancel - &Anuluj + Color Saturation + Saturacja - &Scale - &Skaluj + Contrast Enhancement + - Hdr Image Size - Rozmiar obrazu Hdr + Alpha + Alfa - Result size - Rozmiar wynikowy + Beta + Beta - Switch between pixels or percentage + NoiseRedux - - - SavedParameters - Simple - Prosty + FFTSolver + - Local Contrast Threshold - Próg lokalnego kontrastu + simple + - Bias - Bias + Equation 2 + - Spatial Kernel Sigma - Suma przestrzeni jądra + Equation 4 + - Range Kernel Sigma - Suma zakresu jądra + Local + - Base Contrast - Kontrast bazowy + Bias + Bias - Alpha - Alfa + Spatial + - Beta - Beta + Range + Zakres - Color Saturation - Saturacja + Base + - Cone and Rod based on Luminance - Cone and Rod based on Luminance + Multiplier + Mnożnik - Cone Level - Cone Level + AutoLuminance + - Rod Level - Rod Level + Cone + - Multiplier - Mnożnik + Rod + - Use Scales - Użyj skali + Key + - Key Value - Wartość kluczowa + Phi + Phi - Range - Zakres + Scales: + - Lower Scale - Skala niższa + Lower + - Upper Scale - Skala wyższa + Upper + Brightness - Jasność + Jasność + + + Chromatic Adaptation + + + + Light Adaptation + + + + + ResizeDialog + + Scale Image + Skaluj obraz + + + Width: + Szrokość: + + + Pixels + Pikseli + + + Percent + Procent + + + Height: + Wysokość: + + + Restore original size + Przywróć oryginalny rozmiar + + + &Reset + &Reset + + + &Cancel + &Anuluj + + + &Scale + &Skaluj + + + Hdr Image Size + Rozmiar obrazu Hdr + + + Result size + Rozmiar wynikowy + + + Switch between pixels or percentage + @@ -3559,6 +3645,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Load a tonemapping settings text file... @@ -3793,10 +3886,6 @@ - Load parameters by comment - - - ... @@ -3952,15 +4041,41 @@ - TonemappingWarningDialog + TonemappingSettings - Fattal Warning + Load Custom Settings - 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? + Sort by + + + + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4079,4 +4194,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_ro.ts luminance-hdr-2.3.1/i18n/lang_ro.ts --- luminance-hdr-2.3.0/i18n/lang_ro.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_ro.ts 2013-04-07 18:41:14.000000000 +0000 @@ -90,12 +90,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -204,22 +207,10 @@ Fişierele unde pozele din paranteză sunt localizate (în ordine alfabetică) - Select &Input Folder - Selectează &Fişierul De Importat - - Folder where created HDRs are saved Fişierul unde HDR-urile create sunt salvate - Select &Output Folder - Selectează &Fişierul De Exportat - - - Messages - Mesaje - - &Cancel @@ -232,10 +223,6 @@ - Choose a directory - Alege un dosar - - Started processing... Procesarea a început... @@ -313,6 +300,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -325,62 +320,10 @@ Imagini HDR de convertit - Add all the HDRs in a directory to the list - Adaugă toate HDR-urile dintr-un dosar la listă - - - Add &Directory - Adaugă &dosar - - - Add single HDR files to the list - Adaugă fișiere HDR la listă - - - &Add Files - &Adaugă fișiere - - - Remove single HDR files to the list - Șterge fișiere HDR din listă - - - &Remove Files - Ște&rge fișiere - - List of HDRs that will be tone mapped Lista de HDR-uri care vor fi mapate - Tone Mapping Settings Files - Fișiere setări pentru maparea de tonuri - - - Add all the Tone Mapping Setting files in a directory to the list - Adaugă la listă toate fișierele de setări pentru maparea de tonuri dintr-un dosar - - - Add D&irectory - Adaugă d&osar - - - Add single Tone Mapping Setting files to the list - Adaugă la listă fișiere de setări mapare de tonuri - - - Add Fi&les - Adaugă Fi&șiere - - - Remove single Tone Mapping Setting files to the list - Șterge fișiere setări pentru maparea de tonuri - - - R&emove Files - Șt&erge fișiere - - 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 @@ -393,10 +336,6 @@ Destinație - Select &Output Folder... - Selectează dosar &destinație... - - Conversion Log Jurnal conversie @@ -453,10 +392,6 @@ Folosind %1 fire de execuție - Saving using file format: %1, (quality - if applicable): %2 - Se salvează folosind formatul: %1, (calitate -dacă e aplicabil): %2 - - Choose a directory Alege un dosar @@ -473,10 +408,6 @@ Încarcă fișierele text de setări pentru maparea de tonuri... - LuminanceHDR tone mapping settings text file (*.txt) - Fișier text de setări pentru mapare de tonuri LuminanceHDR (*.txt) - - Processing... Procesând... @@ -513,10 +444,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -588,6 +515,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -675,14 +634,6 @@ EROARE: Nu pot salva în fișier: %1 - Cannot convert %1 to a float - Nu pot coverti %1 la virgulă mobilă - - - Cannot convert %1 to an integer - Nu pot converti %1 la întreg - - Usage: %1 [OPTIONS]... [INPUTFILES]... Utilizare: %1 [OPȚIUNI]...[FIȘIERESURSĂ]... @@ -691,30 +642,6 @@ Interfață linie de comandă către %1. - -h --help Display this help. - -h --help Arată acest ajutor. - - - -v --verbose Print more messages during execution. - -v --verbose Afișează mai multe mesaje în timpul execuției. - - - -u --gui Start in gui mode with input files. - -u --gui Începe în modul gui cu fişierele importate. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB Motor de aliniere de folosit în timpul creării HDR (implicit: fără aliniere). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Specifică valorile EV (la fel de multe ca FIȘIERESURSĂ). - - - -c --config HDR creation config. Possible values: - -c --config Configurare creare HDR. Valori posibile: - - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=fișierul_tău_aici.m @@ -723,26 +650,6 @@ (Implicit este weight=triangular:response_curve=linear:model=debevec) - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load FISIER_HDR Încarcă un HDR în loc să creezi unul nou. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save FIȘIER_HDR Salvează într-un format de fișier HDR. (implicit: nu salva) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VALOARE Valoare gamma de folosit în timpul mapării de tonuri. (implicit: 1) - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize VALOARE Lățimea la care vrei să redimensionezi HDR-ul (redimensionat înainte de gamma și mapare de tonuri) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Operator mapare de tonuri. Valorile legale sunt: - - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 @@ -751,10 +658,6 @@ (Implicit este mantiuk06) - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions Opțiuni operator mapare de tonuri. Valorile legale sunt: - - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) alpha=VALOARE:beta=VALOARE:color=VALOARE:noise=VALOARE:new=true|false (pentru fattal) @@ -795,14 +698,6 @@ (implicit este contrast=0.3:equalization=false:saturation=1.8, vezi deasemenea -o) - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output FIȘIER_LDR Nume fișier în care vrei să salvezi maparea de tonuri LDR. - - - (No tonemapping is performed unless -o is specified). - (Nici o mapare de tonuti nu este realizată decât dacă -o este specificat). - - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. Trebuie fie să încarci un fișier HDR existent (cu opțiunea -l) sau să specifici FIȘIERESURSĂ pentru a crea un HDR nou. @@ -853,7 +748,63 @@ - -q --quality VALUE Quality of the saved tone mapped file (0-100). + -h --help Display this help. + + + + -v --verbose Print more messages during execution. + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + -c --config HDR creation config. Possible values: + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + -t --tmo Tone mapping operator. Legal values are: + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + (No tonemapping is performed unless -o is specified). @@ -902,6 +853,22 @@ Choose a directory and a prefix Alege un dosar și un prefix + + Maskable + + + + Good image + + + + Ed&itable + Ed&itabil + + + R&eference + R&eferință + EditingToolsDialog @@ -946,10 +913,6 @@ - Preview &Mode: - &Mod previzualizare: - - Difference (E-P) Diferență (E-P) @@ -970,10 +933,6 @@ Mască anti-reflexii - Mask Color - Culoare mască - - Images List Listă imagini @@ -1064,22 +1023,10 @@ Ctrl+S - A&dd Mask - A&daugă mască - - - Remove Mas&k - Șterge ma&scă - - Size: Dimensiune: - pixels - pixeli - - &Strength: &Tărie: @@ -1197,6 +1144,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + &Șterge + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + ... + + + Apply saved mask + + GenericViewer @@ -1281,27 +1272,6 @@ Asistent creare HDR - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - [1/2] Load Input Images [1/2] Încarcă imaginile sursă @@ -1598,13 +1568,6 @@ <center><font color="#008400"><h3><b>Imagini încărcate.</b></h3></font></center> - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - EXIF data not found Nu am găsit informațiile EXIF @@ -1685,10 +1648,6 @@ Din calibrare - From File - Din fișier - - <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> @@ -1696,17 +1655,61 @@ align_image_stack failed to align images. - - - HelpBrowser - Luminance HDR Help - Ajutor Luminance HDR + Auto-crop + - Luminance Help - Ajutor Luminance - + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + + + + HelpBrowser + + Luminance HDR Help + Ajutor Luminance HDR + + + Luminance Help + Ajutor Luminance + &Print... &Tipărește... @@ -1897,14 +1900,6 @@ Calitate fișier salvat - Quality: - Calitate: - - - File size: - Dimensiune fișier: - - Unknown @@ -1920,6 +1915,14 @@ &Cancel + + File size + + + + Quality + + LdrViewer @@ -2304,14 +2307,6 @@ Ctrl+E - &Align Images... - &Aliniază imagini... - - - WORK IN PROGRESS - PROCESARE ÎN CURS - - &About Qt &Despre Qt @@ -2324,22 +2319,6 @@ - &Tile - &Mozaic - - - &Cascade - - - - Cascade - Cascadă - - - Toolbars - Bare de unelte - - Text &under Icons Text &sub pictograme @@ -2448,30 +2427,6 @@ Ctrl+D - Next - Următor - - - Next Image - Imaginea următoare - - - Show Next Image - Arată Imaginea Următoare - - - Previous - Precedent - - - Previous Image - Imaginea precedentă - - - Show Previous Image - Arată Imaginea Precedentă - - Lock Viewers Blochează Vizualizatori @@ -2615,12 +2570,35 @@ Gamut Check - - - ParametersDialog - Saved Parameters - Parametrii Salvaţi + Preview Panel + + + + Show on the right + + + + Show on the bottom + + + + Realtime Previews + + + + Update + + + + 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. + +Do you want to continue? + @@ -2654,58 +2632,6 @@ Limba - Czech - Cehă - - - English - Engleză - - - Finnish - Finlandeză - - - French - Franceză - - - German - Germană - - - Indonesian - Indoneziană - - - Italian - Italiană - - - Polish - Poloneză - - - Romanian - Română - - - Russian - Rusă - - - Spanish - Spaniolă - - - Turkish - Turcă - - - Hungarian - Maghiară - - Default Previews Width Lăţimea De Bază Pentru Previzualizare @@ -2754,42 +2680,6 @@ Fişier De Lucru Temporar - C&hoose - A&lege - - - Which LDR image format to save to - În ce format de imagine LDR să salvez - - - Batch Tonemapping Default Output Format - Serie De Mapare De Donuri Default Format Export - - - JPEG - JPEG - - - PNG - PNG - - - PPM - PPM - - - PBM - PBM - - - BMP - BMP - - - TIFF - - - Amount of threads to use on multicore/SMP machines Număr de fire de execuție de folosit pe calculatoare multi-nucleu/SMP @@ -2798,10 +2688,6 @@ Serie De Mapare De Tonuri Număr De Fire - Batch Tonemapping Default Output Quality - Serie De Mapare De Tonuri Default Calitate Export - - General General @@ -3121,38 +3007,10 @@ Componentă Albastră - Camera Profile - Profil Cameră - - Camera profile Profil Cameră - None - Nimic - - - Built in - Construit în - - - Custom - Customizat - - - RAW - RAW - - - sRGB - sRGB - - - Color Space - Culoare Spaţiu - - align_image_stack command line arguments @@ -3177,14 +3035,6 @@ &OK - Please restart... - Restartează... - - - Please restart LuminanceHDR to use the new language (%1). - Restartează Luminance HDR pentru a folosi nouă limbă (%1). - - Choose a directory Alege un dosar @@ -3228,47 +3078,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Mantiuk '06 - Mantiuk '06 - - - Mantiuk '08 - Mantiuk '08 - - Fattal - Fattal - - - Drago - Drago - - - Durand - Durand - - - Reinhard '02 - Reinhard '02 + Saves the settings along the program files, to be portable + - Reinhard '05 - Reinhard '05 + Portable mode + - Ashikhmin - Ashikhmin + Restart + - Pattanaik - Pattanaik + For the settings to take effect, please restart the application! + + + + PreviewSettings - Preview + Load settings @@ -3393,14 +3223,6 @@ LuminanceHDR necesită align_image_stack pentru a fi executat cu opţiuneal "v -a aligned_". Opţiunile au fost corectate. - Aborting... - Anulând... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Nu pot găsi modulul JPEG al Qt...<br>Te rog dezarhivează pachetul DLL cu opțiunea "folosește numele dosarelor" activată. - - Cannot convert %1 to a float Nu pot coverti %1 la virgulă mobilă @@ -3476,203 +3298,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - - Scale Image - Scalează imagine - - Hdr Image Size - Dimensiune imagine Hdr + PreGamma=%1 + - Width: - Lățime: + Contrast Equalization + Egalizare contrast - Switch between pixels or percentage - Comută între pixeli sau procentaj + Contrast + - Pixels - Pixeli + Saturation + Saturaţie - Percent - Procent + Detail + - Height: - Înălțime: + Luminance Level + Nive luminanță - Result size - Dimensiune rezultat + Luminance Level=Auto + - Restore original size - Restabilește dimensiunea originală + Color Saturation + Saturație culoare - &Reset - + Contrast Enhancement + Îmbunătățire contrast - &Cancel - + Alpha + Alfa - &Scale - &Scalează + Beta + Beta - - - SavedParameters - Comment - Comentariu + NoiseRedux + - TM Operator - Operator TM + FFTSolver + - Simple - Simplu + simple + Equation 2 - Ecuaţie 2 + Ecuaţie 2 - Local Contrast Threshold - Prag contrast local + Equation 4 + Ecuaţie 4 - Pre-gamma - Pre-gamma + Local + Bias - Tendință - - - Spatial Kernel Sigma - Sigma nucleu spațial - - - Range Kernel Sigma - Sigma nucleu interval + Tendință - Base Contrast - Contrast bază + Spatial + - Alpha - Alfa + Range + Interval - Beta - Beta + Base + - Color Saturation - Saturație culoare + Multiplier + Multiplicator - Noise Reduction - Reducere de zgomot + AutoLuminance + - Old Fattal - Fattal Vechi + Cone + - Contrast Equalization - Egalizare contrast + Rod + - Contrast Factor - Factor contrast + Key + - Saturation Factor - Factor saturație + Phi + Phi - Detail Factor - Factor detalii + Scales: + - Contrast Enhancement - Îmbunătățire contrast + Lower + - Luminance Level - Nive luminanță + Upper + - Manual Luminance Level - Manual Luminance Nivel + Brightness + Strălucire - Cone and Rod based on Luminance - Con și tijă bazate pe luminanță + Chromatic Adaptation + Adaptare cromatică - Local Tonemapping - Mapare Locală De Tonuri + Light Adaptation + Adaptare lumină + + + ResizeDialog - Cone Level - Nivel con + Scale Image + Scalează imagine - Rod Level - Nivel tijă + Hdr Image Size + Dimensiune imagine Hdr - Multiplier - Multiplicator + Width: + Lățime: - Use Scales - Utilizează scale + Switch between pixels or percentage + Comută între pixeli sau procentaj - Key Value - Valoare cheie + Pixels + Pixeli - Phi Value - Valoarea Phi + Percent + Procent - Range - Interval + Height: + Înălțime: - Lower Scale - Scală joasă + Result size + Dimensiune rezultat - Upper Scale - Scală înaltă + Restore original size + Restabilește dimensiunea originală - Brightness - Strălucire + &Reset + - Chromatic Adaptation - Adaptare cromatică + &Cancel + - Light Adaptation - Adaptare lumină + &Scale + &Scalează @@ -3876,6 +3683,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Tone mapping operators and their options @@ -4012,10 +3826,6 @@ Reducere de zgomot - Version Pre 1.8.4 - Versiunea Pre 1.8.4 - - Bias Tendință @@ -4176,10 +3986,6 @@ - Load parameters by comment - - - 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. @@ -4220,14 +4026,6 @@ 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ă. - undo - anulează - - - redo - refă - - TM Database Problem TM Probleme Cu Baza De Date @@ -4266,10 +4064,6 @@ 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. - Eroare, formatul fișierul de setări pentru mapare de tonuri s-a schimbat. Acest fișier (vechi) nu poate fi folosit cu această versiune de LuminanceHDR. Crează unul nou. - - Custom LDR size Dimensiune LDR customizată @@ -4287,31 +4081,41 @@ - TonemappingWarningDialog + TonemappingSettings - Attention! - Atenţie! + Load Custom Settings + - Ask again - Întreabă din nou + Sort by + - 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? - Acest operator de mapare de tonuri depinde de dimensiunea imaginii sursă. Aplicarea acestui operator pe imaginea completă va rezulta cel mai probabil într-o imagine diferită. - -Vrei să continui? + Comments: + - Fattal Warning + Comment + Comentariu + + + Operator + Operator + + + Most Useful Operators - 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? + Tonemap + Mapare De Tonuri + + + Load + + + + Cancel @@ -4338,34 +4142,6 @@ Adaugă fișiere în listă - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">De la:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Către:</span></p></body></html> - - - Log: - Jurnal: - - Exif operations report Raport operații exif @@ -4458,4 +4234,19 @@ Aminteşte-mi mai târziu + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_ru.ts luminance-hdr-2.3.1/i18n/lang_ru.ts --- luminance-hdr-2.3.0/i18n/lang_ru.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_ru.ts 2013-04-07 18:41:14.000000000 +0000 @@ -98,12 +98,15 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master @@ -199,10 +202,6 @@ - Choose a directory - Выберите каталог - - Started processing... @@ -308,6 +307,14 @@ Continue? + + Auto-crop + + + + Custom config %1 + + BatchTMDialog @@ -316,42 +323,14 @@ Пакетное отображение тонов - Add &Directory - Добавить &каталог - - - &Add Files - &Добавить файлы - - - &Remove Files - &Удалить снимки - - List of HDRs that will be tone mapped Список HDR-снимков, тона которых будут отображены - Add D&irectory - Добавить к&аталог - - - Add Fi&les - До&бавить файлы - - - R&emove Files - Уда&лить файлы - - Output Сохранение полученных LDR-снимков - Select &Output Folder... - Укажите каталог &вывода... - - &Show only: &Показывать: @@ -392,10 +371,6 @@ Загрузите файлы с описанием отображения тонов - LuminanceHDR tone mapping settings text file (*.txt) - Текстовый файл с параметрами отображения тонов (*.txt) - - Processing... Выполняется обработка... @@ -416,34 +391,6 @@ Обрабатываемые HDR-снимки - Add all the HDRs in a directory to the list - Добавить в список все HDR-снимки каталога - - - Add single HDR files to the list - Добавить в список отдельные HDR-снимки - - - Remove single HDR files to the list - Удалить из списка отдельные HDR-снимки - - - Tone Mapping Settings Files - Файлы с параметрами отображения тонов - - - Add all the Tone Mapping Setting files in a directory to the list - Добавить в список все файлы с параметрами отображения тонов - - - Add single Tone Mapping Setting files to the list - Добавить в список отдельные файлы с параметрами отображения тонов - - - Remove single Tone Mapping Setting files to the list - Удалить из списка отдельные файлы с параметрами отображения тонов - - List of Tone Mapping Setting files that will be used to tone map each HDR Список файлов с параметрами отображения тонов для каждого HDR-снимка @@ -504,10 +451,6 @@ - Saving using file format: %1 - - - Ouput Image Width: @@ -579,6 +522,38 @@ Alt+M + + Output Format: + + + + JPEG + JPEG + + + TIFF (16 bits) + + + + PNG + PNG + + + BMP + BMP + + + PPM + PPM + + + PBM + PBM + + + Luminance HDR tone mapping settings text file (*.txt) + + BatchTMJob @@ -662,14 +637,6 @@ Ошибка: невозможно сохранить файл: %1 - Cannot convert %1 to a float - Невозможно преобразовать %1 в формат с плавающей точкой - - - Cannot convert %1 to an integer - Невозможно преобразовать %1 в формат с переменной - - Failed executing align_image_stack Не удалось выполнить align_image_stack @@ -682,58 +649,6 @@ Командный интерфейс к %1. - -h --help Display this help. - -h --help Показать эту справку. - - - -v --verbose Print more messages during execution. - -v --verbose Выводить более подробную информацию при работе. - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --align AIS|MTB Движок выравнивания при создании HDR-снимка (по умолчанию не используется никакой). - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Указать числовые значения экспозиции (по числу входящих файлов). - - - -c --config HDR creation config. Possible values: - -c --config Параметры создаваемого HDR-снимка. Возможные значения: - - - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --load ФАЙЛ_HDR Загрузить существующий HDR-снимок вместо создания нового. - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --save ФАЙЛ_HDR Сохранить в файл одного из форматов HDR (по умолчанию файл не сохраняется) - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma ЗНАЧЕНИЕ Значение гаммы при отображении тонов (по умолчанию: 1). - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --resize ЗНАЧЕНИЕ Конечная ширина HDR-снимка при смене размера (размер меняется перед применением гаммы и отображением тонов) - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Оператор отображения тонов. Допустимые значения: - - - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmoptions Параметры оператора отображения тонов. Допустимые значения: - - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --output ФАЙЛ_LDR Имя файла, с которым сохранить LDR с отображенными тонами. - - - (No tonemapping is performed unless -o is specified). - (Без ключа -o отображение тонов не выполняется). - - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. Необходимо либо загрузить существующий HDR-снимок (с ключом -l), либо указать входящие файлы для создания нового HDR-снимка. @@ -840,7 +755,63 @@ - -q --quality VALUE Quality of the saved tone mapped file (0-100). + -h --help Display this help. + + + + -v --verbose Print more messages during execution. + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + -c --config HDR creation config. Possible values: + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + -t --tmo Tone mapping operator. Legal values are: + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + (No tonemapping is performed unless -o is specified). @@ -889,6 +860,22 @@ Choose a directory and a prefix Выберите каталог и префикс + + Maskable + + + + Good image + + + + Ed&itable + &Двигаемые + + + R&eference + Опор&ные + EditingToolsDialog @@ -933,10 +920,6 @@ О&тдалить - Preview &Mode: - Режим &предпросмотра: - - Pivot Only (P) Только опорный (О) @@ -945,10 +928,6 @@ Антипризрачная маска - Mask Color - Цвет маски - - Images List Список снимков @@ -1015,22 +994,10 @@ Ctrl+S - A&dd Mask - До&бавить маску - - - Remove Mas&k - Сн&ять маску - - Size: Размер: - pixels - px - - &Strength: &Сила: @@ -1184,6 +1151,50 @@ Histogram + + &Mode: + + + + Brush + + + + Lasso + + + + Mask + + + + A&dd + + + + &Remove + &Удалить + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + ... + + + Apply saved mask + + GenericViewer @@ -1540,10 +1551,6 @@ Из результата калибровки - From File - Из файла - - <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> @@ -1572,27 +1579,6 @@ <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:12pt; font-weight:600;">Загрузите снимки с разными экспозициями</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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - Add Images @@ -1657,13 +1643,6 @@ - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - - - Loading Error: @@ -1683,25 +1662,69 @@ align_image_stack failed to align images. - - - HelpBrowser - - &Contents - &Содержание - - - &Search - &Искать - - &Delete - &Удалить + Auto-crop + - D&elete All - Удалить &все - + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + Save Settings + + + + Custom config %1 + + + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + + + + From File: + + + + + HelpBrowser + + &Contents + &Содержание + + + &Search + &Искать + + + &Delete + &Удалить + + + D&elete All + Удалить &все + Luminance HDR Help Справка по Luminance @@ -1880,14 +1903,6 @@ Качество сохраняемого файла - Quality: - Качество: - - - File size: - Размер файла: - - Unknown Неизвестно @@ -1907,6 +1922,14 @@ &Cancel О&тменить + + File size + + + + Quality + + LdrViewer @@ -2267,14 +2290,6 @@ Ctrl+п - Next Image - Следующий снимок - - - Previous Image - Предыдущий снимок - - Adjust &Levels Скорректировать &уровни... @@ -2363,14 +2378,6 @@ Ctrl+E - &Align Images... - &Склеить несколько изображений... - - - WORK IN PROGRESS - НА СТАДИИ РАЗРАБОТКИ - - &About Qt &О Qt @@ -2383,22 +2390,6 @@ Показать информацию о библиотеке Qt, используемой в Luminance HDR - &Tile - &Каскадом - - - &Cascade - &Мозаикой - - - Cascade - Мозаикой - - - Toolbars - Панели - - &Icons Only Только зн&ачки @@ -2586,84 +2577,54 @@ Gamut Check - - - PreferencesDialog - Tone Mapping - Отображение тонов - - - External Tools - Приложения - - - JPEG - JPEG - - - PNG - PNG - - - PPM - PPM - - - PBM - PBM - - - BMP - BMP - - - Preferences - Параметры Luminance HDR - - - Interface - Интерфейс + Preview Panel + - Czech - Чешский + Show on the right + - English - Английский + Show on the bottom + - French - Французский + Realtime Previews + - German - Немецкий + Update + - Indonesian - Индонезийский + Fattal Warning + - Italian - Итальянский + 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? + + + + PreferencesDialog - Polish - Польский + Tone Mapping + Отображение тонов - Russian - Русский + External Tools + Приложения - Spanish - Испанский + Preferences + Параметры Luminance HDR - Turkish - Турецкий + Interface + Интерфейс HDR Options @@ -2690,14 +2651,6 @@ Показывать отрицательные значения как: - C&hoose - &Выбрать - - - Which LDR image format to save to - В какой формат LDR сохранять - - Amount of threads to use on multicore/SMP machines Количество используемых потоков для многопроцессорных компьютеров @@ -2722,19 +2675,6 @@ &ОК - Hungarian - Венгерский - - - Please restart... - Необходим перезапуск программы - - - Please restart LuminanceHDR to use the new language (%1). - Интерфейс станет доступным на выбранном языке (%1) -только при следующем запуске программы. - - Choose a directory Выберите каталог @@ -2751,10 +2691,6 @@ - TIFF - - - <!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; } @@ -3050,10 +2986,6 @@ - Batch Tonemapping Default Output Format - - - Batch Tonemapping Number of Threads @@ -3149,47 +3081,27 @@ Color profile (*.icc *.ICC *.icm *.ICM) - - - PreviewPanel - - Mantiuk '06 - Mantiuk '06 - - - Mantiuk '08 - Mantiuk '08 - - - Fattal - Fattal - - Drago - Drago - - - Durand - Durand - - - Reinhard '02 - Reinhard '02 + Saves the settings along the program files, to be portable + - Reinhard '05 - Reinhard '05 + Portable mode + - Ashikhmin - Ashikhmin + Restart + - Pattanaik - Pattanaik + For the settings to take effect, please restart the application! + + + + PreviewSettings - Preview + Load settings @@ -3286,14 +3198,6 @@ QObject - Aborting... - Прерывание... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Не удается найти расширение поддержки JPEG в Qt...<br>Распакуйте архив с файлами DLL, сохраняя имена каталогов. - - All LDR formats Файлы всех LDR-форматов @@ -3397,172 +3301,188 @@ I cannot perform the color transform. Please select a different monitor profile. - - - ResizeDialog - Scale Image - Смена размера снимка + PreGamma=%1 + - Width: - Ширина: + Contrast Equalization + Выравнивание контрастности - Pixels - пикселов + Contrast + - Percent - процентов + Saturation + - Height: - Высота: + Detail + - Restore original size - Восстановить исходный размер + Luminance Level + Уровень светимости - &Reset - С&бросить + Luminance Level=Auto + - &Cancel - О&тменить + Color Saturation + Насыщенность - &Scale - &Изменить + Contrast Enhancement + Контраст - Hdr Image Size - Размер HDR-снимка + Alpha + Альфа - Switch between pixels or percentage - Переключиться между пикселами и процентами + Beta + Бета - Result size - Конечный размер + NoiseRedux + - - - SavedParameters - Simple - Простой вариант + FFTSolver + - Local Contrast Threshold - Порог локального контраста + simple + + + + Equation 2 + + + + Equation 4 + + + + Local + Bias - Смещение + Смещение - Spatial Kernel Sigma - Сигма пространственного ядра + Spatial + - Range Kernel Sigma - Сигма диапазонного ядра + Range + Диапазон - Base Contrast - Контраст основного слоя + Base + - Alpha - Альфа + Multiplier + Множитель - Beta - Бета + AutoLuminance + - Color Saturation - Насыщенность + Cone + - Noise Reduction - Подавление шума + Rod + - Contrast Equalization - Выравнивание контрастности + Key + - Contrast Factor - Коэффициент контраста + Phi + δ (фи) - Saturation Factor - Коэффициент насыщенности + Scales: + - Detail Factor - Коэффициент детализации + Lower + - Contrast Enhancement - Контраст + Upper + - Luminance Level - Уровень светимости + Brightness + Яркость - Cone and Rod based on Luminance - Уровень чувствительности колбочек и -палочек на основе освещенности + Chromatic Adaptation + Хроматическая адаптация - Cone Level - Уровень чувствительности колбочек + Light Adaptation + Адаптация к свету + + + ResizeDialog - Rod Level - Уровень чувствительности палочек + Scale Image + Смена размера снимка - Multiplier - Множитель + Width: + Ширина: - Use Scales - Использовать шкалы + Pixels + пикселов - Key Value - Значение ключа + Percent + процентов - Range - Диапазон + Height: + Высота: - Lower Scale - Нижняя шкала + Restore original size + Восстановить исходный размер - Upper Scale - Верхняя шкала + &Reset + С&бросить - Brightness - Яркость + &Cancel + О&тменить - Chromatic Adaptation - Хроматическая адаптация + &Scale + &Изменить - Light Adaptation - Адаптация к свету + Hdr Image Size + Размер HDR-снимка + + + Switch between pixels or percentage + Переключиться между пикселами и процентами + + + Result size + Конечный размер @@ -3767,6 +3687,13 @@ + TiffModeDialog + + Save as ...TIFF + + + + TonemappingPanel Mantiuk '06 @@ -4037,14 +3964,6 @@ Восстановить исходное значение гаммы (1,00) - undo - Отменить - - - redo - Вернуть - - Load a tonemapping settings text file... Загрузить текстовый файл с параметрами отображения тонов... @@ -4081,10 +4000,6 @@ Укажите новую ширину: - Load parameters by comment - - - Load saved parameters @@ -4168,23 +4083,41 @@ - TonemappingWarningDialog + TonemappingSettings - 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? - Результаты работы этого оператора зависят от размера изображения. Применение этого оператора к полноразмерному изображению с большой вероятностью создаст изображение, выглядящее иначе. - -Вы хотите продолжить? + Load Custom Settings + - Fattal Warning + Sort by - 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? + Comments: + + + + Comment + + + + Operator + + + + Most Useful Operators + + + + Tonemap + + + + Load + + + + Cancel @@ -4219,10 +4152,6 @@ &Готово - Log: - Журнал: - - &Show only: &Показывать: @@ -4243,30 +4172,6 @@ Отчет о действиях с Exif - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">Из:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">В:</span></p></body></html> - - Filter messages based on severity Фильтровать сообщения по важности @@ -4331,4 +4236,19 @@ + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_sk.ts luminance-hdr-2.3.1/i18n/lang_sk.ts --- luminance-hdr-2.3.0/i18n/lang_sk.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_sk.ts 2013-04-07 18:41:14.000000000 +0000 @@ -62,21 +62,16 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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; } @@ -91,12 +86,22 @@ - + + Changelog + + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + + + + &License Agreement - + <!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; } @@ -105,7 +110,7 @@ - + &OK @@ -124,237 +129,249 @@ - + Select the number of bracketed pictures used to create the HDRs - + Output - + Output format: - + Choose an HDR output file format - + hdr - + exr - + PFS - + tiff - + Predefined profile: - + Choose one of the creation predefined profiles. See documentation for more information. - + Profile 1 - + Profile 2 - + Profile 3 - + Profile 4 - + Profile 5 - + Profile 6 - + Alignment - + Auto align the bracketed pictures - + Auto-align images - + + Auto-crop + + + + Use Hugin's align_image_stack engine - + Hugin's align_image_stack - + Use MTB (Median Threshold Bitmap) engine - + MTB - + Progress - + Folder where created HDRs are saved - - + + Select... - + Folder where bracketed pictures are located (in alphabetical order) - + Input folder: - + Output folder: - + &Cancel - + &Start - + &Close - + Choose a source directory - + Choose a output directory - - + + + Warning - + + Total number of pictures must be a multiple of number of bracketed images. - + The chosen output directory contains HDR files. Those files might be overwritten. Continue? - + + Custom config %1 + + + + Started processing... - + Creating HDR... - + Completed with errors - + Completed without errors - + Error: missing EXIF data - + Aligning... - + Written - + Error: - + Aborting... @@ -494,76 +511,111 @@ + Output Format: + + + + + JPEG + + + + + TIFF (16 bits) + + + + + PNG + + + + + BMP + + + + + PPM + + + + + PBM + + + + Output Folder: - + Selec&t... - + Conversion Log - + Batch operations report - + &Show only: - + 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 @@ -573,11 +625,6 @@ - - Saving using file format: %1 - - - @@ -601,36 +648,36 @@ - LuminanceHDR tone mapping settings text file (*.txt) + Luminance HDR tone mapping settings text file (*.txt) - + Processing... - + Start processing... - + Close - + &Done - + All tasks completed. - + Aborting... @@ -638,27 +685,27 @@ BatchTMJob - + [T%1] Start processing %2 - + [T%1] Successfully load %2 - + [T%1] Successfully saved LDR file: %2 - + [T%1] ERROR: Cannot save to file: %2 - + [T%1] ERROR: Loading of %2 failed @@ -666,288 +713,293 @@ CommandLineInterfaceManager - + Error: Alignment engine not recognized. - + Error: Wrong HDR creation format. - + Error: Unknown weight function specified. - + Error: Unknown response curve specified. - + Error: Unknown HDR creation model specified. - + Error: Unknown HDR creation format specified. - + Error: Unknown tone mapping operator specified. - + Error: Wrong tone mapping option format. - + Error: Unknown tone mapping option specified. - + Error: Quality must be in the range [0-100]. - + Error: Unknown option %1. - + Error: Missing argument for %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. - + 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 - + Tonemapping requested, saving to file %1. - + ERROR: Cannot save to file: %1 - + Failed loading images - + Usage: %1 [OPTIONS]... [INPUTFILES]... - + Commandline interface to %1. - - -h --help Display this help. + + -h --help Display this help. - - -v --verbose Print more messages during execution. + + -v --verbose Print more messages during execution. - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + -d --savealigned prefix Save aligned images to files which names start with prefix - - -c --config HDR creation config. Possible values: + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + + -c --config HDR creation config. Possible values: - - (Default is weight=triangular:response_curve=linear:model=debevec) + + -l --load HDR_FILE Load an HDR instead of creating a new one. - - -l --load HDR_FILE Load an HDR instead of creating a new one. + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + -t --tmo Tone mapping operator. Legal values are: - - -t --tmo Tone mapping operator. Legal values are: + + -p --tmoptions Tone mapping operator options. Legal values are: - - ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. - - (Default is mantiuk06) + + -q --quality VALUE Quality of the saved tone mapped file (0-100). - - -p --tmoptions Tone mapping operator options. Legal values are: + + (No tonemapping is performed unless -o is specified). - + + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + + + + + (Default is weight=triangular:response_curve=linear:model=debevec) + + + + + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 + + + + + (Default is mantiuk06) + + + + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) - + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - + bias=VALUE (for drago) - + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - - - - - -q --quality VALUE Quality of the saved tone mapped file (0-100). - - - - - (No tonemapping is performed unless -o is specified). - - - - + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. @@ -999,12 +1051,32 @@ EditingTools - + Pan the image to a region - + + Maskable + + + + + Good image + + + + + Ed&itable + + + + + R&eference + + + + Choose a directory and a prefix @@ -1062,11 +1134,6 @@ - - Preview &Mode: - - - Difference (E-P) @@ -1092,22 +1159,17 @@ - - Mask Color - - - - + Images List - + Ed&itable - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1115,43 +1177,43 @@ - + 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. - + Select the previous image in both lists - + Use this button to move the selection to the previous image in both lists. - + Select the next image in both lists - + Use this button to move the selection to the next image in both lists. - + R&eference - + The reference image is the one currently selected - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1159,72 +1221,57 @@ - + Tools - + Crop the stack of images after a selection with the left mouse button has been made - + Clicking this button you will be able to crop all the images to the size that you have previously selected with the left mouse button (press and hold the left mouse button and move the pointer to select a crop area, then press this button). - + &Crop All Images - + Ctrl+X - + &Anti Ghosting - + &Save Images - + Ctrl+S - - A&dd Mask - - - - - Remove Mas&k - - - - + Size: - - pixels - - - - + &Strength: - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1234,7 +1281,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1242,7 +1289,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1250,103 +1297,162 @@ - + Shift values for editable image - + Reset the shift values for the currently selected movable image - + &Reset - + Reset the shift values for all the images - + Reset &All - + &Horizontal: - + &Vertical: - + Insert an horizontal shift value for the currently selected movable image - - + + + px - + + &Mode: + + + + + + Brush + + + + + + Lasso + + + + + Mask + + + + + A&dd + + + + + &Remove + + + + + Lasso - Draw a free hand selection area + + + + + Brush - Paint the mask using the brush + + + + + Save mask + + + + + + ... + + + + + Apply saved mask + + + + Insert a vertical shift value for the currently selected movable image - + Move up of 1 pixel the currently selected movable image - + Move down of 1 pixel the currently selected movable image - + Move right of 1 pixel the currently selected movable image - + Move left of 1 pixel the currently selected movable image - + Histogram - + Get information about the graphical elements - + &What's this? - + Shift+F1 - + &Next > - + &Cancel @@ -1354,7 +1460,7 @@ GenericViewer - + Pan the image to a region @@ -1362,18 +1468,18 @@ HdrCreationManager - + The image %1 is an 8 bit format (LDR) while the previous ones are not. - - + + The image %1 has an invalid size. - + The image %1 is an 16 bit format while the previous ones are not. @@ -1381,25 +1487,25 @@ HdrInputLoader - - - - + + + + ERROR loading %1 - + ERROR: The file<br>%1<br> is not a 8 bit or 16 bit tiff. - + ERROR: %1 - + ERROR: Failed Loading file: %1 @@ -1407,42 +1513,42 @@ HdrViewer - + &Mapping: - + Histogram: - + Linear - + Gamma 1.4 - + Gamma 1.8 - + Gamma 2.2 - + Gamma 2.6 - + Logarithmic @@ -1455,28 +1561,6 @@ - - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> - - - [1/2] Load Input Images @@ -1529,22 +1613,49 @@ - + &Autoalign images - + + Auto-crop + + + + Hugin's align_image_stack - + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + MTB - + <!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; } @@ -1553,17 +1664,17 @@ - + [2/2] Choose Settings for HDR Creation - + Choose one of the predefined profiles: - + <!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; } @@ -1572,118 +1683,118 @@ - + Profile 1 - + Profile 2 - + Profile 3 - + Profile 4 - + Profile 5 - + Profile 6 - + Weighting function: - - - + + + Triangular - - + + Response curve: - - - - + + + + Linear - + HDR creation model: - - - + + + Debevec - + Anti-ghosting (beta!) - - - + + + Gamma - - + + Log - + Calibration - + Amount of iterations: - + Keep it small - + Use this only if the default profiles above do not yield good results - + Use custom configuration - + <!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; } @@ -1692,85 +1803,90 @@ - + [2/2] Choose Custom Configuration - + Weights: - + Choose confidence function over all the possible pixel values: - - + + Gaussian - - + + Plateau - + Response Curve: - + Predefined response curves: - + Load response function from file - + Load... - + Use calibration to find response curve (robertson02 algorithm) - + Save response function to file: - + Save As... - + HDR Creation Equation: - + Choose model: - - + + Robertson - + + Save Settings + + + + <!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; } @@ -1779,205 +1895,210 @@ - - + + &Next > - + &Cancel - + Image Filename - + Exposure - + + Custom config %1 + + + + 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 - + Loading... - - + + Start loading a set of images with different exposure - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> - - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - + EXIF data not found - - + + <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> - + Loading Error: - + Unknown - - - - + + + + Error... - + align_image_stack failed to align images. - + 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 - - - + + + &Finish - + Aligning... - - + + Processing... - + Load a camera response curve file - - + + Camera response curve (*.m);;All Files (*) - + Save a camera response curve file - + Weights: - + - Response curve: - + - Model: - + Logarithmic - + From Calibration - - From File + + From File: - + <center><font color="#008400"><h3><b>All the EV values have been set.<br>Now click on Next button.</b></h3></font></center> @@ -1996,7 +2117,7 @@ - + &Print... @@ -2007,7 +2128,7 @@ - + &Find... @@ -2028,110 +2149,110 @@ - + &Delete - + D&elete All - + Help SideBar - + LuminanceHDR Online Help - + &File - + &Edit - + &View - - + + &Bookmarks - + &Quit - + Find &Next - + Find &Previous - + &Contents - + &Search - + &Add Bookmark - + 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 associated with the protocol? @@ -2195,17 +2316,17 @@ IOWorker - + ERROR: The following file is not readable: %1 - + ERROR: File %1 has unsupported extension. - + ERROR: Failed loading file: %1 @@ -2213,7 +2334,7 @@ ImageQualityDialog - + Unknown @@ -2221,42 +2342,42 @@ ImgQualityDialog - + Save as - + Saved File Quality - - Quality: + + File size - - File size: + + Quality - + Unknown - + Ca&lculate - + &Save - + &Cancel @@ -2264,8 +2385,8 @@ LdrViewer - - + + LDR image [%1 x %2] @@ -2336,7 +2457,7 @@ MainWindow - + Luminance HDR @@ -2346,785 +2467,789 @@ - + &Help - + &Windows - + &View - + HDR &Histogram - + &Toolbars - + + Preview Panel + + + + &File - + &Edit - + Main Toolbar - + &New HDR image... - + New HDR image - - + + Create a new HDR image from a set of LDR or Raw images - + Create a new HDR image from a set of JPEG, Raw, or 8/16 bpc TIFF files - + Ctrl+N - + &Open HDR image... - + Open HDR image - - - + + + Load an existing HDR image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) - + Ctrl+O - + &Save as... - + Save as... - - - + + + Save image (HDR or LDR) - + Ctrl+S - + &Quit - - + + Quit Luminance HDR - + Exit - + Ctrl+Q - + Rotate c&ounter-clockwise - + Rotate counter-clockwise - - - + + + Rotate counter-clockwise the HDR image - + < - + Rotate c&lockwise - + Rotate clockwise - - - + + + Rotate clockwise the HDR image - + > - + Low Dynamic Range - - + + L - + Fit to Dynamic Range - + Fit to dynamic range - + \ - + Shrink Dynamic Range - + [ - + Extend Dynamic Range - + ] - + Decrease Exposure - + 0 - + &Increase Exposure - + 9 - + &Contents... - + About... - - - + + + Open user manual for Luminance HDR - + F1 - + &Normal Size - + Normal size - - - + + + View HDR image at its normal size - + O - + Zoom &In - - - + + + Zoom in - + + - + Zoom &Out - - - + + + Zoom out - + - - + &Fit in Window - - + + Fit in Window - - + + Make the HDR image fit its window - + W - + &Preferences... - + Luminance Options - - - + + + Set various options of Luminance - + Ctrl+P - + &Resize... - + Resize the HDR image - - - + + + Change size of the HDR image - + Ctrl+R - + Copy &Exif Data... - + Copy Exif Data - - - + + + Copy Exif data between two sets of files - + Ctrl+E - - &Align Images... - - - - - - - WORK IN PROGRESS - - - - - &About Qt + + Show on the right - - Show information about Qt + + Show on the bottom - - - Show information about Qt library that is used by Luminance + + Realtime Previews - - &Tile + + Update - - &Cascade + + &About Qt - - - Cascade + + Show information about Qt - - Toolbars + + + Show information about Qt library that is used by Luminance - + Text &under Icons - + &Icons Only - + &Text Only - + Text &Alongside Icons - + &Batch Tone Mapping... - + Convert multiple HDR images to LDR - - + + Convert multiple HDR images to LDR using existing settings files - + Ctrl+B - + &What's This? - - + + Get verbose information about user interface elements - + Shift+F1 - + About &Luminance HDR - + Show information about Luminance HDR - - + + Show information about Luminance HDR, its authors and contributors - + Save HDR image &preview... - - - + + + Save the current HDR Preview to an LDR file - + &Projective Transformation... - - - + + + Apply projective transformation to the current HDR image - + &Crop to Selection - + Crop to Selection - - + + Crop the image to selection rectangle - + Click and drag inside image area to create a selection, then use this button to crop to a new HDR image - + Remove &Selection - + Remove selection rectangle - - + + Remove selection rectangle from image area - + Make a &Donation - + Ctrl+D - + Lock Viewers - + Synchronize viewers mode (fit, fill or 1:1). - + Lock the images for sync view - + Minimize - + Maximize - + Bring All to Front - + Show Preview Panel - + Show/Hide Preview Panel - + Ctrl+V - + Adjust &Levels - - + + Adjust Levels - - + + Tune the histogram for the current LDR - + Ctrl+L - + Save All - - + + Save All LDR files - + Remove Tab - + Ctrl+W - + Fill Window - + Fill window with the current viewer - + Batch HDR... - + Ctrl+H - + Soft Proofing - + Gamut Check - + Ready. Now open an existing HDR image or create a new one! - + All HDR formats - + Load one or more HDR images... - + Save files in - + Failed to save - + Done! - + Aborting... - + Cropped Image - + 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. + +Do you want to continue? + + + + Untitled - + Untitled %1 - + Error: %1 @@ -3172,134 +3297,103 @@ - - Default Previews Width - - - - - px - - - - - Always show Preview Panel - - - - - Always show Wizard first page - - - - - HDR TIFF Default File Format - - - - - Good quality and smaller file size - - - - - LogLuv TIFF (float, 16bit per color channel) + + Default Previews Width - - Better quality, larger file size, better compatibility with other applications + + px - - Float TIFF (float, 32bit per color channel) + + Saves the settings along the program files, to be portable - - Show negative numbers as: + + Portable mode - - Show nan and +/-Inf values as: + + Always show Preview Panel - - Temporary Working Folder + + Always show Wizard first page - - &Browse... + + HDR TIFF Default File Format - - - Which LDR image format to save to + + Good quality and smaller file size - - Batch Tonemapping Default Output Format + + LogLuv TIFF (float, 16bit per color channel) - - JPEG + + Better quality, larger file size, better compatibility with other applications - - PNG + + Float TIFF (float, 32bit per color channel) - - PPM + + Show negative numbers as: - - PBM + + Show nan and +/-Inf values as: - - BMP + + Temporary Working Folder - - TIFF + + &Browse... - - + + Amount of threads to use on multicore/SMP machines - + Batch Tonemapping Number of Threads - + General - + Quality: - + <!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; } @@ -3313,49 +3407,49 @@ - + Bilinear - + VNG - + PPG - + AHD - - - - - - - - - - - - - + + + + + + + + + + + + + ... - + Median: - + <!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; } @@ -3365,7 +3459,7 @@ - + <!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; } @@ -3375,12 +3469,12 @@ - + Do not stretch or rotate pixels - + <!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; } @@ -3391,22 +3485,22 @@ - + Interpolate RGB using 4 colours - + White Balance - + Method - + <!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; } @@ -3420,33 +3514,33 @@ - + Predefined D65 - - + + Camera - + Auto - + Manual - + Temperature (Kelvin) - + <!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; } @@ -3456,22 +3550,22 @@ - + Green - + Set here the green component to set magenta color cast removal level - + Highlights - + <!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; } @@ -3485,32 +3579,32 @@ - + Solid White - + Do not transform - + Blend - + Reconstruct - + Level - + <!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; } @@ -3520,22 +3614,22 @@ - + Correct false colors in highlights - + Auto Brightness - + Brightness - + <!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; } @@ -3545,7 +3639,7 @@ - + <!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; } @@ -3555,12 +3649,12 @@ - + Black - + <!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; } @@ -3570,7 +3664,7 @@ - + <!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; } @@ -3580,12 +3674,12 @@ - + Saturation - + <!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; } @@ -3595,12 +3689,12 @@ - + NR and CA Correction - + <!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; } @@ -3610,12 +3704,12 @@ - + Enable noise reduction - + <!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; } @@ -3625,12 +3719,12 @@ - + Threshold: - + <!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; } @@ -3640,12 +3734,12 @@ - + Enable Chromatic Aberration correction - + <!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; } @@ -3655,7 +3749,7 @@ - + <!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; } @@ -3665,54 +3759,54 @@ - + Red Component - + Blue Component - + Monitor - + Monitor Profile - - - + + + Browse... - + Camera profile - + Printer - + Printer profile - + align_image_stack command line arguments - + <!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; } @@ -3721,89 +3815,54 @@ - + &Cancel - + &OK - - Choose a directory - - - - - - - Open ICC Profile - - - - - Color profile (*.icc *.ICC *.icm *.ICM) - - - - - - Color profile (*.icc) - - - - - PreviewPanel - - - Preview - - - - - Mantiuk '06 - - - - - Mantiuk '08 - - - - - Fattal + + Restart - - Drago + + For the settings to take effect, please restart the application! - - Durand + + Choose a directory - - Reinhard '02 + + + + Open ICC Profile - - Reinhard '05 + + Color profile (*.icc *.ICC *.icm *.ICM) - - Ashikhmin + + + Color profile (*.icc) + + + PreviewSettings - - Pattanaik + + Load settings @@ -3910,17 +3969,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: @@ -3928,149 +3987,307 @@ QObject - - + + Error Opening RAW File - + Error Unpacking RAW File - + Error Processing RAW File - + Memory Error in processing RAW File - + Error Creating PFS Frame - + Cannot convert %1 to a float - + Cannot convert %1 to an integer - + Input file %1 - + Running in HDR-creation mode. - + Running in Load-HDR mode. - + Temporary directory: %1 - + Using %1 threads. - + Loading file %1 - + Successfully loaded file %1. - - Aborting... - - - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - - - - + All LDR formats - + Save the LDR image as... - + All HDR formats - + Save the HDR image as... - + Save as... - + Option -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. - - - - + + + + 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. + + + PreGamma=%1 + + + + + Contrast Equalization + + + + + Contrast + + + + + + Saturation + + + + + Detail + + + + + Luminance Level + + + + + Luminance Level=Auto + + + + + Color Saturation + + + + + Contrast Enhancement + + + + + Alpha + + + + + Beta + + + + + NoiseRedux + + + + + FFTSolver + + + + + simple + + + + + Equation 2 + + + + + Equation 4 + + + + + + Local + + + + + Bias + + + + + Spatial + + + + + + Range + + + + + Base + + + + + Multiplier + + + + + AutoLuminance + + + + + Cone + + + + + Rod + + + + + Key + + + + + Phi + + + + + Scales: + + + + + Lower + + + + + Upper + + + + + Brightness + + + + + Chromatic Adaptation + + + + + Light Adaptation + + ResizeDialog @@ -4379,6 +4596,14 @@ + TiffModeDialog + + + Save as ...TIFF + + + + TonemappingPanel @@ -4744,150 +4969,177 @@ - - + ... - + Load saved parameters - - Load parameters by comment - - - - + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. - + Process - + &Result Size - - + + Gamma applied before tonemapping - + Pre-gamma - + Restore pregamma's default value (1) - + Size of the resulting LDR image - + Here you can choose the size of the resulting LDR image. - + 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. - + 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... - + 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: - TonemappingWarningDialog + TonemappingSettings - - Fattal Warning + + Load Custom Settings - - 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? + + Sort by + + + + + Comments: + + + + + Comment + + + + + Operator + + + + + Most Useful Operators + + + + + Tonemap + + + + + Load + + + + + Cancel @@ -5039,4 +5291,22 @@ + + UpdateChecker + + + A new release is ready for download! + + + + + Click to download, or select Help->Update! + + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_tr.ts luminance-hdr-2.3.1/i18n/lang_tr.ts --- luminance-hdr-2.3.0/i18n/lang_tr.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_tr.ts 2013-04-07 18:41:14.000000000 +0000 @@ -27,104 +27,10 @@ &About &Hakkında - - <!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: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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR imaging workflow application<br />(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, 2011, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'Sans Serif'; 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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR görüntüleme iş akışı uygulaması<br />(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, 2011, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> - &Thanks To Teşekür ettiklerimiz @@ -169,6 +75,55 @@ </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></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: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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR imaging workflow application<br />(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-2012, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</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:'Sans Serif'; 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:12pt; font-weight:600; color:#00007f;">Luminance HDR</span> — HDR görüntüleme iş akışı uygulaması<br />(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, 2011, Franco Comida, Davide Anastasia<br /><a href="http://qtpfsgui.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://qtpfsgui.sourceforge.net</span></a></p></body></html> {3C?} {4.0/?} {3.?} {40/?} {1"?} {11p?} {400;?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {12p?} {600;?} {00007f?} {2006-2009,?} {0p?} {0p?} {0p?} {0p?} {0;?} {0p?} {2010-2012,?} {0000f?} + + + <!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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Romanian translator</span><span style=" font-size:9pt; color:#000000;"><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-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></span></p></body></html> + + + + Changelog + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + + BatchHDRDialog @@ -189,12 +144,6 @@ Öntanımlı profil: - Choose one of the creation predefined profiles. -See documentation for more informations. - Oluşturmadan önceden tanımlanan profillerden birini seçin. -Detaylı bilgi için belgelere bakın. - - Profile 1 Profil 1 @@ -263,14 +212,6 @@ Oluşturulan HDR'nin kayıt klasörü - Messages - Mesajlar - - - Choose a directory - Bir Dizin Seçin - - Started processing... İşlem başlatıldı... @@ -319,14 +260,6 @@ MTB motorunu kullan (Median Threshold Bitmap) - Select &Input Folder - Girdi &Klasörünü Seç - - - Select &Output Folder - Çıktı &Klasörünü Seç - - &Cancel &İptal @@ -338,60 +271,79 @@ &Close &Kapat - - - BatchTMDialog - Batch Tone Mapping - Toplu Ton Eşleme + Output + Çıktı + + + Choose one of the creation predefined profiles. +See documentation for more information. + - Input Hdr list - Hdr listesini içe aktar + Auto-crop + - Add &Directory - &Dizin Ekle + Progress + - &Add Files - Dosy&a Ekle + Select... + - &Remove Files - Dosyala&rı çıkart + Input folder: + - List of HDRs that will be tone mapped - Ton haritası oluşturulacak HDRlerin listesi + Output folder: + + + + Choose a source directory + - Input Tone Mapping Setting list - Ton Haritası Ayarlar listesini içe aktar + Choose a output directory + - Add D&irectory - &Dizin Ekle + Warning + - Add Fi&les - Dosya Ek&le + Total number of pictures must be a multiple of number of bracketed images. + - R&emove Files - Dosyala&rı çıkart + The chosen output directory contains HDR files. Those files might be overwritten. + +Continue? + - Output - Çıktı + Aborting... + Durduruluyor... + + + Custom config %1 + + + + + BatchTMDialog + + Batch Tone Mapping + Toplu Ton Eşleme - Select &Output Folder... - Çıktı Klasörünü S&eç... + List of HDRs that will be tone mapped + Ton haritası oluşturulacak HDRlerin listesi - Log: - Günlük: + Output + Çıktı &Show only: @@ -406,10 +358,6 @@ Sadece Hatalar - &Filter Log messages: - &Süzgeç günlük mesajları: - - Clear filter text Filtre metinini temizle @@ -418,30 +366,10 @@ &İptal - &Start! - &Başla! - - Choose a directory Bir Dizin Seçin - All Hdr formats - Bütün Hdr biçimleri - - - Select the input images - Girdi Resimlerini Seç - - - Load the tonemapping settings text files... - Ton haritalama ayarları metin dosyalarını yükle... - - - Luminance tonemapping settings text file (*.txt) - Luminance ton haritalama ayarları metin dosyası (*.txt) - - Processing... İşleniyor... @@ -454,34 +382,6 @@ Dönüştürülecek HDR görüntüleri - Add all the HDRs in a directory to the list - Tüm HDR'leri bir dizin listesine ekle - - - Add single HDR files to the list - Tek HDR'yi dosya listesine ekle - - - Remove single HDR files to the list - Tek HDR dosyasını listeden çıkart - - - Tone Mapping Settings Files - Ton Eşleme Ayarları dosyası - - - Add all the Tone Mapping Setting files in a directory to the list - Tüm Ton Eşleme Ayar dosyalarını bir dizinde listesine ekle - - - Add single Tone Mapping Setting files to the list - Tek Ton Eşleme Ayar dosyasını dosya listesine ekle - - - Remove single Tone Mapping Setting files to the list - Ton Eşleme Ayarları dosyasını listeden kaldır - - 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 @@ -538,10 +438,6 @@ Ton eşleme ayarlarını metin dosyasına yükle... - LuminanceHDR tone mapping settings text file (*.txt) - LuminanceHDR ton eşleştirme ayarları metin dosyası (*. Txt) - - Start processing... İşlemi başlat... @@ -554,162 +450,218 @@ Tüm görevlet tamamlandı - Saving using file format: %1, (quality - if applicable): %2 - Dosya biçimini kullanarak kaydet: %1, (kalite - eger var ise): %2 + Add Directory (Alt+D) + - - - 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 + Alt+D + - [T%1] Successfully saved LDR file: %2 - [T%1] LDR dosyası başarı ile kayıt edildi: %2 + Add Files (Alt+F) + - [T%1] ERROR: Cannot save to file: %2 - [T%1] HATA: Dosyayı kayıt edemiyor: %2 + Alt+F + - [T%1] ERROR: Loading of %2 failed - [T%1] HATA: %2 yükleme başarısız oldu + Remove Files (Alt+R) + - - - CommandLineInterfaceManager - Error: Alignment engine not recognized. - Hata: Hizalama motoru tanınmıyor + Alt+R + - Error: Wrong HDR creation format - Hata: Yanlış HDR oluşturma biçimi + Tone Mapping Settings + Ton Eşleme Ayarları - Error: Unknown weight function specified. - Hata:Belirlenen ağırlık fonksiyonu bilinmiyor. + Add Directory (Alt+I) + - Error: Unknown response curve specified. - Hata: Belirlenen tepki eğrisi bilinmiyor. + Alt+I + - Error: Unknown HDR creation model specified. - Hata: Bilinmeyen HDR oluşturma modeli belirlendi + Add Files (Alt+L) + - Error: Unknown HDR creation format specified. - Hata: Bilinmeyen HDR oluşturma biçimi belirlendi + Alt+L + - Error: Unknown tone mapping operator specified. - Hata: Bilinmeyen ton eşleme operatörüi belirlendi + Add from Database (Alt+B) + - Error: Wrong tone mapping option format. - Hata: Yanlış ton eşleme seçenek biçimi + Alt+B + - Error: Unknown tone mapping option specified. - Hata: + Remove Settings (Alt+M) + - Error: Unknown option %1. - Hata: %1 seçeneği bilinmiyor. + Alt+M + - Error: Missing argument for %1. - Hata: %1 argümanı hatalı + Ouput Image Width: + - 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. + % + - Error: Exif data missing in images and EV values not specifed on the commandline, bailing out. - Hata: Görüntü Exif verileri eksik ve EV değerleri komut satırında belirlenmemiş. + Output Image Quality + - Failed executing align_image_stack - yığın_görüntü_hizalama yürüyme başarısız + Output Folder: + - ERROR: Cannot save to file: %1 - HATA:Dosyayı kayıt edemez: %1 + Selec&t... + - Cannot convert %1 to a float - %1 dalgalanma için dönüştürülemiyor + Aborting... + Durduruluyor... - Cannot convert %1 to an integer - %1 bir tamsayıya dönüştürülemiyor + Output Format: + - Usage: %1 [OPTIONS]... [INPUTFILES]... - Kullanım: %1 [SEÇENEKLER]... [GİRİŞ DOSYALARI]... + JPEG + JPEG - Commandline interface to %1. - %1 komut satırı arayüzü + TIFF (16 bits) + + + + PNG + PNG - -h --help Display this help. - -h --yardım Bu yardımı görüntüler. + BMP + BMP - -v --verbose Print more messages during execution. - -v --verbose Yürütülmesi anında daha fazla mesaj yazdırın. + PPM + PPM - -u --gui Start in gui mode with input files. - -u --gui Girdi dosyaları ile gui modunda başlat. + PBM + PBM - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --hizala AIS|MTB HDR oluştururken Hizalama Motorunu kullan (varsayılan: hizalama yok). + Luminance HDR tone mapping settings text file (*.txt) + + + + BatchTMJob - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... Sayısal EV değerleri (birçok GİRDİ DOSYALARI gibi). + [T%1] Start processing %2 + [T%1] İşlemi Başlat %2 - -c --config HDR creation config. Possible values: - -c --yapılandırma HDR oluşturma yapılandırması. Olası değerleri: + [T%1] Successfully load %2 + [T%1] Başarı ile yüklendi %2 - weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - ağırlık=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + [T%1] Successfully saved LDR file: %2 + [T%1] LDR dosyası başarı ile kayıt edildi: %2 - (Default is weight=triangular:response_curve=linear:model=debevec) - (Varsayılan ağırlık=triangular:response_curve=linear:model=debevec) + [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 + + + + CommandLineInterfaceManager + + 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 HDR creation format specified. + Hata: Bilinmeyen HDR oluşturma biçimi belirlendi + + + Error: Unknown tone mapping operator specified. + Hata: Bilinmeyen ton eşleme operatörüi belirlendi + + + Error: Wrong tone mapping option format. + Hata: Yanlış ton eşleme seçenek biçimi + + + Error: Unknown tone mapping option specified. + Hata: + + + Error: Unknown option %1. + Hata: %1 seçeneği bilinmiyor. + + + Error: Missing argument for %1. + Hata: %1 argümanı hatalı + + + 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. + + + Failed executing align_image_stack + yığın_görüntü_hizalama yürüyme başarısız - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --HDR_DOSYASI yükle Yeni HDR oluşturmak için yeni bir tane yükleyin. + ERROR: Cannot save to file: %1 + HATA:Dosyayı kayıt edemez: %1 - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --HDR_DOSYASINI kaydet HDR dosya biçiminde kayıt edin. (varsayılan: kayıt) + Usage: %1 [OPTIONS]... [INPUTFILES]... + Kullanım: %1 [SEÇENEKLER]... [GİRİŞ DOSYALARI]... - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma VDEGERİ Gamma değeri ton eşleme anında kullanılacak. (Varsayılan: 1) + Commandline interface to %1. + %1 komut satırı arayüzü - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --yeniden boyutlandırma DEGERİ HDR'nizi boyutlandırmak istediğiniz Genişlik (gama ve ton eşleme önceden yeniden boyutlandırıldı) + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m + ağırlık=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - -t --tmo Tone mapping operator. Legal values are: - -t --tmo Ton eşitleme operatörü. Yasal değerleri: + (Default is weight=triangular:response_curve=linear:model=debevec) + (Varsayılan ağırlık=triangular:response_curve=linear:model=debevec) ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 @@ -720,10 +672,6 @@ (Varsayılan mantiuk06'dır) - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tm seçenekleri Ton eşitleme operatörü. Yasal değerleri: - - alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) @@ -764,17 +712,121 @@ (varsayılan kontrast=0.3:equalization=false:saturation=1.8, see also -o) - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --LDR_DOSYASI çıkışı LDR ton eşlemeyi kaydetmek istediğiniz dosyanın adı. + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. + + Ya mevcut bir HDR dosyası yükleyin (-l seçeneği ile) veya yeni bir HDR oluşturmak için GİRİŞDOSYASI belirtmeniz gerekir. - (No tonemapping is performed unless -o is specified). - (-o belirtilir ise ton eşleme gerçekleştirilmez). + Error: Wrong HDR creation format. + - You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. - - Ya mevcut bir HDR dosyası yükleyin (-l seçeneği ile) veya yeni bir HDR oluşturmak için GİRİŞDOSYASI belirtmeniz gerekir. + Error: Quality must be in the range [0-100]. + + + + 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. + + + + 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 + + + + Tonemapping requested, saving to file %1. + + + + Failed loading images + + + + -h --help Display this help. + + + + -v --verbose Print more messages during execution. + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + -c --config HDR creation config. Possible values: + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + -t --tmo Tone mapping operator. Legal values are: + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + + + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + (No tonemapping is performed unless -o is specified). + @@ -822,6 +874,22 @@ Choose a directory and a prefix Bir dizin ve bir önek seçin + + Maskable + + + + Good image + + + + Ed&itable + Düz&enlenebilir + + + R&eference + Re&ferans + EditingToolsDialog @@ -878,10 +946,6 @@ Özgün &Boyut - Preview &Mode: - Önizleme &Modu: - - Difference (E-P) Fark (E-P) @@ -902,10 +966,6 @@ Anti-gölgeleme Maskesi - Mask Color - Renk Maskesi - - Images List Görüntü Listesi @@ -992,22 +1052,10 @@ &Görüntüleri Kaydet - A&dd Mask - Mas&ke Ekle - - - Remove Mas&k - Maskeyi Çık&art - - Size: Boyut: - pixels - piksel - - &Strength: &Güç: @@ -1113,26 +1161,74 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Eğer aynı görüntünün düzenlenebilir ve referans listesi seçilirse, görüntü bu alanda gösterilecektir.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sol fare tuşuna basılı tutarak bir kırpma alanı seçebilirsiniz.</p></body></html> - - - GenericViewer - Pan the image to a region - Görüntüyü bir bölgede kaydır + Histogram + - - - HdrCreationManager - The image %1 is an 8 bit format (LDR) while the previous ones are not. - %1 görüntüsü öncekiler gibi değildir, görüntü 8 bit (LDR) formatında'dır + &Mode: + - The image %1 has an invalid size. - %1 görüntüsü geçersiz bir boyuttadır. + Brush + - The image %1 is an 16 bit format while the previous ones are not. + Lasso + + + + Mask + + + + A&dd + + + + &Remove + &Çıkart + + + Lasso - Draw a free hand selection area + + + + Brush - Paint the mask using the brush + + + + Save mask + + + + ... + ... + + + Apply saved mask + + + + + GenericViewer + + Pan the image to a region + Görüntüyü bir bölgede kaydır + + + + HdrCreationManager + + The image %1 is an 8 bit format (LDR) while the previous ones are not. + %1 görüntüsü öncekiler gibi değildir, görüntü 8 bit (LDR) formatında'dır + + + The image %1 has an invalid size. + %1 görüntüsü geçersiz bir boyuttadır. + + + The image %1 is an 16 bit format while the previous ones are not. %1 görüntüsü öncekiler gibi değil, 16 bit biçimindedir. @@ -1150,14 +1246,14 @@ ERROR: Failed Loading file: %1 ERROR: %1 dosyasını yükleme başarısız + + ERROR loading %1 + + HdrViewer - Viewing Settings Toolbar - Ayarlar Araç Çubuğunu Görüntüle - - Linear Doğrusal @@ -1186,10 +1282,6 @@ Histogram: - Unsaved changes... - Kaydedilmemiş değişiklikler... - - &Mapping: &Eşleme: @@ -1197,34 +1289,10 @@ HdrWizard - Hdr creation Wizard - Hdr Oluşturma Sihirbazı - - [1/2] Load Input Images [1/2] Girdi Resimlerini Yükle - Load Input Images - Girdi Resimlerini Yükle - - - [2/2] Choose Settings for Hdr Creation - [2/3] Hdr Oluşturumu İçin Ayarları Seçin {2/2]?} - - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please choose one of the predefined profiles listed on the right:</p> -<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;">The first one in the list usually leads to best results, change it only if the resulting Hdr is not good enough.</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lütfen sağdalistelenen ön tanımlı profillerden birini seçiniz:</p><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;">Listedeki ilk değer, genellikle dönen en iyi sonuçtur, Sadece Hdr sonuçlandırması yeteri kadar iyi değilse değiştirin.</span></p></body></html> - - - list of default profiles - Ön tanımlı profillerin listesi - - Profile 1 Profil 1 @@ -1265,18 +1333,10 @@ Doğrusal - Hdr creation model: - Hdr Oluşturma Modeli: - - Debevec Debevec - Anti-ghosting(beta!) - Karşı-gölgeleme(beta!) - - Gamma Gama @@ -1289,18 +1349,6 @@ Ölçeklendirme - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Number of iterations (keep it small):</p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Yineleme sayısı (küçük tutunuz):</p></body></html> - - - Use custom configuration. -(use this only if the default profiles -above do not yield good results) - Genel yapılandırmayı kullan -(bunu sadece yukarıdaki ön tanımlı -profiller, iyi sonuçlar çıkarmazlarsa kullanın) - - [2/2] Choose Custom Configuration [2/2] Özell Yapılandırmayı Seçin @@ -1309,14 +1357,6 @@ Ağırlıklar: - <p align="left">Choose confidence function -over all the possible -pixel values</p> - <p align="left">Mümkün olan bütün piksel -değerlerinde, emniyet -işlevini seçiniz</p> - - Gaussian Gaussian @@ -1337,14 +1377,6 @@ Yanıt eğrisini bulmak için ölçeklendirme kullan (robertson02 algoritması) - Hdr creation equation: - Hdr oluşturması eşitlemesi: - - - Choose Model: - Model Seçin: - - Robertson Robertson @@ -1381,10 +1413,6 @@ Kamera yanıt eğrisi (*.m);;Tüm Dosyalar (*) - (*) Weights: - (*) Ağırlıkar: - - - Response curve: - Yanıt Eğrisi: @@ -1401,52 +1429,10 @@ Ölçeklendirmeden - From File - Dosyadan - - HDR Creation Wizard HDR Oluşturma Sihirbazı - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">HDR Oluşturma Sihirbazı</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bu araç farklı pozlama ile çekilen görüntüleri sıralamada size yardımcı olacak <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Görüntüsü</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sıralanan görüntüler bir tripod kullanarak aynı koşullar ve olası aynı kamera ile çekilmiş olmalıdır.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bu asistan tüm adımlarda size yardımcı olacaktır: görüntüleri alırken, hizalarken, HDR oluşturmak için bir profil seçerken.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Kısıtlamalar:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tüm görüntüler aynı ölçülerde olmalı</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tüm görüntüler aynı renk derinliğinde olmalı</p></body></html> - - Currently Loaded &Files Şu anda Yüklü &Dosyalar @@ -1651,18 +1637,6 @@ <center><font color="#008400"><h3><b>Görüntüler Yüklendi.</b></h3></font></center> - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags -for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Aşağıdaki görüntüler için Luminance HDR <i>EXIF</i> etiketlerini -bulmak mümkün değil: - <ul> %1</ul> <hr>You can still proceed creating an Hdr. Bunu yapmak için EV (pozlama değerlerini) veya farklı değerleri <b>el ile</b> eklemek gerekir. <hr>Luminance HDR ile bunu <b>otomatikman</b> yapmak istiyorsanız , en azından şu exif verisine sahip görüntüleri -yüklemek zorundasınız: <ul><li>Deklanşör Hızı (saniye)</li> <li>Diyafram (f- -sayısı)</li></ul> <hr><b>İPUCU:</b>Görüntüler önişlenirken EXIF verileri genellikle kayıp olur.<br> -<i><b>"Araçlar-> Exif Verisini Kopyala ..."</b></i> sekmesinden görüntülerden iki takım <b>exif-verilerini-bire-bir-kopyala</b>ile kopyalayabilirsiniz.</b></i> menü ögesi. - - <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> @@ -1702,383 +1676,201 @@ <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> - - - HdrWizardForm - Hdr creation Wizard - Hdr Oluşturma Sihirbazı + Auto-crop + - Click the button below to load the input images - Girdi resimlerini yüklemek için, aşağıdaki düğmeye tıklayınız + align_image_stack failed to align images. + - Load Input Images - Girdi Resimlerini Yükle + Weights: + - list of default profiles - Ön tanımlı profillerin listesi + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + - Profile 1 - Profil 1 + Save Settings + - Profile 2 - Profil 2 + Custom config %1 + - Profile 3 - Profil 3 + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags +for the following images: + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + - Profile 4 - Profil 4 + From File: + + + + HelpBrowser - Profile 5 - Profil 5 + Luminance Help + Luminance Yardım - Profile 6 - Profil 6 + &Exit + &Çık - Weighting function: - Derinlik işlevleri: + &File + &Dosya - Triangular - Üçgensel + &View + &Görünüm - Response Curve: - Yanıt Eğrisi: + Luminance HDR Help + Luminance HDR Yardım - Gamma - Gama + &Print... + &Bas... - Debevec - Debevec + &Find... + &Bul... - Anti-ghosting(beta!) - Karşı-gölgeleme(beta!) + Find &Next... + Sonrakini &Bul... - Linear - Doğrusal + Find &Previous... + Öncekini &Bul... - Log - Günlük + &Add + &Ekle - Calibration - Ölçeklendirme + &Delete + &Sil - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Number of iterations (keep it small):</p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Yineleme sayısı (küçük tutunuz):</p></body></html> + D&elete All + &Tümünü Sil - Use custom configuration. -(use this only if the default profiles -above do not yield good results) - Genel yapılandırmayı kullan -(bunu sadece yukarıdaki ön tanımlı -profiller, iyi sonuçlar çıkarmazlarsa kullanın) + Help SideBar + KenarÇubugu Yardım - Weights: - Derinlik: + LuminanceHDR Online Help + LuminanceHDR Online Yardım - Gaussian - Gaussian + &Edit + &Düzen - Plateau - Plato + &Bookmarks + &Yer İmleri - <p align="left">Choose confidence function -over all the possible -pixel values</p> - <p align="left">Mümkün olan bütün piksel -değerlerinde, emniyet -işlevini seçiniz</p> + &Quit + &Çık - Predefined response curves: - Ön tanımlı yanıt eğrileri: + Find &Next + Sonrakini &Bul - Load... - Yükle... + Find &Previous + Öncekini &Bul - Use calibration to find response curve (robertson02 algorithm) - Yanıt eğrisini bulmak için ölçeklendirme kullan (robertson02 algoritması) + &Contents + &İçindekiler - Choose Model: - Model Seçin: + &Search + &Ara - Robertson - Robertson + &Add Bookmark + &Yer İmi Ekle - &Next > - &İleri > + Find + Bul - &Cancel - İ&ptal + Search Term: + Arama Terimi: - JPEG (*.jpeg *.jpg);; - JPEG (*.jpeg *.jpg);; + New Bookmark + Yeni Yer İmi - TIFF Images (*.tiff *.tif);; - TIFF Resimleri (*.tiff *.tif);; + New Bookmark's Title: + Yeni Yer İminin Başlığı: - Select the input images - Girdi Resimlerini Seç + <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> - EXIF data not found - EXIF verisi bulunamadı + LuminanceHDR - Help Browser + LuminanceHDR -Tarayıcı Yardım - &Finish - &Bitir + This protocol is not handled by the help browser. +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? + + + HelpSideBar - Load a camera response curve file - Bir fotoğraf makinesi yanıt eğrisi dosyası yükle + 1 + 1 - Camera response curve (*.m);;All Files (*) - Fotoğraf makinesi yanıt eğrisi (*.m);;Bütün Dosyalar (*) + Contents + İçindekiler - (*) Weights: - (*) Derinlik: + &Contents + &İçindekiler - - Response curve: - - Yanıt Eğrisi: - - - - Model: - - Model: - - - Logarithmic - Logaritmik - - - From Calibration - Ölçeklendirmeden - - - From File - Dosyadan - - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please choose one of the predefined profiles listed on the right:</p> -<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;">The first one in the list usually leads to best results, change it only if the resulting Hdr is not good enough.</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lütfen sağdalistelenen ön tanımlı profillerden birini seçiniz:</p><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;">Listedeki ilk değer, genellikle dönen en iyi sonuçtur, Sadece Hdr sonuçlandırması yeteri kadar iyi değilse değiştirin.</span></p></body></html> - - - Hdr creation model: - Hdr Oluşturma Modeli: - - - Hdr creation equation: - Hdr oluşturması eşitlemesi: - - - [1/2] Load Input Images - [1/3] Girdi Resimlerini Yükle {1/2]?} - - - [2/2] Choose Settings for Hdr Creation - [2/3] Hdr Oluşturumu İçin Ayarları Seçin {2/2]?} - - - [2/2] Choose Custom Configuration - [2/3] Genel Yapılandırmayı Seçin {2/2]?} - - - Error... - Hata... - - - - HelpBrowser - - Luminance Help - Luminance Yardım - - - &Exit - &Çık - - - &File - &Dosya - - - &View - &Görünüm - - - Luminance HDR Help - Luminance HDR Yardım - - - &Print... - &Bas... - - - &Find... - &Bul... - - - Find &Next... - Sonrakini &Bul... - - - Find &Previous... - Öncekini &Bul... - - - &Add - &Ekle - - - &Delete - &Sil - - - D&elete All - &Tümünü Sil - - - Help SideBar - KenarÇubugu Yardım - - - LuminanceHDR Online Help - LuminanceHDR Online Yardım - - - &Edit - &Düzen - - - &Bookmarks - &Yer İmleri - - - &Quit - &Çık - - - Find &Next - Sonrakini &Bul - - - Find &Previous - Öncekini &Bul - - - &Contents - &İçindekiler - - - &Search - &Ara - - - &Add Bookmark - &Yer İmi Ekle - - - 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 -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? - - - - HelpDialog - - Luminance Help - Luminance Yardım - - - &Close - &Kapat - - - - HelpSideBar - - 1 - 1 - - - Contents - İçindekiler - - - &Contents - &İçindekiler - - - Se&arch - A&ra + Se&arch + A&ra Searching is case insensitive @@ -2138,14 +1930,6 @@ Kayıt edilen Dosya Kalitesi - Quality: - Kalite: - - - File size: - Dosya boyutu: - - Unknown Bilinmiyor @@ -2161,6 +1945,14 @@ &Cancel &İptal + + File size + + + + Quality + + LdrViewer @@ -2233,18 +2025,10 @@ MainWindow - Luminance - Luminance - - &File &Dosya - &Image - Res&im - - &View &Görünüm @@ -2261,62 +2045,18 @@ &Yardım - Common operations - Yaygın işlemler - - - &New Hdr... - Ye&ni Hdr... - - - New Hdr... - Yeni Hdr... - - Ctrl+N Ctrl+N - &Open Hdr... - Hdr &Aç... - - - Open Hdr.... - Hdr Aç.... - - Ctrl+O Ctrl+O - &Save Hdr as... - H&dr yi Farklı Kaydet... - - - Save Hdr as... - Hdr yi Farklı Kaydet... - - Ctrl+S Ctrl+S - &Tonemap the Hdr... - HDR &ton haritası... - - - Tonemap the Hdr - HDR ton haritası - - - Ctrl+T - Ctrl+T - - - &Exit - &Çık - - Exit Çık @@ -2325,26 +2065,10 @@ Ctrl+Q - Rotate C&ounterClockWise - Saat Y&önü Tersinde Döndür - - - Rotate CounterClockWise - Saat Yönü Tersinde Döndür - - < < - Rotate C&lockWise - Saat &Yönünde Döndür - - - Rotate ClockWise - Saat Yönünde Döndür - - > > @@ -2401,18 +2125,10 @@ Şu anki LDR için histogramı ayarla - &Documentation... - Belgelen&dirme... - - About... Hakkında... - Show Luminance Help - Luminance Yardımını Göster - - Ctrl+H Ctrl+H @@ -2429,10 +2145,6 @@ Yaklaşt&ır - Zoom In - Yaklaştır - - + + @@ -2441,18 +2153,10 @@ &Uzaklaştır - Zoom Out - Uzaklaştır - - - - - &Fit to Window - &Pencereye Uydur - - W W @@ -2461,10 +2165,6 @@ Luminance Seçenekleri - Set the various options of Luminance. - Luminance'nin çeşitli seçeneklerini ayarla. - - Ctrl+P Ctrl+P @@ -2485,110 +2185,26 @@ Ctrl+E - &Align Images... - Resimleri Hiz&ala... - - - WORK IN PROGRESS - ÇALIŞMA GELİŞİMİ - - &About Qt Qt H&akkında - &Tile - D&öşe + Aborting... + Durduruluyor... - &Cascade - Ta&şır + Unsaved changes... + Kaydedilmemiş değişiklikler.... - Cascade - Taşır - - - Aborting... - Durduruluyor... - - - Save the HDR... - HDR yi Kaydet... - - - Error... - Hata... - - - Unsaved changes... - Kaydedilmemiş değişiklikler.... - - - Hdr &Histogram - Hdr &Histogram - - - &Toolbars - A&raç Çubukları - - - Create an Hdr from a set of JPEGs or RAWs, or 8 or 16 bit TIFF files. - Bir dizi JPEG, RAW veya 8 veya 16 bit TIFF dosyalarından, bir Hdr oluştur. - - - Load an existing Hdr image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF). - Varolan bir Hdr resim dosyası yükle (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF). - - - Saves the Hdr (OpenEXR, Radiance RGBE, PFS stream, or 32bit or LogLuv TIFF) - Hdr yi Kaydeder (OpenEXR, Radiance RGBE, PFS stream, or 32bit or LogLuv TIFF) - - - Tonemap the Hdr into a common LDR (i.e. JPEG or PNG) format - Yaygın LDR (Örneğin JPEG yada PNG) biçimleri içinden HDR ton haritası - - - Rotate Counterclockwise the Hdr - Hdr yi Saat Yönü Tersinde Döndür - - - Rotate ClockWise the Hdr - Hdr yi Saat Yönünde Döndür - - - View Hdr at Normal Size - Hdr yi Normal Boyutta Görüntüle - - - Shrink the Hdr to fit its containing window - Hdr yi, kendisini taşıyan pencereye uydurmak için küçült + &Toolbars + A&raç Çubukları &Preferences... Te&rcihler... - &Resize the Hdr... - Hd&r yi yeniden boyutlandır... - - - Resize the Hdr - Hdr yi yeniden boyutlandır - - - Resize (shrink or expand) the Hdr - Hdr yi yeniden boyutlandır (daralt veya uzat) - - - Toolbars - Araç Çubukları - - - Text &Under Icons - Sim&ge Altında Metin - - &Icons Only Sadece S&imgeler @@ -2605,22 +2221,6 @@ Toplu &Ton Eşleme... - Ready.... Now open an Hdr or create one! - Hazır... Şimdi bir Hdr açın veya yeni bir tane oluşturun! - - - All Hdr formats - Bütün Hdr biçimleri - - - Load an Hdr file... - Bir Hdr dosyası yükle... - - - Copy Exif Data between two set of files - İki dosya arasında Exif verisini kopyala - - Ctrl+B Ctrl+Y @@ -2873,46 +2473,10 @@ Ctrl+D - Next - Sonraki - - - Next Image - Sonraki Görüntü - - - Show Next Image - Sonraki Görüntüyü Göster - - - Ctrl+PgDown - Ctrl+PgDown - - - Previous - Önceki - - - Previous Image - Önceki Görüntü - - - Show Previous Image - Önceki Görüntüyü Göster - - - Ctrl+PgUp - Ctrl+PgUp - - Lock Viewers Görüntüleyicileri Kilitle - Syncronize viewers mode (fit, fill or 1:1). - Görüntüleyici modunu senkronize et (1:1'e sığdır veya doldur) - - Lock the images for sync view Senkron görünüm için görüntüleri kilitle @@ -3024,131 +2588,54 @@ Error: %1 Hata: %1 - - - ParametersDialog - - Saved Parameters - Parametreler Kayıt edildi - - - - PreferenceDialog - - Choose a directory - Bir Dizin Seçin - - - - PreferencesDialog - - Tone Mapping - Ton Eşleme - - - Hdr Tiff - Hdr Tiff - - - Hdr Visualization - Hdr Görselliği - - Cache - Ön Bellek - - - Choose the directory where Luminance will store the temporary data to. - Luminance'nin geçici verilerini tutacağı dizini seçin. - - - &Load... - Yük&le... - - - Batch - Yığın - - - Save using this LDR image &format: - &LDR görüntü biçimini kullanarak kaydet: - - - JPEG - JPEG - - - PNG - PNG - - - PPM - PPM - - - PBM - PBM - - - BMP - BMP + Synchronize viewers mode (fit, fill or 1:1). + - Number of &threads: -(useful on multi-core/SMP machines) - İş &Parçacıkları Numarası: -(Çoklu işlemcili makineler için kullanışlıdır) + Soft Proofing + - Batch Tone Mapping - Ton Haritalama Yığını + Gamut Check + - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Raw Import Options</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Raz İçe Aktarma Seçenekleri</span></p></body></html> + Preview Panel + - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Tiff Options</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Tiff Seçenekleri</span></p></body></html> + Show on the right + - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose the Tiff-Hdr format that Luminance will use to save an Hdr image.</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<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;">LogLuv Tiff</span> is the appropriate format for most cases because it stores the hdr data in a reasonable amount of space (i.e. file size).</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use the <span style=" font-weight:600;">Float Tiff</span> format only if you want to load your tiff in another application that cannot open the LogLuv format.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Luminance bir HDR resmi kaydedecek, Tiff-Hdr biçimini seçin.</p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p><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;">LogLuv Tiff</span>, birçok bakımdan en uygun biçimdir, çünkü hdr verisini en uygun miktardaki alanda saklar (mesela dosya boyutu).</p><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;">Float Tiff</span>biçimini, sadece LogLuv biçimiyle açamadığınız ve başka bir uygulamadan tiff yükleyeceğiniz zaman kullanın.</p></body></html> + Show on the bottom + - LogLuv Tiff (float, 16bit) - LogLuv Tiff (float, 16bit) + Realtime Previews + - Float Tiff (float, 32bit) - Float Tiff (float, 32bit) + Update + - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Hdr Visualization Options</span></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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Hdr Canlandırma Seçenekleri</span></p></body></html> + Fattal Warning + - Colors - Renkler + 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? + + + + PreferencesDialog - Show Negative Numbers as: - Negatif Numaralar Ne Olarak Gösterilsin: + Tone Mapping + Ton Eşleme &OK @@ -3179,58 +2666,6 @@ İlave Araçlar - Czech - Çekce - - - English - İngilizce - - - Finnish - Fince - - - French - Fransızca - - - German - - - - Indonesian - - - - Italian - - - - Polish - - - - Romanian - - - - Russian - Rusca - - - Spanish - İspanyolca - - - Turkish - Türkçe - - - Hungarian - Macarca - - Always show Preview Panel Daima Önizleme Panelini göster @@ -3263,18 +2698,6 @@ nan ve +/-Inf değerini göster - C&hoose - S&eç - - - Which LDR image format to save to - Hangi LDR görüntü biçimi kayıt edilecek - - - TIFF - TIFF - - Amount of threads to use on multicore/SMP machines @@ -3350,7 +2773,7 @@ ... - + ... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3632,84 +3055,6 @@ <!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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</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;">Kamera Profili</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RAW veri kodun çözmek için kullanılan girdi renk alanını buradan 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;">Hiçbiri</span>: RAW çözme sırasında hiçbir renk girdi profilini kullanmaz.</p> -<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;">Gömülü</span>: RAW dosyası var ise gömülü renk profilini kullanı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;">Özel</span>: Özel bir renk giriş alanı renk profili kullanın.</p></body></html> - - - None - Hiçbiri - - - Built in - Dahili - - - Custom - Özel - - - <!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;">Workspace</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 output color space used to decode RAW data.</p> -<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;">Raw (linear)</span>: in this mode, no output color space is used during RAW decoding.</p> -<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;">sRGB</span>: this is a RGB color space, created cooperatively by Hewlett-Packard and Microsoft. It is the best choice for images destined for the Web and portrait photography.</p> -<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;">Adobe RGB</span>: this color space is an extended RGB color space, developed by Adobe. It is used for photography applications such as advertising and fine art.</p> -<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;">Wide Gamut</span>: this color space is an expanded version of the Adobe RGB color space.</p> -<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;">Pro-Photo</span>: this color space is an RGB color space, developed by Kodak, that offers an especially large gamut designed for use with photographic outputs in mind.</p> -<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;">Custom</span>: use a custom output color space profile.</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;">Çalışma alanı</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RAW veri kodunu çözmek için kullanılan çıktı renk alanını buradan 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;">Raw (linear)</span>: Bu modda, RAW kullanılırken hiçbir çıktı renk alanı olmaz .</p> -<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;">sRGB</span>: Bu Hewlett-Packard ve Microsoft işbirliği ile oluşturulan bir RGB renk alanıdır. Bu Web ve portre fotoğrafçılığı görüntüleri için en iyi seçimdir.</p> -<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;">Adobe RGB</span>: Bu renk alanı, uzun bir RGB renk alanıdır, Adobe tarafından geliştirilmiştir. Bu reklam ve güzel sanatlar gibi fotoğraf uygulamaları için kullanılır.</p> -<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;">Geniş Dizi</span>: Bu renk aralığı Adobe RGB renk alanının genişletilmiş bir versiyonudur.</p> -<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;">Pro-Foto</span>: Kodak tarafından geliştirilen, bu renk alanı, fotoğraf çıktıları ile kullanılmak üzere tasarlanmıştır, özellikle büyük bir gam sunar.</p> -<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;">Özel</span>: Özel bir çıktı renk alanı profilini kullanın.</p></body></html> - - - RAW - RAW - - - sRGB - sRGB - - - Adobe RGB - Adobe RGB - - - Wide Gamut - Geniş Dizi - - - Pro Photo - Pro Foto - - - <!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:'DejaVu 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';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</span></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3723,14 +3068,6 @@ &İptal - Please restart... - Lütfen Yeniden başlatın... - - - Please restart LuminanceHDR to use the new language (%1). - Yeni dili kullanmak LuminanceHDR'yi yeniden başlatın:%1 - - Language Lisan @@ -3751,18 +3088,10 @@ Geçici Çalışma Klasörü - Batch Tonemapping Default Output Format - Toplu Ton Eşleme Varsayılan Çıkış Biçimi - - Batch Tonemapping Number of Threads Toplu Ton Eşleme Konu Sayısı - Batch Tonemapping Default Output Quality - Toplu Ton Eşleme varsayılan Çıktı Kalitesi - - General Genel @@ -3807,62 +3136,74 @@ Mavi Bileşen - Camera Profile - Kamera Profili - - Camera profile Kamera Profili - Color Space - Renk Alanı - - align_image_stack command line arguments yığın_görüntü_hizalama komut satırı argümanları - - - PreviewPanel - Reinhard '02 - Reinhard '02 + Color Management + - Reinhard '05 - Reinhard '05 + &Browse... + - Form + Monitor - Mantiuk '06 + Monitor Profile - Mantiuk '08 + Browse... - Fattal + Printer - Drago + Printer profile - Durand + Open ICC Profile - Ashikhmin + Color profile (*.icc *.ICC *.icm *.ICM) - Pattanaik + Color profile (*.icc) + + + + Saves the settings along the program files, to be portable + + + + Portable mode + + + + Restart + + + + For the settings to take effect, please restart the application! + + + + + PreviewSettings + + Load settings @@ -3959,22 +3300,6 @@ QObject - Aborting... - Sonlandırılıyor... - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - Qt JPEG Eklentisi bulunamadı..<br>Lütfen DLL paketini "klasör isimleri kullanarak" seçeneği aktif hale getirin ve çıkartın. - - - Save the LDR to... - LDR yi buraya kopyala... - - - Failed to save <b> - Kayıt başarısız <b> - - All LDR formats Tüm LDR biçimleri @@ -4002,6 +3327,214 @@ LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. LuminanceHDR görüntü_yığın_hizalama'yı yürütülecek olan "-v-a hizalama_" seçeneklerini gerektirir. Komut satırı seçenekleri düzeltildi. + + Error Opening RAW File + + + + Error Unpacking RAW File + + + + Error Processing RAW File + + + + Memory Error in processing RAW File + + + + Error Creating PFS Frame + + + + Cannot convert %1 to a float + %1 dalgalanma için dönüştürülemiyor + + + Cannot convert %1 to an integer + %1 bir tamsayıya dönüştürülemiyor + + + Input file %1 + + + + Running in HDR-creation mode. + + + + Running in Load-HDR mode. + + + + Temporary directory: %1 + + + + Using %1 threads. + + + + Loading file %1 + + + + Successfully loaded file %1. + + + + 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. + + + + 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 + + + + 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 + ResizeDialog @@ -4055,10 +3588,26 @@ - SavedParameters + SavedParametersDialog + + Saved Parameters + Parametreler Kayıt edildi + + + Comment + Yorum + + + TM Operator + TM Operatörü + Simple - Basit + Sade + + + Equation 2 + Denklem 2 Local Contrast Threshold @@ -4093,112 +3642,100 @@ Renk Doygunluğu - Cone and Rod based on Luminance - Işıga dayalı Koni ve Çubuk - - - Cone Level - Koni Seviyesi - - - Rod Level - Çubuk Seviyesi - - - Multiplier - Çoklayıcı + Noise Reduction + Gürültü Azaltma - Use Scales - Ölçekleri Kullan + Old Fattal + Old Fattal - Key Value - Anahtar Değer + Contrast Equalization + Kontrast Geliştirme - Range - Sıra + Contrast Factor + Kontrast Faktörü - Lower Scale - Düşük Ölçek + Saturation Factor + Doygunluk Faktörü - Upper Scale - Yüksek Ölçek + Detail Factor + Detay Faktörü - Brightness - Parlaklık + Contrast Enhancement + Kontrast Geliştirme - Equation 2 - Denklem 2 + Luminance Level + Işık Düzeyi - Pre-gamma - Pre-gama + Manual Luminance Level + Işık Düzeyi Kılavuzu - Comment - Yorum + Cone and Rod based on Luminance + - Noise Reduction - Gürültü Azaltma + Local Tonemapping + Yerel Ton eşleme - Old Fattal - Old Fattal + Cone Level + Koni Seviyesi - Contrast Equalization - Kontrast Eşitleme + Rod Level + Çubuk Seviyesi - Contrast Factor - Kontrast Faktörü + Multiplier + Çoğullayıcı - Saturation Factor - Doygunluk Faktörü + Use Scales + Ölçekleri Kullan - Detail Factor - Detay Faktörü + Key Value + Anahtar Değer - Contrast Enhancement - Kontrast Geliştirme + Phi Value + Phi Degeri - Luminance Level - Işık Düzeyi + Range + Sıra - Manual Luminance Level - Işık Düzeyi Kılavuzu + Lower Scale + Düşük Ölçek - Local Tonemapping - Yerel Ton eşleme + Upper Scale + Yüksek Ölçek - Phi Value - Phi Degeri + Brightness + Parlaklık Chromatic Adaptation - Chromatic Adaptation + Kromatik Adaptasyon Light Adaptation Işık Adaptasyonu - TM Operator - TM Operatörü + Pre-gamma + Pre-Gama @@ -4208,8 +3745,8 @@ Kayıt Parametrekleri - Enter a short comment for the saved parameters - Kayıt edilen parametreler için kısa bir açıklama girin + Enter a short comment for the saved parameters: + @@ -4251,10 +3788,10 @@ - ThreadManager + TiffModeDialog - &Close - &Kapat + Save as ...TIFF + @@ -4264,10 +3801,6 @@ Bir ton eşleme ayarları metin dosyası yükle... - Luminance tonemapping settings text file (*.txt) - Luminance ton haritalama ayarları metin dosyası (*.txt) - - Aborting... Durduruluyor... @@ -4288,25 +3821,6 @@ 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 Luminance. Create a new one. - Hata, ton haritalama ayarları dosya biçimi değiştirildi. Bu (eski) dosya, Luminance'nin bu sürümü ile kullanılamaz. Yeni bir tane oluşturun. - - - Tonemapping Operators and options - Ton haritalama İşleticileri ve seçenekler - - - Gamma applied before tone mapping - Tone haritalamadan önce gama uygulandı - - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Gradient Domain High Dynamic Range Compression</span><br />R. Fattal, D. Lischinski, and M. Werman</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Eğim Etki Alanı Yüksek Hareket Dizisi Sıkıştırması</span><br />R. Fattal, D. Lischinski, ve M. Werman</p></body></html> - - Alpha Alfa @@ -4315,17 +3829,6 @@ Renk Doygunluğu - Default Values for operator - İşletici için ön tanımlı değerler - - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">A Tone Mapping Algorithm for High Contrast Images</span><br />Michael Ashikhmin</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Yüksek Karşıtlı Resimler için Bir Ton Haritalama Algoritması</span><br />Michael Ashikhmin</p></body></html> - - Simple Sade @@ -4346,13 +3849,6 @@ Yerel Kontrast Eşiği - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Fast Bilateral Filtering for the Display of HDR Images</span><br />F. Durand and J. Dorsey.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">HDR resimlerinin görüntülenmesi için, hızlı çift yönlü filtreleme</span><br />F. Durand ve J. Dorsey.</p></body></html> - - Spatial Kernel Sigma Uzaysal Çekirdek Sigması @@ -4365,24 +3861,10 @@ Temel Kontrast - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Adaptive logarithmic mapping for displaying high contrast scenes</span><br />F. Drago, K. Myszkowski, T. Annen, and N. Chiba.</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Yüksek karşıtlık sahnelerinin görüntülemesi için uyarlamalı logaritmik haritalama</span><br />F. Drago, K. Myszkowski, T. Annen, ve N. Chiba.</p></body></html> - - Bias Sapma - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Time-Dependent Visual Adaptation for Realistic Image Display</span><br />S.N. Pattanaik, J. Tumblin, H. Yee, and D.P. Greenberg</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Gerçekçi resim gösterimleri için, zaman bağımlı görsel uyarlama</span><br />S.N. Pattanaik, J. Tumblin, H. Yee, ve D.P. Greenberg</p></body></html> - - Multiplier Çoğullayıcı @@ -4391,10 +3873,6 @@ Yerel Ton Eşleme - Cone and Rod based on Luminance - Koni ve Çubuk, Parlaklığı baz almışlardır - - Cone Level Koni Seviyesi @@ -4403,13 +3881,6 @@ Çubuk Seviyesi - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Photographic Tone Reproduction for Digital Images</span><br />E. Reinhard, M. Stark, P. Shirley, and J. Ferwerda</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Dijital Resimler İçin, Fotoğrafsal Ton Artırımı</span><br />E. Reinhard, M. Stark, P. Shirley, ve J. Ferwerda</p></body></html> - - Use Scales Ölçekleri Kullan @@ -4434,21 +3905,10 @@ Yüksek Ölçek - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<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;">Dynamic Range Reduction Inspired by Photoreceptor Physiology</span><br />E. Reinhard and K. Devlin</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><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;">Hareketli Alan Azalması, Işığa Karşı Hassas Olan Alıcı Sinirden Esinlenmiştir. </span><br />E. Reinhard ve K. Devlin</p></body></html> - - Brightness Parlaklık - Ctrl+A - Ctrl+A - - Load an existing text file containing pregamma and TMO settings Ön gama ve TMO ayarlarını içeren bir metin dosyası yükle @@ -4457,10 +3917,6 @@ Beta - &Load... - Yük&le... - - Reinhard '02 Reinhard '02 @@ -4546,11 +4002,11 @@ Luminance Level - + Işık Düzeyi Noise Reduction - + Gürültü Azaltma Chromatic Adaptation @@ -4569,12 +4025,8 @@ Geri yükle - Load parameters by comment - - - ... - + ... Load saved parameters @@ -4657,14 +4109,6 @@ Ton Eşleme - undo - geri al - - - redo - yinele - - TM Database Problem TM Veritabanı Problemi @@ -4680,10 +4124,6 @@ - Error, the tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. - Hata, ton eşleme ayarları dosya biçimi değiştirildi. Bu (eski) dosya, Luminance'nin bu sürümü ile kullanılamaz. Yeni bir tane oluşturun. - - Enter the width of the new size: Yeni genişlik boyutunu girin: @@ -4706,10 +4146,6 @@ Düzeyini Etkinleştir - Version Pre 1.8.4 - Sürüm Pre 1.8.4 - - Auto Cone/Rod Otomatik Koni/Çubuk @@ -4741,163 +4177,52 @@ Set Custom Output Size Özel Çıktı Boyutu Ayarla - - - TonemappingWarningDialog - - Attention! - Dikkat - - Ask again - Tekrar sor + Version 2.3.0 + - 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? - Ton eşleme uygulaması girdi görüntüsünün boyutuna bağlıdır. Bu işlemi tam buyotlu bir görüntüye uygulamak, muhtemelen farklı bir görüntü ile sonuçlanacaktır. - -Devam etmek istiyor musunuz? + Error: The tone mapping settings file format has changed. This (old) file cannot be used with this version of LuminanceHDR. Create a new one. + - TonemappingWindow - - &File - &Dosya - + TonemappingSettings - &View - &Görünüm - - - Tone mapping Panel - Ton haritalama Paneli - - - Tune the histogram for the current LDR - Şu anki LDR için histogramı ayarla - - - Ctrl+S - Ctrl+S - - - C&lose All - Hepsini &Kapat - - - Close All - Hepsini Kapat - - - Close all the LDRs in the workspace - Çalışma alanındaki bütün LDR leri Kapat - - - Ctrl+C - Ctrl+C - - - As &Thumbnails - Minya&tür Olarak - - - As Thumbnails - Minyatür Olarak - - - Images as Thumbnails - Minyatür Şeklindeki Resimler - - - Layout all LDRs as thumbnails. - Bütün LDR leri minyatür olarak düzenle. - - - &Cascade - Ta&şır - - - &Fit to Window - Pencere&ye Uydur - - - Fit the current LDR to its containing window. - Şu anki LDR yi penceresine Uydur. - - - W - W - - - &Help - &Yardım - - - Ctrl+Q - Ctrl+Q - - - Ctrl+T - Ctrl+T - - - &Documentation... - Belgelen&dirme... - - - Ctrl+H - Ctrl+H - - - &Exit - &Çık - - - Exit - Çık - - - Toolbars - Araç Çubukları - - - &Windows - &Pencereler + Load Custom Settings + - &Close - &Kapat + Sort by + - &Normal Size - &Normal Boyut + Comments: + - O - O + Comment + Yorum - Zoom &In - Yaklaşt&ır + Operator + Operator - + - + + Most Useful Operators + - Zoom &Out - &Uzaklaştır + Tonemap + Ton Eşleme - - - - + Load + - Luminance - Luminance + Cancel + @@ -4923,22 +4248,6 @@ Dosyaları listeye ekle - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">From...</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Nereden...</span></p></body></html> - - - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">To...</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Nereye...</span></p></body></html> - - - Keep existing exif tags in destination file - Hedef dosyadaki exif verilerini sakla - - - Help - Yardım - - Select the input images Girdi Resimlerini Seç @@ -4947,10 +4256,6 @@ &Bitti - Log: - Günlük: - - &Show only: &Sadece göster: @@ -4963,34 +4268,10 @@ Sadece Hatalar - &Filter Log messages: - &Süzgeç günlük mesajları: - - Clear filter text Süzgeç metnini temizle - &Start! - &Başla! - - - <!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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">From:</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:'DejaVu 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; font-family:'Sans Serif';"><span style=" font-size:11pt; font-weight:600;">To:</span></p></body></html> - - - Exif operations report Exif işlemleri raporu @@ -5018,6 +4299,18 @@ All Supported formats Desteklenen tüm biçimler + + From + + + + To + + + + Log + Günlük + UMessageBox @@ -5047,4 +4340,19 @@ Daha sonra hatırlat + + UpdateChecker + + A new release is ready for download! + + + + Click to download, or select Help->Update! + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/i18n/lang_zh.ts luminance-hdr-2.3.1/i18n/lang_zh.ts --- luminance-hdr-2.3.0/i18n/lang_zh.ts 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/i18n/lang_zh.ts 2013-04-07 18:41:14.000000000 +0000 @@ -71,49 +71,16 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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-size:9pt;">Please </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">let me know</span></a><span style=" font-size:9pt;">, 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-size:9pt;"><br /></span><span style=" font-size:9pt; 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-size:9pt;"> Giuseppe Rota<br /> </span><a href="mailto:grota@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">grota@users.sourceforge.net</span></a><span style=" font-size:9pt;"><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-size:9pt; 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-size:9pt;"> 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:9pt;"> </span><a href="mailto:fcomida@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"> 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-size:9pt;"> </span><a href="mailto:davideanastasia@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; 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:9pt;"> 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-size:9pt;"> </span><a href="mailto:danielkaneider@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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:9pt; text-decoration: underline; color:#0000ff;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">pfs{tools|calibration|tmo} codebase</span><span style=" font-size:9pt;"><br /> Grzegorz Krawczyk<br /> </span><a href="mailto:krawczyk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">krawczyk@mpi-sb.mpg.de</span></a><span style=" font-size:9pt;"><br /> <br /> Rafal Mantiuk<br /> </span><a href="mailto:mantiuk@mpi-sb.mpg.de"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">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-size:9pt; text-decoration: underline; color:#0000ff;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">G.Ward's Mean Threshold Bitmap (MTB) algorithm </span><span style=" font-size:9pt; color:#000000;"><br /> Nicholas Phillips<br /> </span><a href="ngphillips@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">ngphillips@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Russian translator, usability fixes, user manual, .desktop file</span><span style=" font-size:9pt; color:#000000;"><br /> Alexandre Prokoudine<br /> </span><a href="alexandre.prokoudine@gmail.com"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">alexandre.prokoudine@gmail.com</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Norwegian translator</span><span style=" font-size:9pt; color:#000000;"><br /> Åsmund Ødegård<br /> </span><a href="mandus@users.sourceforge.net"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">mandus@users.sourceforge.net</span></a><span style=" font-size:9pt; color:#000000;"><br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Turkish translato</span><span style=" font-size:9pt; color:#000000;">r<br /> Mustafa GÜNAY<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">French translator</span><span style=" font-size:9pt; color:#000000;"><br /> Cyril Lavier<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Spanish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Alberto Garcia<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">German translator</span><span style=" font-size:9pt; color:#000000;"><br /> Christian Raue<br /><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Czech translator</span><span style=" font-size:9pt; color:#000000;"><br /> Jan Gemela<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Polish translator</span><span style=" font-size:9pt; color:#000000;"><br /> Maciej Dziardziel<br /> <br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">Romanian translator</span><span style=" font-size:9pt; color:#000000;"><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-size:9pt; font-weight:600; color:#000000;">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-size:9pt; color:#000000;"> 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-size:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Slovakian 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-size:9pt; color:#000000;"> Zuzana Cupkova</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:9pt; color:#000000;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600; color:#000000;">Hindi 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-size:9pt; color:#000000;"> Rohit Sharma</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;"><br /></span><span style=" font-size:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><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:9pt; font-weight:600; color:#000000;">FreeBSD patches and maintainers</span><span style=" font-size:9pt; color:#000000;"><br />Joao Rocha Braga Filho, Bertrand Petit and Steffen Beyer<br /></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; } @@ -138,12 +105,22 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">And also</span><span style=" font-size:9pt;"><br /> Erik Ouchterlony<br /> Antoine Latter<br /> Frank Boehme<br /> Sloan Poe<br /> Elizabeth Oldham </span></p></body></html> - + + Changelog + + + + + http://qtpfsgui.git.sourceforge.net/git/gitweb.cgi?p=qtpfsgui/qtpfsgui;a=blob_plain;f=Changelog;hb=refs/heads/master + + + + &License Agreement &许可证和协议 - + <!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; } @@ -156,7 +133,7 @@ <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - + &OK &确定 @@ -175,242 +152,249 @@ - + Select the number of bracketed pictures used to create the HDRs 选择用来生成HDR的分阶段曝光的图片数量 - + Output 导出 - + Output format: 导出格式: - + Choose an HDR output file format 选择HDR导出文件格式 - + hdr hdr - + exr exr - + PFS PFS - + tiff tiff - + Predefined profile: 预定义配置文件: - Choose one of the creation predefined profiles. -See documentation for more informations. - 选择其中一个预定义配置文件. - - - + 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 - + Alignment 对齐 - + Auto align the bracketed pictures 自动对齐分阶段曝光图片 - + Auto-align images 自动对齐图片 - + + Auto-crop + + + + Use Hugin's align_image_stack engine 是用Hugin's align_image_stack引擎 - + Hugin's align_image_stack Hugin's align_image_stack_engine - + Use MTB (Median Threshold Bitmap) engine 阀值位图中位数引擎 - + MTB 阀值位图中位数 - + Progress 进度 - + Folder where created HDRs are saved 存储HDRs文件夹 - - + + Select... 选择... - + Folder where bracketed pictures are located (in alphabetical order) 阶段曝光图片存储文件夹(按字母书序) - + Input folder: 输入文件夹: - + Output folder: 输出文件夹: - + &Cancel &取消 - + &Start &开始 - + &Close &关闭 - + Choose a source directory 选择源目录 - + Choose a output directory 选择输出目录 - - + + + Warning 警告 - + + Total number of pictures must be a multiple of number of bracketed images. 图片总数必须是多个阶段曝光图片的数量. - + The chosen output directory contains HDR files. Those files might be overwritten. Continue? 选择的输出目录包含HDR文件,这些文件可能会被覆盖。继续? - + + Custom config %1 + + + + Started processing... 开始处理... - + Creating HDR... 生成 HDR... - + Completed with errors 完成但有错误 - + Completed without errors 完成且没有错误 - + Error: missing EXIF data 错误:缺失EXIF数据 - + Aligning... 对齐中... - + Written 写入完成 - + Error: 错误: - + Aborting... 终止中... @@ -550,76 +534,111 @@ + Output Format: + + + + + JPEG + JPEG + + + + TIFF (16 bits) + + + + + PNG + PNG + + + + BMP + BMP + + + + PPM + PPM + + + + PBM + PBM + + + Output Folder: 输出文件夹: - + Selec&t... 选&择... - + Conversion Log 转换日志 - + Batch operations report 批处理运行报告 - + &Show only: &仅显示: - + 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 &开始 @@ -629,11 +648,6 @@ 使用%1 线程 - - Saving using file format: %1 - 使用指定文件格式存储: %1 - - @@ -657,36 +671,36 @@ - LuminanceHDR tone mapping settings text file (*.txt) - LuminanceHDR 色调映射设置文本文件 (*.txt) + Luminance HDR tone mapping settings text file (*.txt) + - + Processing... 处理中... - + Start processing... 开始处理中... - + Close 关闭 - + &Done &完成 - + All tasks completed. 所有任务已完成. - + Aborting... 终止... @@ -694,27 +708,27 @@ BatchTMJob - + [T%1] Start processing %2 [T%1] 开始处理中 %2 - + [T%1] Successfully load %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 失败 @@ -722,292 +736,293 @@ CommandLineInterfaceManager - + Error: Alignment engine not recognized. 出错: 无法识别对齐引擎. - + Error: Wrong HDR creation format. 出错: HDR创建格式错误. - + Error: Unknown weight function specified. 出错: 指定的加权函数未知. - + Error: Unknown response curve specified. 出错: 指定的响应曲线未知. - + Error: Unknown HDR creation model specified. 出错: 指定的HDR生成模型未知. - + Error: Unknown HDR creation format specified. 出错:指定的HDR创建格式未知. - + Error: Unknown tone mapping operator specified. 出错: 指定的色调映射操作符未知. - + Error: Wrong tone mapping option format. 出错: 色调映射选项格式错误. - + Error: Unknown tone mapping option specified. 出错: 指定的色调映射选项未知. - + Error: Quality must be in the range [0-100]. 出错: 质量必须在[0-100]范围之内. - + Error: Unknown option %1. 出错: 未知选项 %1. - + Error: Missing argument for %1. 出错: 缺少 %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 specifed on the commandline, bailing out. - 出错: 图片缺少Exif数据以及EV值未在命令行指定. + + -h --help Display this help. + + + + + -v --verbose Print more messages during execution. + + + + + -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). + + + + + -d --savealigned prefix Save aligned images to files which names start with prefix + + + + + -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). + + + + + -c --config HDR creation config. Possible values: + + + + + -l --load HDR_FILE Load an HDR instead of creating a new one. + + + + + -s --save HDR_FILE Save to a HDR file format. (default: don't save) + + + + + -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) + + + + + -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) + + + + + -t --tmo Tone mapping operator. Legal values are: + + + + + -p --tmoptions Tone mapping operator options. Legal values are: + + + + + -o --output LDR_FILE File name you want to save your tone mapped LDR to. + - + + -q --quality VALUE Quality of the saved tone mapped file (0-100). + + + + + (No tonemapping is performed unless -o is specified). + + + + Error: Exif data missing in images and EV values not specified on the commandline, bailing out. - + EV values have been assigned. EV值已被指定. - + 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 - + Tonemapping requested, saving to file %1. 已请求色调映射,正在保存到文件%1. - + ERROR: Cannot save to file: %1 出错:无法保存到文件: %1 - + Failed loading images 载入图片失败 - + Usage: %1 [OPTIONS]... [INPUTFILES]... 使用: %1 [选项]...[输入文件]... - + Commandline interface to %1. 命令行接口到%1. - - -h --help Display this help. - -h --帮助 显示这个帮助. - - - - -v --verbose Print more messages during execution. - -v --冗长 执行过程中打印更多的消息. - - - - -a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment). - -a --对齐AIS|MTB HDR生成过程中使用对齐引擎 (默认:不对其). - - - - -e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES). - -e --ev EV1,EV2,... 指定数值EV值(与输入文件数目相同). - - - - -c --config HDR creation config. Possible values: - -c --配置 HDR生成配置。 可能的值: - - - + weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m 加权=三角化|高斯|plateau:响应曲线=来自文件|线性|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m - + (Default is weight=triangular:response_curve=linear:model=debevec) (Default is weight=triangular:response_curve=linear:model=debevec) - - -l --load HDR_FILE Load an HDR instead of creating a new one. - -l --载入HDR文件 载入HDR而不创建新的HDR. - - - - -s --save HDR_FILE Save to a HDR file format. (default: don't save) - -s --保存 - - - - -g --gamma VALUE Gamma value to use during tone mapping. (default: 1) - -g --gamma值 用于色调映射的gamma值(默认:1) - - - - -r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) - -r --调整图像大小值 HDR要调整到的宽度(在设定gamma值和色调映射前调整大小) - - - - -t --tmo Tone mapping operator. Legal values are: - -t --tmo 色调映射运算符. 合法值是: - - - + ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08 - + (Default is mantiuk06) (默认值为mantiuk06) - - -p --tmoptions Tone mapping operator options. Legal values are: - -p --tmooptions 色调映射运算符选项. 合法值是: - - - + alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal) - + contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06) - + colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - + localcontrast=VALUE:eq=2|4:simple=true|false (for ashikhmin) colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08) - + sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) sigma_s=VALUE:sigma_r=VALUE:base=VALUE (for durand) - + bias=VALUE (for drago) bias=VALUE (for drago) - + local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) local=true|false:autolum=true|false:cone=VALUE:rod=VALUE:multiplier=VALUE (for pattanaik) - + scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02) - + brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05) - + (default is contrast=0.3:equalization=false:saturation=1.8, see also -o) 默认值:对比度=0.3:均衡=false:饱和度=1.8, 同时参见 -o) - - -o --output LDR_FILE File name you want to save your tone mapped LDR to. - -o --输出HDR文件 想要保存色调映射LDR到的文件名. - - - - -q --quality VALUE Quality of the saved tone mapped file (0-100). - -q --质量值 保存的色调映射文件的质量 (0-100). - - - - (No tonemapping is performed unless -o is specified). - (除非已经制定了-o,否则色调映射不会执行). - - - + You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR. 必须要么载入一个已经存在的HDR文件 (通过-l选项)要么指定输入文件来创建一个新的HDR文件. @@ -1059,12 +1074,32 @@ EditingTools - + Pan the image to a region 平移图片到一个区域 - + + Maskable + + + + + Good image + + + + + Ed&itable + 可&编辑 + + + + R&eference + 参&考图片 + + + Choose a directory and a prefix 选择一个目录和前缀 @@ -1122,11 +1157,6 @@ 缩&小 - - Preview &Mode: - 预览&模式: - - Difference (E-P) 差分(E-P) @@ -1152,22 +1182,17 @@ 抗重影蔽光框 - - Mask Color - 蔽光框颜色 - - - + Images List 图片列表 - + Ed&itable 可&编辑 - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1175,44 +1200,44 @@ - + 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. 当前选中列表中的图片可以通过下面的控制上下左右平移。 图片的直方图显示子在上面的小工具窗口中. - + Select the previous image in both lists 在两个列表中同时选择前面的图片 - + Use this button to move the selection to the previous image in both lists. 使用这个按钮移动在两个列表中都选中的之前的图片。 - + Select the next image in both lists 选择下一个都在两个列表中的图片 - + Use this button to move the selection to the next image in both lists. 使用这个按钮移动下一个同时在两个列表选中的图片。 - + R&eference 参&考图片 - + The reference image is the one currently selected 参考图片为当前选中图片 - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1220,72 +1245,57 @@ - + Tools 工具 - + Crop the stack of images after a selection with the left mouse button has been made 左键选中后剪裁堆栈的图片 - + Clicking this button you will be able to crop all the images to the size that you have previously selected with the left mouse button (press and hold the left mouse button and move the pointer to select a crop area, then press this button). 点击这个按钮可以剪裁所有图片到之前使用左键选择的图片的大小(按住鼠标左键,并移动指针到一个剪裁区域,然后按这个按钮). - + &Crop All Images &剪裁所有图像 - + Ctrl+X Ctrl+X - + &Anti Ghosting &消除叠影 - + &Save Images &保存图像 - + Ctrl+S Ctrl+S - - A&dd Mask - &添加蔽光框 - - - - Remove Mas&k - 去除&蔽光框 - - - + Size: 大小: - - pixels - 像素 - - - + &Strength: &强度: - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1295,7 +1305,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1303,7 +1313,7 @@ - + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -1311,103 +1321,162 @@ - + Shift values for editable image 可编辑图像偏移量 - + Reset the shift values for the currently selected movable image 为当前选中可移动图像重新设定偏移量 - + &Reset &重设 - + Reset the shift values for all the images 为所有图像重设偏移量 - + Reset &All 重设&所有 - + &Horizontal: &水平: - + &Vertical: &垂直: - + Insert an horizontal shift value for the currently selected movable image 为当前选定可移动图像插入一个水平偏移量 - - + + + px px - + + &Mode: + + + + + + Brush + + + + + + Lasso + + + + + Mask + + + + + A&dd + + + + + &Remove + &删除 + + + + Lasso - Draw a free hand selection area + + + + + Brush - Paint the mask using the brush + + + + + Save mask + + + + + + ... + ... + + + + Apply saved mask + + + + Insert a vertical shift value for the currently selected movable image 为当前选定可移动图像插入一个垂直偏移量 - + Move up of 1 pixel the currently selected movable image 将当前选中可移动图像向上移动一个像素 - + Move down of 1 pixel the currently selected movable image 将当前选中可移动图像向下移动一个像素 - + Move right of 1 pixel the currently selected movable image 将当前选中可移动图像向右移动一个像素 - + Move left of 1 pixel the currently selected movable image 将当前选中可移动图像向左移动一个像素 - + Histogram 柱状图 - + Get information about the graphical elements 获取图形元素信息 - + &What's this? &这是什么? - + Shift+F1 Shift+F1 - + &Next > &下一个 > - + &Cancel &取消 @@ -1415,7 +1484,7 @@ GenericViewer - + Pan the image to a region 平移图像到一个区域 @@ -1423,18 +1492,18 @@ HdrCreationManager - + The image %1 is an 8 bit format (LDR) while the previous ones are not. 图像%1是一个8比特格式(LDR),而前面的图像不是. - - + + The image %1 has an invalid size. 图像%1大小无效. - + The image %1 is an 16 bit format while the previous ones are not. 图像%1是16比特格式,而前面的不是. @@ -1442,25 +1511,25 @@ HdrInputLoader - - - - + + + + ERROR loading %1 错误载入%1 - + ERROR: The file<br>%1<br> is not a 8 bit or 16 bit tiff. 错误: 文件<br>%1<br>既不是8比特tiff也不是16比特tiff. - + ERROR: %1 错误: %1 - + ERROR: Failed Loading file: %1 错误:载入文件:%1失败 @@ -1468,42 +1537,42 @@ 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 - + Logarithmic 对数 @@ -1516,45 +1585,6 @@ HDR生成程序 - - <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</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 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;"></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-size:16pt; font-weight:600;">HDR生成应用程序</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">这个工具可以帮助你综合一组不同曝光度的图像来生成一个 <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR 图像</span></a>. </p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">这组图像必须来自于同一个相机同样的条件下,并且最好使用三脚架.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">这个应用会帮助你经过所有的步骤:导入图像,对齐图像,选择一个配置文件来生成一个HDR.</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">约束:</p> -<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">所有的图像必须是同样的大小</p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">所有的图像必须有同样的颜色深度</p></body></html> - - [1/2] Load Input Images [1/2]载入输入图像 @@ -1607,22 +1637,49 @@ 对齐 - + &Autoalign images &自动对齐图像 - + + Auto-crop + + + + Hugin's align_image_stack Hugin's 图像对齐堆栈 - + + <!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 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;"></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-size:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This assistant will help you through all the steps: importing the images, aligning them, choosing a profile to create an HDR.</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Constraints:</p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same dimension</p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All images must have same color depth</p></body></html> + + + + MTB MTB - + <!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; } @@ -1635,17 +1692,17 @@ <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:12pt; font-weight:600;">开始载入一组不同曝光度的图片</span></p></body></html> - + [2/2] Choose Settings for HDR Creation [2/2]选择HDR生成设置 - + Choose one of the predefined profiles: 选择其中一个预定义配置: - + <!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; } @@ -1658,118 +1715,118 @@ <p style=" margin-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 2 配置 2 - + Profile 3 配置 3 - + Profile 4 配置 4 - + Profile 5 配置 5 - + Profile 6 配置 6 - + Weighting function: 加权函数: - - - + + + Triangular 三角加权 - - + + Response curve: 响应曲线: - - - - + + + + Linear 线性 - + HDR creation model: HDR生成模型: - - - + + + Debevec Debevec - + Anti-ghosting (beta!) 抗鬼影 (测试!) - - - + + + Gamma Gamma - - + + Log 对数 - + Calibration 校准 - + Amount of iterations: 迭代数量: - + Keep it small 保持小量 - + Use this only if the default profiles above do not yield good results 仅当以上默认设置给出效果不好时才使用此选项 - + Use custom configuration 使用自定义配置 - + <!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; } @@ -1782,85 +1839,90 @@ <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:12pt; font-weight:600;">选择一个预定义配置文件或者自定义配置</span></p></body></html> - + [2/2] Choose Custom Configuration [2/2]选择自定义配置文件 - + Weights: 权重: - + Choose confidence function over all the possible pixel values: 对所有可能的像素值选择置信函数: - - + + Gaussian 高斯 - - + + Plateau 平台 - + Response Curve: 响应曲线: - + Predefined response curves: 预定义响应曲线: - + Load response function from file 从文件中加载响应函数 - + Load... 加载... - + Use calibration to find response curve (robertson02 algorithm) 使用校准寻找响应曲线 (robertson02算法) - + Save response function to file: 保存响应函数到文件: - + Save As... 另存为... - + HDR Creation Equation: HDR生成方程: - + Choose model: 选择模型: - - + + Robertson Robertson - + + Save Settings + + + + <!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; } @@ -1873,207 +1935,210 @@ <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:12pt; font-weight:600;">在这你可以自定义HDR生成过程</span></p></body></html> - - + + &Next > &下一步 > - + &Cancel &取消 - + Image Filename 图片文件名 - + Exposure 曝光 - + + Custom config %1 + + + + 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 选择输入图像 - + Loading... 加载中... - - + + Start loading a set of images with different exposure 开始加载一系列不同曝光度图像 - + <center><font color="#008400"><h3><b>Images Loaded.</b></h3></font></center> <center><font color="#008400"><h3><b>图像加载完毕.</b></h3></font></center> - - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags + + <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR was not able to find the relevant <i>EXIF</i> tags for the following images: - <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. - <font color="#FF0000"><h3><b>WARNING:</b></h3></font> Luminance HDR无法为下面的图像找到相关的 <i>EXIF</i> 标签 -: - <ul> %1</ul> <hr>你任然可以生成一个HDR文件。但是为了如此你必须插入 <b>以手动方式</b> EV (曝光度) 或者停止不同的值. <hr>如果你希望 Luminance HDR 来做这个 <b>已自动方式</b>, 你载入的图像必须至少有以下的exif数据: <ul><li>快门速度 (秒)</li> <li>光圈 (f-数值)</li></ul> <hr><b>提示:</b> 丢失 EXIF 数据 通常在预处理图片时出现.<br> 你可以在两组图片组间进行一次 <b>一对一 exif 数据复制</b> 通过 <i><b>"工具->复制 Exif 数据..."</b></i> 菜单项. + <ul> %1</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>Shutter Speed (seconds)</li> <li>Aperture (f-number)</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 <i><b>"Tools->Copy Exif Data..."</b></i> menu item. + - + EXIF data not found 未找到EXIF数据 - - + + <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> - + Loading Error: 载入错误: - + Unknown 未知 - - - - + + + + Error... 错误... - + align_image_stack failed to align images. 对其图像堆栈对齐图像失败. - + 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 现在点击下一步按钮 - - - + + + &Finish &完成 - + Aligning... 对齐中... - - + + Processing... 处理中... - + Load a camera response curve file 载入一个相机响应曲线文件 - - + + Camera response curve (*.m);;All Files (*) 相机响应曲线 (*.m);;所有文件 (*) - + Save a camera response curve file 保存相机响应曲线文件 - + Weights: 权重: - + - Response curve: -响应曲线: - + - Model: -模型: - + Logarithmic 对数 - + From Calibration 来自于校准 - - From File - 来自于文件 + + From File: + - + <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> @@ -2092,7 +2157,7 @@ - + &Print... &打印... @@ -2103,7 +2168,7 @@ - + &Find... &查找... @@ -2124,110 +2189,110 @@ - + &Delete &删除 - + D&elete All &删除所有 - + Help SideBar 帮助侧边栏 - + LuminanceHDR Online Help LuminanceHDR 在线帮助 - + &File &文件 - + &Edit &编辑 - + &View &查看 - - + + &Bookmarks &书签 - + &Quit &退出 - + Find &Next 查找&下一个 - + Find &Previous 查找&上一个 - + &Contents &目录 - + &Search &搜索 - + &Add Bookmark &添加书签 - + 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 associated with the protocol? @@ -2292,17 +2357,17 @@ IOWorker - + ERROR: The following file is not readable: %1 错误: 以下文件不可读: %1 - + ERROR: File %1 has unsupported extension. 错误: 文件 %1 还有不支持的扩展名. - + ERROR: Failed loading file: %1 错误: 载入文件失败: %1 @@ -2310,7 +2375,7 @@ ImageQualityDialog - + Unknown 未知 @@ -2318,42 +2383,42 @@ ImgQualityDialog - + Save as 另存为 - + Saved File Quality 保存文件质量 - - Quality: - 质量: + + File size + - - File size: - 文件大小: + + Quality + - + Unknown 未知 - + Ca&lculate 计&算 - + &Save &保存 - + &Cancel &取消 @@ -2361,8 +2426,8 @@ LdrViewer - - + + LDR image [%1 x %2] LDR图像 【%1 *x %2] @@ -2442,7 +2507,7 @@ MainWindow - + Luminance HDR Luminance HDR @@ -2452,789 +2517,791 @@ &工具 - + &Help &帮助 - + &Windows &窗口 - + &View &试图 - + HDR &Histogram HDR &柱状图 - + &Toolbars &工具栏 - + + Preview Panel + + + + &File &文件 - + &Edit &编辑 - + Main Toolbar 主工具栏 - + &New HDR image... &新HDR图像... - + New HDR image 新HDR图像 - - + + Create a new HDR image from a set of LDR or Raw images 从一组LDR或者原始图像中创建一个新的HDR图像 - + Create a new HDR image from a set of JPEG, Raw, or 8/16 bpc TIFF files 从一组JPEG,原始,或者8/16 bpc TIFF 文件中创建一个新的HDR图像 - + Ctrl+N Ctrl+N - + &Open HDR image... &打开HDR 图像... - + Open HDR image 打开HDR图像 - - - + + + Load an existing HDR image file (OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) 载入一个已存在的HDR图像文件(OpenEXR, Radiance RGBE, PFS stream, RAW or TIFF) - + Ctrl+O Ctrl+O - + &Save as... &另存为... - + Save as... 另存为... - - - + + + Save image (HDR or LDR) 保存图像(HDR 或者LDR) - + Ctrl+S Ctrl+S - + &Quit &退出 - - + + Quit Luminance HDR 退出 Luminance HDR - + Exit 退出 - + Ctrl+Q Ctrl+Q - + Rotate c&ounter-clockwise 逆时针&旋转 - + Rotate counter-clockwise 逆时针旋转 - - - + + + Rotate counter-clockwise the HDR image 逆时针旋转HDR图像 - + < < - + Rotate c&lockwise 顺时针&旋转 - + Rotate clockwise 顺时针旋转 - - - + + + Rotate clockwise the HDR image 顺时针旋转HDR图像 - + > > - + Low Dynamic Range 低动态范围 - - + + L L - + Fit to Dynamic Range 适合动态范围 - + Fit to dynamic range 适合动态范围 - + \ \ - + Shrink Dynamic Range 缩小动态范围 - + [ [ - + Extend Dynamic Range 拉伸动态范围 - + ] ] - + Decrease Exposure 减少曝光 - + 0 0 - + &Increase Exposure &增加曝光 - + 9 9 - + &Contents... &目录... - + About... 关于... - - - + + + Open user manual for Luminance HDR 打开 Luminance HDR用户手册 - + F1 F1 - + &Normal Size &正常大小 - + Normal size 正常大小 - - - + + + View HDR image at its normal size 查看正常大小HDR图像 - + O O - + Zoom &In 放&大 - - - + + + Zoom in 放大 - + + + - + Zoom &Out 缩&小 - - - + + + Zoom out 缩小 - + - - - + &Fit in Window &适合窗口 - - + + Fit in Window 适合窗口 - - + + Make the HDR image fit its window 使HDR图像适合窗口 - + W W - + &Preferences... &偏好... - + Luminance Options Luminance选项 - - - + + + Set various options of Luminance 设置不同Luminance选项 - + Ctrl+P Ctrl+P - + &Resize... &调整大小... - + Resize the HDR image 调整HDR图像大小 - - - + + + Change size of the HDR image 改变HDR图像大小 - + Ctrl+R Ctrl+R - + Copy &Exif Data... 复制&Exif数据... - + Copy Exif Data 复制Exif数据 - - - + + + Copy Exif data between two sets of files 在两组文件间复制Exif数据 - + Ctrl+E Ctrl+E - - &Align Images... - &对齐图像... + + Show on the right + - - - - WORK IN PROGRESS - 工作进行中 + + Show on the bottom + + + + + Realtime Previews + - + + Update + + + + &About Qt &关于Qt - + Show information about Qt 显示关于Qt的信息 - - + + Show information about Qt library that is used by Luminance 显示Luminance使用的Qt库信息 - - &Tile - &Tile - - - - &Cascade - &级联 - - - - - Cascade - 级联 - - - - Toolbars - 工具条 - - - + Text &under Icons 图标下&文字 - + &Icons Only &仅图标 - + &Text Only &仅文字 - + Text &Alongside Icons 图标旁&文字 - + &Batch Tone Mapping... &批处理色调映射... - + Convert multiple HDR images to LDR 转换多个HDR图像为LDR - - + + Convert multiple HDR images to LDR using existing settings files 使用已有设置文件转换多个HDR图像为LDR - + Ctrl+B Ctrl+B - + &What's This? &这是什么? - - + + Get verbose information about user interface elements 获取关于用户界面元素的详细信息 - + Shift+F1 Shift+F1 - + About &Luminance HDR 关于&Luminance HDR - + Show information about Luminance HDR 显示关于Luminance HDR信息 - - + + Show information about Luminance HDR, its authors and contributors 显示关于Luminance HDR信息,作者和贡献者 - + Save HDR image &preview... 保存HDR图像&并预览... - - - + + + Save the current HDR Preview to an LDR file 保存当前HDR预览到一个LDR文件 - + &Projective Transformation... &投影变换... - - - + + + Apply projective transformation to the current HDR image 应用投影转换到当前HDR图像 - + &Crop to Selection &裁剪到选择 - + Crop to Selection 裁剪到选择 - - + + Crop the image to selection rectangle 裁剪图像到已选择矩形 - + Click and drag inside image area to create a selection, then use this button to crop to a new HDR image 点击并拖拽内部图像区域来创建一个选择区域,然后使用这个按钮裁剪到一个新的HDR图像 - + Remove &Selection 删除&选择 - + Remove selection rectangle 删除选择矩形 - - + + Remove selection rectangle from image area 从图像区域删除选择矩形 - + Make a &Donation 请捐&款 - + Ctrl+D Ctrl+D - + Lock Viewers 锁定查看器 - + Synchronize viewers mode (fit, fill or 1:1). - Syncronize viewers mode (fit, fill or 1:1). - 同步查看器模式(适合,填充或者1:1). - - - + Lock the images for sync view 为同步查看锁定图像 - + Minimize 最小化 - + Maximize 最大化 - + Bring All to Front 前置全部 - + Show Preview Panel 显示预览面板 - + Show/Hide Preview Panel 显示/因此预览面板 - + Ctrl+V Ctrl+V - + Adjust &Levels 调整&色阶 - - + + Adjust Levels 调整色阶 - - + + Tune the histogram for the current LDR 调整当前LDR直方图 - + Ctrl+L Ctrl+L - + Save All 保存全部 - - + + Save All LDR files 保存全部HDR文件 - + Remove Tab 删除标签 - + Ctrl+W Ctrl+W - + Fill Window 填充窗口 - + Fill window with the current viewer 用当前查看器填充窗口 - + Batch HDR... 批处理HDR... - + Ctrl+H Ctrl+H - + Soft Proofing 软打样 - + Gamut Check 域检查 - + Ready. Now open an existing HDR image or create a new one! 已准备好.现在打开一个现有的HDR图像或创建一个新的! - + All HDR formats 所有HDR格式 - + Load one or more HDR images... 载入一个或者多个HDR图像... - + Save files in 保存文件在 - + Failed to save 保存失败 - + Done! 完成! - + Aborting... 终止... - + Cropped Image 剪裁的图像 - + 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. + +Do you want to continue? + 色调映射运算符取决于输入图像的大小. 在整个图像上应用这个运算符很可能生成一个不一样的图像。 + +你想继续吗? + + + Untitled 无名 - + Untitled %1 无名 %1 - + Error: %1 错误:%1 @@ -3282,194 +3349,103 @@ 语言 - Czech - 捷克语 - - - English - 英语 - - - Finnish - 芬兰语 - - - French - 法语 - - - German - 德语 - - - Indonesian - 印度尼西亚语 - - - Italian - 意大利语 - - - Polish - 波兰语 - - - Romanian - 罗马尼亚语 - - - Russian - 俄语 - - - Spanish - 西班牙语 - - - Turkish - 土耳其语 - - - Hungarian - 匈牙利语 - - - Chinese - 中文 - - - Hindi - 北印度语 - - - + Default Previews Width 默认前一个宽度 - + px px - + + Saves the settings along the program files, to be portable + + + + + Portable mode + + + + Always show Preview Panel 总显示预览面板 - + Always show Wizard first page 总在第一页显示奇才应用程序 - + HDR TIFF Default File Format HDR TIFF默认文件格式 - + Good quality and smaller file size 高质量和更小的文件大小 - + LogLuv TIFF (float, 16bit per color channel) LogLuv TIFF(浮动, 每个颜色通道16比特) - + Better quality, larger file size, better compatibility with other applications 更好的质量,更大的文件,与其他应用程序更好的兼容性 - + Float TIFF (float, 32bit per color channel) 浮动TIFF(浮动,每个色彩通道32比特) - + Show negative numbers as: 显示负数为: - + Show nan and +/-Inf values as: 显示非数值和+/-无穷值为: - + Temporary Working Folder 临时工作文件夹 - + &Browse... - &浏览... - - - - - Which LDR image format to save to - 保存为哪一个LDR图像格式 - - - - Batch Tonemapping Default Output Format - 批处理色调映射默认输出格式 - - - - JPEG - JPEG - - - - PNG - PNG - - - - PPM - PPM - - - - PBM - PBM - - - - BMP - BMP - - - - TIFF - TIFF + &浏览... - - + + Amount of threads to use on multicore/SMP machines 在多核/多线程机器上使用的线程数量 - + Batch Tonemapping Number of Threads 批处理色调映射线程数量 - + General 通用 - + Quality: 质量: - + <!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; } @@ -3492,49 +3468,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-weight:600;">AHD</span>: use Adaptive Homogeneity-Directed interpolation. This method selects the direction of interpolation so as to maximize a homogeneity metric, thus typically minimizing color artifacts.</p></body></html> - + Bilinear 双线性 - + VNG VNG - + PPG PPG - + AHD AHD - - - - - - - - - - - - - + + + + + + + + + + + + + ... ... - + Median: 中位数: - + <!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; } @@ -3549,7 +3525,7 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set here the passes used by median filter applied after interpolation to Red-Green and Blue-Green channels.</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; } @@ -3564,12 +3540,12 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For Fuji Super CCD cameras, show the image tilted 45 degrees. For cameras with non-square pixels, do not stretch the image to its correct aspect ratio. In any case, this option guarantees that each output pixel corresponds to one RAW pixel.</p></body></html> - + Do not stretch or rotate pixels 不要拉伸或者旋转像素 - + <!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; } @@ -3586,22 +3562,22 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To resume, this option blurs the image a little, but it eliminates false 2x2 mesh patterns with VNG quality method or mazes with AHD quality method.</p></body></html> - + Interpolate RGB using 4 colours 使用四种颜色差值RGB - + White Balance 白平衡 - + Method 方法 - + <!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; } @@ -3624,33 +3600,33 @@ <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;">Manual</span>: Set a custom temperature and green level values</p></body></html> - + Predefined D65 预定义的D65 - - + + Camera 摄像头 - + Auto 自动 - + Manual 手动 - + Temperature (Kelvin) 温度(开尔文) - + <!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; } @@ -3665,22 +3641,22 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set here the color temperature in Kelvin.</p></body></html> - + Green 绿色 - + Set here the green component to set magenta color cast removal level 在这里设置绿色成分来设置洋红色色偏去除水平 - + Highlights 突出强调 - + <!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; } @@ -3703,32 +3679,32 @@ <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> - + Solid White 纯白 - + Do not transform 不要变换 - + Blend 混合 - + Reconstruct 重建 - + Level 水平 - + <!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; } @@ -3743,22 +3719,22 @@ <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> - + Correct false colors in highlights 更正突出标注的错误颜色 - + Auto Brightness 自动亮度 - + Brightness 亮度 - + <!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; } @@ -3773,7 +3749,7 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specify the brightness level of output image. The default value is 1.0</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; } @@ -3788,12 +3764,12 @@ <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> - + Black 黑色 - + <!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; } @@ -3808,7 +3784,7 @@ <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; } @@ -3823,12 +3799,12 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Use a specific white point value to decode RAW pictures. If you set this option to off, the White Point value will be automatically computed.</p></body></html> - + Saturation 饱和度 - + <!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; } @@ -3843,12 +3819,12 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Specify specific white point value of the output image.</p></body></html> - + NR and CA Correction NR和CA矫正 - + <!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; } @@ -3863,12 +3839,12 @@ <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> - + Enable noise reduction 启用降噪 - + <!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; } @@ -3883,12 +3859,12 @@ <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> - + Threshold: 阀值: - + <!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; } @@ -3903,12 +3879,12 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Enlarge the raw red and blue layers by the given factors, typically 0.999 to 1.001, to correct chromatic aberration.</p></body></html> - + Enable Chromatic Aberration correction 启用色差矫正 - + <!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; } @@ -3923,7 +3899,7 @@ <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; } @@ -3938,86 +3914,54 @@ <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> - + Red Component 红色分量 - + Blue Component 蓝色分量 - + Monitor 监视器 - + Monitor Profile 监视器配置文件 - - - + + + Browse... 浏览... - + Camera 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; } -</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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</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;">Camera Profile</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 input color space used to decode RAW data.</p> -<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;">None</span>: no input color profile is used during RAW decoding.</p> -<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;">Embedded</span>: use embedded color profile from RAW file if exist.</p> -<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;">Custom</span>: use a custom input color space profile.</p></body></html> - - - None - - - - Built in - 内置 - - - Custom - 自定义 - - - + Printer 打印机 - + Printer profile 打印机配置文件 - + align_image_stack command line arguments 图像对齐堆栈命令行参数 - + <!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; } @@ -4030,94 +3974,55 @@ <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Read </span><span style=" font-family:'Sans Serif'; font-style:italic;">Help &gt; Contents &gt; Setting up Luminance &gt; External tools</span><span style=" font-family:'Sans Serif';"> to find out more about align_image_stack command line arguments</span></p></body></html> - + &Cancel &取消 - + &OK &确定 - + + Restart + + + + + For the settings to take effect, please restart the application! + + + + Choose a directory 选择一个目录 - - - + + + Open ICC Profile 打开ICC配置文件 - + Color profile (*.icc *.ICC *.icm *.ICM) - - + + Color profile (*.icc) 颜色配置文件 (*.icc) - PreviewPanel - - Form - Form - - - - Preview - 预览 - - - - Mantiuk '06 - Mantiuk '06 - - - - Mantiuk '08 - Mantiuk '08 - - - - Fattal - Fattal - - - - Drago - Drago - - - - Durand - Durand - + PreviewSettings - - Reinhard '02 - Reinhard '02 - - - - Reinhard '05 - Reinhard '05 - - - - Ashikhmin - Ashikhmin - - - - Pattanaik - Pattanaik + + Load settings + @@ -4223,17 +4128,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: 错误: 无法解析色调映射文件: @@ -4241,149 +4146,307 @@ QObject - - + + Error Opening RAW File 打开RAW文件错误 - + Error Unpacking RAW File RAW文件解包错误 - + Error Processing RAW File 处理RAW文件错误 - + Memory Error in processing RAW File 处理RAW文件内存错误 - + Error Creating PFS Frame 创建PFS框架错误 - + Cannot convert %1 to a float 无法转换 %1 为浮点数 - + Cannot convert %1 to an integer 无法转换 %1 为整数 - + Input file %1 输入文件 %1 - + Running in HDR-creation mode. HDR生成模式运行. - + Running in Load-HDR mode. 载入HDR模式运行. - + Temporary directory: %1 临时目录: %1 - + Using %1 threads. 正在使用%1线程. - + Loading file %1 载入文件%1 - + Successfully loaded file %1. 成功载入文件%1. - - Aborting... - 终止... - - - - Cannot find Qt's JPEG Plugin...<br>Please unzip the DLL package with the option "use folder names" activated. - 无法找到Qt的JPEG插件...<br>请解压缩DLL包通过激活"使用文件夹名字"选项. - - - + All LDR formats 所有LDR格式 - + Save the LDR image as... LDR图像另存为... - + All HDR formats 所有的HDR格式 - + Save the HDR image as... HDR图像另存为... - + Save as... 另存为... - + Option -v -a... 选项 -v -a... - + LuminanceHDR requires align_image_stack to be executed with the "-v -a aligned_" options. Command line options have been corrected. LuminanceHDR要求与"-v -a aligned_"选项一起执行图像对齐堆栈。命令行选项已更正. - - - - + + + + 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. 我无法执行颜色转换。请选择一个不同的监视器配置文件. + + + PreGamma=%1 + + + + + Contrast Equalization + 对比均衡 + + + + Contrast + + + + + + Saturation + 饱和度 + + + + Detail + + + + + Luminance Level + 亮度水平 + + + + Luminance Level=Auto + + + + + Color Saturation + + + + + Contrast Enhancement + 对比度加强 + + + + Alpha + Alpha + + + + Beta + Beta + + + + NoiseRedux + + + + + FFTSolver + + + + + 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 + + ResizeDialog @@ -4696,6 +4759,14 @@ + TiffModeDialog + + + Save as ...TIFF + + + + TonemappingPanel @@ -4866,10 +4937,6 @@ 降噪 - Version Pre 1.8.4 - 版本 Pre 1.8.4 - - Version 2.3.0 @@ -5066,170 +5133,179 @@ - - + ... ... - + Load saved parameters 加载已保存的参数 - - Load parameters by comment - 通过批注载入参数 - - - + Here you can apply a gamma correction to the HDR.<br>The gamma correction will applied before tone mapping. 这里你可以对HDR应用一次gamma更正.<br>gamma更正将在色调映射之前应用. - + Process 处理 - + &Result Size &结果大小 - - + + Gamma applied before tonemapping 色调映射之前应用Gamma - + Pre-gamma Pre-gamma - + Restore pregamma's default value (1) 恢复pregamma的默认值 (1) - + Size of the resulting LDR image 结果LDR图像大小 - + Here you can choose the size of the resulting LDR image. 这里你可以选择最后LDR图像的大小. - + 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)后会自动计算高度值,并且新的大小会被添加到清单中. - + 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: 输入新大小的宽度: - TonemappingWarningDialog + TonemappingSettings - Attention! - 注意! + + Load Custom Settings + - Ask again - 再次询问 + + Sort by + - 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? - 色调映射运算符取决于输入图像的大小. 在整个图像上应用这个运算符很可能生成一个不一样的图像。 - -你想继续吗? + + Comments: + - - Fattal Warning - Fattal 警告 + + Comment + 评论 - - 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? - 色调映射运算符取决于输入图像的大小. 在整个图像上应用这个运算符很可能生成一个不一样的图像。 - -你想继续吗? + + Operator + 运算符 + + + + Most Useful Operators + + + + + Tonemap + 色调映射 + + + + Load + + + + + Cancel + @@ -5381,4 +5457,22 @@ 过后再提醒我 + + UpdateChecker + + + A new release is ready for download! + + + + + Click to download, or select Help->Update! + + + + + Do you want to open the webpage for download now? + + + diff -Nru luminance-hdr-2.3.0/icons.qrc luminance-hdr-2.3.1/icons.qrc --- luminance-hdr-2.3.0/icons.qrc 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/icons.qrc 2013-04-07 18:41:14.000000000 +0000 @@ -1,5 +1,7 @@ + images/vcs-update-required.png + images/flags/DK.PNG images/button_add.png images/button_del.png images/raw.png @@ -67,6 +69,24 @@ images/vcs_add.png images/vcs_commit.png images/vcs_update.png + images/gimp-lasso.png + images/brush_icon.png + images/flags/CHIN0001.PNG + images/flags/CZEC0001.PNG + images/flags/FINL0001.PNG + images/flags/FRAN0001.PNG + images/flags/GERM0001.PNG + images/flags/HUNG0001.PNG + images/flags/INDA0001.PNG + images/flags/INDN0001.PNG + images/flags/ITAL0001.PNG + images/flags/POLA0001.PNG + images/flags/RMNA0001.PNG + images/flags/RUSS0001.PNG + images/flags/SPAN0001.PNG + images/flags/TURK0001.PNG + images/flags/UNKG0001.PNG + images/flags/SVKA0001.PNG icons/help/document-print.png @@ -88,22 +108,4 @@ images/camera_on_tripod.png images/stack.png - - images/CHIN0001.PNG - images/CZEC0001.PNG - images/FINL0001.PNG - images/FRAN0001.PNG - images/GERM0001.PNG - images/HUNG0001.PNG - images/INDA0001.PNG - images/INDN0001.PNG - images/ITAL0001.PNG - images/POLA0001.PNG - images/RMNA0001.PNG - images/RUSS0001.PNG - images/SPAN0001.PNG - images/TURK0001.PNG - images/UNKG0001.PNG - images/SVKA0001.PNG - Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/CHIN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/CHIN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/CZEC0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/CZEC0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/FINL0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/FINL0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/FRAN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/FRAN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/GERM0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/GERM0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/HUNG0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/HUNG0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/INDA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/INDA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/INDN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/INDN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/ITAL0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/ITAL0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/POLA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/POLA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/RMNA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/RMNA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/RUSS0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/RUSS0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/SPAN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/SPAN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/SVKA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/SVKA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/TURK0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/TURK0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/UNKG0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/UNKG0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/brush_icon.png and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/brush_icon.png differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/CHIN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/CHIN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/CZEC0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/CZEC0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/DK.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/DK.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/FINL0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/FINL0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/FRAN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/FRAN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/GERM0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/GERM0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/HUNG0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/HUNG0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/INDA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/INDA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/INDN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/INDN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/ITAL0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/ITAL0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/POLA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/POLA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/RMNA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/RMNA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/RUSS0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/RUSS0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/SPAN0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/SPAN0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/SVKA0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/SVKA0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/TURK0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/TURK0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/flags/UNKG0001.PNG and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/flags/UNKG0001.PNG differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/gimp-lasso.png and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/gimp-lasso.png differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/luminance.icns and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/luminance.icns differ Binary files /tmp/QDc5ndBg35/luminance-hdr-2.3.0/images/vcs-update-required.png and /tmp/2IRUcl_1Ob/luminance-hdr-2.3.1/images/vcs-update-required.png differ diff -Nru luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.cpp luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.cpp --- luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -27,353 +27,435 @@ #include #include #include +#include +#include +#include +#include + +#include + +#include #include "arch/math.h" #include "BatchHDR/BatchHDRDialog.h" #include "ui_BatchHDRDialog.h" #include "Libpfs/pfs.h" -#include "Libpfs/domio.h" #include "Core/IOWorker.h" -#include "HdrCreation/HdrCreationManager.h" #include "OsIntegration/osintegration.h" BatchHDRDialog::BatchHDRDialog(QWidget *p): QDialog(p), - m_Ui(new Ui::BatchHDRDialog), - m_numProcessed(0), - m_processed(0), - m_errors(false), - m_loading_error(false), - m_abort(false), - m_processing(false) -{ - m_Ui->setupUi(this); - - m_Ui->closeButton->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_hdrCreationManager, SIGNAL(finishedLoadingInputFiles(QStringList)), this, SLOT(align(QStringList))); - 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(processed()), this, SLOT(processed())); - - m_tempDir = m_luminance_options.getTempDir(); - m_batchHdrInputDir = m_luminance_options.getBatchHdrPathInput(""); - m_batchHdrOutputDir = m_luminance_options.getBatchHdrPathOutput(""); - - m_Ui->inputLineEdit->setText(m_batchHdrInputDir); - m_Ui->outputLineEdit->setText(m_batchHdrOutputDir); - check_start_button(); + 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_Ui->setupUi(this); + + m_Ui->closeButton->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_hdrCreationManager, SIGNAL(finishedLoadingInputFiles(QStringList)), this, SLOT(align(QStringList))); + 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(processed()), this, SLOT(processed())); + + m_tempDir = m_luminance_options.getTempDir(); + m_batchHdrInputDir = m_luminance_options.getBatchHdrPathInput(""); + m_batchHdrOutputDir = m_luminance_options.getBatchHdrPathOutput(""); + + 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(); + config_triple 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); + } + check_start_button(); } BatchHDRDialog::~BatchHDRDialog() { - qDebug() << "BatchHDRDialog::~BatchHDRDialog()"; - QStringList fnames = m_hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) { - QString fname = m_hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - - QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - - thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } - m_hdrCreationManager->reset(); - delete m_hdrCreationManager; - delete m_IO_Worker; + qDebug() << "BatchHDRDialog::~BatchHDRDialog()"; + QStringList fnames = m_hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) { + QString fname = m_hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + + QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + + thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } + m_hdrCreationManager->reset(); + delete m_hdrCreationManager; + delete m_IO_Worker; } void BatchHDRDialog::num_bracketed_changed(int value) { - qDebug() << "BatchHDRDialog::num_bracketed_changed " << value; - m_Ui->autoAlignCheckBox->setEnabled(value > 1); - m_Ui->aisRadioButton->setEnabled(value > 1); - m_Ui->MTBRadioButton->setEnabled(value > 1); + 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); } 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, - // update the settings - if (m_batchHdrInputDir != m_Ui->inputLineEdit->text()) - { - m_batchHdrInputDir = m_Ui->inputLineEdit->text(); - m_luminance_options.setBatchHdrPathInput(m_batchHdrInputDir); - } - - // defaulting the same output folder as the input folder - if (m_Ui->outputLineEdit->text().isEmpty()) - add_output_directory(m_Ui->inputLineEdit->text()); - } - check_start_button(); - } + 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, + // update the settings + if (m_batchHdrInputDir != m_Ui->inputLineEdit->text()) + { + m_batchHdrInputDir = m_Ui->inputLineEdit->text(); + m_luminance_options.setBatchHdrPathInput(m_batchHdrInputDir); + } + + // defaulting the same output folder as the input folder + if (m_Ui->outputLineEdit->text().isEmpty()) + add_output_directory(m_Ui->inputLineEdit->text()); + } + check_start_button(); + } } void BatchHDRDialog::on_selectOutputFolder_clicked() { - add_output_directory(); + 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()) - { - 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, - // update the settings - if (m_batchHdrOutputDir != m_Ui->outputLineEdit->text() && dir.isEmpty()) - { - m_batchHdrOutputDir = m_Ui->outputLineEdit->text(); - m_luminance_options.setBatchHdrPathOutput(m_batchHdrOutputDir); - } - check_start_button(); - } + 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, + // update the settings + if (m_batchHdrOutputDir != m_Ui->outputLineEdit->text() && dir.isEmpty()) + { + m_batchHdrOutputDir = m_Ui->outputLineEdit->text(); + m_luminance_options.setBatchHdrPathOutput(m_batchHdrOutputDir); + } + check_start_button(); + } } void BatchHDRDialog::on_startButton_clicked() { - if (m_Ui->inputLineEdit->text().isEmpty() || m_Ui->outputLineEdit->text().isEmpty()) - return; + if (m_Ui->inputLineEdit->text().isEmpty() || m_Ui->outputLineEdit->text().isEmpty()) + 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); - return; - } - - // check for empty output-folder - bool foundHDR = false; - QDir chosendir(m_batchHdrOutputDir); - chosendir.setFilter(QDir::Files); - QStringList files = chosendir.entryList(); - - bool doStart = true; - if (!files.empty()) { - foreach(QString file, files) { - if (file.startsWith("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); - } - - // 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 (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->groupBox->setEnabled(false); - m_Ui->startButton->setEnabled(false); - m_total = m_bracketed.count() / m_Ui->spinBox->value(); - m_Ui->progressBar->setMaximum(m_total); - m_Ui->textEdit->append(tr("Started processing...")); - // mouse pointer to busy - QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); - batch_hdr(); - } + // check for empty output-folder + bool foundHDR = false; + QDir chosendir(m_batchHdrOutputDir); + chosendir.setFilter(QDir::Files); + QStringList files = chosendir.entryList(); + + bool doStart = true; + if (!files.empty()) { + foreach(QString file, files) { + if (file.startsWith("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); + } + + // 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); + 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); + 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->groupBox->setEnabled(false); + m_Ui->startButton->setEnabled(false); + m_total = m_bracketed.count() / m_Ui->spinBox->value(); + m_Ui->progressBar->setMaximum(m_total); + m_Ui->textEdit->append(tr("Started processing...")); + // mouse pointer to busy + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); + batch_hdr(); + } } void BatchHDRDialog::batch_hdr() { - m_processing = true; + m_processing = true; - if (m_abort) { - qDebug() << "Aborted"; - QApplication::restoreOverrideCursor(); - m_hdrCreationManager->reset(); - this->reject(); - } - if (!m_bracketed.isEmpty()) - { - m_Ui->textEdit->append(tr("Creating HDR...")); - m_numProcessed++; - QStringList toProcess; - for (int i = 0; i < m_Ui->spinBox->value(); ++i) - { - toProcess << m_bracketed.takeFirst(); - } - qDebug() << "BatchHDRDialog::batch_hdr() Files to process: " << toProcess; - m_hdrCreationManager->setFileList(toProcess); - m_hdrCreationManager->loadInputFiles(); - } - else - { - m_Ui->closeButton->show(); - m_Ui->cancelButton->hide(); - m_Ui->startButton->hide(); - m_Ui->progressBar->hide(); - OsIntegration::getInstance().setProgress(-1); - QApplication::restoreOverrideCursor(); - if (m_errors) - m_Ui->textEdit->append(tr("Completed with errors")); - else - m_Ui->textEdit->append(tr("Completed without errors")); - } + if (m_abort) { + qDebug() << "Aborted"; + QApplication::restoreOverrideCursor(); + m_hdrCreationManager->reset(); + this->reject(); + } + if (!m_bracketed.isEmpty()) + { + m_Ui->textEdit->append(tr("Creating HDR...")); + m_numProcessed++; + QStringList toProcess; + for (int i = 0; i < m_Ui->spinBox->value(); ++i) + { + toProcess << m_bracketed.takeFirst(); + } + qDebug() << "BatchHDRDialog::batch_hdr() Files to process: " << toProcess; + m_hdrCreationManager->setFileList(toProcess); + m_hdrCreationManager->loadInputFiles(); + } + else + { + m_Ui->closeButton->show(); + m_Ui->cancelButton->hide(); + m_Ui->startButton->hide(); + m_Ui->progressBar->hide(); + OsIntegration::getInstance().setProgress(-1); + QApplication::restoreOverrideCursor(); + if (m_errors) + m_Ui->textEdit->append(tr("Completed with errors")); + else + m_Ui->textEdit->append(tr("Completed without errors")); + } } void BatchHDRDialog::align(QStringList filesLackingExif) { - if (!filesLackingExif.isEmpty()) - { - qDebug() << "BatchHDRDialog::align Error: missing EXIF data"; - m_Ui->textEdit->append(tr("Error: missing EXIF data")); - foreach (QString fname, filesLackingExif) - m_Ui->textEdit->append(fname); - m_errors = true; - QStringList fnames = m_hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) { - QString fname = m_hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } - m_hdrCreationManager->reset(); - batch_hdr(); - return; - } - if (m_Ui->autoAlignCheckBox->isChecked()) - { - m_Ui->textEdit->append(tr("Aligning...")); - if (m_Ui->aisRadioButton->isChecked()) - m_hdrCreationManager->align_with_ais(); - else - m_hdrCreationManager->align_with_mtb(); - } - else - create_hdr(0); + if (!filesLackingExif.isEmpty()) + { + qDebug() << "BatchHDRDialog::align Error: missing EXIF data"; + m_Ui->textEdit->append(tr("Error: missing EXIF data")); + foreach (QString fname, filesLackingExif) + m_Ui->textEdit->append(fname); + m_errors = true; + QStringList fnames = m_hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) { + QString fname = m_hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } + m_hdrCreationManager->reset(); + batch_hdr(); + return; + } + if (m_Ui->autoAlignCheckBox->isChecked()) + { + m_Ui->textEdit->append(tr("Aligning...")); + if (m_Ui->aisRadioButton->isChecked()) + { + m_hdrCreationManager->set_ais_crop_flag(m_Ui->autoCropCheckBox->isChecked()); + m_hdrCreationManager->align_with_ais(); + } + else + m_hdrCreationManager->align_with_mtb(); + } + else + create_hdr(0); } void BatchHDRDialog::create_hdr(int) { - qDebug() << "BatchHDRDialog::create_hdr()"; - QString suffix = m_Ui->formatComboBox->currentText(); - m_hdrCreationManager->chosen_config = predef_confs[m_Ui->profileComboBox->currentIndex()]; - pfs::Frame* resultHDR = m_hdrCreationManager->createHdr(false, 1); - - 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, outName); - - pfs::DOMIO pfsio; - pfsio.freeFrame(resultHDR); - - QStringList fnames = m_hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) { - QString fname = m_hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } - 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 ); - batch_hdr(); + qDebug() << "BatchHDRDialog::create_hdr()"; + QString suffix = m_Ui->formatComboBox->currentText(); + + int idx = m_Ui->profileComboBox->currentIndex(); + if (idx <= 5) { + m_hdrCreationManager->chosen_config = predef_confs[idx]; + } + else { + m_hdrCreationManager->chosen_config = m_customConfig[idx - 6]; + } + + boost::scoped_ptr resultHDR( m_hdrCreationManager->createHdr(false, 1) ); + + 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); + resultHDR.reset(); + + QStringList fnames = m_hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) { + QString fname = m_hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } + 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 ); + batch_hdr(); } void BatchHDRDialog::error_while_loading(QString message) { - qDebug() << message; - m_Ui->textEdit->append(tr("Error: ") + message); - m_errors = true; - m_loading_error = true; - m_processed++; - QStringList fnames = m_hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) { - QString fname = m_hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } - try_to_continue(); + qDebug() << message; + m_Ui->textEdit->append(tr("Error: ") + message); + m_errors = true; + m_loading_error = true; + m_processed++; + QStringList fnames = m_hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) { + QString fname = m_hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(m_tempDir + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(m_tempDir + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } + try_to_continue(); } void BatchHDRDialog::writeAisData(QByteArray data) { - qDebug() << data; - m_Ui->textEdit->append(data); + qDebug() << data; + m_Ui->textEdit->append(data); } void BatchHDRDialog::check_start_button() { - if (m_Ui->inputLineEdit->text() != "" && m_Ui->outputLineEdit->text() != "") - m_Ui->startButton->setEnabled(true); + if (m_Ui->inputLineEdit->text() != "" && m_Ui->outputLineEdit->text() != "") + m_Ui->startButton->setEnabled(true); } void BatchHDRDialog::on_cancelButton_clicked() { - if (m_processing) { - m_abort = true; - m_Ui->cancelButton->setText(tr("Aborting...")); - m_Ui->cancelButton->setEnabled(false); - } - else - this->reject(); + if (m_processing) { + m_abort = true; + m_Ui->cancelButton->setText(tr("Aborting...")); + m_Ui->cancelButton->setEnabled(false); + } + else + this->reject(); +} + +void BatchHDRDialog::align_selection_clicked() +{ + m_Ui->autoCropCheckBox->setEnabled(m_Ui->aisRadioButton->isChecked()); } void BatchHDRDialog::processed() { - m_processed++; - qDebug() << "BatchHDRDialog::processed() : " << m_processed; - try_to_continue(); + m_processed++; + qDebug() << "BatchHDRDialog::processed() : " << m_processed; + 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; - m_hdrCreationManager->reset(); - batch_hdr(); // try to continue - } - } + if (m_processed == m_Ui->spinBox->value()) { + m_processed = 0; + if (m_loading_error) { + m_loading_error = false; + m_hdrCreationManager->reset(); + batch_hdr(); // try to continue + } + } } + diff -Nru luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.h luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.h --- luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.h 2013-04-07 18:41:14.000000000 +0000 @@ -29,6 +29,7 @@ #include #include "Common/LuminanceOptions.h" +#include "HdrCreation/HdrCreationManager.h" // Forward declaration class IOWorker; @@ -60,6 +61,7 @@ void writeAisData(QByteArray); void check_start_button(); void on_cancelButton_clicked(); + void align_selection_clicked(); void processed(); void try_to_continue(); @@ -81,6 +83,6 @@ bool m_loading_error; bool m_abort; bool m_processing; + QVector m_customConfig; }; - #endif diff -Nru luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.ui luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.ui --- luminance-hdr-2.3.0/src/BatchHDR/BatchHDRDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchHDR/BatchHDRDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -17,7 +17,7 @@ - + @@ -51,6 +51,9 @@ 20 + + 3 + Qt::Horizontal @@ -73,6 +76,9 @@ 20 + + 3 + @@ -90,16 +96,16 @@ Output - - + + QLayout::SetMinimumSize - - + + - Output format: + Predefined profile: @@ -130,13 +136,6 @@ - - - - Predefined profile: - - - @@ -178,6 +177,26 @@ + + + + Output format: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -192,11 +211,11 @@ - - + + - false + true Auto align the bracketed pictures @@ -206,37 +225,47 @@ - - + + - false + true - Use Hugin's align_image_stack engine + Use MTB (Median Threshold Bitmap) engine - Hugin's align_image_stack - - - true + MTB - - + + - false + true - Use MTB (Median Threshold Bitmap) engine + Use Hugin's align_image_stack engine - MTB + Hugin's align_image_stack + + + true + + + + true + + + Auto-crop + + + diff -Nru luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.cpp luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.cpp --- luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -90,13 +90,13 @@ 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; add_log_message(tr("Using %1 thread(s)").arg(m_max_num_threads)); - add_log_message(tr("Saving using file format: %1").arg(m_luminance_options.getBatchTmLdrFormat())); + //add_log_message(tr("Saving using file format: %1").arg(m_Ui->comboBoxFormat->currentText())); } BatchTMDialog::~BatchTMDialog() @@ -172,7 +172,7 @@ QStringList onlytxts = QFileDialog::getOpenFileNames(this, tr("Load tone mapping settings text files..."), m_batchTmTmoSettingsDir, - tr("LuminanceHDR tone mapping settings text file (*.txt)")); + tr("Luminance HDR tone mapping settings text file (*.txt)")); add_view_model_TM_OPTs(onlytxts); } @@ -417,7 +417,8 @@ // 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 - BatchTMJob * job_thread = new BatchTMJob(t_id, HDRs_list.at(m_next_hdr_file), &m_tm_options_list, m_Ui->out_folder_widgets->text()); + BatchTMJob * job_thread = new BatchTMJob(t_id, HDRs_list.at(m_next_hdr_file), &m_tm_options_list, m_Ui->out_folder_widgets->text(), + m_Ui->comboBoxFormat->currentText()); // Thread deletes itself when it has done with its job connect(job_thread, SIGNAL(finished()), @@ -456,9 +457,9 @@ // 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) + if (m_available_threads[t_id] == true) { - m_available_threads[t_id] = FALSE; + m_available_threads[t_id] = false; break; } } @@ -509,6 +510,7 @@ m_Ui->spinBox_Width->setDisabled(true); m_Ui->horizontalSlider_Quality->setDisabled(true); m_Ui->spinBox_Quality->setDisabled(true); + m_Ui->comboBoxFormat->setDisabled(true); // mouse pointer to busy QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); @@ -648,7 +650,8 @@ 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.newfattal = !query.value(4).toBool(); + tm_opt->operator_options.fattaloptions.fftsolver = !query.value(4).toBool(); tm_opt->pregamma = query.value(5).toFloat(); } } diff -Nru luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.h luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.h --- luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.h 2013-04-07 18:41:14.000000000 +0000 @@ -70,34 +70,34 @@ 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(); - void release_thread(int t_id); - void start_batch_thread(); - void stop_batch_tm_ui(); - void increment_progress_bar(int); + void batch_core(); + void release_thread(int t_id); + void start_batch_thread(); + void stop_batch_tm_ui(); + void increment_progress_bar(int); - void from_database(); + void from_database(); - void updateQuality(int); - void updateWidth(int); + void updateQuality(int); + void updateWidth(int); protected: - void closeEvent(QCloseEvent *); + void closeEvent(QCloseEvent *); private: - //Parses a TM_opts file (return NULL on error) - TonemappingOptions* parse_tm_opt_file(QString filename); + //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; + //required for the cache path + LuminanceOptions m_luminance_options; - //Application-wide settings, loaded via QSettings - QString m_batchTmInputDir; - QString m_batchTmTmoSettingsDir; - QString m_batchTmOutputDir; + //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! @@ -106,39 +106,38 @@ int start_right; int stop_right; - //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; + // 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; - TonemappingOptions * opts; - QMutex m_add_log_message_mutex; + QMutex m_add_log_message_mutex; - QList< TonemappingOptions* > m_tm_options_list; + QList< TonemappingOptions* > 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; + // 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; - 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 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 + //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 + //updates graphica widget (view) and data structure (model) for TM_opts list void add_view_model_TM_OPTs(QStringList); }; #endif diff -Nru luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.ui luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.ui --- luminance-hdr-2.3.0/src/BatchTM/BatchTMDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchTM/BatchTMDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -15,7 +15,7 @@ - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png @@ -383,6 +383,47 @@ + + + Output Format: + + + + + + + + JPEG + + + + + TIFF (16 bits) + + + + + PNG + + + + + BMP + + + + + PPM + + + + + PBM + + + + + Output Folder: diff -Nru luminance-hdr-2.3.0/src/BatchTM/BatchTMJob.cpp luminance-hdr-2.3.1/src/BatchTM/BatchTMJob.cpp --- luminance-hdr-2.3.0/src/BatchTM/BatchTMJob.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchTM/BatchTMJob.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -24,17 +24,19 @@ */ #include "BatchTM/BatchTMJob.h" -#include "Fileformat/pfstiff.h" +#include "Fileformat/tiffreader.h" #include "Exif/ExifOperations.h" +#include "Libpfs/progress.h" #include "Libpfs/frame.h" -#include "Filter/pfscut.h" -#include "Filter/pfsgamma.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 "Fileformat/pfsout16bitspixmap.h" #include "Fileformat/pfsoutldrimage.h" -#include "TonemappingEngine/TonemapOperator.h" -#include "Filter/pfssize.h" #include #include @@ -42,13 +44,14 @@ #include #include -BatchTMJob::BatchTMJob(int thread_id, QString filename, const QList* tm_options, QString output_folder): +BatchTMJob::BatchTMJob(int thread_id, QString filename, const QList* tm_options, QString output_folder, QString format): m_thread_id(thread_id), m_file_name(filename), m_tm_options(tm_options), - m_output_folder(output_folder) + m_output_folder(output_folder), + m_ldr_output_format(format) { - m_ldr_output_format = LuminanceOptions().getBatchTmLdrFormat(); + //m_ldr_output_format = LuminanceOptions().getBatchTmLdrFormat(); m_output_file_name_base = m_output_folder + "/" + QFileInfo(m_file_name).completeBaseName(); } @@ -58,7 +61,7 @@ void BatchTMJob::run() { - ProgressHelper prog_helper; + 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())); @@ -85,23 +88,29 @@ QScopedPointer temporary_frame; if ( opts->origxsize == opts->xsize ) - temporary_frame.reset( pfs::pfscopy(reference_frame.data()) ); + { + temporary_frame.reset( pfs::copy(reference_frame.data()) ); + } else - temporary_frame.reset( pfs::resizeFrame(reference_frame.data(), opts->xsize) ); + { + temporary_frame.reset( pfs::resize(reference_frame.data(), opts->xsize) ); + } if ( opts->pregamma != 1.0f ) { - pfs::applyGammaOnFrame(temporary_frame.data(), opts->pregamma ); + pfs::applyGamma(temporary_frame.data(), opts->pregamma ); } QScopedPointer tm_operator( TonemapOperator::getTonemapOperator(opts->tmoperator) ); - tm_operator->tonemapFrame(temporary_frame.data(), opts, prog_helper); + tm_operator->tonemapFrame(*temporary_frame, opts, prog_helper); - TMOptionsOperations operations(opts); - QString output_file_name = m_output_file_name_base+"_"+operations.getPostfix()+"."+m_ldr_output_format; + 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, opts->quality, opts) ) + if ( io_worker.write_ldr_frame(temporary_frame.data(), + output_file_name, QString(), + QVector(), opts, + pfs::Params("quality", (size_t)opts->quality)) ) { emit add_log_message( tr("[T%1] Successfully saved LDR file: %2").arg(m_thread_id).arg(QFileInfo(output_file_name).completeBaseName()) ); } else { diff -Nru luminance-hdr-2.3.0/src/BatchTM/BatchTMJob.h luminance-hdr-2.3.1/src/BatchTM/BatchTMJob.h --- luminance-hdr-2.3.0/src/BatchTM/BatchTMJob.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/BatchTM/BatchTMJob.h 2013-04-07 18:41:14.000000000 +0000 @@ -37,7 +37,7 @@ { Q_OBJECT public: - BatchTMJob(int thread_id, QString filename, const QList* tm_options, QString output_folder); + BatchTMJob(int thread_id, QString filename, const QList* tm_options, QString output_folder, QString ldr_output_format); virtual ~BatchTMJob(); signals: void done(int thread_id); diff -Nru luminance-hdr-2.3.0/src/CMakeLists.txt luminance-hdr-2.3.1/src/CMakeLists.txt --- luminance-hdr-2.3.0/src/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,3 +1,7 @@ +ADD_SUBDIRECTORY(Libpfs) +ADD_SUBDIRECTORY(TonemappingOperators) +ADD_SUBDIRECTORY(HdrCreation) + #ADD_SUBDIRECTORY(arch) ADD_SUBDIRECTORY(MainWindow) @@ -14,22 +18,17 @@ ADD_SUBDIRECTORY(Core) ADD_SUBDIRECTORY(Exif) ADD_SUBDIRECTORY(Fileformat) -ADD_SUBDIRECTORY(Filter) -ADD_SUBDIRECTORY(HdrCreation) ADD_SUBDIRECTORY(HdrWizard) ADD_SUBDIRECTORY(HelpBrowser) -ADD_SUBDIRECTORY(Libpfs) ADD_SUBDIRECTORY(Preferences) ADD_SUBDIRECTORY(Projection) ADD_SUBDIRECTORY(Resize) ADD_SUBDIRECTORY(Threads) -ADD_SUBDIRECTORY(TonemappingEngine) -ADD_SUBDIRECTORY(TonemappingOperators) ADD_SUBDIRECTORY(TonemappingPanel) ADD_SUBDIRECTORY(TransplantExif) ADD_SUBDIRECTORY(UI) ADD_SUBDIRECTORY(Viewers) - +ADD_SUBDIRECTORY(PreviewSettings) # They need to stay at the bottom of this file! SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Common/CMakeLists.txt luminance-hdr-2.3.1/src/Common/CMakeLists.txt --- luminance-hdr-2.3.0/src/Common/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,27 +1,29 @@ -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp @ONLY) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/global.hxx.in ${CMAKE_CURRENT_BINARY_DIR}/global.hxx @ONLY) +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in + ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp @ONLY) +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/global.hxx.in + ${CMAKE_CURRENT_BINARY_DIR}/global.hxx @ONLY) +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) SET(FILES_UI -${CMAKE_CURRENT_SOURCE_DIR}/SavedParametersDialog.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) + ${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}/msec_timer.h -${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandler.h -${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandlerCommon.h -${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandlerLcms.h -${CMAKE_CURRENT_SOURCE_DIR}/FloatRgbToQRgb.h) + ${CMAKE_CURRENT_SOURCE_DIR}/archs.h + ${CMAKE_CURRENT_SOURCE_DIR}/config.h + #${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandler.h + #${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandlerCommon.h + #${CMAKE_CURRENT_SOURCE_DIR}/ResourceHandlerLcms.h + ${CMAKE_CURRENT_SOURCE_DIR}/TranslatorManager.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}/msec_timer.cpp -${CMAKE_CURRENT_SOURCE_DIR}/ProgressHelper.cpp -${CMAKE_CURRENT_SOURCE_DIR}/FloatRgbToQRgb.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}/TranslatorManager.cpp) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) @@ -29,8 +31,9 @@ QT4_WRAP_UI(FILES_UI_H ${FILES_UI}) ADD_LIBRARY(common ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX} ${FILES_UI_H} -${CMAKE_CURRENT_BINARY_DIR}/global.hxx -${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp) + ${CMAKE_CURRENT_BINARY_DIR}/global.hxx + ${CMAKE_CURRENT_BINARY_DIR}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp) SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} common PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Common/FloatRgbToQRgb.cpp luminance-hdr-2.3.1/src/Common/FloatRgbToQRgb.cpp --- luminance-hdr-2.3.0/src/Common/FloatRgbToQRgb.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/FloatRgbToQRgb.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,367 +0,0 @@ -/* - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * 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 - * ---------------------------------------------------------------------- - */ - -//! \file FloatRgbToQRgb.cpp -//! \brief This file creates common routines for mapping float RGB values into -//! 8-bits or 16-bits integer RGB (QRgb or quint16) -//! \author Davide Anastasia -//! \since Luminance HDR 2.3.0-beta1 - -#include "FloatRgbToQRgb.h" -#include "arch/math.h" -#include "Libpfs/vex.h" -#include - -namespace -{ -#ifdef LUMINANCE_USE_SSE -const v4sf GAMMA_1_4 = _mm_set1_ps(1.0f/1.4f); -const v4sf GAMMA_1_8 = _mm_set1_ps(1.0f/1.8f); -const v4sf GAMMA_2_2 = _mm_set1_ps(1.0f/2.2f); -const v4sf GAMMA_2_6 = _mm_set1_ps(1.0f/2.6f); - -const v4sf ZERO = _mm_set1_ps(0.f); -const v4sf ZERO_DOT_FIVE = _mm_set1_ps(0.5f); -const v4sf TWOFIVEFIVE = _mm_set1_ps(255.f); -const v4sf TWOPOWER16 = _mm_set1_ps(65535.f); - -inline -v4sf scaleAndRound(v4sf value, v4sf MIN_, v4sf MAX_) -{ - value *= MAX_; - value = _mm_min_ps(value, MAX_); - value = _mm_max_ps(value, MIN_); - value += ZERO_DOT_FIVE; - - return value; -} -#else -template -inline -O_ scaleAndRound(float value, float MIN_, float MAX_) -{ - value *= MAX_; - value = std::min(value, MAX_); - value = std::max(value, MIN_); - value += 0.5f; - - return static_cast(value); -} - -// useful data structure to implement a triple of float as RGB pixel -struct RgbF3 -{ - RgbF3(float r, float g, float b) - : red(r) - , green(g) - , blue(b) - {} - - float red; - float green; - float blue; -}; - -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; -#endif -} - -struct FloatRgbToQRgbImpl -{ - FloatRgbToQRgbImpl(float min_value, - float max_value, - LumMappingMethod mapping_method) -#ifdef LUMINANCE_USE_SSE - : m_MinValue(_mm_set1_ps(min_value)) - , m_MaxValue(_mm_set1_ps(max_value)) - , m_Range(_mm_set1_ps(max_value - min_value)) - , m_LogRange( _mm_set1_ps(log2f(max_value/min_value)) ) -#else - : m_MinValue(min_value) - , m_MaxValue(max_value) - , m_Range(max_value - min_value) - , m_LogRange( log2f(max_value/min_value) ) -#endif - { - setMappingMethod( mapping_method ); - } - - ~FloatRgbToQRgbImpl() - {} - - void setMinMax(float min, float max) - { -#ifdef LUMINANCE_USE_SSE - m_MinValue = _mm_set1_ps(min); - m_MaxValue = _mm_set1_ps(max); - m_Range = _mm_set1_ps(max - min); - m_LogRange = _mm_set1_ps(log2f(max/min)); -#else - m_MinValue = min; - m_MaxValue = max; - m_Range = max - min; - m_LogRange = log2f(max/min); -#endif - } - - void setMappingMethod(LumMappingMethod method) - { - m_MappingMethod = method; - - switch ( m_MappingMethod ) - { - case MAP_LINEAR: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingLinear; - break; - case MAP_GAMMA1_4: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingGamma14; - break; - case MAP_GAMMA1_8: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingGamma18; - break; - case MAP_GAMMA2_6: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingGamma26; - break; - case MAP_LOGARITHMIC: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingLog; - break; - default: - case MAP_GAMMA2_2: - m_MappingFunc = &FloatRgbToQRgbImpl::mappingGamma22; - break; - } - } - - LumMappingMethod m_MappingMethod; - -#ifdef LUMINANCE_USE_SSE - inline - v4sf buildRgb(float r, float g, float b) { - return (_mm_set_ps(0, b, g, r) - m_MinValue) - / m_Range; - } - - v4sf mappingLinear(float r, float g, float b) { - return buildRgb(r,g,b); - } - - v4sf mappingGamma14(float r, float g, float b) { - return _mm_pow_ps(buildRgb(r,g,b), GAMMA_1_4); - } - - v4sf mappingGamma18(float r, float g, float b) { - return _mm_pow_ps(buildRgb(r,g,b), GAMMA_1_8); - } - - v4sf mappingGamma22(float r, float g, float b) { - return _mm_pow_ps(buildRgb(r,g,b), GAMMA_2_2); - } - - v4sf mappingGamma26(float r, float g, float b) { - return _mm_pow_ps(buildRgb(r,g,b), GAMMA_2_6); - } - - v4sf mappingLog(float r, float g, float b) { - return _mm_log2_ps(_mm_set_ps(0, b, g, r)/m_MinValue) - / m_LogRange; - } - - inline - v4sf operator()(float r, float g, float b) - { - return (this->*m_MappingFunc)(r, g, b); - } - - // pointer to function - typedef v4sf (FloatRgbToQRgbImpl::*MappingFunc)(float, float, float); - - MappingFunc m_MappingFunc; - - v4sf m_MinValue; - v4sf m_MaxValue; - v4sf m_Range; - v4sf m_LogRange; -#else - // pointer to function - typedef RgbF3 (FloatRgbToQRgbImpl::*MappingFunc)(float, float, float); - - inline - RgbF3 buildRgb(float r, float g, float b) { - - return RgbF3((r - m_MinValue)/m_Range, - (g - m_MinValue)/m_Range, - (b - m_MinValue)/m_Range); - } - - RgbF3 mappingLinear(float r, float g, float b) - { - return buildRgb(r,g,b); - } - - RgbF3 mappingGamma14(float r, float g, float b) - { - RgbF3 pixel = buildRgb(r,g,b); - - pixel.red = powf(pixel.red, GAMMA_1_4); - pixel.green = powf(pixel.green, GAMMA_1_4); - pixel.blue = powf(pixel.blue, GAMMA_1_4); - - return pixel; - } - - RgbF3 mappingGamma18(float r, float g, float b) - { - RgbF3 pixel = buildRgb(r,g,b); - - pixel.red = powf(pixel.red, GAMMA_1_8); - pixel.green = powf(pixel.green, GAMMA_1_8); - pixel.blue = powf(pixel.blue, GAMMA_1_8); - - return pixel; - } - - RgbF3 mappingGamma22(float r, float g, float b) - { - RgbF3 pixel = buildRgb(r,g,b); - - pixel.red = powf(pixel.red, GAMMA_2_2); - pixel.green = powf(pixel.green, GAMMA_2_2); - pixel.blue = powf(pixel.blue, GAMMA_2_2); - - return pixel; - } - - RgbF3 mappingGamma26(float r, float g, float b) - { - RgbF3 pixel = buildRgb(r,g,b); - - // I have problems with Clang++ in using the powf function - pixel.red = powf(pixel.red, GAMMA_2_6); - pixel.green = powf(pixel.green, GAMMA_2_6); - pixel.blue = powf(pixel.blue, GAMMA_2_6); - - return pixel; - } - - RgbF3 mappingLog(float r, float g, float b) - { - return RgbF3(log2f(r/m_MinValue)/m_LogRange, - log2f(g/m_MinValue)/m_LogRange, - log2f(b/m_MinValue)/m_LogRange); - } - - inline - RgbF3 operator()(float r, float g, float b) - { - return (this->*m_MappingFunc)(r, g, b); - } - - MappingFunc m_MappingFunc; - - float m_MinValue; - float m_MaxValue; - float m_Range; - float m_LogRange; -#endif - -}; - -FloatRgbToQRgb::FloatRgbToQRgb(float min_value, - float max_value, - LumMappingMethod mapping_method) - : m_Pimpl( new FloatRgbToQRgbImpl(min_value, - max_value, - mapping_method)) -{} - -FloatRgbToQRgb::~FloatRgbToQRgb() -{} - -void FloatRgbToQRgb::toQRgb(float r, float g, float b, QRgb& qrgb) -{ -#ifdef LUMINANCE_USE_SSE - v4sf rgb = (*m_Pimpl)(r,g,b); - - rgb = scaleAndRound(rgb, ZERO, TWOFIVEFIVE); - - const float* buf = reinterpret_cast(&rgb); - - qrgb = qRgb( static_cast(buf[0]), - static_cast(buf[1]), - static_cast(buf[2]) ); -#else - RgbF3 rgb = (*m_Pimpl)(r,g,b); - - qrgb = qRgb( scaleAndRound(rgb.red, 0.f, 255.f), - scaleAndRound(rgb.green, 0.f, 255.f), - scaleAndRound(rgb.blue, 0.f, 255.f) ); -#endif -} - -void FloatRgbToQRgb::toQUint16(float r, float g, float b, - quint16& red, quint16& green, quint16& blue) -{ -#ifdef LUMINANCE_USE_SSE - v4sf rgb = (*m_Pimpl)(r,g,b); - - rgb = scaleAndRound(rgb, ZERO, TWOPOWER16); - - const float* buf = reinterpret_cast(&rgb); - - red = static_cast(buf[0]); - green = static_cast(buf[1]); - blue = static_cast(buf[2]); -#else - RgbF3 rgb = (*m_Pimpl)(r,g,b); - - red = scaleAndRound(rgb.red, 0.f, 65535.f); - green = scaleAndRound(rgb.green, 0.f, 65535.f); - blue = scaleAndRound(rgb.blue, 0.f, 65535.f); -#endif -} - -void FloatRgbToQRgb::setMinMax(float min, float max) -{ - m_Pimpl->setMinMax(min, max); -} - -void FloatRgbToQRgb::setMappingMethod(LumMappingMethod method) -{ - m_Pimpl->setMappingMethod( method ); -} - -LumMappingMethod FloatRgbToQRgb::getMappingMethod() const -{ - return m_Pimpl->m_MappingMethod; -} - -//float FloatRgbToQRgb::getMinLuminance() const -//{ -// return m_Pimpl->m_MinValue; -//} - -//float FloatRgbToQRgb::getMaxLuminance() const -//{ -// return m_Pimpl->m_MaxValue; -//} diff -Nru luminance-hdr-2.3.0/src/Common/FloatRgbToQRgb.h luminance-hdr-2.3.1/src/Common/FloatRgbToQRgb.h --- luminance-hdr-2.3.0/src/Common/FloatRgbToQRgb.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/FloatRgbToQRgb.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -/* - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * 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 PFSFRAME_TO_QIMAGE_MAPPING_H -#define PFSFRAME_TO_QIMAGE_MAPPING_H - -//! \file FloatRgbToQRgb.h -//! \brief This file creates common routines for mapping float RGB values into -//! 255 levels QImage -//! \author Davide Anastasia -//! \since Luminance HDR 2.3.0-beta1 - -#include -#include -#include - -// Are you changing the order? -// Feel free, but it's a fast track for troubles! -enum LumMappingMethod -{ - MAP_LINEAR = 0, - MAP_GAMMA1_4 = 1, - MAP_GAMMA1_8 = 2, - MAP_GAMMA2_2 = 3, - MAP_GAMMA2_6 = 4, - MAP_LOGARITHMIC = 5 -}; - -//! \brief Private implementation for the class \c FloatRgbToQRgb -struct FloatRgbToQRgbImpl; - -class FloatRgbToQRgb -{ -public: - // ctor - FloatRgbToQRgb(float min_value = 0.0f, - float max_value = 1.0f, - LumMappingMethod mapping_method = MAP_LINEAR); - - ~FloatRgbToQRgb(); - - // non-const functions - void setMinMax(float min, float max); - void setMappingMethod(LumMappingMethod method); - - // const functions - //float getMinLuminance() const; - //float getMaxLuminance() const; - LumMappingMethod getMappingMethod() const; - - void toQRgb(float r, float g, float b, QRgb& qrgb); - - void toQUint16(float r, float g, float b, - quint16& red, quint16& green, quint16& blue); - -private: - // private implementation, useful to get a more performant implementation - QScopedPointer m_Pimpl; -}; - -#endif // PFSFRAME_TO_QIMAGE_MAPPING_H diff -Nru luminance-hdr-2.3.0/src/Common/LuminanceOptions.cpp luminance-hdr-2.3.1/src/Common/LuminanceOptions.cpp --- luminance-hdr-2.3.0/src/Common/LuminanceOptions.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/LuminanceOptions.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -28,459 +28,574 @@ * */ +#include #include #include +#include #include #include #include "Common/LuminanceOptions.h" #include "Common/config.h" +bool LuminanceOptions::isCurrentPortableMode = false; + LuminanceOptions::LuminanceOptions(): - QSettings(LUMINANCEORGANIZATION, LUMINANCEAPPLICATION) -{ } + QObject() +{ + initSettings(); +} + +LuminanceOptions::~LuminanceOptions() +{ + delete m_settingHolder; +} + +void LuminanceOptions::conditionallyDoUpgrade() +{ + LuminanceOptions options; + int currentVersion = options.value("LuminanceOptionsVersion", 0).toInt(); + + // check if update needed + if (currentVersion < LUMINANCEVERSION_NUM) + { + if (currentVersion < 2030099) + { + options.setRawWhiteBalanceMethod(1); +#ifdef DEMOSAICING_GPL3 + options.setRawUserQuality(10); // AMaZE +#endif + } + + options.setValue("LuminanceOptionsVersion", LUMINANCEVERSION_NUM); + } +} + +void LuminanceOptions::setPortableMode(bool isPortable) +{ + if (LuminanceOptions::isCurrentPortableMode != isPortable) + { + QSettings* oldSettings = m_settingHolder; + LuminanceOptions::isCurrentPortableMode = isPortable; + initSettings(); + 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(); + } + else if (!isPortable && file.exists()) + { + file.remove(); + } + } +} + +bool LuminanceOptions::checkForUpdate() +{ + QDate date = value("UpdateChecked", QDate(0, 1, 1)).toDate(); + int diff = date.daysTo(QDate::currentDate()); + return diff > 0; +} + +void LuminanceOptions::setUpdateChecked() +{ + setValue("UpdateChecked", QDate::currentDate()); +} + +void LuminanceOptions::initSettings() +{ + if (LuminanceOptions::isCurrentPortableMode) + m_settingHolder = new QSettings("settings.ini", QSettings::IniFormat); + else + m_settingHolder = new QSettings(); +} + +void LuminanceOptions::setValue(const QString& key, + const QVariant& value) +{ + m_settingHolder->setValue(key, value); +} + +QVariant LuminanceOptions::value(const QString & key, + const QVariant& defaultValue) const +{ + return m_settingHolder->value(key, defaultValue); +} + +QString LuminanceOptions::getDatabaseFileName() +{ + QString filename; + if (LuminanceOptions::isCurrentPortableMode) + { + filename = QDir::currentPath(); + } + else + { + filename = QDir(QDir::homePath()).absolutePath(); +#ifdef WIN32 + filename += "/LuminanceHDR"; +#else + filename += "/.LuminanceHDR"; +#endif + } + filename += "/saved_parameters.db"; + + return filename; +} + // write system default language the first time around (discard "_country") QString LuminanceOptions::getGuiLang() { - return value(KEY_GUI_LANG, QLocale::system().name().left(2)).toString(); + return m_settingHolder->value(KEY_GUI_LANG, + QLocale::system().name().left(2)).toString(); } -void LuminanceOptions::setGuiLang(QString s) +void LuminanceOptions::setGuiLang(const QString& s) { - setValue(KEY_GUI_LANG, s); + m_settingHolder->setValue(KEY_GUI_LANG, s); } bool LuminanceOptions::isRawFourColorRGB() { - return value(KEY_FOUR_COLOR_RGB, false).toBool(); + return m_settingHolder->value(KEY_FOUR_COLOR_RGB, false).toBool(); } void LuminanceOptions::setRawFourColorRGB(bool b) { - setValue(KEY_FOUR_COLOR_RGB, b); + m_settingHolder->setValue(KEY_FOUR_COLOR_RGB, b); } bool LuminanceOptions::isRawDoNotUseFujiRotate() { - return value(KEY_DO_NOT_USE_FUJI_ROTATE, false).toBool(); + return m_settingHolder->value(KEY_DO_NOT_USE_FUJI_ROTATE, false).toBool(); } void LuminanceOptions::setRawDoNotUseFujiRotate(bool b) { - setValue(KEY_DO_NOT_USE_FUJI_ROTATE, b); + m_settingHolder->setValue(KEY_DO_NOT_USE_FUJI_ROTATE, b); } double LuminanceOptions::getRawAber0() { - return this->value(KEY_ABER_0, 1.0).toDouble(); + return m_settingHolder->value(KEY_ABER_0, 1.0).toDouble(); } void LuminanceOptions::setRawAber0(double v) { - setValue(KEY_ABER_0, v); + m_settingHolder->setValue(KEY_ABER_0, v); } double LuminanceOptions::getRawAber1() { - return this->value(KEY_ABER_1, 1.0).toDouble(); + return m_settingHolder->value(KEY_ABER_1, 1.0).toDouble(); } void LuminanceOptions::setRawAber1(double v) { - setValue(KEY_ABER_1, v); + m_settingHolder->setValue(KEY_ABER_1, v); } double LuminanceOptions::getRawAber2() { - return this->value(KEY_ABER_2).toDouble(); + return m_settingHolder->value(KEY_ABER_2).toDouble(); } void LuminanceOptions::setRawAber2(double v) { - setValue(KEY_ABER_2, v); + m_settingHolder->setValue(KEY_ABER_2, v); } double LuminanceOptions::getRawAber3() { - return this->value(KEY_ABER_3).toDouble(); + return m_settingHolder->value(KEY_ABER_3).toDouble(); } void LuminanceOptions::setRawAber3(double v) { - setValue(KEY_ABER_3, v); + m_settingHolder->setValue(KEY_ABER_3, v); } double LuminanceOptions::getRawGamm0() { - return value(KEY_GAMM_0, 1.0/2.4).toDouble(); + return m_settingHolder->value(KEY_GAMM_0, 1.0/2.4).toDouble(); } void LuminanceOptions::setRawGamm0(double v) { - setValue(KEY_GAMM_0, v); + m_settingHolder->setValue(KEY_GAMM_0, v); } double LuminanceOptions::getRawGamm1() { - return this->value(KEY_GAMM_1, 12.92).toDouble(); + return m_settingHolder->value(KEY_GAMM_1, 12.92).toDouble(); } void LuminanceOptions::setRawGamm1(double v) { - setValue(KEY_GAMM_1, v); + m_settingHolder->setValue(KEY_GAMM_1, v); } int LuminanceOptions::getRawTemperatureKelvin() { - return value(KEY_TK, 6500).toInt(); + return m_settingHolder->value(KEY_TK, 6500).toInt(); } void LuminanceOptions::setRawTemperatureKelvin(int v) { - setValue(KEY_TK, v); + m_settingHolder->setValue(KEY_TK, v); } float LuminanceOptions::getRawGreen() { - return value(KEY_GREEN, 1.0f).toFloat(); + return m_settingHolder->value(KEY_GREEN, 1.0f).toFloat(); } void LuminanceOptions::setRawGreen(float v) { - setValue(KEY_GREEN, v); + m_settingHolder->setValue(KEY_GREEN, v); } float LuminanceOptions::getRawUserMul0() { - return value(KEY_USER_MUL_0, 1.0f).toFloat(); + return m_settingHolder->value(KEY_USER_MUL_0, 1.0f).toFloat(); } void LuminanceOptions::setRawUserMul0(float v) { - setValue(KEY_USER_MUL_0, v); + m_settingHolder->setValue(KEY_USER_MUL_0, v); } float LuminanceOptions::getRawUserMul1() { - return value(KEY_USER_MUL_1, 1.0f).toFloat(); + return m_settingHolder->value(KEY_USER_MUL_1, 1.0f).toFloat(); } void LuminanceOptions::setRawUserMul1(float v) { - setValue(KEY_USER_MUL_1, v); + m_settingHolder->setValue(KEY_USER_MUL_1, v); } float LuminanceOptions::getRawUserMul2() { - return value(KEY_USER_MUL_2, 1.0f).toFloat(); + return m_settingHolder->value(KEY_USER_MUL_2, 1.0f).toFloat(); } void LuminanceOptions::setRawUserMul2(float v) { - setValue(KEY_USER_MUL_2, v); + m_settingHolder->setValue(KEY_USER_MUL_2, v); } float LuminanceOptions::getRawUserMul3() { - return value(KEY_USER_MUL_3, 1.0f).toFloat(); + return m_settingHolder->value(KEY_USER_MUL_3, 1.0f).toFloat(); } void LuminanceOptions::setRawUserMul3(float v) { - setValue(KEY_USER_MUL_3, v); + m_settingHolder->setValue(KEY_USER_MUL_3, v); } bool LuminanceOptions::isRawAutoBrightness() { - return value(KEY_AUTO_BRIGHT, false).toBool(); + return m_settingHolder->value(KEY_AUTO_BRIGHT, false).toBool(); } void LuminanceOptions::setRawAutoBrightness(bool b) { - setValue(KEY_AUTO_BRIGHT, b); + m_settingHolder->setValue(KEY_AUTO_BRIGHT, b); } float LuminanceOptions::getRawBrightness() { - return value(KEY_BRIGHTNESS, 1.0f).toFloat(); + return m_settingHolder->value(KEY_BRIGHTNESS, 1.0f).toFloat(); } void LuminanceOptions::setRawBrightness(float f) { - setValue(KEY_BRIGHTNESS, f); + m_settingHolder->setValue(KEY_BRIGHTNESS, f); } float LuminanceOptions::getRawNoiseReductionThreshold() { - return value(KEY_THRESHOLD, 100.0f).toFloat(); + return m_settingHolder->value(KEY_THRESHOLD, 100.0f).toFloat(); } void LuminanceOptions::setRawNoiseReductionThreshold(float v) { - setValue(KEY_THRESHOLD, v); + m_settingHolder->setValue(KEY_THRESHOLD, v); } int LuminanceOptions::getRawHalfSize() { - return value(KEY_HALF_SIZE, 0).toInt(); + return m_settingHolder->value(KEY_HALF_SIZE, 0).toInt(); } void LuminanceOptions::setRawHalfSize(int v) { - setValue(KEY_HALF_SIZE, v); + m_settingHolder->setValue(KEY_HALF_SIZE, v); } int LuminanceOptions::getRawWhiteBalanceMethod() { - return value(KEY_WB_METHOD, 0).toInt(); + return m_settingHolder->value(KEY_WB_METHOD, 1).toInt(); } void LuminanceOptions::setRawWhiteBalanceMethod(int v) { - setValue(KEY_WB_METHOD, v); + m_settingHolder->setValue(KEY_WB_METHOD, v); } int LuminanceOptions::getRawOutputColor() { - return value(KEY_OUTPUT_COLOR, 1).toInt(); + return m_settingHolder->value(KEY_OUTPUT_COLOR, 1).toInt(); } // double check those! QString LuminanceOptions::getRawOutputProfile() { //QFile::encodeName(this->value(KEY_OUTPUT_PROFILE).toString()).constData(); - return QFile::encodeName(value(KEY_OUTPUT_PROFILE, "").toString()); + return QFile::encodeName(m_settingHolder->value(KEY_OUTPUT_PROFILE).toString()); } -void LuminanceOptions::setRawOutputProfile(QString v) +void LuminanceOptions::setRawOutputProfile(const QString& v) { - setValue(KEY_OUTPUT_PROFILE, v); + m_settingHolder->setValue(KEY_OUTPUT_PROFILE, v); } QString LuminanceOptions::getRawCameraProfile() { // QFile::encodeName(this->value(KEY_CAMERA_PROFILE).toString()).constData(); - return QFile::encodeName(value(KEY_CAMERA_PROFILE, "").toString()); + return QFile::encodeName(m_settingHolder->value(KEY_CAMERA_PROFILE).toString()); } -void LuminanceOptions::setRawCameraProfile(QString v) +void LuminanceOptions::setRawCameraProfile(const QString& v) { - setValue(KEY_CAMERA_PROFILE, v); + m_settingHolder->setValue(KEY_CAMERA_PROFILE, v); } int LuminanceOptions::getRawUserFlip() { - return value(KEY_USER_FLIP, 0).toInt(); + return m_settingHolder->value(KEY_USER_FLIP, 0).toInt(); } int LuminanceOptions::getRawUserQuality() { - return value(KEY_USER_QUAL, 0).toInt(); +#ifdef DEMOSAICING_GPL2 + int defaultUserQuality = 5; // using AHDv2 +#else + int defaultUserQuality = 3; // using AHD +#endif +#ifdef DEMOSAICING_GPL3 + defaultUserQuality = 10; // using AMaZE interpolation +#endif + return m_settingHolder->value(KEY_USER_QUAL, defaultUserQuality).toInt(); } void LuminanceOptions::setRawUserQuality(int v) { - setValue(KEY_USER_QUAL, v); + m_settingHolder->setValue(KEY_USER_QUAL, v); } int LuminanceOptions::getRawUserSaturation() { - return value(KEY_USER_SAT, 20000).toInt(); + return m_settingHolder->value(KEY_USER_SAT, 20000).toInt(); } void LuminanceOptions::setRawUserSaturation(int v) { - setValue(KEY_USER_SAT, v); + m_settingHolder->setValue(KEY_USER_SAT, v); } int LuminanceOptions::getRawMedPasses() { - return value(KEY_MED_PASSES, 0).toInt(); + return m_settingHolder->value(KEY_MED_PASSES, 0).toInt(); } void LuminanceOptions::setRawMedPasses(int v) { - setValue(KEY_MED_PASSES, v); + m_settingHolder->setValue(KEY_MED_PASSES, v); } int LuminanceOptions::getRawHighlightsMode() { - return value(KEY_HIGHLIGHTS, 0).toInt(); + return m_settingHolder->value(KEY_HIGHLIGHTS, 0).toInt(); } void LuminanceOptions::setRawHighlightsMode(int v) { - setValue(KEY_HIGHLIGHTS, v); + m_settingHolder->setValue(KEY_HIGHLIGHTS, v); } int LuminanceOptions::getRawLevel() { - return value(KEY_LEVEL, 0).toInt(); + return m_settingHolder->value(KEY_LEVEL, 0).toInt(); } void LuminanceOptions::setRawLevel(int v) { - setValue(KEY_LEVEL, v); + m_settingHolder->setValue(KEY_LEVEL, v); } float LuminanceOptions::getRawBrightnessThreshold() { - return value(KEY_AUTO_BRIGHT_THR, 0.0f).toFloat(); + return m_settingHolder->value(KEY_AUTO_BRIGHT_THR, 0.0f).toFloat(); } void LuminanceOptions::setRawBrightnessThreshold(float v) { - setValue(KEY_AUTO_BRIGHT_THR, v); + m_settingHolder->setValue(KEY_AUTO_BRIGHT_THR, v); } float LuminanceOptions::getRawMaximumThreshold() { - return value(KEY_ADJUST_MAXIMUM_THR, 0.0f).toFloat(); + return m_settingHolder->value(KEY_ADJUST_MAXIMUM_THR, 0.0f).toFloat(); } void LuminanceOptions::setRawMaximumThreshold(float v) { - setValue(KEY_ADJUST_MAXIMUM_THR, v); + m_settingHolder->setValue(KEY_ADJUST_MAXIMUM_THR, v); } bool LuminanceOptions::isRawUseBlack() { - return value(KEY_USE_BLACK, false).toBool(); + return m_settingHolder->value(KEY_USE_BLACK, false).toBool(); } void LuminanceOptions::setRawUseBlack(bool b) { - setValue(KEY_USE_BLACK, b); + m_settingHolder->setValue(KEY_USE_BLACK, b); } int LuminanceOptions::getRawUserBlack() { - return value(KEY_USER_BLACK, 0).toInt(); + return m_settingHolder->value(KEY_USER_BLACK, 0).toInt(); } void LuminanceOptions::setRawUserBlack(int v) { - setValue(KEY_USER_BLACK, v); + m_settingHolder->setValue(KEY_USER_BLACK, v); } bool LuminanceOptions::isRawUseSaturation() { - return value(KEY_USE_SAT, false).toBool(); + return m_settingHolder->value(KEY_USE_SAT, false).toBool(); } void LuminanceOptions::setRawUseSaturation(bool b) { - setValue(KEY_USE_SAT, b); + m_settingHolder->setValue(KEY_USE_SAT, b); } bool LuminanceOptions::isRawUseNoiseReduction() { - return value(KEY_USE_NOISE, true).toBool(); + return m_settingHolder->value(KEY_USE_NOISE, true).toBool(); } void LuminanceOptions::setRawUseNoiseReduction(bool b) { - setValue(KEY_USE_NOISE, b); + m_settingHolder->setValue(KEY_USE_NOISE, b); } bool LuminanceOptions::isRawUseChroma() { - return value(KEY_USE_CHROMA, false).toBool(); + return m_settingHolder->value(KEY_USE_CHROMA, false).toBool(); } void LuminanceOptions::setRawUseChroma(bool b) { - setValue(KEY_USE_CHROMA, b); + m_settingHolder->setValue(KEY_USE_CHROMA, b); } -QString LuminanceOptions::getBatchHdrPathInput(QString defaultPath) +QString LuminanceOptions::getBatchHdrPathInput(const QString& defaultPath) { - return value(KEY_BATCH_HDR_PATH_INPUT, defaultPath).toString(); + return m_settingHolder->value(KEY_BATCH_HDR_PATH_INPUT, + defaultPath).toString(); } -void LuminanceOptions::setBatchHdrPathInput(QString qstr) +void LuminanceOptions::setBatchHdrPathInput(const QString& qstr) { - setValue(KEY_BATCH_HDR_PATH_INPUT, qstr); + m_settingHolder->setValue(KEY_BATCH_HDR_PATH_INPUT, qstr); } -QString LuminanceOptions::getBatchHdrPathOutput(QString defaultPath) +QString LuminanceOptions::getBatchHdrPathOutput(const QString& defaultPath) { - return value(KEY_BATCH_HDR_PATH_OUTPUT, defaultPath).toString(); + return m_settingHolder->value(KEY_BATCH_HDR_PATH_OUTPUT, + defaultPath).toString(); } -void LuminanceOptions::setBatchHdrPathOutput(QString qstr) +void LuminanceOptions::setBatchHdrPathOutput(const QString& qstr) { - setValue(KEY_BATCH_HDR_PATH_OUTPUT, qstr); + m_settingHolder->setValue(KEY_BATCH_HDR_PATH_OUTPUT, qstr); } bool LuminanceOptions::isSaveLogLuvTiff() { - return value(KEY_SAVE_LOGLUV, true).toBool(); + return m_settingHolder->value(KEY_SAVE_LOGLUV, true).toBool(); } void LuminanceOptions::setSaveLogLuvTiff(bool b) { - setValue(KEY_SAVE_LOGLUV, b); + m_settingHolder->setValue(KEY_SAVE_LOGLUV, b); } QString LuminanceOptions::getBatchTmPathHdrInput() { - return value(KEY_BATCH_TM_PATH_INPUT, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_BATCH_TM_PATH_INPUT, + QDir::currentPath()).toString(); } -void LuminanceOptions::setBatchTmPathHdrInput(QString s) +void LuminanceOptions::setBatchTmPathHdrInput(const QString& s) { - setValue(KEY_BATCH_TM_PATH_INPUT, s); + m_settingHolder->setValue(KEY_BATCH_TM_PATH_INPUT, s); } QString LuminanceOptions::getBatchTmPathTmoSettings() { - return value(KEY_BATCH_TM_PATH_TMO_SETTINGS, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_BATCH_TM_PATH_TMO_SETTINGS, + QDir::currentPath()).toString(); } -void LuminanceOptions::setBatchTmPathTmoSettings(QString s) +void LuminanceOptions::setBatchTmPathTmoSettings(const QString& s) { - setValue(KEY_BATCH_TM_PATH_TMO_SETTINGS, s); + m_settingHolder->setValue(KEY_BATCH_TM_PATH_TMO_SETTINGS, s); } QString LuminanceOptions::getBatchTmPathLdrOutput() { - return value(KEY_BATCH_TM_PATH_OUTPUT, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_BATCH_TM_PATH_OUTPUT, + QDir::currentPath()).toString(); } -void LuminanceOptions::setBatchTmPathLdrOutput(QString s) +void LuminanceOptions::setBatchTmPathLdrOutput(const QString& s) { - setValue(KEY_BATCH_TM_PATH_OUTPUT, s); + m_settingHolder->setValue(KEY_BATCH_TM_PATH_OUTPUT, s); } int LuminanceOptions::getBatchTmNumThreads() { - return value(KEY_BATCH_TM_NUM_THREADS, 1).toInt(); + return m_settingHolder->value(KEY_BATCH_TM_NUM_THREADS, 1).toInt(); } void LuminanceOptions::setBatchTmNumThreads(int v) { - setValue(KEY_BATCH_TM_NUM_THREADS, v); + m_settingHolder->setValue(KEY_BATCH_TM_NUM_THREADS, v); } -QString LuminanceOptions::getBatchTmLdrFormat() -{ - return value(KEY_BATCH_TM_LDR_FORMAT, "JPEG").toString(); -} - -void LuminanceOptions::setBatchTmLdrFormat(QString s) -{ - setValue(KEY_BATCH_TM_LDR_FORMAT, s); -} - - namespace { #ifdef QT_DEBUG struct PrintTempDir { - PrintTempDir(QString& str): + PrintTempDir(const QString& str): str_(str) {} @@ -490,17 +605,17 @@ } private: - QString& str_; + const QString& str_; }; #endif // QT_DEBUG - } +#define KEY_TEMP_RESULT_PATH "Tonemapping_Options/TemporaryFilesPath" QString LuminanceOptions::getTempDir() { QString os_temp_dir_name = QDir::temp().absolutePath(); - QString temp_dir_name = value(KEY_TEMP_RESULT_PATH, + 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); @@ -538,168 +653,211 @@ return temp_dir_name; } -void LuminanceOptions::setTempDir(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(); +} + +void LuminanceOptions::setDefaultPathHdrIn(const QString& path) { - setValue(KEY_TEMP_RESULT_PATH, path); + m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_HDR, path); } -QString LuminanceOptions::getDefaultPathHdrInOut() +QString LuminanceOptions::getDefaultPathHdrOut() { - return value(KEY_RECENT_PATH_LOAD_SAVE_HDR,QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_RECENT_PATH_SAVE_HDR, + QDir::currentPath()).toString(); } -void LuminanceOptions::setDefaultPathHdrInOut(QString path) +void LuminanceOptions::setDefaultPathHdrOut(const QString& path) { - setValue(KEY_RECENT_PATH_LOAD_SAVE_HDR, path); + m_settingHolder->setValue(KEY_RECENT_PATH_SAVE_HDR, path); } QString LuminanceOptions::getDefaultPathLdrIn() { - return value(KEY_RECENT_PATH_LOAD_LDRs_FOR_HDR, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_RECENT_PATH_LOAD_LDR, + QDir::currentPath()).toString(); } -void LuminanceOptions::setDefaultPathLdrIn(QString path) +void LuminanceOptions::setDefaultPathLdrIn(const QString& path) { - setValue(KEY_RECENT_PATH_LOAD_LDRs_FOR_HDR, path); + m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_LDR, path); } QString LuminanceOptions::getDefaultPathLdrOut() { - return value(KEY_RECENT_PATH_SAVE_LDR, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_RECENT_PATH_SAVE_LDR, + QDir::currentPath()).toString(); } -void LuminanceOptions::setDefaultPathLdrOut(QString path) +void LuminanceOptions::setDefaultPathLdrOut(const QString& path) { - setValue(KEY_RECENT_PATH_SAVE_LDR, path); + m_settingHolder->setValue(KEY_RECENT_PATH_SAVE_LDR, path); } +#define KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS "Recent_path_TMO_settings" + QString LuminanceOptions::getDefaultPathTmoSettings() { - return value(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, QDir::currentPath()).toString(); + return m_settingHolder->value(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, + QDir::currentPath()).toString(); } -void LuminanceOptions::setDefaultPathTmoSettings(QString path) +void LuminanceOptions::setDefaultPathTmoSettings(const QString& path) { - setValue(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, path); + m_settingHolder->setValue(KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS, path); } - - /* 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->setValue(KEY_EXTERNAL_AIS_OPTIONS, QStringList() << "-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 value(KEY_EXTERNAL_AIS_OPTIONS, QStringList() << "-v" << "-a" << "aligned_").toStringList(); + return m_settingHolder->value(KEY_EXTERNAL_AIS_OPTIONS, + QStringList() << "-v" << "-a" << "aligned_").toStringList(); } -void LuminanceOptions::setAlignImageStackOptions(QStringList qstrlist) +void LuminanceOptions::setAlignImageStackOptions(const QStringList& qstrlist) { - setValue(KEY_EXTERNAL_AIS_OPTIONS, qstrlist); + m_settingHolder->setValue(KEY_EXTERNAL_AIS_OPTIONS, qstrlist); } bool LuminanceOptions::isShowFirstPageWizard() { - return value(KEY_WIZARD_SHOWFIRSTPAGE,true).toBool(); + return m_settingHolder->value(KEY_WIZARD_SHOWFIRSTPAGE,true).toBool(); } void LuminanceOptions::setShowFirstPageWizard(bool b) { - setValue(KEY_WIZARD_SHOWFIRSTPAGE, b); + m_settingHolder->setValue(KEY_WIZARD_SHOWFIRSTPAGE, b); } bool LuminanceOptions::isShowFattalWarning() { - return value(KEY_TMOWARNING_FATTALSMALL,true).toBool(); + return m_settingHolder->value(KEY_TMOWARNING_FATTALSMALL,true).toBool(); } void LuminanceOptions::setShowFattalWarning(bool b) { - setValue(KEY_TMOWARNING_FATTALSMALL, b); + m_settingHolder->setValue(KEY_TMOWARNING_FATTALSMALL, b); } int LuminanceOptions::getMainWindowToolBarMode() { - return value(KEY_TOOLBAR_MODE, Qt::ToolButtonTextUnderIcon).toInt(); + return m_settingHolder->value(KEY_TOOLBAR_MODE, + Qt::ToolButtonTextUnderIcon).toInt(); } void LuminanceOptions::setMainWindowToolBarMode(int mode) { - setValue(KEY_TOOLBAR_MODE, mode); + m_settingHolder->setValue(KEY_TOOLBAR_MODE, mode); } // Viewer unsigned int LuminanceOptions::getViewerNanInfColor() { - return value(KEY_NANINFCOLOR,0xFF000000).toUInt(); + return m_settingHolder->value(KEY_NANINFCOLOR,0xFF000000).toUInt(); } void LuminanceOptions::setViewerNanInfColor(unsigned int color) { - setValue(KEY_NANINFCOLOR, color); + m_settingHolder->setValue(KEY_NANINFCOLOR, color); } unsigned int LuminanceOptions::getViewerNegColor() { - return value(KEY_NEGCOLOR,0xFF000000).toUInt(); + return m_settingHolder->value(KEY_NEGCOLOR,0xFF000000).toUInt(); } void LuminanceOptions::setViewerNegColor(unsigned int color) { - setValue(KEY_NEGCOLOR, color); + m_settingHolder->setValue(KEY_NEGCOLOR, color); } bool LuminanceOptions::isPreviewPanelActive() { - return value(KEY_TMOWINDOW_SHOWPREVIEWPANEL, true).toBool(); + return m_settingHolder->value(KEY_TMOWINDOW_SHOWPREVIEWPANEL, true).toBool(); } void LuminanceOptions::setPreviewPanelActive(bool status) { - setValue(KEY_TMOWINDOW_SHOWPREVIEWPANEL, status); + m_settingHolder->setValue(KEY_TMOWINDOW_SHOWPREVIEWPANEL, status); } +bool LuminanceOptions::isRealtimePreviewsActive() +{ + return m_settingHolder->value(KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE, false).toBool(); +} + +void LuminanceOptions::setRealtimePreviewsActive(bool status) +{ + m_settingHolder->setValue(KEY_TMOWINDOW_REALTIMEPREVIEWS_ACTIVE, status); +} + + int LuminanceOptions::getPreviewWidth() { - return value(KEY_TMOWINDOW_PREVIEWS_WIDTH, 400).toInt(); + return m_settingHolder->value(KEY_TMOWINDOW_PREVIEWS_WIDTH, 400).toInt(); } void LuminanceOptions::setPreviewWidth(int v) { - setValue(KEY_TMOWINDOW_PREVIEWS_WIDTH, v); + m_settingHolder->setValue(KEY_TMOWINDOW_PREVIEWS_WIDTH, v); } QString LuminanceOptions::getCameraProfileFileName() { - return value(KEY_COLOR_CAMERA_PROFILE_FILENAME, "").toString(); + return m_settingHolder->value(KEY_COLOR_CAMERA_PROFILE_FILENAME, "").toString(); } -void LuminanceOptions::setCameraProfileFileName(QString fname) +void LuminanceOptions::setCameraProfileFileName(const QString& fname) { - setValue(KEY_COLOR_CAMERA_PROFILE_FILENAME, fname); + m_settingHolder->setValue(KEY_COLOR_CAMERA_PROFILE_FILENAME, fname); } QString LuminanceOptions::getMonitorProfileFileName() { - return value(KEY_COLOR_MONITOR_PROFILE_FILENAME).toString(); + return m_settingHolder->value(KEY_COLOR_MONITOR_PROFILE_FILENAME).toString(); } -void LuminanceOptions::setMonitorProfileFileName(QString fname) +void LuminanceOptions::setMonitorProfileFileName(const QString& fname) { - setValue(KEY_COLOR_MONITOR_PROFILE_FILENAME, fname); + m_settingHolder->setValue(KEY_COLOR_MONITOR_PROFILE_FILENAME, fname); } QString LuminanceOptions::getPrinterProfileFileName() { - return value(KEY_COLOR_PRINTER_PROFILE_FILENAME).toString(); + return m_settingHolder->value(KEY_COLOR_PRINTER_PROFILE_FILENAME).toString(); +} + +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 +{ + return m_settingHolder->value(KEY_PREVIEW_PANEL_MODE).toInt(); } -void LuminanceOptions::setPrinterProfileFileName(QString fname) +void LuminanceOptions::setPreviewPanelMode(int mode) { - setValue(KEY_COLOR_PRINTER_PROFILE_FILENAME, fname); + m_settingHolder->setValue(KEY_PREVIEW_PANEL_MODE, mode); } diff -Nru luminance-hdr-2.3.0/src/Common/LuminanceOptions.h luminance-hdr-2.3.1/src/Common/LuminanceOptions.h --- luminance-hdr-2.3.0/src/Common/LuminanceOptions.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/LuminanceOptions.h 2013-04-07 18:41:14.000000000 +0000 @@ -36,11 +36,24 @@ #include #include -class LuminanceOptions: public QSettings +class LuminanceOptions: public QObject { Q_OBJECT public: explicit LuminanceOptions(); + ~LuminanceOptions(); + + void setValue(const QString& key, const QVariant& value); + QVariant value(const QString & key, const QVariant& defaultValue = QVariant()) const; + + static void conditionallyDoUpgrade(); + + static bool isCurrentPortableMode; + QString getDatabaseFileName(); + void setPortableMode(bool isPortable); + + bool checkForUpdate(); + void setUpdateChecked(); public Q_SLOTS: // RAW settings @@ -83,9 +96,9 @@ int getRawOutputColor(); //void setRawOutputColor(int); QString getRawOutputProfile(); - void setRawOutputProfile(QString); + void setRawOutputProfile(const QString&); QString getRawCameraProfile(); - void setRawCameraProfile(QString); + void setRawCameraProfile(const QString&); int getRawUserFlip(); //void setRawUserFlip(int); int getRawUserQuality(); @@ -118,26 +131,24 @@ // Language // 2-chars ISO 639 language code for Luminance's user interface QString getGuiLang(); - void setGuiLang(QString); + void setGuiLang(const QString&); // Batch HDR - QString getBatchHdrPathInput(QString defaultPath = QDir::currentPath()); - QString getBatchHdrPathOutput(QString defaultPath = QDir::currentPath()); - void setBatchHdrPathInput(QString); - void setBatchHdrPathOutput(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(); - QString getBatchTmLdrFormat(); - void setBatchTmPathHdrInput(QString); - void setBatchTmPathTmoSettings(QString); - void setBatchTmPathLdrOutput(QString); + void setBatchTmPathHdrInput(const QString&); + void setBatchTmPathTmoSettings(const QString&); + void setBatchTmPathLdrOutput(const QString&); void setBatchTmNumThreads(int); - void setBatchTmLdrFormat(QString); int getNumThreads() { return getBatchTmNumThreads(); } void setNumThreads(int i) { setBatchTmNumThreads(i); } @@ -150,21 +161,23 @@ // Default Paths // Path to save temporary cached files QString getTempDir(); - QString getDefaultPathHdrInOut(); - QString getDefaultPathLdrIn(); // HdrWizard - QString getDefaultPathLdrOut(); + QString getDefaultPathHdrIn(); // MainWindow + QString getDefaultPathHdrOut(); // MainWindow + QString getDefaultPathLdrIn(); // HdrWizard + QString getDefaultPathLdrOut(); // MainWindow QString getDefaultPathTmoSettings(); - void setTempDir(QString path); - void setDefaultPathHdrInOut(QString); - void setDefaultPathLdrIn(QString); // HdrWizard - void setDefaultPathLdrOut(QString); - void setDefaultPathTmoSettings(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&); // HdrWizard // commandline options for align_image_stack QStringList getAlignImageStackOptions(); - void setAlignImageStackOptions(QStringList); + void setAlignImageStackOptions(const QStringList&); // if true always show first page of hdr wizard bool isShowFirstPageWizard(); void setShowFirstPageWizard(bool b); @@ -179,8 +192,8 @@ // Viewer unsigned int getViewerNanInfColor(); unsigned int getViewerNegColor(); - void setViewerNanInfColor(unsigned int); - void setViewerNegColor(unsigned int); + void setViewerNanInfColor(unsigned int); + void setViewerNegColor(unsigned int); // Preview Panel bool isPreviewPanelActive(); @@ -189,15 +202,26 @@ int getPreviewWidth(); void setPreviewWidth(int); + // Realtime Previews + bool isRealtimePreviewsActive(); + void setRealtimePreviewsActive(bool); + // Color Management QString getCameraProfileFileName(); - void setCameraProfileFileName(QString); + void setCameraProfileFileName(const QString&); QString getMonitorProfileFileName(); - void setMonitorProfileFileName(QString); + void setMonitorProfileFileName(const QString&); QString getPrinterProfileFileName(); - void setPrinterProfileFileName(QString); + void setPrinterProfileFileName(const QString&); + + int getPreviewPanelMode(); + void setPreviewPanelMode(int); + +private: + void initSettings(); + QSettings* m_settingHolder; }; #endif diff -Nru luminance-hdr-2.3.0/src/Common/ProgressHelper.cpp luminance-hdr-2.3.1/src/Common/ProgressHelper.cpp --- luminance-hdr-2.3.0/src/Common/ProgressHelper.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/ProgressHelper.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,5 +1,5 @@ -/** - * This file is a part of LuminanceHDR package. +/* + * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2009 Franco Comida * @@ -17,45 +17,45 @@ * 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 */ +//! \author Franco Comida +//! \author Davide Anastasia + #include "ProgressHelper.h" +using namespace pfs; + ProgressHelper::ProgressHelper(QObject *p): QObject(p), - m_terminate(false) + Progress() {} -void ProgressHelper::terminate(bool b) -{ - m_terminate = b; -} - -bool ProgressHelper::isTerminationRequested() +void ProgressHelper::setValue(int value) { - return m_terminate; + Progress::setValue(value); + emit qtSetValue(value); } -void ProgressHelper::emitSetValue(int progress) +void ProgressHelper::setMaximum(int maximum) { - emit setValue(progress); + Progress::setMaximum(maximum); + emit qtSetMaximum(maximum); } -void ProgressHelper::emitSetMaximum(int m) +void ProgressHelper::setMinimum(int minimum) { - emit setMaximum(m); + Progress::setMinimum(minimum); + emit qtSetMinimum(minimum); } -void ProgressHelper::emitSetMinimum(int m) +void ProgressHelper::setRange(int minimum, int maximum) { - emit setMinimum(m); + Progress::setRange(minimum, maximum); + emit qtSetRange(minimum, maximum); } -void ProgressHelper::newValue(int progress) +void ProgressHelper::qtCancel(bool b) { - emit setValue(progress); + Progress::cancel(b); } - - diff -Nru luminance-hdr-2.3.0/src/Common/ProgressHelper.h luminance-hdr-2.3.1/src/Common/ProgressHelper.h --- luminance-hdr-2.3.0/src/Common/ProgressHelper.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/ProgressHelper.h 2013-04-07 18:41:14.000000000 +0000 @@ -2,6 +2,7 @@ * This file is a part of LuminanceHDR package. * ---------------------------------------------------------------------- * Copyright (C) 2009 Franco Comida + * 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 @@ -18,36 +19,38 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Franco Comida */ -#ifndef PROGRESS_HELPER -#define PROGRESS_HELPER +//! \author Franco Comida +//! \author Davide Anastasia + +#ifndef PROGRESSHELPER_H +#define PROGRESSHELPER_H #include +#include "Libpfs/progress.h" -class ProgressHelper : public QObject +//! \brief glue between pfs::Progress and Qt signal/slot +class ProgressHelper + : public QObject, public pfs::Progress { Q_OBJECT public: - ProgressHelper(QObject *p = 0); - - ///! backcompatibility - void newValue(int progress); - void emitSetValue(int progress); - void emitSetMaximum(int max); - void emitSetMinimum(int min); + ProgressHelper(QObject *p = 0); - bool isTerminationRequested(); + void setValue(int value); + void setRange(int minimum, int maximum); + void setMaximum(int maximum); + void setMinimum(int minimum); public slots: - void terminate(bool b = true); -private: - bool m_terminate; + void qtCancel(bool b = true); + signals: - void setValue(int progress); - void setMaximum(int max); - void setMinimum(int min); + void qtSetValue(int value); + void qtSetRange(int minimum, int maximum); + void qtSetMaximum(int max); + void qtSetMinimum(int min); }; -#endif +#endif // PROGRESSHELPER_H diff -Nru luminance-hdr-2.3.0/src/Common/ResourceHandler.h luminance-hdr-2.3.1/src/Common/ResourceHandler.h --- luminance-hdr-2.3.0/src/Common/ResourceHandler.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/ResourceHandler.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * 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 RESOURCEHANDLER_H -#define RESOURCEHANDLER_H - -template -struct ResourceHandlerTraits -{ - static - 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 // : boost::noncopyable -{ -public: - ResourceHandler(T* p = 0): - p_(p) - {} - - inline - void reset(T* p = 0) - { - if (p == p_) return; - if (p_ != 0) - { - Traits::cleanup(p_); - } - p_ = p; - } - - inline - ~ResourceHandler() - { - T *oldD = this->p_; - Traits::cleanup(oldD); - this->p_ = 0; - } - - inline - T* data() - { - return p_; - } - - inline - T* take() - { - T* old_p = p_; - p_ = 0; - return old_p; - } - - inline - operator bool() - { - return p_; - } - - inline - bool operator!() - { - return !p_; - } - - -private: - ResourceHandler(const ResourceHandler&); - ResourceHandler& operator=(const ResourceHandler&); - - T* p_; -}; - -#endif // RESOURCEHANDLER_H diff -Nru luminance-hdr-2.3.0/src/Common/ResourceHandlerCommon.h luminance-hdr-2.3.1/src/Common/ResourceHandlerCommon.h --- luminance-hdr-2.3.0/src/Common/ResourceHandlerCommon.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/ResourceHandlerCommon.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * 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 RESOURCEHANDLERCOMMON_H -#define RESOURCEHANDLERCOMMON_H - -//! \file ResourceHandlerCommon.h -//! \brief This file contains simple resource handlers -//! \author Davide Anastasia -//! \date 2012 05 05 -//! \since 2.3.0-beta1 - -#include -#include - -struct ResourceHandlerTraitsStdIoFile -{ - static inline - void cleanup(FILE* p) - { - if ( p ) fclose(p); - } -}; -typedef QScopedPointer ResouceHandlerFile; - -#endif diff -Nru luminance-hdr-2.3.0/src/Common/ResourceHandlerLcms.h luminance-hdr-2.3.1/src/Common/ResourceHandlerLcms.h --- luminance-hdr-2.3.0/src/Common/ResourceHandlerLcms.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/ResourceHandlerLcms.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * 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 RESOURCEHANDLERLCMS_H -#define RESOURCEHANDLERLCMS_H - -//! \file ResourceHandlerLcms.h -//! \brief This file contains simple resource handlers for LCMS2 library -//! \author Davide Anastasia -//! \date 2012 05 05 -//! \since 2.3.0-beta1 - -#include "ResourceHandler.h" -#include -#include -#ifdef QT_DEBUG -#include -#endif - -struct CleanUpCmsProfile -{ - static inline - void cleanup(cmsHPROFILE profile) - { - if ( profile ) - { -#ifdef QT_DEBUG - qDebug() << "CleanUpCmsProfile::cleanup()"; -#endif - cmsCloseProfile(profile); - } - } -}; -typedef ResourceHandler ScopedCmsProfile; -// typedef ResourceHandler ScopedCmsProfile; - -struct CleanUpCmsTransform -{ - static inline - void cleanup(cmsHTRANSFORM transform) - { - if ( transform ) - { -#ifdef QT_DEBUG - qDebug() << "CleanUpCmsTransform::cleanup()"; -#endif - cmsDeleteTransform(transform); - } - } -}; -typedef ResourceHandler ScopedCmsTransform; -//typedef QScopedPointer ScopedCmsTransformV2; - -#endif diff -Nru luminance-hdr-2.3.0/src/Common/TranslatorManager.cpp luminance-hdr-2.3.1/src/Common/TranslatorManager.cpp --- luminance-hdr-2.3.0/src/Common/TranslatorManager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/TranslatorManager.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,92 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include "TranslatorManager.h" +#include "global.hxx" + +#include +#include +#include + +TranslatorManager::ScopedQTranslator TranslatorManager::sm_appTranslator; +TranslatorManager::ScopedQTranslator TranslatorManager::sm_qtTranslator; + +void TranslatorManager::setLanguage(const QString& lang, bool installQtTranslation) +{ + if ( lang == "en" ) { + cleanAppTranslator(); + cleanQtTranslator(); + + return; + } + + setAppTranslator(lang); + if ( installQtTranslation ) setQtTranslator(lang); +} + +void TranslatorManager::cleanAppTranslator() +{ + if ( sm_appTranslator ) { + QCoreApplication::removeTranslator(sm_appTranslator.data()); + sm_appTranslator.reset(); + } +} + +void TranslatorManager::cleanQtTranslator() +{ + if ( sm_qtTranslator ) { + QCoreApplication::removeTranslator(sm_qtTranslator.data()); + sm_qtTranslator.reset(); + } +} + +void TranslatorManager::setAppTranslator(const QString& lang) +{ + qDebug() << "I18NDIR: " << I18NDIR; + cleanAppTranslator(); + + ScopedQTranslator appTranslator( new QTranslator() ); + + if ( appTranslator->load(QString("lang_") + lang, QString("i18n")) || + appTranslator->load(QString("lang_") + lang, I18NDIR) ) + { + QCoreApplication::installTranslator(appTranslator.data()); + sm_appTranslator.swap( appTranslator ); + } +} + +void TranslatorManager::setQtTranslator(const QString& lang) +{ + qDebug() << "QLibraryInfo::location(QLibraryInfo::TranslationsPath)): " + << QLibraryInfo::location(QLibraryInfo::TranslationsPath); + cleanQtTranslator(); + + 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)) ) + { + QCoreApplication::installTranslator(qtTranslator.data()); + sm_qtTranslator.swap( qtTranslator ); + } +} diff -Nru luminance-hdr-2.3.0/src/Common/TranslatorManager.h luminance-hdr-2.3.1/src/Common/TranslatorManager.h --- luminance-hdr-2.3.0/src/Common/TranslatorManager.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/TranslatorManager.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef TRANSLATORMANAGER_H +#define TRANSLATORMANAGER_H + +#include +#include + +//! \brief QTranslator context manager +class TranslatorManager +{ +public: + typedef QScopedPointer ScopedQTranslator; + + static + void setLanguage(const QString& lang, bool installQtTranslation = true); + +private: + static void setAppTranslator(const QString& lang); + static void setQtTranslator(const QString& lang); + + static void cleanAppTranslator(); + static void cleanQtTranslator(); + + static ScopedQTranslator sm_appTranslator; + static ScopedQTranslator sm_qtTranslator; +}; + +#endif // TRANSLATORMANAGER_H diff -Nru luminance-hdr-2.3.0/src/Common/config.h luminance-hdr-2.3.1/src/Common/config.h --- luminance-hdr-2.3.0/src/Common/config.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -/** - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * @author Giuseppe Rota - * @author Davide Anastasia - * Refactory of the options - */ - -#ifndef LUMINANCECONFIG_H -#define LUMINANCECONFIG_H - -#define LUMINANCEORGANIZATION "Luminance" -#define LUMINANCEAPPLICATION "Luminance" - -#define LUMINANCEVERSION "2.3.0" -#ifdef WIN32 -#define LUMINANCEVERSION_RES 2,3,0 // numeric fileversion for .rc file (format: '0,0,0') -#endif -#define TMOSETTINGSVERSION "0.6" - -#define KEY_TOOLBAR_MODE "MainWindowToolbarVisualizationMode" -#define KEY_TM_TOOLBAR_MODE "TonemappingWindowToolbarVisualizationMode" -#define KEY_MANUAL_AG_MASK_COLOR "ManualAntiGhostingMaskColor" -#define KEY_GUI_LANG "UserInterfaceLanguage" - -#define KEY_EXTERNAL_AIS_OPTIONS "External_Tools_Options/ExternalAlignImageStackOptions" - -#define KEY_NANINFCOLOR "HDR_visualization/nan_inf_color" -#define KEY_NEGCOLOR "HDR_visualization/neg_color" - -#define KEY_TEMP_RESULT_PATH "Tonemapping_Options/TemporaryFilesPath" - -#define KEY_SAVE_LOGLUV "TIFF_Options/TiffSaveLogLuv" - -#define KEY_TMOWINDOW_PREVIEWS_WIDTH "TMOWindow_Options/TMOWindow_PreviewsWidth" -#define KEY_TMOWINDOW_MAX "TMOWindow_Options/TMOWindow_Max" -#define KEY_TMOWINDOW_SHOWPROCESSED "TMOWindow_Options/TMOWindow_ShowProcessed" -#define KEY_TMOWINDOW_SHOWPREVIEWPANEL "TMOWindow_Options/TMOWindow_ShowPreviewPanel" -#define KEY_WIZARD_SHOWFIRSTPAGE "HDR_Wizard_Options/Wizard_ShowFirstPage" - -#define KEY_TMOWARNING_FATTALSMALL "TMOWarning_Options/TMOWarning_fattalsmall" - -#define KEY_ABER_0 "Raw_Conversion_Options/aber_0" -#define KEY_ABER_1 "Raw_Conversion_Options/aber_1" -#define KEY_ABER_2 "Raw_Conversion_Options/aber_2" -#define KEY_ABER_3 "Raw_Conversion_Options/aber_3" -#define KEY_GAMM_0 "Raw_Conversion_Options/gamm_0" -#define KEY_GAMM_1 "Raw_Conversion_Options/gamm_1" -#define KEY_TK "Raw_Conversion_Options/TK" -#define KEY_GREEN "Raw_Conversion_Options/green" -#define KEY_USER_MUL_0 "Raw_Conversion_Options/user_mul_0" -#define KEY_USER_MUL_1 "Raw_Conversion_Options/user_mul_1" -#define KEY_USER_MUL_2 "Raw_Conversion_Options/user_mul_2" -#define KEY_USER_MUL_3 "Raw_Conversion_Options/user_mul_3" -#define KEY_USE_AUTO_BRIGHTNESS "Raw_Conversion_Options/use_auto_brightness" -#define KEY_BRIGHTNESS "Raw_Conversion_Options/brightness" -#define KEY_THRESHOLD "Raw_Conversion_Options/threshold" -#define KEY_HALF_SIZE "Raw_Conversion_Options/half_size" -#define KEY_FOUR_COLOR_RGB "Raw_Conversion_Options/four_color_rgb" -#define KEY_HIGHLIGHTS "Raw_Conversion_Options/highlights" -#define KEY_LEVEL "Raw_Conversion_Options/level" -#define KEY_WB_METHOD "Raw_Conversion_Options/wb_method" -#define KEY_OUTPUT_COLOR "Raw_Conversion_Options/output_color" -#define KEY_OUTPUT_PROFILE "Raw_Conversion_Options/output_profile" -#define KEY_CAMERA_PROFILE "Raw_Conversion_Options/camera_profile" -#define KEY_USER_FLIP "Raw_Conversion_Options/user_flip" -#define KEY_USER_QUAL "Raw_Conversion_Options/user_qual" -#define KEY_USER_BLACK "Raw_Conversion_Options/user_black" -#define KEY_USER_SAT "Raw_Conversion_Options/user_sat" -#define KEY_MED_PASSES "Raw_Conversion_Options/med_passes" -#define KEY_AUTO_BRIGHT "Raw_Conversion_Options/auto_bright" -#define KEY_AUTO_BRIGHT_THR "Raw_Conversion_Options/auto_bright_thr" -#define KEY_ADJUST_MAXIMUM_THR "Raw_Conversion_Options/adjust_maximum_thr" -#define KEY_DO_NOT_USE_FUJI_ROTATE "Raw_Conversion_Options/do_not_use_fuji_rotate" -#define KEY_USE_BLACK "Raw_Conversion_Options/use_black" -#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_COLOR_CAMERA_PROFILE "Color_Management_Options/camera_profile" -#define KEY_COLOR_CAMERA_PROFILE_FILENAME "Color_Management_Options/camera_profile_filename" -#define KEY_COLOR_MONITOR_PROFILE_FILENAME "Color_Management_Options/monitor_profile_filename" -#define KEY_COLOR_PRINTER_PROFILE_FILENAME "Color_Management_Options/printer_profile_filename" - -//--------------------PATHS & co. ---------------- -#define KEY_RECENT_PATH_LOAD_SAVE_HDR "Recent_path_loadsave_hdr" -#define KEY_RECENT_FILES "Recent_files_list" -#define KEY_RECENT_PATH_LOAD_SAVE_TMO_SETTINGS "Recent_path_TMO_settings" -#define KEY_RECENT_PATH_SAVE_LDR "Recent_path_save_ldr" -#define KEY_RECENT_PATH_LOAD_LDRs_FOR_HDR "Recent_path_input_for_hdr" -// Exif -#define KEY_RECENT_PATH_EXIF_FROM "Exif/Recent_path_exif_from" -#define KEY_RECENT_PATH_EXIF_TO "Exif/Recent_path_exif_to" -// Batch HDR -#define KEY_BATCH_HDR_PATH_INPUT "batch_hdr/path_input" -#define KEY_BATCH_HDR_PATH_OUTPUT "batch_hdr/path_output" -// Batch TM -#define KEY_BATCH_TM_PATH_INPUT "batch_tm/path_hdr_input" -#define KEY_BATCH_TM_PATH_TMO_SETTINGS "batch_tm/path_tmo_settings" -#define KEY_BATCH_TM_PATH_OUTPUT "batch_tm/path_ldr_output" -#define KEY_BATCH_TM_LDR_FORMAT "batch_tm/Batch_LDR_Format" -#define KEY_BATCH_TM_NUM_THREADS "batch_tm/Num_Batch_Threads" - -#endif diff -Nru luminance-hdr-2.3.0/src/Common/config.h.in luminance-hdr-2.3.1/src/Common/config.h.in --- luminance-hdr-2.3.0/src/Common/config.h.in 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/config.h.in 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,122 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2006,2007 Giuseppe Rota + * Copyright (C) 2011 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 + * ---------------------------------------------------------------------- + * + * @author Giuseppe Rota + * @author Davide Anastasia + * Refactory of the options + */ + +#ifndef LUMINANCECONFIG_H +#define LUMINANCECONFIG_H + +#define LUMINANCEORGANIZATION "Luminance" +#define LUMINANCEAPPLICATION "Luminance" + +#define LUMINANCEVERSION "@LHDR_VERSION@" // "2.3.0" + +#define LUMINANCEVERSION_NUM @LHDR_VERSION_MAJOR@0@LHDR_VERSION_MINOR@0099 // +#ifdef WIN32 +#define LUMINANCEVERSION_RES @LHDR_VERSION_MAJOR@,@LHDR_VERSION_MINOR@,@LHDR_VERSION_PATCH@ // numeric fileversion for .rc file (format: '0,0,0') +#endif +#define TMOSETTINGSVERSION "0.6" + +#define KEY_TOOLBAR_MODE "MainWindowToolbarVisualizationMode" +#define KEY_TM_TOOLBAR_MODE "TonemappingWindowToolbarVisualizationMode" +#define KEY_MANUAL_AG_MASK_COLOR "ManualAntiGhostingMaskColor" +#define KEY_MANUAL_AG_LASSO_COLOR "ManualAntiGhostingLassoColor" +#define KEY_GUI_LANG "UserInterfaceLanguage" +#define KEY_PREVIEW_PANEL_MODE "MainWindowPreviewPanelVisualizationMode" + +#define KEY_EXTERNAL_AIS_OPTIONS "External_Tools_Options/ExternalAlignImageStackOptions" + +#define KEY_NANINFCOLOR "HDR_visualization/nan_inf_color" +#define KEY_NEGCOLOR "HDR_visualization/neg_color" + +#define KEY_SAVE_LOGLUV "TIFF_Options/TiffSaveLogLuv" + +#define KEY_TMOWINDOW_PREVIEWS_WIDTH "TMOWindow_Options/TMOWindow_PreviewsWidth" +#define KEY_TMOWINDOW_MAX "TMOWindow_Options/TMOWindow_Max" +#define KEY_TMOWINDOW_SHOWPROCESSED "TMOWindow_Options/TMOWindow_ShowProcessed" +#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_TMOWARNING_FATTALSMALL "TMOWarning_Options/TMOWarning_fattalsmall" + +#define KEY_ABER_0 "Raw_Conversion_Options/aber_0" +#define KEY_ABER_1 "Raw_Conversion_Options/aber_1" +#define KEY_ABER_2 "Raw_Conversion_Options/aber_2" +#define KEY_ABER_3 "Raw_Conversion_Options/aber_3" +#define KEY_GAMM_0 "Raw_Conversion_Options/gamm_0" +#define KEY_GAMM_1 "Raw_Conversion_Options/gamm_1" +#define KEY_TK "Raw_Conversion_Options/TK" +#define KEY_GREEN "Raw_Conversion_Options/green" +#define KEY_USER_MUL_0 "Raw_Conversion_Options/user_mul_0" +#define KEY_USER_MUL_1 "Raw_Conversion_Options/user_mul_1" +#define KEY_USER_MUL_2 "Raw_Conversion_Options/user_mul_2" +#define KEY_USER_MUL_3 "Raw_Conversion_Options/user_mul_3" +#define KEY_USE_AUTO_BRIGHTNESS "Raw_Conversion_Options/use_auto_brightness" +#define KEY_BRIGHTNESS "Raw_Conversion_Options/brightness" +#define KEY_THRESHOLD "Raw_Conversion_Options/threshold" +#define KEY_HALF_SIZE "Raw_Conversion_Options/half_size" +#define KEY_FOUR_COLOR_RGB "Raw_Conversion_Options/four_color_rgb" +#define KEY_HIGHLIGHTS "Raw_Conversion_Options/highlights" +#define KEY_LEVEL "Raw_Conversion_Options/level" +#define KEY_WB_METHOD "Raw_Conversion_Options/wb_method" +#define KEY_OUTPUT_COLOR "Raw_Conversion_Options/output_color" +#define KEY_OUTPUT_PROFILE "Raw_Conversion_Options/output_profile" +#define KEY_CAMERA_PROFILE "Raw_Conversion_Options/camera_profile" +#define KEY_USER_FLIP "Raw_Conversion_Options/user_flip" +#define KEY_USER_QUAL "Raw_Conversion_Options/user_qual" +#define KEY_USER_BLACK "Raw_Conversion_Options/user_black" +#define KEY_USER_SAT "Raw_Conversion_Options/user_sat" +#define KEY_MED_PASSES "Raw_Conversion_Options/med_passes" +#define KEY_AUTO_BRIGHT "Raw_Conversion_Options/auto_bright" +#define KEY_AUTO_BRIGHT_THR "Raw_Conversion_Options/auto_bright_thr" +#define KEY_ADJUST_MAXIMUM_THR "Raw_Conversion_Options/adjust_maximum_thr" +#define KEY_DO_NOT_USE_FUJI_ROTATE "Raw_Conversion_Options/do_not_use_fuji_rotate" +#define KEY_USE_BLACK "Raw_Conversion_Options/use_black" +#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_COLOR_CAMERA_PROFILE "Color_Management_Options/camera_profile" +#define KEY_COLOR_CAMERA_PROFILE_FILENAME "Color_Management_Options/camera_profile_filename" +#define KEY_COLOR_MONITOR_PROFILE_FILENAME "Color_Management_Options/monitor_profile_filename" +#define KEY_COLOR_PRINTER_PROFILE_FILENAME "Color_Management_Options/printer_profile_filename" + +//--------------------PATHS & co. ---------------- +#define KEY_RECENT_FILES "Recent_files_list" + +// Exif +#define KEY_RECENT_PATH_EXIF_FROM "Exif/Recent_path_exif_from" +#define KEY_RECENT_PATH_EXIF_TO "Exif/Recent_path_exif_to" +// Batch HDR +#define KEY_BATCH_HDR_PATH_INPUT "batch_hdr/path_input" +#define KEY_BATCH_HDR_PATH_OUTPUT "batch_hdr/path_output" +// Batch TM +#define KEY_BATCH_TM_PATH_INPUT "batch_tm/path_hdr_input" +#define KEY_BATCH_TM_PATH_TMO_SETTINGS "batch_tm/path_tmo_settings" +#define KEY_BATCH_TM_PATH_OUTPUT "batch_tm/path_ldr_output" +#define KEY_BATCH_TM_LDR_FORMAT "batch_tm/Batch_LDR_Format" +#define KEY_BATCH_TM_NUM_THREADS "batch_tm/Num_Batch_Threads" + +#endif diff -Nru luminance-hdr-2.3.0/src/Common/global.cpp luminance-hdr-2.3.1/src/Common/global.cpp --- luminance-hdr-2.3.0/src/Common/global.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/global.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,29 +31,29 @@ #include #include "Common/config.h" - -#include "Common/LuminanceOptions.h" +#include "Common/global.hxx" #include "Common/global.h" -#include "global.hxx" +#include "Common/LuminanceOptions.h" -bool matchesLdrFilename(QString file) + +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(QString file) +bool matchesHdrFilename(const QString& file) { 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); return exp.exactMatch(file); } -bool matchesValidHDRorLDRfilename(QString file) +bool matchesValidHDRorLDRfilename(const QString& file) { return matchesLdrFilename(file) || matchesHdrFilename(file); } -QStringList convertUrlListToFilenameList(QList urls) +QStringList convertUrlListToFilenameList(const QList& urls) { QStringList files; for (int i = 0; i < urls.size(); ++i) @@ -66,48 +66,3 @@ } return files; } - -namespace -{ -typedef QScopedPointer ScopedQTranslator; - -ScopedQTranslator lastGuiTranslator; -ScopedQTranslator lastQtTranslator; -} - -void installTranslators(const QString& lang, bool installQtTranslations) -{ - if (lastGuiTranslator) - { - QCoreApplication::removeTranslator(lastGuiTranslator.data()); - lastGuiTranslator.reset(); - } - if (installQtTranslations && lastQtTranslator) - { - QCoreApplication::removeTranslator(lastQtTranslator.data()); - lastQtTranslator.reset(); - } - if (lang != "en") - { - ScopedQTranslator guiTranslator( new QTranslator() ); - - guiTranslator->load(QString("lang_") + lang, I18NDIR); - QCoreApplication::installTranslator(guiTranslator.data()); - lastGuiTranslator.swap( guiTranslator ); - - if (installQtTranslations) - { - ScopedQTranslator qtTranslator( new QTranslator() ); - - qtTranslator->load(QString("qt_") + lang, I18NDIR); - QCoreApplication::installTranslator(qtTranslator.data()); - lastQtTranslator.swap( qtTranslator ); - } - } -} - -void installTranslators(bool installQtTranslations) -{ - LuminanceOptions luminance_options; - installTranslators(luminance_options.getGuiLang(), installQtTranslations); -} diff -Nru luminance-hdr-2.3.0/src/Common/global.h luminance-hdr-2.3.1/src/Common/global.h --- luminance-hdr-2.3.0/src/Common/global.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/global.h 2013-04-07 18:41:14.000000000 +0000 @@ -2,6 +2,7 @@ * This file is a part of LuminanceHDR package. * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota + * Copyright (C) 2010-2012 Davide Anastasia, Franco Comida, Daniel Kaneider * * 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 @@ -17,10 +18,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- - * - * @author Giuseppe Rota */ +//! \author Davide Anastasia +//! \author Daniel Kaneider +//! \author Franco Comida +//! \author Giuseppe Rota + #ifndef GLOBAL_H #define GLOBAL_H @@ -30,12 +34,9 @@ #include #include -bool matchesLdrFilename(QString file); -bool matchesHdrFilename(QString file); -bool matchesValidHDRorLDRfilename(QString file); -QStringList convertUrlListToFilenameList(QList urls); - -void installTranslators(bool installQtTranslations); -void installTranslators(const QString& lang, bool installQtTranslations); +bool matchesLdrFilename(const QString& file); +bool matchesHdrFilename(const QString& file); +bool matchesValidHDRorLDRfilename(const QString& file); +QStringList convertUrlListToFilenameList(const QList& urls); #endif diff -Nru luminance-hdr-2.3.0/src/Common/msec_timer.cpp luminance-hdr-2.3.1/src/Common/msec_timer.cpp --- luminance-hdr-2.3.0/src/Common/msec_timer.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/msec_timer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -/** - * @brief Milliseconds Timer - * - * ---------------------------------------------------------------------- - * 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 - * ---------------------------------------------------------------------- - * - * http://msdn.microsoft.com/en-us/library/ms644904%28v=VS.85%29.aspx - * - * @author Davide Anastasia, - * - */ - -#include "msec_timer.h" - -//costructor -msec_timer::msec_timer(): -#ifdef WIN_TIMER -wrk_time(0.0) -#elif __APPLE__ -start_t(0), stop_t(0), wrk_time(0), conversion(1.0) -#else -wrk_time(0.0) -#endif -{ -#ifdef WIN_TIMER - QueryPerformanceFrequency(&freq); -#elif __APPLE__ - 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); -#else - -#endif -} - -msec_timer::~msec_timer() // destructor -{ - // nothing to do -} - -void msec_timer::start() -{ -#ifdef WIN_TIMER - QueryPerformanceCounter(&start_t); -#elif __APPLE__ - start_t = mach_absolute_time(); -#else - gettimeofday(&start_t, NULL); -#endif -} - -void msec_timer::stop() -{ -#ifdef WIN_TIMER - QueryPerformanceCounter(&stop_t); -#elif __APPLE__ - stop_t = mach_absolute_time(); -#else - gettimeofday(&stop_t, NULL); -#endif -} - -void msec_timer::update() -{ -#ifdef WIN_TIMER - wrk_time += ((double)(stop_t.QuadPart - start_t.QuadPart)); -#elif __APPLE__ - 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); -#endif -} - -void msec_timer::stop_and_update() -{ - stop(); - update(); -} - -void msec_timer::reset() -{ - wrk_time = 0.0; -} - -double msec_timer::get_time() -{ -#ifdef WIN_TIMER - return (wrk_time * 1000.0 / freq.QuadPart); -#elif __APPLE__ - return (conversion * (double) wrk_time * 1000.0); -#else - return wrk_time; -#endif -} - -void msec_timer::get_timer_type() -{ -#ifdef WIN_TIMER - printf(" QueryPerformanceCounter()\n"); -#elif __APPLE__ - printf(" mach_absolute_time()\n"); -#else - // 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)); -} diff -Nru luminance-hdr-2.3.0/src/Common/msec_timer.h luminance-hdr-2.3.1/src/Common/msec_timer.h --- luminance-hdr-2.3.0/src/Common/msec_timer.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Common/msec_timer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -/** - * @brief Milliseconds Timer - * - * ---------------------------------------------------------------------- - * 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 - * ---------------------------------------------------------------------- - * - * http://msdn.microsoft.com/en-us/library/ms644904%28v=VS.85%29.aspx - * - * @author Davide Anastasia, - * - */ - -#ifndef MSEC_TIMER_H -#define MSEC_TIMER_H - -#if defined(_WIN32) || defined(__CYGWIN__) -#define WIN_TIMER -#endif - -/* - * this define enables the timing profile - * You should comment this define if you want to disable this feature - */ -#ifndef QT_NO_DEBUG -#define TIMER_PROFILING -#endif - -#include -//#include - -// TIMER ----- -#ifdef WIN_TIMER -#include -#elif __APPLE__ -#include -#include -#else -//#include -#include -#endif - -class msec_timer { -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; -#else - 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(); - - void get_timer_type(); -}; - -double convert_to_gigaflops(double, double); - -#endif // MSEC_TIMER_H diff -Nru luminance-hdr-2.3.0/src/Core/IOWorker.cpp luminance-hdr-2.3.1/src/Core/IOWorker.cpp --- luminance-hdr-2.3.0/src/Core/IOWorker.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/IOWorker.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,17 +35,26 @@ #include #include "Core/IOWorker.h" + +#include "Libpfs/frame.h" #include "Fileformat/pfs_file_format.h" -#include "Libpfs/domio.h" +#include "Fileformat/jpegwriter.h" #include "Viewers/GenericViewer.h" #include "Common/LuminanceOptions.h" -#include "Fileformat/pfsout16bitspixmap.h" -#include "Fileformat/pfsoutldrimage.h" #include "Core/TonemappingOptions.h" #include "Exif/ExifOperations.h" -IOWorker::IOWorker(QObject* parent): - QObject(parent) +#include +#include +#include +#include +#include +#include + +using namespace pfs::io; + +IOWorker::IOWorker(QObject* parent) + : QObject(parent) {} IOWorker::~IOWorker() @@ -55,11 +64,19 @@ #endif } -bool IOWorker::write_hdr_frame(GenericViewer* hdr_viewer, const QString& filename) +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() ); + pfs::Frame* hdr_frame = hdr_viewer->getFrame(); - bool status = write_hdr_frame(hdr_frame, filename); + bool status = write_hdr_frame(hdr_frame, filename, + params2); if ( status ) { @@ -70,7 +87,8 @@ return status; } -bool IOWorker::write_hdr_frame(pfs::Frame *hdr_frame, const QString& filename) +bool IOWorker::write_hdr_frame(pfs::Frame *hdr_frame, const QString& filename, + const pfs::Params& params) { bool status = true; emit IO_init(); @@ -81,181 +99,172 @@ if (qfi.suffix().toUpper() == "EXR") { - writeEXRfile(hdr_frame, encodedName); + EXRWriter writer(encodedName.constData()); + writer.write(*hdr_frame, params); } else if (qfi.suffix().toUpper() == "HDR") { - writeRGBEfile(hdr_frame, encodedName); + RGBEWriter writer(encodedName.constData()); + writer.write(*hdr_frame, params); } else if (qfi.suffix().toUpper().startsWith("TIF")) { - LuminanceOptions LuminanceOptions; - - TiffWriter tiffwriter(encodedName, hdr_frame); - connect(&tiffwriter, SIGNAL(maximumValue(int)), this, SIGNAL(setMaximum(int))); - connect(&tiffwriter, SIGNAL(nextstep(int)), this, SIGNAL(setValue(int))); - if (LuminanceOptions.isSaveLogLuvTiff() ) - { - tiffwriter.writeLogLuvTiff(); - } - else - { - tiffwriter.writeFloatTiff(); + pfs::Params writerParams(params); + if ( !writerParams.count("tiff_mode") ) { + LuminanceOptions lumOpts; + // LogLuv is not implemented yet in the new TiffWriter... + if ( lumOpts.isSaveLogLuvTiff() ) { + writerParams.set( "tiff_mode", 3 ); + } else { + writerParams.set( "tiff_mode", 2 ); + } } + + TiffWriter writer(encodedName.constData()); + status = writer.write(*hdr_frame, writerParams); } else if (qfi.suffix().toUpper() == "PFS") { - FILE *fd = fopen(encodedName, "w"); - pfs::DOMIO pfsio; - pfsio.writeFrame(hdr_frame, fd); - fclose(fd); + pfs::io::PfsWriter writer(encodedName.constData()); + status = writer.write(*hdr_frame, pfs::Params()); } else { - // Default as EXR - writeEXRfile(hdr_frame, QFile::encodeName(absoluteFileName + ".exr")); + EXRWriter writer(encodedName.constData()); + writer.write(*hdr_frame, params); } - emit write_hdr_success(hdr_frame, filename); + if ( status ) { + emit write_hdr_success(hdr_frame, filename); + } else { + emit write_hdr_failed(); + } emit IO_finish(); - return status; } bool IOWorker::write_ldr_frame(GenericViewer* ldr_viewer, - const QString& filename, int quality, - TonemappingOptions* tmopts) + 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, - tmopts, - ldr_viewer->getMinLuminanceValue(), - ldr_viewer->getMaxLuminanceValue(), - ldr_viewer->getLuminanceMappingMethod()); + filename, /*quality,*/ + inputFileName, + expoTimes, + tmopts, p2); - if ( status ) - { - if ( !ldr_viewer->isHDR() ) + if ( status ) { + if ( !ldr_viewer->isHDR() ) { ldr_viewer->setFileName(filename); + } emit write_ldr_success(ldr_viewer, filename); } - return status; } bool IOWorker::write_ldr_frame(pfs::Frame* ldr_input, const QString& filename, - int quality, + const QString& inputFileName, + const QVector& expoTimes, TonemappingOptions* tmopts, - float min_luminance, - float max_luminance, - LumMappingMethod mapping_method) + const pfs::Params& params) { + /* + // in the future I would like it to be like this: + + try { + FrameWriterPtr fr = FrameWriter::create( filename ); + + fr->write( frame, params); + + // ...do some more stuff! + + retur true; + } catch ( Exception& e) { + + return false; + } + + */ + bool status = true; emit IO_init(); QScopedPointer operations; - - if (tmopts != NULL) + if (tmopts != NULL) { operations.reset(new TMOptionsOperations(tmopts)); + } QFileInfo qfi(filename); - QString format = qfi.suffix(); QString absoluteFileName = qfi.absoluteFilePath(); QByteArray encodedName = QFile::encodeName(absoluteFileName); if (qfi.suffix().toUpper().startsWith("TIF")) { - // QScopedArrayPointer will call delete [] when this object goes out of scope - QScopedArrayPointer pixmap( - fromLDRPFSto16bitsPixmap(ldr_input, - min_luminance, - max_luminance, - mapping_method) - ); - int width = ldr_input->getWidth(); - int height = ldr_input->getHeight(); - try - { - TiffWriter tiffwriter(encodedName, pixmap.data(), width, height); - connect(&tiffwriter, SIGNAL(maximumValue(int)), this, SIGNAL(setMaximum(int))); - connect(&tiffwriter, SIGNAL(nextstep(int)), this, SIGNAL(setValue(int))); - tiffwriter.write16bitTiff(); - - if (tmopts != NULL) - ExifOperations::writeExifData(encodedName.constData(), operations->getExifComment().toStdString()); - - emit write_ldr_success(ldr_input, filename); - } - catch (...) - { - status = false; - emit write_ldr_failed(); - } + TiffWriter writer( encodedName.constData() ); + status = writer.write(*ldr_input, params); } else if (qfi.suffix().toUpper().startsWith("JP")) { - QScopedPointer image(fromLDRPFStoQImage(ldr_input, - min_luminance, - max_luminance, - mapping_method)); - JpegWriter writer(image.data(), filename, quality); - if (writer.writeQImageToJpeg()) - { - if (tmopts != NULL) - ExifOperations::writeExifData(encodedName.constData(), operations->getExifComment().toStdString()); - - emit write_ldr_success(ldr_input, filename); - } - else - { - status = false; - emit write_ldr_failed(); - } + JpegWriter writer( encodedName.constData() ); + status = writer.write(*ldr_input, params); } else if (qfi.suffix().toUpper().startsWith("PNG")) { - QScopedPointer image(fromLDRPFStoQImage(ldr_input, - min_luminance, - max_luminance, - mapping_method)); - PngWriter writer(image.data(), filename, quality); - if (writer.writeQImageToPng()) - { - if (tmopts != NULL) - ExifOperations::writeExifData(encodedName.constData(), operations->getExifComment().toStdString()); - - emit write_ldr_success(ldr_input, filename); - } - else - { - status = false; - emit write_ldr_failed(); - } + PngWriter writer(filename.toStdString()); + status = writer.write(*ldr_input, params); } else { + QString format = qfi.suffix(); // QScopedPointer will call delete when this object goes out of scope - QScopedPointer image(fromLDRPFStoQImage(ldr_input, min_luminance, max_luminance)); - if ( image->save(filename, format.toLocal8Bit(), quality) ) - { - if (tmopts != NULL) - ExifOperations::writeExifData(encodedName.constData(), operations->getExifComment().toStdString()); + QScopedPointer image(fromLDRPFStoQImage(ldr_input, 0.f, 1.f)); + status = image->save(filename, format.toLocal8Bit(), -1); + } - emit write_ldr_success(ldr_input, filename); - } - else + if ( status ) + { + // copy EXIF tags from the 1st bracketed image + if ( !inputFileName.isEmpty() ) { - status = false; - emit write_ldr_failed(); + 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"; + foreach (float e, expoTimes) { + comment += QString("%1").arg(e) + "\n"; + } + } + + ExifOperations::copyExifData(encodedInputFileName.constData(), + encodedName.constData(), + false, + comment.toStdString(), + true, false); } + + emit write_ldr_success(ldr_input, filename); + } + else + { + emit write_ldr_failed(); } - emit IO_finish(); + emit IO_finish(); return status; } @@ -278,7 +287,10 @@ pfs::Frame* hdrpfsframe = NULL; QStringList rawextensions; - rawextensions << "CRW" << "CR2" << "NEF" << "DNG" << "MRW" << "ORF" << "KDC" << "DCR" << "ARW" << "RAF" << "PTX" << "PEF" << "X3F" << "RAW" << "SR2" << "3FR" << "RW2" << "MEF" << "MOS" << "ERF" << "NRW" << "SRW"; + rawextensions << "CRW" << "CR2" << "NEF" << "DNG" << "MRW" << "ORF" + << "KDC" << "DCR" << "ARW" << "RAF" << "PTX" << "PEF" + << "X3F" << "RAW" << "SR2" << "3FR" << "RW2" << "MEF" + << "MOS" << "ERF" << "NRW" << "SRW"; try { @@ -288,23 +300,26 @@ QByteArray TempPath = QFile::encodeName(luminanceOptions.getTempDir()); QByteArray encodedFileName = QFile::encodeName(qfi.absoluteFilePath()); - if (extension=="EXR") - { - hdrpfsframe = readEXRfile(encodedFileName); - } - else if (extension=="HDR") + if ( extension=="EXR" ) { - hdrpfsframe = readRGBEfile(encodedFileName); + hdrpfsframe = new pfs::Frame(0, 0); // < To improve! + pfs::io::EXRReader reader(encodedFileName.constData()); + reader.read( *hdrpfsframe, pfs::Params() ); + reader.close(); + } + else if ( extension=="HDR" ) + { + hdrpfsframe = new pfs::Frame(0, 0); // < To improve! + pfs::io::RGBEReader reader(encodedFileName.constData()); + reader.read( *hdrpfsframe, pfs::Params() ); + reader.close(); } else if (extension=="PFS") { - //TODO : check this code and make it smoother - FILE *fd = fopen(encodedFileName, "rb"); - if (!fd) throw; - - pfs::DOMIO pfsio; - hdrpfsframe = pfsio.readFrame(fd); - fclose(fd); + hdrpfsframe = new pfs::Frame(0, 0); // < To improve! + pfs::io::PfsReader reader(encodedFileName.constData()); + reader.read( *hdrpfsframe, pfs::Params() ); + reader.close(); } else if (extension.startsWith("TIF")) { @@ -317,15 +332,15 @@ else if ( rawextensions.indexOf(extension) != -1 ) { // raw file detected - try { - hdrpfsframe = readRawIntoPfsFrame(encodedFileName, TempPath, &luminanceOptions, false, progress_cb, this); - } - catch (QString err) - { - qDebug("TH: catched exception"); - emit read_hdr_failed((err + " : %1").arg(filename)); - return NULL; - } + try { + hdrpfsframe = readRawIntoPfsFrame(encodedFileName, TempPath, &luminanceOptions, false, progress_cb, this); + } + catch (QString& err) + { + qDebug("TH: catched exception"); + emit read_hdr_failed((err + " : %1").arg(filename)); + return NULL; + } } else { diff -Nru luminance-hdr-2.3.0/src/Core/IOWorker.h luminance-hdr-2.3.1/src/Core/IOWorker.h --- luminance-hdr-2.3.0/src/Core/IOWorker.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/IOWorker.h 2013-04-07 18:41:14.000000000 +0000 @@ -39,11 +39,11 @@ #include #include -#include "Common/FloatRgbToQRgb.h" +#include +#include -// Forward declaration namespace pfs { - class Frame; +class Frame; } class GenericViewer; @@ -56,7 +56,8 @@ Q_OBJECT private: - friend int progress_cb(void *data, enum LibRaw_progress p, int iteration, int expected); + friend + int progress_cb(void *data, enum LibRaw_progress p, int iteration, int expected); void get_frame(QString fname); void emitNextStep(int iteration); @@ -69,22 +70,28 @@ public Q_SLOTS: pfs::Frame* read_hdr_frame(const QString& filename); - bool write_hdr_frame(pfs::Frame *frame, const QString& filename); - bool write_hdr_frame(GenericViewer* 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, int quality, + const QString& filename, + const QString& inputFileName, + const QVector& expoTimes, TonemappingOptions* tmopts = NULL, - float min_luminance = 0.0f, - float max_luminance = 1.0f, - LumMappingMethod mapping_method = MAP_LINEAR); + const pfs::Params& params = pfs::Params()); + bool write_ldr_frame(GenericViewer* frame, - const QString& filename, int quality, - TonemappingOptions* tmopts = NULL); + 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& error_message); - void read_hdr_success(pfs::Frame*, const QString& fname); + void read_hdr_failed(const QString&); + void read_hdr_success(pfs::Frame*, const QString&); void write_hdr_failed(); void write_hdr_success(pfs::Frame*, const QString&); diff -Nru luminance-hdr-2.3.0/src/Core/TMWorker.cpp luminance-hdr-2.3.1/src/Core/TMWorker.cpp --- luminance-hdr-2.3.0/src/Core/TMWorker.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/TMWorker.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -30,12 +30,14 @@ #endif #include "Libpfs/frame.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 "Filter/pfscut.h" -#include "Filter/pfsgamma.h" -#include "Filter/pfssize.h" #include "Common/ProgressHelper.h" -#include "TonemappingEngine/TonemapOperator.h" TMWorker::TMWorker(QObject* parent): QObject(parent), @@ -47,10 +49,10 @@ connect(this, SIGNAL(destroyed()), m_Callback, SLOT(deleteLater())); - connect(this, SIGNAL(tonemapRequestTermination()), m_Callback, SLOT(terminate()), Qt::DirectConnection); - connect(m_Callback, SIGNAL(setValue(int)), this, SIGNAL(tonemapSetValue(int)), Qt::DirectConnection); - connect(m_Callback, SIGNAL(setMinimum(int)), this, SIGNAL(tonemapSetMinimum(int)), Qt::DirectConnection); - connect(m_Callback, SIGNAL(setMaximum(int)), this, SIGNAL(tonemapSetMaximum(int)), Qt::DirectConnection); + 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); } TMWorker::~TMWorker() @@ -77,9 +79,9 @@ return NULL; } - if ( m_Callback->isTerminationRequested() ) + if ( m_Callback->canceled() ) { - m_Callback->terminate(false); + m_Callback->cancel(false); // double check this delete working_frame; return NULL; } @@ -92,14 +94,14 @@ void TMWorker::tonemapFrame(pfs::Frame* working_frame, TonemappingOptions* tm_options) { - m_Callback->terminate(false); + m_Callback->cancel(false); emit tonemapBegin(); // build tonemap object 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); + tmEngine->tonemapFrame(*working_frame, tm_options, *m_Callback); emit tonemapEnd(); delete tmEngine; @@ -114,26 +116,26 @@ // 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::pfscut(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); + 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 ) { // workingframe = "resize" - working_frame = pfs::resizeFrame(input_frame, tm_options->xsize); + working_frame = pfs::resize(input_frame, tm_options->xsize); } else { // workingframe = "full res" - working_frame = pfs::pfscopy(input_frame); + working_frame = pfs::copy(input_frame); } if ( tm_options->pregamma != 1.0f ) { - pfs::applyGammaOnFrame( working_frame, tm_options->pregamma ); + pfs::applyGamma( working_frame, tm_options->pregamma ); } return working_frame; diff -Nru luminance-hdr-2.3.0/src/Core/TMWorker.h luminance-hdr-2.3.1/src/Core/TMWorker.h --- luminance-hdr-2.3.0/src/Core/TMWorker.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/TMWorker.h 2013-04-07 18:41:14.000000000 +0000 @@ -46,15 +46,15 @@ ~TMWorker(); public Q_SLOTS: - ///! - ///! This function creates a copy of the input frame, tonemap the copy - ///! and then returns it - ///! + //! + //! This function creates a copy of the input frame, tonemap the copy + //! and then returns it + //! pfs::Frame* computeTonemap(/* const */pfs::Frame*, TonemappingOptions*); - ///! - ///! This function tonemap the input frame - ///! + //! + //! This function tonemap the input frame + //! void tonemapFrame(pfs::Frame*, TonemappingOptions*); private: diff -Nru luminance-hdr-2.3.0/src/Core/TonemappingOptions.cpp luminance-hdr-2.3.1/src/Core/TonemappingOptions.cpp --- luminance-hdr-2.3.0/src/Core/TonemappingOptions.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/TonemappingOptions.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -101,6 +101,8 @@ origxsize = INT_MAX; xsize = INT_MAX; + xsize_percent = 100; + quality = 100; pregamma = 1.0f; tonemapSelection = false; tmoperator = mantiuk06; @@ -111,10 +113,310 @@ selection_y_bottom_right = INT_MAX; } +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'; + } + return ' '; +} + +const QString TonemappingOptions::getPostfix() { + QString postfix=QString("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; + if (contrast_eq) { + postfix+=QString("contrast_equalization_%1_").arg(contrastfactor); + } else { + postfix+=QString("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; + if (setluminance) { + postfix+=QString("luminancelevel_%1_").arg(luminancelevel); + } else { + postfix+=QString("auto_luminance"); + } + postfix+=QString("colorsaturation_%1_").arg(colorsaturation); + postfix+=QString("contrastenhancement_%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 ashikhmin: + { + postfix+="ashikhmin_"; + if (operator_options.ashikhminoptions.simple) { + postfix+="-simple"; + } else { + if (operator_options.ashikhminoptions.eq2) { + postfix+="-eq2_"; + } else { + postfix+="-eq4_"; + } + postfix+=QString("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); + if (operator_options.pattanaikoptions.local) { + postfix+="local"; + } else if (operator_options.pattanaikoptions.autolum) { + postfix+="autolum"; + } else { + postfix+=QString("cone_%1_").arg(cone); + postfix+=QString("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); + 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); + } + } + 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; + } + return postfix; +} + +const QString TonemappingOptions::getCaption(bool pregamma, QString separator) { + QString caption=pregamma ? QString(QObject::tr("PreGamma=%1")).arg(pregamma) + separator : QString(); + switch (tmoperator) { + case mantiuk06: + { + caption+="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; + if (contrast_eq) { + caption+=QString(QObject::tr("Contrast Equalization") + "=%1").arg(contrastfactor); + } else { + caption+=QString(QObject::tr("Contrast") + "=%1").arg(contrastfactor); + } + caption += separator; + 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; + if (setluminance) { + caption+=QString(QObject::tr("Luminance Level") + "=%1").arg(luminancelevel); + } else { + 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: + { + 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 ashikhmin: + { + caption+="Ashikhmin:" + separator; + if (operator_options.ashikhminoptions.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.pattanaikoptions.local) { + caption+=QObject::tr("Local"); + } else if (operator_options.pattanaikoptions.autolum) { + caption+=QObject::tr("AutoLuminance"); + } else { + 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); + 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); + } + break; + } + return caption; +} -TonemappingOptions* TMOptionsOperations::parseFile(QString fname) { +TonemappingOptions* TMOptionsOperations::parseFile(const QString& fname) +{ QFile file(fname); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text) || file.size()==0) { + if ( !file.open(QIODevice::ReadOnly | QIODevice::Text) || + file.size()==0) + { throw (QApplication::tr("ERROR: cannot load Tone Mapping Setting file: ")+fname); return NULL; } @@ -202,7 +504,8 @@ } else if (field=="NOISE") { toreturn->operator_options.fattaloptions.noiseredux=value.toFloat(); } else if (field=="OLDFATTAL") { - toreturn->operator_options.fattaloptions.newfattal= (value == "NO"); + 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=="MULTIPLIER") { toreturn->operator_options.pattanaikoptions.multiplier=value.toFloat(); } else if (field=="LOCAL") { @@ -252,258 +555,8 @@ TMOptionsOperations::TMOptionsOperations(const TonemappingOptions* opts) : opts(opts) { } -QString TMOptionsOperations::getPostfix() { - QString postfix=QString("pregamma_%1_").arg(opts->pregamma); - switch (opts->tmoperator) { - case mantiuk06: { - postfix+="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; - if (contrast_eq) { - postfix+=QString("contrast_equalization_%1_").arg(contrastfactor); - } else { - postfix+=QString("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=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; - if (setluminance) { - postfix+=QString("luminancelevel_%1_").arg(luminancelevel); - } else { - postfix+=QString("auto_luminance"); - } - postfix+=QString("colorsaturation_%1_").arg(colorsaturation); - postfix+=QString("contrastenhancement_%1").arg(contrastenhancement); - } - break; - case fattal: { - if (!opts->operator_options.fattaloptions.newfattal) - postfix+="v1_"; - postfix+="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; - bool fftsolver=opts->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 ashikhmin: { - postfix+="ashikhmin_"; - if (opts->operator_options.ashikhminoptions.simple) { - postfix+="-simple"; - } else { - if (opts->operator_options.ashikhminoptions.eq2) { - postfix+="-eq2_"; - } else { - postfix+="-eq4_"; - } - postfix+=QString("local_%1").arg(opts->operator_options.ashikhminoptions.lct); - } - } - break; - case drago: { - postfix+="drago_"; - postfix+=QString("bias_%1").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; - 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=opts->operator_options.pattanaikoptions.multiplier; - float cone=opts->operator_options.pattanaikoptions.cone; - float rod=opts->operator_options.pattanaikoptions.rod; - postfix+="pattanaik00_"; - postfix+=QString("mul_%1_").arg(multiplier); - if (opts->operator_options.pattanaikoptions.local) { - postfix+="local"; - } else if (opts->operator_options.pattanaikoptions.autolum) { - postfix+="autolum"; - } else { - postfix+=QString("cone_%1_").arg(cone); - postfix+=QString("rod_%1_").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; - postfix+="reinhard02_"; - postfix+=QString("key_%1_").arg(key); - postfix+=QString("phi_%1").arg(phi); - if (opts->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); - } - } - break; - case reinhard05: { - float brightness=opts->operator_options.reinhard05options.brightness; - float chromaticAdaptation= opts->operator_options.reinhard05options.chromaticAdaptation; - float lightAdaptation=opts->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; - } - return postfix; -} - -QString TMOptionsOperations::getCaption() { - QString caption=QString("PreGamma=%1 ~ ").arg(opts->pregamma); - switch (opts->tmoperator) { - case mantiuk06: { - caption+="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; - if (contrast_eq) { - caption+=QString("Contrast Equalization=%1 ~ ").arg(contrastfactor); - } else { - caption+=QString("Contrast=%1 ~ ").arg(contrastfactor); - } - caption+=QString("Saturation=%1 ~ ").arg(saturationfactor); - caption+=QString("Detail=%1").arg(detailfactor); - } - break; - case mantiuk08: { - caption+="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; - if (setluminance) { - caption+=QString("Luminance Level=%1 ~ ").arg(luminancelevel); - } else { - caption+=QString("Luminance Level=Auto ~ "); - } - caption+=QString("Color Saturation=%1 ~ ").arg(colorsaturation); - caption+=QString("Contrast Enhancement=%1").arg(contrastenhancement); - } - break; - case fattal: { - if (!opts->operator_options.fattaloptions.newfattal) - caption+="V1_"; - 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; - bool fftsolver=opts->operator_options.fattaloptions.fftsolver; - caption+="Fattal: ~ "; - caption+=QString("Alpha=%1 ~ ").arg(alpha); - caption+=QString("Beta=%1 ~ ").arg(beta); - caption+=QString("Saturation=%1 ~ ").arg(saturation2); - caption+=QString("NoiseRedux=%1 ~ ").arg(noiseredux); - caption+=QString("FFTSolver=%1").arg(fftsolver); - } - break; - case ashikhmin: { - caption+="Ashikhmin: ~ "; - if (opts->operator_options.ashikhminoptions.simple) { - caption+="simple"; - } else { - if (opts->operator_options.ashikhminoptions.eq2) { - caption+="Equation 2 ~ "; - } else { - caption+="Equation 4 ~ "; - } - caption+=QString("Local=%1").arg(opts->operator_options.ashikhminoptions.lct); - } - } - break; - case drago: { - caption+="Drago: ~ "; - caption+=QString("Bias=%1").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; - caption+="Durand: ~ "; - caption+=QString("Spatial=%1 ~ ").arg(spatial); - caption+=QString("Range=%1 ~ ").arg(range); - caption+=QString("Base=%1").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; - caption+="Pattanaik00: ~ "; - caption+=QString("Multiplier=%1 ~ ").arg(multiplier); - if (opts->operator_options.pattanaikoptions.local) { - caption+="Local"; - } else if (opts->operator_options.pattanaikoptions.autolum) { - caption+="AutoLuminance"; - } else { - caption+=QString("Cone=%1 ~ ").arg(cone); - caption+=QString("Rod=%1 ~ ").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; - caption+="Reinhard02: ~ "; - caption+=QString("Key=%1 ~ ").arg(key); - caption+=QString("Phi=%1").arg(phi); - if (opts->operator_options.reinhard02options.scales) { - caption+=QString(" ~ Scales: ~ "); - caption+=QString("Range=%1 ~ ").arg(range); - caption+=QString("Lower=%1 ~ ").arg(lower); - caption+=QString("Upper=%1").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; - caption+="Reinhard05: ~ "; - caption+=QString("Brightness=%1 ~ ").arg(brightness); - caption+=QString("Chromatic Adaptation=%1 ~ ").arg(chromaticAdaptation); - caption+=QString("Light Adaptation=%1").arg(lightAdaptation); - } - break; - } - return caption; -} - QString TMOptionsOperations::getExifComment() { - QString exif_comment="Luminance HDR "LUMINANCEVERSION" tonemapping parameters:\n"; + QString exif_comment="Luminance HDR " LUMINANCEVERSION " tonemapping parameters:\n"; exif_comment+="Operator: "; switch (opts->tmoperator) { case mantiuk06: { diff -Nru luminance-hdr-2.3.0/src/Core/TonemappingOptions.h luminance-hdr-2.3.1/src/Core/TonemappingOptions.h --- luminance-hdr-2.3.0/src/Core/TonemappingOptions.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Core/TonemappingOptions.h 2013-04-07 18:41:14.000000000 +0000 @@ -33,18 +33,29 @@ #define TONEMAPPINGOPTIONS_H #include +#include //----------------- DO NOT CHANGE ENUMERATION ORDER ----------------------- // all is used by SavedParametersDialog to select comments from all operators -enum TMOperator {mantiuk06,mantiuk08,fattal,drago,durand,reinhard02,reinhard05,ashikhmin,pattanaik}; +enum TMOperator +{ + mantiuk06 = 0, + mantiuk08 = 1, + fattal = 2, + drago = 3, + durand = 4, + reinhard02 = 5, + reinhard05 = 6, + ashikhmin = 7, + pattanaik = 8 +}; class TonemappingOptions { -private: public: int origxsize; // this parameter should be coming from the UI - int xsize_percent; // 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; @@ -116,12 +127,17 @@ int selection_y_bottom_right; // default constructor - inline TonemappingOptions() - { + TonemappingOptions() { setDefaultParameters(); } + const QString getPostfix(); + + /** returns the translated description of the TMO operator**/ + const QString getCaption(bool pregamma = true, QString separator = QString(" ~ ")); void setDefaultTonemapParameters(); void setDefaultParameters(); + + char getRatingForOperator(); }; /* @@ -135,13 +151,13 @@ class TMOptionsOperations { public: TMOptionsOperations(const TonemappingOptions* opts); - static TonemappingOptions* parseFile(QString file); + static TonemappingOptions* parseFile(const QString& file); static TonemappingOptions* getDefaultTMOptions(); - QString getPostfix(); - QString getCaption(); QString getExifComment(); private: const TonemappingOptions* opts; + + }; #endif // TONEMAPPINGOPTIONS_H diff -Nru luminance-hdr-2.3.0/src/Exif/ExifOperations.cpp luminance-hdr-2.3.1/src/Exif/ExifOperations.cpp --- luminance-hdr-2.3.0/src/Exif/ExifOperations.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Exif/ExifOperations.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,8 +1,10 @@ -/** - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- * Copyright (C) 2007 Giuseppe Rota - * + * Copyright (C) 2012 Franco Comida + * 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 @@ -16,242 +18,374 @@ * 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 Giuseppe Rota + * ---------------------------------------------------------------------- */ -#include +//! \author Giuseppe Rota +//! \author Franco Comida +//! \author Davide Anastasia + +#include + #include #include +#include +#include + +#include + +#include +#include #include "ExifOperations.h" #include "arch/math.h" +#include "Common/config.h" + +using namespace boost; +using namespace boost::assign; namespace ExifOperations { - - void writeExifData(const std::string& filename, const std::string& comment, float expotime) - { - Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); - image->readMetadata(); - Exiv2::ExifData &exifData = image->exifData(); - exifData["Exif.Image.Software"]="Created with opensource tool Luminance HDR, http://qtpfsgui.sourceforge.net"; - exifData["Exif.Image.ImageDescription"]=comment; - exifData["Exif.Photo.UserComment"]=(QString("charset=\"Ascii\" ") + QString::fromStdString(comment)).toStdString(); - if (expotime != 100.0f) { - const Exiv2::ValueType v(expotime*12.07488f/100); - const Exiv2::ValueType r(v.toRational()); - exifData["Exif.Photo.ExposureTime"] = r; - const Exiv2::ValueType f(1.0); - const Exiv2::ValueType fr(f.toRational()); - exifData["Exif.Photo.FNumber"] = fr; - } - image->setExifData(exifData); - image->writeMetadata(); - } - - void copyExifData(const std::string& from, const std::string& to, bool dont_overwrite) - { - std::cerr << "processing file: " << from.c_str() << " and " << to.c_str() << std::endl; - //get source and destination exif data - //THROWS, if opening the file fails or it contains data of an unknown image type. - Exiv2::Image::AutoPtr sourceimage = Exiv2::ImageFactory::open(from); - Exiv2::Image::AutoPtr destimage = Exiv2::ImageFactory::open(to); - //Callers must check the size of individual metadata types before accessing the data. - //readMetadata THROWS an exception if opening or reading of the file fails or the image data is not valid (does not look like data of the specific image type). - sourceimage->readMetadata(); - Exiv2::ExifData &src_exifData = sourceimage->exifData(); - if (src_exifData.empty()) +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 { - throw Exiv2::Error(1, "No exif data found in the image"); + // support for GPSInfo + if ( groupName == "GPSInfo" ) return true; + // remove info about thumbnail + if ( groupName == "Thumbnail" ) return false; + + // search into the map if I don't find any better match + return sm_validExifTags.count(key); } - if (dont_overwrite) +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) +{ +#ifndef NDEBUG + std::clog << "Processing EXIF from " << from << " to " << to << std::endl; +#endif + + try { - //doesn't throw anything if it is empty - destimage->readMetadata(); - //doesn't throw anything if it is empty - Exiv2::ExifData &dest_exifData = destimage->exifData(); - //end delimiter for this source image data - Exiv2::ExifData::const_iterator end_src = src_exifData.end(); - //for all the tags in the source exif data - for (Exiv2::ExifData::const_iterator i = src_exifData.begin(); i != end_src; ++i) - { - //check if current source key exists in destination file - Exiv2::ExifData::iterator maybe_exists = dest_exifData.findKey( Exiv2::ExifKey(i->key()) ); - //if exists AND we are told not to overwrite - if (maybe_exists != dest_exifData.end()) + // get source and destination exif data + Exiv2::Image::AutoPtr sourceImage = Exiv2::ImageFactory::open(from); + Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to); + + sourceImage->readMetadata(); + Exiv2::ExifData &srcExifData = sourceImage->exifData(); + + if ( srcExifData.empty() ) { +#ifndef NDEBUG + std::clog << "No exif data found in the image: " << from << "\n"; +#endif + return; + } + + 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())); + } + } +#ifndef NDEBUG + else { + std::clog << "Found invalid key: " << it->key() << "\n"; + } +#endif + } + + // rotation support + if (!keepRotation) { + destExifData["Exif.Image.Orientation"] = 0; + } + } + else if (destIsLDR) { - continue; - } + // 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(); + } +#ifndef NDEBUG + else { + std::clog << "Found invalid key: " << it->key() << "\n"; + } +#endif + } + + // if comment is not empty, overwrite/set comment values + 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.ImageDescription"] = comment; + destExifData["Exif.Photo.UserComment"] = "charset=\"Ascii\" " + comment; + } + + // rotation support + if (!keepRotation) { + destExifData["Exif.Image.Orientation"] = 0; + } + + destinationImage->setExifData(destExifData); + } else { - //here we copy the value - //we create a new tag in the destination file, the tag has the key of the source - Exiv2::Exifdatum& dest_tag = dest_exifData[i->key()]; - //now the tag has also the value of the source - dest_tag.setValue(&(i->value())); - } - } + destinationImage->setExifData(srcExifData); + } + destinationImage->writeMetadata(); } - else + catch (Exiv2::AnyError& e) { - destimage->setExifData(src_exifData); +#ifndef NDEBUG + qDebug() << e.what(); +#endif } - - //THROWS Exiv2::Error if the operation fails - destimage->writeMetadata(); - } - - /** - * 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. - * 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. - * - * [1] http://en.wikipedia.org/wiki/APEX_system - * [2] http://en.wikipedia.org/wiki/Exposure_value - * [3] http://en.wikipedia.org/wiki/Light_meter - * [4] http://doug.kerr.home.att.net/pumpkin/#APEX - * - * This function tries first to obtain the shutter speed from either of - * two exif tags (there is no standard between camera manifacturers): - * 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. - */ - float obtain_avg_lum(const std::string& filename) - { +} + +/* + * 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. + * 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. + * + * [1] http://en.wikipedia.org/wiki/APEX_system + * [2] http://en.wikipedia.org/wiki/Exposure_value + * [3] http://en.wikipedia.org/wiki/Light_meter + * [4] http://doug.kerr.home.att.net/pumpkin/#APEX + * + * This function tries first to obtain the shutter speed from either of + * two exif tags (there is no standard between camera manifacturers): + * 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. + */ +float obtain_avg_lum(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; - - 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; - float iso = -1; - float fnum = -1; - - if (iexpo != exifData.end()) - { - expo=iexpo->toFloat(); - } - else if (iexpo2 != exifData.end()) - { - long num=1, div=1; - double tmp = std::exp(std::log(2.0) * iexpo2->toFloat()); - if (tmp > 1) + Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); + image->readMetadata(); + Exiv2::ExifData &exifData = image->exifData(); + 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")); + + // default not valid values + float expo = -1; + float iso = -1; + float fnum = -1; + + if (iexpo != exifData.end()) + { + expo = iexpo->toFloat(); + } + else if (iexpo2 != exifData.end()) + { + long num = 1; + long div = 1; + double tmp = std::exp(std::log(2.0) * iexpo2->toFloat()); + if (tmp > 1) + { + div = static_cast(tmp + 0.5); + } + else + { + num = static_cast(1/tmp + 0.5); + } + expo = static_cast(num)/static_cast(div); + } + + if (ifnum != exifData.end()) { - div = static_cast(tmp + 0.5); + fnum = ifnum->toFloat(); + } + else if (ifnum2 != exifData.end()) + { + 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. + if (fnum == 0) + return -1; + + // if iso is found use that value, otherwise assume a value of iso = 100 + // (again, some cameras do not print iso in exif). + if (iiso == exifData.end()) + { + iso = 100.0; } else { - num = static_cast(1/tmp + 0.5); + iso = iiso->toFloat(); + } + + //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; + return ( (expo * iso) / (fnum*fnum*12.07488f) ); + } + else + { + return -1; } - expo = static_cast(num)/static_cast(div); - } - - if (ifnum != exifData.end()) - { - fnum = ifnum->toFloat(); - } - else if (ifnum2 != exifData.end()) - { - 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. - if (fnum == 0) - return -1; - - //if iso is found use that value, otherwise assume a value of iso=100. (again, some cameras do not print iso in exif). - if (iiso == exifData.end()) - { - iso = 100.0; - } - else - { - iso = iiso->toFloat(); - } - - //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; - return ( (expo * iso) / (fnum*fnum*12.07488f) ); - } - else - { - return -1; - } } catch (Exiv2::AnyError& e) { - return -1; + return -1; } - } - - int obtain_rotation(const std::string& filename) - { +} + +/* + * http://jpegclub.org/exif_orientation.html + * + * + * Value 0th Row 0th Column + * 1 top left side + * 2 top right side + * 3 bottom right side + * 4 bottom left side + * 5 left side top + * 6 right side top + * 7 right side bottom + * 8 left side bottom + * + */ +int obtain_rotation(const std::string& filename) +{ try { - Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); - image->readMetadata(); - Exiv2::ExifData &exifData = image->exifData(); - if (exifData.empty()) + Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); + image->readMetadata(); + Exiv2::ExifData &exifData = image->exifData(); + if (exifData.empty()) + return 0; + + Exiv2::ExifData::const_iterator degrees = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")); + if (degrees != exifData.end()) + { + long rotation = degrees->toLong(); + + switch(rotation) + { + case 3: + return 180; + case 6: + return 90; + case 8: + return 270; + } + } return 0; - - Exiv2::ExifData::const_iterator degrees = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")); - - if (degrees != exifData.end()) - { - - /* - http://jpegclub.org/exif_orientation.html - - - Value 0th Row 0th Column - 1 top left side - 2 top right side - 3 bottom right side - 4 bottom left side - 5 left side top - 6 right side top - 7 right side bottom - 8 left side bottom - - */ - - float rotation = degrees->toFloat(); - - switch((int)rotation) - { - case 3: - return 180; - case 6: - return 90; - case 8: - return 270; - } - } - return 0; } catch (Exiv2::AnyError& e) { - return 0; + return 0; } - } } + +} // ExifOperations diff -Nru luminance-hdr-2.3.0/src/Exif/ExifOperations.h luminance-hdr-2.3.1/src/Exif/ExifOperations.h --- luminance-hdr-2.3.0/src/Exif/ExifOperations.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Exif/ExifOperations.h 2013-04-07 18:41:14.000000000 +0000 @@ -23,15 +23,23 @@ #ifndef EXIFOPS_H #define EXIFOPS_H -#include -#include +#include namespace ExifOperations { - void writeExifData(const std::string& filename, const std::string& comment, float expotime = 100.0f); - void copyExifData(const std::string& from, const std::string& to, bool dont_overwrite); - float obtain_avg_lum(const std::string& filename); - int obtain_rotation(const std::string& filename); +//! +//! +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); +//! +//! +float obtain_avg_lum(const std::string& filename); +//! +//! +int obtain_rotation(const std::string& filename); } #endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/CMakeLists.txt luminance-hdr-2.3.1/src/Fileformat/CMakeLists.txt --- luminance-hdr-2.3.0/src/Fileformat/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,9 +1,7 @@ #SET(FILES_UI ) SET(FILES_H -${CMAKE_CURRENT_SOURCE_DIR}/pfstiff.h +${CMAKE_CURRENT_SOURCE_DIR}/tiffreader.h ${CMAKE_CURRENT_SOURCE_DIR}/jpegreader.h -${CMAKE_CURRENT_SOURCE_DIR}/jpegwriter.h -${CMAKE_CURRENT_SOURCE_DIR}/pngwriter.h ) SET(FILES_HXX @@ -12,20 +10,19 @@ ${CMAKE_CURRENT_SOURCE_DIR}/pfsout16bitspixmap.h ${CMAKE_CURRENT_SOURCE_DIR}/pfsoutldrimage.h ${CMAKE_CURRENT_SOURCE_DIR}/pfsouthdrimage.h -${CMAKE_CURRENT_SOURCE_DIR}/rgbeio.h +${CMAKE_CURRENT_SOURCE_DIR}/tiffwriter.h +${CMAKE_CURRENT_SOURCE_DIR}/tiffcommon.h +${CMAKE_CURRENT_SOURCE_DIR}/jpegwriter.h +${CMAKE_CURRENT_SOURCE_DIR}/pngwriter.h ) SET(FILES_CPP -${CMAKE_CURRENT_SOURCE_DIR}/rgbeio.cpp -${CMAKE_CURRENT_SOURCE_DIR}/pfstiff.cpp -${CMAKE_CURRENT_SOURCE_DIR}/pfsoutrgbe.cpp -${CMAKE_CURRENT_SOURCE_DIR}/pfsinrgbe.cpp +${CMAKE_CURRENT_SOURCE_DIR}/tiffreader.cpp +${CMAKE_CURRENT_SOURCE_DIR}/tiffwriter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pfsout16bitspixmap.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pfsoutldrimage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pfsouthdrimage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pfsinraw.cpp -${CMAKE_CURRENT_SOURCE_DIR}/pfsinexr.cpp -${CMAKE_CURRENT_SOURCE_DIR}/pfsoutexr.cpp ${CMAKE_CURRENT_SOURCE_DIR}/jpegreader.cpp ${CMAKE_CURRENT_SOURCE_DIR}/jpegwriter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pngwriter.cpp diff -Nru luminance-hdr-2.3.0/src/Fileformat/jpegreader.cpp luminance-hdr-2.3.1/src/Fileformat/jpegreader.cpp --- luminance-hdr-2.3.0/src/Fileformat/jpegreader.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/jpegreader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,8 +35,11 @@ #include "jpegreader.h" #include "Common/LuminanceOptions.h" -#include "Common/ResourceHandlerCommon.h" -#include "Common/ResourceHandlerLcms.h" + +#include +#include + +using namespace pfs; namespace { @@ -255,7 +258,7 @@ QByteArray ba( QFile::encodeName(fname) ); qDebug() << "readJpegIntoQImage: filename: " << ba.data(); - ResouceHandlerFile infile( fopen(ba.constData(), "rb") ); + utils::ScopedStdIoFile infile( fopen(ba.constData(), "rb") ); if (infile.data() == NULL) { fprintf(stderr, "can't open %s\n", ba.data()); @@ -307,9 +310,9 @@ throw; } - ScopedCmsProfile hsRGB; - ScopedCmsProfile hIn; - ScopedCmsTransform xform; + utils::ScopedCmsProfile hsRGB; + utils::ScopedCmsProfile hIn; + utils::ScopedCmsTransform xform; unsigned int cmsProfileLength; JOCTET * cmsProfileBuffer; diff -Nru luminance-hdr-2.3.0/src/Fileformat/jpegwriter.cpp luminance-hdr-2.3.1/src/Fileformat/jpegwriter.cpp --- luminance-hdr-2.3.0/src/Fileformat/jpegwriter.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/jpegwriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- - * Copyright (C) 2012 Franco Comida, Davide Anastasia + * Copyright (C) 2012 Franco Comida + * Copyright (C) 2012-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 @@ -18,114 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Franco Comida - * Original work - * @author Davide Anastasia - * clean up memory management - * */ -#include -#include -#include +#include "jpegwriter.h" + #include #include #include +#include +#include #include #include #include -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) -#include -#endif - -#include "jpegwriter.h" -#include "Common/ResourceHandlerCommon.h" -#include "Common/ResourceHandlerLcms.h" +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace pfs; +using namespace boost; /////////////////////////////////////////////////////////////////////////////// // // This code is taken from iccjpeg.c from lcms distribution -/* - * Since an ICC profile can be larger than the maximum size of a JPEG marker - * (64K), we need provisions to split it into multiple markers. The format - * defined by the ICC specifies one or more APP2 markers containing the - * following data: - * Identifying string ASCII "ICC_PROFILE\0" (12 bytes) - * Marker sequence number 1 for first APP2, 2 for next, etc (1 byte) - * Number of markers Total number of APP2's used (1 byte) - * Profile data (remainder of APP2 data) - * Decoders should use the marker sequence numbers to reassemble the profile, - * rather than assuming that the APP2 markers appear in the correct sequence. - */ +// +// Since an ICC profile can be larger than the maximum size of a JPEG marker +// (64K), we need provisions to split it into multiple markers. The format +// defined by the ICC specifies one or more APP2 markers containing the +// following data: +// Identifying string ASCII "ICC_PROFILE\0" (12 bytes) +// Marker sequence number 1 for first APP2, 2 for next, etc (1 byte) +// Number of markers Total number of APP2's used (1 byte) +// Profile data (remainder of APP2 data) +// Decoders should use the marker sequence numbers to reassemble the profile, +// 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) -/* - * This routine writes the given ICC profile data into a JPEG file. - * It *must* be called AFTER calling jpeg_start_compress() and BEFORE - * the first call to jpeg_write_scanlines(). - * (This ordering ensures that the APP2 marker(s) will appear after the - * SOI and JFIF or Adobe markers, but before all else.) - */ -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++; - - while (icc_data_len > 0) { - /* length of profile to put in this marker */ - length = icc_data_len; - if (length > MAX_DATA_BYTES_IN_MARKER) - length = MAX_DATA_BYTES_IN_MARKER; - icc_data_len -= length; - - /* Write the JPEG marker header (APP2 code and marker length) */ - jpeg_write_m_header(cinfo, ICC_MARKER, - (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 - * even if the local character set is not ASCII. - */ - jpeg_write_m_byte(cinfo, 0x49); - jpeg_write_m_byte(cinfo, 0x43); - jpeg_write_m_byte(cinfo, 0x43); - jpeg_write_m_byte(cinfo, 0x5F); - jpeg_write_m_byte(cinfo, 0x50); - jpeg_write_m_byte(cinfo, 0x52); - jpeg_write_m_byte(cinfo, 0x4F); - jpeg_write_m_byte(cinfo, 0x46); - jpeg_write_m_byte(cinfo, 0x49); - jpeg_write_m_byte(cinfo, 0x4C); - jpeg_write_m_byte(cinfo, 0x45); - jpeg_write_m_byte(cinfo, 0x0); - - /* Add the sequencing info */ - jpeg_write_m_byte(cinfo, cur_marker); - jpeg_write_m_byte(cinfo, (int) num_markers); - - /* Add the profile data */ - while (length--) { - jpeg_write_m_byte(cinfo, *icc_data_ptr); - icc_data_ptr++; +// This routine writes the given ICC profile data into a JPEG file. +// It *must* be called AFTER calling jpeg_start_compress() and BEFORE +// the first call to jpeg_write_scanlines(). +// (This ordering ensures that the APP2 marker(s) will appear after the +// SOI and JFIF or Adobe markers, but before all else.) + +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++; + + while (icc_data_len > 0) { + // length of profile to put in this marker + length = icc_data_len; + if (length > MAX_DATA_BYTES_IN_MARKER) + length = MAX_DATA_BYTES_IN_MARKER; + icc_data_len -= length; + + // Write the JPEG marker header (APP2 code and marker length) + jpeg_write_m_header(cinfo, ICC_MARKER, + (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 + // even if the local character set is not ASCII. + jpeg_write_m_byte(cinfo, 0x49); + jpeg_write_m_byte(cinfo, 0x43); + jpeg_write_m_byte(cinfo, 0x43); + jpeg_write_m_byte(cinfo, 0x5F); + jpeg_write_m_byte(cinfo, 0x50); + jpeg_write_m_byte(cinfo, 0x52); + jpeg_write_m_byte(cinfo, 0x4F); + jpeg_write_m_byte(cinfo, 0x46); + jpeg_write_m_byte(cinfo, 0x49); + jpeg_write_m_byte(cinfo, 0x4C); + jpeg_write_m_byte(cinfo, 0x45); + jpeg_write_m_byte(cinfo, 0x0); + + // Add the sequencing info + jpeg_write_m_byte(cinfo, cur_marker); + jpeg_write_m_byte(cinfo, (int) num_markers); + + // Add the profile data + while (length--) { + jpeg_write_m_byte(cinfo, *icc_data_ptr); + icc_data_ptr++; + } + cur_marker++; } - cur_marker++; - } } // @@ -133,179 +129,343 @@ // /////////////////////////////////////////////////////////////////////////////// -static struct my_error_mgr -{ - struct jpeg_error_mgr pub; // "public" fields -// LPVOID Cargo; // "private" fields -} ErrorHandler; - -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); + char buffer[JMSG_LENGTH_MAX]; + (*cinfo->err->format_message) (cinfo, buffer); throw std::runtime_error( std::string(buffer) ); } - -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); + char buffer[JMSG_LENGTH_MAX]; + (*cinfo->err->format_message) (cinfo, buffer); throw std::runtime_error( std::string(buffer) ); } -void removeAlphaValues(const unsigned char *in, JSAMPROW out, int size) +struct JpegWriterParams { - int h = 0; - for (int i = 0; i < size; i += 3) { - *(out + i) = *(in + h + 2); - *(out + i + 1) = *(in + h + 1); - *(out + i + 2) = *(in + h); - h += 4; - } -} + JpegWriterParams() + : quality_(100) + , minLuminance_(0.f) + , maxLuminance_(1.f) + , luminanceMapping_(MAP_LINEAR) + {} -JpegWriter::JpegWriter(const QImage *out_qimage, QString fname, int quality): - m_out_qimage(out_qimage), - m_fname(fname), - m_quality(quality) -{} + void parse(const Params& params) + { + 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" ) { + minLuminance_ = it->second.as(minLuminance_); + continue; + } + if ( it->first == "max_luminance" ) { + maxLuminance_ = it->second.as(maxLuminance_); + continue; + } + if ( it->first == "mapping_method" ) { + luminanceMapping_ = it->second.as(luminanceMapping_); + continue; + } + } + } -JpegWriter::JpegWriter(const QImage *out_qimage, int quality): - m_out_qimage(out_qimage), -// m_fname(""), empty anyway! - m_quality(quality) -{} + size_t quality_; + float minLuminance_; + float maxLuminance_; + RGBMappingType luminanceMapping_; +}; -bool JpegWriter::writeQImageToJpeg() +ostream& operator<<(ostream& out, const JpegWriterParams& params) { - cmsUInt32Number cmsProfileSize = 0; - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); + stringstream ss; + ss << "JpegWriterParams: ["; + ss << "quality: " << params.quality_ << ", "; + ss << "min_luminance: " << params.minLuminance_ << ", "; + ss << "max_luminance: " << params.maxLuminance_ << ", "; + ss << "mapping_method: " << params.luminanceMapping_ << "]"; - cmsSaveProfileToMem(hsRGB.data(), NULL, &cmsProfileSize); // get the size + return (out << ss.str()); +} - std::vector cmsOutputProfile(cmsProfileSize); +class JpegWriterImpl +{ +public: + JpegWriterImpl() + : m_filesize(0) + {} - cmsSaveProfileToMem(hsRGB.data(), cmsOutputProfile.data(), &cmsProfileSize); // + virtual ~JpegWriterImpl() + {} - qDebug() << "sRGB profile size: " << cmsProfileSize; + virtual void setupJpegDest(j_compress_ptr cinfo) = 0; + virtual void close() = 0; - struct jpeg_compress_struct cinfo; - cinfo.err = jpeg_std_error(&ErrorHandler.pub); - ErrorHandler.pub.error_exit = my_writer_error_handler; - ErrorHandler.pub.output_message = my_writer_output_message; + // compute size (if functionality available) + virtual void computeSize() = 0; - jpeg_create_compress(&cinfo); + bool write(const pfs::Frame &frame, const JpegWriterParams& params) + { + cmsUInt32Number cmsProfileSize = 0; + utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - cinfo.image_width = m_out_qimage->width(); // image width and height, in pixels - cinfo.image_height = m_out_qimage->height(); - 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_RGB; + cmsSaveProfileToMem(hsRGB.data(), NULL, &cmsProfileSize); // get the size - jpeg_set_defaults(&cinfo); - jpeg_set_colorspace(&cinfo, JCS_RGB); + std::vector cmsOutputProfile(cmsProfileSize); - //avoid subsampling on high quality factor - jpeg_set_quality(&cinfo, m_quality, 1); - if (m_quality >= 70) - { - for(int i = 0; i < cinfo.num_components; i++) + cmsSaveProfileToMem(hsRGB.data(), cmsOutputProfile.data(), &cmsProfileSize); + + struct jpeg_compress_struct cinfo; + jpeg_create_compress(&cinfo); + + struct jpeg_error_mgr errorHandler; + + 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 ) { + 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 { - cinfo.comp_info[i].h_samp_factor = 1; - cinfo.comp_info[i].v_samp_factor = 1; - } - } - - ResouceHandlerFile outfile; - -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - QTemporaryFile output_temp_file; -#else - std::vector outbuf; -#endif - if ( !m_fname.isEmpty() ) // we are writing to file - { - QByteArray ba( QFile::encodeName(m_fname) ); - qDebug() << "writeQImageToJpeg: filename: " << ba.data(); + setupJpegDest(&cinfo); - outfile.reset( fopen(ba.data(), "wb") ); + jpeg_start_compress(&cinfo, true); - if (outfile.data() == NULL) + 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() }; + + RGBRemapper rgbRemapper(params.minLuminance_, params.maxLuminance_, + params.luminanceMapping_); + + 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), + rgbRemapper); + jpeg_write_scanlines(&cinfo, scanLineOutArray, 1); + } + } + catch (const std::runtime_error& err) { - qDebug() << "can't open " << m_fname; - return false; - } - } - else // we are writing to memory buffer - { -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - if ( !output_temp_file.open() ) return false; // could not open the temporary file! + std::clog << err.what() << std::endl; - QByteArray output_temp_filename = QFile::encodeName( output_temp_file.fileName() ); - output_temp_file.close(); - outfile.reset(fopen(output_temp_filename.constData(), "w+")); - - if ( outfile.data() == NULL ) return false; -#else - std::vector t(cinfo.image_width * cinfo.image_height * cinfo.num_components); - outbuf.swap( t ); - // reset all element of the vector to zero! - std::fill(outbuf.begin(), outbuf.end(), 0); + jpeg_destroy_compress(&cinfo); - outfile.reset( fmemopen(outbuf.data(), outbuf.size(), "w+") ); -#endif - } + return false; + } + + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + + computeSize(); + close(); + + return true; + } + + size_t getFileSize() + { return m_filesize; } + +protected: + void setFileSize(size_t filesize) + { m_filesize = filesize; } + +private: + size_t m_filesize; +}; + +//! \ref http://www.andrewewhite.net/wordpress/2010/04/07/simple-cc-jpeg-writer-part-2-write-to-buffer-in-memory/ +typedef std::vector JpegBuffer; - try +struct JpegWriterImplMemory : public JpegWriterImpl +{ + typedef std::map JpegRegistry; + + JpegWriterImplMemory() + : JpegWriterImpl() + , m_cinfo(NULL) + , m_buffer(0) + {} + + ~JpegWriterImplMemory() { - jpeg_stdio_dest(&cinfo, outfile.data()); - jpeg_start_compress(&cinfo, true); + sm_registry.erase(m_cinfo); + m_cinfo->dest = NULL; + } - write_icc_profile(&cinfo, cmsOutputProfile.data(), cmsProfileSize); + // implementation below! + void setupJpegDest(j_compress_ptr cinfo); - // If an exception is raised, this buffer gets automatically destructed! - std::vector ScanLineOut(cinfo.image_width * cinfo.num_components); - JSAMPROW ScanLineOutArray[1] = { ScanLineOut.data() }; + void close() {} - for (int i = 0; cinfo.next_scanline < cinfo.image_height; i++) - { - removeAlphaValues(m_out_qimage->scanLine( i ), - ScanLineOut.data(), - cinfo.image_width * cinfo.num_components); - jpeg_write_scanlines(&cinfo, ScanLineOutArray, 1); + void computeSize() + { setFileSize(m_buffer.size()*sizeof(JOCTET)); } + + static + JpegBuffer& getBuffer(j_compress_ptr cinfo) { + JpegRegistry::iterator it = sm_registry.find(cinfo); + if ( it != sm_registry.end() ) { + return *it->second; } + throw pfs::io::WriteException("Cannot find a valid buffer for the current writer"); } - catch (const std::runtime_error& err) - { - qDebug() << err.what(); - jpeg_destroy_compress(&cinfo); +private: + struct jpeg_destination_mgr m_dmgr; + j_compress_ptr m_cinfo; + JpegBuffer m_buffer; + + static JpegRegistry sm_registry; +}; + +JpegWriterImplMemory::JpegRegistry JpegWriterImplMemory::sm_registry; + +#define BLOCK_SIZE 16384 + +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); + + size_t oldsize = myBuffer.size(); + myBuffer.resize(oldsize + BLOCK_SIZE); + cinfo->dest->next_output_byte = &myBuffer[oldsize]; + cinfo->dest->free_in_buffer = myBuffer.size() - oldsize; + return true; +} + +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) +{ + // 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) ); + + // update destinations... + m_dmgr.init_destination = my_init_destination; + m_dmgr.empty_output_buffer = my_empty_output_buffer; + m_dmgr.term_destination = my_term_destination; + + cinfo->dest = &m_dmgr; +} + +//! \brief Writer to file basic implementation +struct JpegWriterImplFile : public JpegWriterImpl +{ + JpegWriterImplFile(const string& filename) + : JpegWriterImpl() + , m_handle() + , m_filename(filename) + {} + + void setupJpegDest(j_compress_ptr cinfo) { + if ( !open() ) { // open output file! + throw pfs::io::InvalidFile( "Cannot open the output file " + m_filename ); + } + jpeg_stdio_dest(cinfo, handle()); + } + + void close() { m_handle.reset(); } + void computeSize() { setFileSize(0); } + +private: + bool open() { + m_handle.reset( fopen(m_filename.c_str(), "wb") ); + if ( m_handle ) return true; return false; } - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); + FILE* handle() { return m_handle.data(); } - if ( m_fname.isEmpty() ) - { -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - fflush(outfile.data()); - fseek(outfile.data(), 0, SEEK_END); - m_filesize = ftell(outfile.data()); -#else - int size = outbuf.size() - 1; - for (; size > 0; --size) - { - if (outbuf[size] != 0) - break; - } - m_filesize = size; + utils::ScopedStdIoFile m_handle; + std::string m_filename; +}; + + +JpegWriter::JpegWriter() + : m_impl(new JpegWriterImplMemory) +{} + +JpegWriter::JpegWriter(const std::string &filename) + : m_impl(new JpegWriterImplFile(filename)) +{} + +JpegWriter::~JpegWriter() +{} + +bool JpegWriter::write(const pfs::Frame& frame, const Params& params) +{ + JpegWriterParams p; + p.parse( params ); + +#ifndef NDEBUG + cout << p << endl << flush; #endif - } - return true; + + return m_impl->write(frame, p); } -int JpegWriter::getFileSize() +size_t JpegWriter::getFileSize() { - return m_filesize; + return m_impl->getFileSize(); } diff -Nru luminance-hdr-2.3.0/src/Fileformat/jpegwriter.h luminance-hdr-2.3.1/src/Fileformat/jpegwriter.h --- luminance-hdr-2.3.0/src/Fileformat/jpegwriter.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/jpegwriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- - * Copyright (C) 2012 Franco Comida, Davide Anastasia + * Copyright (C) 2012 Franco Comida + * Copyright (C) 2012-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 @@ -17,42 +18,44 @@ * 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 - * Original work - * @author Davide Anastasia - * clean up memory management - * */ +//! \author Franco Comida +//! Original work +//! \author Davide Anastasia +//! - clean up memory management +//! - rewrite for LibHDR +//! - implementation in-memory writer (to retrieve size) + #ifndef JPEGWRITER_H #define JPEGWRITER_H -#include -#include -#include +#include +#include +#include +#include + +namespace pfs { +class Frame; +} -class JpegWriter : public QObject -{ - Q_OBJECT +class JpegWriterImpl; +class JpegWriter +{ public: - JpegWriter(const QImage *, QString, int); - JpegWriter(const QImage *, int); - ~JpegWriter() {} + JpegWriter(const std::string& filename); + JpegWriter(); + ~JpegWriter(); - //! \brief write \c QImage into Jpeg file - bool writeQImageToJpeg(); + //! \brief write a pfs::Frame into file or memory + bool write(const pfs::Frame& frame, const pfs::Params& params); //! \brief return size in bytes of the file written - int getFileSize(); + size_t getFileSize(); private: - const QImage *m_out_qimage; - QString m_fname; - int m_filesize; - int m_quality; - + boost::scoped_ptr m_impl; }; #endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfs_file_format.h luminance-hdr-2.3.1/src/Fileformat/pfs_file_format.h --- luminance-hdr-2.3.0/src/Fileformat/pfs_file_format.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfs_file_format.h 2013-04-07 18:41:14.000000000 +0000 @@ -27,23 +27,12 @@ #ifndef PFS_FILE_FORMAT_H #define PFS_FILE_FORMAT_H -#include "Fileformat/rgbeio.h" -#include "Fileformat/pfstiff.h" +#include "Fileformat/tiffreader.h" +#include "Fileformat/tiffwriter.h" #include "Fileformat/pfsoutldrimage.h" #include "Fileformat/pfsinraw.h" #include "Fileformat/jpegwriter.h" #include "Fileformat/jpegreader.h" #include "Fileformat/pngwriter.h" -// Forward declaration -namespace pfs { - class Frame; -} - -pfs::Frame* readEXRfile(const char * filename); -void writeEXRfile(pfs::Frame* inpfsframe, const char* outfilename); - -pfs::Frame* readRGBEfile(const char * filename); -void writeRGBEfile(pfs::Frame* inputpfshdr, const char* outfilename); - #endif // PFS_FILE_FORMAT_H diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsinexr.cpp luminance-hdr-2.3.1/src/Fileformat/pfsinexr.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsinexr.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsinexr.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,221 +0,0 @@ -/** - * @brief Read files in OpenEXR format - * - * This file is a part of LuminanceHDR package, based on pfstools. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Grzegorz Krawczyk, - * - * $Id: pfsinexr.cpp,v 1.3 2008/01/01 13:01:21 rafm Exp $ - */ - -// TODO: clean this file, there are leftovers - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "Libpfs/frame.h" -#include "Libpfs/domio.h" - -// TODO : leftover! -#define PROG_NAME "pfsinexr" - -using namespace Imf; -using namespace Imath; -using std::string; - -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; - ret.replace(pos, 1, "\\n"); - pos += 2; - } - return ret; -} - - -pfs::Frame * readEXRfile( const char *filename ) -{ - pfs::DOMIO pfsio; - - InputFile file( filename ); - - FrameBuffer frameBuffer; - - Box2i dw = file.header().displayWindow(); - Box2i dtw = file.header().dataWindow(); - int width = dw.max.x - dw.min.x + 1; - int height = dw.max.y - dw.min.y + 1; - - if( (dtw.min.x < dw.min.x && dtw.max.x > dw.max.x) || - (dtw.min.y < dw.min.y && dtw.max.y > dw.max.y) ) - { - throw pfs::Exception( "No support for OpenEXR files DataWidnow greater than DisplayWindow" ); - } - - pfs::Frame *frame = pfsio.createFrame( width, height ); - - const ChannelList &channels = file.header().channels(); - - bool processColorChannels = false; - pfs::Channel *X, *Y, *Z; - - // This condition is always true! :| - - const Channel *rChannel = channels.findChannel( "R" ); - const Channel *gChannel = channels.findChannel( "G" ); - const Channel *bChannel = channels.findChannel( "B" ); - if( rChannel!=NULL && gChannel!=NULL && bChannel!=NULL ) - { - frame->createXYZChannels( X, Y, Z ); - - frameBuffer.insert( "R", // name - Slice( FLOAT, // type - (char*)(X->getRawData()), - sizeof(float), // xStride - sizeof(float) * width, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - frameBuffer.insert( "G", // name - Slice( FLOAT, // type - (char*)(Y->getRawData()), - sizeof(float), // xStride - sizeof(float) * width, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - frameBuffer.insert( "B", // name - Slice( FLOAT, // type - (char*)(Z->getRawData()), - sizeof(float), // xStride - sizeof(float) * width, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - - processColorChannels = true; - } - - - for ( ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i ) - { - //const Channel &channel = i.channel(); - - if( processColorChannels ) // Skip color channels - { - if( !strcmp( i.name(), "R" ) || !strcmp( i.name(), "G" ) || !strcmp( i.name(), "B" ) ) continue; - } - - const char *channelName = i.name(); - if( !strcmp( channelName, "Z" ) ) - { - channelName = "DEPTH"; - } - - pfs::Channel *pfsCh = frame->createChannel( channelName ); - frameBuffer.insert( i.name(), // name - Slice( FLOAT, // type - (char *)pfsCh->getRawData(), - sizeof(float), // xStride - sizeof(float) * width, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - } - - - // Copy attributes to tags - { - for( Header::ConstIterator it = file.header().begin(); it != file.header().end(); it++ ) - { - const char *attribName = it.name(); - const char *colon = strstr( attribName, ":" ); - const StringAttribute *attrib = - file.header().findTypedAttribute(attribName); - - if( attrib == NULL ) continue; // Skip if type is not String - - // fprintf( stderr, "Tag: %s = %s\n", attribName, attrib->value().c_str() ); - - if( colon == NULL ) // frame tag - { - frame->getTags()->setString( attribName, escapeString(attrib->value()).c_str() ); - } - else // channel tag - { - string channelName = string( attribName, colon-attribName ); - pfs::Channel *ch = frame->getChannel( channelName.c_str() ); - if( ch == NULL ) - { - fprintf( stderr, PROG_NAME ": Warning! Can not set tag for '%s' channel because it does not exist\n", channelName.c_str() ); - continue; - } - ch->getTags()->setString( colon+1, escapeString( attrib->value() ).c_str() ); - } - - } - } - - file.setFrameBuffer( frameBuffer ); - file.readPixels( dw.min.y, dw.max.y ); - - if( processColorChannels ) - { - // Rescale values if WhiteLuminance is present - if( hasWhiteLuminance( file.header() ) ) - { - float scaleFactor = whiteLuminance( file.header() ); - int pixelCount = frame->getHeight()*frame->getWidth(); - - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); - - // TODO: convert in SSE - for( int i = 0; i < pixelCount; i++ ) - { - (*Xr)(i) *= scaleFactor; - (*Yr)(i) *= scaleFactor; - (*Zr)(i) *= scaleFactor; - } -/* const StringAttribute *relativeLum = file.header().findTypedAttribute("RELATIVE_LUMINANCE"); - */ - const char *luminanceTag = frame->getTags()->getString("LUMINANCE"); - if( luminanceTag == NULL ) - { - frame->getTags()->setString("LUMINANCE", "ABSOLUTE"); - } - } - } - frame->getTags()->setString( "FILE_NAME", filename ); - - return frame; -} diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsinraw.cpp luminance-hdr-2.3.1/src/Fileformat/pfsinraw.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsinraw.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsinraw.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -30,9 +30,8 @@ #include #include -#include "Libpfs/domio.h" -#include "Fileformat/pfsinraw.h" #include "Libpfs/frame.h" +#include "Fileformat/pfsinraw.h" #include "Common/LuminanceOptions.h" /**************************** From UFRAW sourcecode ******************************** @@ -256,8 +255,7 @@ int W = image->width; int H = image->height; - pfs::DOMIO pfsio; - pfs::Frame *frame = pfsio.createFrame( W, H ); + pfs::Frame *frame = new pfs::Frame( W, H ); if (frame == NULL) { @@ -268,9 +266,9 @@ pfs::Channel *Xc, *Yc, *Zc; frame->createXYZChannels( Xc, Yc, Zc ); - float* r = Xc->getChannelData()->getRawData(); - float* g = Yc->getChannelData()->getRawData(); - float* b = Zc->getChannelData()->getRawData(); + float* r = Xc->data(); + float* g = Yc->data(); + float* b = Zc->data(); const unsigned char* raw_data = image->data; for (int idx = 0; idx < H*W; ++idx) diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsinrgbe.cpp luminance-hdr-2.3.1/src/Fileformat/pfsinrgbe.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsinrgbe.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsinrgbe.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/** - * @brief load an radiance rgbe file - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2006,2007 Giuseppe Rota - * - * 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 Rafal Mantiuk, - * @author Giuseppe Rota - */ - -#include - -#include "rgbeio.h" -#include "Libpfs/frame.h" -#include "Libpfs/domio.h" - -pfs::Frame* readRGBEfile (const char * filename) -{ - pfs::DOMIO pfsio; - FILE *inputRGBEfile=fopen(filename,"rb"); - RGBEReader reader( inputRGBEfile ); - pfs::Frame *frame = pfsio.createFrame( reader.getWidth(), reader.getHeight() ); - pfs::Channel *X, *Y, *Z; - frame->createXYZChannels( X, Y, Z); - reader.readImage(X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); - frame->getTags()->setString("FILE_NAME", filename); - fclose(inputRGBEfile); - return frame; -} diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsout16bitspixmap.cpp luminance-hdr-2.3.1/src/Fileformat/pfsout16bitspixmap.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsout16bitspixmap.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsout16bitspixmap.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -24,18 +24,21 @@ * */ -#include +#include "Fileformat/pfsout16bitspixmap.h" + +#include #include + #include -#include "Libpfs/frame.h" -#include "Fileformat/pfsout16bitspixmap.h" -#include "Common/msec_timer.h" +#include +#include +#include quint16* fromLDRPFSto16bitsPixmap(pfs::Frame* inpfsframe, float min_luminance, float max_luminance, - LumMappingMethod mapping_method) + RGBMappingType mapping_method) { #ifdef TIMER_PROFILING msec_timer stop_watch; @@ -55,17 +58,18 @@ quint16* temp_pixmap = new quint16[3*width*height]; - const float* p_R = Xc->getChannelData()->getRawData(); - const float* p_G = Yc->getChannelData()->getRawData(); - const float* p_B = Zc->getChannelData()->getRawData(); + // DAVIDE -> FIX THIS FUNCTION! + const float* p_R = Xc->data(); + const float* p_G = Yc->data(); + const float* p_B = Zc->data(); - FloatRgbToQRgb converter(min_luminance, max_luminance, mapping_method); + RGBRemapper rgbRemapper(min_luminance, max_luminance, mapping_method); #pragma omp parallel for for (int idx = 0; idx < height*width; ++idx) { - converter.toQUint16(p_R[idx], p_G[idx], p_B[idx], - temp_pixmap[3*idx], temp_pixmap[3*idx + 1], temp_pixmap[3*idx + 2]); + rgbRemapper.toUint16(p_R[idx], p_G[idx], p_B[idx], + temp_pixmap[3*idx], temp_pixmap[3*idx + 1], temp_pixmap[3*idx + 2]); } #ifdef TIMER_PROFILING diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsout16bitspixmap.h luminance-hdr-2.3.1/src/Fileformat/pfsout16bitspixmap.h --- luminance-hdr-2.3.0/src/Fileformat/pfsout16bitspixmap.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsout16bitspixmap.h 2013-04-07 18:41:14.000000000 +0000 @@ -27,15 +27,15 @@ #define FROMLDRPFSTO16BITSPIXMAP #include -#include +#include namespace pfs { - class Frame; +class Frame; } quint16* fromLDRPFSto16bitsPixmap(pfs::Frame* inpfsframe, float min_luminance = 0.0f, float max_luminance = 1.0f, - LumMappingMethod mapping_method = MAP_LINEAR); + RGBMappingType mapping_method = MAP_LINEAR); #endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsoutexr.cpp luminance-hdr-2.3.1/src/Fileformat/pfsoutexr.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsoutexr.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsoutexr.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ -/** - * @brief save an exr file - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2006,2007 Giuseppe Rota - * - * 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 Rafal Mantiuk, - * @author Giuseppe Rota - */ - -#include -#include -#include -#include -#include -#include - -#include "Libpfs/frame.h" - - -#define min(x,y) ( (x)<(y) ? (x) : (y) ) - -using namespace Imf; -using namespace Imath; -using std::string; - -void writeEXRfile (pfs::Frame* inpfsframe, const char* outfilename) -{ - Compression exrCompression = PIZ_COMPRESSION; - // pfs::DOMIO pfsio; - bool firstFrame = true; - half *halfR = NULL; - half *halfG = NULL; - half *halfB = NULL; - - pfs::Frame *frame = inpfsframe; - pfs::Channel *R, *G, *B; - //TODO - // Channels are named X Y Z but contain R G B data - frame->getXYZChannels(R, G, B); - R = frame->getChannel( "X" ); - G = frame->getChannel( "Y" ); - B = frame->getChannel( "Z" ); - const char* luminanceTag = frame->getTags()->getString("LUMINANCE"); - - Header header(frame->getWidth(), - frame->getHeight(), - 1, // aspect ratio - Imath::V2f (0, 0), // screenWindowCenter - 1, // screenWindowWidth - INCREASING_Y, // lineOrder - exrCompression ); - // Define channels in Header - { - // pfs::ChannelIteratorPtr cit( frame->getChannelIterator() ); - header.channels().insert( "R", Channel(HALF) ); - header.channels().insert( "G", Channel(HALF) ); - header.channels().insert( "B", Channel(HALF) ); - } - - // Copy tags to attributes - { - pfs::TagIteratorPtr it( frame->getTags()->getIterator() ); - - while( it->hasNext() ) - { - const char *tagName = it->getNext(); - header.insert( tagName, StringAttribute(frame->getTags()->getString( tagName )) ); - } - - //Copy all channel tags - pfs::ChannelIteratorPtr cit( frame->getChannelIterator() ); - while( cit->hasNext() ) - { - pfs::Channel *ch = cit->getNext(); - pfs::TagIteratorPtr tit( ch->getTags()->getIterator() ); - while( tit->hasNext() ) - { - const char *tagName = tit->getNext(); - string channelTagName = ch->getName(); - channelTagName += ":"; - channelTagName += tagName; - header.insert( channelTagName.c_str(), StringAttribute(ch->getTags()->getString( tagName )) ); - } - } - } - FrameBuffer frameBuffer; - // Create channels in FrameBuffer - { - // pfs::ChannelIterator *it = frame->getChannels(); - - if ( firstFrame ) - { - halfR = new half[frame->getWidth()*frame->getHeight()]; - halfG = new half[frame->getWidth()*frame->getHeight()]; - halfB = new half[frame->getWidth()*frame->getHeight()]; - firstFrame = false; - } - frameBuffer.insert( "R", // name - Slice( HALF, // type - (char*)halfR, // base - sizeof(half) * 1, // xStride - sizeof(half) * frame->getWidth()) ); // yStride - - frameBuffer.insert( "G", // name - Slice( HALF, // type - (char*)halfG, // base - sizeof(half) * 1, // xStride - sizeof(half) * frame->getWidth()) ); // yStride - - frameBuffer.insert( "B", // name - Slice( HALF, // type - (char*)halfB, // base - sizeof(half) * 1, // xStride - sizeof(half) * frame->getWidth()) ); // yStride - - int pixelCount = frame->getHeight()*frame->getWidth(); - - // Get Array2D from Channel - pfs::Array2D* Rr = R->getChannelData(); - pfs::Array2D* Gr = G->getChannelData(); - pfs::Array2D* Br = B->getChannelData(); - - // Check if pixel values do not exceed maximum HALF value - float maxValue = -1; - for( int i = 0; i < pixelCount; i++ ) - { - if( (*Rr)(i) > maxValue ) maxValue = (*Rr)(i); - if( (*Gr)(i) > maxValue ) maxValue = (*Gr)(i); - if( (*Br)(i) > maxValue ) maxValue = (*Br)(i); - // if( (*X)(i) > maxValue ) maxValue = (*X)(i); - // if( (*Y)(i) > maxValue ) maxValue = (*Y)(i); - // if( (*Z)(i) > maxValue ) maxValue = (*Z)(i); - } - - bool maxHalfExceeded = maxValue > HALF_MAX; - - if ( maxHalfExceeded ) - { - // Rescale and copy pixels to half-type buffers - float scaleFactor = HALF_MAX/maxValue; - for( int i = 0; i < pixelCount; i++ ) - { - halfR[i] = (half)((*Rr)(i)*scaleFactor); - halfG[i] = (half)((*Gr)(i)*scaleFactor); - halfB[i] = (half)((*Br)(i)*scaleFactor); - // halfR[i] = (half)((*X)(i)*scaleFactor); - // halfG[i] = (half)((*Y)(i)*scaleFactor); - // halfB[i] = (half)((*Z)(i)*scaleFactor); - } - // Store scale factor as WhileLuminance standard sttribute - // in order to restore absolute values later - addWhiteLuminance( header, 1/scaleFactor ); - } - else - { - // Copy pixels to half-type buffers - for( int i = 0; i < pixelCount; i++ ) - { - halfR[i] = min( (*Rr)(i), HALF_MAX ); - halfG[i] = min( (*Gr)(i), HALF_MAX ); - halfB[i] = min( (*Br)(i), HALF_MAX ); - // halfR[i] = min( (*X)(i), HALF_MAX ); - // halfG[i] = min( (*Y)(i), HALF_MAX ); - // halfB[i] = min( (*Z)(i), HALF_MAX ); - } - if( luminanceTag != NULL && !strcmp( luminanceTag, "ABSOLUTE" ) ) - { - addWhiteLuminance( header, 1 ); - } - } - } - OutputFile file(outfilename, header); - file.setFrameBuffer (frameBuffer); - file.writePixels( frame->getHeight() ); - - delete[] halfR; - delete[] halfG; - delete[] halfB; -} diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsouthdrimage.cpp luminance-hdr-2.3.1/src/Fileformat/pfsouthdrimage.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsouthdrimage.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsouthdrimage.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -38,7 +38,7 @@ #include #include "Libpfs/frame.h" -#include "Common/msec_timer.h" +#include "Libpfs/utils/msec_timer.h" namespace { @@ -77,11 +77,12 @@ const int height = in_frame->getHeight(); // const int elems = width*height; - QImage* temp_qimage = new QImage(width, height, QImage::Format_RGB32); + QImage* temp_qimage = new QImage(width, height, QImage::Format_ARGB32); - const float* p_R = Xc->getChannelData()->getRawData(); - const float* p_G = Yc->getChannelData()->getRawData(); - const float* p_B = Zc->getChannelData()->getRawData(); + // DAVIDE - FIX THIS FUNCTION PLEASE! + const float* p_R = Xc->data(); + const float* p_G = Yc->data(); + const float* p_B = Zc->data(); QRgb *pixels = reinterpret_cast(temp_qimage->bits()); diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsoutldrimage.cpp luminance-hdr-2.3.1/src/Fileformat/pfsoutldrimage.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsoutldrimage.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsoutldrimage.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,10 +1,9 @@ -/** - * @brief Writing QImage from PFS stream (which is a tonemapped LDR) +/* * - * This file is a part of LuminanceHDR package. + * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2006 Giuseppe Rota - * Copyright (C) 2010, 2011 Davide Anastasia + * Copyright (C) 2010, 2011, 2012, 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 @@ -21,35 +20,46 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Giuseppe Rota - * @author Davide Anastasia - * New implementation: - * 1) avoids the presence of a temporary buffer - * 2) returns QImage* instead than a QImage - * 3) has OpenMP (multi thread) capability) - * */ +//! \brief Writing QImage from PFS stream (which is a tonemapped LDR) +//! \author Giuseppe Rota +//! \ author Davide Anastasia +//! New implementation: +//! 1) avoids the presence of a temporary buffer +//! 2) returns QImage* instead than a QImage +//! 3) has OpenMP (multi thread) capability) + #include #include #include #include +#include + +#include #include "pfsoutldrimage.h" -#include "Libpfs/frame.h" -#include "Common/msec_timer.h" + +#include +#include +#include + +using namespace std; +using namespace boost::assign; QImage* fromLDRPFStoQImage(pfs::Frame* in_frame, float min_luminance, float max_luminance, - LumMappingMethod mapping_method) + RGBMappingType mapping_method) { #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); #endif - assert( in_frame != NULL ); + //assert( in_frame != NULL ); + if (in_frame == NULL) + throw std::runtime_error("Null pointer"); pfs::Channel *Xc, *Yc, *Zc; in_frame->getXYZChannels( Xc, Yc, Zc ); @@ -60,18 +70,19 @@ QImage* temp_qimage = new QImage(width, height, QImage::Format_RGB32); - const float* p_R = Xc->getChannelData()->getRawData(); - const float* p_G = Yc->getChannelData()->getRawData(); - const float* p_B = Zc->getChannelData()->getRawData(); + // DAVIDE - FIX THIS FUNCTION + const float* p_R = Xc->data(); + const float* p_G = Yc->data(); + const float* p_B = Zc->data(); QRgb *pixels = reinterpret_cast(temp_qimage->bits()); - FloatRgbToQRgb converter(min_luminance, max_luminance, mapping_method); + RGBRemapper rgbRemapper(min_luminance, max_luminance, mapping_method); #pragma omp parallel for shared(pixels) for (int idx = 0; idx < height*width; ++idx) { - converter.toQRgb(p_R[idx], p_G[idx], p_B[idx], pixels[idx]); + rgbRemapper.toQRgb(p_R[idx], p_G[idx], p_B[idx], pixels[idx]); } #ifdef TIMER_PROFILING diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsoutldrimage.h luminance-hdr-2.3.1/src/Fileformat/pfsoutldrimage.h --- luminance-hdr-2.3.0/src/Fileformat/pfsoutldrimage.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsoutldrimage.h 2013-04-07 18:41:14.000000000 +0000 @@ -30,12 +30,14 @@ #ifndef FROMLDRPFSTOQIMAGE #define FROMLDRPFSTOQIMAGE +#include #include -#include "Common/FloatRgbToQRgb.h" + +#include // forward declaration namespace pfs { - class Frame; +class Frame; } //! \brief Build from a pfs::Frame a QImage of the same size @@ -44,6 +46,6 @@ QImage* fromLDRPFStoQImage(pfs::Frame* in_frame, float min_luminance = 0.0f, float max_luminance = 1.0f, - LumMappingMethod mapping_method = MAP_LINEAR); + RGBMappingType mapping_method = MAP_LINEAR); #endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfsoutrgbe.cpp luminance-hdr-2.3.1/src/Fileformat/pfsoutrgbe.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfsoutrgbe.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfsoutrgbe.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/** - * @brief save a radiance rgbe file - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2006,2007 Giuseppe Rota - * - * 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 Rafal Mantiuk, - * @author Giuseppe Rota - */ - -#include - -#include "rgbeio.h" - -#include "Libpfs/frame.h" -#include "Libpfs/domio.h" - -void writeRGBEfile(pfs::Frame* inputpfshdr, const char* outfilename) -{ - pfs::DOMIO pfsio; - FILE *outfp = fopen(outfilename,"wb"); - RGBEWriter writer(outfp); - pfs::Channel *X, *Y, *Z; - // X Y Z Channels contain R G B data - inputpfshdr->getXYZChannels(X, Y, Z); - assert( X!=NULL && Y!=NULL && Z!=NULL ); - writer.writeImage(X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - fclose(outfp); -} diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfstiff.cpp luminance-hdr-2.3.1/src/Fileformat/pfstiff.cpp --- luminance-hdr-2.3.0/src/Fileformat/pfstiff.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfstiff.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1042 +0,0 @@ -/** - * @brief Tiff facilities - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2006 Giuseppe Rota - * 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 - * ---------------------------------------------------------------------- - * - * @author Grzegorz Krawczyk, - * slightly modified by Giuseppe Rota for Luminance HDR - * added color management support by Franco Comida - */ - -#include "pfstiff.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include "Common/ResourceHandlerLcms.h" - -#include "Libpfs/frame.h" -#include "Libpfs/domio.h" - -#include "Common/LuminanceOptions.h" - -namespace -{ - -/////////////////////////////////////////////////////////////////////////////////// -// \brief This code is taken from tiff.data()icc.c from libcms distribution and sligthly modified -// \ref http://svn.ghostscript.com/ghostscript/trunk/gs/lcms2/utils/tificc/tificc.c -cmsHPROFILE -GetTIFFProfile(TIFF* in) -{ - cmsHPROFILE hProfile; - void* iccProfilePtr; - cmsUInt32Number iccProfileSize; - - if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &iccProfileSize, &iccProfilePtr)) - { - qDebug () << "iccProfileSize: " << iccProfileSize; - hProfile = cmsOpenProfileFromMem(iccProfilePtr, iccProfileSize); - - if (hProfile) return hProfile; - } - - // Try to see if "colorimetric" tiff.data() - cmsCIExyYTRIPLE primaries; - cmsCIExyY whitePoint; - cmsToneCurve* curve[3]; - - cmsFloat32Number* chr; - if (TIFFGetField(in, TIFFTAG_PRIMARYCHROMATICITIES, &chr)) - { - 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.Y = primaries.Green.Y = primaries.Blue.Y = 1.0; - - cmsFloat32Number* wp; - if (TIFFGetField (in, TIFFTAG_WHITEPOINT, &wp)) - { - whitePoint.x = wp[0]; - whitePoint.y = wp[1]; - whitePoint.Y = 1.0; - - // Transferfunction is a bit harder.... - cmsUInt16Number *gmr; - cmsUInt16Number *gmg; - cmsUInt16Number *gmb; - - TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, &gmr, &gmg, &gmb); - - curve[0] = cmsBuildTabulatedToneCurve16(NULL, 256, gmr); - curve[1] = cmsBuildTabulatedToneCurve16(NULL, 256, gmg); - curve[2] = cmsBuildTabulatedToneCurve16(NULL, 256, gmb); - - hProfile = cmsCreateRGBProfile (&whitePoint, &primaries, curve); - - cmsFreeToneCurve(curve[0]); - cmsFreeToneCurve(curve[1]); - cmsFreeToneCurve(curve[2]); - - return hProfile; - } - } - - return 0; -} -// End of code form tiff.data()icc.c -/////////////////////////////////////////////////////////////////////////////// - -void -transform_to_rgb(unsigned char *ScanLineIn, unsigned char *ScanLineOut, uint32 size, int nSamples) -{ - for (uint32 i = 0; i < size; i += nSamples) - { - unsigned char C = *(ScanLineIn + i + 0); - unsigned char M = *(ScanLineIn + i + 1); - unsigned char Y = *(ScanLineIn + i + 2); - unsigned char K = *(ScanLineIn + i + 3); - *(ScanLineOut + i + 0) = ((255 - C) * (255 - K)) / 255; - *(ScanLineOut + i + 1) = ((255 - M) * (255 - K)) / 255; - *(ScanLineOut + i + 2) = ((255 - Y) * (255 - K)) / 255; - *(ScanLineOut + i + 3) = 255; - } -} - -void -transform_to_rgb_16(uint16 *ScanLineIn, uint16 *ScanLineOut, uint32 size, int nSamples) -{ - for (uint32 i = 0; i < size/2; i += nSamples) - { - uint16 C = *(ScanLineIn + i + 0); - uint16 M = *(ScanLineIn + i + 1); - uint16 Y = *(ScanLineIn + i + 2); - uint16 K = *(ScanLineIn + i + 3); - *(ScanLineOut + i + 0) = ((65535 - C) * (65535 - K)) / 65535; - *(ScanLineOut + i + 1) = ((65535 - M) * (65535 - K)) / 65535; - *(ScanLineOut + i + 2) = ((65535 - Y) * (65535 - K)) / 65535; - *(ScanLineOut + i + 3) = 65535; - } -} - -// The way QRgb is stored is a bit weird, hence the strange way to store the -// final value -void -cmyk_to_bgra_qimage(const unsigned char *inVector, unsigned char *outVector, - uint32 size, int nSamples) -{ - for (uint32 i = 0; i < size; i += nSamples) - { - unsigned char C = *(inVector + 0); - unsigned char M = *(inVector + 1); - unsigned char Y = *(inVector + 2); - unsigned char K = *(inVector + 3); - *(outVector + 2) = ((255 - C) * (255 - K)) / 255; // RED - *(outVector + 1) = ((255 - M) * (255 - K)) / 255; // GREEN - *(outVector + 0) = ((255 - Y) * (255 - K)) / 255; // BLUE - *(outVector + 3) = 255; - - inVector += 4; - outVector += 4; - } -} - -const float DIV_255 = 1.f/255.f; -const float DIV_256 = 1.f/256.f; -} - -TiffReader::TiffReader(const char *filename, const char *tempfilespath, bool wod): - tif( TIFFOpen(filename, "r") ), - writeOnDisk(wod), - fileName(filename), - tempFilesPath(tempfilespath) -{ - if (!tif) - throw std::runtime_error ("TIFF: could not open file for reading."); - // read header containing width and height from file - //--- image size - TIFFGetField (tif, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &height); - - if (width * height <= 0) - { - throw std::runtime_error ("TIFF: illegal image size."); - } - - //--- image parameters - uint16 planar; - TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planar); - qDebug() << "Planar configuration: " << planar; - if (planar != PLANARCONFIG_CONTIG) - { - throw std::runtime_error ("TIFF: unsupported planar configuration"); - } - - if (!TIFFGetField(tif, TIFFTAG_COMPRESSION, &comp)) // compression type - comp = COMPRESSION_NONE; - - // type of photometric data - if (!TIFFGetFieldDefaulted (tif, TIFFTAG_PHOTOMETRIC, &phot)) - { - throw std::runtime_error ("TIFF: unspecified photometric type"); - } - - qDebug () << "Photometric type : " << phot; - - uint16 *extra_sample_types = 0; - uint16 extra_samples_per_pixel = 0; - switch (phot) - { - case PHOTOMETRIC_LOGLUV: - { - qDebug ("Photometric data: LogLuv"); - if (comp != COMPRESSION_SGILOG && comp != COMPRESSION_SGILOG24) - { - throw std::runtime_error ("TIFF: only support SGILOG compressed LogLuv data"); - } - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - TypeOfData = FLOATLOGLUV; - } - break; - case PHOTOMETRIC_RGB: - { - qDebug("Photometric data: RGB"); - // read extra samples (# of alpha channels) - if (TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &extra_samples_per_pixel, &extra_sample_types) != 1) - { - extra_samples_per_pixel = 0; - } - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); - bps = nSamples - extra_samples_per_pixel; - has_alpha = (extra_samples_per_pixel == 1); - // qDebug("nSamples=%d extra_samples_per_pixel=%d",nSamples,extra_samples_per_pixel); - // qDebug("has alpha? %s", has_alpha ? "true" : "false"); - if (bps != 3) - { - qDebug ("TIFF: unsupported samples per pixel for RGB"); - throw std::runtime_error ("TIFF: unsupported samples per pixel for RGB"); - } - if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || (bps != 8 && bps != 16 && bps != 32)) - { - qDebug ("TIFF: unsupported bits per sample for RGB"); - throw std::runtime_error ("TIFF: unsupported bits per sample for RGB"); - } - - switch (bps) - { - case 8: - TypeOfData = BYTE; - qDebug ("8bit per channel"); - break; - case 16: - TypeOfData = WORD; - qDebug ("16bit per channel"); - break; - default: - TypeOfData = FLOAT; - qDebug ("32bit float per channel"); - break; - } - ColorSpace = RGB; - } - break; - case PHOTOMETRIC_SEPARATED: - { - qDebug("Photometric data: CMYK"); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); - qDebug() << "nSamples: " << nSamples; - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps); - - switch (bps) - { - case 8: - TypeOfData = BYTE; - qDebug ("8bit per channel"); - break; - case 16: - TypeOfData = WORD; - qDebug ("16bit per channel"); - break; - default: - TypeOfData = FLOAT; - qDebug ("32bit float per channel"); - break; - } - ColorSpace = CMYK; - } - break; - default: - //qFatal("Unsupported photometric type: %d",phot); - throw std::runtime_error ("TIFF: unsupported photometric type"); - } - - if (!TIFFGetField(tif, TIFFTAG_STONITS, &stonits)) - stonits = 1.; -} - -pfs::Frame* -TiffReader::readIntoPfsFrame() -{ - qDebug() << "TiffReader::readIntoPfsFrame()"; - - bool doTransform = false; - // LuminanceOptions luminance_opts; - // int camera_profile_opt = luminance_opts.getCameraProfile (); - - // will get automatigically cleaned on return of this function! - ScopedCmsTransform xform; - -// if (camera_profile_opt == 1) // embedded -// { - ScopedCmsProfile hIn( GetTIFFProfile(tif) ); - - if (hIn) - { - qDebug () << "Found ICC profile"; - - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - - cmsUInt32Number cmsInputFormat = TYPE_CMYK_8; - cmsUInt32Number cmsOutputFormat = TYPE_RGBA_8; - cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; - - if (ColorSpace == RGB && TypeOfData == WORD) - { - cmsInputFormat = TYPE_RGB_16; - cmsOutputFormat = TYPE_RGB_16; - } - else if (ColorSpace == RGB && TypeOfData == BYTE) - { - cmsInputFormat = TYPE_RGB_8; - cmsOutputFormat = TYPE_RGB_8; - } - else if (ColorSpace == CMYK && TypeOfData == WORD) - { - cmsInputFormat = TYPE_CMYK_16; - cmsOutputFormat = TYPE_RGBA_16; - } - else - { - cmsInputFormat = TYPE_CMYK_8; - cmsOutputFormat = TYPE_RGBA_8; - } - - xform.reset( cmsCreateTransform (hIn.data(), cmsInputFormat, hsRGB.data(), cmsOutputFormat, cmsIntent, 0) ); - if (xform) - { - doTransform = true; - qDebug () << "Created transform"; - } - } -#ifdef QT_DEBUG - else - { - qDebug () << "No embedded profile found"; - } -#endif -// } -// else if (camera_profile_opt == 2) // from file -// { -// QString profile_fname = luminance_opts.getCameraProfileFileName (); -// qDebug () << "Camera profile: " << profile_fname; - -// if (!profile_fname.isEmpty ()) -// { -// QByteArray ba( QFile::encodeName( profile_fname ) ); - -// ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); -// ScopedCmsProfile hIn( cmsOpenProfileFromFile (ba.data (), "r") ); - -// if ( hsRGB && hIn ) -// { -// if (ColorSpace == RGB && TypeOfData == WORD) -// xform.reset( cmsCreateTransform (hIn.data(), TYPE_RGB_16, hsRGB.data(), TYPE_RGB_16, INTENT_PERCEPTUAL, 0) ); -// else if (ColorSpace == RGB && TypeOfData == BYTE) -// xform.reset( cmsCreateTransform (hIn.data(), TYPE_RGB_8, hsRGB.data(), TYPE_RGB_8, INTENT_PERCEPTUAL, 0) ); -// else if (ColorSpace == CMYK && TypeOfData == WORD) -// xform.reset( cmsCreateTransform (hIn.data(), TYPE_CMYK_16, hsRGB.data(), TYPE_RGBA_16, INTENT_PERCEPTUAL, 0) ); -// else -// xform.reset( cmsCreateTransform (hIn.data(), TYPE_CMYK_8, hsRGB.data(), TYPE_RGBA_8, INTENT_PERCEPTUAL, 0) ); -// } -// doTransform = true; - -// qDebug () << "Created transform"; -// } -// } - - pfs::Frame* frame = new pfs::Frame (width, height); - - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; - frame->createXYZChannels (Xc, Yc, Zc); - - float* X = Xc->getRawData(); - float* Y = Yc->getRawData(); - float* Z = Zc->getRawData(); - - //--- image length - uint32 imagelength; - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); - - emit maximumValue(imagelength); //for QProgressDialog - - //--- image scanline size - uint32 scanlinesize = TIFFScanlineSize(tif); - std::vector buf( scanlinesize ); - std::vector buf2; - if ( xform ) - { - buf2.resize( scanlinesize ); - } - - qDebug () << "scanlinesize: " << scanlinesize; - //--- read scan lines - const int image_width = width; - - for (uint32 row = 0; row < height; row++) - { - switch (TypeOfData) - { - case FLOAT: - case FLOATLOGLUV: - { - float* buf_fp = reinterpret_cast(buf.data()); - - TIFFReadScanline (tif, buf_fp, row); - for (int i = 0; i < image_width; i++) - { - X[row * image_width + i] = buf_fp[i * nSamples]; - Y[row * image_width + i] = buf_fp[i * nSamples + 1]; - Z[row * image_width + i] = buf_fp[i * nSamples + 2]; - } - } - break; - case WORD: - { - uint16* buf_wp = reinterpret_cast(buf.data()); - - TIFFReadScanline(tif, buf_wp, row); - if (doTransform) - { - uint16* buf_wp_2 = reinterpret_cast(buf2.data()); - - cmsDoTransform(xform.data(), buf_wp, buf_wp_2, image_width); - - ::std::swap(buf_wp, buf_wp_2); - } - else if (ColorSpace == CMYK) - { - transform_to_rgb_16(buf_wp, buf_wp, scanlinesize, nSamples); - } - for (int i = 0; i < image_width; i++) - { - X[row * image_width + i] = buf_wp[i * nSamples]; - Y[row * image_width + i] = buf_wp[i * nSamples + 1]; - Z[row * image_width + i] = buf_wp[i * nSamples + 2]; - } - } - break; - case BYTE: - { - uint8* buf_bp = reinterpret_cast(buf.data()); - - TIFFReadScanline(tif, buf_bp, row); - if (doTransform) - { - uint8* buf_bp_2 = reinterpret_cast(buf2.data()); - - cmsDoTransform(xform.data(), buf_bp, buf_bp_2, image_width); - - ::std::swap(buf_bp, buf_bp_2); - } - else if (ColorSpace == CMYK) - { - transform_to_rgb(buf_bp, buf_bp, scanlinesize, nSamples); - } - for (int i = 0; i < image_width; i++) - { - X[row * image_width + i] = powf(buf_bp[i * nSamples] * DIV_255, 2.2f); // why? - Y[row * image_width + i] = powf(buf_bp[i * nSamples + 1] * DIV_255, 2.2f); // why? - Z[row * image_width + i] = powf(buf_bp[i * nSamples + 2] * DIV_255, 2.2f); // why? - } - } - break; - } - emit nextstep (row); //for QProgressDialog - } - - if (writeOnDisk) - { - assert (TypeOfData != FLOAT); - assert (TypeOfData != FLOATLOGLUV); - - float scaleFactor = DIV_256; - if ( TypeOfData == BYTE) scaleFactor = 1.0f; - - pfs::Channel *Xc, *Yc, *Zc; - frame->createXYZChannels (Xc, Yc, Zc); - - float* X = Xc->getRawData(); - float* Y = Yc->getRawData(); - float* Z = Zc->getRawData(); - - QImage remapped( image_width, imagelength, QImage::Format_RGB32); - - for (uint32 row = 0; row < height; ++row) - { - QRgb* line = reinterpret_cast(remapped.scanLine(row)); - for (uint32 col = 0; col < width; ++col) - { - line[col] = qRgb(static_cast(*X * scaleFactor), - static_cast(*Y * scaleFactor), - static_cast(*Z * scaleFactor)); - - X++; Y++; Z++; - } - } - QFileInfo fi (fileName); - QString fname = fi.completeBaseName () + ".thumb.jpg"; - - remapped.scaledToHeight(imagelength / 10).save(tempFilesPath + "/" + fname); - } - - //if (TypeOfData==FLOATLOGLUV) - // pfs::transformColorSpace( pfs::CS_XYZ, X,Y,Z, pfs::CS_RGB, X,Y,Z ); - TIFFClose(tif); - - return frame; -} - -// given for granted that users of this function call it only after checking that TypeOfData==BYTE -QImage* -TiffReader::readIntoQImage() -{ -#ifdef QT_DEBUG - qDebug() << "TiffReader::readIntoQImage()"; -#endif - assert(TypeOfData == BYTE); - - bool doTransform = false; - - ScopedCmsProfile hIn( GetTIFFProfile(tif) ); - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - - ScopedCmsTransform xform; - - if ( hIn && hsRGB ) - { - qDebug () << "Found ICC profile"; - - cmsUInt32Number cmsInputFormat = TYPE_CMYK_8; - const cmsUInt32Number cmsOutputFormat = TYPE_BGRA_8; // RGBA_8; - const cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; - - if (has_alpha && ColorSpace == RGB && TypeOfData == BYTE) - { - cmsInputFormat = TYPE_RGBA_8; - } - else if (!has_alpha && ColorSpace == RGB && TypeOfData == BYTE) - { - cmsInputFormat = TYPE_RGB_8; - } - else if (ColorSpace == CMYK && TypeOfData == BYTE) - { - cmsInputFormat = TYPE_CMYK_8; - } else - { - TIFFClose(tif); - throw std::runtime_error("TiffReader: Unsupported colorspace combination"); - } - - xform.reset( cmsCreateTransform (hIn.data(), cmsInputFormat, - hsRGB.data(), cmsOutputFormat, - cmsIntent, 0) ); - if ( xform ) - { - doTransform = true; - } - else - { - doTransform = false; - } - } - else - { - doTransform = false; -#ifdef QT_DEBUG - qDebug () << "No embedded profile found"; -#endif - } - - QScopedPointer toReturn( new QImage(width, height, QImage::Format_RGB32) ); - - //--- image length - uint32 imagelength; - TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &imagelength); - - //--- image scanline size - uint32 scanlinesize = TIFFScanlineSize(tif); - - qDebug() << "Scanlinesize:" << scanlinesize; - - std::vector buffer(scanlinesize); - std::vector bufferConverted; - if ( doTransform ) - { - bufferConverted.resize((width << 2)); - } - - qDebug() << "Do Transform: " << doTransform; - - //--- read scan lines - if ( doTransform ) - { - // color-converted branch! - for (uint y = 0; y < height; ++y) - { - TIFFReadScanline(tif, buffer.data(), y); - - cmsDoTransform(xform.data(), - buffer.data(), - toReturn->scanLine(y), width); - } - } - else - { - // no color-conversion - switch (ColorSpace) - { - case CMYK: - { - for (uint y = 0; y < height; ++y) - { - TIFFReadScanline(tif, buffer.data(), y); - - cmyk_to_bgra_qimage(buffer.data(), - toReturn->scanLine(y), - scanlinesize, - nSamples); - } - } break; - case RGB: - { - for (uint y = 0; y < height; ++y) - { - QRgb* qImageData = reinterpret_cast(toReturn->scanLine(y)); - TIFFReadScanline(tif, buffer.data(), y); - - // it's not really efficient, but I hope it doesn't get used - // too many times in a real world scenario! - for (uint x = 0; x < width; x++) - { - qImageData[x] = qRgba(buffer[(x * nSamples)], - buffer[(x * nSamples) + 1], - buffer[(x * nSamples) + 2], - has_alpha ? buffer[(x * nSamples) + 3] : 0xFF); - } - } - } break; - } - } - TIFFClose(tif); - - return toReturn.take(); -} - -TiffWriter::TiffWriter (const char *filename, pfs::Frame* f): - tif(TIFFOpen (filename, "w")), - ldrimage(0), - pixmap(0), - pfsFrame(f), - width(f->getWidth()), - height(f->getHeight()) -{ - if (!tif) - { - throw std::runtime_error ("TIFF: could not open file for writing."); - } - - TIFFSetField (tif, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField (tif, TIFFTAG_IMAGELENGTH, height); - TIFFSetField (tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField (tif, TIFFTAG_SAMPLESPERPIXEL, 3); - TIFFSetField (tif, TIFFTAG_ROWSPERSTRIP, 1); -} - -TiffWriter::TiffWriter (const char *filename, const quint16 * pix, int w, int h): - tif(TIFFOpen (filename, "w")), - ldrimage(0), - pixmap(pix), - pfsFrame(0), - width(w), - height(h) -{ - if (!tif) - { - throw std::runtime_error ("TIFF: could not open file for writing."); - } - - TIFFSetField (tif, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField (tif, TIFFTAG_IMAGELENGTH, height); - TIFFSetField (tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField (tif, TIFFTAG_SAMPLESPERPIXEL, 3); - TIFFSetField (tif, TIFFTAG_ROWSPERSTRIP, 1); -} - -TiffWriter::TiffWriter (const char *filename, QImage * f): - tif(TIFFOpen (filename, "w")), - ldrimage(f), - pixmap(0), - pfsFrame(0), - width(f->width()), - height(f->height()) -{ - if (!tif) - { - throw std::runtime_error ("TIFF: could not open file for writing."); - } - - uint16 extras[1]; - extras[0] = EXTRASAMPLE_ASSOCALPHA; - - TIFFSetField (tif, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField (tif, TIFFTAG_IMAGELENGTH, height); - TIFFSetField (tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField (tif, TIFFTAG_SAMPLESPERPIXEL, 4); - TIFFSetField (tif, TIFFTAG_EXTRASAMPLES, 1, &extras); - TIFFSetField (tif, TIFFTAG_ROWSPERSTRIP, 1); -} - -//write 32 bit float Tiff from pfs::Frame -int -TiffWriter::writeFloatTiff() -{ - assert(pfsFrame != 0); - - TIFFSetField (tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); // TODO what about others? - TIFFSetField (tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField (tif, TIFFTAG_BITSPERSAMPLE, 32); - - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; - - pfsFrame->getXYZChannels(Xc, Yc, Zc); - - const float *X = Xc->getRawData (); - const float *Y = Yc->getRawData (); - const float *Z = Zc->getRawData (); - - tsize_t strip_size = TIFFStripSize (tif); - tstrip_t strips_num = TIFFNumberOfStrips (tif); - float *strip_buf = (float *) _TIFFmalloc (strip_size); //enough space for a strip (row) - if (!strip_buf) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: error allocating buffer."); - } - - emit maximumValue (strips_num); // for QProgressDialog - - for (unsigned int s = 0; s < strips_num; s++) - { - for (unsigned int col = 0; col < width; col++) - { - strip_buf[3 * col + 0] = X[s * width + col]; //(*X)(col,s); - strip_buf[3 * col + 1] = Y[s * width + col]; //(*Y)(col,s); - strip_buf[3 * col + 2] = Z[s * width + col]; //(*Z)(col,s); - } - if (TIFFWriteEncodedStrip(tif, s, strip_buf, strip_size) == 0) - { - qDebug ("error writing strip"); - TIFFClose(tif); - - return -1; - } - else - { - emit nextstep (s); // for QProgressDialog - } - } - _TIFFfree (strip_buf); - TIFFClose(tif); - - return 0; -} - -//write LogLUv Tiff from pfs::Frame -int -TiffWriter::writeLogLuvTiff () -{ - assert(pfsFrame != 0); - - TIFFSetField (tif, TIFFTAG_COMPRESSION, COMPRESSION_SGILOG); - TIFFSetField (tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_LOGLUV); - TIFFSetField (tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - TIFFSetField (tif, TIFFTAG_STONITS, 1.); /* not known */ - - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; - - pfsFrame->getXYZChannels(Xc, Yc, Zc); - - const float *X = Xc->getRawData (); - const float *Y = Yc->getRawData (); - const float *Z = Zc->getRawData (); - - tsize_t strip_size = TIFFStripSize (tif); - tstrip_t strips_num = TIFFNumberOfStrips (tif); - float *strip_buf = (float *) _TIFFmalloc (strip_size); // enough space for a strip - if (!strip_buf) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: error allocating buffer."); - } - - emit maximumValue (strips_num); // for QProgressDialog - - for (unsigned int s = 0; s < strips_num; s++) - { - for (unsigned int col = 0; col < width; col++) - { - strip_buf[3 * col + 0] = X[s * width + col]; //(*X)(col,s); - strip_buf[3 * col + 1] = Y[s * width + col]; //(*Y)(col,s); - strip_buf[3 * col + 2] = Z[s * width + col]; //(*Z)(col,s); - } - if (TIFFWriteEncodedStrip(tif, s, strip_buf, strip_size) == 0) - { - qDebug ("error writing strip"); - TIFFClose(tif); - return -1; - } - else - { - emit nextstep (s); // for QProgressDialog - } - } - _TIFFfree (strip_buf); - TIFFClose(tif); - - return 0; -} - -int -TiffWriter::write8bitTiff () -{ - assert(ldrimage != NULL); - if (ldrimage == NULL) - throw std::runtime_error ("TIFF: QImage was not set correctly"); - - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - cmsUInt32Number profileSize = 0; - cmsSaveProfileToMem (hsRGB.data(), NULL, &profileSize); // get the size - - std::vector embedBuffer(profileSize); - - cmsSaveProfileToMem(hsRGB.data(), - reinterpret_cast(embedBuffer.data()), - &profileSize); - - TIFFSetField(tif, TIFFTAG_ICCPROFILE, profileSize, - reinterpret_cast(embedBuffer.data()) ); - - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); // TODO what about others? - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - - tsize_t strip_size = TIFFStripSize(tif); - tstrip_t strips_num = TIFFNumberOfStrips(tif); - - char *strip_buf = (char *)_TIFFmalloc (strip_size); //enough space for a strip - if (!strip_buf) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: error allocating buffer"); - } - - QRgb *ldrpixels = reinterpret_cast(ldrimage->bits ()); - - emit maximumValue (strips_num); // for QProgressDialog - for (unsigned int s = 0; s < strips_num; s++) - { - for (unsigned int col = 0; col < width; col++) - { - strip_buf[4 * col + 0] = qRed (ldrpixels[width * s + col]); - strip_buf[4 * col + 1] = qGreen (ldrpixels[width * s + col]); - strip_buf[4 * col + 2] = qBlue (ldrpixels[width * s + col]); - strip_buf[4 * col + 3] = qAlpha (ldrpixels[width * s + col]); - } - if (TIFFWriteEncodedStrip(tif, s, strip_buf, strip_size) == 0) - { - qDebug ("error writing strip"); - TIFFClose(tif); - return -1; - } - else - { - emit nextstep (s); // for QProgressDialog - } - } - _TIFFfree (strip_buf); - TIFFClose(tif); - - return 0; -} - -int -TiffWriter::write16bitTiff () -{ - assert(pixmap != NULL); - - if (pixmap == NULL) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: 16 bits pixmap was not set correctly"); - } - - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - cmsUInt32Number profileSize = 0; - cmsSaveProfileToMem (hsRGB.data(), NULL, &profileSize); // get the size - - std::vector embedBuffer(profileSize); - - cmsSaveProfileToMem(hsRGB.data(), - reinterpret_cast(embedBuffer.data()), - &profileSize); - - TIFFSetField(tif, TIFFTAG_ICCPROFILE, profileSize, - reinterpret_cast(embedBuffer.data()) ); - - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); // TODO what about others? - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - - tsize_t strip_size = TIFFStripSize (tif); - tstrip_t strips_num = TIFFNumberOfStrips (tif); - - quint16 *strip_buf = (quint16 *) _TIFFmalloc (strip_size); //enough space for a strip - if (!strip_buf) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: error allocating buffer"); - } - - emit maximumValue (strips_num); // for QProgressDialog - - for (unsigned int s = 0; s < strips_num; s++) - { - for (unsigned int col = 0; col < width; col++) - { - strip_buf[3 * col] = pixmap[3 * (width * s + col)]; - strip_buf[3 * col + 1] = pixmap[3 * (width * s + col) + 1]; - strip_buf[3 * col + 2] = pixmap[3 * (width * s + col) + 2]; - } - if (TIFFWriteEncodedStrip(tif, s, strip_buf, strip_size) == 0) - { - qDebug ("error writing strip"); - TIFFClose(tif); - - return -1; - } - else - { - emit nextstep (s); // for QProgressDialog - } - } - _TIFFfree (strip_buf); - TIFFClose(tif); - - return 0; -} - -int -TiffWriter::writePFSFrame16bitTiff() -{ - assert (pfsFrame != 0); - - TIFFSetField (tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); // TODO what about others? - TIFFSetField (tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField (tif, TIFFTAG_BITSPERSAMPLE, 16); - - pfs::Channel* Xc; - pfs::Channel* Yc; - pfs::Channel* Zc; - - pfsFrame->getXYZChannels(Xc, Yc, Zc); - - const float *X = Xc->getRawData (); - const float *Y = Yc->getRawData (); - const float *Z = Zc->getRawData (); - - tsize_t strip_size = TIFFStripSize (tif); - tstrip_t strips_num = TIFFNumberOfStrips (tif); - quint16 *strip_buf = (quint16 *) _TIFFmalloc (strip_size); //enough space for a strip (row) - if (!strip_buf) - { - TIFFClose(tif); - throw std::runtime_error ("TIFF: error allocating buffer."); - } - - emit maximumValue (strips_num); // for QProgressDialog - - for (unsigned int s = 0; s < strips_num; s++) - { - for (unsigned int col = 0; col < width; col++) - { - strip_buf[3 * col + 0] = (qint16) X[s * width + col]; //(*X)(col,s); - strip_buf[3 * col + 1] = (qint16) Y[s * width + col]; //(*Y)(col,s); - strip_buf[3 * col + 2] = (qint16) Z[s * width + col]; //(*Z)(col,s); - } - if (TIFFWriteEncodedStrip(tif, s, strip_buf, strip_size) == 0) - { - qDebug ("error writing strip"); - TIFFClose(tif); - - return -1; - } - else - { - emit nextstep (s); // for QProgressDialog - } - } - _TIFFfree (strip_buf); - TIFFClose(tif); - - return 0; -} - diff -Nru luminance-hdr-2.3.0/src/Fileformat/pfstiff.h luminance-hdr-2.3.1/src/Fileformat/pfstiff.h --- luminance-hdr-2.3.0/src/Fileformat/pfstiff.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pfstiff.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/** - * @brief Tiff facilities - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2006 Giuseppe Rota - * - * 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 Grzegorz Krawczyk, - * slightly modified by Giuseppe Rota for luminance - */ - -#ifndef PFSTIFF_H -#define PFSTIFF_H - -#include -#include -#include - -#include "Libpfs/array2d.h" -#include "Libpfs/frame.h" - -class TiffReader : public QObject -{ - Q_OBJECT - - TIFF *tif; - - uint32 width; - uint32 height; - - uint16 comp; /// compression type - uint16 phot; /// type of photometric data - enum //FLOAT is the wasting space one, FLOATLOGLUV is Greg Ward's format - { - FLOATLOGLUV, - FLOAT, - WORD, - BYTE - } TypeOfData; - enum - { - RGB, - CMYK - } ColorSpace; - uint16 bps; /// bits per sample - uint16 nSamples; /// number of channels in tiff file (only 1-3 are used) - bool has_alpha; - double stonits; /// scale factor to get nit values - - bool writeOnDisk; - QString fileName; - QString tempFilesPath; - -public: - TiffReader( const char* filename, const char *tempfilespath, bool writeOnDisk ); - // ~TiffReader() {} - - int getWidth() const { return width; } - int getHeight() const { return height; } - - bool is8bitTiff() { return TypeOfData==BYTE; } - bool is16bitTiff() { return TypeOfData==WORD; } - bool is32bitTiff() { return TypeOfData==FLOAT; } - bool isLogLuvTiff() { return (TypeOfData==FLOATLOGLUV); } - - pfs::Frame* readIntoPfsFrame(); //from 8,16,32,logluv TIFF to pfs::Frame - QImage* readIntoQImage(); - -signals: //For ProgressDialog - void maximumValue(int); - void nextstep(int); -}; - -class TiffWriter : public QObject -{ - Q_OBJECT - -private: - TIFF *tif; - - QImage *ldrimage; - const quint16 *pixmap; - pfs::Frame* pfsFrame; - uint32 width; - uint32 height; - -public: - TiffWriter( const char* filename, pfs::Frame *f ); - TiffWriter( const char* filename, QImage *ldrimage ); - TiffWriter( const char* filename, const quint16 *pixmap, int w, int h); - - //! \brief write 8bit Tiff from QImage - int write8bitTiff(); - //! \brief write 16bit Tiff from 16 bits pixmap - int write16bitTiff(); - //! \brief write 32bit float Tiff from pfs::Frame - int writeFloatTiff(); - //! \brief write LogLuv Tiff from pfs::Frame - int writeLogLuvTiff(); - //! \brief write 16bit Tiff from pfs::Frame - int writePFSFrame16bitTiff(); - -signals: //For ProgressDialog - void maximumValue(int); - void nextstep(int); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/pngwriter.cpp luminance-hdr-2.3.1/src/Fileformat/pngwriter.cpp --- luminance-hdr-2.3.0/src/Fileformat/pngwriter.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pngwriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2012 Franco Comida + * 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 @@ -17,189 +18,291 @@ * 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 "pngwriter.h" + #include +#include +#include #include + #include #include +#include -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) -#include -#endif - -#include "pngwriter.h" - -PngWriter::PngWriter(const QImage *out_qimage, QString filename, int quality) : - m_out_qimage(out_qimage), - m_fname(filename), - m_quality(quality) -{} +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace boost; +using namespace pfs; -PngWriter::PngWriter(const QImage *out_qimage, int quality): - m_out_qimage(out_qimage), - m_quality(quality) -{} +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_ = it->second.as(quality_); + continue; + } + if ( it->first == "min_luminance" ) { + minLuminance_ = it->second.as(minLuminance_); + continue; + } + if ( it->first == "max_luminance" ) { + maxLuminance_ = it->second.as(maxLuminance_); + continue; + } + if ( it->first == "mapping_method" ) { + luminanceMapping_ = it->second.as(luminanceMapping_); + continue; + } + } + } + + int compressionLevel() const { + int compLevel = (9 - (int)((float)quality_/11.11111f + 0.5f)); + + assert(compLevel >= 0); + assert(compLevel <= 9); + + return compLevel; + } + + size_t quality_; + float minLuminance_; + float maxLuminance_; + RGBMappingType luminanceMapping_; +}; -bool PngWriter::writeQImageToPng() +ostream& operator<<(ostream& out, const PngWriterParams& params) { - png_uint_32 width = m_out_qimage->width(); - png_uint_32 height = m_out_qimage->height(); + stringstream ss; + ss << "PngWriterParams: ["; + ss << "compression_level: " << params.compressionLevel() << ", "; + ss << "min_luminance: " << params.minLuminance_ << ", "; + ss << "max_luminance: " << params.maxLuminance_ << ", "; + ss << "mapping_method: " << params.luminanceMapping_ << "]"; - cmsUInt32Number profile_size = 0; + return (out << ss.str()); +} - cmsHPROFILE hsRGB = cmsCreate_sRGBProfile(); - cmsSaveProfileToMem(hsRGB, NULL, &profile_size); // get the size +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 #if PNG_LIBPNG_VER_MINOR < 5 - std::vector profile_buffer(profile_size); + std::vector profileBuffer(profileSize); #else - std::vector profile_buffer(profile_size); + std::vector profileBuffer(profileSize); #endif - cmsSaveProfileToMem(hsRGB, profile_buffer.data(), &profile_size); // + cmsSaveProfileToMem(hsRGB, profileBuffer.data(), &profileSize); +#ifndef NDEBUG + std::clog << "sRGB profile size: " << profileSize << "\n"; +#endif - qDebug() << "sRGB profile size: " << profile_size; + // char profileName[5] = "sRGB"; + png_set_iCCP(png_ptr, info_ptr, "sRGB" /*profileName*/, 0, + profileBuffer.data(), (png_uint_32)profileSize); +} - FILE *outfile; +class PngWriterImpl +{ +public: + PngWriterImpl() : m_filesize(0) {} + virtual ~PngWriterImpl() {} + + virtual void setupPngDest(png_structp png_ptr) = 0; + + virtual void close() = 0; + virtual void computeSize() = 0; + + size_t getFileSize() { return m_filesize; } + void setFileSize(size_t size) { m_filesize = size; } + + bool write(const pfs::Frame &frame, const PngWriterParams& params) + { + 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) + { + close(); + + throw io::WriteException("PNG: Failed to create write struct"); + return false; + } + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, (png_infopp)NULL); + close(); + + throw io::WriteException("PNG: Failed to create info struct"); + return false; + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + close(); + + throw io::WriteException("PNG: Error writing file"); + return false; + } + + setupPngDest(png_ptr); + + 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_info(png_ptr, info_ptr); + + const Channel* rChannel; + const Channel* gChannel; + const Channel* bChannel; + frame.getXYZChannels(rChannel, gChannel, bChannel); + + std::vector scanLineOut( width * 3 ); + RGBRemapper rgbRemapper(params.minLuminance_, params.maxLuminance_, + params.luminanceMapping_); + 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()), + rgbRemapper); + png_write_row(png_ptr, scanLineOut.data()); + } + + png_write_end(png_ptr, info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); + + computeSize(); + close(); + + return true; + } + +protected: + size_t m_filesize; +}; -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - QTemporaryFile output_temp_file; -#else - std::vector outbuf; -#endif - if ( !m_fname.isEmpty() ) // we are writing to file - { - QByteArray ba( QFile::encodeName(m_fname) ); - qDebug() << "writeQImageToPng: filename: " << ba.data(); - - outfile = fopen(ba.data(), "wb"); - - if (outfile == NULL) - { - qDebug() << "can't open " << m_fname; - return false; - } - } - else // we are writing to memory buffer - { -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - if ( !output_temp_file.open() ) return false; // could not open the temporary file! - - QByteArray output_temp_filename = QFile::encodeName( output_temp_file.fileName() ); - output_temp_file.close(); - outfile = fopen(output_temp_filename.constData(), "w+"); - if ( outfile == NULL ) return false; -#else - std::vector t(width * height * 4 + (width * height * 4) * 0.1); - outbuf.swap( t ); - // reset all element of the vector to zero! - std::fill(outbuf.begin(), outbuf.end(), 0); - - qDebug() << "outbuf size: " << outbuf.size(); - - outfile = fmemopen(outbuf.data(), outbuf.size(), "w+"); - if (outfile == NULL) { - qDebug() << "Failed opening file on memory"; - return false; - } -#endif - } +struct PngWriterImplFile : public PngWriterImpl +{ + PngWriterImplFile(const std::string& filename) + : PngWriterImpl() + , m_handle() + , m_filename(filename) + {} + + void setupPngDest(png_structp png_ptr) { + open(); + png_init_io(png_ptr, handle()); + } + + void close() { m_handle.reset(); } + void computeSize() { m_filesize = 0; } + +private: + FILE* handle() { return m_handle.data(); } + + void open() { + m_handle.reset( fopen(m_filename.c_str(), "wb") ); + if ( !m_handle ) { + throw io::WriteException("Cannot open file " + m_filename); + } + } + + utils::ScopedStdIoFile m_handle; + std::string m_filename; +}; - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, NULL, - NULL, NULL); - if (!png_ptr) - { - qDebug() << "PNG: Failed to create write struct"; - fclose(outfile); - return false; - } - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - qDebug() << "PNG: Failed to create info struct"; - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - fclose(outfile); - return false; - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - qDebug() << "PNG: Error writing file"; - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(outfile); - return false; - } - - png_init_io(png_ptr, outfile); - - png_set_IHDR(png_ptr, info_ptr, width, height, - 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - - int compression_level = 9 - m_quality/11.11111; - - png_set_compression_level(png_ptr, compression_level); - - png_set_bgr(png_ptr); - - char profileName[5] = "sRGB"; - png_set_iCCP(png_ptr, info_ptr, profileName, 0, - profile_buffer.data(), (png_uint_32)profile_size); - - png_write_info(png_ptr, info_ptr); - - std::vector row_pointers(height); - - for (png_uint_32 row = 0; row < height; row++) - row_pointers[row] = NULL; - - for (png_uint_32 row = 0; row < height; row++) - row_pointers[row] = (png_bytep) png_malloc(png_ptr, png_get_rowbytes(png_ptr, - info_ptr)); - - for (png_uint_32 row = 0; row < height; row++) { - memcpy(row_pointers[row], m_out_qimage->scanLine( row ), png_get_rowbytes(png_ptr, info_ptr)); - png_write_row(png_ptr, row_pointers[row]); - } - - png_write_end(png_ptr, info_ptr); - - for (png_uint_32 row = 0; row < height; row++) - png_free(png_ptr, row_pointers[row]); - - png_destroy_write_struct(&png_ptr, &info_ptr); - - if ( m_fname.isEmpty() ) - { -#if defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__) - fflush(outfile); - fseek(outfile, 0, SEEK_END); - m_filesize = ftell(outfile); -#else - png_uint_32 size = outbuf.size() - 1; - for (; size > 0; --size) - { - if (outbuf[size] != 0) - break; - } - m_filesize = size; - qDebug() << "File size: " << m_filesize; +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); + size_t newSize = buffer->size() + length; + + buffer->resize(newSize); + // copy the data ... it's not really necessary, as I need only the size! + std::copy(data, data + length, buffer->end() - length); +} + +struct PngWriterImplMemory : public PngWriterImpl +{ + PngWriterImplMemory() + : PngWriterImpl() + , m_buffer() + {} + + void setupPngDest(png_structp png_ptr) + { + png_set_write_fn(png_ptr, &m_buffer, my_png_write_data, NULL); + } + + void close() { } + void computeSize() { setFileSize(m_buffer.size()); } + +private: + PngBuffer m_buffer; +}; + +PngWriter::PngWriter() + : m_impl(new PngWriterImplMemory) +{} + +PngWriter::PngWriter(const string &filename) + : m_impl(new PngWriterImplFile(filename)) +{} + +PngWriter::~PngWriter() +{} + +bool PngWriter::write(const pfs::Frame& frame, const Params& params) +{ + PngWriterParams p; + p.parse( params ); + +#ifndef NDEBUG + cout << p << endl << flush; #endif - } - fclose(outfile); - return true; + + return m_impl->write(frame, p); } -int PngWriter::getFileSize() +size_t PngWriter::getFileSize() const { - return m_filesize; + return m_impl->getFileSize(); } diff -Nru luminance-hdr-2.3.0/src/Fileformat/pngwriter.h luminance-hdr-2.3.1/src/Fileformat/pngwriter.h --- luminance-hdr-2.3.0/src/Fileformat/pngwriter.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/pngwriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2012 Franco Comida + * 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 @@ -16,36 +17,44 @@ * 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 - * + * ---------------------------------------------------------------------- */ +//! \author Franco Comida +//! Initial implementation +//! \author Davide Anastasia +//! - Remove dependencies from Qt +//! - Adaptation for Luminane HDR and LibHDR +//! - in-memory writer without any temporary file + #ifndef PNGWRITER_H #define PNGWRITER_H -#include -#include -#include +#include +#include -#include +#include +#include -class PngWriter : public QObject -{ - Q_OBJECT - - const QImage *m_out_qimage; - QString m_fname; - int m_quality; - png_uint_32 m_filesize; +namespace pfs { +class Frame; +} +class PngWriterImpl; + +class PngWriter +{ public: - PngWriter(const QImage *, QString, int); - PngWriter(const QImage *, int); - ~PngWriter() {} - bool writeQImageToPng(); - int getFileSize(); + PngWriter(const std::string& filename); + PngWriter(); + ~PngWriter(); + + bool write(const pfs::Frame& frame, const pfs::Params& params); + + size_t getFileSize() const; + +private: + boost::scoped_ptr m_impl; }; #endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/rgbeio.cpp luminance-hdr-2.3.1/src/Fileformat/rgbeio.cpp --- luminance-hdr-2.3.0/src/Fileformat/rgbeio.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/rgbeio.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,442 +0,0 @@ -/** - * @brief IO operations on Radiance's RGBE file format - * - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Grzegorz Krawczyk, - * - * $Id: rgbeio.cpp,v 1.6 2006/11/20 11:19:21 gkrawczyk Exp $ - */ - -#include - -#include -#include - -#include "Libpfs/pfs.h" - -#include "rgbeio.h" - -using namespace std; - -/// constant to change between radiance and luminance -#define WHITE_EFFICACY 179.0 - -// RGBE IO classes implementation - -RGBEReader::RGBEReader( FILE *fh ) : fh(fh) -{ - //TODO: read header from radiance file - readRadianceHeader( fh, width, height, exposure ); -} - -void RGBEReader::readImage( pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ) -{ - readRadiance( fh, width, height, exposure, X, Y, Z ); -} - -RGBEReader::~RGBEReader() -{} - -void RGBEWriter::writeImage( pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ) -{ - writeRadiance( fh, X, Y, Z ); -} - - - -//-------------------------------------------------------------------- -// RGBE IO format support functions - -typedef unsigned char Trgbe; -struct Trgbe_pixel -{ - /// @name RGB values and their exponent - //@{ - Trgbe r; - Trgbe g; - Trgbe b; - Trgbe e; - //@} - -}; - -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; - - r = (float)(rgbe.r * f); - g = (float)(rgbe.g * f); - b = (float)(rgbe.b * f); - } - else - r = g = b = 0.f; -} - - -void rgb2rgbe( float r, float g, float b, Trgbe_pixel& rgbe) -{ - r /= WHITE_EFFICACY; - g /= WHITE_EFFICACY; - b /= WHITE_EFFICACY; - - double v = r; // max rgb value - if( v < g) - v = g; - if( v < b ) - v = b; - - if( v < 1e-32 ) - { - rgbe.r = rgbe.g = rgbe.b = rgbe.e = 0; - } - else - { - int e; // exponent - - v = frexp(v,&e) * 256.0/v; - rgbe.r = Trgbe( v*r ); - rgbe.g = Trgbe( v*g ); - rgbe.b = Trgbe( v*b ); - rgbe.e = Trgbe( e+128 ); - } -} - - -//-------------------------------------------------------------------- -// RGBE IO support functions - - -// Reading RGBE files -void readRadianceHeader( FILE *file, int &width, int &height, float &exposure ) -{ -// DEBUG_STR << "RGBE: reading header..." << endl; - - // read header information - char head[255]; - float fval; - int format=0; - exposure = 1.0f; - char *dummy; - - while( !feof(file) ) - { - dummy=fgets(head, 200, file); - if( strcmp(head, "\n")==0 ) - break; - if( strcmp(head, "#?RADIANCE\n")==0 ) - { - // format specifier found - format=1; - } - if( strcmp(head, "#?RGBE\n")==0 ) - { - // format specifier found - format=1; - } - if( strcmp(head, "#?AUTOPANO\n")==0 ) - { - // format specifier found - format=1; - } - if( head[0]=='#' ) // comment found - skip - continue; - if( strcmp(head, "FORMAT=32-bit_rle_rgbe\n")==0 ) - { - // header found - continue; - } - if( sscanf(head, "EXPOSURE=%f", &fval)==1 ) - { - // exposure value - exposure *= fval; - } - } - - // ignore wierd exposure adjustments - if( exposure>1e12 || exposure<1e-12 ) - exposure=1.0f; - - if( !format ) - { - throw pfs::Exception( "RGBE: no format specifier found" ); - } - - // image size - char xbuf[4], ybuf[4]; - if( (dummy=fgets(head,sizeof(head)/sizeof(head[0]),file)) == 0 - || sscanf(head,"%3s %d %3s %d",ybuf,&height,xbuf,&width) != 4 ) - { - throw pfs::Exception( "RGBE: unknown image size" ); - } - -/* if( ybuf[1]=='x' || ybuf[1]=='X' ) { - height += width; - width = height - width; - height = height - width; - } -*/ -// DEBUG_STR << "RGBE: image size " << width << "x" << height << endl; -} - - - -void RLERead( FILE* file, Trgbe* scanline, int size ) -{ - int peek=0; - size_t dummy; - - while( peek128 ) - { - // a run - int run_len = p[0]-128; - - while( run_len>0 ) - { - scanline[peek++] = p[1]; - run_len--; - } - } - else - { - // a non-run - scanline[peek++] = p[1]; - - int nonrun_len = p[0]-1; - if( nonrun_len>0 ) - { - dummy=fread(scanline+peek, sizeof(*scanline), nonrun_len, file); - peek += nonrun_len; - } - } - } - if( peek!=size ) - { - throw pfs::Exception( "RGBE: difference in size while reading RLE scanline"); - } - -} - - -void readRadiance( FILE *file, int width, int height, float exposure, - pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ) -{ - // read image - // depending on format read either rle or normal (note: only rle supported) - Trgbe* scanline = new Trgbe[width*4]; - size_t dummy; - - for( int y=0 ; y4 ) - { - // write a non run: scanline[0] to scanline[run_start] - if( run_start>0 ) - { - Trgbe* buf = new Trgbe[run_start+1]; - buf[0] = run_start; - for( int i=0 ; igetCols(); - int height = X->getRows(); - -// DEBUG_STR << "RGBE: writing image " << width << "x" << height << endl; - - if( Y->getCols() != width || Y->getRows() != height || - Z->getCols() != width || Z->getRows() != height ) - { - throw pfs::Exception( "RGBE: RGB layers have different size"); - } - - // header information - fprintf(file, "#?RADIANCE\n"); // file format specifier - fprintf(file, "# PFStools writer to Radiance RGBE format\n"); - -// if( exposure_isset ) -// fprintf(file, "EXPOSURE=%f\n", exposure); -// if( gamma_isset ) -// fprintf(file, "GAMMA=%f\n", gamma); - - fprintf(file, "FORMAT=32-bit_rle_rgbe\n"); - fprintf(file, "\n"); - - // image size - fprintf(file, "-Y %d +X %d\n", height, width); - - // image run length encoded - Trgbe* scanlineR = new Trgbe[width]; - Trgbe* scanlineG = new Trgbe[width]; - Trgbe* scanlineB = new Trgbe[width]; - Trgbe* scanlineE = new Trgbe[width]; - - for( int y=0 ; y> 8;; - header[3] = width & 0xFF; - fwrite(header, sizeof(header), 1, file); - - // each channel is encoded separately - for( int x=0 ; x - * - * $Id: rgbeio.h,v 1.2 2006/11/17 11:38:40 gkrawczyk Exp $ - */ - -#ifndef _RGBEIO_H_ -#define _RGBEIO_H_ - -#include - -#include "Libpfs/array2d.h" - -void readRadianceHeader( FILE *file, int &width, int &height, float &exposure ); -void readRadiance( FILE *file, int width, int height, float exposure, pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ); -void writeRadiance( FILE *file, pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ); - -class RGBEReader -{ - FILE *fh; - int width, height; - float exposure; - -public: - RGBEReader( FILE *fh ); - ~RGBEReader(); - - int getWidth() const - { - return width; - } - - int getHeight() const - { - return height; - } - - void readImage( pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ); - -}; - - -class RGBEWriter -{ - FILE *fh; -public: - RGBEWriter( FILE *fh ) : fh(fh) - { - } - - void writeImage( pfs::Array2D *X, pfs::Array2D *Y, pfs::Array2D *Z ); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/tiffcommon.h luminance-hdr-2.3.1/src/Fileformat/tiffcommon.h --- luminance-hdr-2.3.0/src/Fileformat/tiffcommon.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/tiffcommon.h 2013-04-07 18:41:14.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 + * ---------------------------------------------------------------------- + */ + +#ifndef TIFFCOMMON_H +#define TIFFCOMMON_H + +#include +#include +#include + +struct CleanUpTiffFile +{ + static inline + void cleanup(TIFF* profile) { + if ( profile ) { +#ifndef NDEBUG + std::clog << "CleanUpTiffFile::cleanup()\n"; +#endif + TIFFClose(profile); + } + } +}; +typedef pfs::utils::ResourceHandler ScopedTiffFile; + +#endif // TIFFCOMMON_H diff -Nru luminance-hdr-2.3.0/src/Fileformat/tiffreader.cpp luminance-hdr-2.3.1/src/Fileformat/tiffreader.cpp --- luminance-hdr-2.3.0/src/Fileformat/tiffreader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/tiffreader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,708 @@ +/** + * @brief Tiff facilities + * + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006 Giuseppe Rota + * 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 + * ---------------------------------------------------------------------- + * + * @author Grzegorz Krawczyk, + * slightly modified by Giuseppe Rota for Luminance HDR + * added color management support by Franco Comida + */ + +#include "tiffreader.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Common/LuminanceOptions.h" + +#include +#include +#include + +using namespace pfs; +using namespace pfs::utils; + +namespace +{ + +//! \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 +cmsHPROFILE +GetTIFFProfile(TIFF* in) +{ + cmsHPROFILE hProfile; + void* iccProfilePtr; + cmsUInt32Number iccProfileSize; + + if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &iccProfileSize, &iccProfilePtr)) + { + qDebug () << "iccProfileSize: " << iccProfileSize; + hProfile = cmsOpenProfileFromMem(iccProfilePtr, iccProfileSize); + + if (hProfile) return hProfile; + } + + // Try to see if "colorimetric" tiff.data() + cmsCIExyYTRIPLE primaries; + cmsCIExyY whitePoint; + cmsToneCurve* curve[3]; + + cmsFloat32Number* chr; + if (TIFFGetField(in, TIFFTAG_PRIMARYCHROMATICITIES, &chr)) + { + 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.Y = primaries.Green.Y = primaries.Blue.Y = 1.0; + + cmsFloat32Number* wp; + if (TIFFGetField (in, TIFFTAG_WHITEPOINT, &wp)) + { + whitePoint.x = wp[0]; + whitePoint.y = wp[1]; + whitePoint.Y = 1.0; + + // Transferfunction is a bit harder.... + cmsUInt16Number *gmr; + cmsUInt16Number *gmg; + cmsUInt16Number *gmb; + + TIFFGetFieldDefaulted(in, TIFFTAG_TRANSFERFUNCTION, &gmr, &gmg, &gmb); + + curve[0] = cmsBuildTabulatedToneCurve16(NULL, 256, gmr); + curve[1] = cmsBuildTabulatedToneCurve16(NULL, 256, gmg); + curve[2] = cmsBuildTabulatedToneCurve16(NULL, 256, gmb); + + hProfile = cmsCreateRGBProfile (&whitePoint, &primaries, curve); + + cmsFreeToneCurve(curve[0]); + cmsFreeToneCurve(curve[1]); + cmsFreeToneCurve(curve[2]); + + return hProfile; + } + } + + return 0; +} +// End of code form tifficc.c + +void +transform_to_rgb(unsigned char *ScanLineIn, unsigned char *ScanLineOut, uint32 size, int nSamples) +{ + for (uint32 i = 0; i < size; i += nSamples) + { + unsigned char C = *(ScanLineIn + i + 0); + unsigned char M = *(ScanLineIn + i + 1); + unsigned char Y = *(ScanLineIn + i + 2); + unsigned char K = *(ScanLineIn + i + 3); + *(ScanLineOut + i + 0) = ((255 - C) * (255 - K)) / 255; + *(ScanLineOut + i + 1) = ((255 - M) * (255 - K)) / 255; + *(ScanLineOut + i + 2) = ((255 - Y) * (255 - K)) / 255; + *(ScanLineOut + i + 3) = 255; + } +} + +void +transform_to_rgb_16(uint16 *ScanLineIn, uint16 *ScanLineOut, uint32 size, int nSamples) +{ + for (uint32 i = 0; i < size/2; i += nSamples) + { + uint16 C = *(ScanLineIn + i + 0); + uint16 M = *(ScanLineIn + i + 1); + uint16 Y = *(ScanLineIn + i + 2); + uint16 K = *(ScanLineIn + i + 3); + *(ScanLineOut + i + 0) = ((65535 - C) * (65535 - K)) / 65535; + *(ScanLineOut + i + 1) = ((65535 - M) * (65535 - K)) / 65535; + *(ScanLineOut + i + 2) = ((65535 - Y) * (65535 - K)) / 65535; + *(ScanLineOut + i + 3) = 65535; + } +} + +// The way QRgb is stored is a bit weird, hence the strange way to store the +// final value +void +cmyk_to_bgra_qimage(const unsigned char *inVector, unsigned char *outVector, + uint32 size, int nSamples) +{ + for (uint32 i = 0; i < size; i += nSamples) + { + unsigned char C = *(inVector + 0); + unsigned char M = *(inVector + 1); + unsigned char Y = *(inVector + 2); + unsigned char K = *(inVector + 3); + *(outVector + 2) = ((255 - C) * (255 - K)) / 255; // RED + *(outVector + 1) = ((255 - M) * (255 - K)) / 255; // GREEN + *(outVector + 0) = ((255 - Y) * (255 - K)) / 255; // BLUE + *(outVector + 3) = 255; + + inVector += 4; + outVector += 4; + } +} + +const float DIV_255 = 1.f/255.f; +const float DIV_256 = 1.f/256.f; +} + +TiffReader::TiffReader(const char *filename, const char *tempfilespath, bool wod): + tif( TIFFOpen(filename, "r") ), + writeOnDisk(wod), + fileName(filename), + tempFilesPath(tempfilespath) +{ + if (!tif) + throw std::runtime_error ("TIFF: could not open file for reading."); + // read header containing width and height from file + //--- image size + TIFFGetField (tif, TIFFTAG_IMAGEWIDTH, &width); + TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &height); + + if (width * height <= 0) + { + throw std::runtime_error ("TIFF: illegal image size."); + } + + //--- image parameters + uint16 planar; + TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planar); + qDebug() << "Planar configuration: " << planar; + if (planar != PLANARCONFIG_CONTIG) + { + throw std::runtime_error ("TIFF: unsupported planar configuration"); + } + + if (!TIFFGetField(tif, TIFFTAG_COMPRESSION, &comp)) // compression type + comp = COMPRESSION_NONE; + + // type of photometric data + if (!TIFFGetFieldDefaulted (tif, TIFFTAG_PHOTOMETRIC, &phot)) + { + throw std::runtime_error ("TIFF: unspecified photometric type"); + } + + qDebug () << "Photometric type : " << phot; + + uint16 *extra_sample_types = 0; + uint16 extra_samples_per_pixel = 0; + switch (phot) + { + case PHOTOMETRIC_LOGLUV: + { + qDebug ("Photometric data: LogLuv"); + if (comp != COMPRESSION_SGILOG && comp != COMPRESSION_SGILOG24) + { + throw std::runtime_error ("TIFF: only support SGILOG compressed LogLuv data"); + } + TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); + TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); + TypeOfData = FLOATLOGLUV; + } + break; + case PHOTOMETRIC_RGB: + { + qDebug("Photometric data: RGB"); + // read extra samples (# of alpha channels) + if (TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &extra_samples_per_pixel, &extra_sample_types) != 1) + { + extra_samples_per_pixel = 0; + } + TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); + bps = nSamples - extra_samples_per_pixel; + has_alpha = (extra_samples_per_pixel == 1); + // qDebug("nSamples=%d extra_samples_per_pixel=%d",nSamples,extra_samples_per_pixel); + // qDebug("has alpha? %s", has_alpha ? "true" : "false"); + if (bps != 3) + { + qDebug ("TIFF: unsupported samples per pixel for RGB"); + throw std::runtime_error ("TIFF: unsupported samples per pixel for RGB"); + } + if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || (bps != 8 && bps != 16 && bps != 32)) + { + qDebug ("TIFF: unsupported bits per sample for RGB"); + throw std::runtime_error ("TIFF: unsupported bits per sample for RGB"); + } + + switch (bps) + { + case 8: + TypeOfData = BYTE; + qDebug ("8bit per channel"); + break; + case 16: + TypeOfData = WORD; + qDebug ("16bit per channel"); + break; + default: + TypeOfData = FLOAT; + qDebug ("32bit float per channel"); + break; + } + ColorSpace = RGB; + } + break; + case PHOTOMETRIC_SEPARATED: + { + qDebug("Photometric data: CMYK"); + TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nSamples); + qDebug() << "nSamples: " << nSamples; + TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps); + + switch (bps) + { + case 8: + TypeOfData = BYTE; + qDebug ("8bit per channel"); + break; + case 16: + TypeOfData = WORD; + qDebug ("16bit per channel"); + break; + default: + TypeOfData = FLOAT; + qDebug ("32bit float per channel"); + break; + } + ColorSpace = CMYK; + } + break; + default: + //qFatal("Unsupported photometric type: %d",phot); + throw std::runtime_error ("TIFF: unsupported photometric type"); + } + + if (!TIFFGetField(tif, TIFFTAG_STONITS, &stonits)) + stonits = 1.; +} + +pfs::Frame* +TiffReader::readIntoPfsFrame() +{ + qDebug() << "TiffReader::readIntoPfsFrame()"; + + bool doTransform = false; + // LuminanceOptions luminance_opts; + // int camera_profile_opt = luminance_opts.getCameraProfile (); + + // will get automatigically cleaned on return of this function! + ScopedCmsTransform xform; + +// if (camera_profile_opt == 1) // embedded +// { + ScopedCmsProfile hIn( GetTIFFProfile(tif) ); + + if (hIn) + { + qDebug () << "Found ICC profile"; + + ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); + + cmsUInt32Number cmsInputFormat = TYPE_CMYK_8; + cmsUInt32Number cmsOutputFormat = TYPE_RGBA_8; + cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; + + if (ColorSpace == RGB && TypeOfData == WORD) { + if (has_alpha) { + cmsInputFormat = TYPE_RGBA_16; + cmsOutputFormat = TYPE_RGBA_16; + } else { + cmsInputFormat = TYPE_RGB_16; + cmsOutputFormat = TYPE_RGB_16; + } + } + else if (ColorSpace == RGB && TypeOfData == BYTE) { + if (has_alpha) { + cmsInputFormat = TYPE_RGBA_8; + cmsOutputFormat = TYPE_RGBA_8; + } else { + cmsInputFormat = TYPE_RGB_8; + cmsOutputFormat = TYPE_RGB_8; + } + } + else if (ColorSpace == CMYK && TypeOfData == WORD) { + cmsInputFormat = TYPE_CMYK_16; + cmsOutputFormat = TYPE_RGBA_16; + } + else { + cmsInputFormat = TYPE_CMYK_8; + cmsOutputFormat = TYPE_RGBA_8; + } + + xform.reset( cmsCreateTransform (hIn.data(), cmsInputFormat, hsRGB.data(), cmsOutputFormat, cmsIntent, 0) ); + if (xform) + { + doTransform = true; + qDebug () << "Created transform"; + } + } +#ifdef QT_DEBUG + else + { + qDebug () << "No embedded profile found"; + } +#endif +// } +// else if (camera_profile_opt == 2) // from file +// { +// QString profile_fname = luminance_opts.getCameraProfileFileName (); +// qDebug () << "Camera profile: " << profile_fname; + +// if (!profile_fname.isEmpty ()) +// { +// QByteArray ba( QFile::encodeName( profile_fname ) ); + +// ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); +// ScopedCmsProfile hIn( cmsOpenProfileFromFile (ba.data (), "r") ); + +// if ( hsRGB && hIn ) +// { +// if (ColorSpace == RGB && TypeOfData == WORD) +// xform.reset( cmsCreateTransform (hIn.data(), TYPE_RGB_16, hsRGB.data(), TYPE_RGB_16, INTENT_PERCEPTUAL, 0) ); +// else if (ColorSpace == RGB && TypeOfData == BYTE) +// xform.reset( cmsCreateTransform (hIn.data(), TYPE_RGB_8, hsRGB.data(), TYPE_RGB_8, INTENT_PERCEPTUAL, 0) ); +// else if (ColorSpace == CMYK && TypeOfData == WORD) +// xform.reset( cmsCreateTransform (hIn.data(), TYPE_CMYK_16, hsRGB.data(), TYPE_RGBA_16, INTENT_PERCEPTUAL, 0) ); +// else +// xform.reset( cmsCreateTransform (hIn.data(), TYPE_CMYK_8, hsRGB.data(), TYPE_RGBA_8, INTENT_PERCEPTUAL, 0) ); +// } +// doTransform = true; + +// qDebug () << "Created transform"; +// } +// } + + pfs::Frame* frame = new pfs::Frame (width, height); + + pfs::Channel* Xc; + pfs::Channel* Yc; + pfs::Channel* Zc; + frame->createXYZChannels (Xc, Yc, Zc); + + float* X = Xc->data(); + float* Y = Yc->data(); + float* Z = Zc->data(); + + //--- image length + uint32 imagelength; + TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); + + emit maximumValue(imagelength); //for QProgressDialog + + //--- image scanline size + uint32 scanlinesize = TIFFScanlineSize(tif); + std::vector buf( scanlinesize ); + std::vector buf2; + if ( xform ) + { + buf2.resize( scanlinesize ); + } + + qDebug () << "scanlinesize: " << scanlinesize; + //--- read scan lines + const int image_width = width; + + for (uint32 row = 0; row < height; row++) + { + switch (TypeOfData) + { + // float 32bit/channel + case FLOAT: + { +#ifndef NDEBUG + std::clog << "TIFF float 32bit/channel Reader"; +#endif + float* buf_fp = reinterpret_cast(buf.data()); + + TIFFReadScanline (tif, buf_fp, row); + for (int i = 0; i < image_width; i++) + { + X[row * image_width + i] = buf_fp[i * nSamples]; + Y[row * image_width + i] = buf_fp[i * nSamples + 1]; + Z[row * image_width + i] = buf_fp[i * nSamples + 2]; + } + } + break; + // float LogLuv + case FLOATLOGLUV: + { +#ifndef NDEBUG + std::clog << "TIFF LogLuv Reader"; +#endif + pfs::colorspace::ConvertXYZ2RGB xyz2rgb; + + float* buf_fp = reinterpret_cast(buf.data()); + + TIFFReadScanline (tif, buf_fp, row); + for (int i = 0; i < image_width; i++) { + xyz2rgb(buf_fp[i * nSamples], buf_fp[i * nSamples + 1], buf_fp[i * nSamples + 2], + X[row * image_width + i], Y[row * image_width + i], Z[row * image_width + i]); + } + } + break; + case WORD: + { + uint16* buf_wp = reinterpret_cast(buf.data()); + + TIFFReadScanline(tif, buf_wp, row); + if (doTransform) + { + uint16* buf_wp_2 = reinterpret_cast(buf2.data()); + + cmsDoTransform(xform.data(), buf_wp, buf_wp_2, image_width); + + ::std::swap(buf_wp, buf_wp_2); + } + else if (ColorSpace == CMYK) + { + transform_to_rgb_16(buf_wp, buf_wp, scanlinesize, nSamples); + } + for (int i = 0; i < image_width; i++) + { + X[row * image_width + i] = buf_wp[i * nSamples]; + Y[row * image_width + i] = buf_wp[i * nSamples + 1]; + Z[row * image_width + i] = buf_wp[i * nSamples + 2]; + } + } + break; + case BYTE: + { + uint8* buf_bp = reinterpret_cast(buf.data()); + + TIFFReadScanline(tif, buf_bp, row); + if (doTransform) + { + uint8* buf_bp_2 = reinterpret_cast(buf2.data()); + + cmsDoTransform(xform.data(), buf_bp, buf_bp_2, image_width); + + ::std::swap(buf_bp, buf_bp_2); + } + else if (ColorSpace == CMYK) + { + transform_to_rgb(buf_bp, buf_bp, scanlinesize, nSamples); + } + for (int i = 0; i < image_width; i++) + { + X[row * image_width + i] = powf(buf_bp[i * nSamples] * DIV_255, 2.2f); // why? + Y[row * image_width + i] = powf(buf_bp[i * nSamples + 1] * DIV_255, 2.2f); // why? + Z[row * image_width + i] = powf(buf_bp[i * nSamples + 2] * DIV_255, 2.2f); // why? + } + } + break; + } + emit nextstep (row); //for QProgressDialog + } + + if (writeOnDisk) + { + assert (TypeOfData != FLOAT); + assert (TypeOfData != FLOATLOGLUV); + + float scaleFactor = DIV_256; + if ( TypeOfData == BYTE) scaleFactor = 1.0f; + + pfs::Channel *Xc, *Yc, *Zc; + frame->createXYZChannels (Xc, Yc, Zc); + + float* X = Xc->data(); + float* Y = Yc->data(); + float* Z = Zc->data(); + + QImage remapped( image_width, imagelength, QImage::Format_RGB32); + + for (uint32 row = 0; row < height; ++row) + { + QRgb* line = reinterpret_cast(remapped.scanLine(row)); + for (uint32 col = 0; col < width; ++col) + { + line[col] = qRgb(static_cast(*X * scaleFactor), + static_cast(*Y * scaleFactor), + static_cast(*Z * scaleFactor)); + + X++; Y++; Z++; + } + } + QFileInfo fi (fileName); + QString fname = fi.completeBaseName () + ".thumb.jpg"; + + remapped.scaledToHeight(imagelength / 10).save(tempFilesPath + "/" + fname); + } + + //if (TypeOfData==FLOATLOGLUV) + // pfs::transformColorSpace( pfs::CS_XYZ, X,Y,Z, pfs::CS_RGB, X,Y,Z ); + TIFFClose(tif); + + return frame; +} + +// given for granted that users of this function call it only after checking that TypeOfData==BYTE +QImage* +TiffReader::readIntoQImage() +{ +#ifdef QT_DEBUG + qDebug() << "TiffReader::readIntoQImage()"; +#endif + assert(TypeOfData == BYTE); + + bool doTransform = false; + + ScopedCmsProfile hIn( GetTIFFProfile(tif) ); + ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); + + ScopedCmsTransform xform; + + if ( hIn && hsRGB ) + { + qDebug () << "Found ICC profile"; + + cmsUInt32Number cmsInputFormat = TYPE_CMYK_8; + const cmsUInt32Number cmsOutputFormat = TYPE_BGRA_8; // RGBA_8; + const cmsUInt32Number cmsIntent = INTENT_PERCEPTUAL; + + if (has_alpha && ColorSpace == RGB && TypeOfData == BYTE) + { + cmsInputFormat = TYPE_RGBA_8; + } + else if (!has_alpha && ColorSpace == RGB && TypeOfData == BYTE) + { + cmsInputFormat = TYPE_RGB_8; + } + else if (ColorSpace == CMYK && TypeOfData == BYTE) + { + cmsInputFormat = TYPE_CMYK_8; + } else + { + TIFFClose(tif); + throw std::runtime_error("TiffReader: Unsupported colorspace combination"); + } + + xform.reset( cmsCreateTransform (hIn.data(), cmsInputFormat, + hsRGB.data(), cmsOutputFormat, + cmsIntent, 0) ); + if ( xform ) + { + doTransform = true; + } + else + { + doTransform = false; + } + } + else + { + doTransform = false; +#ifdef QT_DEBUG + qDebug () << "No embedded profile found"; +#endif + } + + QScopedPointer toReturn( new QImage(width, height, QImage::Format_RGB32) ); + + //--- image length + uint32 imagelength; + TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &imagelength); + + //--- image scanline size + uint32 scanlinesize = TIFFScanlineSize(tif); + + qDebug() << "Scanlinesize:" << scanlinesize; + + std::vector buffer(scanlinesize); + std::vector bufferConverted; + if ( doTransform ) + { + bufferConverted.resize((width << 2)); + } + + qDebug() << "Do Transform: " << doTransform; + + //--- read scan lines + if ( doTransform ) + { + // color-converted branch! + for (uint y = 0; y < height; ++y) + { + TIFFReadScanline(tif, buffer.data(), y); + + cmsDoTransform(xform.data(), + buffer.data(), + toReturn->scanLine(y), width); + } + } + else + { + // no color-conversion + switch (ColorSpace) + { + case CMYK: + { + for (uint y = 0; y < height; ++y) + { + TIFFReadScanline(tif, buffer.data(), y); + + cmyk_to_bgra_qimage(buffer.data(), + toReturn->scanLine(y), + scanlinesize, + nSamples); + } + } break; + case RGB: + { + for (uint y = 0; y < height; ++y) + { + QRgb* qImageData = reinterpret_cast(toReturn->scanLine(y)); + TIFFReadScanline(tif, buffer.data(), y); + + // it's not really efficient, but I hope it doesn't get used + // too many times in a real world scenario! + for (uint x = 0; x < width; x++) + { + qImageData[x] = qRgba(buffer[(x * nSamples)], + buffer[(x * nSamples) + 1], + buffer[(x * nSamples) + 2], + has_alpha ? buffer[(x * nSamples) + 3] : 0xFF); + } + } + } break; + } + } + TIFFClose(tif); + + return toReturn.take(); +} + + diff -Nru luminance-hdr-2.3.0/src/Fileformat/tiffreader.h luminance-hdr-2.3.1/src/Fileformat/tiffreader.h --- luminance-hdr-2.3.0/src/Fileformat/tiffreader.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/tiffreader.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,94 @@ +/** + * @brief Tiff facilities + * + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006 Giuseppe Rota + * + * 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 Grzegorz Krawczyk, + * slightly modified by Giuseppe Rota for luminance + */ + +#ifndef PFSTIFF_H +#define PFSTIFF_H + +#include +#include +#include + +#include "Libpfs/array2d_fwd.h" + +namespace pfs +{ +class Frame; +} + +class TiffReader : public QObject +{ + Q_OBJECT + + TIFF *tif; + + uint32 width; + uint32 height; + + uint16 comp; /// compression type + uint16 phot; /// type of photometric data + enum //FLOAT is the wasting space one, FLOATLOGLUV is Greg Ward's format + { + FLOATLOGLUV, + FLOAT, + WORD, + BYTE + } TypeOfData; + enum + { + RGB, + CMYK + } ColorSpace; + uint16 bps; /// bits per sample + uint16 nSamples; /// number of channels in tiff file (only 1-3 are used) + bool has_alpha; + double stonits; /// scale factor to get nit values + + bool writeOnDisk; + QString fileName; + QString tempFilesPath; + +public: + TiffReader( const char* filename, const char *tempfilespath, bool writeOnDisk ); + // ~TiffReader() {} + + int getWidth() const { return width; } + int getHeight() const { return height; } + + bool is8bitTiff() { return TypeOfData==BYTE; } + bool is16bitTiff() { return TypeOfData==WORD; } + bool is32bitTiff() { return TypeOfData==FLOAT; } + bool isLogLuvTiff() { return (TypeOfData==FLOATLOGLUV); } + + pfs::Frame* readIntoPfsFrame(); //from 8,16,32,logluv TIFF to pfs::Frame + QImage* readIntoQImage(); + +signals: //For ProgressDialog + void maximumValue(int); + void nextstep(int); +}; + +#endif diff -Nru luminance-hdr-2.3.0/src/Fileformat/tiffwriter.cpp luminance-hdr-2.3.1/src/Fileformat/tiffwriter.cpp --- luminance-hdr-2.3.0/src/Fileformat/tiffwriter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/tiffwriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,397 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006 Giuseppe Rota + * Copyright (C) 2012-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 TIFF facilities +//! \author Grzegorz Krawczyk, +//! Original author for PFSTOOLS +//! \author Giuseppe Rota +//! slightly modified by for Luminance HDR +//! \author Franco Comida +//! added color management support by Franco Comida +//! \author Davide Anastasia +//! Complete rewrite/refactoring + +#include "tiffwriter.h" +#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; +using namespace pfs; + +struct TiffWriterParams +{ + TiffWriterParams() + : quality_(100) + , minLuminance_(0.f) + , maxLuminance_(1.f) + , luminanceMapping_(MAP_LINEAR) + , tiffWriterMode_(0) // 8bit uint by default + {} + + void parse(const Params& params) + { + 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" ) { + minLuminance_ = it->second.as(minLuminance_); + continue; + } + if ( it->first == "max_luminance" ) { + maxLuminance_ = it->second.as(maxLuminance_); + continue; + } + if ( it->first == "mapping_method" ) { + luminanceMapping_ = it->second.as(luminanceMapping_); + continue; + } + if ( it->first == "tiff_mode" ) { + tiffWriterMode_ = it->second.as(tiffWriterMode_); + } + } + } + + size_t quality_; + float minLuminance_; + float maxLuminance_; + RGBMappingType luminanceMapping_; + int tiffWriterMode_; +}; + +ostream& operator<<(ostream& out, const TiffWriterParams& params) +{ + stringstream ss; + ss << "TiffWriterParams: ["; + ss << "mode: " << params.tiffWriterMode_ << ", "; + ss << "quality: " << params.quality_ << ", "; + ss << "min_luminance: " << params.minLuminance_ << ", "; + ss << "max_luminance: " << params.maxLuminance_ << ", "; + ss << "mapping_method: " << params.luminanceMapping_ << "]"; + + return (out << ss.str()); +} + +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() ); + cmsUInt32Number profileSize = 0; + cmsSaveProfileToMem(hsRGB.data(), NULL, &profileSize); // get the size + + std::vector embedBuffer(profileSize); + + cmsSaveProfileToMem(hsRGB.data(), + reinterpret_cast(embedBuffer.data()), + &profileSize); + + TIFFSetField(tif, TIFFTAG_ICCPROFILE, profileSize, + reinterpret_cast(embedBuffer.data()) ); +} + +// Info: if you want to write the alpha channel, please use this! +// uint16 extras[1] = { EXTRASAMPLE_ASSOCALPHA }; +// 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) +{ +#ifndef NDEBUG + cout << __func__ << endl; +#endif + + assert(tif != NULL); + + uint32_t width = frame.getWidth(); + uint32_t height = frame.getHeight(); + + writeCommonHeader(tif, width, height); + writeSRGBProfile(tif); + + 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); + + tsize_t stripSize = TIFFStripSize(tif); + assert( width*3 == stripSize ); + tstrip_t stripsNum = TIFFNumberOfStrips(tif); + + const Channel* rChannel; + const Channel* gChannel; + const Channel* bChannel; + frame.getXYZChannels(rChannel, gChannel, bChannel); + + std::vector stripBuffer( stripSize ); + RGBRemapper rgbRemapper(params.minLuminance_, params.maxLuminance_, + 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), + rgbRemapper); + + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) + { + throw pfs::io::WriteException("TiffWriter: Error writing strip " + s); + return false; + } + } + return true; +} + +bool writeUint16(TIFF* tif, const Frame& frame, const TiffWriterParams& params) +{ +#ifndef NDEBUG + cout << __func__ << endl; +#endif + assert(tif != NULL); + + uint32_t width = frame.getWidth(); + uint32_t height = frame.getHeight(); + + writeCommonHeader(tif, width, height); + writeSRGBProfile(tif); + + 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_SAMPLESPERPIXEL, (uint16_t)3); + + tsize_t stripSize = TIFFStripSize(tif); + assert( width*3*2 == stripSize ); + tstrip_t stripsNum = TIFFNumberOfStrips(tif); + + const Channel* rChannel; + const Channel* gChannel; + const Channel* bChannel; + frame.getXYZChannels(rChannel, gChannel, bChannel); + + std::vector stripBuffer( width*3 ); + RGBRemapper rgbRemapper(params.minLuminance_, params.maxLuminance_, + 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), + rgbRemapper); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) + { + throw pfs::io::WriteException("TiffWriter: Error writing strip " + s); + return false; + } + } + + return true; +} + +// write 32 bit float Tiff from pfs::Frame ... to finish! +bool writeFloat32(TIFF* tif, const Frame& frame, const TiffWriterParams& params) +{ +#ifndef NDEBUG + cout << __func__ << endl; +#endif + assert(tif != NULL); + + uint32_t width = frame.getWidth(); + uint32_t height = frame.getHeight(); + + writeCommonHeader(tif, width, height); + // writeSRGBProfile(tif); + + 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_SAMPLESPERPIXEL, (uint16_t)3); + + tsize_t stripSize = TIFFStripSize(tif); + assert( sizeof(float)*width*3 == stripSize ); + tstrip_t stripsNum = TIFFNumberOfStrips(tif); + + const Channel* rChannel; + const Channel* gChannel; + const Channel* bChannel; + frame.getXYZChannels(rChannel, gChannel, bChannel); + + std::vector stripBuffer( width*3 ); + RGBRemapper rgbRemapper(params.minLuminance_, params.maxLuminance_, + MAP_LINEAR); // maybe I have to force to be linear?! + 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), + rgbRemapper); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) == 0) + { + throw pfs::io::WriteException("TiffWriter: Error writing strip " + s); + + return -1; + } + } + + return true; +} + +// write LogLUv Tiff from pfs::Frame +bool writeLogLuv(TIFF* tif, const Frame& frame, const TiffWriterParams& params) +{ +#ifndef NDEBUG + cout << __func__ << endl; +#endif + assert(tif != NULL); + + uint32_t width = frame.getWidth(); + uint32_t height = frame.getHeight(); + + writeCommonHeader(tif, width, height); + + 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_SAMPLESPERPIXEL, (uint16_t)3); + TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); + TIFFSetField(tif, TIFFTAG_STONITS, 1.); /* not known */ + + tsize_t stripSize = TIFFStripSize(tif); + assert( sizeof(float)*width*3 == stripSize ); + tstrip_t stripsNum = TIFFNumberOfStrips(tif); + + const Channel* rChannel; + const Channel* gChannel; + const Channel* bChannel; + frame.getXYZChannels(rChannel, gChannel, bChannel); + + std::vector stripBuffer( width*3 ); + // remap to [0, 1] + transform to colorspace XYZ + utils::Chain + func(RGBRemapper(params.minLuminance_, params.maxLuminance_, MAP_LINEAR), + colorspace::ConvertRGB2XYZ()); + + // maybe I have to force to be linear?! + 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), + func); + if (TIFFWriteEncodedStrip(tif, s, stripBuffer.data(), stripSize) != stripSize) + { + throw pfs::io::WriteException("TiffWriter: Error writing strip " + s); + + return -1; + } + } + + return true; +} + +TiffWriter::TiffWriter(const std::string& filename) + : m_filename(filename) +{} + +TiffWriter::~TiffWriter() +{} + +bool TiffWriter::write(const pfs::Frame& frame, const pfs::Params& params) +{ + TiffWriterParams p; + p.parse(params); + +#ifndef NDEBUG + cout << p << endl; +#endif + + ScopedTiffFile tif( TIFFOpen (m_filename.c_str(), "w") ); + if ( !tif ) { + throw pfs::io::InvalidFile("TiffWriter: cannot open " + m_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; + } + + return status; +} diff -Nru luminance-hdr-2.3.0/src/Fileformat/tiffwriter.h luminance-hdr-2.3.1/src/Fileformat/tiffwriter.h --- luminance-hdr-2.3.0/src/Fileformat/tiffwriter.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Fileformat/tiffwriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006 Giuseppe Rota + * Copyright (C) 2012-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 TIFF facilities +//! \author Grzegorz Krawczyk, +//! Original author for PFSTOOLS +//! \author Giuseppe Rota +//! slightly modified by for Luminance HDR +//! \author Franco Comida +//! added color management support by Franco Comida +//! \author Davide Anastasia +//! Complete rewrite/refactoring + +#ifndef PFS_TIFFWRITER_H +#define PFS_TIFFWRITER_H + +#include +#include + +namespace pfs { +class Frame; +} + +//! \brief Writer class for TIFF files + +class TiffWriter +{ +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 + //! 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); + +private: + std::string m_filename; +}; + +#endif // PFS_TIFFWRITER_H diff -Nru luminance-hdr-2.3.0/src/Filter/CMakeLists.txt luminance-hdr-2.3.1/src/Filter/CMakeLists.txt --- luminance-hdr-2.3.0/src/Filter/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# 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(pfsfilter ${FILES_H} ${FILES_CPP}) -SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} pfsfilter PARENT_SCOPE) -SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} pfsfilter PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Filter/pfscut.cpp luminance-hdr-2.3.1/src/Filter/pfscut.cpp --- luminance-hdr-2.3.0/src/Filter/pfscut.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfscut.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -/** - * @brief Cut a rectangle out of images in PFS stream - * - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Dorota Zdrojewska, - * adapted by Franco Comida for luminance - * - */ - -#include -#include - -#include - -#include "pfscut.h" -#include "Common/msec_timer.h" -#include "Libpfs/domio.h" - -namespace pfs -{ - pfs::Frame *pfscut(pfs::Frame *inFrame, int x_ul, int y_ul, int x_br, int y_br) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - // ---- Boundary Check! - if (x_ul < 0) x_ul = 0; - if (y_ul < 0) y_ul = 0; - if (x_br > inFrame->getWidth()) x_br = inFrame->getWidth(); - if (y_br > inFrame->getHeight()) y_br = inFrame->getHeight(); - // ----- - - pfs::DOMIO pfsio; - pfs::Frame *outFrame = pfsio.createFrame((x_br-x_ul), (y_br-y_ul)); - - pfs::ChannelIterator *it = inFrame->getChannels(); - - while (it->hasNext()) - { - pfs::Channel *inCh = it->getNext(); - pfs::Channel *outCh = outFrame->createChannel(inCh->getName()); - - pfs::Array2D* inArray2D = inCh->getChannelData(); - pfs::Array2D* outArray2D = outCh->getChannelData(); - - copyArray(inArray2D, outArray2D, x_ul, y_ul, x_br, y_br); - } - - pfs::copyTags(inFrame, outFrame); - -#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 << ") = " << f_timer.get_time() << " msec" << std::endl; -#endif - - return outFrame; - } - - pfs::Frame *pfscopy(pfs::Frame *inFrame) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - pfs::DOMIO pfsio; - - const int outWidth = inFrame->getWidth(); - const int outHeight = inFrame->getHeight(); - - pfs::Frame *outFrame = pfsio.createFrame(outWidth, outHeight); - - pfs::ChannelIterator *it = inFrame->getChannels(); - - while (it->hasNext()) - { - pfs::Channel *inCh = it->getNext(); - pfs::Channel *outCh = outFrame->createChannel(inCh->getName()); - - pfs::Array2D* inArray2D = inCh->getChannelData(); - pfs::Array2D* outArray2D = outCh->getChannelData(); - - copyArray(inArray2D, outArray2D); - } - - pfs::copyTags(inFrame, outFrame); - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "pfscopy() = " << f_timer.get_time() << " msec" << std::endl; -#endif - - return outFrame; - } -} diff -Nru luminance-hdr-2.3.0/src/Filter/pfscut.h luminance-hdr-2.3.1/src/Filter/pfscut.h --- luminance-hdr-2.3.0/src/Filter/pfscut.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfscut.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/** - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2009 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 PFSCUT_H -#define PFSCUT_H - -#include "Libpfs/frame.h" - -namespace pfs -{ - pfs::Frame *pfscut(pfs::Frame *inFrame, int x_ul, int y_ul, int x_br, int y_br); - pfs::Frame *pfscopy(pfs::Frame *inFrame); -} -#endif diff -Nru luminance-hdr-2.3.0/src/Filter/pfsgamma.cpp luminance-hdr-2.3.1/src/Filter/pfsgamma.cpp --- luminance-hdr-2.3.0/src/Filter/pfsgamma.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsgamma.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/** - * @brief Apply gamma correction the the pfs stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Rafal Mantiuk, - * - * $Id: pfsgamma.cpp,v 1.3 2008/07/29 16:14:29 rafm Exp $ - */ - -#include -#include -#include - -#include "pfsgamma.h" -#include "Libpfs/colorspace.h" -#include "Libpfs/domio.h" -#include "Common/msec_timer.h" - -namespace pfs -{ - pfs::Frame* applyGammaOnFrame(pfs::Frame* frame, const float gamma) - { - float multiplier = 1.0f; - - const char *lum_type = frame->getTags()->getString("LUMINANCE"); - if( lum_type ) - { - if( !strcmp( lum_type, "DISPLAY" ) && gamma > 1.0f ) - std::cerr << "applyGammaOnFrame() warning: applying gamma correction to a display referred image" << std::endl; - if( !strcmp( lum_type, "RELATIVE" ) && gamma < 1.0f ) - std::cerr << "applyGammaOnFrame() warning: applying inverse gamma correction to a linear luminance or radiance image" << std::endl; - if( !strcmp( lum_type, "ABSOLUTE" ) && multiplier == 1 ) - std::cerr << "applyGammaOnFrame() warning: an image should be normalized to 0-1 before applying gamma correction" << std::endl; - } - - pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); - - // TODO: applyGamma can be improved in order to use SSE - if ( X != NULL ) // Color, XYZ - { - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); - - //pfs::transformColorSpace(pfs::CS_XYZ, Xr, Yr, Zr, - // pfs::CS_RGB, Xr, Yr, Zr); - // At this point (X,Y,Z) = (R,G,B) - - applyGamma(Xr, 1.0f/gamma, multiplier); - applyGamma(Yr, 1.0f/gamma, multiplier); - applyGamma(Zr, 1.0f/gamma, multiplier); - - //pfs::transformColorSpace(pfs::CS_RGB, Xr, Yr, Zr, - // pfs::CS_XYZ, Xr, Yr, Zr); - // At this point (X,Y,Z) = (X,Y,Z) - } - else if ( (Y = frame->getChannel( "Y" )) != NULL ) - { - // Luminance only - applyGamma(Y->getChannelData(), 1.0f/gamma, multiplier); - } - //TODO - //else - // throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - - //if( opt_setgamma && gamma > 1.0f ) - frame->getTags()->setString("LUMINANCE", "DISPLAY"); - //else if( opt_setgamma && gamma < 1.0f ) - // frame->getTags()->setString("LUMINANCE", "RELATIVE"); - - return frame; - } - - - void applyGamma(pfs::Array2D *array, const float exponent, const float multiplier) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - float* Vin = array->getRawData(); - - const unsigned int V_ELEMS = array->getRows()*array->getCols(); - - for (unsigned int idx = 0; idx < V_ELEMS; idx++) - { - if (Vin[idx] > 0.0f) - { - Vin[idx] = powf(Vin[idx]*multiplier, exponent); - } - else - { - Vin[idx] = 0.0f; - } - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "applyGamma() = " << f_timer.get_time() << " msec" << std::endl; -#endif - } - -} - diff -Nru luminance-hdr-2.3.0/src/Filter/pfsgamma.h luminance-hdr-2.3.1/src/Filter/pfsgamma.h --- luminance-hdr-2.3.0/src/Filter/pfsgamma.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsgamma.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/** - * @brief Apply gamma correction the the pfs stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Rafal Mantiuk, - * - * $Id: pfsgamma.h,v 1.3 2008/07/29 16:14:29 rafm Exp $ - */ - -#ifndef PFSGAMMA_H -#define PFSGAMMA_H - -#include "Libpfs/array2d.h" -#include "Libpfs/frame.h" - -namespace pfs -{ - // Note: passing basic types by "const" copy is completely useless, - // and shows a wrong design either [Davide: 2012.04.28] - void applyGamma(pfs::Array2D *array, - const float exponent, - const float multiplier); - - pfs::Frame* applyGammaOnFrame(pfs::Frame* frame, - const float gamma); -} - -#endif // PFSGAMMA_H diff -Nru luminance-hdr-2.3.0/src/Filter/pfsgammaandlevels.cpp luminance-hdr-2.3.1/src/Filter/pfsgammaandlevels.cpp --- luminance-hdr-2.3.0/src/Filter/pfsgammaandlevels.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsgammaandlevels.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ -/** - * @brief apply gamma and level filtering to a frame - * - * ---------------------------------------------------------------------- - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * @author Davide Anastasia - * builds a copy of the input frame and applies gamma and in/out black/white points - * - */ - -#include -#include - -#include - -#include "Libpfs/frame.h" -#include "Libpfs/channel.h" -#include "Libpfs/domio.h" -#include "Common/msec_timer.h" - -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; - return v; -} - -////! \note I assume that *in* contains only value between [0,1] -//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); -// //LUT[i] = clamp(blackout+value*(whiteout-blackout),0,255); - -// const float* in_vector = in->getRawData(); -// float* out_vector = out->getRawData(); - -// const int ELEMS = in->getCols()*in->getRows(); - -// if (gamma != 1.0f) -// { -//#pragma omp parallel for -// for (int idx = 0; idx < ELEMS; ++idx) -// { -// float tmp = (in_vector[idx] - black_in)/(white_in - black_in); -// tmp = powf(tmp, gamma); - -// tmp = black_out + tmp*(white_out-black_out); - -// out_vector[idx] = clamp(tmp, 0.0f, 1.0f); -// } -// } -// else -// { -//#pragma omp parallel for -// for (int idx = 0; idx < ELEMS; ++idx) -// { -// float tmp = (in_vector[idx] - black_in)/(white_in - black_in); -// //tmp = powf(tmp, gamma); - -// tmp = black_out + tmp*(white_out-black_out); - -// out_vector[idx] = clamp(tmp, 0.0f, 1.0f); -// } -// } -//} - -} - -namespace pfs -{ - -pfs::Frame* gamma_levels(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(); -#endif - - qDebug() << "Black in =" << black_in << "black out =" << black_out - << "White in =" << white_in << "white out =" << white_out - << "Gamma =" << gamma; - - const int outWidth = inFrame->getWidth(); - const int outHeight = inFrame->getHeight(); - - pfs::Frame* outFrame = new pfs::Frame(outWidth, outHeight); - - pfs::Channel *Xc, *Yc, *Zc; - inFrame->getXYZChannels( Xc, Yc, Zc ); - assert( Xc != NULL && Yc != NULL && Zc != NULL ); - - const float* R_i = Xc->getRawData(); - const float* G_i = Yc->getRawData(); - const float* B_i = Zc->getRawData(); - - outFrame->createXYZChannels( Xc, Yc, Zc ); - assert( Xc != NULL && Yc != NULL && Zc != NULL ); - - float* R_o = Xc->getRawData(); - float* G_o = Yc->getRawData(); - float* B_o = Zc->getRawData(); - - // float exp_gamma = 1.f/gamma; - 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 c = powf(L, gamma - 1.0f); - - red = (red - black_in) / (white_in - black_in); - red *= c; - - green = (green - black_in) / (white_in - black_in); - green *= c; - - blue = (blue - black_in) / (white_in - black_in); - blue *= c; - - R_o[idx] = clamp(black_out + red * (white_out - black_out), 0.f, 1.f); - G_o[idx] = clamp(black_out + green * (white_out - black_out), 0.f, 1.f); - B_o[idx] = clamp(black_out + blue * (white_out - black_out), 0.f, 1.f); - } - - pfs::copyTags(inFrame, outFrame); - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "gamma_levels() = " << f_timer.get_time() << " msec" << std::endl; -#endif - - return outFrame; -} - -} diff -Nru luminance-hdr-2.3.0/src/Filter/pfsgammaandlevels.h luminance-hdr-2.3.1/src/Filter/pfsgammaandlevels.h --- luminance-hdr-2.3.0/src/Filter/pfsgammaandlevels.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsgammaandlevels.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/** - * @brief apply gamma and level filtering to a frame - * - * ---------------------------------------------------------------------- - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * @author Davide Anastasia - * builds a copy of the input frame and applies gamma and in/out black/white points - * - */ - -namespace pfs -{ - -class Frame; - -pfs::Frame* gamma_levels(pfs::Frame* in, - float black_in, float white_in, - float black_out, float white_out, - float gamma); - -} diff -Nru luminance-hdr-2.3.0/src/Filter/pfspanoramic.cpp luminance-hdr-2.3.1/src/Filter/pfspanoramic.cpp --- luminance-hdr-2.3.0/src/Filter/pfspanoramic.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfspanoramic.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,620 +0,0 @@ -/** - * @brief Perform projective transformations of spherical images - * - * This file is a part of LuminanceHDR package (based on pfstool's code). - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2008 Giuseppe Rota - * - * 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 Miloslaw Smyk, - * - * $Id: pfspanoramic.cpp,v 1.2 2006/11/20 17:52:15 rafm Exp $ - */ - -#include -#include "pfspanoramic.h" - -ProjectionFactory ProjectionFactory::singleton(true); - -PolarProjection PolarProjection::singleton(true); -CylindricalProjection CylindricalProjection::singleton(true); -AngularProjection AngularProjection::singleton(true); -MirrorBallProjection MirrorBallProjection::singleton(true); - -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 *= (M_PI / 180); - - 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 *= (M_PI / 180); - - 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 *= (M_PI / 180); - - double c = cos(angle); - double s = sin(angle); - - double x2 = c * x + -s * y; - double y2 = s * x + c * y; - - x = x2; - y = y2; - } -}; - -class Point2D -{ - public: - double x, y; - - Point2D(double x, double y) - { - this->x = x; - this->y = y; - } -}; - - -///PROJECTIONFACTORY -ProjectionFactory::ProjectionFactory(bool ) { -} - -void ProjectionFactory::registerProjection(const char *name, ProjectionCreator ptr) { - singleton.projections[ string( name ) ] = ptr; -} - -// TODO: check this function -Projection *ProjectionFactory::getProjection(char *name) { - char *opts; - Projection *projection = NULL; - - if( (opts = strchr(name, '/')) ) - { - *opts++ = '\0'; - } - - - ProjectionCreator projectionCreator = singleton.projections.find(string(name))->second; - - if(projectionCreator != NULL) - { - projection = projectionCreator(); - - if(opts != NULL) - projection->setOptions(opts); - } - - return projection; -} - -//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++; - } -} -///END PROJECTIONFACTORY - - -///MIRRORBALL -MirrorBallProjection::MirrorBallProjection(bool initialization) { - name = "mirrorball"; - - if(initialization) - ProjectionFactory::registerProjection(name, this->create); -} - -Projection* MirrorBallProjection::create() { - return new MirrorBallProjection(false); -} - -const char *MirrorBallProjection::getName(void) { - return name; -} - -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; - else - return true; -} - -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 ) ); - - Vector3D *direction = new Vector3D(phi, theta); -// double t; - - direction->y = -direction->y; - - return 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; - } - - return new Point2D(u, v); -} -///END MIRRORBALL - - -///ANGULAR -AngularProjection::AngularProjection(bool initialization) { - name = "angular"; - totalAngle = 360; - if(initialization) - ProjectionFactory::registerProjection(name, this->create); -} - -Projection* AngularProjection::create() { - AngularProjection *p = new AngularProjection(false); - p->totalAngle = 360; - - return (Projection *)p; -} - -void AngularProjection::setOptions(char *opts) { - char *delimiter; - static const char *OPTION_ANGLE = "angle"; - - 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"; - } - } - else - { - throw " error: angular projection: unknown option.\n"; - } - - opts = delimiter + 1; - } -} - -const char *AngularProjection::getName(void) { - return name; -} - -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; - else - return true; -} - -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 = M_PI * sqrt( u * u + v * v ); - - Vector3D *direction = new Vector3D(phi, theta); -// double t; - - direction->y = -direction->y; - - return 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 = (1 / (2 * M_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 - - -///CYLINDRICAL -CylindricalProjection::CylindricalProjection(bool initialization) { - name = "cylindrical"; - - 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() { - return new CylindricalProjection(false); -} - -CylindricalProjection::~CylindricalProjection() { - delete pole; - delete equator; - delete cross; -} - -double CylindricalProjection::getSizeRatio(void) { - return 2; -} - -bool CylindricalProjection::isValidPixel(double /*u*/, double /*v*/) { - return true; -} - -Vector3D* CylindricalProjection::uvToDirection(double u, double v) { - u = 0.75 - u; - - u *= M_PI * 2; - - v = acos( 1 - 2 * v ); - - Vector3D *direction = new Vector3D(u, v); - - double temp = direction->z; - direction->z = direction->y; - direction->y = temp; - - return direction; -} - -Point2D* CylindricalProjection::directionToUV(Vector3D *direction) { - double u, v; - double lat = direction->dot(pole); - - v = ( 1 - lat ) / 2; - - 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) / (2 * M_PI); - - 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 ); - return new Point2D(u, v); -} -///END CYLINDRICAL - - -///POLAR -PolarProjection::PolarProjection(bool initialization) { - name = "polar"; - - 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); -} - -PolarProjection::~PolarProjection() { - delete pole; - delete equator; - delete cross; -} - -double PolarProjection::getSizeRatio(void) { - return 2; -} - -bool PolarProjection::isValidPixel(double /*u*/, double /*v*/) { - return true; -} - -Vector3D* PolarProjection::uvToDirection(double u, double v) { - u = 0.75 - u; - - u *= M_PI * 2; - v *= M_PI; - - Vector3D *direction = new Vector3D(u, v); - - double temp = direction->z; - direction->z = direction->y; - direction->y = temp; - - return direction; -} - -Point2D* PolarProjection::directionToUV(Vector3D *direction) { - double u, v; - double lat = acos(direction->dot(pole)); - - v = lat * M_1_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) / (2 * M_PI); - - 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 ); - return new Point2D(u, v); -} -///END POLAR - - -void transformArray( const pfs::Array2D *in, pfs::Array2D *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; - - pixVal += (*in)(ix, iy); - } - - - delete direction; - delete p; - - (*out)(x,y) = pixVal * scaler; - } - } - } -} - - - diff -Nru luminance-hdr-2.3.0/src/Filter/pfspanoramic.h luminance-hdr-2.3.1/src/Filter/pfspanoramic.h --- luminance-hdr-2.3.0/src/Filter/pfspanoramic.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfspanoramic.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/** - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * - * 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 Giuseppe Rota - */ - -#ifndef PFSPANORAMIC_H -#define PFSPANORAMIC_H - -#include -#include -#include -#include -#include - -#include "Libpfs/array2d.h" -#include "arch/math.h" - -using std::map; -using std::string; - -class Vector3D; -class Point2D; - -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 void setOptions(char *) - { - } - - virtual const char *getName(void) - { - return name; - } -}; - - - -typedef Projection*(*ProjectionCreator)(void); -class ProjectionFactory -{ - static ProjectionFactory singleton; - ProjectionFactory(bool ); - public: - map < string, ProjectionCreator > projections; - static void registerProjection(const char *name, ProjectionCreator ptr); - static Projection *getProjection(char *name); - static void listProjectionNames(void); -}; - -class MirrorBallProjection : public Projection -{ - 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; - 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; - 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; - 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::Array2D *in, pfs::Array2D *out, TransformInfo *transformInfo); - -#endif diff -Nru luminance-hdr-2.3.0/src/Filter/pfsrotate.cpp luminance-hdr-2.3.1/src/Filter/pfsrotate.cpp --- luminance-hdr-2.3.0/src/Filter/pfsrotate.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsrotate.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -/** - * @brief Resize images in PFS stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk, - * Alexander Efremov - * - * 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 Alexander Efremov, - * - * $Id: pfsrotate.cpp,v 1.1 2005/06/15 13:36:54 rafm Exp $ - */ - -#include -#include - -#include "pfsrotate.h" -#include "Common/msec_timer.h" -#include "Libpfs/domio.h" - -namespace pfs -{ - - pfs::Frame* rotateFrame(pfs::Frame* frame, bool clock_wise) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - pfs::DOMIO pfsio; - - int xSize = frame->getHeight(); - int ySize = frame->getWidth(); - pfs::Frame *resizedFrame = pfsio.createFrame( xSize, ySize ); - - pfs::ChannelIterator *it = frame->getChannels(); - while( it->hasNext() ) - { - pfs::Channel *originalCh = it->getNext(); - pfs::Channel *newCh = resizedFrame->createChannel(originalCh->getName()); - - rotateArray(originalCh->getChannelData(), newCh->getChannelData(), clock_wise); - } - - pfs::copyTags( frame, resizedFrame ); - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "rotateFrame() = " << f_timer.get_time() << " msec" << std::endl; -#endif - - return resizedFrame; - } - - void rotateArray(const pfs::Array2D *in, pfs::Array2D *out, bool clockwise) - { - const float* Vin = in->getRawData(); - float* Vout = out->getRawData(); - - const int I_ROWS = in->getRows(); - const int I_COLS = in->getCols(); - - //const int O_ROWS = out->getRows(); - const int O_COLS = out->getCols(); - - 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]; - } - } - } - 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]; - } - } - } - } - -} diff -Nru luminance-hdr-2.3.0/src/Filter/pfsrotate.h luminance-hdr-2.3.1/src/Filter/pfsrotate.h --- luminance-hdr-2.3.0/src/Filter/pfsrotate.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfsrotate.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/** - * @brief Resize images in PFS stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk, - * Alexander Efremov - * - * 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 Alexander Efremov, - * - * $Id: pfsrotate.h,v 1.1 2005/06/15 13:36:54 rafm Exp $ - */ - -#ifndef PFSROTATE_H -#define PFSROTATE_H - -#include "Libpfs/array2d.h" -#include "Libpfs/frame.h" - -namespace pfs -{ - void rotateArray(const pfs::Array2D *in, pfs::Array2D *out, bool clockwise); - pfs::Frame* rotateFrame(pfs::Frame* frame, bool clock_wise); -} - -#endif // PFSROTATE_H diff -Nru luminance-hdr-2.3.0/src/Filter/pfssize.cpp luminance-hdr-2.3.1/src/Filter/pfssize.cpp --- luminance-hdr-2.3.0/src/Filter/pfssize.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfssize.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,262 +0,0 @@ -/** - * @brief Resize images in PFS stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Rafal Mantiuk, - * - * $Id: pfssize.cpp,v 1.4 2009/01/29 00:44:30 rafm Exp $ - */ - -#include -#include -#include - -#include "Common/msec_timer.h" -#include "Libpfs/array2d.h" -#include "Libpfs/frame.h" -#include "Libpfs/domio.h" - -#define ROUNDING_ERROR 0.000001 - -namespace pfs -{ -class ResampleFilter -{ -public: - /** - * Size of the filter in samples. - */ - virtual float getSize() = 0; - /** - * Get value of the filter for x. x is always positive. - */ - virtual float getValue( const float x ) = 0; - - virtual ~ResampleFilter() - { - } - -}; - -void resize( const pfs::Array2D *src, pfs::Array2D *dest ); -void resampleMitchell( const pfs::Array2D *in, pfs::Array2D *out ); -void resampleArray( const pfs::Array2D *in, pfs::Array2D *out, ResampleFilter *filter ); - -#include "arch/minmax.h" -// --------- Filters -------- - -class MitchellFilter : public ResampleFilter -{ -public: - float getSize() { return 2; } - float getValue( const float x ) - { - const float B = 0.3333f, C = 0.3333f; - const float x2 = x*x; - if( x < 1 ) - return 1.f/6.f * ( - (12-9*B-6*C)*x2*x + - (-18+12*B+6*C)*x2 + - (6-2*B) ); - if( x >=1 && x < 2 ) - return 1.f/6.f * ( - (-B-6*C)*x2*x + - (6*B + 30*C)*x2 + - (-12*B-48*C)*x + - (8*B+24*C) ); - return 0; - } -}; - -class LinearFilter : public ResampleFilter -{ -public: - float getSize() { return 1; } - float getValue( const float x ) - { - if( x < 1 ) return 1 - x; - return 0; - } -}; - -// TODO: double checked! -// Davide Anastasia - -//class BoxFilter : public ResampleFilter -//{ -//public: -// float getSize() { return 0.5; } -// float getValue( const float x ) -// { -// return 1; -// } -//}; - -pfs::Frame* resizeFrame(pfs::Frame* frame, int xSize) -{ -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - pfs::DOMIO pfsio; - - ResampleFilter *filter = new LinearFilter(); - - int new_x = xSize; - int new_y = (int)((float)frame->getHeight() * (float)xSize / (float)frame->getWidth()); - - pfs::Frame *resizedFrame = pfsio.createFrame( new_x, new_y ); - - pfs::ChannelIterator *it = frame->getChannels(); - while( it->hasNext() ) - { - pfs::Channel *originalCh = it->getNext(); - pfs::Channel *newCh = resizedFrame->createChannel( originalCh->getName() ); - - resampleArray(originalCh->getChannelData(), newCh->getChannelData(), filter); - } - - pfs::copyTags( frame, resizedFrame ); - delete filter; - - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "resizeFrame() = " << f_timer.get_time() << " msec" << std::endl; -#endif - - return resizedFrame; -} - - -void upsampleArray( const pfs::Array2D *in, pfs::Array2D *out, ResampleFilter *filter ) -{ - float dx = (float)in->getCols() / (float)out->getCols(); - float dy = (float)in->getRows() / (float)out->getRows(); - - //float pad; - - //float filterSamplingX = max( modff( dx, &pad ), 0.01f ); - //float filterSamplingY = max( modff( dy, &pad ), 0.01f ); - - const int outRows = out->getRows(); - const int outCols = out->getCols(); - - const float inRows = (float)in->getRows(); - const float inCols = (float)in->getCols(); - - const float filterSize = filter->getSize(); - -// TODO: possible optimization: create lookup table for the filter - - float sx, sy; - int x, y; - for( y = 0, sy = -0.5f + dy/2; y < outRows; y++, sy += dy ) - for( x = 0, sx = -0.5f + dx/2; x < outCols; x++, sx += dx ) { - - float pixVal = 0; - float weight = 0; - - 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 = filter->getValue( fx )*filter->getValue( fy ); - - pixVal += (*in)( (int)ix, (int)iy ) * fval; - weight += fval; - } - - if( weight == 0 ) { - fprintf( stderr, "%g %g %g %g\n", sx, sy, dx, dy ); - } -// assert( weight != 0 ); - (*out)(x,y) = pixVal / weight; - - } -} - -void downsampleArray(const pfs::Array2D *in, pfs::Array2D *out) -{ - const float* Vin = in->getRawData(); - float* Vout = out->getRawData(); - - const unsigned int inRows = in->getRows(); - const unsigned int inCols = in->getCols(); - - const unsigned int outRows = out->getRows(); - const unsigned int outCols = out->getCols(); - - const float dx = (float)inCols/(float)outCols; - const float dy = (float)inRows/(float)outRows; - - const float filterSize = 0.5; - - float sx, sy; - unsigned int x, y; - unsigned int IY_L, IY_U, IX_L, IX_U; - - float pixVal, w; - - for (y = 0, sy = (dy/2.0f - 0.5f); y < outRows; y++, sy += dy) - { - IY_L = (unsigned int)max( 0, ceilf( sy-dx*filterSize ) ); - IY_U = (unsigned int)min( floorf(sy+dx*filterSize), inRows-1 ); - - for (x = 0, sx = (dx/2.0f - 0.5f); x < outCols; x++, sx += dx) - { - pixVal = 0.0f; - w = 0.0f; - - IX_L = (unsigned int)max( 0, ceilf( sx-dx*filterSize ) ); - IX_U = (unsigned int)min( floorf(sx+dx*filterSize), inCols-1 ); - - for (unsigned int iy = IY_L; iy <= IY_U; iy++) - { - for (unsigned int ix = IX_L; ix <= IX_U; ix++) - { - pixVal += Vin[iy*inCols + ix]; - w += 1.0f; - } - } - Vout[y*outCols+x] = pixVal/w; - } - } -} - -void resampleArray(const pfs::Array2D *in, pfs::Array2D *out, ResampleFilter *filter ) -{ - if ( in->getCols() == out->getCols() && in->getRows() == out->getRows() ) - { - pfs::copyArray(in, out); - } - else if( in->getCols() > out->getCols() || in->getRows() > out->getRows() ) - { - downsampleArray(in, out); - } - else - { - upsampleArray(in, out, filter); - } -} -} diff -Nru luminance-hdr-2.3.0/src/Filter/pfssize.h luminance-hdr-2.3.1/src/Filter/pfssize.h --- luminance-hdr-2.3.0/src/Filter/pfssize.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Filter/pfssize.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -/** - * @brief Resize images in PFS stream - * - * This file is a part of PFSTOOLS package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * 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 Rafal Mantiuk, - * - * $Id: pfssize.h,v 1.4 2009/01/29 00:44:30 rafm Exp $ - */ - -#ifndef PFSSIZE_H -#define PFSSIZE_H - -namespace pfs -{ - // forward declaration - class Frame; - class Array2D; - - Frame* resizeFrame(Frame* frame, - int xSize); - void downsampleArray(const Array2D *from, - Array2D *to); -} - -#endif // PFSSIZE_H diff -Nru luminance-hdr-2.3.0/src/HdrCreation/CMakeLists.txt luminance-hdr-2.3.1/src/HdrCreation/CMakeLists.txt --- luminance-hdr-2.3.0/src/HdrCreation/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -3,12 +3,14 @@ ${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.h) SET(FILES_HXX ${CMAKE_CURRENT_SOURCE_DIR}/createhdr.h +${CMAKE_CURRENT_SOURCE_DIR}/createhdr_common.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) SET(FILES_CPP ${CMAKE_CURRENT_SOURCE_DIR}/createhdr.cpp +${CMAKE_CURRENT_SOURCE_DIR}/createhdr_common.cpp ${CMAKE_CURRENT_SOURCE_DIR}/debevec.cpp ${CMAKE_CURRENT_SOURCE_DIR}/responses.cpp ${CMAKE_CURRENT_SOURCE_DIR}/robertson02.cpp diff -Nru luminance-hdr-2.3.0/src/HdrCreation/HdrCreationManager.cpp luminance-hdr-2.3.1/src/HdrCreation/HdrCreationManager.cpp --- luminance-hdr-2.3.0/src/HdrCreation/HdrCreationManager.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/HdrCreationManager.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -2,20 +2,21 @@ * This file is a part of Luminance HDR package * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota + * Copyright (C) 2010-2012 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 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. + * 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 + * 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 Giuseppe Rota @@ -25,315 +26,480 @@ */ #include - #include #include #include +#include + +#include +#include + +#include "Libpfs/manip/shift.h" +#include "Libpfs/manip/cut.h" +#include "Libpfs/manip/copy.h" + +#include "Libpfs/utils/msec_timer.h" -#include "Libpfs/domio.h" -#include "Fileformat/pfstiff.h" +#include "Fileformat/tiffreader.h" +#include "Fileformat/tiffwriter.h" #include "Fileformat/pfsouthdrimage.h" -#include "Filter/pfscut.h" + #include "Exif/ExifOperations.h" #include "Threads/HdrInputLoader.h" #include "mtb_alignment.h" #include "HdrCreationManager.h" #include "arch/math.h" -#include "Common/msec_timer.h" + namespace { -pfs::Array2D *shiftPfsArray2D(pfs::Array2D *in, int dx, int dy) +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; + l = 0.0f; + v = std::max(r, g); + v = std::max(v, b); + m = std::min(r, g); + m = std::min(m, b); + l = (m + v) / 2.0f; + if (l <= 0.0f) + return; + vm = v - m; + s = vm; + if (s >= 0.0f) + s /= (l <= 0.5f) ? (v + m) : (2.0f - v - m); + else return; + r2 = (v - r) / vm; + g2 = (v - g) / vm; + b2 = (v - b) / vm; + if (r == v) + h = (g == m ? 5.0f + b2 : 1.0f - g2); + else if (g == v) + h = (b == m ? 1.0f + r2 : 3.0f - b2); + else + h = (r == m ? 3.0f + g2 : 5.0f - r2); + h /= 6.0; +} + +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) + { + float m; + float sv; + int sextant; + float fract, vsf, mid1, mid2; + m = l + l - 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; + } + } +} + +qreal averageLightness(const pfs::Array2Df& R, + const pfs::Array2Df& G, + const pfs::Array2Df& B) +{ + int width = R.getCols(); + int height = R.getRows(); + + qreal avgLum = 0.0f; + + float h, s, l; + for (int i = 0; i < height*width; i++) + { + rgb2hsl(R(i), G(i), B(i), h, s, l); + avgLum += l; + } + return avgLum / (width * height); +} + +qreal averageLightness(const QImage& qImage) +{ + const int w = qImage.width(); + const int h = qImage.height(); + const QRgb* qImagePtr = reinterpret_cast(qImage.bits()); + + qreal avgLum = 0.0f; + for (int i = 0; i < h*w; i++) + { + avgLum += QColor::fromRgb( *qImagePtr++ ).toHsl().lightnessF(); + } + return avgLum / (w * h); +} + + + +void blend(QImage& img1, const QImage& img2, const QImage& mask) +{ + qDebug() << "blend"; #ifdef TIMER_PROFILING msec_timer stop_watch; stop_watch.start(); #endif - int width = in->getCols(); - int height = in->getRows(); + const int width = img1.width(); + const int height = img1.height(); + + QColor color; + QRgb pixValue; + qreal alpha; + + qreal sf = averageLightness(img1) / averageLightness(img2); + int h, s, l; + + if (sf > 1.0f) sf = 1.0f / sf; - pfs::Array2D *temp = new pfs::Array2D(width, height); - pfs::Array2D *out = new pfs::Array2D(width, height); - -#pragma omp parallel for shared(temp) - for (int j = 0; j < height; j++) - for (int i = 0; i < width; i++) - (*temp)(i, j) = 0; - - // x-shift -#pragma omp parallel for shared(in) - for (int j = 0; j < height; j++) { - for (int i = 0; i < width; i++) { - if ((i+dx) < 0) - continue; - if ((i+dx) >= width) - break; - if ((*in)(i+dx, j) > 65535) - (*temp)(i, j) = 65535; - else if ((*in)(i+dx, j) < 0) - (*temp)(i, j) = 0; - else - (*temp)(i, j) = (*in)(i+dx, j); - } - } - // y-shift -#pragma omp parallel for shared(out) - for (int i = 0; i < width; i++) { - for (int j = 0; j < height; j++) { - if ((j+dy) < 0) - continue; - if ((j+dy) >= height) - break; - if ((*temp)(i, j+dy) > 65535) - (*out)(i, j) = 65535; - else if ((*temp)(i, j+dy) < 0) - (*out)(i, j) = 0; - else - (*out)(i, j) = (*temp)(i, j+dy); - } - } + for (int j = 0; j < height; j++) + { + for (int i = 0; i < width; i++) + { + alpha = static_cast(qAlpha(mask.pixel(i,j))) / 255; + pixValue = img2.pixel(i, j); + color = QColor::fromRgb(pixValue).toHsl(); + color.getHsl(&h, &s, &l); + l *= sf; + color.setHsl(h, s, l); + pixValue = color.rgb(); + pixValue = (1.0f - alpha)*img1.pixel(i, j) + alpha*pixValue; + img1.setPixel(i, j, pixValue); + } + } #ifdef TIMER_PROFILING stop_watch.stop_and_update(); - std::cout << "shiftPfsArray2D = " << stop_watch.get_time() << " msec" << std::endl; + std::cout << "blend = " << stop_watch.get_time() << " msec" << std::endl; #endif - - return out; } + +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) +{ + qDebug() << "blend MDR"; +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + int width = R1.getCols(); + int height = R1.getRows(); + + float alpha = 0.0f; + qreal sf = averageLightness(R1, G1, B1) / averageLightness(R2, G2, B2); + + float h, s, l; + float r1, g1, b1; + float r2, g2, b2; + + const float *maxR1 = std::max_element(R1.data(), R1.data() + width*height); + const float *maxG1 = std::max_element(G1.data(), G1.data() + width*height); + const float *maxB1 = std::max_element(B1.data(), B1.data() + width*height); + const float *maxR2 = std::max_element(R2.data(), R2.data() + width*height); + const float *maxG2 = std::max_element(G2.data(), G2.data() + width*height); + const float *maxB2 = std::max_element(B2.data(), B2.data() + width*height); + + float m1[] = {*maxR1, *maxG1, *maxB1}; + float m2[] = {*maxR2, *maxG2, *maxB2}; + + float inverseMax = 1.f / std::max(*std::max_element(m1, m1+3), + *std::max_element(m2, m2+3)); + + if (sf > 1.0f) sf = 1.0f / sf; + + for (int j = 0; j < height; j++) + { + for (int i = 0; i < width; i++) + { + alpha = static_cast(qAlpha( mask.pixel(i,j) ))/255; + r1 = R1(i, j) * inverseMax; + g1 = G1(i, j) * inverseMax; + b1 = B1(i, j) * inverseMax; + + r2 = R2(i, j) * inverseMax; + g2 = G2(i, j) * inverseMax; + b2 = B2(i, j) * inverseMax; + + rgb2hsl(r2, g2, b2, h, s, l); + l *= sf; + hsl2rgb(h, s, l, r2, g2, b2); + + R1(i, j) = (1.0f - alpha)*r1 + alpha*r2; + G1(i, j) = (1.0f - alpha)*g1 + alpha*g2; + B1(i, j) = (1.0f - alpha)*b1 + alpha*b2; + } + } +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + std::cout << "blend MDR = " << stop_watch.get_time() << " msec" << std::endl; +#endif } +} // anonymous namespace + HdrCreationManager::HdrCreationManager(bool fromCommandLine) : inputType( UNKNOWN_INPUT_TYPE ), chosen_config( predef_confs[0] ), + m_loadingError(false), + m_runningThreads(0), + m_processedFiles(0), ais( NULL ), + m_ais_crop_flag(false), m_shift(0), + m_mdrWidth(0), + m_mdrHeight(0), fromCommandLine( fromCommandLine ) + {} -//bool loadingError; - -//// number of running threads at any given time -//int runningThreads; -//// cumulative number of successfully loaded files -//int processedFiles; - -//LuminanceOptions m_luminance_options; - -//// align_image_stack -//QProcess *ais; - -//int m_shift; - -//int m_mdrWidth; -//int m_mdrHeight; - -//bool fromCommandLine; - void HdrCreationManager::setConfig(const config_triple &c) { - chosen_config = c; + chosen_config = c; } void HdrCreationManager::setFileList(const QStringList& l) { - processedFiles = m_shift; - runningThreads = 0; - loadingError = false; + m_processedFiles = m_shift; + m_runningThreads = 0; + m_loadingError = false; - fileList.append(l); + fileList.append(l); - expotimes.resize(fileList.count()); - filesToRemove.resize(fileList.count()); + expotimes.resize(fileList.count()); + filesToRemove.resize(fileList.count()); // add default values for (int i = 0; i < l.count(); i++) { // time equivalents of EV values - expotimes[m_shift + i] = -1; + expotimes[m_shift + i] = -1; // i-th==true means we started a thread to load the i-th file - startedProcessing.append(false); + startedProcessing.append(false); + mdrImagesList.push_back(NULL); + antiGhostingMasksList.push_back(NULL); // ldr payloads - ldrImagesList.append(NULL); + ldrImagesList.push_back(NULL); // mdr payloads - listmdrR.push_back(NULL); - listmdrG.push_back(NULL); - listmdrB.push_back(NULL); - } + listmdrR.push_back(NULL); + listmdrG.push_back(NULL); + listmdrB.push_back(NULL); + } } void HdrCreationManager::loadInputFiles() { - //find first not started processing. - int firstNotStarted = -1; + //find first not started processing. + int firstNotStarted = -1; for (int i = 0; i < fileList.size(); i++) { if ( !startedProcessing.at(i) ) { - firstNotStarted = i; - //qDebug("HCM: loadInputFiles: found not startedProcessing: %d",i); - break; - } - } + firstNotStarted = i; + //qDebug("HCM: loadInputFiles: found not startedProcessing: %d",i); + break; + } + } // we can end up in this function "conditionalLoadInput" many times, // called in a queued way by newResult(...). if (firstNotStarted == -1) { - if (processedFiles == fileList.size()) //then it's really over + if (m_processedFiles == fileList.size()) //then it's really over { if (filesLackingExif.size() == 0) { - //give an offset to the EV values if they are outside of the -10..10 range. - checkEVvalues(); - } - emit finishedLoadingInputFiles(filesLackingExif); - } //all files loaded - - //return when list is over but some threads are still running. - return; - } //if all files already started processing + //give an offset to the EV values if they are outside of the -10..10 range. + checkEVvalues(); + } + emit finishedLoadingInputFiles(filesLackingExif); + } //all files loaded + + //return when list is over but some threads are still running. + return; + } //if all files already started processing else { //if we still have to start processing some file - while ( runningThreads < m_luminance_options.getNumThreads() && + while ( m_runningThreads < m_luminance_options.getNumThreads() && firstNotStarted < startedProcessing.size() ) { - //qDebug("HCM: Creating loadinput thread on %s",qPrintable(fileList[firstNotStarted])); - startedProcessing[firstNotStarted] = true; - HdrInputLoader *thread = new HdrInputLoader(fileList[firstNotStarted],firstNotStarted); - if (thread == NULL) - exit(1); // TODO: show an error message and exit gracefully - connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); - connect(thread, SIGNAL(loadFailed(QString,int)), this, SLOT(loadFailed(QString,int))); - connect(thread, SIGNAL(ldrReady(QImage *, int, float, QString, bool)), this, SLOT(ldrReady(QImage *, int, float, QString, bool))); - connect(thread, SIGNAL(mdrReady(pfs::Frame *, int, float, QString)), this, SLOT(mdrReady(pfs::Frame *, int, float, QString))); - connect(thread, SIGNAL(maximumValue(int)), this, SIGNAL(maximumValue(int))); - connect(thread, SIGNAL(nextstep(int)), this, SIGNAL(nextstep(int))); - thread->start(); - firstNotStarted++; - runningThreads++; - } - } + startedProcessing[firstNotStarted] = true; + HdrInputLoader *thread = new HdrInputLoader(fileList[firstNotStarted],firstNotStarted); + if (thread == NULL) + exit(1); // TODO: show an error message and exit gracefully + connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); + connect(thread, SIGNAL(loadFailed(QString,int)), this, SLOT(loadFailed(QString,int))); + connect(thread, SIGNAL(ldrReady(QImage *, int, float, QString, bool)), this, SLOT(ldrReady(QImage *, int, float, QString, bool))); + connect(thread, SIGNAL(mdrReady(pfs::Frame *, int, float, QString)), this, SLOT(mdrReady(pfs::Frame *, int, float, QString))); + connect(thread, SIGNAL(maximumValue(int)), this, SIGNAL(maximumValue(int))); + connect(thread, SIGNAL(nextstep(int)), this, SIGNAL(nextstep(int))); + thread->start(); + firstNotStarted++; + m_runningThreads++; + } + } } void HdrCreationManager::loadFailed(const QString& message, int /*index*/) { - //check for correct image size: update list that will be sent once all is over. - //qDebug("HCM: failed loading file: %s.", qPrintable(message)); - loadingError = true; - emit errorWhileLoading(message); + //check for correct image size: update list that will be sent once all is over. + m_loadingError = true; + emit errorWhileLoading(message); } void HdrCreationManager::mdrReady(pfs::Frame* newFrame, int index, float expotime, const QString& newfname) { - if (loadingError) { - //qDebug("HCM: loadingError, bailing out."); - emit processed(); - return; - } - //newFrame is in CS_RGB but channel names remained X Y Z - pfs::Channel *R, *G, *B; + if (m_loadingError) { + emit processed(); + return; + } + //newFrame is in CS_RGB but channel names remained X Y Z + pfs::Channel *R, *G, *B; newFrame->getXYZChannels(R, G, B); if (inputType == LDR_INPUT_TYPE) { - //qDebug("HCM: wrong format, bailing out."); - loadingError = true; - emit errorWhileLoading(tr("The image %1 is an 8 bit format (LDR) while the previous ones are not.").arg(newfname)); - return; - } - inputType = MDR_INPUT_TYPE; + m_loadingError = true; + emit errorWhileLoading(tr("The image %1 is an 8 bit format (LDR) while the previous ones are not.").arg(newfname)); + return; + } + inputType = MDR_INPUT_TYPE; if (!mdrsHaveSameSize(R->getWidth(),R->getHeight())) { - //qDebug("HCM: wrong size, bailing out."); - loadingError = true; - emit errorWhileLoading(tr("The image %1 has an invalid size.").arg(newfname)); - return; - } - if (!fromCommandLine) - { - mdrImagesList.append(fromHDRPFStoQImage(newFrame)); - } - m_mdrWidth = R->getWidth(); - m_mdrHeight = R->getHeight(); - // fill with image data - listmdrR[index] = R->getChannelData(); - listmdrG[index] = G->getChannelData(); - listmdrB[index] = B->getChannelData(); - //perform some housekeeping - //pfs::DOMIO pfsio; - //pfsio.freeFrame(newFrame); - newResult(index,expotime,newfname); - //continue with the loading process - loadInputFiles(); + m_loadingError = true; + emit errorWhileLoading(tr("The image %1 has an invalid size.").arg(newfname)); + return; + } + if (!fromCommandLine) { + mdrImagesList[index] = fromHDRPFStoQImage(newFrame); + QImage *img = new QImage(R->getWidth(),R->getHeight(), QImage::Format_ARGB32); + img->fill(qRgba(0,0,0,0)); + antiGhostingMasksList[index] = img; + } + m_mdrWidth = R->getWidth(); + m_mdrHeight = R->getHeight(); + // fill with image data + listmdrR[index] = R; + listmdrG[index] = G; + listmdrB[index] = B; + //perform some housekeeping + newResult(index,expotime,newfname); + //continue with the loading process + loadInputFiles(); } void HdrCreationManager::ldrReady(QImage* newImage, int index, float expotime, const QString& newfname, bool /*ldrtiff*/) { - //qDebug("HCM: ldrReady"); - if (loadingError) + //qDebug("HCM: ldrReady"); + if (m_loadingError) { - //qDebug("HCM: loadingError, bailing out."); - emit processed(); - return; - } + emit processed(); + return; + } if (inputType==MDR_INPUT_TYPE) { - //qDebug("HCM: wrong format, bailing out."); - loadingError = true; - emit errorWhileLoading(tr("The image %1 is an 16 bit format while the previous ones are not.").arg(newfname)); - return; - } - inputType=LDR_INPUT_TYPE; + m_loadingError = true; + emit errorWhileLoading(tr("The image %1 is an 16 bit format while the previous ones are not.").arg(newfname)); + return; + } + inputType=LDR_INPUT_TYPE; if (!ldrsHaveSameSize(newImage->width(),newImage->height())) { - //qDebug("HCM: wrong size, bailing out."); - loadingError = true; - emit errorWhileLoading(tr("The image %1 has an invalid size.").arg(newfname)); - return; - } - - // fill with image data - ldrImagesList[index] = newImage; - - //perform some housekeeping - newResult(index,expotime,newfname); - //continue with the loading process - loadInputFiles(); + m_loadingError = true; + emit errorWhileLoading(tr("The image %1 has an invalid size.").arg(newfname)); + return; + } + + // fill with image data + ldrImagesList[index] = newImage; + if (!fromCommandLine) { + QImage *img = new QImage(newImage->width(),newImage->height(), QImage::Format_ARGB32); + img->fill(qRgba(0,0,0,0)); + antiGhostingMasksList[index] = img; + } + + //perform some housekeeping + newResult(index,expotime,newfname); + //continue with the loading process + loadInputFiles(); } void HdrCreationManager::newResult(int index, float expotime, const QString& newfname) { - runningThreads--; - processedFiles++; + m_runningThreads--; + m_processedFiles++; - //update filesToRemove + //update filesToRemove if ( fileList.at(index) != newfname ) { - qDebug() << "Files to remove " << index << " " << newfname; - filesToRemove[index] = newfname; - } + qDebug() << "Files to remove " << index << " " << newfname; + filesToRemove[index] = newfname; + } - //update expotimes[i] - expotimes[index] = expotime; + //update expotimes[i] + expotimes[index] = expotime; - QFileInfo qfi(fileList[index]); - //check for invalid exif: update list that will be sent once all is over. + QFileInfo qfi(fileList[index]); + //check for invalid exif: update list that will be sent once all is over. if (expotimes[index] == -1) { - filesLackingExif << "
  • "+qfi.fileName()+"
  • "; - //qDebug("HCM: new invalid exif. elements: %d", filesLackingExif.size()); - } + filesLackingExif << "
  • "+qfi.fileName()+"
  • "; + } - emit fileLoaded(index,fileList[index],expotimes[index]); - emit processed(); + emit fileLoaded(index,fileList[index],expotimes[index]); + emit processed(); } bool HdrCreationManager::ldrsHaveSameSize(int currentWidth, int currentHeight) { for (int i = 0; i < ldrImagesList.size(); i++) { - const QImage* imagepointer = ldrImagesList.at(i); + const QImage* imagepointer = ldrImagesList.at(i); if (imagepointer != NULL) { if ( (imagepointer->width() != currentWidth) || @@ -342,17 +508,17 @@ return false; } } - } - return true; + } + return true; } -bool HdrCreationManager::mdrsHaveSameSize(int currentWidth, int currentHeight) +bool HdrCreationManager::mdrsHaveSameSize(size_t currentWidth, size_t currentHeight) { for (unsigned int i = 0; i < listmdrR.size(); i++) { - const pfs::Array2D* Rpointer = listmdrR.at(i); - const pfs::Array2D* Gpointer = listmdrG.at(i); - const pfs::Array2D* Bpointer = listmdrB.at(i); + const pfs::Array2Df* Rpointer = listmdrR.at(i); + const pfs::Array2Df* Gpointer = listmdrG.at(i); + const pfs::Array2Df* Bpointer = listmdrB.at(i); if (Rpointer != NULL && Gpointer != NULL && Bpointer != NULL) { if ( (Rpointer->getCols() != currentWidth) || @@ -365,429 +531,610 @@ return false; } } - } - return true; + } + return true; } void HdrCreationManager::align_with_mtb() { mtb_alignment(ldrImagesList); - emit finishedAligning(0); + emit finishedAligning(0); +} + +void HdrCreationManager::set_ais_crop_flag(bool flag) +{ + m_ais_crop_flag = flag; } void HdrCreationManager::align_with_ais() { - ais = new QProcess(this); - if (ais == NULL) //TODO: exit gracefully - exit(1); - if (!fromCommandLine) - ais->setWorkingDirectory(m_luminance_options.getTempDir()); - QStringList env = QProcess::systemEnvironment(); - #ifdef WIN32 - QString separator(";"); - #else - QString separator(":"); - #endif - env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1"+separator+QCoreApplication::applicationDirPath()); - ais->setEnvironment(env); - connect(ais, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(ais_finished(int,QProcess::ExitStatus))); - connect(ais, SIGNAL(error(QProcess::ProcessError)), this, SIGNAL(ais_failed(QProcess::ProcessError))); - connect(ais, SIGNAL(error(QProcess::ProcessError)), this, SLOT(ais_failed_slot(QProcess::ProcessError))); - connect(ais, SIGNAL(readyRead()), this, SLOT(readData())); - - QStringList ais_parameters = m_luminance_options.getAlignImageStackOptions(); - if (filesToRemove[0] == "") { - ais_parameters << fileList; - } - else { - foreach(QString fname, filesToRemove) - ais_parameters << fname; - } - qDebug() << "ais_parameters " << ais_parameters; - #ifdef Q_WS_MAC - ais->start(QCoreApplication::applicationDirPath()+"/align_image_stack", ais_parameters ); - #else - ais->start("align_image_stack", ais_parameters ); - #endif - qDebug() << "ais started"; + ais = new QProcess(this); + if (ais == NULL) exit(1); //TODO: exit gracefully + if (!fromCommandLine) { + ais->setWorkingDirectory(m_luminance_options.getTempDir()); + } + QStringList env = QProcess::systemEnvironment(); +#ifdef WIN32 + QString separator(";"); +#else + QString separator(":"); +#endif + env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1"+separator+QCoreApplication::applicationDirPath()); + ais->setEnvironment(env); + connect(ais, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(ais_finished(int,QProcess::ExitStatus))); + connect(ais, SIGNAL(error(QProcess::ProcessError)), this, SIGNAL(ais_failed(QProcess::ProcessError))); + connect(ais, SIGNAL(error(QProcess::ProcessError)), this, SLOT(ais_failed_slot(QProcess::ProcessError))); + connect(ais, SIGNAL(readyRead()), this, SLOT(readData())); + + QStringList ais_parameters = m_luminance_options.getAlignImageStackOptions(); + + if (m_ais_crop_flag) { ais_parameters << "-C"; } + if (filesToRemove[0].isEmpty()) { ais_parameters << fileList; } + else { + // foreach (QString fname, filesToRemove) { + // ...using iterators will remove a temporary copy instead than foreach + for ( QVector::const_iterator it = filesToRemove.begin(), + itEnd = filesToRemove.end(); it != itEnd; ++it) + { + ais_parameters << *it; + } + } + qDebug() << "ais_parameters " << ais_parameters; +#ifdef Q_WS_MAC + qDebug() << QCoreApplication::applicationDirPath()+"/align_image_stack"; + ais->start(QCoreApplication::applicationDirPath()+"/align_image_stack", ais_parameters ); +#else + ais->start("align_image_stack", ais_parameters ); +#endif + qDebug() << "ais started"; } void HdrCreationManager::ais_finished(int exitcode, QProcess::ExitStatus exitstatus) { if (exitstatus != QProcess::NormalExit) { - qDebug() << "ais failed"; - //emit ais_failed(QProcess::Crashed); - return; - } + qDebug() << "ais failed"; + //emit ais_failed(QProcess::Crashed); + return; + } if (exitcode == 0) { - //TODO: try-catch - //qDebug("HCM: align_image_stack successfully terminated"); - clearlists(false); + //TODO: try-catch + clearlists(false); for (int i = 0; i < fileList.size(); i++) { - //align_image_stack can only output tiff files - QString filename; - if (!fromCommandLine) - filename = QString(m_luminance_options.getTempDir() + "/aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif"); - else - filename = QString("aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif"); - QByteArray fname = QFile::encodeName(filename); - //qDebug("HCM: Loading back file name=%s", fname); - TiffReader reader(fname, "", false); - //if 8bit ldr tiff + //align_image_stack can only output tiff files + QString filename; + if (!fromCommandLine) + filename = QString(m_luminance_options.getTempDir() + "/aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif"); + else + filename = QString("aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif"); + QByteArray fname = QFile::encodeName(filename); + TiffReader reader(fname, "", false); + //if 8bit ldr tiff if (reader.is8bitTiff()) { - QImage* resultImage = reader.readIntoQImage(); - // QImage* oldImage = resultImage; - HdrInputLoader::conditionallyRotateImage(QFileInfo(fileList[0]), &resultImage); - - ldrImagesList.append( resultImage ); - // tiffLdrList.append(oldImage == resultImage); - } - //if 16bit (tiff) treat as hdr + QImage* resultImage = reader.readIntoQImage(); + HdrInputLoader::conditionallyRotateImage(QFileInfo(fileList[0]), &resultImage); + + ldrImagesList.append( resultImage ); + if (!fromCommandLine) { + QImage *img = new QImage(resultImage->width(),resultImage->height(), QImage::Format_ARGB32); + img->fill(qRgba(0,0,0,0)); + antiGhostingMasksList.append(img); + } + } + //if 16bit (tiff) treat as hdr else if (reader.is16bitTiff()) { - //TODO: get a 16bit TIFF image and test it + //TODO: get a 16bit TIFF image and test it pfs::Frame *newFrame = reader.readIntoPfsFrame(); - pfs::Channel *R, *G, *B; - R = newFrame->getChannel("X"); - G = newFrame->getChannel("Y"); - B = newFrame->getChannel("Z"); - listmdrR.push_back(R->getChannelData()); - listmdrG.push_back(G->getChannelData()); - listmdrB.push_back(B->getChannelData()); - //pfs::DOMIO pfsio; - //pfsio.freeFrame(newFrame); - } - qDebug() << "void HdrCreationManager::ais_finished: remove " << fname; - QFile::remove(fname); - } - QFile::remove(m_luminance_options.getTempDir() + "/hugin_debug_optim_results.txt"); - emit finishedAligning(exitcode); - } + m_mdrWidth = newFrame->getWidth(); + m_mdrHeight = newFrame->getHeight(); + pfs::Channel *R, *G, *B; + R = newFrame->getChannel("X"); + G = newFrame->getChannel("Y"); + B = newFrame->getChannel("Z"); + listmdrR.push_back(R); + listmdrG.push_back(G); + listmdrB.push_back(B); + if (!fromCommandLine) { + mdrImagesList.append(fromHDRPFStoQImage(newFrame)); + QImage *img = new QImage(R->getWidth(),R->getHeight(), QImage::Format_ARGB32); + img->fill(qRgba(0,0,0,0)); + antiGhostingMasksList.append(img); + } + } + qDebug() << "void HdrCreationManager::ais_finished: remove " << fname; + QFile::remove(fname); + } + QFile::remove(m_luminance_options.getTempDir() + "/hugin_debug_optim_results.txt"); + emit finishedAligning(exitcode); + } else { - qDebug() << "align_image_stack exited with exit code " << exitcode; - emit finishedAligning(exitcode); - } + qDebug() << "align_image_stack exited with exit code " << exitcode; + emit finishedAligning(exitcode); + } } void HdrCreationManager::ais_failed_slot(QProcess::ProcessError error) { - qDebug() << "align_image_stack failed"; + qDebug() << "align_image_stack failed"; } void HdrCreationManager::removeTempFiles() { - foreach (QString tempfname, filesToRemove) - { - qDebug() << "void HdrCreationManager::removeTempFiles(): " << qPrintable(tempfname); - if (!tempfname.isEmpty()) - { - QFile::remove(tempfname); - } - } - filesToRemove.clear(); + foreach (QString tempfname, filesToRemove) { + qDebug() << "void HdrCreationManager::removeTempFiles(): " + << qPrintable(tempfname); + if (!tempfname.isEmpty()) { + QFile::remove(tempfname); + } + } + filesToRemove.clear(); } void HdrCreationManager::checkEVvalues() { - //qDebug("HCM::checkEVvalues"); - float max=-20, min=+20; - for (int i = 0; i < fileList.size(); i++) { - float ev_val = log2f(expotimes[i]); - if (ev_val > max) - max = ev_val; - if (ev_val < min) - min = ev_val; - } - //now if values are out of bounds, add an offset to them. - if (max > 10) { - for (int i = 0; i < fileList.size(); i++) { - float new_ev = log2f(expotimes[i]) - (max - 10); - expotimes[i] = exp2f(new_ev); - emit expotimeValueChanged(exp2f(new_ev), i); - } - } else if (min < -10) { - for (int i = 0; i < fileList.size(); i++) { - float new_ev = log2f(expotimes[i]) - (min + 10); - expotimes[i] = exp2f(new_ev); - emit expotimeValueChanged(exp2f(new_ev), i); - } - } - //qDebug("HCM::END checkEVvalues"); + float max=-20, min=+20; + for (int i = 0; i < fileList.size(); i++) { + float ev_val = log2f(expotimes[i]); + if (ev_val > max) + max = ev_val; + if (ev_val < min) + min = ev_val; + } + //now if values are out of bounds, add an offset to them. + if (max > 10) { + for (int i = 0; i < fileList.size(); i++) { + float new_ev = log2f(expotimes[i]) - (max - 10); + expotimes[i] = exp2f(new_ev); + emit expotimeValueChanged(exp2f(new_ev), i); + } + } else if (min < -10) { + for (int i = 0; i < fileList.size(); i++) { + float new_ev = log2f(expotimes[i]) - (min + 10); + expotimes[i] = exp2f(new_ev); + emit expotimeValueChanged(exp2f(new_ev), i); + } + } + //qDebug("HCM::END checkEVvalues"); } void HdrCreationManager::setEV(float new_ev, int image_idx) { - //qDebug("HCM::setEV image_idx=%d",image_idx); - if (expotimes[image_idx] == -1) { - //remove always the first one - //after the initial printing we only need to know the size of the list - filesLackingExif.removeAt(0); - //qDebug("HCM: fixed a expotime"); - } - //qDebug("HCM: setting expotimes[%d]=%f EV=%f", image_idx, exp2f(new_ev), new_ev); - expotimes[image_idx] = exp2f(new_ev); - emit expotimeValueChanged(exp2f(new_ev), image_idx); + if (expotimes[image_idx] == -1) { + //remove always the first one + //after the initial printing we only need to know the size of the list + filesLackingExif.removeAt(0); + } + expotimes[image_idx] = exp2f(new_ev); + emit expotimeValueChanged(exp2f(new_ev), image_idx); } pfs::Frame* HdrCreationManager::createHdr(bool ag, int iterations) { - //CREATE THE HDR - if (inputType == LDR_INPUT_TYPE) - return createHDR(expotimes.data(), &chosen_config, ag, iterations, true, &ldrImagesList ); - else - return createHDR(expotimes.data(), &chosen_config, ag, iterations, false, &listmdrR, &listmdrG, &listmdrB ); + //CREATE THE HDR + if (inputType == LDR_INPUT_TYPE) + return createHDR(expotimes.data(), &chosen_config, ag, iterations, true, &ldrImagesList ); + else + return createHDR(expotimes.data(), &chosen_config, ag, iterations, false, &listmdrR, &listmdrG, &listmdrB ); } HdrCreationManager::~HdrCreationManager() { - if (ais != NULL && ais->state() != QProcess::NotRunning) { - ais->kill(); - } - clearlists(true); + if (ais != NULL && ais->state() != QProcess::NotRunning) { + ais->kill(); + } + clearlists(true); + qDeleteAll(antiGhostingMasksList); } void HdrCreationManager::clearlists(bool deleteExpotimeAsWell) { - startedProcessing.clear(); - filesLackingExif.clear(); + startedProcessing.clear(); + filesLackingExif.clear(); if (deleteExpotimeAsWell) { - fileList.clear(); - expotimes.clear(); - } + fileList.clear(); + expotimes.clear(); + } if (ldrImagesList.size() != 0) { - //qDebug("HCM: clearlists: cleaning LDR exposures list"); - for (int i = 0 ; i < ldrImagesList.size(); i++) - { -// if (tiffLdrList[i]) -// { -// //qDebug("HCM: clearlists: freeing ldr tiffs' payload."); -// //delete [] ldrImagesList[i]->bits(); -// } - } - qDeleteAll(ldrImagesList); - ldrImagesList.clear(); -// tiffLdrList.clear(); - } + qDeleteAll(ldrImagesList); + ldrImagesList.clear(); + qDeleteAll(antiGhostingMasksList); + antiGhostingMasksList.clear(); + } if (listmdrR.size()!=0 && listmdrG.size()!=0 && listmdrB.size()!=0) { - //qDebug("HCM: cleaning HDR exposures list"); - Array2DList::iterator itR=listmdrR.begin(), itG=listmdrG.begin(), itB=listmdrB.begin(); + Array2DfList::iterator itR=listmdrR.begin(), itG=listmdrG.begin(), itB=listmdrB.begin(); for (; itR!=listmdrR.end(); itR++,itG++,itB++ ) { delete *itR; delete *itG; delete *itB; - } + } listmdrR.clear(); listmdrG.clear(); listmdrB.clear(); - qDeleteAll(mdrImagesList); - mdrImagesList.clear(); - qDeleteAll(mdrImagesToRemove); - mdrImagesToRemove.clear(); - } + qDeleteAll(mdrImagesList); + mdrImagesList.clear(); + qDeleteAll(mdrImagesToRemove); + mdrImagesToRemove.clear(); + qDeleteAll(antiGhostingMasksList); + antiGhostingMasksList.clear(); + } } void HdrCreationManager::makeSureLDRsHaveAlpha() { - if (ldrImagesList.at(0)->format()==QImage::Format_RGB32) { - int origlistsize = ldrImagesList.size(); - for (int image_idx = 0; image_idx < origlistsize; image_idx++) { - QImage *newimage = new QImage(ldrImagesList.at(0)->convertToFormat(QImage::Format_ARGB32)); - if (newimage == NULL) - exit(1); // TODO: exit gracefully; - ldrImagesList.append(newimage); -// if (tiffLdrList[0]) { -// //delete [] ldrImagesList[0]->bits(); -// } - delete ldrImagesList.takeAt(0); -// tiffLdrList.removeAt(0); -// tiffLdrList.append(false); - } - } -} - -void HdrCreationManager::applyShiftsToImageStack(const QList< QPair >& HV_offsets) -{ - int originalsize = ldrImagesList.count(); - //shift the images - for (int i = 0; i < originalsize; i++) { - //qDebug("%d,%d",HV_offsets[i].first,HV_offsets[i].second); - if (HV_offsets[i].first == HV_offsets[i].second && HV_offsets[i].first == 0) - continue; - //qDebug("shifting image %d of (%d,%d)",i, HV_offsets[i].first, HV_offsets[i].second); - QImage *shifted = shiftQImage(ldrImagesList[i], HV_offsets[i].first, HV_offsets[i].second); -// if (tiffLdrList[i]) { -// //delete [] ldrImagesList[i]->bits(); -// } - delete ldrImagesList.takeAt(i); - ldrImagesList.insert(i, shifted); -// tiffLdrList.removeAt(i); -// tiffLdrList.insert(i,false); - } -} - -void HdrCreationManager::applyShiftsToMdrImageStack(const QList< QPair >& HV_offsets) -{ - qDebug() << "HdrCreationManager::applyShiftsToMdrImageStack"; - int originalsize = mdrImagesList.count(); - for (int i = 0; i < originalsize; i++) { - if (HV_offsets[i].first == HV_offsets[i].second && HV_offsets[i].first == 0) - continue; - pfs::Array2D *shiftedR = shiftPfsArray2D(listmdrR[i], HV_offsets[i].first, HV_offsets[i].second); - pfs::Array2D *shiftedG = shiftPfsArray2D(listmdrG[i], HV_offsets[i].first, HV_offsets[i].second); - pfs::Array2D *shiftedB = shiftPfsArray2D(listmdrB[i], HV_offsets[i].first, HV_offsets[i].second); - delete listmdrR[i]; - delete listmdrG[i]; - delete listmdrB[i]; - listmdrR[i] = shiftedR; - listmdrG[i] = shiftedG; - listmdrB[i] = shiftedB; - } + if (ldrImagesList.at(0)->format()==QImage::Format_RGB32) { + int origlistsize = ldrImagesList.size(); + for (int image_idx = 0; image_idx < origlistsize; image_idx++) { + QImage *newimage = new QImage(ldrImagesList.at(0)->convertToFormat(QImage::Format_ARGB32)); + if (newimage == NULL) + exit(1); // TODO: exit gracefully; + ldrImagesList.append(newimage); + delete ldrImagesList.takeAt(0); + } + } +} + +void HdrCreationManager::applyShiftsToImageStack(const QList >& hvOffsets) +{ + int originalsize = ldrImagesList.count(); + //shift the images + for (int i = 0; i < originalsize; i++) + { + if ( hvOffsets[i].first == hvOffsets[i].second && + hvOffsets[i].first == 0 ) + { + continue; + } + QImage *shifted = shiftQImage(ldrImagesList[i], + hvOffsets[i].first, + hvOffsets[i].second); + delete ldrImagesList.takeAt(i); + ldrImagesList.insert(i, shifted); + } +} + +void HdrCreationManager::applyShiftsToMdrImageStack(const QList >& hvOffsets) +{ + qDebug() << "HdrCreationManager::applyShiftsToMdrImageStack"; + int originalsize = mdrImagesList.count(); + for (int i = 0; i < originalsize; i++) + { + if ( hvOffsets[i].first == hvOffsets[i].second && + hvOffsets[i].first == 0 ) + { + continue; + } + pfs::Array2Df *shiftedR = shift(*listmdrR[i], + hvOffsets[i].first, + hvOffsets[i].second); + pfs::Array2Df *shiftedG = shift(*listmdrG[i], + hvOffsets[i].first, + hvOffsets[i].second); + pfs::Array2Df *shiftedB = shift(*listmdrB[i], + hvOffsets[i].first, + hvOffsets[i].second); + delete listmdrR[i]; + delete listmdrG[i]; + delete listmdrB[i]; + listmdrR[i] = shiftedR; + listmdrG[i] = shiftedG; + listmdrB[i] = shiftedB; + } } void HdrCreationManager::cropLDR(const QRect& ca) { - //qDebug("cropping left,top=(%d,%d) %dx%d",ca.left(),ca.top(),ca.width(),ca.height()); - //crop all the images - int origlistsize = ldrImagesList.size(); - for (int image_idx = 0; image_idx < origlistsize; image_idx++) { - QImage *newimage = new QImage(ldrImagesList.at(0)->copy(ca)); - if (newimage == NULL) - exit(1); // TODO: exit gracefully - ldrImagesList.append(newimage); -// if (tiffLdrList[0]) -// { -// //delete [] ldrImagesList[0]->bits(); -// } - delete ldrImagesList.takeAt(0); -// tiffLdrList.removeAt(0); -// tiffLdrList.append(false); - } + //crop all the images + int origlistsize = ldrImagesList.size(); + for (int image_idx = 0; image_idx < origlistsize; image_idx++) { + QImage *newimage = new QImage(ldrImagesList.at(0)->copy(ca)); + if (newimage == NULL) + exit(1); // TODO: exit gracefully + ldrImagesList.append(newimage); + delete ldrImagesList.takeAt(0); + } + cropAgMasks(ca); } void HdrCreationManager::cropMDR(const QRect& ca) { - //qDebug("cropping left,top=(%d,%d) %dx%d",ca.left(),ca.top(),ca.width(),ca.height()); - //crop all the images - pfs::DOMIO pfsio; - int origlistsize = listmdrR.size(); - for (int idx = 0; idx < origlistsize; idx++) { - pfs::Frame *frame = pfsio.createFrame( m_mdrWidth, m_mdrHeight ); - pfs::Channel *Xc, *Yc, *Zc; - frame->createXYZChannels( Xc, Yc, Zc ); - Xc->setChannelData(listmdrR[idx]); - Yc->setChannelData(listmdrG[idx]); - Zc->setChannelData(listmdrB[idx]); - int x_ul, y_ul, x_br, y_br; - ca.getCoords(&x_ul, &y_ul, &x_br, &y_br); - pfs::Frame *cropped_frame = pfs::pfscut(frame, x_ul, y_ul, x_br, y_br); - pfsio.freeFrame(frame); - pfs::Channel *R, *G, *B; - cropped_frame->getXYZChannels( R, G, B); - listmdrR[idx] = R->getChannelData(); - listmdrG[idx] = G->getChannelData(); - listmdrB[idx] = B->getChannelData(); - QImage *newimage = new QImage(mdrImagesList.at(0)->copy(ca)); - if (newimage == NULL) - exit(1); // TODO: exit gracefully - mdrImagesList.append(newimage); - mdrImagesToRemove.append(mdrImagesList.takeAt(0)); - } + int x_ul, y_ul, x_br, y_br; + ca.getCoords(&x_ul, &y_ul, &x_br, &y_br); + + int newWidth = x_br-x_ul; + int newHeight = y_br-y_ul; + + /* + // crop all the images + int origlistsize = listmdrR.size(); + pfs::Frame *frame; + pfs::Channel *Xc, *Yc, *Zc; + pfs::Frame *cropped_frame; + */ + + // all R channels + for ( size_t idx = 0; idx < listmdrR.size(); ++idx ) + { + pfs::Array2Df tmp( newWidth, newHeight ); + pfs::cut(listmdrR[idx], &tmp, x_ul, y_ul, x_br, y_br); + listmdrR[idx]->swap( tmp ); + } + + // all G channels + for ( size_t idx = 0; idx < listmdrG.size(); ++idx ) + { + pfs::Array2Df tmp( newWidth, newHeight ); + pfs::cut(listmdrG[idx], &tmp, x_ul, y_ul, x_br, y_br); + listmdrG[idx]->swap( tmp ); + } + + // all B channel + for ( size_t idx = 0; idx < listmdrB.size(); ++idx ) + { + pfs::Array2Df tmp( newWidth, newHeight ); + pfs::cut(listmdrB[idx], &tmp, x_ul, y_ul, x_br, y_br); + listmdrB[idx]->swap( tmp ); + } + + for ( int idx = 0; idx < mdrImagesList.size(); ++idx ) + { + /* + frame = pfs::DOMIO::createFrame( m_mdrWidth, m_mdrHeight ); + frame->createXYZChannels( Xc, Yc, Zc ); + Xc->setChannelData(listmdrR[idx]); + Yc->setChannelData(listmdrG[idx]); + Zc->setChannelData(listmdrB[idx]); + + cropped_frame = pfs::cut(frame, x_ul, y_ul, x_br, y_br); + + pfs::DOMIO::freeFrame(frame); + + pfs::Channel *R, *G, *B; + cropped_frame->getXYZChannels( R, G, B); + listmdrR[idx] = R->getChannelData(); + listmdrG[idx] = G->getChannelData(); + listmdrB[idx] = B->getChannelData(); + */ + + QImage *newimage = new QImage(mdrImagesList.at(0)->copy(ca)); + if (newimage == NULL) + exit(1); // TODO: exit gracefully + mdrImagesList.append(newimage); + mdrImagesToRemove.append(mdrImagesList.takeAt(0)); + QImage *img = new QImage(newWidth, newHeight, QImage::Format_ARGB32); + img->fill(qRgba(0,0,0,0)); + antiGhostingMasksList.append(img); + antiGhostingMasksList.takeAt(0); + } + m_mdrWidth = newWidth; + m_mdrHeight = newHeight; + cropAgMasks(ca); } void HdrCreationManager::reset() { - ais = NULL; - m_shift = 0; - chosen_config = predef_confs[0]; - inputType = UNKNOWN_INPUT_TYPE; - fileList.clear(); - clearlists(true); - removeTempFiles(); + ais = NULL; + m_shift = 0; + chosen_config = predef_confs[0]; + inputType = UNKNOWN_INPUT_TYPE; + fileList.clear(); + clearlists(true); + removeTempFiles(); } void HdrCreationManager::remove(int index) { - switch (inputType) { - case LDR_INPUT_TYPE: - { -// if (tiffLdrList[index]) { -// // delete [] ldrImagesList[index]->bits(); -// } - ldrImagesList.removeAt(index); -// tiffLdrList.removeAt(index); - } - break; - case MDR_INPUT_TYPE: - { - Array2DList::iterator itR = listmdrR.begin() + index; - delete *itR; - listmdrR.erase(itR); - - Array2DList::iterator itG = listmdrG.begin() + index; - delete *itG; - listmdrG.erase(itG); - - Array2DList::iterator itB = listmdrB.begin() + index; - delete *itB; - listmdrB.erase(itB); - - delete mdrImagesList[index]; - mdrImagesList.removeAt(index); - - QString fname = filesToRemove.at(index); - qDebug() << "void HdrCreationManager::remove(int index): filename " << fname; - QFile::remove(fname); - } - break; - // ...in this case, do nothing! - case UNKNOWN_INPUT_TYPE: - default:{} - break; - } - fileList.removeAt(index); - filesToRemove.remove(index); - expotimes.remove(index); - startedProcessing.removeAt(index); + switch (inputType) { + case LDR_INPUT_TYPE: + { + ldrImagesList.removeAt(index); + } + break; + case MDR_INPUT_TYPE: + { + Array2DfList::iterator itR = listmdrR.begin() + index; + delete *itR; + listmdrR.erase(itR); + + Array2DfList::iterator itG = listmdrG.begin() + index; + delete *itG; + listmdrG.erase(itG); + + Array2DfList::iterator itB = listmdrB.begin() + index; + delete *itB; + listmdrB.erase(itB); + + delete mdrImagesList[index]; + mdrImagesList.removeAt(index); + + QString fname = filesToRemove.at(index); + qDebug() << "void HdrCreationManager::remove(int index): filename " << fname; + QFile::remove(fname); + } + break; + // ...in this case, do nothing! + case UNKNOWN_INPUT_TYPE: + default:{} + break; + } + fileList.removeAt(index); + filesToRemove.remove(index); + expotimes.remove(index); + startedProcessing.removeAt(index); } void HdrCreationManager::readData() { - QByteArray data = ais->readAll(); - emit aisDataReady(data); + QByteArray data = ais->readAll(); + emit aisDataReady(data); +} + +namespace { + +inline float toFloat(int value) { + return (static_cast(value)/255.f); +} + +void interleavedToPlanar(const QImage* image, + pfs::Array2Df* r, pfs::Array2Df* g, pfs::Array2Df* b) +{ + for (int row = 0; row < image->height(); ++row) + { + const QRgb* data = reinterpret_cast(image->scanLine(row)); + pfs::Array2Df::iterator itRed = r->row_begin(row); + pfs::Array2Df::iterator itGreen = g->row_begin(row); + pfs::Array2Df::iterator itBlue = g->row_begin(row); + + for ( int col = 0; col < image->width(); ++col ) + { + *itRed++ = toFloat(qRed(*data)); + *itGreen++ = toFloat(qGreen(*data)); + *itBlue++ = toFloat(qBlue(*data)); + + ++data; + } + } +} +} // anonymous namespace + +void HdrCreationManager::saveLDRs(const QString& filename) +{ +#ifdef QT_DEBUG + qDebug() << "HdrCreationManager::saveLDRs"; +#endif + + for (int idx = 0, origlistsize = ldrImagesList.size(); idx < origlistsize; + ++idx) + { + QImage* currentImage = ldrImagesList[idx]; + + QString fname = filename + QString("_%1").arg(idx) + ".tiff"; + + pfs::Frame frame(currentImage->width(), currentImage->height()); + pfs::Channel* R; + pfs::Channel* G; + pfs::Channel* B; + frame.createXYZChannels(R, G, B); + interleavedToPlanar(currentImage, R, G, B); + + TiffWriter writer(QFile::encodeName(fname).constData()); + writer.write( frame, pfs::Params("tiff_mode", 1) ); + + // DAVIDE_TIFF + // TiffWriter writer(QFile::encodeName(fname).constData(), ldrImagesList[idx]); + // writer.write8bitTiff(); + + QFileInfo qfi(filename); + QString absoluteFileName = qfi.absoluteFilePath(); + QByteArray encodedName = QFile::encodeName(absoluteFileName + QString("_%1").arg(idx) + ".tiff"); + ExifOperations::copyExifData(QFile::encodeName(fileList[idx]).constData(), encodedName.constData(), false); + } + emit imagesSaved(); } void HdrCreationManager::saveMDRs(const QString& filename) { - qDebug() << "HdrCreationManager::saveMDRs"; - pfs::DOMIO pfsio; - int origlistsize = listmdrR.size(); +#ifdef QT_DEBUG + qDebug() << "HdrCreationManager::saveMDRs"; +#endif + + int origlistsize = listmdrR.size(); for (int idx = 0; idx < origlistsize; idx++) { - QString fname = filename + QString("_%1").arg(idx) + ".tiff"; - pfs::Frame *frame = pfsio.createFrame( m_mdrWidth, m_mdrHeight ); - pfs::Channel *Xc, *Yc, *Zc; - frame->createXYZChannels( Xc, Yc, Zc ); - Xc->setChannelData(listmdrR[idx]); - Yc->setChannelData(listmdrG[idx]); - Zc->setChannelData(listmdrB[idx]); - TiffWriter writer(QFile::encodeName(fname).constData(), frame); - writer.writePFSFrame16bitTiff(); - - QFileInfo qfi(filename); - QString absoluteFileName = qfi.absoluteFilePath(); - QByteArray encodedName = QFile::encodeName(absoluteFileName + QString("_%1").arg(idx) + ".tiff"); - ExifOperations::writeExifData(encodedName.constData(), "Edited Images", expotimes[idx]); - } - emit mdrSaved(); + QString fname = filename + QString("_%1").arg(idx) + ".tiff"; + +// pfs::Frame *frame = pfs::DOMIO::createFrame( m_mdrWidth, m_mdrHeight ); +// pfs::Channel *Xc, *Yc, *Zc; +// frame->createXYZChannels( Xc, Yc, Zc ); +// Xc->setChannelData(listmdrR[idx]); +// Yc->setChannelData(listmdrG[idx]); +// Zc->setChannelData(listmdrB[idx]); + +// TiffWriter writer(, frame); +// writer.writePFSFrame16bitTiff(); + + pfs::Frame frame( m_mdrWidth, m_mdrHeight ); + pfs::Channel* R; + pfs::Channel* G; + pfs::Channel* B; + frame.createXYZChannels(R, G, B); + + pfs::copy(listmdrR[idx], R); + pfs::copy(listmdrG[idx], G); + pfs::copy(listmdrB[idx], B); + + TiffWriter writer( QFile::encodeName(fname).constData() ); + // tiff_mode = 2 (16 bit tiff) + // min_luminance = 0 + // max_luminance = 2^16 - 1 + // note: this is due to the fact the reader do read the native + // data into float, without doing any conversion into the [0, 1] range + // (definitely something to think about when we touch the readers) + writer.write(frame, + pfs::Params("tiff_mode", 2) + ("min_luminance", (float)0) + ("max_luminance", (float)65535) ); + + QFileInfo qfi(filename); + QString absoluteFileName = qfi.absoluteFilePath(); + QByteArray encodedName = QFile::encodeName( + absoluteFileName + QString("_%1").arg(idx) + ".tiff"); + ExifOperations::copyExifData( + QFile::encodeName(fileList[idx]).constData(), + encodedName.constData(), false); + } + emit imagesSaved(); +} + +void HdrCreationManager::doAntiGhosting(int goodImageIndex) +{ + qDebug() << "HdrCreationManager::doAntiGhosting"; + if (inputType == LDR_INPUT_TYPE) + { + int origlistsize = ldrImagesList.size(); + for (int idx = 0; idx < origlistsize; idx++) + { + if (idx != goodImageIndex) + { + blend(*ldrImagesList[idx], + *ldrImagesList[goodImageIndex], + *antiGhostingMasksList[idx]); + } + } + } + else { + int origlistsize = listmdrR.size(); + for (int idx = 0; idx < origlistsize; idx++) + { + if (idx != goodImageIndex) + { + blend(*listmdrR[idx], *listmdrG[idx], *listmdrB[idx], + *listmdrR[goodImageIndex], + *listmdrG[goodImageIndex], + *listmdrB[goodImageIndex], + *antiGhostingMasksList[idx]); + } + } + } +} + +void HdrCreationManager::cropAgMasks(const QRect& ca) { + int origlistsize = antiGhostingMasksList.size(); + for (int image_idx = 0; image_idx < origlistsize; image_idx++) { + QImage *newimage = new QImage(antiGhostingMasksList.at(0)->copy(ca)); + if (newimage == NULL) + exit(1); // TODO: exit gracefully + antiGhostingMasksList.append(newimage); + delete antiGhostingMasksList.takeAt(0); + } } diff -Nru luminance-hdr-2.3.0/src/HdrCreation/HdrCreationManager.h luminance-hdr-2.3.1/src/HdrCreation/HdrCreationManager.h --- luminance-hdr-2.3.0/src/HdrCreation/HdrCreationManager.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/HdrCreationManager.h 2013-04-07 18:41:14.000000000 +0000 @@ -27,12 +27,14 @@ #ifndef HDRCREATIONMANAGER_H #define HDRCREATIONMANAGER_H +#include #include #include #include "Common/LuminanceOptions.h" #include "arch/math.h" #include "HdrCreation/createhdr.h" +#include "HdrCreation/createhdr_common.h" // Some other file expect this to be available const config_triple predef_confs[6]= { @@ -68,11 +70,13 @@ pfs::Frame* createHdr(bool ag, int iterations); + void set_ais_crop_flag(bool flag); void align_with_ais(); void align_with_mtb(); QList getLDRList() const {return ldrImagesList;} QList getMDRList() const {return mdrImagesList;} + QList getAntiGhostingMasksList() const {return antiGhostingMasksList;} QVector getExpotimes() const {return expotimes;} QStringList getFileList() const {return fileList;} bool inputImageType() const {return inputType;} @@ -95,18 +99,22 @@ void makeSureLDRsHaveAlpha(); void applyShiftsToImageStack(const QList< QPair >& HV_offsets); void applyShiftsToMdrImageStack(const QList< QPair >& HV_offsets); + void cropLDR(const QRect& ca); void cropMDR(const QRect& ca); - void reset(); + void cropAgMasks(const QRect& ca); + + void reset(); void remove(int index); - void setShift(int shift) - { - m_shift = shift; - } - void saveMDRs(const QString&); + void setShift(int shift) { m_shift = shift; } + void saveLDRs(const QString& filename); + void saveMDRs(const QString& filename); + void doAntiGhosting(int); + public slots: //remove temp 8or16 bit tiff files created by libRaw upon raw input. void removeTempFiles(); + signals: void finishedLoadingInputFiles(const QStringList& filesLackingExif); void errorWhileLoading(const QString& message); //also for !valid size @@ -122,23 +130,19 @@ void nextstep(int); void processed(); - void mdrSaved(); + void imagesSaved(); private: // List of input files (absolute pathnames) QStringList fileList; - // data structures that hold the input images' payload - // ldr input - QList ldrImagesList; - // QImages rappresenting a PFS frame for editing tools - QList mdrImagesList; - //QImages need to be deleted - QList mdrImagesToRemove; - // QList tiffLdrList; //tiff ldr input - Array2DList listmdrR; - Array2DList listmdrG; - Array2DList listmdrB; //mdr input - // if startedProcessing[i]==true, we started a thread for the i-th file + //data structures that hold the input images' payload + QList ldrImagesList; //ldr input + QList mdrImagesList; //QImages rappresenting a PFS frame for editing tools + QList mdrImagesToRemove; //QImages need to be deleted + QList antiGhostingMasksList; //QImages used for manual anti ghosting + QList tiffLdrList; //tiff ldr input + Array2DfList listmdrR,listmdrG,listmdrB; //mdr input + //if startedProcessing[i]==true, we started a thread for the i-th file QList startedProcessing; // time equivalent array (from exif data) // float *expotimes; @@ -152,18 +156,20 @@ QVector filesToRemove; // set to true as soon as we find out that we cannot load a file or when we find out that a file has a different width/height than the other previously loaded ones. // This variable prevents "incoming" threads to do anything. - bool loadingError; + bool m_loadingError; // number of running threads at any given time - int runningThreads; + int m_runningThreads; // cumulative number of successfully loaded files - int processedFiles; + int m_processedFiles; LuminanceOptions m_luminance_options; // align_image_stack QProcess *ais; + bool m_ais_crop_flag; + int m_shift; int m_mdrWidth; @@ -175,7 +181,7 @@ void newResult(int index, float expotime, const QString&); bool ldrsHaveSameSize(int, int); - bool mdrsHaveSameSize(int, int); + bool mdrsHaveSameSize(size_t, size_t); private slots: void ais_finished(int,QProcess::ExitStatus); diff -Nru luminance-hdr-2.3.0/src/HdrCreation/createhdr.cpp luminance-hdr-2.3.1/src/HdrCreation/createhdr.cpp --- luminance-hdr-2.3.0/src/HdrCreation/createhdr.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/createhdr.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -27,10 +27,14 @@ #include -#include "HdrCreation/createhdr.h" #include "Libpfs/frame.h" -#include "Libpfs/domio.h" +#include "HdrCreation/createhdr.h" +#include "HdrCreation/responses.h" +#include "HdrCreation/robertson02.h" +#include "HdrCreation/debevec.h" + +/* inline float max3( float a, float b, float c ) { float max = (a>b) ? a : b; return (c>max) ? c : max; @@ -45,51 +49,54 @@ float min = (a *listldr=NULL; - Array2DList *listhdrR=NULL; - Array2DList *listhdrG=NULL; - Array2DList *listhdrB=NULL; + // only one of these two is used by casting extra parameters: + // listldr is used when input is a list of jpegs (and LDR tiffs). + // listhdr is used when input is a list of hdrs (raw image formats, or HDR tiffs). + QList* listldr = NULL; + Array2DfList* listhdrR = NULL; + Array2DfList* listhdrG = NULL; + Array2DfList* listhdrB = NULL; va_list arg_pointer; va_start(arg_pointer,ldrinput); /* Initialize the argument list. */ - int opt_bpp; - float opt_gauss = 8.0f; - int width=-1; - int height=-1; - pfs::DOMIO pfsio; - - TWeight opt_weight = chosen_config->weights; - TResponse opt_response = chosen_config->response_curve; - TModel opt_model = chosen_config->model; - + int opt_bpp = 8; + int width = -1; + int height = -1; if (ldrinput) { - listldr=va_arg(arg_pointer,QList*); - width=(listldr->at(0))->width(); - height=(listldr->at(0))->height(); - opt_bpp=8; + listldr = va_arg(arg_pointer, QList*); + width = listldr->at(0)->width(); + height = listldr->at(0)->height(); + opt_bpp = 8; } else { - listhdrR=va_arg(arg_pointer,Array2DList*); - listhdrG=va_arg(arg_pointer,Array2DList*); - listhdrB=va_arg(arg_pointer,Array2DList*); - width =((*listhdrR)[0])->getCols(); - height=((*listhdrR)[0])->getRows(); - opt_bpp=16; + listhdrR = va_arg(arg_pointer, Array2DfList*); + listhdrG = va_arg(arg_pointer, Array2DfList*); + listhdrB = va_arg(arg_pointer, Array2DfList*); + width = listhdrR->at(0)->getCols(); + height = listhdrR->at(0)->getRows(); + opt_bpp = 16; } va_end(arg_pointer); /* Clean up. */ - //either 256(LDRs) or 65536(hdr RAW images). - const int M = (int) powf(2.0f, opt_bpp); - const int minResponse=0; - const int maxResponse=M; + TWeight opt_weight = chosen_config->weights; + TResponse opt_response = chosen_config->response_curve; + TModel opt_model = chosen_config->model; + + // either 256(LDRs) or 65536(hdr RAW images). + const int M = static_cast(1 << opt_bpp); + const int minResponse = 0; + const int maxResponse = M; // weighting function representing confidence in pixel values std::vector w(M); // float* w = new float[M]; @@ -165,79 +172,83 @@ weights_triangle(w.data(), M/*, minResponse, maxResponse*/); break; case GAUSSIAN: - weightsGauss(w.data(), M, minResponse, maxResponse, opt_gauss ); + weightsGauss(w.data(), M, minResponse, maxResponse, opt_gauss); break; case PLATEAU: exposure_weights_icip06(w.data(), M, minResponse, maxResponse); break; } // create channels for output - pfs::Frame *frameout = pfsio.createFrame(width, height); - pfs::Channel *Rj_, *Gj_, *Bj_; - frameout->createXYZChannels( Rj_, Gj_, Bj_ ); - - pfs::Array2D *Rj = Rj_->getChannelData(); - pfs::Array2D *Gj = Gj_->getChannelData(); - pfs::Array2D *Bj = Bj_->getChannelData(); + pfs::Frame *frameout = new pfs::Frame(width, height); + pfs::Channel *Rj, *Gj, *Bj; + frameout->createXYZChannels( Rj, Gj, Bj ); // camera response functions for each channel std::vector Ir(M); std::vector Ig(M); std::vector Ib(M); - //2) response curves, either predefined (log,gamma,lin,from_file) or calibration from the set of images. + // 2) response curves, either predefined (log, gamma, lin, from_file) or + // calibration from the set of images. switch( opt_response ) { case FROM_FILE: { - FILE* respfile = fopen(QFile::encodeName(chosen_config->LoadCurveFromFilename).constData(),"r"); + FILE* respfile = fopen(QFile::encodeName(chosen_config->LoadCurveFromFilename).constData(), "r"); // read camera response from file bool load_ok = responseLoad(respfile, Ir.data(), Ig.data(), Ib.data(), M); fclose(respfile); - if ( !load_ok) + if ( !load_ok ) { responseGamma(Ir.data(), M); responseGamma(Ig.data(), M); responseGamma(Ib.data(), M); } - } - break; + } break; case LINEAR: + { responseLinear(Ir.data(), M); responseLinear(Ig.data(), M); responseLinear(Ib.data(), M); - break; + } break; case GAMMA: + { responseGamma(Ir.data(), M); responseGamma(Ig.data(), M); responseGamma(Ib.data(), M); - break; + } break; case LOG10: + { responseLog10(Ir.data(), M); responseLog10(Ig.data(), M); responseLog10(Ib.data(), M); - break; + } break; case FROM_ROBERTSON: + { responseLinear(Ir.data(), M); responseLinear(Ig.data(), M); responseLinear(Ib.data(), M); - //call robertson02_getResponse method which computes both the Ir,Ig,Ib and the output HDR (i.e. its channels Rj,Gj,Bj). + // call robertson02_getResponse method which computes both the Ir,Ig,Ib + // and the output HDR (i.e. its channels Rj,Gj,Bj). if (ldrinput) { - robertson02_getResponse(Rj, arrayofexptime, Ir.data(), w.data(), M, 1, true, listldr); - robertson02_getResponse(Gj, arrayofexptime, Ig.data(), w.data(), M, 2, true, listldr); - robertson02_getResponse(Bj, arrayofexptime, Ib.data(), w.data(), M, 3, true, listldr); + robertson02_getResponse(*Rj, *Gj, *Bj, + arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, *listldr); } else { - robertson02_getResponse(Rj, arrayofexptime, Ir.data(), w.data(), M, 1, false, listhdrR); - robertson02_getResponse(Gj, arrayofexptime, Ig.data(), w.data(), M, 2, false, listhdrG); - robertson02_getResponse(Bj, arrayofexptime, Ib.data(), w.data(), M, 3, false, listhdrB); + robertson02_getResponse(*Rj, *Gj, *Bj, + arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, + *listhdrR, *listhdrG, *listhdrB); } - break; + } break; } - //save response curves if required (variable not empty) - if (chosen_config->SaveCurveToFilename != "") { - FILE * respfile=fopen(QFile::encodeName(chosen_config->SaveCurveToFilename).constData(), "w"); + // save response curves if required (variable not empty) + if ( !chosen_config->SaveCurveToFilename.isEmpty() ) { + FILE* respfile = fopen(QFile::encodeName(chosen_config->SaveCurveToFilename).constData(), "w"); responseSave(respfile, Ir.data(), Ig.data(), Ib.data(), M); fclose(respfile); } @@ -246,30 +257,43 @@ switch ( opt_model ) { case ROBERTSON: - // If model is robertson and user preference was to compute response curve from image dataset using robertson algorithm - // i.e. to calibrate, we are done, the robertson02_getResponse function has already computed the HDR (i.e. its channels). + { + // If model is robertson and user preference was to compute response + // curve from image dataset using robertson algorithm + // i.e. to calibrate, we are done, the robertson02_getResponse function + // has already computed the HDR (i.e. its channels). if ( opt_response == FROM_ROBERTSON) break; else { //apply robertson model if (ldrinput) { - robertson02_applyResponse(Rj, arrayofexptime, Ir.data(), w.data(), M, 1, true, listldr); - robertson02_applyResponse(Gj, arrayofexptime, Ig.data(), w.data(), M, 2, true, listldr); - robertson02_applyResponse(Bj, arrayofexptime, Ib.data(), w.data(), M, 3, true, listldr); + robertson02_applyResponse(*Rj, *Gj, *Bj, arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, *listldr); } else { - robertson02_applyResponse(Rj, arrayofexptime, Ir.data(), w.data(), M, 1, false, listhdrR); - robertson02_applyResponse(Gj, arrayofexptime, Ig.data(), w.data(), M, 2, false, listhdrG); - robertson02_applyResponse(Bj, arrayofexptime, Ib.data(), w.data(), M, 3, false, listhdrB); + robertson02_applyResponse(*Rj, *Gj, *Bj, arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, + *listhdrR, *listhdrG, *listhdrB); } } - break; + } break; case DEBEVEC: + { //apply debevec model - if (ldrinput) - debevec_applyResponse(arrayofexptime, Rj, Gj, Bj, Ir.data(), Ig.data(), Ib.data(), w.data(), M, true, listldr); - else - debevec_applyResponse(arrayofexptime, Rj, Gj, Bj, Ir.data(), Ig.data(), Ib.data(), w.data(), M, false, listhdrR, listhdrG, listhdrB); - break; + if (ldrinput) { + debevec_applyResponse(*Rj, *Gj, *Bj, + arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, *listldr); + } else { + debevec_applyResponse(*Rj, *Gj, *Bj, + arrayofexptime, + Ir.data(), Ig.data(), Ib.data(), + w.data(), M, + *listhdrR, *listhdrG, *listhdrB); + } + } break; } //end switch return frameout; diff -Nru luminance-hdr-2.3.0/src/HdrCreation/createhdr.h luminance-hdr-2.3.1/src/HdrCreation/createhdr.h --- luminance-hdr-2.3.0/src/HdrCreation/createhdr.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/createhdr.h 2013-04-07 18:41:14.000000000 +0000 @@ -30,10 +30,6 @@ #include -#include "HdrCreation/responses.h" -#include "HdrCreation/robertson02.h" -#include "HdrCreation/debevec.h" - namespace pfs { class Frame; } @@ -71,7 +67,7 @@ /** * @brief main hdr creation function. - * @brief it can either create an hdr from a qt list of LDRs (QtImage) or from a list of HDR data (raw formats, hdr tiffs). + * @brief it can either create an hdr from a qt list of LDRs (QImage) or from a list of HDR data (raw formats, hdr tiffs). * **/ pfs::Frame* createHDR(const float* const arrayofexptime, const config_triple* const chosen_config, bool antighosting, int iterations, bool ldrinput, ...); diff -Nru luminance-hdr-2.3.0/src/HdrCreation/createhdr_common.cpp luminance-hdr-2.3.1/src/HdrCreation/createhdr_common.cpp --- luminance-hdr-2.3.0/src/HdrCreation/createhdr_common.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/createhdr_common.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia + +void computeTrustRange(const float* w, int M, int& minM, int& maxM) +{ + for (int m = 0; m < M; ++m) { + if ( w[m] > 0 ) { + minM = m; + break; + } + } + + for (int m = M-1; m >= 0; --m) { + if ( w[m] > 0 ) { + maxM = m; + break; + } + } +} diff -Nru luminance-hdr-2.3.0/src/HdrCreation/createhdr_common.h luminance-hdr-2.3.1/src/HdrCreation/createhdr_common.h --- luminance-hdr-2.3.0/src/HdrCreation/createhdr_common.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/createhdr_common.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \brief Common declarations/functions for the HDR creation routines + +#ifndef CREATEHDR_COMMON_H +#define CREATEHDR_COMMON_H + +#include +#include + +///! \brief Container for images taken with different exposures +//struct Exposure +//{ +// float ti; // exposure value (eg time) +// pfs::Array2D* yi; // exposed pixel value (camera output) +//}; + +///! @brief Container for a list of exposures +// typedef std::vector ExposureList; +typedef std::vector Array2DfList; + +//! \brief Given a weight function in the vector \c w, computes the minimum +//! and the maximum index for the trusted range +void computeTrustRange(const float* w, int M, int& minM, int& maxM); + +#endif // CREATEHDR_COMMON_H diff -Nru luminance-hdr-2.3.0/src/HdrCreation/debevec.cpp luminance-hdr-2.3.1/src/HdrCreation/debevec.cpp --- luminance-hdr-2.3.0/src/HdrCreation/debevec.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/debevec.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** +/* * This file is a part of Luminance HDR package * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota + * 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 @@ -18,17 +19,30 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Giuseppe Rota */ +//! \author Giuseppe Rota +//! \author Davide Anastasia + #include +#include +#include +#include +#include + +#ifdef _OPENMP +#include +#endif + #include "HdrCreation/debevec.h" +#include "Libpfs/array2d.h" +/* //anti-saturation shouldn't be needed int debevec_applyResponse( const float * arrayofexptime, - pfs::Array2D* xj, const float* I1, - pfs::Array2D* yj, const float* I2, - pfs::Array2D* zj, const float* I3, + pfs::Array2Df* xj, const float* I1, + pfs::Array2Df* yj, const float* I2, + pfs::Array2Df* zj, const float* I3, const Array2DList &P, const bool ldrinput, ... ) { @@ -38,7 +52,7 @@ // Array2DList *listhdrG=NULL; // Array2DList *listhdrB=NULL; va_list arg_pointer; - va_start(arg_pointer,ldrinput); /* Initialize the argument list. */ + va_start(arg_pointer,ldrinput); // Initialize the argument list. // if (ldrinput) { //TODO hdr input... @@ -53,7 +67,7 @@ // // number of exposures // N = listhdrR->size(); // } - va_end(arg_pointer); /* Clean up. */ + va_end(arg_pointer); // Clean up. // frame size @@ -108,247 +122,248 @@ } return saturated_pixels; } +*/ +typedef std::vector VectorInt; - -int debevec_applyResponse( const float * arrayofexptime, - pfs::Array2D* xj, pfs::Array2D* yj, pfs::Array2D* zj, - const float* Ir, const float* Ig, const float* Ib, - const float* w, int M, - const bool ldrinput, ... ) +#ifdef NDEBUG +inline +#endif +int debevecBuildPixel(float& outRed, float& outGreen, float& outBlue, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int minM, int maxM, + const VectorInt& inReds, const VectorInt& inGreens, const VectorInt& inBlues) { - int N=-1; - int width=-1; - int height=-1; - QList *list=NULL; - Array2DList *listhdrR=NULL; - Array2DList *listhdrG=NULL; - Array2DList *listhdrB=NULL; - va_list arg_pointer; - va_start(arg_pointer,ldrinput); /* Initialize the argument list. */ - if (ldrinput) { - list=va_arg(arg_pointer,QList*); - // number of exposures - N = list->count(); - width=(list->at(0))->width(); - height=(list->at(0))->height(); - } - else { - listhdrR=va_arg(arg_pointer,Array2DList*); - listhdrG=va_arg(arg_pointer,Array2DList*); - listhdrB=va_arg(arg_pointer,Array2DList*); - // number of exposures - N = listhdrR->size(); - width =((*listhdrR)[0])->getCols(); - height=((*listhdrR)[0])->getRows(); + int N = inReds.size(); + int saturated_pixels = 0; + + float sumR = 0.0f; + float sumG = 0.0f; + float sumB = 0.0f; + float divR = 0.0f; + float divG = 0.0f; + float divB = 0.0f; + float maxti = boost::numeric::bounds::lowest(); + float minti = boost::numeric::bounds::highest(); + int index_for_whiteR = -1; + int index_for_whiteG = -1; + int index_for_whiteB = -1; + int index_for_blackR = -1; + int index_for_blackG = -1; + int index_for_blackB = -1; + + // for all exposures + for (int i = 0; i < N; ++i) + { + // pick the 3 channel values + int mR = inReds[i]; + int mG = inGreens[i]; + int mB = inBlues[i]; + float ti = arrayofexptime[i]; + + // if at least one of the color channel's values are in the bright + // "not-trusted zone" and we have min exposure time + if ( (mR > maxM || mG > maxM || mB > maxM) && (ti < minti) ) { + // update the indexes_for_whiteRGB, minti + index_for_whiteR = mR; + index_for_whiteG = mG; + index_for_whiteB = mB; + minti = ti; + } + + // if at least one of the color channel's values are in the dim + // "not-trusted zone" and we have max exposure time + if ( (mR < minM || mG < minM || mB < minM) && (ti > maxti) ) { + // update the indexes_for_blackRGB, maxti + index_for_blackR = mR; + index_for_blackG = mG; + index_for_blackB = mB; + maxti = ti; + } + float w_average=(w[mR] + w[mG] + w[mB])/3.0f; + sumR += w_average * Ir[mR] / float(ti); + divR += w_average; + sumG += w_average * Ig[mG] / float(ti); + divG += w_average; + sumB += w_average * Ib[mB] / float(ti); + divB += w_average; + + } // END for all the exposures + + if ( divR==0.0f || divG==0.0f || divB==0.0f ) { + saturated_pixels++; + if ( maxti > boost::numeric::bounds::lowest() ) { + sumR = Ir[index_for_blackR] / maxti; + sumG = Ig[index_for_blackG] / maxti; + sumB = Ib[index_for_blackB] / maxti; + divR = divG = divB = 1.0f; + } + if ( minti < boost::numeric::bounds::highest() ) { + sumR = Ir[index_for_whiteR] / minti; + sumG = Ig[index_for_whiteG] / minti; + sumB = Ib[index_for_whiteB] / minti; + divR = divG = divB = 1.0f; + } + } + + if ( divR != 0.0f && divG != 0.0f && divB != 0.0f ) { + outRed = sumR/divR; + outGreen = sumG/divG; + outBlue = sumB/divB; + } else { + // we shouldn't be here anyway... + outRed = 0.0f; + outGreen = 0.0f; + outBlue = 0.0f; } - va_end(arg_pointer); /* Clean up. */ + + return saturated_pixels; +} + +template +int debevecApplyResponseCore(pfs::Array2Df& xj, pfs::Array2Df& yj, pfs::Array2Df& zj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const InputDataAdapter& inputData) +{ + int N = inputData.numFrames(); + int width = xj.getCols(); + int height = xj.getRows(); // number of saturated pixels - int saturated_pixels = 0; + int saturatedPixels = 0; + // compute trust area weights int minM = 0; - for( int m=0 ; m0 ) { - minM = m; - break; - } int maxM = M-1; - for( int m=M-1 ; m>=0 ; m-- ) - if( w[m]>0 ) { - maxM = m; - break; + computeTrustRange(w, M, minM, maxM); + + // private variables for each thread... + VectorInt inputRed(N); + VectorInt inputGreen(N); + VectorInt inputBlue(N); + + // for all pixels +// #pragma omp parallel for reduction(+:saturatedPixels) \ +// private(inputRed, inputGreen, inputBlue) \ +// shared(xj, yj, zj, arrayofexptime, Ir, Ig, Ib, w, M, minM, maxM, N) + for (int j = 0; j < width*height; ++j) + { + // accumulate pixel values + for (int i = 0; i < N; ++i) + { + inputRed[i] = inputData.getRed(i, j); + inputGreen[i] = inputData.getGreen(i, j); + inputBlue[i] = inputData.getBlue(i, j); } - //////////////////////LDR INPUT - if (ldrinput) - // for all pixels - for( int j=0 ; jat(i) )->bits() ) + j ) ); - int mG = qGreen(* ( (QRgb*)( (list->at(i) )->bits() ) + j ) ); - int mB = qBlue(* ( (QRgb*)( (list->at(i) )->bits() ) + j ) ); - - float ti = arrayofexptime[i]; - - //if at least one of the color channel's values are in the bright "not-trusted zone" and we have min exposure time - if ( (mR>maxM || mG>maxM || mB>maxM) && (timaxti) ) { - //update the indexes_for_blackRGB, maxti - index_for_blackR=mR; - index_for_blackG=mG; - index_for_blackB=mB; - maxti=ti; - // saturated_exposure=true; - } - - // NOT NEEDED ANYMORE, I HOPE. - // //only if we managed not to end up in the white or black "not-trusted zone" for ALL the R,G and B channels, use the weighted average equation (for this exposure) - // if(!saturated_exposure) { - // //use (weighted average eq) only if we have a "ti" for the current exposure greater than the previous exposure's "ti" AND the RGB values are greater than those that we had in the previous exposure - // bool OK_to_increment=( (ti>prev_exposure_ti) && ( (mR>prev_mR) && (mG>prev_mG) && (mB>prev_mB) ) ); - // // OR we have a "ti" for the current exposure smaller than the previous exposure's "ti" AND the RGB values are smaller than those that we had in the previous exposure - // OK_to_increment=OK_to_increment || ( (ti-1e6f) { - sumR = Ir[index_for_blackR] / float(maxti); - sumG = Ig[index_for_blackG] / float(maxti); - sumB = Ib[index_for_blackB] / float(maxti); - divR = divG = divB = 1.0f; - } - if (minti<+1e6f) { - sumR = Ir[index_for_whiteR] / float(minti); - sumG = Ig[index_for_whiteG] / float(minti); - sumB = Ib[index_for_whiteB] / float(minti); - divR = divG = divB = 1.0f; - } - } - - if( divR!=0.0f && divG!=0.0f && divB!=0.0f ) { - (*xj)(j) = sumR/divR; - (*yj)(j) = sumG/divG; - (*zj)(j) = sumB/divB; - } else { - //we shouldn't be here anyway... - (*xj)(j) = 0.0f; - (*yj)(j) = 0.0f; - (*zj)(j) = 0.0f; - } - }//END for all pixels - else - ///////////////////////////////// HDR INPUT - // for all pixels - for( int j=0 ; jmaxM || mG>maxM || mB>maxM) && (timaxti) ) { - //update the indexes_for_blackRGB, maxti - index_for_blackR=mR; - index_for_blackG=mG; - index_for_blackB=mB; - maxti=ti; - } - float w_average=(w[mR]+w[mG]+w[mB])/3.0f; - sumR += w_average * Ir[mR] / float(ti); - divR += w_average; - sumG += w_average * Ig[mG] / float(ti); - divG += w_average; - sumB += w_average * Ib[mB] / float(ti); - divB += w_average; - - } //END for all the exposures - - if( divR==0.0f || divG==0.0f || divB==0.0f ) { - saturated_pixels++; - if (maxti>-1e6f) { - sumR = Ir[index_for_blackR] / float(maxti); - sumG = Ig[index_for_blackG] / float(maxti); - sumB = Ib[index_for_blackB] / float(maxti); - divR = divG = divB = 1.0f; - } - if (minti<+1e6f) { - sumR = Ir[index_for_whiteR] / float(minti); - sumG = Ig[index_for_whiteG] / float(minti); - sumB = Ib[index_for_whiteB] / float(minti); - divR = divG = divB = 1.0f; - } - } - - if( divR!=0.0f && divG!=0.0f && divB!=0.0f ) { - (*xj)(j) = sumR/divR; - (*yj)(j) = sumG/divG; - (*zj)(j) = sumB/divB; - } else { - //we shouldn't be here anyway... - (*xj)(j) = 0.0f; - (*yj)(j) = 0.0f; - (*zj)(j) = 0.0f; - } - }//END for all pixels - return saturated_pixels; + saturatedPixels += debevecBuildPixel(xj(j), yj(j), zj(j), + arrayofexptime, Ir, Ig, Ib, + w, minM, maxM, + inputRed, inputGreen, inputBlue); + } // all pixels + + return saturatedPixels; +} + +struct Array2DListAdapter +{ + Array2DListAdapter(const Array2DfList& listhdrR, + const Array2DfList& listhdrG, + const Array2DfList& listhdrB) + : m_listhdrR(listhdrR) + , m_listhdrG(listhdrG) + , m_listhdrB(listhdrB) + {} + + int numFrames() const { + return m_listhdrR.size(); + } + + int getRed(int frameIdx, int pixelIdx) const { + return static_cast( (*(m_listhdrR[frameIdx]))(pixelIdx) ); + } + + int getGreen(int frameIdx, int pixelIdx) const { + return static_cast( (*(m_listhdrG[frameIdx]))(pixelIdx) ); + } + + int getBlue(int frameIdx, int pixelIdx) const { + return static_cast( (*(m_listhdrB[frameIdx]))(pixelIdx) ); + } + +private: + const Array2DfList& m_listhdrR; + const Array2DfList& m_listhdrG; + const Array2DfList& m_listhdrB; +}; + +struct QImageQListAdapter +{ + QImageQListAdapter(const QList& list) + : m_list(list) + {} + + int numFrames() const { + return m_list.size(); + } + + int getRed(int frameIdx, int pixelIdx) const { + return qRed( reinterpret_cast(m_list.at(frameIdx)->bits())[pixelIdx] ); + } + + int getGreen(int frameIdx, int pixelIdx) const { + return qGreen( reinterpret_cast(m_list.at(frameIdx)->bits())[pixelIdx] ); + } + + int getBlue(int frameIdx, int pixelIdx) const { + return qBlue( reinterpret_cast(m_list.at(frameIdx)->bits())[pixelIdx] ); + } + +private: + const QList& m_list; +}; + +// LDR version +int debevec_applyResponse(pfs::Array2Df& xj, pfs::Array2Df& yj, pfs::Array2Df& zj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const QList& list) +{ +#ifndef NDEBUG + std::cerr << "debevec fusion, LDR\n"; +#endif + + assert(list.size() != 0); + assert(M == 256); + + return debevecApplyResponseCore(xj, yj, zj, + arrayofexptime, Ir, Ig, Ib, + w, M, + QImageQListAdapter(list)); +} + +// HDR version +int debevec_applyResponse(pfs::Array2Df& xj, pfs::Array2Df& yj, pfs::Array2Df& zj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB) +{ +#ifndef NDEBUG + std::cerr << "debevec fusion, HDR\n"; +#endif + + assert(listhdrR.size() != 0); + assert(listhdrB.size() == listhdrG.size()); + assert(listhdrB.size() == listhdrR.size()); + assert(M == (int)(1 << 16)); + + return debevecApplyResponseCore(xj, yj, zj, + arrayofexptime, Ir, Ig, Ib, + w, M, + Array2DListAdapter(listhdrR, listhdrG, listhdrB)); } diff -Nru luminance-hdr-2.3.0/src/HdrCreation/debevec.h luminance-hdr-2.3.1/src/HdrCreation/debevec.h --- luminance-hdr-2.3.0/src/HdrCreation/debevec.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/debevec.h 2013-04-07 18:41:14.000000000 +0000 @@ -18,47 +18,53 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Giuseppe Rota +//! \author Giuseppe Rota */ #include #include -#include "responses.h" +#include "HdrCreation/createhdr_common.h" -/** - * @brief Create HDR image by applying response curve to given images using Debevec model, simple model, using array of weights P, not checking for under/over exposed pixel values. - * - * @param list reference to input Qt list containing source exposures, channels RGB - * @param arrayofexptime array of floats containing equivalent exposure time (computed from time,f-value and ISO) - * @param xj [out] HDR image channel 1 - * @param yj [out] HDR image channel 2 - * @param zj [out] HDR image channel 3 - * @param I1 response curve for channel 1, to be found with robertson02 - * @param I2 response curve for channel 2, to be found with robertson02 - * @param I3 response curve for channel 3, to be found with robertson02 - * @param P width*height*#exposures array of weights - */ -int debevec_applyResponse( const float *arrayofexptime, - pfs::Array2D* xj, const float* I1, - pfs::Array2D* yj, const float* I2, - pfs::Array2D* zj, const float* I3, - const Array2DList &P, const bool ldrinput, ... ); +//! \brief Create HDR image by applying response curve to given images using Debevec model, simple model, using array of weights P, not checking for under/over exposed pixel values. +//! +//! \param list reference to input Qt list containing source exposures, channels RGB +//! \param arrayofexptime array of floats containing equivalent exposure time (computed from time,f-value and ISO) +//! \param xj [out] HDR image channel 1 +//! \param yj [out] HDR image channel 2 +//! \param zj [out] HDR image channel 3 +//! \param I1 response curve for channel 1, to be found with robertson02 +//! \param I2 response curve for channel 2, to be found with robertson02 +//! \param I3 response curve for channel 3, to be found with robertson02 +//! \param P width*height*#exposures array of weights +//! +//int debevec_applyResponse( const float *arrayofexptime, +// pfs::Array2D* xj, const float* I1, +// pfs::Array2D* yj, const float* I2, +// pfs::Array2D* zj, const float* I3, +// const Array2DList &P, const bool ldrinput, ... ); -/** - * @brief Create HDR image by applying response curve to given images using Debevec model, checking for under/over exposed pixel values. - * - * @param list reference to input Qt list containing source exposures, channels RGB - * @param arrayofexptime array of floats containing equivalent exposure time (computed from time,f-value and ISO) - * @param xj [out] HDR image channel 1 - * @param yj [out] HDR image channel 2 - * @param zj [out] HDR image channel 3 - * @param Ir response curve for channel 1, to be found with robertson02 - * @param Ig response curve for channel 2, to be found with robertson02 - * @param Ib response curve for channel 3, to be found with robertson02 - * @param w array of weights - * @param M lenght of w - */ -int debevec_applyResponse( const float * arrayofexptime, - pfs::Array2D* xj, pfs::Array2D* yj, pfs::Array2D* zj, - const float* Ir, const float* Ig, const float* Ib, - const float *w, int M, const bool ldrinput, ... ); +//! \brief Create HDR image by applying response curve to given images using Debevec model, checking for under/over exposed pixel values. +//! +//! \param list reference to input Qt list containing source exposures, channels RGB +//! \param arrayofexptime array of floats containing equivalent exposure time (computed from time,f-value and ISO) +//! \param xj [out] HDR image channel 1 +//! \param yj [out] HDR image channel 2 +//! \param zj [out] HDR image channel 3 +//! \param Ir response curve for channel 1, to be found with robertson02 +//! \param Ig response curve for channel 2, to be found with robertson02 +//! \param Ib response curve for channel 3, to be found with robertson02 +//! \param w array of weights +//! \param M lenght of w +//! +//! \note HDR version +int debevec_applyResponse(pfs::Array2Df& xj, pfs::Array2Df& yj, pfs::Array2Df& zj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB); +//! \note LDR version +int debevec_applyResponse(pfs::Array2Df& xj, pfs::Array2Df& yj, pfs::Array2Df& zj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const QList& list); diff -Nru luminance-hdr-2.3.0/src/HdrCreation/responses.h luminance-hdr-2.3.1/src/HdrCreation/responses.h --- luminance-hdr-2.3.0/src/HdrCreation/responses.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/responses.h 2013-04-07 18:41:14.000000000 +0000 @@ -31,26 +31,7 @@ #ifndef RESPONSES_H #define RESPONSES_H -#include - -#include -#include "Libpfs/array2d.h" - -/** - * @brief Container for images taken with different exposures - */ -struct Exposure -{ - float ti; // exposure value (eg time) - pfs::Array2D* yi; // exposed pixel value (camera output) -}; - - -/** - * @brief Container for a list of exposures - */ -typedef std::vector ExposureList; -typedef std::vector Array2DList; +#include /** * @brief Weighting function with "flat" distribution (as in icip06) diff -Nru luminance-hdr-2.3.0/src/HdrCreation/robertson02.cpp luminance-hdr-2.3.1/src/HdrCreation/robertson02.cpp --- luminance-hdr-2.3.0/src/HdrCreation/robertson02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/robertson02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -28,13 +28,13 @@ */ #include "arch/math.h" -#include "arch/minmax.h" +#include #include #include #include +#include -#include "HdrCreation/responses.h" #include "HdrCreation/robertson02.h" namespace { @@ -52,355 +52,392 @@ for (Mmin=0 ; Mmin0 && I[Mmax]==0 ; --Mmax); - //int Mmin = *std::min_element(I, I+M); - //int Mmax = *std::max_element(I, I+M); - int Mmid = Mmin+(Mmax-Mmin)/2; float mid = I[Mmid]; - // std::cerr << "robertson02: middle response, mid=" << mid - // << " [" << Mmid << "]" - // << " " << Mmin << ".." << Mmax << std::endl; +#ifndef NDEBUG + std::cerr << "robertson02: middle response, mid = " << mid + << " [" << Mmid << "]" + << " " << Mmin << ".." << Mmax << std::endl; +#endif - if( mid==0.0f ) - { + if ( mid == 0.0f ) { // find first non-zero middle response - while( Mmid ti && arrayofexptime[j] < ti_upper ) { + ti_upper = arrayofexptime[j]; + i_upper[i] = j; + } + if ( arrayofexptime[j] < ti && arrayofexptime[j] > ti_lower ) { + ti_lower = arrayofexptime[j]; + i_lower[i] = j; + } + } + } + // if ( i_lower[i] == -1 ) i_lower[i] = i; + // if ( i_upper[i] == -1 ) i_upper[i] = i; + } } -int robertson02_applyResponse( pfs::Array2D* xj, const float * arrayofexptime, - const float* I, const float* w, const int M, const int channelRGB, const bool ldrinput, ... ) { - - QList *listldr=NULL; - Array2DList *listhdr=NULL; - va_list arg_pointer; - va_start(arg_pointer,ldrinput); /* Initialize the argument list. */ - int N=-1; int width=-1; int height=-1; - - if (ldrinput) { - listldr=va_arg(arg_pointer,QList*); - // number of exposures - N = listldr->count(); - // frame size - width = (listldr->at(0))->width(); - height = (listldr->at(0))->height(); - } else { - listhdr=va_arg(arg_pointer,Array2DList*); - // number of exposures - N = listhdr->size(); - // frame size - width= ((*listhdr)[0])->getCols(); - height=((*listhdr)[0])->getRows(); +struct Array2DListAdapter +{ + Array2DListAdapter(const Array2DfList& listhdr, int /*channelNum*/) + : m_listhdr(listhdr) + {} + + int numFrames() const { + return m_listhdr.size(); + } + + int getSample(int frameIdx, int pixelIdx) const { + return static_cast( (*(m_listhdr[frameIdx]))(pixelIdx) ); + } + +private: + const Array2DfList& m_listhdr; +}; + +struct QImageQListAdapter +{ + QImageQListAdapter(const QList& listldr, int channelNum) + : m_listldr(listldr) + , m_ldrfp(s_pixelToChannel[channelNum]) + {} + + int numFrames() const { + return m_listldr.size(); + } + + int getSample(int frameIdx, int pixelIdx) const { + return m_ldrfp( reinterpret_cast(m_listldr.at(frameIdx)->bits())[pixelIdx] ); } - va_end(arg_pointer); /* Clean up. */ - - int (*ldrfp)(QRgb a)=NULL; - if (channelRGB==1) //R - ldrfp=&qRed; - else if (channelRGB==2) //G - ldrfp=&qGreen; - else - ldrfp=&qBlue; - + +private: + const QList& m_listldr; + PixelToChannelMapper m_ldrfp; +}; + +template +int robertson02ApplyResponseCore(pfs::Array2Df& xj, const float* arrayofexptime, + const float* I, const float* w, int M, + const InputDataAdapter& inputData) +{ + int N = inputData.numFrames(); + int width = xj.getCols(); + int height = xj.getRows(); + + // --- anti saturation: calculate trusted camera output range // number of saturated pixels int saturated_pixels = 0; - - // --- anti saturation: calculate trusted camera output range + int minM = 0; - for( int m=0 ; m0 ) { - minM = m; - break; - } int maxM = M-1; - for( int m=M-1 ; m>=0 ; m-- ) - if( w[m]>0 ) { - maxM = m; - break; - } - + computeTrustRange(w, M, minM, maxM); + // --- anti ghosting: for each image i, find images with // the immediately higher and lower exposure times - std::vector i_lower(N); // int* i_lower = new int[N]; - std::vector i_upper(N); // int* i_upper = new int[N]; + std::vector i_lower(N); + std::vector i_upper(N); + pseudoSort(arrayofexptime, i_lower.data(), i_upper.data(), N); - for( int i=0 ; iti && arrayofexptime[j]ti_lower ) - { - ti_lower=arrayofexptime[j]; - i_lower[i]=j; - } - } - if( i_lower[i]==-1 ) - i_lower[i]=i; - if( i_upper[i]==-1 ) - i_upper[i]=i; - } - // all pixels - for( int j=0 ; jat(i) )->bits() ) + j ) ); - float ti = arrayofexptime[i]; - // --- anti saturation: observe minimum exposure time at which - // saturated value is present, and maximum exp time at which - // black value is present - if( m>maxM ) - minti = fminf(minti,ti); - if( mat(i_lower[i]) )->bits() ) + j ) ); - int m_upper = ldrfp(* ( (QRgb*)( (listldr->at(i_upper[i]) )->bits() ) + j ) ); - if( m_lower>m || m_upper maxM ) { + minti = std::min(minti, ti); } - } - else - { - //for all exposures - for( int i=0 ; imaxM ) - minti = fminf(minti,ti); - if( mm || m_upper 1) { + if ( m_lower > m || m_upper < m ) { continue; - - sum += w[m] * ti * I[m]; - div += w[m] * ti * ti; + } } + + sum += w[m] * ti * I[m]; + div += w[m] * ti * ti; } - + // --- 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 ) { saturated_pixels++; - if( div==0.0f && maxti>-1e6f ) { + } + if ( div == 0.0f && maxti > -1e6f ) { sum = I[minM]; div = maxti; } - if( div==0.0f && minti<+1e6f ) { + if ( div == 0.0f && minti < +1e6f ) { sum = I[maxM]; div = minti; } - - if( div!=0.0f ) - (*xj)(j) = sum/div; - else - (*xj)(j) = 0.0f; + + if ( div != 0.0f ) { + xj(j) = sum/div; + } else { + xj(j) = 0.0f; + } } return saturated_pixels; } +inline +int robertson02_applyResponse(pfs::Array2Df& xj, const float* arrayofexptime, + const float* I, const float* w, int M, int channelRGB, + const Array2DfList& listhdr) +{ + return robertson02ApplyResponseCore(xj, arrayofexptime, I, w, M, + Array2DListAdapter(listhdr, channelRGB)); +} + +inline +int robertson02_applyResponse(pfs::Array2Df& xj, const float* arrayofexptime, + const float* I, const float* w, int M, int channelRGB, + const QList& listldr) +{ + assert(channelRGB >= 0); + assert(channelRGB <= 2); + + return robertson02ApplyResponseCore(xj, arrayofexptime, I, w, M, + QImageQListAdapter(listldr, channelRGB)); +} + //////////////////////////////// GET RESPONSE ///////////////////////////////////// -int robertson02_getResponse( pfs::Array2D* xj, const float * arrayofexptime, - float* I, const float* w, const int M, const int channelRGB, const bool ldrinput, ... ) +template +int robertson02GetResponseCore(pfs::Array2Df& xj, const float* arrayofexptime, + float* I, const float* w, int M, + const InputDataAdapter& inputData) { - va_list arg_pointer; - va_start(arg_pointer,ldrinput); /* Initialize the argument list. */ - QList *listldr=NULL; - Array2DList *listhdr=NULL; - - int N=-1; - int width=-1; - int height=-1; - - if (ldrinput) - { - listldr=va_arg(arg_pointer,QList*); - // number of exposures - N = listldr->count(); - // frame size - width = (listldr->at(0))->width(); - height = (listldr->at(0))->height(); - } - else - { - listhdr=va_arg(arg_pointer,Array2DList*); - // number of exposures - N = listhdr->size(); - // frame size - width= ((*listhdr)[0])->getCols(); - height=((*listhdr)[0])->getRows(); - } - va_end(arg_pointer); /* Clean up. */ - - int (*ldrfp)(QRgb a)=NULL; - if (channelRGB==1) //R - ldrfp=&qRed; - else if (channelRGB==2) //G - ldrfp=&qGreen; - else - ldrfp=&qBlue; - + int N = inputData.numFrames(); + int width = xj.getCols(); + int height = xj.getRows(); + // number of saturated pixels int saturated_pixels = 0; - - // indexes - int i,j,m; - + std::vector Ip(M); //float* Ip = new float[M]; // previous response - + // 0. Initialization normalizeI( I, M ); - for( m=0 ; m cardEm(M); // long* cardEm = new long[M]; std::vector sum(M); // float* sum = new float[M]; - + int cur_it = 0; - float pdelta= 0.0f; + float pdelta = 0.0f; while ( !converged ) { // 1. Minimize with respect to I - for( m=0 ; mat(i) )->bits() ) + j ) ); - if( m=0 ) { - sum[m] += ti * (*xj)(j); - cardEm[m]++; - } - else - std::cerr << "robertson02: m out of range: " << m << std::endl; - } - } else { - for( j=0 ; j=0 ) { - sum[m] += ti * (*xj)(j); - cardEm[m]++; - } - else - std::cerr << "robertson02: m out of range: " << m << std::endl; + // 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 (int j = 0; j < width*height; ++j) { + int sample = inputData.getSample(i, j); + if ( sample < M && sample >= 0 ) { + sum[sample] += ti * xj(j); + cardEm[sample]++; } +#ifndef NDEBUG + else + std::cerr << "robertson02: m out of range: " + << sample << std::endl; +#endif } } - - for( m=0 ; mMAXIT && pdelta MAXIT && pdelta < delta) ) { +#ifndef NDEBUG std::cerr << "algorithm failed to converge, too noisy data in range\n"; +#endif break; } - + pdelta = delta; cur_it++; } - +#ifndef NDEBUG if ( converged ) { std::cerr << " #" << cur_it << " delta=" << pdelta << " <- converged\n"; } - +#endif + return saturated_pixels; } + +inline +int robertson02_getResponse(pfs::Array2Df& xj, const float* arrayofexptime, + float* I, const float* w, int M, int channelRGB, + const Array2DfList& listhdr) +{ + return robertson02GetResponseCore(xj, arrayofexptime, I, w, M, + Array2DListAdapter(listhdr, channelRGB)); +} + +inline +int robertson02_getResponse(pfs::Array2Df& xj, const float* arrayofexptime, + float* I, const float* w, int M, int channelRGB, + const QList& listldr) +{ + assert(channelRGB >= 0); + assert(channelRGB <= 2); + + return robertson02GetResponseCore(xj, arrayofexptime, I, w, M, + QImageQListAdapter(listldr, channelRGB)); +} + +int robertson02_applyResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB) +{ + int saturatedPixels = 0; + saturatedPixels += robertson02_applyResponse(Rj, arrayofexptime, Ir, w, M, 0, listhdrR); + saturatedPixels += robertson02_applyResponse(Gj, arrayofexptime, Ig, w, M, 1, listhdrG); + saturatedPixels += robertson02_applyResponse(Bj, arrayofexptime, Ib, w, M, 2, listhdrB); + + return saturatedPixels; +} + +//! \note LDR version +int robertson02_applyResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const QList& listldr) +{ + int saturatedPixels = 0; + saturatedPixels += robertson02_applyResponse(Rj, arrayofexptime, Ir, w, M, 0, listldr); + saturatedPixels += robertson02_applyResponse(Gj, arrayofexptime, Ig, w, M, 1, listldr); + saturatedPixels += robertson02_applyResponse(Bj, arrayofexptime, Ib, w, M, 2, listldr); + + return saturatedPixels; +} + +int robertson02_getResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + float* Ir, float* Ig, float* Ib, + const float* w, int M, + const QList& listldr) +{ + int saturatedPixels = 0; + saturatedPixels += robertson02_getResponse(Rj, arrayofexptime, Ir, w, M, 0, listldr); + saturatedPixels += robertson02_getResponse(Gj, arrayofexptime, Ig, w, M, 1, listldr); + saturatedPixels += robertson02_getResponse(Bj, arrayofexptime, Ib, w, M, 2, listldr); + + return saturatedPixels; +} + +int robertson02_getResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + float* Ir, float* Ig, float* Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB) +{ + int saturatedPixels = 0; + saturatedPixels += robertson02_getResponse(Rj, arrayofexptime, Ir, w, M, 0, listhdrR); + saturatedPixels += robertson02_getResponse(Gj, arrayofexptime, Ig, w, M, 1, listhdrG); + saturatedPixels += robertson02_getResponse(Bj, arrayofexptime, Ib, w, M, 2, listhdrB); + + return saturatedPixels; +} diff -Nru luminance-hdr-2.3.0/src/HdrCreation/robertson02.h luminance-hdr-2.3.1/src/HdrCreation/robertson02.h --- luminance-hdr-2.3.0/src/HdrCreation/robertson02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrCreation/robertson02.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,32 +32,53 @@ #include #include -#include "responses.h" -/** - * @brief Create HDR image by applying response curve to given images taken with different exposures - * - * @param xj [out] HDR image - * @param imgs reference to vector containing source exposures - * @param I camera response function (array size of M) - * @param w weighting function for camera output values (array size of M) - * @param M number of camera output levels - * @return number of saturated pixels in the HDR image (0: all OK) - */ -int robertson02_applyResponse( pfs::Array2D* xj, const float * arrayofexptime, - const float* I, const float* w, const int M, const int chan, const bool ldrinput, ... ); - -/** - * @brief Calculate camera response using Robertson02 algorithm - * - * @param xj [out] estimated luminance values - * @param imgs reference to vector containing source exposures - * @param I [out] array to put response function - * @param w weights - * @param M max camera output (no of discrete steps) - * @return number of saturated pixels in the HDR image (0: all OK) - */ -int robertson02_getResponse( pfs::Array2D* xj, const float * arrayofexptime, - float* I, const float* w, const int M, const int chan, const bool ldrinput, ... ); +#include "Libpfs/array2d.h" + +#include "HdrCreation/createhdr_common.h" + +//* +// * @brief Create HDR image by applying response curve to given images taken with different exposures +// * +// * @param xj [out] HDR image +// * @param imgs reference to vector containing source exposures +// * @param I camera response function (array size of M) +// * @param w weighting function for camera output values (array size of M) +// * @param M number of camera output levels +// * @return number of saturated pixels in the HDR image (0: all OK) +// +int robertson02_applyResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB); +//! \note LDR version +int robertson02_applyResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + const float* Ir, const float* Ig, const float* Ib, + const float* w, int M, + const QList& listldr); + +//* +// * @brief Calculate camera response using Robertson02 algorithm +// * +// * @param xj [out] estimated luminance values +// * @param imgs reference to vector containing source exposures +// * @param I [out] array to put response function +// * @param w weights +// * @param M max camera output (no of discrete steps) +// * @return number of saturated pixels in the HDR image (0: all OK) +// +int robertson02_getResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + float *Ir, float *Ig, float *Ib, + const float* w, int M, + const QList& list); + +int robertson02_getResponse(pfs::Array2Df& Rj, pfs::Array2Df& Gj, pfs::Array2Df& Bj, + const float* arrayofexptime, + float *Ir, float *Ig, float *Ib, + const float* w, int M, + const Array2DfList& listhdrR, const Array2DfList& listhdrG, const Array2DfList& listhdrB); #endif // ROBERTSON02_H diff -Nru luminance-hdr-2.3.0/src/HdrWizard/AntiGhostingWidget.cpp luminance-hdr-2.3.1/src/HdrWizard/AntiGhostingWidget.cpp --- luminance-hdr-2.3.0/src/HdrWizard/AntiGhostingWidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/AntiGhostingWidget.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,280 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 "AntiGhostingWidget.h" + +AntiGhostingWidget::AntiGhostingWidget(QWidget *parent, QImage *mask): + QWidget(parent), + m_agMask(mask), + m_savedMask(NULL), + m_agcursorPixmap(NULL), + m_mx(0), + m_my(0), + m_drawingMode(BRUSH) +{ + qDebug() << "AntiGhostingWidget::AntiGhostingWidget"; + //set internal brush values to their default + m_brushAddMode = true; + setBrushSize(32); + m_previousPixmapSize = -1; + setBrushStrength(255); + m_previousPixmapStrength = -1; + m_previousPixmapColor = QColor(); + fillAntiGhostingCursorPixmap(); + setMouseTracking(true); +} + +AntiGhostingWidget::~AntiGhostingWidget() +{ + qDebug() << "~AntiGhostingWidget::AntiGhostingWidget"; + if (m_agcursorPixmap) + delete m_agcursorPixmap; + if (m_savedMask) + delete m_savedMask; +} + +void AntiGhostingWidget::paintEvent(QPaintEvent *event) +{ + QRect paintrect = event->rect(); + QRect srcrect = QRect(paintrect.topLeft().x()/m_scaleFactor - m_mx, paintrect.topLeft().y()/m_scaleFactor - m_my, paintrect.width()/m_scaleFactor, paintrect.height()/m_scaleFactor); + QPainter p(this); + p.drawImage(paintrect, *m_agMask, srcrect); +} + +void AntiGhostingWidget::mousePressEvent(QMouseEvent *event) +{ + if (event->buttons() == Qt::MidButton) { + QApplication::setOverrideCursor( QCursor(Qt::ClosedHandCursor) ); + m_mousePos = event->globalPos(); + } + else if (event->buttons() == Qt::LeftButton) { + if (m_drawingMode == PATH) { + QPoint relativeToWidget = event->pos(); + int sx = relativeToWidget.x()/m_scaleFactor - m_mx; + int sy = relativeToWidget.y()/m_scaleFactor - m_my; + QPoint scaled(sx,sy); + m_firstPoint = m_lastPoint = m_currentPoint = scaled; + m_path = QPainterPath(m_firstPoint); + m_drawingPathEnded = false; + } + m_timerid = this->startTimer(0); + } + event->ignore(); +} + +void AntiGhostingWidget::mouseMoveEvent(QMouseEvent *event) +{ + if (event->buttons() == Qt::MidButton) { + //moving mouse with middle button pans the preview + QPoint diff = (event->globalPos() - m_mousePos); + if (event->modifiers() == Qt::ShiftModifier) + diff *= 5; + emit moved(diff); + m_mousePos = event->globalPos(); + } + else if (event->buttons() == Qt::LeftButton && m_drawingMode == PATH) { + QPoint relativeToWidget = event->pos(); + int sx = relativeToWidget.x()/m_scaleFactor - m_mx; + int sy = relativeToWidget.y()/m_scaleFactor - m_my; + QPoint scaled(sx,sy); + m_currentPoint = scaled; + } + event->ignore(); +} + +void AntiGhostingWidget::mouseReleaseEvent(QMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) { + this->killTimer(m_timerid); + if (m_drawingMode == PATH) { + m_path.lineTo(m_firstPoint); + m_drawingPathEnded = true; + drawPath(); + } + } + else if (event->button() == Qt::MidButton) { + QApplication::restoreOverrideCursor(); + if (m_drawingMode == BRUSH) { + fillAntiGhostingCursorPixmap(); + this->unsetCursor(); + this->setCursor(*m_agcursorPixmap); + } + else { + this->unsetCursor(); + this->setCursor( QCursor(Qt::CrossCursor) ); + } + } + event->ignore(); +} + +void AntiGhostingWidget::resizeEvent(QResizeEvent *event) +{ + m_scaleFactor = (float)(event->size().width())/(float)(m_agMask->size().width()); +} + +void AntiGhostingWidget::timerEvent(QTimerEvent *) +{ + (m_drawingMode == BRUSH) ? drawWithBrush() : drawPath(); +} + +void AntiGhostingWidget::drawWithBrush() +{ + QPoint relativeToWidget = mapFromGlobal(QCursor::pos()); + int sx = relativeToWidget.x()/m_scaleFactor - m_mx; + int sy = relativeToWidget.y()/m_scaleFactor - m_my; + QPoint scaled(sx,sy); + QPainter p(m_agMask); + p.setPen(Qt::NoPen); + p.setBrush(QBrush(m_requestedPixmapColor, Qt::SolidPattern)); + if (!m_brushAddMode) + p.setCompositionMode(QPainter::CompositionMode_Clear); + int pixSize = m_requestedPixmapSize/(2*m_scaleFactor); + p.drawEllipse(scaled, pixSize, pixSize); + update(); +} + +void AntiGhostingWidget::drawPath() +{ + QPainter painter(m_agMask); + 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.drawPath(m_path); + if (m_brushAddMode) + painter.setCompositionMode(QPainter::CompositionMode_SourceOver); + painter.fillPath(m_path, m_requestedPixmapColor); + if (m_brushAddMode) { // redraw the path + painter.setPen(QPen(m_requestedPixmapColor, 0, Qt::SolidLine, + Qt::FlatCap, Qt::MiterJoin)); + painter.setCompositionMode(QPainter::CompositionMode_SourceOver); + painter.drawPath(m_path); + } + } + else { + m_path.lineTo(m_lastPoint); + m_lastPoint = m_currentPoint; + painter.drawPath(m_path); + } + update(); +} + +void AntiGhostingWidget::setDrawWithBrush() +{ + m_drawingMode = BRUSH; + unsetCursor(); + fillAntiGhostingCursorPixmap(); +} + +void AntiGhostingWidget::setDrawPath() +{ + m_drawingMode = PATH; + unsetCursor(); + setCursor(Qt::CrossCursor); +} + +void AntiGhostingWidget::setBrushSize (const int newsize) { + m_requestedPixmapSize = newsize; +} + +void AntiGhostingWidget::setBrushMode(bool removemode) { + m_requestedPixmapStrength *= -1; + m_brushAddMode = !removemode; +} + +void AntiGhostingWidget::setBrushStrength (const int newstrength) { + m_requestedPixmapStrength = newstrength; + m_requestedPixmapColor.setAlpha(qMax(60,m_requestedPixmapStrength)); + m_requestedPixmapStrength *= (!m_brushAddMode) ? -1 : 1; +} + +void AntiGhostingWidget::setBrushColor (const QColor newcolor) { + m_requestedPixmapColor = newcolor; + update(); +} + +void AntiGhostingWidget::setLassoColor (const QColor newcolor) { + m_requestedLassoColor = newcolor; + update(); +} + + +void AntiGhostingWidget::enterEvent(QEvent *) { + if (m_drawingMode == BRUSH) { + fillAntiGhostingCursorPixmap(); + this->unsetCursor(); + this->setCursor(*m_agcursorPixmap); + } +} + +void AntiGhostingWidget::switchAntighostingMode(bool ag) { + if (ag) { + if (m_drawingMode == BRUSH) + this->setCursor(*m_agcursorPixmap); + else + this->setCursor(Qt::CrossCursor); + } else { + this->unsetCursor(); + } +} + +void AntiGhostingWidget::fillAntiGhostingCursorPixmap() { + 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->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); +} + +void AntiGhostingWidget::updateVertShift(int v) { + m_my = v; +} + +void AntiGhostingWidget::updateHorizShift(int h) { + m_mx = h; +} + +void AntiGhostingWidget::saveAgMask() +{ + if (m_savedMask) + delete m_savedMask; + m_savedMask = new QImage(*m_agMask); +} + +QImage * AntiGhostingWidget::getSavedAgMask() +{ + return m_savedMask; +} diff -Nru luminance-hdr-2.3.0/src/HdrWizard/AntiGhostingWidget.h luminance-hdr-2.3.1/src/HdrWizard/AntiGhostingWidget.h --- luminance-hdr-2.3.0/src/HdrWizard/AntiGhostingWidget.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/AntiGhostingWidget.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,107 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 ANTIGHOSTINGWIDGET_H +#define ANTIGHOSTINGWIDGET_H + +#include +#include +#include +#include +#include +#include + +class AntiGhostingWidget : public QWidget +{ +Q_OBJECT +public: + AntiGhostingWidget(QWidget *parent, QImage *mask); + ~AntiGhostingWidget(); + + QSize sizeHint () const { + return m_agMask->size(); + } + + void setMask(QImage *mask) { + m_agMask = mask; + m_mx = m_my = 0; + } + + void setHV_offset(QPair HV_offset) { + m_mx = HV_offset.first; + m_my = HV_offset.second; + } + + void updateVertShift(int); + void updateHorizShift(int); + + void setDrawWithBrush(); + void setDrawPath(); +public slots: + void switchAntighostingMode(bool); + void setBrushSize(const int); + void setBrushStrength(const int); + void setBrushColor(const QColor); + void setLassoColor(const QColor); + void setBrushMode(bool); + void saveAgMask(); + QImage *getSavedAgMask(); + +protected: + void paintEvent(QPaintEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void resizeEvent(QResizeEvent *event); + void enterEvent(QEvent *event); + void timerEvent(QTimerEvent *event); + +private: + QImage *m_agMask; + QImage *m_savedMask; + QPoint m_mousePos; + 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. + void fillAntiGhostingCursorPixmap(); + void drawWithBrush(); + void drawPath(); + + float m_scaleFactor; + int m_mx, m_my; + + QPoint m_firstPoint; + QPoint m_lastPoint; + QPoint m_currentPoint; + QPainterPath m_path; + bool m_drawingPathEnded; + + enum {BRUSH, PATH} m_drawingMode; +signals: + void moved(QPoint diff); +}; + +#endif diff -Nru luminance-hdr-2.3.0/src/HdrWizard/CMakeLists.txt luminance-hdr-2.3.1/src/HdrWizard/CMakeLists.txt --- luminance-hdr-2.3.0/src/HdrWizard/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -4,13 +4,15 @@ SET(FILES_H ${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}/AntiGhostingWidget.h) SET(FILES_HXX ) SET(FILES_CPP ${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}/AntiGhostingWidget.cpp) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff -Nru luminance-hdr-2.3.0/src/HdrWizard/EditingTools.cpp luminance-hdr-2.3.1/src/HdrWizard/EditingTools.cpp --- luminance-hdr-2.3.0/src/HdrWizard/EditingTools.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/EditingTools.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -3,24 +3,24 @@ * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota * - * 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 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. + * 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 + * 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 * ---------------------------------------------------------------------- * * Original Work * @author Giuseppe Rota - * Improvements, bugfixing + * Improvements, bugfixing, anti ghosting * @author Franco Comida * */ @@ -30,454 +30,632 @@ #include #include #include +#include #include "Common/config.h" #include "UI/GammaAndLevels.h" #include "Viewers/PanIconWidget.h" -#include "Fileformat/pfstiff.h" +#include "Fileformat/tiffreader.h" #include "HdrWizard/EditingTools.h" #include "Exif/ExifOperations.h" #include "HdrCreation/mtb_alignment.h" EditingTools::EditingTools(HdrCreationManager *hcm, QWidget *parent) : QDialog(parent), - additional_shift_value(0), - m_MdrSaved(false) + m_hcm(hcm), + m_additionalShiftValue(0), + m_imagesSaved(false), + m_goodImageIndex(-1), + m_antiGhosting(false) { - setupUi(this); + setupUi(this); - if (hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { - original_ldrlist=hcm->getLDRList(); - expotimes = hcm->getExpotimes(); - } - else { - original_ldrlist=hcm->getMDRList(); - antighostToolButton->setEnabled(false); - } - - filelist=hcm->getFileList(); - this->hcm=hcm; - - toolOptionsFrame->setVisible(false); - maskColorButton->setVisible(false); - QColor maskcolor=QColor(luminanceOptions.value(KEY_MANUAL_AG_MASK_COLOR,0x00FF0000).toUInt()); - Qt::ToolButtonStyle style = (Qt::ToolButtonStyle) luminanceOptions.value(KEY_TOOLBAR_MODE,Qt::ToolButtonTextUnderIcon).toInt(); - maskColorButton->setStyleSheet(QString("background: rgb("+QString(maskcolor.red())+","+QString(maskcolor.green())+","+QString(maskcolor.blue())+")")); - assert(original_ldrlist.size()==filelist.size()); - QVBoxLayout *qvl=new QVBoxLayout; - qvl->setMargin(0); - qvl->setSpacing(0); - - scrollArea = new QScrollArea(previewImageFrame); - previewWidget = new PreviewWidget(this,original_ldrlist[1],original_ldrlist[0]); - previewWidget->setBrushColor(maskcolor); - previewWidget->adjustSize(); - previewWidget->update(); - - cornerButton=new QToolButton(this); - cornerButton->setToolTip(tr("Pan the image to a region")); - cornerButton->setIcon(QIcon(":/new/prefix1/images/move.png")); - scrollArea->setCornerWidget(cornerButton); - - scrollArea->setFocusPolicy(Qt::NoFocus); - scrollArea->setBackgroundRole(QPalette::Window); - scrollArea->setWidget(previewWidget); - - qvl->addWidget(scrollArea); - previewImageFrame->setLayout(qvl); - - foreach(QString s,filelist) { - movableListWidget->addItem(QFileInfo(s).fileName()); - referenceListWidget->addItem(QFileInfo(s).fileName()); - } - movableListWidget->setCurrentRow(1); - referenceListWidget->setCurrentRow(0); - - fitButton->setToolButtonStyle(style); - origSizeButton->setToolButtonStyle(style); - zoomOutButton->setToolButtonStyle(style); - zoomInButton->setToolButtonStyle(style); - whatsThisButton->setToolButtonStyle(style); - cropButton->setToolButtonStyle(style); - saveImagesButton->setToolButtonStyle(style); - antighostToolButton->setToolButtonStyle(style); - - QStringList::ConstIterator it = filelist.begin(); - while( it != filelist.end() ) { - HV_offsets.append(qMakePair(0,0)); - ++it; - } - - histogram=new HistogramLDR(this); - histogram->setData( original_ldrlist.at(1) ); - histogram->adjustSize(); - //((QHBoxLayout*)(visualizationGroupBox->layout()))->insertWidget(0,histogram); - ((QGridLayout*)(groupBoxHistogram->layout()))->addWidget(histogram); - previewWidget->setFocus(); - - selectionTool = new SelectionTool(previewWidget); - selectionTool->show(); - - setupConnections(); + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + m_originalImagesList=m_hcm->getLDRList(); + m_expotimes = m_hcm->getExpotimes(); + } + else { + m_originalImagesList=m_hcm->getMDRList(); + } + + m_fileList=m_hcm->getFileList(); + m_antiGhostingMasksList = m_hcm->getAntiGhostingMasksList(); + + toolOptionsFrame->setVisible(false); + maskColorButton->setVisible(false); + 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(); + maskColorButton->setStyleSheet("background: rgb("+QString("%1").arg(maskcolor.red())+","+QString("%1").arg(maskcolor.green())+","+QString("%1").arg(maskcolor.blue())+")"); + 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()); + QVBoxLayout *qvl = new QVBoxLayout; + qvl->setMargin(0); + qvl->setSpacing(0); + + m_scrollArea = new QScrollArea(previewImageFrame); + m_previewWidget = new PreviewWidget(this,m_originalImagesList[1],m_originalImagesList[0]); + m_previewWidget->adjustSize(); + m_previewWidget->update(); + m_agWidget = new AntiGhostingWidget(m_previewWidget, m_antiGhostingMasksList[1]); + m_agWidget->setBrushColor(maskcolor); + m_agWidget->setLassoColor(lassocolor); + m_agWidget->adjustSize(); + m_agWidget->update(); + + m_cornerButton = new QToolButton(this); + m_cornerButton->setToolTip(tr("Pan the image to a region")); + m_cornerButton->setIcon(QIcon(":/new/prefix1/images/move.png")); + m_scrollArea->setCornerWidget(m_cornerButton); + + m_scrollArea->setFocusPolicy(Qt::NoFocus); + m_scrollArea->setBackgroundRole(QPalette::Window); + m_scrollArea->setWidget(m_previewWidget); + + qvl->addWidget(m_scrollArea); + previewImageFrame->setLayout(qvl); + + int idx = 0; + foreach(QString s,m_fileList) { + m_filesMap[QFileInfo(s).fileName()] = idx++; + movableListWidget->addItem(QFileInfo(s).fileName()); + referenceListWidget->addItem(QFileInfo(s).fileName()); + } + movableListWidget->setCurrentRow(1); + referenceListWidget->setCurrentRow(0); + + fitButton->setToolButtonStyle(style); + origSizeButton->setToolButtonStyle(style); + zoomOutButton->setToolButtonStyle(style); + zoomInButton->setToolButtonStyle(style); + whatsThisButton->setToolButtonStyle(style); + cropButton->setToolButtonStyle(style); + saveImagesButton->setToolButtonStyle(style); + antighostToolButton->setToolButtonStyle(style); + toolButtonPaint->setToolButtonStyle(style); + toolButtonPath->setToolButtonStyle(style); + + drawingModeFrame->hide(); + + QStringList::ConstIterator it = m_fileList.begin(); + while( it != m_fileList.end() ) { + m_HV_offsets.append(qMakePair(0,0)); + ++it; + } + + m_histogram=new HistogramLDR(this); + m_histogram->setData( m_originalImagesList.at(1) ); + m_histogram->adjustSize(); + + ((QGridLayout*)(groupBoxHistogram->layout()))->addWidget(m_histogram); + m_previewWidget->setFocus(); + + m_selectionTool = new SelectionTool(m_previewWidget); + m_selectionTool->show(); + + setupConnections(); } //end of constructor void EditingTools::setupConnections() { - connect(cornerButton, SIGNAL(pressed()), this, SLOT(slotCornerButtonPressed())); - connect(upToolButton,SIGNAL(clicked()),this,SLOT(upClicked())); - connect(rightToolButton,SIGNAL(clicked()),this,SLOT(rightClicked())); - connect(downToolButton,SIGNAL(clicked()),this,SLOT(downClicked())); - connect(leftToolButton,SIGNAL(clicked()),this,SLOT(leftClicked())); - connect(horizShiftSB,SIGNAL(valueChanged(int)),this,SLOT(horizShiftChanged(int))); - connect(vertShiftSB,SIGNAL(valueChanged(int)),this,SLOT(vertShiftChanged(int))); - connect(resetButton,SIGNAL(clicked()),this,SLOT(resetCurrent())); - connect(resetAllButton,SIGNAL(clicked()),this,SLOT(resetAll())); - - connect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); - connect(referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); - connect(prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); - connect(nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); - - connect(whatsThisButton,SIGNAL(clicked()),this,SLOT(enterWhatsThis())); - connect(fitButton,SIGNAL(toggled(bool)),this,SLOT(fitPreview(bool))); - connect(origSizeButton,SIGNAL(clicked()),this,SLOT(origSize())); - connect(zoomOutButton,SIGNAL(clicked()),this,SLOT(zoomOut())); - connect(zoomInButton,SIGNAL(clicked()),this,SLOT(zoomIn())); - connect(cropButton,SIGNAL(clicked()),this,SLOT(crop_stack())); - connect(saveImagesButton,SIGNAL(clicked()),this,SLOT(saveImagesButtonClicked())); - connect(blendModeCB,SIGNAL(currentIndexChanged(int)),previewWidget,SLOT(requestedBlendMode(int))); - connect(blendModeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(blendModeCBIndexChanged(int))); - connect(antighostToolButton,SIGNAL(toggled(bool)),toolOptionsFrame,SLOT(setVisible(bool))); - connect(antighostToolButton,SIGNAL(toggled(bool)),previewWidget,SLOT(switchAntighostingMode(bool))); - connect(antighostToolButton,SIGNAL(toggled(bool)),this,SLOT(antighostToolButtonToggled(bool))); - connect(agBrushSizeQSpinbox,SIGNAL(valueChanged(int)),previewWidget,SLOT(setBrushSize(int))); - connect(agBrushStrengthQSpinbox,SIGNAL(valueChanged(int)),previewWidget,SLOT(setBrushStrength(int))); - connect(maskColorButton,SIGNAL(clicked()),this,SLOT(maskColorButtonClicked())); - - connect(Next_Finishbutton,SIGNAL(clicked()),this,SLOT(nextClicked())); - connect(previewWidget,SIGNAL(validCropArea(bool)),cropButton,SLOT(setEnabled(bool))); - connect(previewWidget, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); - connect(selectionTool,SIGNAL(selectionReady(bool)),cropButton,SLOT(setEnabled(bool))); - connect(selectionTool, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); - connect(removeMaskRadioButton,SIGNAL(toggled(bool)),previewWidget,SLOT(setBrushMode(bool))); + connect(m_cornerButton, SIGNAL(pressed()), this, SLOT(slotCornerButtonPressed())); + connect(upToolButton,SIGNAL(clicked()),this,SLOT(upClicked())); + connect(rightToolButton,SIGNAL(clicked()),this,SLOT(rightClicked())); + connect(downToolButton,SIGNAL(clicked()),this,SLOT(downClicked())); + connect(leftToolButton,SIGNAL(clicked()),this,SLOT(leftClicked())); + connect(horizShiftSB,SIGNAL(valueChanged(int)),this,SLOT(horizShiftChanged(int))); + connect(vertShiftSB,SIGNAL(valueChanged(int)),this,SLOT(vertShiftChanged(int))); + connect(resetButton,SIGNAL(clicked()),this,SLOT(resetCurrent())); + connect(resetAllButton,SIGNAL(clicked()),this,SLOT(resetAll())); + + connect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); + connect(referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); + connect(prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); + connect(nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); + + connect(whatsThisButton,SIGNAL(clicked()),this,SLOT(enterWhatsThis())); + connect(fitButton,SIGNAL(toggled(bool)),this,SLOT(fitPreview(bool))); + connect(origSizeButton,SIGNAL(clicked()),this,SLOT(origSize())); + connect(zoomOutButton,SIGNAL(clicked()),this,SLOT(zoomOut())); + connect(zoomInButton,SIGNAL(clicked()),this,SLOT(zoomIn())); + connect(cropButton,SIGNAL(clicked()),this,SLOT(cropStack())); + connect(saveImagesButton,SIGNAL(clicked()),this,SLOT(saveImagesButtonClicked())); + connect(blendModeCB,SIGNAL(currentIndexChanged(int)),m_previewWidget,SLOT(requestedBlendMode(int))); + connect(blendModeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(blendModeCBIndexChanged(int))); + //connect(antighostToolButton,SIGNAL(toggled(bool)),toolOptionsFrame,SLOT(setVisible(bool))); + connect(antighostToolButton,SIGNAL(toggled(bool)),drawingModeFrame,SLOT(setVisible(bool))); + connect(antighostToolButton,SIGNAL(toggled(bool)),m_agWidget,SLOT(switchAntighostingMode(bool))); + connect(antighostToolButton,SIGNAL(toggled(bool)),this,SLOT(antighostToolButtonToggled(bool))); + connect(toolButtonPaint,SIGNAL(toggled(bool)),this,SLOT(antighostToolButtonPaintToggled(bool))); + connect(agBrushSizeQSpinbox,SIGNAL(valueChanged(int)),m_agWidget,SLOT(setBrushSize(int))); + connect(agBrushStrengthQSpinbox,SIGNAL(valueChanged(int)),m_agWidget,SLOT(setBrushStrength(int))); + connect(maskColorButton,SIGNAL(clicked()),this,SLOT(maskColorButtonClicked())); + connect(lassoColorButton,SIGNAL(clicked()),this,SLOT(lassoColorButtonClicked())); + connect(toolButtonSaveMask,SIGNAL(clicked()),m_agWidget,SLOT(saveAgMask())); + connect(toolButtonSaveMask,SIGNAL(clicked()),this,SLOT(saveAgMask())); + connect(toolButtonApplyMask,SIGNAL(clicked()),this,SLOT(applySavedAgMask())); + + connect(Next_Finishbutton,SIGNAL(clicked()),this,SLOT(nextClicked())); + connect(m_previewWidget, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); + connect(m_agWidget, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); + connect(m_selectionTool,SIGNAL(selectionReady(bool)),cropButton,SLOT(setEnabled(bool))); + connect(m_selectionTool, SIGNAL(moved(QPoint)), this, SLOT(updateScrollBars(QPoint))); + connect(removeMaskRadioButton,SIGNAL(toggled(bool)),m_agWidget,SLOT(setBrushMode(bool))); - connect(hcm, SIGNAL(mdrSaved()), this, SLOT(restoreSaveImagesButtonState())); + connect(m_hcm, SIGNAL(imagesSaved()), this, SLOT(restoreSaveImagesButtonState())); } void EditingTools::slotCornerButtonPressed() { - panIconWidget=new PanIconWidget; - panIconWidget->setImage(previewWidget->getPreviewImage()); - float zf=previewWidget->getScaleFactor(); - float leftviewpos=(float)(scrollArea->horizontalScrollBar()->value()); - float topviewpos=(float)(scrollArea->verticalScrollBar()->value()); - float wps_w=(float)(scrollArea->maximumViewportSize().width()); - float wps_h=(float)(scrollArea->maximumViewportSize().height()); - QRect r((int)(leftviewpos/zf), (int)(topviewpos/zf), (int)(wps_w/zf), (int)(wps_h/zf)); - panIconWidget->setRegionSelection(r); - panIconWidget->setMouseFocus(); - connect(panIconWidget, SIGNAL(selectionMoved(QRect)), this, SLOT(slotPanIconSelectionMoved(QRect))); - connect(panIconWidget, SIGNAL(finished()), this, SLOT(slotPanIconHidden())); - QPoint g = scrollArea->mapToGlobal(scrollArea->viewport()->pos()); - g.setX(g.x()+ scrollArea->viewport()->size().width()); - g.setY(g.y()+ scrollArea->viewport()->size().height()); - panIconWidget->popup(QPoint(g.x() - panIconWidget->width()/2, - g.y() - panIconWidget->height()/2)); + m_panIconWidget=new PanIconWidget; + m_panIconWidget->setImage(m_previewWidget->getPreviewImage()); + float zf=m_previewWidget->getScaleFactor(); + float leftviewpos=(float)(m_scrollArea->horizontalScrollBar()->value()); + float topviewpos=(float)(m_scrollArea->verticalScrollBar()->value()); + float wps_w=(float)(m_scrollArea->maximumViewportSize().width()); + float wps_h=(float)(m_scrollArea->maximumViewportSize().height()); + QRect r((int)(leftviewpos/zf), (int)(topviewpos/zf), (int)(wps_w/zf), (int)(wps_h/zf)); + m_panIconWidget->setRegionSelection(r); + m_panIconWidget->setMouseFocus(); + connect(m_panIconWidget, SIGNAL(selectionMoved(QRect)), this, SLOT(slotPanIconSelectionMoved(QRect))); + connect(m_panIconWidget, SIGNAL(finished()), this, SLOT(slotPanIconHidden())); + QPoint g = m_scrollArea->mapToGlobal(m_scrollArea->viewport()->pos()); + g.setX(g.x()+ m_scrollArea->viewport()->size().width()); + g.setY(g.y()+ m_scrollArea->viewport()->size().height()); + m_panIconWidget->popup(QPoint(g.x() - m_panIconWidget->width()/2, + g.y() - m_panIconWidget->height()/2)); - panIconWidget->setCursorToLocalRegionSelectionCenter(); + m_panIconWidget->setCursorToLocalRegionSelectionCenter(); } void EditingTools::slotPanIconSelectionMoved(QRect gotopos) { - scrollArea->horizontalScrollBar()->setValue((int)(gotopos.x()*previewWidget->getScaleFactor())); - scrollArea->verticalScrollBar()->setValue((int)(gotopos.y()*previewWidget->getScaleFactor())); + m_scrollArea->horizontalScrollBar()->setValue((int)(gotopos.x()*m_previewWidget->getScaleFactor())); + m_scrollArea->verticalScrollBar()->setValue((int)(gotopos.y()*m_previewWidget->getScaleFactor())); } void EditingTools::slotPanIconHidden() { - panIconWidget->close(); - cornerButton->blockSignals(true); - cornerButton->animateClick(); - cornerButton->blockSignals(false); + m_panIconWidget->close(); + m_cornerButton->blockSignals(true); + m_cornerButton->animateClick(); + m_cornerButton->blockSignals(false); } EditingTools::~EditingTools() { - delete previewWidget; - delete histogram; - delete cornerButton; + delete m_previewWidget; + delete m_histogram; + delete m_cornerButton; } void EditingTools::keyPressEvent(QKeyEvent *event) { - int key=event->key(); - Qt::KeyboardModifiers mods=event->modifiers(); - if ((mods & Qt::ShiftModifier)!=0 && (mods & Qt::ControlModifier)!=0) - additional_shift_value=99; - else if (mods & Qt::ControlModifier) - additional_shift_value=49; - else if (mods & Qt::ShiftModifier) - additional_shift_value=9; - - if (key==Qt::Key_W||key==Qt::Key_I) - upClicked(); - else if (key==Qt::Key_S||key==Qt::Key_K) - downClicked(); - else if (key==Qt::Key_D||key==Qt::Key_L) - rightClicked(); - else if (key==Qt::Key_A||key==Qt::Key_J) - leftClicked(); - if (key==Qt::Key_Escape) - reject(); + 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; + else if (mods & Qt::ShiftModifier) + m_additionalShiftValue=9; + + if (key==Qt::Key_W||key==Qt::Key_I) + upClicked(); + else if (key==Qt::Key_S||key==Qt::Key_K) + downClicked(); + else if (key==Qt::Key_D||key==Qt::Key_L) + rightClicked(); + else if (key==Qt::Key_A||key==Qt::Key_J) + leftClicked(); + if (key==Qt::Key_Escape) + reject(); } void EditingTools::keyReleaseEvent ( QKeyEvent * event ) { - additional_shift_value=0; - event->ignore(); + m_additionalShiftValue=0; + event->ignore(); } -void EditingTools::crop_stack() { - //zoom the image to 1:1, so that the crop area is in a one-to-one relationship with the pixel coordinates. - origSize(); - - if (hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) - hcm->applyShiftsToImageStack(HV_offsets); - else - hcm->applyShiftsToMdrImageStack(HV_offsets); - - resetAll(); - QRect ca=selectionTool->getSelectionRect(); - if(ca.width()<=0 || ca.height()<=0) - return; - - if (hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { - hcm->cropLDR(ca); - original_ldrlist=hcm->getLDRList(); - } - else { - hcm->cropMDR(ca); - original_ldrlist=hcm->getMDRList(); - } - - selectionTool->removeSelection(); - - previewWidget->setMovable(original_ldrlist[movableListWidget->currentRow()]); - previewWidget->setPivot(original_ldrlist[referenceListWidget->currentRow()]); - //restore fit - if (fitButton->isChecked()) - fitPreview(true); - //and start it up - previewWidget->update(); - previewWidget->hideRubberBand(); +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(); + + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) + m_hcm->applyShiftsToImageStack(m_HV_offsets); + else + m_hcm->applyShiftsToMdrImageStack(m_HV_offsets); + + resetAll(); + QRect ca=m_selectionTool->getSelectionRect(); + if(ca.width()<=0 || ca.height()<=0) + return; + + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + m_hcm->cropLDR(ca); + m_originalImagesList=m_hcm->getLDRList(); + } + else { + m_hcm->cropMDR(ca); + m_originalImagesList=m_hcm->getMDRList(); + } + + m_antiGhostingMasksList = m_hcm->getAntiGhostingMasksList(); + + m_selectionTool->removeSelection(); + + m_previewWidget->setMovable(m_originalImagesList[movableListWidget->currentRow()]); + m_previewWidget->setPivot(m_originalImagesList[referenceListWidget->currentRow()]); + m_agWidget->setMask(m_antiGhostingMasksList[movableListWidget->currentRow()]); + //restore fit + if (fitButton->isChecked()) + fitPreview(true); + //and start it up + m_previewWidget->update(); } void EditingTools::nextClicked() { - Next_Finishbutton->setEnabled(false); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); - if (hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) - hcm->applyShiftsToImageStack(HV_offsets); - else - if (!m_MdrSaved) - hcm->applyShiftsToMdrImageStack(HV_offsets); - QApplication::restoreOverrideCursor(); - emit accept(); + Next_Finishbutton->setEnabled(false); + QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + if (!m_imagesSaved) + m_hcm->applyShiftsToImageStack(m_HV_offsets); + if (m_goodImageIndex != -1) + m_hcm->doAntiGhosting(m_goodImageIndex); + } + else { + if (!m_imagesSaved) + m_hcm->applyShiftsToMdrImageStack(m_HV_offsets); + if (m_goodImageIndex != -1) + m_hcm->doAntiGhosting(m_goodImageIndex); + } + QApplication::restoreOverrideCursor(); + emit accept(); } void EditingTools::updateMovable(int newidx) { - //inform display_widget of the change - previewWidget->setMovable(original_ldrlist[newidx], HV_offsets[newidx].first, HV_offsets[newidx].second); - //prevent a change in the spinboxes to start a useless calculation - horizShiftSB->blockSignals(true); - horizShiftSB->setValue(HV_offsets[newidx].first); - horizShiftSB->blockSignals(false); - vertShiftSB->blockSignals(true); - vertShiftSB->setValue(HV_offsets[newidx].second); - vertShiftSB->blockSignals(false); - previewWidget->update(); - histogram->setData(original_ldrlist[newidx]); - histogram->update(); + //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 + horizShiftSB->blockSignals(true); + horizShiftSB->setValue(m_HV_offsets[newidx].first); + horizShiftSB->blockSignals(false); + vertShiftSB->blockSignals(true); + vertShiftSB->setValue(m_HV_offsets[newidx].second); + vertShiftSB->blockSignals(false); + m_previewWidget->update(); + m_histogram->setData(m_originalImagesList[newidx]); + m_histogram->update(); } void EditingTools::updatePivot(int newidx) { - previewWidget->setPivot(original_ldrlist[newidx],HV_offsets[newidx].first, HV_offsets[newidx].second); - previewWidget->update(); + m_previewWidget->setPivot(m_originalImagesList[newidx],m_HV_offsets[newidx].first, m_HV_offsets[newidx].second); + m_previewWidget->update(); } void EditingTools::upClicked() { - vertShiftSB->setValue(vertShiftSB->value()-1-additional_shift_value); + vertShiftSB->setValue(vertShiftSB->value()-1-m_additionalShiftValue); } void EditingTools::downClicked() { - vertShiftSB->setValue(vertShiftSB->value()+1+additional_shift_value); + vertShiftSB->setValue(vertShiftSB->value()+1+m_additionalShiftValue); } void EditingTools::rightClicked() { - horizShiftSB->setValue(horizShiftSB->value()+1+additional_shift_value); + horizShiftSB->setValue(horizShiftSB->value()+1+m_additionalShiftValue); } void EditingTools::leftClicked() { - horizShiftSB->setValue(horizShiftSB->value()-1-additional_shift_value); + horizShiftSB->setValue(horizShiftSB->value()-1-m_additionalShiftValue); } void EditingTools::vertShiftChanged(int v) { - HV_offsets[movableListWidget->currentRow()].second=v; - previewWidget->updateVertShiftMovable(v); - previewWidget->update(); + m_HV_offsets[movableListWidget->currentRow()].second=v; + m_previewWidget->updateVertShiftMovable(v); + m_agWidget->updateVertShift(v); + m_previewWidget->update(); + m_agWidget->update(); } void EditingTools::horizShiftChanged(int v) { - HV_offsets[movableListWidget->currentRow()].first=v; - previewWidget->updateHorizShiftMovable(v); - previewWidget->update(); + m_HV_offsets[movableListWidget->currentRow()].first=v; + m_previewWidget->updateHorizShiftMovable(v); + m_agWidget->updateHorizShift(v); + m_previewWidget->update(); + m_agWidget->update(); } void EditingTools::resetCurrent() { - horizShiftSB->setValue(0); - vertShiftSB->setValue(0); + horizShiftSB->setValue(0); + vertShiftSB->setValue(0); } void EditingTools::resetAll() { - for (int i = 0; i < HV_offsets.size(); ++i) { - HV_offsets[i].first=0; - 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); - previewWidget->updateHorizShiftMovable(0); - previewWidget->updateVertShiftMovable(0); - previewWidget->updateHorizShiftPivot(0); - previewWidget->updateVertShiftPivot(0); - previewWidget->update(); + for (int i = 0; i < m_HV_offsets.size(); ++i) { + 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); + m_previewWidget->updateHorizShiftMovable(0); + m_previewWidget->updateVertShiftMovable(0); + m_previewWidget->updateHorizShiftPivot(0); + m_previewWidget->updateVertShiftPivot(0); + m_previewWidget->update(); } void EditingTools::prevLeft() { - int prev=(movableListWidget->currentRow()==0) ? movableListWidget->count()-1 : movableListWidget->currentRow()-1; - movableListWidget->setCurrentRow(prev); + int prev=(movableListWidget->currentRow()==0) ? movableListWidget->count()-1 : movableListWidget->currentRow()-1; + movableListWidget->setCurrentRow(prev); } void EditingTools::nextLeft() { - int next=(movableListWidget->currentRow()==movableListWidget->count()-1) ? 0 : movableListWidget->currentRow()+1; - movableListWidget->setCurrentRow(next); + int next=(movableListWidget->currentRow()==movableListWidget->count()-1) ? 0 : movableListWidget->currentRow()+1; + movableListWidget->setCurrentRow(next); } void EditingTools::prevBoth() { - prevRight(); - prevLeft(); + prevRight(); + prevLeft(); } void EditingTools::nextBoth() { - nextRight(); - nextLeft(); + nextRight(); + nextLeft(); } void EditingTools::prevRight() { - int prev=(referenceListWidget->currentRow()==0) ? referenceListWidget->count()-1 : referenceListWidget->currentRow()-1; - referenceListWidget->setCurrentRow(prev); + int prev=(referenceListWidget->currentRow()==0) ? referenceListWidget->count()-1 : referenceListWidget->currentRow()-1; + referenceListWidget->setCurrentRow(prev); } void EditingTools::nextRight() { - int next=(referenceListWidget->currentRow()==referenceListWidget->count()-1) ? 0 : referenceListWidget->currentRow()+1; - referenceListWidget->setCurrentRow(next); + int next=(referenceListWidget->currentRow()==referenceListWidget->count()-1) ? 0 : referenceListWidget->currentRow()+1; + referenceListWidget->setCurrentRow(next); } void EditingTools::enterWhatsThis() { - QWhatsThis::enterWhatsThisMode(); + QWhatsThis::enterWhatsThisMode(); } void EditingTools::zoomIn() { - previewWidget->resize(previewWidget->size()*1.25f); - zoomOutButton->setEnabled(true); - zoomInButton->setEnabled(previewWidget->getScaleFactor() < 6.0); + m_previewWidget->resize(m_previewWidget->size()*1.25f); + m_agWidget->resize(m_previewWidget->size()*1.25f); + zoomOutButton->setEnabled(true); + zoomInButton->setEnabled(m_previewWidget->getScaleFactor() < 6.0); } + void EditingTools::zoomOut() { - previewWidget->resize(previewWidget->size()*0.8f); - zoomInButton->setEnabled(true); - zoomOutButton->setEnabled(previewWidget->getScaleFactor() > 0.166); + m_previewWidget->resize(m_previewWidget->size()*0.8f); + m_agWidget->resize(m_previewWidget->size()*0.8f); + zoomInButton->setEnabled(true); + zoomOutButton->setEnabled(m_previewWidget->getScaleFactor() > 0.166); } + void EditingTools::fitPreview(bool checked) { - zoomInButton->setEnabled(!checked); - zoomOutButton->setEnabled(!checked); - origSizeButton->setEnabled(!checked); - if (checked) { - previousPreviewWidgetSize=previewWidget->size(); - QSize fillWinSize=original_ldrlist.at(0)->size(); - fillWinSize.scale(scrollArea->maximumViewportSize(),Qt::KeepAspectRatio); - previewWidget->resize(fillWinSize); - } else { - previewWidget->resize(previousPreviewWidgetSize); - } + if (!m_antiGhosting) { + zoomInButton->setEnabled(!checked); + zoomOutButton->setEnabled(!checked); + } + origSizeButton->setEnabled(!checked); + if (checked) { + m_previousPreviewWidgetSize=m_previewWidget->size(); + QSize fillWinSize=m_originalImagesList.at(0)->size(); + fillWinSize.scale(m_scrollArea->maximumViewportSize(),Qt::KeepAspectRatio); + m_previewWidget->resize(fillWinSize); + m_agWidget->resize(fillWinSize); + } else { + m_previewWidget->resize(m_previousPreviewWidgetSize); + m_agWidget->resize(m_previousPreviewWidgetSize); + } } + void EditingTools::origSize() { - zoomInButton->setEnabled(true); - zoomOutButton->setEnabled(true); - previewWidget->resize(original_ldrlist.at(0)->size()); + zoomInButton->setEnabled(true); + zoomOutButton->setEnabled(true); + m_previewWidget->resize(m_originalImagesList.at(0)->size()); + m_agWidget->resize(m_originalImagesList.at(0)->size()); } void EditingTools::antighostToolButtonToggled(bool toggled) { -// if (toggled) -// blendModeCB->setCurrentIndex(4); - prevBothButton->setDisabled(toggled); - nextBothButton->setDisabled(toggled); - label_reference_list->setDisabled(toggled); - referenceListWidget->setDisabled(toggled); - previewWidget->update(); - toggled ? selectionTool->disable() : selectionTool->enable(); + m_previewWidget->update(); + toggled ? m_selectionTool->disable() : m_selectionTool->enable(); + if (toggled) { + m_antiGhosting = true; + m_previewWidget->hide(); + m_agWidget->show(); + m_agWidget->update(); + label_editable_list->setText(tr("Maskable")); + label_reference_list->setText(tr("Good image")); + origSizeButton->setDisabled(true); + zoomInButton->setDisabled(true); + zoomOutButton->setDisabled(true); + saveImagesButton->setDisabled(true); + prevBothButton->setIcon(QIcon(":new/prefix1/images/forward.png")); + nextBothButton->setIcon(QIcon(":new/prefix1/images/back.png")); + nextBothButton->setDisabled(true); + disconnect(prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); + disconnect(nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); + disconnect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); + disconnect(referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); + connect(prevBothButton,SIGNAL(clicked()),this,SLOT(addGoodImage())); + connect(nextBothButton,SIGNAL(clicked()),this,SLOT(removeGoodImage())); + referenceListWidget->clear(); + if (m_goodImageIndex != -1) { + m_previewWidget->show(); + prevBothButton->setDisabled(true); + nextBothButton->setDisabled(false); + referenceListWidget->addItem(QFileInfo(m_fileList[m_goodImageIndex]).fileName()); + referenceListWidget->setCurrentRow(0); + movableListWidget->takeItem(m_goodImageIndex); + movableListWidget->setCurrentRow(0); + updatePivot(m_goodImageIndex); + QString filename = movableListWidget->currentItem()->text(); + int idx = m_filesMap[filename]; + updateMovable(idx); + } + connect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateAgMask(int))); + } + else { + m_antiGhosting = false; + m_previewWidget->show(); + m_agWidget->hide(); + disconnect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateAgMask(int))); + label_editable_list->setText(tr("Ed&itable")); + label_reference_list->setText(tr("R&eference")); + prevBothButton->setIcon(QIcon(":new/prefix1/images/uparrow.png")); + nextBothButton->setIcon(QIcon(":new/prefix1/images/downarrow.png")); + prevBothButton->setDisabled(false); + nextBothButton->setDisabled(false); + origSizeButton->setDisabled(false); + zoomInButton->setDisabled(false); + zoomOutButton->setDisabled(false); + saveImagesButton->setDisabled(false); + movableListWidget->clear(); + referenceListWidget->clear(); + disconnect(prevBothButton,SIGNAL(clicked()),this,SLOT(addGoodImage())); + disconnect(nextBothButton,SIGNAL(clicked()),this,SLOT(removeGoodImage())); + connect(prevBothButton,SIGNAL(clicked()),this,SLOT(prevBoth())); + connect(nextBothButton,SIGNAL(clicked()),this,SLOT(nextBoth())); + connect(movableListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updateMovable(int))); + connect(referenceListWidget,SIGNAL(currentRowChanged(int)),this,SLOT(updatePivot(int))); + foreach(QString s,m_fileList) { + movableListWidget->addItem(QFileInfo(s).fileName()); + referenceListWidget->addItem(QFileInfo(s).fileName()); + } + movableListWidget->setCurrentRow(1); + referenceListWidget->setCurrentRow(0); + } } void EditingTools::maskColorButtonClicked() { - QColor returned=QColorDialog::getColor(); - if (returned.isValid()) { - previewWidget->setBrushColor(returned); - maskColorButton->setStyleSheet(QString("background: rgb(%1,%2,%3)").arg(returned.red()).arg(returned.green()).arg(returned.blue())); - luminanceOptions.setValue(KEY_MANUAL_AG_MASK_COLOR,returned.rgb()); - } + QColor returned = QColorDialog::getColor(); + if (returned.isValid()) { + m_agWidget->setBrushColor(returned); + 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()); + } +} + +void EditingTools::lassoColorButtonClicked() { + QColor returned = QColorDialog::getColor(); + if (returned.isValid()) { + m_agWidget->setLassoColor(returned); + 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()); + } } void EditingTools::blendModeCBIndexChanged(int newindex) { - maskColorButton->setVisible(newindex==4); + maskColorButton->setVisible(newindex == 4); + lassoColorButton->setVisible(newindex == 4); + if (newindex == 4 && !m_antiGhosting) + m_agWidget->show(); + else if (newindex != 4 && !m_antiGhosting) + m_agWidget->hide(); } void EditingTools::saveImagesButtonClicked() { - saveImagesButton->setEnabled(false); - Next_Finishbutton->setEnabled(false); - QString fnameprefix=QFileDialog::getSaveFileName( - this, - tr("Choose a directory and a prefix"), - luminanceOptions.value(KEY_RECENT_PATH_LOAD_LDRs_FOR_HDR,QDir::currentPath()).toString()); - if (fnameprefix.isEmpty()) - return; - - QFileInfo qfi(fnameprefix); - QFileInfo test(qfi.path()); - - luminanceOptions.setValue(KEY_RECENT_PATH_LOAD_LDRs_FOR_HDR, qfi.path()); - - if (test.isWritable() && test.exists() && test.isDir()) { - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); - if (hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { - int counter=0; - foreach(QImage *p, original_ldrlist) { - TiffWriter tiffwriter( QFile::encodeName((qfi.path() + "/" + qfi.fileName() + QString("_%1.tiff").arg(counter))), p); - tiffwriter.write8bitTiff(); - ExifOperations::writeExifData(QFile::encodeName((qfi.path() + "/" + qfi.fileName() + QString("_%1.tiff").arg(counter))).constData(), "Edited Images", expotimes[counter]); - counter++; - } - saveImagesButton->setEnabled(true); - Next_Finishbutton->setEnabled(true); - QApplication::restoreOverrideCursor(); - } - else { - m_MdrSaved = true; - - hcm->applyShiftsToMdrImageStack(HV_offsets); - hcm->saveMDRs(QFile::encodeName((qfi.path() + "/" + qfi.fileName()))); - } - } + saveImagesButton->setEnabled(false); + Next_Finishbutton->setEnabled(false); + 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()); + + m_luminanceOptions.setDefaultPathLdrIn(qfi.path()); + + if (test.isWritable() && test.exists() && test.isDir()) { + QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + m_hcm->applyShiftsToImageStack(m_HV_offsets); + m_hcm->saveLDRs(QFile::encodeName((qfi.path() + "/" + qfi.fileName()))); + } + else { + m_hcm->applyShiftsToMdrImageStack(m_HV_offsets); + m_hcm->saveMDRs(QFile::encodeName((qfi.path() + "/" + qfi.fileName()))); + } + } } void EditingTools::updateScrollBars(QPoint diff) { - scrollArea->verticalScrollBar()->setValue(scrollArea->verticalScrollBar()->value() + diff.y()); - scrollArea->horizontalScrollBar()->setValue(scrollArea->horizontalScrollBar()->value() + diff.x()); + m_scrollArea->verticalScrollBar()->setValue(m_scrollArea->verticalScrollBar()->value() + diff.y()); + m_scrollArea->horizontalScrollBar()->setValue(m_scrollArea->horizontalScrollBar()->value() + diff.x()); } void EditingTools::restoreSaveImagesButtonState() { - saveImagesButton->setEnabled(true); - Next_Finishbutton->setEnabled(true); - QApplication::restoreOverrideCursor(); + m_imagesSaved = true; + saveImagesButton->setEnabled(true); + Next_Finishbutton->setEnabled(true); + QApplication::restoreOverrideCursor(); + if (m_hcm->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + m_originalImagesList=m_hcm->getLDRList(); + m_previewWidget->setMovable(m_originalImagesList[movableListWidget->currentRow()]); + m_previewWidget->setPivot(m_originalImagesList[referenceListWidget->currentRow()]); + } +} + +void EditingTools::setAntiGhostingWidget(QImage *mask, QPair HV_offset) +{ + m_agWidget->setMask(mask); + m_agWidget->setHV_offset(HV_offset); + m_agWidget->show(); +} + +void EditingTools::addGoodImage() +{ + QString filename = movableListWidget->currentItem()->text(); + int idx = m_filesMap[filename]; + int idxToRemove = movableListWidget->currentRow(); + referenceListWidget->addItem(QFileInfo(m_fileList[idx]).fileName()); + referenceListWidget->setCurrentRow(0); + m_goodImageIndex = idx; + m_antiGhostingMasksList[idx]->fill(qRgba(0,0,0,0)); + movableListWidget->takeItem(idxToRemove); + prevBothButton->setDisabled(true); + nextBothButton->setDisabled(false); + updatePivot(idx); + m_previewWidget->show(); +} + +void EditingTools::removeGoodImage() +{ + QString filename = referenceListWidget->currentItem()->text(); + int idx = m_filesMap[filename]; + movableListWidget->addItem(QFileInfo(m_fileList[idx]).fileName()); + referenceListWidget->takeItem(0); + prevBothButton->setDisabled(false); + nextBothButton->setDisabled(true); + m_goodImageIndex = -1; + m_agWidget->hide(); + m_previewWidget->hide(); +} + +void EditingTools::updateAgMask(int) +{ + QString filename = movableListWidget->currentItem()->text(); + int idx = m_filesMap[filename]; + setAntiGhostingWidget(m_antiGhostingMasksList[idx], m_HV_offsets[idx]); + updateMovable(idx); +} + +void EditingTools::saveAgMask() +{ + toolButtonApplyMask->setEnabled(true); +} + +void EditingTools::applySavedAgMask() +{ + QString filename = movableListWidget->currentItem()->text(); + int idx = m_filesMap[filename]; + delete m_antiGhostingMasksList[idx]; + m_antiGhostingMasksList[idx] = new QImage(*m_agWidget->getSavedAgMask()); + m_agWidget->update(); +} + +void EditingTools::antighostToolButtonPaintToggled(bool toggled) +{ + (toggled) ? m_agWidget->setDrawWithBrush() : m_agWidget->setDrawPath(); } diff -Nru luminance-hdr-2.3.0/src/HdrWizard/EditingTools.h luminance-hdr-2.3.1/src/HdrWizard/EditingTools.h --- luminance-hdr-2.3.0/src/HdrWizard/EditingTools.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/EditingTools.h 2013-04-07 18:41:14.000000000 +0000 @@ -20,7 +20,7 @@ * * Original Work * @author Giuseppe Rota - * Improvements, bugfixing + * Improvements, bugfixing, anti ghosting * @author Franco Comida * */ @@ -28,11 +28,15 @@ #ifndef EDITINGTOOLS_H #define EDITINGTOOLS_H +#include + #include "ui_EditingTools.h" #include "PreviewWidget.h" #include "Common/global.h" #include "Viewers/SelectionTool.h" #include "HdrCreation/HdrCreationManager.h" +#include "PreviewWidget.h" +#include "AntiGhostingWidget.h" #include "Common/LuminanceOptions.h" class HistogramLDR; @@ -48,22 +52,28 @@ void keyPressEvent(QKeyEvent *); void keyReleaseEvent(QKeyEvent *); private: - QList original_ldrlist; - QStringList filelist; - HdrCreationManager *hcm; - - QScrollArea *scrollArea; - PreviewWidget *previewWidget; - int additional_shift_value; - QList< QPair > HV_offsets; - HistogramLDR *histogram; - QSize previousPreviewWidgetSize; - PanIconWidget *panIconWidget; - QToolButton *cornerButton; - SelectionTool *selectionTool; - bool m_MdrSaved; - LuminanceOptions luminanceOptions; - QVector expotimes; + QList m_originalImagesList; + QList m_antiGhostingMasksList; + QStringList m_fileList; + HdrCreationManager *m_hcm; + QMap m_filesMap; + QScrollArea *m_scrollArea; + PreviewWidget *m_previewWidget; + AntiGhostingWidget *m_agWidget; + int m_additionalShiftValue; + QList< QPair > m_HV_offsets; + HistogramLDR *m_histogram; + QSize m_previousPreviewWidgetSize; + PanIconWidget *m_panIconWidget; + QToolButton *m_cornerButton; + SelectionTool *m_selectionTool; + bool m_imagesSaved; + int m_goodImageIndex; + bool m_antiGhosting; + LuminanceOptions m_luminanceOptions; + QVector m_expotimes; + + void setAntiGhostingWidget(QImage*, QPair); private slots: void slotPanIconSelectionMoved(QRect); void slotPanIconHidden(); @@ -90,16 +100,21 @@ void zoomOut(); void fitPreview(bool); void origSize(); - void crop_stack(); + void cropStack(); void nextClicked(); void maskColorButtonClicked(); + void lassoColorButtonClicked(); void antighostToolButtonToggled(bool); void blendModeCBIndexChanged(int); void setupConnections(); void updateScrollBars(QPoint diff); void restoreSaveImagesButtonState(); + void addGoodImage(); + void removeGoodImage(); + void updateAgMask(int); + void antighostToolButtonPaintToggled(bool); + void saveAgMask(); + void applySavedAgMask(); }; - - #endif diff -Nru luminance-hdr-2.3.0/src/HdrWizard/EditingTools.ui luminance-hdr-2.3.1/src/HdrWizard/EditingTools.ui --- luminance-hdr-2.3.0/src/HdrWizard/EditingTools.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/EditingTools.ui 2013-04-07 18:41:14.000000000 +0000 @@ -24,16 +24,16 @@
    - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png true - + - + - + @@ -205,7 +205,7 @@ - Preview &Mode: + &Mode: blendModeCB @@ -247,7 +247,14 @@ true - Mask Color + Brush + + + + + + + Lasso @@ -302,7 +309,7 @@ 0 - + Ed&itable @@ -530,8 +537,8 @@ - 22 - 22 + 32 + 32 @@ -563,8 +570,8 @@ - 22 - 22 + 32 + 32 @@ -596,8 +603,8 @@ - 22 - 22 + 32 + 32 @@ -621,158 +628,342 @@ - + QFrame::StyledPanel QFrame::Raised - - - 3 - - - 6 - - - - - 6 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - + + + - - - A&dd Mask - - - true - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Mask + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Remove Mas&k - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - 6 - - - - - 1 - - - 64 - - - 32 - - - Qt::Horizontal - - - - - - - 1 - - - 255 - - - 255 - - - - - - - Size: - - - - - - - 1 - - - 255 - - - 255 - - - Qt::Horizontal - - - - - - - pixels - - - 1 - - - 64 - - - 32 - - - - - - - &Strength: - - - agBrushStrengthQSlider - - + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + A&dd + + + true + + + + + + + &Remove + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + 6 + + + + + 1 + + + 64 + + + 32 + + + Qt::Horizontal + + + + + + + 1 + + + 255 + + + 255 + + + + + + + Size: + + + + + + + 1 + + + 255 + + + 255 + + + Qt::Horizontal + + + + + + + px + + + 1 + + + 64 + + + 32 + + + + + + + &Strength: + + + agBrushStrengthQSlider + + + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + + Lasso - Draw a free hand selection area + + + Lasso + + + + :/new/prefix1/images/gimp-lasso.png:/new/prefix1/images/gimp-lasso.png + + + + 22 + 22 + + + + true + + + true + + + + + + + Brush - Paint the mask using the brush + + + Brush + + + + :/new/prefix1/images/brush_icon.png:/new/prefix1/images/brush_icon.png + + + + 22 + 22 + + + + true + + + true + + + true + + + + + + + + + Qt::Horizontal + + + + + + + + + Save mask + + + ... + + + + :/new/prefix1/images/filesave.png:/new/prefix1/images/filesave.png + + + + 22 + 22 + + + + + + + + false + + + Apply saved mask + + + ... + + + + :/new/prefix1/images/apply.png:/new/prefix1/images/apply.png + + + + 22 + 22 + + + + + + + + + + + + @@ -791,347 +982,347 @@ - - - - - - -1 - - - QLayout::SetDefaultConstraint - - - - - 0 - 0 - + + + -1 - - - 555 - 300 - - - - Qt::StrongFocus + + QLayout::SetDefaultConstraint - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This area shows the preview (using the preview mode on the left) between the editable and reference image.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the same image is selected in both the editable and reference list, this area will show the image itself.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicking and holding the left mouse button you will be able to select a crop area.</p></body></html> - - - QFrame::NoFrame - - - QFrame::Sunken - - - - - - + - + 0 0 - + - 450 - 150 + 555 + 300 - - <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Shift values for the currently selected editable image</p></body></html> + + Qt::StrongFocus <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here the user can view and set the shift values for the currently selected editable image</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This area shows the preview (using the preview mode on the left) between the editable and reference image.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the same image is selected in both the editable and reference list, this area will show the image itself.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicking and holding the left mouse button you will be able to select a crop area.</p></body></html>
    - - Shift values for editable image + + QFrame::NoFrame - - - 9 - - - 5 - - - + + QFrame::Sunken + + + + + + + + + + 0 + 0 + + + + + 450 + 150 + + + + <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:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Shift values for the currently selected editable image</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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here the user can view and set the shift values for the currently selected editable image</p></body></html> + + + Shift values for editable image + + - 6 + 9 - 0 + 5 - - - Reset the shift values for the currently selected movable image + + + 6 - - &Reset + + 0 - + + + + Reset the shift values for the currently selected movable image + + + &Reset + + + + + + + Reset the shift values for all the images + + + Reset &All + + + + - - - Reset the shift values for all the images - - - Reset &All - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0 - - - 6 - - - - - &Horizontal: - - - horizShiftSB - - - - - - - Qt::LeftToRight - - - &Vertical: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::Horizontal - - vertShiftSB + + + 40 + 20 + - + - - - - Insert an horizontal shift value for the currently selected movable image - - - px - - - -9000 + + + + 0 - - 9000 + + 6 - + + + + &Horizontal: + + + horizShiftSB + + + + + + + Qt::LeftToRight + + + &Vertical: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + vertShiftSB + + + + + + + Insert an horizontal shift value for the currently selected movable image + + + px + + + -9000 + + + 9000 + + + + + + + Insert a vertical shift value for the currently selected movable image + + + px + + + -9000 + + + 9000 + + + + - - - - Insert a vertical shift value for the currently selected movable image - - - px - - - -9000 + + + + 0 - - 9000 + + 6 - + + + + Move up of 1 pixel the currently selected movable image + + + true + + + Qt::UpArrow + + + + + + + Move down of 1 pixel the currently selected movable image + + + true + + + Qt::DownArrow + + + + + + + Move right of 1 pixel the currently selected movable image + + + true + + + Qt::RightArrow + + + + + + + Move left of 1 pixel the currently selected movable image + + + true + + + Qt::LeftArrow + + + + - - - - - 0 - - - 6 - - - - - Move up of 1 pixel the currently selected movable image - - - true - - - Qt::UpArrow - - - - - - - Move down of 1 pixel the currently selected movable image - - - true - - - Qt::DownArrow - - - - - - - Move right of 1 pixel the currently selected movable image - - - true - - - Qt::RightArrow - - - - - - - Move left of 1 pixel the currently selected movable image - - - true - - - Qt::LeftArrow - - + + + + + + + 16777215 + 150 + + + + Histogram + + + + - - - - - - - - - 16777215 - 150 - - - - Histogram - - - - - - - + + + - - - - - - 6 - - - 0 - - - - - Get information about the graphical elements - - - &What's this? - - - - :/new/prefix1/images/whatsthis.png:/new/prefix1/images/whatsthis.png - - - - 22 - 22 - - - - Shift+F1 - - - - - - - Qt::Horizontal - - - - 821 - 27 - - - - - - - &Next > - - - true + + + 6 - - - - - - &Cancel + + 0 - + + + + Get information about the graphical elements + + + &What's this? + + + + :/new/prefix1/images/whatsthis.png:/new/prefix1/images/whatsthis.png + + + + 22 + 22 + + + + Shift+F1 + + + + + + + Qt::Horizontal + + + + 821 + 27 + + + + + + + + &Next > + + + true + + + + + + + &Cancel + + + + @@ -1171,8 +1362,8 @@ reject() - 1197 - 695 + 1115 + 635 831 @@ -1187,12 +1378,12 @@ setValue(int) - 219 - 499 + 205 + 536 - 327 - 500 + 285 + 538 @@ -1203,12 +1394,12 @@ setValue(int) - 352 - 489 + 285 + 538 - 146 - 499 + 205 + 536 @@ -1219,12 +1410,12 @@ setValue(int) - 207 - 528 + 205 + 568 - 339 - 539 + 285 + 570 @@ -1235,12 +1426,12 @@ setValue(int) - 322 - 524 + 285 + 570 - 273 - 528 + 205 + 568 @@ -1251,12 +1442,28 @@ setVisible(bool) - 284 - 431 + 238 + 435 + + + 59 + 580 + + + + + antighostToolButton + toggled(bool) + drawingModeFrame + setVisible(bool) + + + 225 + 414 - 33 - 455 + 316 + 449 diff -Nru luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.cpp luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.cpp --- luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -3,19 +3,19 @@ * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota * - * 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 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. + * 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 + * 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 * ---------------------------------------------------------------------- * * Original Work @@ -30,9 +30,15 @@ #include #include #include +#include #include +#include #include #include +#include +#include +#include +#include #include "HdrWizard.h" #include "ui_HdrWizard.h" @@ -44,714 +50,864 @@ #include "UI/Gang.h" #include "HdrCreation/HdrCreationManager.h" -HdrWizard::HdrWizard(QWidget *p, QStringList files): - QDialog(p), - hdrCreationManager(new HdrCreationManager), - loadcurvefilename(""), - savecurvefilename(""), - m_Ui(new Ui::HdrWizard) -{ - m_Ui->setupUi(this); - setAcceptDrops(true); - - weights_in_gui[0] = TRIANGULAR; - weights_in_gui[1] = GAUSSIAN; - weights_in_gui[2] = PLATEAU; - responses_in_gui[0] = GAMMA; - responses_in_gui[1] = LINEAR; - responses_in_gui[2] = LOG10; - responses_in_gui[3] = FROM_ROBERTSON; - models_in_gui[0] = DEBEVEC; - models_in_gui[1] = ROBERTSON; - - m_Ui->tableWidget->setHorizontalHeaderLabels(QStringList()<< tr("Image Filename") << tr("Exposure")); - m_Ui->tableWidget->resizeColumnsToContents(); - - EVgang = new Gang(m_Ui->EVSlider, m_Ui->ImageEVdsb, NULL, NULL, NULL,NULL, -10,10,0); - - if ( !luminance_options.isShowFirstPageWizard() ) - { - m_Ui->NextFinishButton->setEnabled(false); - m_Ui->pagestack->setCurrentIndex(1); - } - - m_Ui->progressBar->hide(); - m_Ui->textEdit->hide(); - - setupConnections(); - - if (files.size()) - { - m_Ui->pagestack->setCurrentIndex(1); - - QMetaObject::invokeMethod(this, "loadInputFiles", Qt::QueuedConnection, - Q_ARG(QStringList, files), Q_ARG(int, files.size())); - } +HdrWizard::HdrWizard(QWidget *p, + const QStringList &files, + const QStringList &inputFilesName, + const QVector &inputExpoTimes) : + QDialog(p), + hdrCreationManager(new HdrCreationManager), + loadcurvefilename(), + savecurvefilename(), + m_inputFilesName(inputFilesName), + m_inputExpoTimes(inputExpoTimes), + m_Ui(new Ui::HdrWizard) +{ + m_Ui->setupUi(this); + setAcceptDrops(true); + + weights_in_gui[0] = TRIANGULAR; + weights_in_gui[1] = GAUSSIAN; + weights_in_gui[2] = PLATEAU; + responses_in_gui[0] = GAMMA; + responses_in_gui[1] = LINEAR; + responses_in_gui[2] = LOG10; + responses_in_gui[3] = FROM_ROBERTSON; + models_in_gui[0] = DEBEVEC; + models_in_gui[1] = ROBERTSON; + + m_Ui->tableWidget->setHorizontalHeaderLabels( + QStringList() << tr("Image Filename") << tr("Exposure")); + m_Ui->tableWidget->resizeColumnsToContents(); + + EVgang = new Gang(m_Ui->EVSlider, m_Ui->ImageEVdsb, NULL, NULL, NULL,NULL, -10,10,0); + + if ( !luminance_options.isShowFirstPageWizard() ) + { + m_Ui->NextFinishButton->setEnabled(false); + m_Ui->pagestack->setCurrentIndex(1); + } + + m_Ui->progressBar->hide(); + m_Ui->textEdit->hide(); + + setupConnections(); + + if (files.size()) + { + m_Ui->pagestack->setCurrentIndex(1); + + QMetaObject::invokeMethod(this, "loadInputFiles", Qt::QueuedConnection, + Q_ARG(QStringList, files), Q_ARG(int, files.size())); + } + + 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(); + config_triple 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()"; + qDebug() << "HdrWizard::~HdrWizard()"; #endif - - QStringList fnames = hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) - { - QString fname = hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } + + QStringList fnames = hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) + { + QString fname = hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } - delete EVgang; - delete hdrCreationManager; + delete EVgang; + delete hdrCreationManager; } void HdrWizard::setupConnections() { - connect(EVgang, SIGNAL(finished()), this, SLOT(editingEVfinished())); - connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); + connect(EVgang, SIGNAL(finished()), this, SLOT(editingEVfinished())); + connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); - connect(m_Ui->NextFinishButton,SIGNAL(clicked()),this,SLOT(NextFinishButtonClicked())); - connect(m_Ui->cancelButton,SIGNAL(clicked()),this,SLOT(reject())); - connect(m_Ui->pagestack,SIGNAL(currentChanged(int)),this,SLOT(currentPageChangedInto(int))); - - connect(m_Ui->predefConfigsComboBox,SIGNAL(activated(int)),this, - SLOT(predefConfigsComboBoxActivated(int))); - connect(m_Ui->antighostRespCurveCombobox,SIGNAL(activated(int)),this, - SLOT(antighostRespCurveComboboxActivated(int))); - connect(m_Ui->customConfigCheckBox,SIGNAL(toggled(bool)),this, - SLOT(customConfigCheckBoxToggled(bool))); - connect(m_Ui->triGaussPlateauComboBox,SIGNAL(activated(int)),this, - SLOT(triGaussPlateauComboBoxActivated(int))); - connect(m_Ui->predefRespCurveRadioButton,SIGNAL(toggled(bool)),this, - SLOT(predefRespCurveRadioButtonToggled(bool))); - connect(m_Ui->gammaLinLogComboBox,SIGNAL(activated(int)),this, - SLOT(gammaLinLogComboBoxActivated(int))); - connect(m_Ui->loadRespCurveFromFileCheckbox,SIGNAL(toggled(bool)),this, - SLOT(loadRespCurveFromFileCheckboxToggled(bool))); - connect(m_Ui->loadRespCurveFileButton,SIGNAL(clicked()),this, - SLOT(loadRespCurveFileButtonClicked())); - connect(m_Ui->saveRespCurveToFileCheckbox,SIGNAL(toggled(bool)),this, - SLOT(saveRespCurveToFileCheckboxToggled(bool))); - connect(m_Ui->saveRespCurveFileButton,SIGNAL(clicked()),this, - SLOT(saveRespCurveFileButtonClicked())); - connect(m_Ui->modelComboBox,SIGNAL(activated(int)),this, - SLOT(modelComboBoxActivated(int))); - connect(m_Ui->RespCurveFileLoadedLineEdit,SIGNAL(textChanged(const QString&)),this, - SLOT(loadRespCurveFilename(const QString&))); - 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(hdrCreationManager, SIGNAL(fileLoaded(int,QString,float)), this, SLOT(fileLoaded(int,QString,float))); - connect(hdrCreationManager,SIGNAL(finishedLoadingInputFiles(QStringList)),this, SLOT(finishedLoadingInputFiles(QStringList))); - connect(hdrCreationManager,SIGNAL(errorWhileLoading(QString)),this, SLOT(errorWhileLoading(QString))); - connect(hdrCreationManager,SIGNAL(expotimeValueChanged(float,int)),this, SLOT(updateGraphicalEVvalue(float,int))); - connect(hdrCreationManager, SIGNAL(finishedAligning(int)), this, SLOT(finishedAligning(int))); - connect(hdrCreationManager, SIGNAL(ais_failed(QProcess::ProcessError)), this, SLOT(ais_failed(QProcess::ProcessError))); - connect(hdrCreationManager, SIGNAL(aisDataReady(QByteArray)), this, SLOT(writeAisData(QByteArray))); + connect(m_Ui->NextFinishButton,SIGNAL(clicked()),this,SLOT(NextFinishButtonClicked())); + connect(m_Ui->cancelButton,SIGNAL(clicked()),this,SLOT(reject())); + connect(m_Ui->pagestack,SIGNAL(currentChanged(int)),this,SLOT(currentPageChangedInto(int))); + + connect(m_Ui->ais_radioButton, SIGNAL(clicked()), this, SLOT(alignSelectionClicked())); + connect(m_Ui->mtb_radioButton, SIGNAL(clicked()), this, SLOT(alignSelectionClicked())); + + connect(m_Ui->predefConfigsComboBox,SIGNAL(activated(int)),this, + SLOT(predefConfigsComboBoxActivated(int))); + connect(m_Ui->antighostRespCurveCombobox,SIGNAL(activated(int)),this, + SLOT(antighostRespCurveComboboxActivated(int))); + connect(m_Ui->customConfigCheckBox,SIGNAL(toggled(bool)),this, + SLOT(customConfigCheckBoxToggled(bool))); + connect(m_Ui->triGaussPlateauComboBox,SIGNAL(activated(int)),this, + SLOT(triGaussPlateauComboBoxActivated(int))); + connect(m_Ui->predefRespCurveRadioButton,SIGNAL(toggled(bool)),this, + SLOT(predefRespCurveRadioButtonToggled(bool))); + connect(m_Ui->gammaLinLogComboBox,SIGNAL(activated(int)),this, + SLOT(gammaLinLogComboBoxActivated(int))); + connect(m_Ui->loadRespCurveFromFileCheckbox,SIGNAL(toggled(bool)),this, + SLOT(loadRespCurveFromFileCheckboxToggled(bool))); + connect(m_Ui->loadRespCurveFileButton,SIGNAL(clicked()),this, + SLOT(loadRespCurveFileButtonClicked())); + connect(m_Ui->saveRespCurveToFileCheckbox,SIGNAL(toggled(bool)),this, + SLOT(saveRespCurveToFileCheckboxToggled(bool))); + connect(m_Ui->saveRespCurveFileButton,SIGNAL(clicked()),this, + SLOT(saveRespCurveFileButtonClicked())); + connect(m_Ui->modelComboBox,SIGNAL(activated(int)),this, + SLOT(modelComboBoxActivated(int))); + connect(m_Ui->RespCurveFileLoadedLineEdit,SIGNAL(textChanged(const QString&)),this, + SLOT(loadRespCurveFilename(const QString&))); + 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(hdrCreationManager, SIGNAL(fileLoaded(int,QString,float)), this, SLOT(fileLoaded(int,QString,float))); + connect(hdrCreationManager,SIGNAL(finishedLoadingInputFiles(QStringList)),this, SLOT(finishedLoadingInputFiles(QStringList))); + connect(hdrCreationManager,SIGNAL(errorWhileLoading(QString)),this, SLOT(errorWhileLoading(QString))); + connect(hdrCreationManager,SIGNAL(expotimeValueChanged(float,int)),this, SLOT(updateGraphicalEVvalue(float,int))); + connect(hdrCreationManager, SIGNAL(finishedAligning(int)), this, SLOT(finishedAligning(int))); + connect(hdrCreationManager, SIGNAL(ais_failed(QProcess::ProcessError)), this, SLOT(ais_failed(QProcess::ProcessError))); + connect(hdrCreationManager, SIGNAL(aisDataReady(QByteArray)), this, SLOT(writeAisData(QByteArray))); - connect(this,SIGNAL(rejected()),hdrCreationManager,SLOT(removeTempFiles())); + connect(this,SIGNAL(rejected()),hdrCreationManager,SLOT(removeTempFiles())); } 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);;"); - 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)"); - - QString RecentDirInputLDRs = luminance_options.getDefaultPathLdrIn(); - - QStringList files = QFileDialog::getOpenFileNames(this, tr("Select the input images"), RecentDirInputLDRs, 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 (RecentDirInputLDRs != qfi.path()) { - // update internal field variable - RecentDirInputLDRs = qfi.path(); - luminance_options.setDefaultPathLdrIn(RecentDirInputLDRs); - } - //loadImagesButton->setEnabled(false); - m_Ui->confirmloadlabel->setText("

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

    "); - loadInputFiles(files, files.count()); - QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); - } //if (!files.isEmpty()) + 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);;"); + 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)"); + + QString RecentDirInputLDRs = luminance_options.getDefaultPathLdrIn(); + + QStringList files = QFileDialog::getOpenFileNames(this, tr("Select the input images"), RecentDirInputLDRs, 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 (RecentDirInputLDRs != qfi.path()) { + // update internal field variable + RecentDirInputLDRs = qfi.path(); + luminance_options.setDefaultPathLdrIn(RecentDirInputLDRs); + } + //loadImagesButton->setEnabled(false); + m_Ui->confirmloadlabel->setText("

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

    "); + loadInputFiles(files, files.count()); + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); + } //if (!files.isEmpty()) } void HdrWizard::removeImageButtonClicked() { - disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); - int index = m_Ui->tableWidget->currentRow(); + disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); + int index = m_Ui->tableWidget->currentRow(); - if (m_Ui->tableWidget->rowCount() == 1) - { - clearListButtonClicked(); - } - else - { - QString fname = hdrCreationManager->getFileList().at(index); - QFileInfo qfi(fname); - QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - - hdrCreationManager->remove(index); - m_Ui->tableWidget->removeRow(index); - inputHdrFileSelected(m_Ui->tableWidget->currentRow()); - } - connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); + if (m_Ui->tableWidget->rowCount() == 1) + { + clearListButtonClicked(); + } + else + { + QString fname = hdrCreationManager->getFileList().at(index); + QFileInfo qfi(fname); + QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + + hdrCreationManager->remove(index); + m_Ui->tableWidget->removeRow(index); + inputHdrFileSelected(m_Ui->tableWidget->currentRow()); + } + connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); } void HdrWizard::clearListButtonClicked() { - disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); - m_Ui->previewLabel->clear(); - for (int i = m_Ui->tableWidget->rowCount()-1; i >= 0; --i) - m_Ui->tableWidget->removeRow(i); - - QStringList fnames = hdrCreationManager->getFileList(); - int n = fnames.size(); - - for (int i = 0; i < n; i++) { - QString fname = hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); - QFile::remove(thumb_name); - thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); - QFile::remove(thumb_name); - } - - hdrCreationManager->reset(); - m_Ui->removeImageButton->setEnabled(false); - m_Ui->clearListButton->setEnabled(false); - m_Ui->EVgroupBox->setEnabled(false); - m_Ui->alignGroupBox->setEnabled(false); - //EVSlider->setValue(0); - m_Ui->NextFinishButton->setEnabled(false); - m_Ui->progressBar->setValue(0); - m_Ui->progressBar->hide(); - m_Ui->confirmloadlabel->setText("

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

    "); - connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); + disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); + m_Ui->previewLabel->clear(); + for (int i = m_Ui->tableWidget->rowCount()-1; i >= 0; --i) + m_Ui->tableWidget->removeRow(i); + + QStringList fnames = hdrCreationManager->getFileList(); + int n = fnames.size(); + + for (int i = 0; i < n; i++) { + QString fname = hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(luminance_options.getTempDir() + "/"+ qfi.completeBaseName() + ".thumb.jpg"); + QFile::remove(thumb_name); + thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); + QFile::remove(thumb_name); + } + + hdrCreationManager->reset(); + m_Ui->removeImageButton->setEnabled(false); + m_Ui->clearListButton->setEnabled(false); + m_Ui->EVgroupBox->setEnabled(false); + m_Ui->alignGroupBox->setEnabled(false); + //EVSlider->setValue(0); + m_Ui->NextFinishButton->setEnabled(false); + m_Ui->progressBar->setValue(0); + m_Ui->progressBar->hide(); + m_Ui->confirmloadlabel->setText("

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

    "); + connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); } void HdrWizard::dragEnterEvent(QDragEnterEvent *event) { - if (m_Ui->loadImagesButton->isEnabled()) - event->acceptProposedAction(); + if (m_Ui->loadImagesButton->isEnabled()) + event->acceptProposedAction(); +} + +void HdrWizard::dropEvent(QDropEvent *event) +{ + if (event->mimeData()->hasUrls()) + { + QStringList files = convertUrlListToFilenameList(event->mimeData()->urls()); + if (files.size() > 0) + loadInputFiles(files, files.size()); + } + event->acceptProposedAction(); +} + +void HdrWizard::loadInputFiles(const QStringList& files, int count) +{ + int shift = m_Ui->tableWidget->rowCount(); + m_Ui->tableWidget->setEnabled(false); + m_Ui->tableWidget->setRowCount(shift + count); + m_Ui->progressBar->setMaximum(count); + m_Ui->progressBar->setValue(0); + //connect(hdrCreationManager, SIGNAL(maximumValue(int)), progressBar, SLOT(setMaximum(int))); + //connect(hdrCreationManager, SIGNAL(nextstep(int)), progressBar, SLOT(setValue(int))); + m_Ui->progressBar->show(); + + hdrCreationManager->setShift(shift); + hdrCreationManager->setFileList(files); + hdrCreationManager->loadInputFiles(); +} + +void HdrWizard::fileLoaded(int index, const QString& fname, float expotime) +{ + qDebug("WIZ: fileLoaded, expotimes[%d]=%f --- EV=%f", + index, expotime, log2f(expotime)); + + updateGraphicalEVvalue(expotime,index); + m_inputFilesName.push_back(fname); + m_inputExpoTimes.push_back(expotime); + //fill graphical list + QFileInfo qfi(fname); + m_Ui->tableWidget->setItem(index, 0, new QTableWidgetItem(qfi.fileName())); + // increment progressbar + m_Ui->progressBar->setValue(m_Ui->progressBar->value()+1); +} + +void HdrWizard::finishedLoadingInputFiles(const QStringList& filesLackingExif) +{ + if (filesLackingExif.size() == 0) + { + m_Ui->NextFinishButton->setEnabled(true); + m_Ui->confirmloadlabel->setText(tr("

    Images Loaded.

    ")); + } + else + { + QString warning_message = (QString(tr("

    WARNING:

    \ + Luminance HDR was not able to find the relevant EXIF tags\nfor the following images:\n
      \ + %1
    \ +
    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\nthe following exif data: \ +
    • Shutter Speed (seconds)
    • \ +
    • Aperture (f-number)
    \ +
    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."))).arg(filesLackingExif.join("")); + QMessageBox::warning(this,tr("EXIF data not found"),warning_message); + m_Ui->confirmloadlabel->setText(QString(tr("

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

    ")).arg(filesLackingExif.size())); + } + //do not load any more images + //loadImagesButton->setEnabled(false); + //graphical fix + m_Ui->tableWidget->resizeColumnsToContents(); + //enable user EV input + m_Ui->EVgroupBox->setEnabled(true); + m_Ui->tableWidget->selectRow(0); + m_Ui->tableWidget->setEnabled(true); + + //FIXME mtb doesn't work with 16bit data yet (and probably ever) + if ((m_Ui->tableWidget->rowCount() >= 2) && (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE)) { + m_Ui->alignCheckBox->setEnabled(true); + m_Ui->alignGroupBox->setEnabled(true); + } + else if ((m_Ui->tableWidget->rowCount() >= 2) && (hdrCreationManager->inputImageType() == HdrCreationManager::MDR_INPUT_TYPE)) { + m_Ui->alignCheckBox->setEnabled(true); + m_Ui->alignGroupBox->setEnabled(true); + m_Ui->mtb_radioButton->setEnabled(false); + } + m_Ui->removeImageButton->setEnabled(true); + m_Ui->clearListButton->setEnabled(true); + m_Ui->progressBar->hide(); + QApplication::restoreOverrideCursor(); +} + +void HdrWizard::errorWhileLoading(const QString& error) +{ + disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), + this, SLOT(inputHdrFileSelected(int))); + + m_Ui->tableWidget->clear(); + m_Ui->tableWidget->setRowCount(0); + m_Ui->tableWidget->setEnabled(true); + m_Ui->progressBar->setValue(0); + m_Ui->progressBar->hide(); + m_Ui->previewLabel->clear(); + m_Ui->removeImageButton->setEnabled(false); + m_Ui->clearListButton->setEnabled(false); + m_Ui->NextFinishButton->setEnabled(false); + m_Ui->EVgroupBox->setEnabled(false); + QMessageBox::critical(this,tr("Loading Error: "), error); + hdrCreationManager->clearlists(true); + QApplication::restoreOverrideCursor(); + + m_Ui->confirmloadlabel->setText("

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

    "); + + connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), + this, SLOT(inputHdrFileSelected(int))); } -void HdrWizard::dropEvent(QDropEvent *event) { +void HdrWizard::updateGraphicalEVvalue(float expotime, int index_in_table) +{ + qDebug("WIZ: updateGraphicalEVvalue EV[%d]=%f", + index_in_table, log2f(expotime)); + + if (expotime != -1) + { + QString EVdisplay; + QTextStream ts(&EVdisplay); + ts.setRealNumberPrecision(2); + ts << right << forcesign << fixed << log2f(expotime) << " EV"; + QTableWidgetItem *tableitem = new QTableWidgetItem(EVdisplay); + tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_Ui->tableWidget->setItem(index_in_table,1,tableitem); + } + else + { + //if image doesn't contain (the required) exif tags + QTableWidgetItem *tableitem = new QTableWidgetItem(QString(tr("Unknown"))); + tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); + tableitem->setBackground(QBrush(Qt::yellow)); + tableitem->setForeground(QBrush(Qt::red)); + m_Ui->tableWidget->setItem(index_in_table,1,tableitem); + } +} + +void HdrWizard::finishedAligning(int exitcode) +{ + QApplication::restoreOverrideCursor(); + if (exitcode != 0) + { + QMessageBox::warning(this, tr("Error..."), + tr("align_image_stack failed to align images.")); + } + m_Ui->NextFinishButton->setEnabled(true); + m_Ui->pagestack->setCurrentIndex(2); + m_Ui->progressBar->hide(); +} + +void HdrWizard::ais_failed(QProcess::ProcessError e) +{ + 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; + } + m_Ui->progressBar->hide(); + m_Ui->textEdit->hide(); + QApplication::restoreOverrideCursor(); + m_Ui->alignGroupBox->setEnabled(true); + m_Ui->alignCheckBox->setChecked(false); + m_Ui->NextFinishButton->setEnabled(true); + m_Ui->confirmloadlabel->setText("

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

    "); +} + +void HdrWizard::customConfigCheckBoxToggled(bool want_custom) +{ + if (!want_custom) + { + if (!m_Ui->antighostingCheckBox->isChecked()) + { + m_Ui->label_RespCurve_Antighost->setDisabled(true); + m_Ui->antighostRespCurveCombobox->setDisabled(true); + m_Ui->label_Iterations->setDisabled(true); + m_Ui->spinBoxIterations->setDisabled(true); + //temporary disable anti-ghosting until it's fixed + m_Ui->antighostingCheckBox->setDisabled(true); + } + else + { + m_Ui->label_predef_configs->setDisabled(true); + m_Ui->predefConfigsComboBox->setDisabled(true); + m_Ui->label_weights->setDisabled(true); + m_Ui->lineEdit_showWeight->setDisabled(true); + m_Ui->label_resp->setDisabled(true); + m_Ui->lineEdit_show_resp->setDisabled(true); + m_Ui->label_model->setDisabled(true); + m_Ui->lineEdit_showmodel->setDisabled(true); + } + predefConfigsComboBoxActivated(m_Ui->predefConfigsComboBox->currentIndex()); + m_Ui->NextFinishButton->setText(tr("&Finish")); + } + else + { + m_Ui->NextFinishButton->setText(tr("&Next >")); + } +} - if (event->mimeData()->hasUrls()) { - QStringList files = convertUrlListToFilenameList(event->mimeData()->urls()); - if (files.size() > 0) - loadInputFiles(files, files.size()); - } - event->acceptProposedAction(); -} - -void HdrWizard::loadInputFiles(QStringList files, int count) { - int shift = m_Ui->tableWidget->rowCount(); - m_Ui->tableWidget->setEnabled(false); - m_Ui->tableWidget->setRowCount(shift + count); - m_Ui->progressBar->setMaximum(count); - m_Ui->progressBar->setValue(0); - //connect(hdrCreationManager, SIGNAL(maximumValue(int)), progressBar, SLOT(setMaximum(int))); - //connect(hdrCreationManager, SIGNAL(nextstep(int)), progressBar, SLOT(setValue(int))); - m_Ui->progressBar->show(); - - hdrCreationManager->setShift(shift); - hdrCreationManager->setFileList(files); - hdrCreationManager->loadInputFiles(); -} - -void HdrWizard::fileLoaded(int index, QString fname, float expotime) { - qDebug("WIZ: fileLoaded, expotimes[%d]=%f --- EV=%f",index,expotime,log2f(expotime)); - updateGraphicalEVvalue(expotime,index); - //fill graphical list - QFileInfo qfi(fname); - m_Ui->tableWidget->setItem(index,0,new QTableWidgetItem(qfi.fileName())); - m_Ui->progressBar->setValue(m_Ui->progressBar->value()+1); // increment progressbar -} - -void HdrWizard::finishedLoadingInputFiles(QStringList filesLackingExif) { - if (filesLackingExif.size() == 0) { - m_Ui->NextFinishButton->setEnabled(true); - m_Ui->confirmloadlabel->setText(tr("

    Images Loaded.

    ")); - } else { - QString warning_message = (QString(tr("

    WARNING:

    \ - Luminance HDR was not able to find the relevant EXIF tags\nfor the following images:\n
      \ - %1
    \ -
    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\nthe following exif data: \ -
    • Shutter Speed (seconds)
    • \ -
    • Aperture (f-number)
    \ -
    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."))).arg(filesLackingExif.join("")); - QMessageBox::warning(this,tr("EXIF data not found"),warning_message); - m_Ui->confirmloadlabel->setText(QString(tr("

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

    ")).arg(filesLackingExif.size())); - } - //do not load any more images - //loadImagesButton->setEnabled(false); - //graphical fix - m_Ui->tableWidget->resizeColumnsToContents(); - //enable user EV input - m_Ui->EVgroupBox->setEnabled(true); - m_Ui->tableWidget->selectRow(0); - m_Ui->tableWidget->setEnabled(true); - - //FIXME mtb doesn't work with 16bit data yet (and probably ever) - if ((m_Ui->tableWidget->rowCount() >= 2) && (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE)) { - m_Ui->alignCheckBox->setEnabled(true); - m_Ui->alignGroupBox->setEnabled(true); - } - else if ((m_Ui->tableWidget->rowCount() >= 2) && (hdrCreationManager->inputImageType() == HdrCreationManager::MDR_INPUT_TYPE)) { - m_Ui->alignCheckBox->setEnabled(true); - m_Ui->alignGroupBox->setEnabled(true); - m_Ui->mtb_radioButton->setEnabled(false); - } - m_Ui->removeImageButton->setEnabled(true); - m_Ui->clearListButton->setEnabled(true); - m_Ui->progressBar->hide(); - QApplication::restoreOverrideCursor(); -} - -void HdrWizard::errorWhileLoading(QString error) { - disconnect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); - m_Ui->tableWidget->clear(); - m_Ui->tableWidget->setRowCount(0); - m_Ui->tableWidget->setEnabled(true); - m_Ui->progressBar->setValue(0); - m_Ui->progressBar->hide(); - m_Ui->previewLabel->clear(); - m_Ui->removeImageButton->setEnabled(false); - m_Ui->clearListButton->setEnabled(false); - m_Ui->NextFinishButton->setEnabled(false); - m_Ui->EVgroupBox->setEnabled(false); - QMessageBox::critical(this,tr("Loading Error: "), error); - hdrCreationManager->clearlists(true); - QApplication::restoreOverrideCursor(); - m_Ui->confirmloadlabel->setText("

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

    "); - connect(m_Ui->tableWidget, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(inputHdrFileSelected(int))); -} - -void HdrWizard::updateGraphicalEVvalue(float expotime, int index_in_table) { - qDebug("WIZ: updateGraphicalEVvalue EV[%d]=%f",index_in_table,log2f(expotime)); - if (expotime != -1) { - QString EVdisplay; - QTextStream ts(&EVdisplay); - ts.setRealNumberPrecision(2); - ts << right << forcesign << fixed << log2f(expotime) << " EV"; - QTableWidgetItem *tableitem = new QTableWidgetItem(EVdisplay); - tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); - m_Ui->tableWidget->setItem(index_in_table,1,tableitem); - } else { - //if image doesn't contain (the required) exif tags - QTableWidgetItem *tableitem = new QTableWidgetItem(QString(tr("Unknown"))); - tableitem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); - tableitem->setBackground(QBrush(Qt::yellow)); - tableitem->setForeground(QBrush(Qt::red)); - m_Ui->tableWidget->setItem(index_in_table,1,tableitem); - } -} - -void HdrWizard::finishedAligning(int exitcode) { - QApplication::restoreOverrideCursor(); - if (exitcode != 0) - QMessageBox::warning(this,tr("Error..."),tr("align_image_stack failed to align images.")); - m_Ui->NextFinishButton->setEnabled(true); - m_Ui->pagestack->setCurrentIndex(2); - m_Ui->progressBar->hide(); -} - -void HdrWizard::ais_failed(QProcess::ProcessError e) { - 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; - } - m_Ui->progressBar->hide(); - m_Ui->textEdit->hide(); - QApplication::restoreOverrideCursor(); - m_Ui->alignGroupBox->setEnabled(true); - m_Ui->alignCheckBox->setChecked(false); - m_Ui->NextFinishButton->setEnabled(true); - m_Ui->confirmloadlabel->setText("

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

    "); -} - -void HdrWizard::customConfigCheckBoxToggled(bool want_custom) { - if (!want_custom) { - if (!m_Ui->antighostingCheckBox->isChecked()) { - m_Ui->label_RespCurve_Antighost->setDisabled(true); - m_Ui->antighostRespCurveCombobox->setDisabled(true); - m_Ui->label_Iterations->setDisabled(true); - m_Ui->spinBoxIterations->setDisabled(true); - //temporary disable anti-ghosting until it's fixed - m_Ui->antighostingCheckBox->setDisabled(true); - } - else { - m_Ui->label_predef_configs->setDisabled(true); - m_Ui->predefConfigsComboBox->setDisabled(true); - m_Ui->label_weights->setDisabled(true); - m_Ui->lineEdit_showWeight->setDisabled(true); - m_Ui->label_resp->setDisabled(true); - m_Ui->lineEdit_show_resp->setDisabled(true); - m_Ui->label_model->setDisabled(true); - m_Ui->lineEdit_showmodel->setDisabled(true); - } - predefConfigsComboBoxActivated(m_Ui->predefConfigsComboBox->currentIndex()); - m_Ui->NextFinishButton->setText(tr("&Finish")); - } else { - m_Ui->NextFinishButton->setText(tr("&Next >")); - } -} - -void HdrWizard::predefRespCurveRadioButtonToggled(bool want_predef_resp_curve) { - if (want_predef_resp_curve) { - //ENABLE load_curve_button and lineedit when "load from file" is checked. - if (!m_Ui->loadRespCurveFromFileCheckbox->isChecked()) { - m_Ui->loadRespCurveFileButton->setEnabled(false); - m_Ui->RespCurveFileLoadedLineEdit->setEnabled(false); - } - loadRespCurveFromFileCheckboxToggled(m_Ui->loadRespCurveFromFileCheckbox->isChecked()); - } else { //want to recover response curve via robertson02 - //update hdrCreationManager->chosen_config - hdrCreationManager->chosen_config.response_curve = FROM_ROBERTSON; - //always enable - m_Ui->NextFinishButton->setEnabled(true); - saveRespCurveToFileCheckboxToggled(m_Ui->saveRespCurveToFileCheckbox->isChecked()); - } +void HdrWizard::predefRespCurveRadioButtonToggled(bool want_predef_resp_curve) +{ + if (want_predef_resp_curve) { + //ENABLE load_curve_button and lineedit when "load from file" is checked. + if (!m_Ui->loadRespCurveFromFileCheckbox->isChecked()) { + m_Ui->loadRespCurveFileButton->setEnabled(false); + m_Ui->RespCurveFileLoadedLineEdit->setEnabled(false); + } + loadRespCurveFromFileCheckboxToggled(m_Ui->loadRespCurveFromFileCheckbox->isChecked()); + } else { //want to recover response curve via robertson02 + //update hdrCreationManager->chosen_config + hdrCreationManager->chosen_config.response_curve = FROM_ROBERTSON; + //always enable + m_Ui->NextFinishButton->setEnabled(true); + saveRespCurveToFileCheckboxToggled(m_Ui->saveRespCurveToFileCheckbox->isChecked()); + } } void HdrWizard::loadRespCurveFromFileCheckboxToggled( bool checkedfile ) { - //if checkbox is checked AND we have a valid filename - if (checkedfile && loadcurvefilename != "") { - //update chosen config - hdrCreationManager->chosen_config.response_curve = FROM_FILE; - hdrCreationManager->chosen_config.LoadCurveFromFilename = strdup(QFile::encodeName(loadcurvefilename).constData()); - //and ENABLE nextbutton - m_Ui->NextFinishButton->setEnabled(true); - } - //if checkbox is checked AND no valid filename - else if (checkedfile && loadcurvefilename == "") { - // DISABLE nextbutton until situation is fixed - m_Ui->NextFinishButton->setEnabled(false); -// qDebug("Load checkbox is checked AND no valid filename"); - } - //checkbox not checked - else { - // update chosen config - hdrCreationManager->chosen_config.response_curve = responses_in_gui[m_Ui->gammaLinLogComboBox->currentIndex()]; - hdrCreationManager->chosen_config.LoadCurveFromFilename = ""; - //and ENABLE nextbutton - m_Ui->NextFinishButton->setEnabled(true); - } + //if checkbox is checked AND we have a valid filename + if (checkedfile && loadcurvefilename != "") { + //update chosen config + hdrCreationManager->chosen_config.response_curve = FROM_FILE; + hdrCreationManager->chosen_config.LoadCurveFromFilename = strdup(QFile::encodeName(loadcurvefilename).constData()); + //and ENABLE nextbutton + m_Ui->NextFinishButton->setEnabled(true); + } + //if checkbox is checked AND no valid filename + else if (checkedfile && loadcurvefilename == "") { + // DISABLE nextbutton until situation is fixed + m_Ui->NextFinishButton->setEnabled(false); +// qDebug("Load checkbox is checked AND no valid filename"); + } + //checkbox not checked + else { + // update chosen config + hdrCreationManager->chosen_config.response_curve = responses_in_gui[m_Ui->gammaLinLogComboBox->currentIndex()]; + hdrCreationManager->chosen_config.LoadCurveFromFilename = ""; + //and ENABLE nextbutton + m_Ui->NextFinishButton->setEnabled(true); + } } void HdrWizard::saveRespCurveToFileCheckboxToggled( bool checkedfile ) { - //if checkbox is checked AND we have a valid filename - if (checkedfile && savecurvefilename != "") { - hdrCreationManager->chosen_config.SaveCurveToFilename = strdup(QFile::encodeName(savecurvefilename).constData()); - m_Ui->NextFinishButton->setEnabled(true); - } - //if checkbox is checked AND no valid filename - else if (checkedfile && savecurvefilename == "") { - // DISABLE nextbutton until situation is fixed - m_Ui->NextFinishButton->setEnabled(false); - } - //checkbox not checked - else { - hdrCreationManager->chosen_config.SaveCurveToFilename = ""; - //and ENABLE nextbutton - m_Ui->NextFinishButton->setEnabled(true); - } + //if checkbox is checked AND we have a valid filename + if (checkedfile && savecurvefilename != "") { + hdrCreationManager->chosen_config.SaveCurveToFilename = strdup(QFile::encodeName(savecurvefilename).constData()); + m_Ui->NextFinishButton->setEnabled(true); + } + //if checkbox is checked AND no valid filename + else if (checkedfile && savecurvefilename == "") { + // DISABLE nextbutton until situation is fixed + m_Ui->NextFinishButton->setEnabled(false); + } + //checkbox not checked + else { + hdrCreationManager->chosen_config.SaveCurveToFilename = ""; + //and ENABLE nextbutton + m_Ui->NextFinishButton->setEnabled(true); + } } void HdrWizard::NextFinishButtonClicked() { - int currentpage = m_Ui->pagestack->currentIndex(); - switch (currentpage) { - case 0: - m_Ui->pagestack->setCurrentIndex(1); - m_Ui->NextFinishButton->setDisabled(true); - break; - case 1: - //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->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->textEdit->show(); - hdrCreationManager->align_with_ais(); - } - else - hdrCreationManager->align_with_mtb(); - return; - } - m_Ui->pagestack->setCurrentIndex(2); - break; - case 2: - if(!m_Ui->customConfigCheckBox->isChecked()) { - currentpage = 3; - } else { - m_Ui->pagestack->setCurrentIndex(3); - break; - } - case 3: - m_Ui->settings_label->setText("

    "+tr("Processing...")+"

    "); - m_Ui->customize_label->setText("

    "+tr("Processing...")+"

    "); - repaint(); - QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); - PfsFrameHDR = hdrCreationManager->createHdr(m_Ui->antighostingCheckBox->isChecked(),m_Ui->spinBoxIterations->value()); - QApplication::restoreOverrideCursor(); - accept(); - return; - } + int currentpage = m_Ui->pagestack->currentIndex(); + switch (currentpage) { + case 0: + m_Ui->pagestack->setCurrentIndex(1); + m_Ui->NextFinishButton->setDisabled(true); + break; + case 1: + //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->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->textEdit->show(); + hdrCreationManager->set_ais_crop_flag(m_Ui->autoCropCheckBox->isChecked()); + hdrCreationManager->align_with_ais(); + } + else + hdrCreationManager->align_with_mtb(); + return; + } + m_Ui->pagestack->setCurrentIndex(2); + break; + case 2: + if(!m_Ui->customConfigCheckBox->isChecked()) { + currentpage = 3; + } else { + m_Ui->pagestack->setCurrentIndex(3); + break; + } + case 3: + m_Ui->settings_label->setText("

    "+tr("Processing...")+"

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

    "+tr("Processing...")+"

    "); + repaint(); + QApplication::setOverrideCursor(QCursor(Qt::BusyCursor)); + PfsFrameHDR = hdrCreationManager->createHdr(m_Ui->antighostingCheckBox->isChecked(),m_Ui->spinBoxIterations->value()); + QApplication::restoreOverrideCursor(); + accept(); + return; + } } void HdrWizard::currentPageChangedInto(int newindex) { - //predefined configs page - // m_Ui->textEdit->hide(); - if (newindex == 2) { - hdrCreationManager->removeTempFiles(); - m_Ui->NextFinishButton->setText(tr("&Finish")); - //when at least 2 LDR inputs perform Manual Alignment - int numldrs = hdrCreationManager->getLDRList().size(); - //if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE && numldrs >= 2) { - if (numldrs >= 2) { - this->setDisabled(true); - //fix for some platforms/Qt versions: makes sure LDR images have alpha channel - if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) - hdrCreationManager->makeSureLDRsHaveAlpha(); - EditingTools *editingtools = new EditingTools(hdrCreationManager); - if (editingtools->exec() == QDialog::Accepted) { - this->setDisabled(false); - } else { - emit reject(); - } - delete editingtools; - } - } - else if (newindex == 3) { //custom config - predefConfigsComboBoxActivated(1); - m_Ui->NextFinishButton->setText(tr("&Finish")); - return; - } + //predefined configs page + // m_Ui->textEdit->hide(); + if (newindex == 2) { + hdrCreationManager->removeTempFiles(); + m_Ui->NextFinishButton->setText(tr("&Finish")); + //when at least 2 LDR or MDR inputs perform Manual Alignment + int numldrs; + if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) + numldrs = hdrCreationManager->getLDRList().size(); + else + numldrs = hdrCreationManager->getMDRList().size(); + + qDebug() << "numldrs = " << numldrs; + //if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE && numldrs >= 2) { + if (numldrs >= 2) { + this->setDisabled(true); + //fix for some platforms/Qt versions: makes sure LDR images have alpha channel + if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) + hdrCreationManager->makeSureLDRsHaveAlpha(); + EditingTools *editingtools = new EditingTools(hdrCreationManager); + if (editingtools->exec() == QDialog::Accepted) { + this->setDisabled(false); + } else { + emit reject(); + } + delete editingtools; + } + } + else if (newindex == 3) { //custom config + predefConfigsComboBoxActivated(1); + m_Ui->NextFinishButton->setText(tr("&Finish")); + return; + } } void HdrWizard::antighostRespCurveComboboxActivated(int fromgui) { - gammaLinLogComboBoxActivated(fromgui); + gammaLinLogComboBoxActivated(fromgui); } void HdrWizard::loadRespCurveFileButtonClicked() { - loadcurvefilename = QFileDialog::getOpenFileName( - this, - tr("Load a camera response curve file"), - QDir::currentPath(), - tr("Camera response curve (*.m);;All Files (*)") ); - if (!loadcurvefilename.isEmpty()) { - m_Ui->RespCurveFileLoadedLineEdit->setText(loadcurvefilename); - loadRespCurveFromFileCheckboxToggled(m_Ui->loadRespCurveFromFileCheckbox->isChecked()); - } + loadcurvefilename = QFileDialog::getOpenFileName( + this, + tr("Load a camera response curve file"), + QDir::currentPath(), + tr("Camera response curve (*.m);;All Files (*)") ); + if (!loadcurvefilename.isEmpty()) { + m_Ui->RespCurveFileLoadedLineEdit->setText(loadcurvefilename); + loadRespCurveFromFileCheckboxToggled(m_Ui->loadRespCurveFromFileCheckbox->isChecked()); + } } void HdrWizard::saveRespCurveFileButtonClicked() { - savecurvefilename = QFileDialog::getSaveFileName( - this, - tr("Save a camera response curve file"), - QDir::currentPath(), - tr("Camera response curve (*.m);;All Files (*)") ); - if (!savecurvefilename.isEmpty()) { - m_Ui->CurveFileNameSaveLineEdit->setText(savecurvefilename); - saveRespCurveToFileCheckboxToggled(m_Ui->saveRespCurveToFileCheckbox->isChecked()); - } + savecurvefilename = QFileDialog::getSaveFileName( + this, + tr("Save a camera response curve file"), + QDir::currentPath(), + tr("Camera response curve (*.m);;All Files (*)") ); + if (!savecurvefilename.isEmpty()) { + m_Ui->CurveFileNameSaveLineEdit->setText(savecurvefilename); + saveRespCurveToFileCheckboxToggled(m_Ui->saveRespCurveToFileCheckbox->isChecked()); + } } void HdrWizard::predefConfigsComboBoxActivated( int index_from_gui ) { - hdrCreationManager->chosen_config = predef_confs[index_from_gui]; - m_Ui->lineEdit_showWeight->setText(getQStringFromConfig(1)); - m_Ui->lineEdit_show_resp->setText(getQStringFromConfig(2)); - m_Ui->lineEdit_showmodel->setText(getQStringFromConfig(3)); + if (index_from_gui <= 5) { + hdrCreationManager->chosen_config = predef_confs[index_from_gui]; + } + else { + hdrCreationManager->chosen_config = m_customConfig[index_from_gui - 6]; + } + m_Ui->lineEdit_showWeight->setText(getQStringFromConfig(1)); + m_Ui->lineEdit_show_resp->setText(getQStringFromConfig(2)); + m_Ui->lineEdit_showmodel->setText(getQStringFromConfig(3)); } void HdrWizard::triGaussPlateauComboBoxActivated(int from_gui) { - hdrCreationManager->chosen_config.weights = weights_in_gui[from_gui]; + hdrCreationManager->chosen_config.weights = weights_in_gui[from_gui]; } void HdrWizard::gammaLinLogComboBoxActivated(int from_gui) { - hdrCreationManager->chosen_config.response_curve = responses_in_gui[from_gui]; + hdrCreationManager->chosen_config.response_curve = responses_in_gui[from_gui]; } void HdrWizard::modelComboBoxActivated(int from_gui) { - hdrCreationManager->chosen_config.model = models_in_gui[from_gui]; + hdrCreationManager->chosen_config.model = models_in_gui[from_gui]; } void HdrWizard::loadRespCurveFilename( const QString & filename_from_gui) { - if (!filename_from_gui.isEmpty()) { - hdrCreationManager->chosen_config.response_curve = FROM_FILE; - hdrCreationManager->chosen_config.LoadCurveFromFilename = strdup(QFile::encodeName(filename_from_gui).constData()); - } + if (!filename_from_gui.isEmpty()) { + hdrCreationManager->chosen_config.response_curve = FROM_FILE; + hdrCreationManager->chosen_config.LoadCurveFromFilename = strdup(QFile::encodeName(filename_from_gui).constData()); + } } QString HdrWizard::getCaptionTEXT() { - return tr("Weights: ")+getQStringFromConfig(1) + tr(" - Response curve: ") + getQStringFromConfig(2) + tr(" - Model: ") + getQStringFromConfig(3); + return tr("Weights: ")+getQStringFromConfig(1) + tr(" - Response curve: ") + getQStringFromConfig(2) + tr(" - Model: ") + getQStringFromConfig(3); +} + +QStringList HdrWizard::getInputFilesNames() +{ + return m_inputFilesName; } QString HdrWizard::getQStringFromConfig( int type ) { - if (type == 1) { //return String for weights - switch (hdrCreationManager->chosen_config.weights) { - case TRIANGULAR: - return tr("Triangular"); - case PLATEAU: - return tr("Plateau"); - case GAUSSIAN: - return tr("Gaussian"); - } - } else if (type == 2) { //return String for response curve - switch (hdrCreationManager->chosen_config.response_curve) { - case LINEAR: - return tr("Linear"); - case GAMMA: - return tr("Gamma"); - case LOG10: - return tr("Logarithmic"); - case FROM_ROBERTSON: - return tr("From Calibration"); - case FROM_FILE: - return tr("From File"); - } - } else if (type == 3) { //return String for model - switch (hdrCreationManager->chosen_config.model) { - case DEBEVEC: - return tr("Debevec"); - case ROBERTSON: - return tr("Robertson"); - } - } else return ""; + if (type == 1) { //return String for weights + switch (hdrCreationManager->chosen_config.weights) { + case TRIANGULAR: + return tr("Triangular"); + case PLATEAU: + return tr("Plateau"); + case GAUSSIAN: + return tr("Gaussian"); + } + } else if (type == 2) { //return String for response curve + switch (hdrCreationManager->chosen_config.response_curve) { + case LINEAR: + return tr("Linear"); + case GAMMA: + return tr("Gamma"); + case LOG10: + return tr("Logarithmic"); + case FROM_ROBERTSON: + return tr("From Calibration"); + case FROM_FILE: + return tr("From File: ") + hdrCreationManager->chosen_config.LoadCurveFromFilename; + } + } else if (type == 3) { //return String for model + switch (hdrCreationManager->chosen_config.model) { + case DEBEVEC: + return tr("Debevec"); + case ROBERTSON: + return tr("Robertson"); + } + } else return ""; return ""; } //triggered by user interaction void HdrWizard::editingEVfinished() { - //transform from EV value to expotime value - hdrCreationManager->setEV(m_Ui->ImageEVdsb->value(), m_Ui->tableWidget->currentRow()); - if (hdrCreationManager->getFilesLackingExif().size() == 0) { - m_Ui->NextFinishButton->setEnabled(true); - //give an offset to the EV values if they are outside of the -10..10 range. - 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(hdrCreationManager->getFilesLackingExif().size()) ); - } + //transform from EV value to expotime value + hdrCreationManager->setEV(m_Ui->ImageEVdsb->value(), m_Ui->tableWidget->currentRow()); + if (hdrCreationManager->getFilesLackingExif().size() == 0) { + m_Ui->NextFinishButton->setEnabled(true); + //give an offset to the EV values if they are outside of the -10..10 range. + 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(hdrCreationManager->getFilesLackingExif().size()) ); + } } void HdrWizard::inputHdrFileSelected(int i) { - if (hdrCreationManager->isValidEV(i)) - m_Ui->ImageEVdsb->setValue(hdrCreationManager->getEV(i)); - if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { - QImage *image = hdrCreationManager->getLDRList().at(i); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(image->scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - else { // load preview from thumbnail previously created on disk - QString fname = hdrCreationManager->getFileList().at(i); - QFileInfo qfi(fname); - QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.jpg"); - - if (QFile::exists(thumb_name)) - { - QImage thumb_image(thumb_name); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - else - { - QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); - if ( QFile::exists(thumb_name)) { - QImage thumb_image(thumb_name); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - } - } - m_Ui->ImageEVdsb->setFocus(); + if (hdrCreationManager->isValidEV(i)) + m_Ui->ImageEVdsb->setValue(hdrCreationManager->getEV(i)); + if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) { + QImage *image = hdrCreationManager->getLDRList().at(i); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(image->scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + else { // load preview from thumbnail previously created on disk + QString fname = hdrCreationManager->getFileList().at(i); + QFileInfo qfi(fname); + QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.jpg"); + + if (QFile::exists(thumb_name)) + { + QImage thumb_image(thumb_name); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + else + { + QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); + if ( QFile::exists(thumb_name)) { + QImage thumb_image(thumb_name); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + } + } + m_Ui->ImageEVdsb->setFocus(); } void HdrWizard::resizeEvent ( QResizeEvent * ) { - //qDebug() << "void HdrWizard::resizeEvent ( QResizeEvent * )"; - //make sure we ask for a thumbnail only when we need it - if ((m_Ui->pagestack->currentIndex() == 0) && (m_Ui->tableWidget->currentRow() != -1) && (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE)) { - QImage *image = hdrCreationManager->getLDRList().at(m_Ui->tableWidget->currentRow()); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(image->scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - else if ((m_Ui->pagestack->currentIndex() == 0) && (m_Ui->tableWidget->currentRow() != -1) && (hdrCreationManager->inputImageType() != HdrCreationManager::LDR_INPUT_TYPE)) - { // load preview from thumbnail previously created on disk - QString fname = hdrCreationManager->getFileList().at(m_Ui->tableWidget->currentRow()); - QFileInfo qfi(fname); - QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.jpg"); - - if ( QFile::exists(thumb_name)) { - QImage thumb_image(thumb_name); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - else - { - QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); - if ( QFile::exists(thumb_name)) { - QImage thumb_image(thumb_name); - m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); - } - } - } + //qDebug() << "void HdrWizard::resizeEvent ( QResizeEvent * )"; + //make sure we ask for a thumbnail only when we need it + if ((m_Ui->pagestack->currentIndex() == 0) && (m_Ui->tableWidget->currentRow() != -1) && (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE)) { + QImage *image = hdrCreationManager->getLDRList().at(m_Ui->tableWidget->currentRow()); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(image->scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + else if ((m_Ui->pagestack->currentIndex() == 0) && (m_Ui->tableWidget->currentRow() != -1) && (hdrCreationManager->inputImageType() != HdrCreationManager::LDR_INPUT_TYPE)) + { // load preview from thumbnail previously created on disk + QString fname = hdrCreationManager->getFileList().at(m_Ui->tableWidget->currentRow()); + QFileInfo qfi(fname); + QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.jpg"); + + if ( QFile::exists(thumb_name)) { + QImage thumb_image(thumb_name); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + else + { + QString thumb_name = QString(luminance_options.getTempDir() + "/" + qfi.completeBaseName() + ".thumb.ppm"); + if ( QFile::exists(thumb_name)) { + QImage thumb_image(thumb_name); + m_Ui->previewLabel->setPixmap(QPixmap::fromImage(thumb_image.scaled(m_Ui->previewLabel->size(), Qt::KeepAspectRatio))); + } + } + } } +void HdrWizard::alignSelectionClicked() +{ + m_Ui->autoCropCheckBox->setEnabled(m_Ui->ais_radioButton->isChecked()); +} void HdrWizard::reject() { - QApplication::restoreOverrideCursor(); - QDialog::reject(); + QApplication::restoreOverrideCursor(); + QDialog::reject(); } 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); - } else if (event->key() == Qt::Key_Escape) { - emit reject(); - } + 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); + } else if (event->key() == Qt::Key_Escape) { + emit reject(); + } } void HdrWizard::writeAisData(QByteArray data) { - qDebug() << data; - m_Ui->textEdit->append(data); + qDebug() << data; + m_Ui->textEdit->append(data); } +void HdrWizard::on_pushButtonSaveSettings_clicked() +{ + QSqlQuery query; + 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; + response_filename = m_Ui->RespCurveFileLoadedLineEdit->text(); + } + else + response = FROM_ROBERTSON; + + int model = m_Ui->modelComboBox->currentIndex(); + + query.prepare("INSERT INTO parameters (weight, response, model, filename) " + "VALUES (:weight, :response, :model, :filename)"); + qDebug() << "Prepare: " << query.lastError(); + query.bindValue(":weight", weight); + query.bindValue(":response", response); + query.bindValue(":model", model); + query.bindValue(":filename", response_filename); + bool res = query.exec(); + if (res == false) + qDebug() << "Insert: " << query.lastError(); + m_Ui->pushButtonSaveSettings->setEnabled(false); +} diff -Nru luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.h luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.h --- luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.h 2013-04-07 18:41:14.000000000 +0000 @@ -30,6 +30,7 @@ #include #include +#include #include "Common/LuminanceOptions.h" #include "Common/global.h" @@ -44,13 +45,22 @@ class HdrWizard : public QDialog { -Q_OBJECT + Q_OBJECT public: - HdrWizard(QWidget *parent, QStringList files); - ~HdrWizard(); - pfs::Frame* getPfsFrameHDR() {return PfsFrameHDR;} - QString getCaptionTEXT(); + HdrWizard(QWidget *parent, + const QStringList &files, + const QStringList &inputFilesName, + const QVector &inputExpoTimes); + ~HdrWizard(); + + //! \brief get the current PFS Frame + pfs::Frame* getPfsFrameHDR() + { return PfsFrameHDR; } + + //! \brief return the caption text + QString getCaptionTEXT(); + QStringList getInputFilesNames(); protected: void resizeEvent(QResizeEvent *); @@ -70,21 +80,24 @@ //the new hdr, returned by the HdrCreationManager class pfs::Frame* PfsFrameHDR; QString loadcurvefilename,savecurvefilename; + QStringList m_inputFilesName; + QVector m_inputExpoTimes; //hdr creation parameters TResponse responses_in_gui[4]; TModel models_in_gui[2]; TWeight weights_in_gui[3]; + QVector m_customConfig; QScopedPointer m_Ui; private slots: - void loadInputFiles(QStringList files, int count); + void loadInputFiles(const QStringList& files, int count); - void fileLoaded(int index, QString fname, float expotime); - void finishedLoadingInputFiles(QStringList NoExifFiles); - void errorWhileLoading(QString errormessage); + void fileLoaded(int index, const QString& fname, float expotime); + void finishedLoadingInputFiles(const QStringList& NoExifFiles); + void errorWhileLoading(const QString& errormessage); void updateGraphicalEVvalue(float expotime, int index_in_table); void finishedAligning(int); @@ -92,6 +105,7 @@ void loadImagesButtonClicked(); void removeImageButtonClicked(); void clearListButtonClicked(); + void alignSelectionClicked(); void inputHdrFileSelected(int); void predefConfigsComboBoxActivated(int); void antighostRespCurveComboboxActivated(int); @@ -112,5 +126,6 @@ void ais_failed(QProcess::ProcessError); void writeAisData(QByteArray data); void setupConnections(); + void on_pushButtonSaveSettings_clicked(); }; #endif diff -Nru luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.ui luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.ui --- luminance-hdr-2.3.0/src/HdrWizard/HdrWizard.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/HdrWizard.ui 2013-04-07 18:41:14.000000000 +0000 @@ -15,7 +15,7 @@
    - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png @@ -127,7 +127,7 @@ <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:16pt; font-weight:600;">HDR Creation Wizard</span></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; font-size:16pt; font-weight:600;"></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; font-size:16pt; font-weight:600;"></p> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool help you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This tool helps you in fusing bracketed images taken with different exposures to make an <a href="http://en.wikipedia.org/wiki/High_Dynamic_Range"><span style=" text-decoration: underline; color:#0057ae;">HDR Image</span></a>. </p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The bracketed images must be taken with the same camera in the same conditions and possibly using a tripod.</p> <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> @@ -534,14 +534,11 @@ 9 - - - 6 - + 6 - + false @@ -557,7 +554,7 @@ - + Hugin's align_image_stack @@ -567,13 +564,26 @@ - + MTB + + + + + 0 + 0 + + + + Auto-crop + + + @@ -638,398 +648,391 @@ [2/2] Choose Settings for HDR Creation - + - + - 6 + 14 - 9 + 6 - - - 14 + + + Choose one of the predefined profiles: - - 6 + + Qt::AlignJustify|Qt::AlignVCenter - - - - Choose one of the predefined profiles: - - - Qt::AlignJustify|Qt::AlignVCenter - - - true - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + true + + + + + + + <!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:'DejaVu 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';">The first predefined profile in the list usually leads to best results. Change it only if the resulting HDR image is not good enough.</span></p></body></html> - - - - Profile 1 - - - - - Profile 2 - - - - - Profile 3 - - - - - Profile 4 - - - - - Profile 5 - - - - - Profile 6 - - - - - - - - - - 6 - - - 6 - - - Weighting function: - - + + Profile 1 + - - - Qt::Horizontal - - - - 112 - 20 - - - + + Profile 2 + - - - - 0 - 0 - - - - Triangular - - - Qt::AlignHCenter - - - true - - + + Profile 3 + - - - - - - 6 - - - 6 - - - - Response curve: - - + + Profile 4 + - - - Qt::Horizontal - - - - 120 - 20 - - - + + Profile 5 + - - - - 0 - 0 - - - - Linear - - - Qt::AlignHCenter - - - true - - + + Profile 6 + - + + + + + + + 6 + + + 6 + - - - 6 - - - 6 + + + Weighting function: - - - - HDR creation model: - - - - - - - Qt::Horizontal - - - - 107 - 20 - - - - - - - - - 0 - 0 - - - - Debevec - - - Qt::AlignHCenter - - - true - - - - + - - - 6 + + + Qt::Horizontal - - 6 + + + 112 + 20 + - - - - false - - - Anti-ghosting (beta!) - - - - - - - Qt::Horizontal - - - - 72 - 23 - - - - - - - - false - - - Response curve: - - - - - - - false - - - - 110 - 0 - - - - - Gamma - - - - - Linear - - - - - Log - - - - - Calibration - - - - - + - - - 6 + + + + 0 + 0 + - - 6 + + Triangular - - - - Qt::Horizontal - - - - 80 - 20 - - - - - - - - false - - - Amount of iterations: - - - - - - - false - - - Keep it small - - - 1 - - - 22 - - - 1 - - - - + + Qt::AlignHCenter + + + true + + + + + + + + + 6 + + + 6 + + + + + Response curve: + + + + + + + Qt::Horizontal + + + + 120 + 20 + + + + + + + + + 0 + 0 + + + + Linear + + + Qt::AlignHCenter + + + true + + + + + + + + + 6 + + + 6 + + + + + HDR creation model: + + - + Qt::Horizontal + + + 107 + 20 + + + + + + + + + 0 + 0 + + + + Debevec + + + Qt::AlignHCenter + + + true + + + + + + + 6 + + + 6 + - - - Use this only if the default profiles above do not yield good results + + + false - Use custom configuration + Anti-ghosting (beta!) - Qt::Vertical + Qt::Horizontal - 20 - 40 + 72 + 23 - + + + false + - <!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 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:12pt; font-weight:600;">Choose one of the predefined profiles or use a custom configuration</span></p></body></html> + Response curve: + + + + + + + false + + + + 110 + 0 + + + + + Gamma + + + + + Linear + + + + + Log + + + + + Calibration + + + + + + + + + + 6 + + + 6 + + + + + Qt::Horizontal + + + + 80 + 20 + + + + + + + + false + + + Amount of iterations: + + + + + + + false + + + Keep it small + + + 1 + + + 22 + + + 1 + + + + Qt::Horizontal + + + + + + + Use this only if the default profiles above do not yield good results + + + Use custom configuration + + + + + + + Qt::Vertical + + + + 691 + 103 + + + + + + + + <!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 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:12pt; font-weight:600;">Choose one of the predefined profiles or use a custom configuration</span></p></body></html> + + + + line_2 + customConfigCheckBox + settings_label @@ -1042,58 +1045,128 @@ [2/2] Choose Custom Configuration - + - - - 9 + + + + 0 + 0 + - - 9 + + Weights: - - - - - 0 - 0 - - - - Weights: - - - + + + 6 + + + + 6 - - - - 6 + + + + + 0 + 0 + + + + Choose confidence function over all the possible pixel values: + + + true + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + + - + + Triangular + + + + + Gaussian + + + + + Plateau + + + + + + + + + + + + + + 0 + 0 + + + + Response Curve: + + + + 6 + + + + + 6 + + + + + - + 0 0 - Choose confidence function over all the possible pixel values: + Predefined response curves: - + true - + Qt::Horizontal - QSizePolicy::Preferred + QSizePolicy::Minimum @@ -1104,286 +1177,145 @@ - + + + + 0 + 0 + + - Triangular + Gamma - Gaussian + Linear - Plateau + Log - - - - - - - - 0 - 0 - - - - Response Curve: - - - - 6 - - - - - 6 + + + + + 0 + 0 + + + Load response function from file + + + + + - - - - - - 0 - 0 - - - - Predefined response curves: - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - Gamma - - - - - Linear - - - - - Log - - - - - - - - - - - 0 - 0 - + + + false - - Load response function from file + + + 0 + 29 + - - - - - - - - false - - - - 0 - 29 - - - - Load... - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 20 - - - - - - - - false - - - true - - - - - - - - Use calibration to find response curve (robertson02 algorithm) + Load... - - - false + + + Qt::Horizontal - - - 0 - 0 - + + QSizePolicy::Preferred - - Save response function to file: + + + 40 + 20 + - + - - - 6 + + + false - - 0 + + true - - - - false - - - - 0 - 29 - - - - Save As... - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 40 - 20 - - - - - - - - false - - - true - - - - + - - - - - - - - 0 - 0 - - - - HDR Creation Equation: - - - - 6 - - - - - QLayout::SetDefaultConstraint + + + + Use calibration to find response curve (robertson02 algorithm) - + + + + + + false + + + + 0 + 0 + + + + Save response function to file: + + + + + + 6 + + 0 + - + + + false + + + + 0 + 29 + + - Choose model: + Save As... - + Qt::Horizontal - QSizePolicy::Minimum + QSizePolicy::Preferred @@ -1394,21 +1326,7 @@ - - - - Debevec - - - - - Robertson - - - - - - + Qt::Horizontal @@ -1420,36 +1338,148 @@ + + + + false + + + true + + + + + + + + + + + + 0 + 0 + + + + HDR Creation Equation: + + + + 6 + + + + + QLayout::SetDefaultConstraint + + + 6 + + + + + Choose model: + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 20 + + + + + + + + + Debevec + + + + + Robertson + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Save Settings + - + - Qt::Vertical + Qt::Horizontal - 20 - 40 + 40 + 20 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + <!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 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:12pt; font-weight:600;">Here you can customize the HDR creation process</span></p></body></html> - - - - + + diff -Nru luminance-hdr-2.3.0/src/HdrWizard/PreviewWidget.cpp luminance-hdr-2.3.1/src/HdrWizard/PreviewWidget.cpp --- luminance-hdr-2.3.0/src/HdrWizard/PreviewWidget.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/PreviewWidget.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -27,435 +27,202 @@ #include "PreviewWidget.h" -PreviewWidget::PreviewWidget(QWidget *parent, /*const*/ QImage *m, const QImage *p) : QWidget(parent), movableImage(m), pivotImage(p), prev_computed(), agcursor_pixmap(NULL) { -// this->setAttribute(Qt::WA_PaintOnScreen); -// this->setAttribute(Qt::WA_StaticContents); -// this->setAttribute(Qt::WA_OpaquePaintEvent); -// this->setAttribute(Qt::WA_NoSystemBackground); - mx=my=px=py=0; - setFocusPolicy(Qt::StrongFocus); - previewImage=new QImage(movableImage->size(),QImage::Format_ARGB32); - previewImage->fill(qRgba(255,0,0,255)); - rubberband=QRect(); - blendmode=&PreviewWidget::computeDiffRgba; - //track mouse position to draw specific cursor when on rubberband - setMouseTracking(true); - dragging_mode=DRAGGING_NONE; - leftButtonMode=LB_croppingmode; - //set internal brush values to their default - brushAddMode=true; - setBrushSize(32); - previousPixmapSize=-1; - setBrushStrength(255); - previousPixmapStrength=-1; - previousPixmapColor=QColor(); - fillAntiGhostingCursorPixmap(); +PreviewWidget::PreviewWidget(QWidget *parent, QImage *m, const QImage *p) : + QWidget(parent), + m_movableImage(m), + m_pivotImage(p), + m_prevComputed(), + m_mx(0), + m_my(0), + m_px(0), + m_py(0), + m_scaleFactor(1) +{ + setFocusPolicy(Qt::StrongFocus); + m_previewImage = new QImage(m_movableImage->size(),QImage::Format_ARGB32); + m_previewImage->fill(qRgba(255,0,0,255)); + blendmode = &PreviewWidget::computeDiffRgba; + m_leftButtonMode = LB_nomode; + setMouseTracking(true); } PreviewWidget::~PreviewWidget() { - delete previewImage; - delete agcursor_pixmap; + delete m_previewImage; } void PreviewWidget::paintEvent(QPaintEvent * event) { - if (pivotImage==NULL || movableImage==NULL) - return; - assert(movableImage->size()==pivotImage->size()); - QRect paintrect=event->rect(); - QRect srcrect=QRect(paintrect.topLeft()/scaleFactor, paintrect.size()/scaleFactor); - QPainter p(this); - QRegion areatorender=QRegion(srcrect)-prev_computed; - if (!areatorender.isEmpty()) { - renderPreviewImage(blendmode,areatorender.boundingRect()); - prev_computed+=QRegion(srcrect); - } - p.drawImage(paintrect, *previewImage, srcrect); - if (!rubberband.isNull()) { - QRegion outsidearea = QRegion(0, 0, int(previewImage->size().width()*scaleFactor), int(previewImage->size().height()*scaleFactor)) - QRegion(rubberband); - p.setBrush(QBrush(Qt::black,Qt::Dense3Pattern)); - p.setPen(Qt::NoPen); - p.drawRects(outsidearea.rects()); - p.setBrush(QBrush()); - p.setPen(QPen(Qt::blue, 1, Qt::SolidLine)); - p.drawRect(rubberband); - } + if (m_pivotImage == NULL || m_movableImage == NULL) + return; + assert(m_movableImage->size() == m_pivotImage->size()); + QRect paintRect = event->rect(); + QRect srcRect = QRect(paintRect.topLeft()/m_scaleFactor, paintRect.size()/m_scaleFactor); + QPainter p(this); + QRegion areaToRender=QRegion(srcRect) - m_prevComputed; + if (!areaToRender.isEmpty()) { + renderPreviewImage(blendmode, areaToRender.boundingRect()); + m_prevComputed += QRegion(srcRect); + } + p.drawImage(paintRect, *m_previewImage, srcRect); } -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 ) { - 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, previewImage->size().width(), previewImage->size().height())) - prev_computed; - if (!areatorender.isEmpty()) { - //render only what you have to - originx=areatorender.boundingRect().x(); - originy=areatorender.boundingRect().y(); - W=areatorender.boundingRect().width(); - H=areatorender.boundingRect().height(); - prev_computed+=areatorender; - } 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 - if ((originy+H-1)>=movableImage->height()) - H=movableImage->height()-originy; - if ((originx+W-1)>=movableImage->width()) - W=movableImage->width()-originx; - const QRgb *MovVal=NULL; - const QRgb *PivVal=NULL; - QRgb* mov_line=NULL; - QRgb* piv_line=NULL; - - //for all the rows that we have to paint - for(int i = originy; i < originy+H; i++) { - QRgb* out = (QRgb*)previewImage->scanLine(i); - - //if within bounds considering vertical offset - if ( !( (i-my)<0 || (i-my)>=movableImage->height()) ) - mov_line = (QRgb*)(movableImage->scanLine(i-my)); - else - mov_line = NULL; - - if ( !( (i-py)<0 || (i-py)>=pivotImage->height()) ) - piv_line = (QRgb*)(pivotImage->scanLine(i-py)); - else - piv_line = NULL; - - //for all the columns that we have to paint - for(int j = originx; j < originx+W; j++) { - //if within bounds considering horizontal offset - if (mov_line==NULL || (j-mx)<0 || (j-mx)>=movableImage->width()) - MovVal=&outofbounds; - else - MovVal=&mov_line[j-mx]; - - if (piv_line==NULL || (j-px)<0 || (j-px)>=pivotImage->width()) - PivVal=&outofbounds; - else - PivVal=&piv_line[j-px]; - - if (pivotImage==movableImage && blendmode != & PreviewWidget::computeAntiGhostingMask) - out[j]=*MovVal; - else - out[j]= (this->*rendermode)(MovVal,PivVal); - } - } + 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; + if (!areaToRender.isEmpty()) { + //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 + return; + } + //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; + + //for all the rows that we have to paint + for(int i = originy; i < originy+H; i++) { + QRgb* 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; + + if ( !( (i - m_py) < 0 || (i- m_py) >= m_pivotImage->height()) ) + pivLine = (QRgb*)(m_pivotImage->scanLine(i - m_py)); + else + pivLine = NULL; + + //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()) + movVal = &outofbounds; + else + movVal = &movLine[j - m_mx]; + + if (pivLine == NULL || (j - m_px) < 0 || (j - m_px) >= m_pivotImage->width()) + pivVal = &outofbounds; + else + pivVal = &pivLine[j - m_px]; + + if (m_pivotImage == m_movableImage) + out[j] = *movVal; + else + out[j] = (this->*rendermode)(movVal,pivVal); + } + } } void PreviewWidget::resizeEvent(QResizeEvent *event) { - if (event->size()==previewImage->size()) - scaleFactor=1; //done to prevent first spurious widget size (upon construction) - else - scaleFactor=(float)(event->size().width())/(float)(previewImage->size().width()); - - if (!rubberband.isNull()) { - float newoldratioW = (float)(event->size().width())/(float)(event->oldSize().width()); - rubberband.setTopLeft(rubberband.topLeft()*newoldratioW); - rubberband.setBottomRight(rubberband.bottomRight()*newoldratioW); - if (rubberband.isNull()) { - hideRubberBand(); - } - } + if (event->size() == m_previewImage->size()) + m_scaleFactor = 1; //done to prevent first spurious widget size (upon construction) + else + m_scaleFactor = (float)(event->size().width())/(float)(m_previewImage->size().width()); } void PreviewWidget::mousePressEvent(QMouseEvent *event) { - if (event->buttons()==Qt::MidButton) { - QApplication::setOverrideCursor( QCursor(Qt::ClosedHandCursor) ); - mousePos = event->globalPos(); - } - - QPoint mousepos=event->pos(); - if (event->buttons()==Qt::LeftButton) { - switch (leftButtonMode) { - case LB_croppingmode: - //detect if we are starting a drag - if (rubberband.contains(mousepos) && !rubberband.contains(mousepos,true)) { - int x=event->pos().x(); int y=event->pos().y(); - if ((x==rubberband.left())&&(y==rubberband.top())) - dragging_mode=DRAGGING_TOPLEFT; - else if ((x==rubberband.right())&&(y==rubberband.top())) - dragging_mode=DRAGGING_TOPRIGHT; - else if ((x==rubberband.right())&&(y==rubberband.bottom())) - dragging_mode=DRAGGING_BOTTOMRIGHT; - else if ((x==rubberband.left())&&(y==rubberband.bottom())) - dragging_mode=DRAGGING_BOTTOMLEFT; - else if (x==rubberband.left()) - dragging_mode=DRAGGING_LEFT; - else if (x==rubberband.right()) - dragging_mode=DRAGGING_RIGHT; - else if (y==rubberband.bottom()) - dragging_mode=DRAGGING_BOTTOM; - else if (y==rubberband.top()) - dragging_mode=DRAGGING_TOP; - } else { - //single left-click, initialize the coordinates: - //topleft=bottomright=mousepos. This makes the rubberband have 0-size - QApplication::setOverrideCursor( QCursor(Qt::CrossCursor) ); - rubberbandInitialCreationPoint=event->pos(); - rubberband.setTopLeft(rubberbandInitialCreationPoint); - rubberband.setBottomRight(rubberbandInitialCreationPoint+QPoint(-1,-1)); - emit validCropArea(false); - } - break; - case LB_antighostingmode: - if (scaleFactor!=1) - break; - else - timerid=this->startTimer(0); - break; - } - } - event->ignore(); + if (event->buttons() == Qt::MidButton) { + QApplication::setOverrideCursor( QCursor(Qt::ClosedHandCursor) ); + m_mousePos = event->globalPos(); + } + event->ignore(); +} + +void PreviewWidget::mouseReleaseEvent(QMouseEvent *event) +{ + QApplication::restoreOverrideCursor(); + event->ignore(); } void PreviewWidget::mouseMoveEvent(QMouseEvent *event) { - if (event->buttons()==Qt::LeftButton) { - int x=event->pos().x(); int y=event->pos().y(); - switch (leftButtonMode) { - case LB_croppingmode: - if (dragging_mode==DRAGGING_TOPLEFT) { - rubberband.setLeft(x); - rubberband.setTop(y); - } else if (dragging_mode==DRAGGING_TOPRIGHT) { - rubberband.setTop(y); - rubberband.setRight(x-1); - } else if (dragging_mode==DRAGGING_BOTTOMRIGHT) { - rubberband.setBottom(y-1); - rubberband.setRight(x-1); - } else if (dragging_mode==DRAGGING_BOTTOMLEFT) { - rubberband.setBottom(y-1); - rubberband.setLeft(x); - } else if (dragging_mode==DRAGGING_LEFT) - rubberband.setLeft(x); - else if (dragging_mode==DRAGGING_RIGHT) - rubberband.setRight(x-1); - else if (dragging_mode==DRAGGING_TOP) - rubberband.setTop(y); - else if (dragging_mode==DRAGGING_BOTTOM) - rubberband.setBottom(y-1); - else {//creating a new selection - rubberband=QRect(rubberbandInitialCreationPoint,event->pos()); - } - rubberband=rubberband.normalized(); - update(); - break; - case LB_antighostingmode: - break; - } - } if (event->buttons()==Qt::NoButton) { - //if mouse is over rubberband draw appropriate cursor - QPoint mousepos=event->pos(); - if (rubberband.contains(mousepos) && !rubberband.contains(mousepos,true)) { - int x=event->pos().x(); int y=event->pos().y(); - int left=rubberband.left(); - int right=rubberband.right(); - int bottom=rubberband.bottom(); - int top=rubberband.top(); - if ((x==left && y==top) || (x==right && y==bottom)) - QApplication::setOverrideCursor( QCursor(Qt::SizeFDiagCursor) ); - else if ((x==right && y==top) || (x==left && y==bottom)) - QApplication::setOverrideCursor( QCursor(Qt::SizeBDiagCursor) ); - else if (x==left || x==right) - QApplication::setOverrideCursor( QCursor(Qt::SizeHorCursor) ); - else if (y==bottom || y==top) - QApplication::setOverrideCursor( QCursor(Qt::SizeVerCursor) ); - } else - QApplication::restoreOverrideCursor(); - } else if (event->buttons()==Qt::MidButton) { - //moving mouse with middle button pans the preview - QPoint diff = (event->globalPos() - mousePos); - if (event->modifiers()==Qt::ShiftModifier) - diff*=5; - emit moved(diff); - //scrollArea->verticalScrollBar()->setValue(scrollArea->verticalScrollBar()->value() + diff.y()); - //scrollArea->horizontalScrollBar()->setValue(scrollArea->horizontalScrollBar()->value() + diff.x()); - mousePos=event->globalPos(); - } - event->ignore(); -} - -void PreviewWidget::mouseReleaseEvent(QMouseEvent *event) { - if (event->button()==Qt::LeftButton) { - switch (leftButtonMode) { - case LB_croppingmode: - dragging_mode=DRAGGING_NONE; - rubberband=rubberband.normalized(); - - if (!rubberband.isNull()) - emit validCropArea(true); - rubberband.setLeft(qMax(0,rubberband.left())); - rubberband.setRight(qMin(size().width()-2,rubberband.right())); - rubberband.setTop(qMax(rubberband.top(),0)); - rubberband.setBottom(qMin(size().height()-2,rubberband.bottom())); - QApplication::restoreOverrideCursor(); - update(); - break; - case LB_antighostingmode: - if (scaleFactor==1) - this->killTimer(timerid); - break; - } - } - else if (event->button()==Qt::MidButton) { - QApplication::restoreOverrideCursor(); - } -} - -void PreviewWidget::timerEvent(QTimerEvent *) { - assert(leftButtonMode!=LB_croppingmode); - if (scaleFactor!=1) - return; - - QPoint relativeToWidget=mapFromGlobal(QCursor::pos()); - - QPoint imagereferredPoint= relativeToWidget/scaleFactor -QPoint(mx,my+1); - - QPoint halfsize((int)(requestedPixmapSize/(2*scaleFactor)), (int)(requestedPixmapSize/(2*scaleFactor))); - - QRect imagereferredBoundingRect( imagereferredPoint-halfsize, imagereferredPoint+halfsize ); -// QRect localBoundingRect ( localPoint-QPoint(requestedPixmapSize/2,requestedPixmapSize/2), localPoint+QPoint(requestedPixmapSize/2,requestedPixmapSize/2) ); - - QRegion imagereferredBrushArea(imagereferredBoundingRect,QRegion::Ellipse); - - for (int row=qMax(0,imagereferredBoundingRect.top()); row <= qMin(movableImage->size().height()-1,imagereferredBoundingRect.bottom()); row++) { - for (int col=qMax(0,imagereferredBoundingRect.left()); col <= qMin(movableImage->size().width()-1,imagereferredBoundingRect.right()); col++) { - QPoint p(col,row); - if (imagereferredBrushArea.contains(p)) { - QColor pxval= QColor::fromRgba(movableImage->pixel(p.x(),p.y())); - pxval.setAlpha(qMin(255,qMax(0,pxval.alpha()-requestedPixmapStrength))); - movableImage->setPixel(p.x(), p.y(), pxval.rgba()); - } - } - } - prev_computed-=imagereferredBrushArea.translated(mx,my); - update(); + if (event->buttons() == Qt::MidButton) { + //moving mouse with middle button pans the preview + QPoint diff = (event->globalPos() - m_mousePos); + if (event->modifiers() == Qt::ShiftModifier) + diff *= 5; + emit moved(diff); + m_mousePos = event->globalPos(); + } + event->ignore(); } void PreviewWidget::requestedBlendMode(int newindex) { - if (newindex==0) - blendmode=& PreviewWidget::computeDiffRgba; - else if (newindex==1) - blendmode=& PreviewWidget::computeAddRgba; - else if (newindex==2) - blendmode=& PreviewWidget::computeOnlyMovable; - else if (newindex==3) - blendmode=& PreviewWidget::computeOnlyPivot; - else if (newindex==4) - blendmode=& PreviewWidget::computeAntiGhostingMask; + if (newindex == 0) + blendmode = &PreviewWidget::computeDiffRgba; + else if (newindex == 1) + blendmode = &PreviewWidget::computeAddRgba; + else if (newindex == 2) + blendmode = &PreviewWidget::computeOnlyMovable; + else if (newindex == 3) + blendmode = &PreviewWidget::computeOnlyPivot; - prev_computed=QRegion(); - this->update(); + m_prevComputed=QRegion(); + this->update(); } void PreviewWidget::setPivot(QImage *p, int p_px, int p_py) { - pivotImage=p; - px=p_px; - py=p_py; - prev_computed=QRegion(); + m_pivotImage = p; + m_px = p_px; + m_py = p_py; + m_prevComputed = QRegion(); } void PreviewWidget::setPivot(QImage *p) { - pivotImage = p; + m_pivotImage = p; } void PreviewWidget::setMovable(QImage *m, int p_mx, int p_my) { - movableImage=m; - mx=p_mx; - my=p_my; - prev_computed=QRegion(); + m_movableImage = m; + m_mx = p_mx; + m_my = p_my; + m_prevComputed = QRegion(); } void PreviewWidget::setMovable(QImage *m) { - movableImage = m; - //TODO: check this - delete previewImage; - previewImage=new QImage(movableImage->size(),QImage::Format_ARGB32); - resize(movableImage->size()); + m_movableImage = m; + //TODO: check this + delete m_previewImage; + m_previewImage = new QImage(m_movableImage->size(), QImage::Format_ARGB32); + resize(m_movableImage->size()); } void PreviewWidget::updateVertShiftMovable(int v) { - my=v; - prev_computed=QRegion(); + m_my = v; + m_prevComputed = QRegion(); } void PreviewWidget::updateHorizShiftMovable(int h) { - mx=h; - prev_computed=QRegion(); + m_mx = h; + m_prevComputed = QRegion(); } void PreviewWidget::updateVertShiftPivot(int v) { - py=v; - prev_computed=QRegion(); + m_py = v; + m_prevComputed = QRegion(); } void PreviewWidget::updateHorizShiftPivot(int h) { - px=h; - prev_computed=QRegion(); + m_px = h; + m_prevComputed = QRegion(); } -void PreviewWidget::hideRubberBand() { - rubberband=QRect(); - emit validCropArea(false); -} - -void PreviewWidget::switchAntighostingMode(bool ag) { - if (ag) { - hideRubberBand(); - leftButtonMode=LB_antighostingmode; - this->setCursor(*agcursor_pixmap); - } else { - leftButtonMode=LB_croppingmode; - this->unsetCursor(); - } -} - -void PreviewWidget::setBrushSize (const int newsize) { - requestedPixmapSize=newsize; -} - -void PreviewWidget::setBrushMode(bool removemode) { - requestedPixmapStrength *= -1; - brushAddMode=!removemode; -} - -void PreviewWidget::setBrushStrength (const int newstrength) { - requestedPixmapStrength=newstrength; - requestedPixmapColor.setAlpha(qMax(60,requestedPixmapStrength)); - requestedPixmapStrength *= (!brushAddMode) ? -1 : 1; -} - -void PreviewWidget::setBrushColor (const QColor newcolor) { - requestedPixmapColor=newcolor; - prev_computed=QRegion(); - update(); -} - -void PreviewWidget::enterEvent(QEvent *) { - if (leftButtonMode==LB_antighostingmode) { - fillAntiGhostingCursorPixmap(); - this->unsetCursor(); - this->setCursor(*agcursor_pixmap); - } -} - -void PreviewWidget::fillAntiGhostingCursorPixmap() { - if (requestedPixmapSize != previousPixmapSize || requestedPixmapStrength != previousPixmapStrength || requestedPixmapColor.rgb() != previousPixmapColor.rgb()) { - if (agcursor_pixmap) - delete agcursor_pixmap; - previousPixmapSize=requestedPixmapSize; - previousPixmapStrength=requestedPixmapStrength; - previousPixmapColor=requestedPixmapColor; - agcursor_pixmap=new QPixmap(requestedPixmapSize,requestedPixmapSize); - agcursor_pixmap->fill(Qt::transparent); - QPainter painter(agcursor_pixmap); - painter.setPen(Qt::NoPen); - painter.setBrush(QBrush(requestedPixmapColor,Qt::SolidPattern)); - painter.drawEllipse(0,0,requestedPixmapSize,requestedPixmapSize); - } -} diff -Nru luminance-hdr-2.3.0/src/HdrWizard/PreviewWidget.h luminance-hdr-2.3.1/src/HdrWizard/PreviewWidget.h --- luminance-hdr-2.3.0/src/HdrWizard/PreviewWidget.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HdrWizard/PreviewWidget.h 2013-04-07 18:41:14.000000000 +0000 @@ -34,138 +34,100 @@ { Q_OBJECT public: - PreviewWidget(QWidget *parent, /*const*/ QImage *m, const QImage *p); - ~PreviewWidget(); - QSize sizeHint () const { - return previewImage->size(); - } - float getScaleFactor() { - return scaleFactor; - } - QRect getCropArea() const { - return rubberband; - } - QImage * getPreviewImage() { - renderPreviewImage(blendmode); - return previewImage; - } + PreviewWidget(QWidget *parent, QImage *m, const QImage *p); + ~PreviewWidget(); + QSize sizeHint () const { + return m_previewImage->size(); + } + float getScaleFactor() { + return m_scaleFactor; + } + QImage * getPreviewImage() { + renderPreviewImage(blendmode); + return m_previewImage; + } void setPivot(QImage *p, int p_px, int p_py); - void setPivot(QImage *p); + void setPivot(QImage *p); void setMovable(QImage *m, int p_mx, int p_my); - void setMovable(QImage *m); - void updateVertShiftMovable(int v); - void updateHorizShiftMovable(int h); - void updateHorizShiftPivot(int h); - void updateVertShiftPivot(int v); - void hideRubberBand(); + void setMovable(QImage *m); + void updateVertShiftMovable(int v); + void updateHorizShiftMovable(int h); + void updateHorizShiftPivot(int h); + void updateVertShiftPivot(int v); public slots: - void requestedBlendMode(int); - void switchAntighostingMode(bool); - void setBrushSize(const int); - void setBrushStrength(const int); - void setBrushColor(const QColor); - void setBrushMode(bool); + void requestedBlendMode(int); signals: - void validCropArea(bool); - void moved(QPoint diff); + void moved(QPoint diff); protected: - void paintEvent( QPaintEvent * ); - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void resizeEvent(QResizeEvent *event); - void timerEvent(QTimerEvent *event); - void enterEvent(QEvent *event); + void paintEvent( QPaintEvent * ); + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void resizeEvent(QResizeEvent *event); 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 { - return *Prgba; - } - inline QRgb computeAddRgba(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 = ( 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); - } - inline QRgb computeAntiGhostingMask(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); - //blend samples using alphas as weights - ro = ( requestedPixmapColor.red()*(255-Malpha) + Mred*Malpha )/255; - go = ( requestedPixmapColor.green()*(255-Malpha) + Mgreen*Malpha )/255; - bo = ( requestedPixmapColor.blue()*(255-Malpha) + 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()); - - // the out and 2 in images - QImage *previewImage; - /*const*/ QImage *movableImage; - const QImage *pivotImage; - - //QScrollArea *scrollArea; - QRegion prev_computed; - - //movable and pivot's x,y shifts - int mx,my,px,py; - //zoom factor - float scaleFactor; - - //for panning with mid-button - QPoint mousePos; - //for cropping - QRect rubberband; - //assigned when starting to create a rubberband - QPoint rubberbandInitialCreationPoint; - //used for additional painting - int timerid; - QPixmap *agcursor_pixmap; - int requestedPixmapSize,previousPixmapSize; - int requestedPixmapStrength,previousPixmapStrength; - QColor requestedPixmapColor,previousPixmapColor; - bool brushAddMode;//false means brush is in remove mode. - void fillAntiGhostingCursorPixmap(); + //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 { + return *Prgba; + } + inline QRgb computeAddRgba(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 = ( 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); + } + + QRgb(PreviewWidget::*blendmode)(const QRgb*,const QRgb*)const; + void renderPreviewImage(QRgb(PreviewWidget::*f)(const QRgb*,const QRgb*)const,const QRect a = QRect()); + + // the out and 2 in images + QImage *m_previewImage; + QImage *m_movableImage; + const QImage *m_pivotImage; + + QRegion m_prevComputed; + + //movable and pivot's x,y shifts + int m_mx, m_my, m_px, m_py; + //zoom factor + float m_scaleFactor; - enum dragging_mode {DRAGGING_LEFT, DRAGGING_RIGHT, DRAGGING_TOP, DRAGGING_BOTTOM, DRAGGING_TOPLEFT, DRAGGING_TOPRIGHT, DRAGGING_BOTTOMRIGHT, DRAGGING_BOTTOMLEFT, DRAGGING_NONE } dragging_mode; - enum {LB_croppingmode,LB_antighostingmode} leftButtonMode; + //for panning with mid-button + QPoint m_mousePos; + + enum {LB_nomode,LB_antighostingmode} m_leftButtonMode; }; #endif diff -Nru luminance-hdr-2.3.0/src/HelpBrowser/CMakeLists.txt luminance-hdr-2.3.1/src/HelpBrowser/CMakeLists.txt --- luminance-hdr-2.3.0/src/HelpBrowser/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HelpBrowser/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,4 +1,5 @@ -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/help-path.hxx.in ${CMAKE_CURRENT_BINARY_DIR}/help-path.hxx @ONLY) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/help-path.hxx.in + ${CMAKE_CURRENT_BINARY_DIR}/help-path.hxx @ONLY) SET(FILES_UI ${CMAKE_CURRENT_SOURCE_DIR}/HelpBrowser.ui diff -Nru luminance-hdr-2.3.0/src/HelpBrowser/HelpBrowser.ui luminance-hdr-2.3.1/src/HelpBrowser/HelpBrowser.ui --- luminance-hdr-2.3.0/src/HelpBrowser/HelpBrowser.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HelpBrowser/HelpBrowser.ui 2013-04-07 18:41:14.000000000 +0000 @@ -14,7 +14,7 @@ - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png diff -Nru luminance-hdr-2.3.0/src/HelpBrowser/LuminancePaths.cpp luminance-hdr-2.3.1/src/HelpBrowser/LuminancePaths.cpp --- luminance-hdr-2.3.0/src/HelpBrowser/LuminancePaths.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HelpBrowser/LuminancePaths.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -15,6 +15,7 @@ #include "help-path.hxx" #include +#include LuminancePaths *LuminancePaths::instance = 0; LuminancePaths * LuminancePaths::getThis() @@ -24,28 +25,33 @@ return instance; } +namespace { +const QString dirsep(QDir::separator()); +} + QString LuminancePaths::HelpDir() { - if(getThis()->LuminancePathsDB.contains("HelpDir")) - return getThis()->LuminancePathsDB["HelpDir"]; - QString hf; - QString dirsep(QDir::separator()); - + if (getThis()->LuminancePathsDB.contains("HelpDir")) { + QString hf = getThis()->LuminancePathsDB["HelpDir"]; + if ( !hf.isEmpty() && QDir(hf).exists() ) { + return hf; + } + } + #ifdef Q_WS_MAC - hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + "../Resources/help/en" + dirsep); + QString hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + "../Resources/help/en" + dirsep); #elif _WIN32 - hf = LocalizedDirPath(QApplication::applicationDirPath() + dirsep + "help" + dirsep); -#elif __FreeBSD__ - hf = LocalizedDirPath("/usr/local/share/doc/luminance-hdr/"); -#else - // hf = LocalizedDirPath( PREFIX + dirsep + "share" + dirsep + "fontmatrix" + dirsep + "help" + dirsep ); - //hf = LocalizedDirPath("usr" + dirsep + "share" + dirsep + "luminance-hdr" + dirsep + "help" + dirsep); - hf = LocalizedDirPath(HELPDIR + dirsep); + QString hf; + // 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; - return getThis()->LuminancePathsDB["HelpDir"]; + return hf; } QString LuminancePaths::LocalizedDirPath(const QString & base, const QString& fallback ) diff -Nru luminance-hdr-2.3.0/src/HelpBrowser/helpbrowser.cpp luminance-hdr-2.3.1/src/HelpBrowser/helpbrowser.cpp --- luminance-hdr-2.3.0/src/HelpBrowser/helpbrowser.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HelpBrowser/helpbrowser.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,6 +31,7 @@ #include "ui_HelpSideBar.h" #include +#include #include #include #include @@ -55,6 +56,8 @@ #include #include +#include + #include "Common/global.h" #include "HelpBrowser/schelptreemodel.h" #include "HelpBrowser/LuminancePaths.h" @@ -159,7 +162,10 @@ connect(m_Ui->textBrowser->page(), SIGNAL(linkHovered(const QString &, const QString &, const QString & )), this, SLOT(linkHovered(const QString &, const QString &, const QString & ))); language = guiLanguage.isEmpty() ? QString("en") : guiLanguage.left(2); - finalBaseDir = LuminancePaths::HelpDir(); + finalBaseDir = LuminancePaths::HelpDir(); + + qDebug() << finalBaseDir; + m_Ui->textBrowser->setHome( QUrl::fromLocalFile( finalBaseDir + "index.html" )); menuModel=NULL; loadMenu(); @@ -167,7 +173,6 @@ if (menuModel!=NULL) { readBookmarks(); - readHistory(); jumpToHelpSection(jumpToSection, jumpToFile ); languageChange(); } @@ -190,39 +195,42 @@ // no need to delete child widgets, Qt does it all for us // bookmarks - QFile bookFile(bookmarkFile()); - if (bookFile.open(QIODevice::WriteOnly)) - { - QTextStream stream(&bookFile); - stream.setCodec("UTF-8"); - stream << "\n"; - stream << "\n"; + LuminanceOptions options; + { + QByteArray ba; + QTextStream stream(&ba); + stream.setCodec("UTF-8"); + stream << "\n"; + stream << "\n"; QTreeWidgetItemIterator it(helpSideBar->m_Ui->bookmarksView); - 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"; - } - ++it; - } - stream << "\n"; - bookFile.close(); - } - // history - QFile histFile(historyFile()); - if (histFile.open(QIODevice::WriteOnly)) + 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"; + } + ++it; + } + stream << "\n"; + stream.flush(); + + options.setValue(KEY_HELP_BOOKMARK, ba); + } + + // history { - QTextStream stream(&histFile); + QByteArray ba; + QTextStream stream(&ba); stream.setCodec("UTF-8"); stream << "\n"; stream << "\n"; for (QMap::Iterator it = mHistory.begin() ; it != mHistory.end(); ++it) stream << "\t\n"; stream << "\n"; - histFile.close(); + stream.flush(); + options.setValue(KEY_HELP_HISTORY, ba); } // size // prefs->set("xsize", width()); @@ -368,7 +376,7 @@ void HelpBrowser::searchingInDirectory(const QString& aDir) { - QDir dir(QDir::convertSeparators(aDir + "/")); + QDir dir(QDir::toNativeSeparators(aDir + "/")); QStringList in; in.append("*.html"); QStringList lst = dir.entryList(in); @@ -402,7 +410,7 @@ QStringList dst = dir.entryList(in, QDir::Dirs); for (QStringList::Iterator it = dst.begin(); it != dst.end(); ++it) if ((*it)!="." && (*it)!="..") - searchingInDirectory(QDir::convertSeparators(aDir + QString((*it)) + "/")); + searchingInDirectory(QDir::toNativeSeparators(aDir + QString((*it)) + "/")); } void HelpBrowser::find() @@ -444,10 +452,11 @@ if (title.isNull()) return; //TODO: start storing full paths - QString toFind(fname.remove(QDir::convertSeparators(finalBaseDir))); + 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) @@ -524,7 +533,7 @@ toLoad=filename; else { - toLoad = LuminancePaths::HelpDir() +"index.html"; + toLoad = LuminancePaths::HelpDir() + "index.html"; language="en"; //qDebug("Help index: %c", toLoad); fi = QFileInfo(toLoad); @@ -557,14 +566,14 @@ void HelpBrowser::loadMenu() { - QString baseHelpDir = LuminancePaths::HelpDir(); + QString baseHelpDir(LuminancePaths::HelpDir()); QString baseHelpMenuFile = baseHelpDir + "menu.xml"; QFileInfo baseFi = QFileInfo(baseHelpMenuFile); QString toLoad = baseHelpMenuFile; finalBaseDir=baseFi.path(); - if (baseFi.exists()) + if (baseFi.exists()) { - if (menuModel!=NULL) + if (menuModel!=NULL) delete menuModel; menuModel=new ScHelpTreeModel(toLoad, "Topic", "Location", &quickHelpIndex); @@ -585,28 +594,19 @@ 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; - QFile xmlFile(bookmarkFile()); - QXmlInputSource source(&xmlFile); + QXmlInputSource source(&buffer); QXmlSimpleReader reader; reader.setContentHandler(&handler); reader.parse(source); } -void HelpBrowser::readHistory() -{ - HistoryParser2 handler; - handler.helpBrowser = this; - QFile xmlFile(historyFile()); - QXmlInputSource source(&xmlFile); - QXmlSimpleReader reader; - reader.setContentHandler(&handler); - reader.parse(source); -} - void HelpBrowser::setText(const QString& str) { m_Ui->textBrowser->setHtml(str); @@ -663,57 +663,6 @@ } } -/*! \brief Returns the name of the cfg file for bookmarks. -A helper function. -\author Petr Vanek -*/ -QString HelpBrowser::bookmarkFile() -{ - //TODO MAC OSX - //QString appDataDir(typotek::getInstance()->getOwnDir().path() + "/"); - QString sep(QDir::separator()); -#ifdef Q_WS_MAC - QString appDataDir(QDir::homePath() + sep + "Library" + sep + "LuminanceHDR" + sep); -#elif WIN32 - QString appDataDir(QDir::homePath() + sep + "LuminanceHDR" + sep); -#else - QString appDataDir(QDir::homePath() + sep + ".LuminanceHDR" + sep); -#endif - QString fname(appDataDir + "HelpBookmarks.xml"); -// if (!QFile::exists(fname)) -// { -// QDir d(QDir::convertSeparators(appDataDir)); -// d.mkdir("doc"); -// } - return fname; -} - - -/*! \brief Returns the name of the cfg file for persistent history. -A helper function. -\author Petr Vanek -*/ -QString HelpBrowser::historyFile() -{ - //QString appDataDir(typotek::getInstance()->getOwnDir().path() + "/"); - QString sep(QDir::separator()); -#ifdef Q_WS_MAC - QString appDataDir(QDir::homePath() + sep + "Library" + sep + "LuminanceHDR" + sep); -#elif WIN32 - QString appDataDir(QDir::homePath() + sep + "LuminanceHDR" + sep); -#else - QString appDataDir(QDir::homePath() + sep + ".LuminanceHDR" + sep); - //QString fname(appDataDir + "HelpHistory.xml"); -#endif - QString fname(appDataDir + "HelpHistory.xml"); -// if (!QFile::exists(fname)) -// { -// QDir d(QDir::convertSeparators(appDataDir)); -// d.mkdir("doc"); -// } - return fname; -} - 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"); diff -Nru luminance-hdr-2.3.0/src/HelpBrowser/helpbrowser.h luminance-hdr-2.3.1/src/HelpBrowser/helpbrowser.h --- luminance-hdr-2.3.0/src/HelpBrowser/helpbrowser.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/HelpBrowser/helpbrowser.h 2013-04-07 18:41:14.000000000 +0000 @@ -49,6 +49,9 @@ #include "HelpSideBar.h" +#define KEY_HELP_BOOKMARK "help/Bookmark" +#define KEY_HELP_HISTORY "help/History" + //! \brief A structure holding title/file url reference. struct histd2 { QString url; @@ -92,9 +95,6 @@ \author Petr Vanek */ void searchingInDirectory(const QString&); - /*! \brief Reads saved history of browsing. */ - void readHistory(); - /*! \brief Tell the user there is no help available */ void displayNoHelp(); @@ -131,7 +131,7 @@ ScHelpTreeModel* menuModel; QMap quickHelpIndex; QMap > bookmarkIndex; - + protected slots: virtual void languageChange(); void histChosen(QAction* i); @@ -139,8 +139,6 @@ void loadHelp(const QString& filename); void loadMenu(); void showLinkContents(const QString &link); - QString bookmarkFile(); - QString historyFile(); /*! \brief Load doc file when user select filename in content view. */ void itemSelected(const QItemSelection & selected, const QItemSelection & deselected); diff -Nru luminance-hdr-2.3.0/src/Libpfs/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,8 +1,17 @@ -# List all .h files in this directory -FILE(GLOB FILES_H *.h) +# List all .h/.hxx files in this directory +FILE(GLOB LIBPFS_H *.h) +FILE(GLOB LIBPFS_HXX *.hxx) # List all .cpp files in this directory -FILE(GLOB FILES_CPP *.cpp) +FILE(GLOB LIBPFS_CPP *.cpp) -ADD_LIBRARY(pfs ${FILES_H} ${FILES_CPP}) +ADD_SUBDIRECTORY(vex) +ADD_SUBDIRECTORY(manip) +ADD_SUBDIRECTORY(utils) +ADD_SUBDIRECTORY(tm) +ADD_SUBDIRECTORY(exif) +ADD_SUBDIRECTORY(colorspace) +ADD_SUBDIRECTORY(io) + +ADD_LIBRARY(pfs ${LIBPFS_H} ${LIBPFS_HXX} ${LIBPFS_CPP}) 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.3.0/src/Libpfs/array2d.cpp luminance-hdr-2.3.1/src/Libpfs/array2d.cpp --- luminance-hdr-2.3.0/src/Libpfs/array2d.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/array2d.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ -/** - * @file - * @brief PFS library - general 2d array interface - * - * All pfs::Array2D classes are part of pfs library. However, to - * lessen coupling of the code with pfs library, Array2D classes are - * declared in this separate file. Therefore it is possible to write - * the code that implements or uses Array2D interface while it has no - * knowledge of other pfs library classes. - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2010 Davide Anastasia (Luminance HDR) - * - * This library 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; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * $Id: array2d.h,v 1.1 2005/06/15 13:36:55 rafm Exp $ - * - * @author Davide Anastasia - * This version is different then the one in the PFSTOOLS - */ - -#include -#include -#include - -#include "array2d.h" -#include "vex.h" - -using namespace std; - -namespace pfs -{ - Array2D::Array2D( int cols, int rows ): - m_cols(cols), m_rows(rows) - { - m_cols = cols; - m_rows = rows; - // Aligned memory allocation allows faster vectorized access - m_data = (float*)_mm_malloc(m_cols*m_rows*sizeof(float), 32); - m_is_data_owned = true; - } - - Array2D::Array2D( int cols, int rows, float* data) - { - m_cols = cols; - m_rows = rows; - m_data = data; - m_is_data_owned = false; - } - - // copy constructor? - Array2D::Array2D(const Array2D& other) - { - this->m_cols = other.m_cols; - this->m_rows = other.m_rows; - this->m_data = other.m_data; - this->m_is_data_owned = false; - } - - // Assignment operator - Array2D& Array2D::operator=(const Array2D& other) - { - if (m_is_data_owned) _mm_free(m_data); - - this->m_cols = other.m_cols; - this->m_rows = other.m_rows; - this->m_data = other.m_data; - this->m_is_data_owned = false; - return *this; - } - - Array2D::~Array2D() - { - if (m_is_data_owned) _mm_free(m_data); //delete[] data; - } - -// float& Array2D::operator()( int cols, int rows ) -// { -// assert( cols >= 0 && cols < m_cols ); -// assert( rows >= 0 && rows < m_rows ); -// return m_data[ rows*m_cols + cols ]; -// } - -// const float& Array2D::operator()( int cols, int rows ) const -// { -// assert( cols >= 0 && cols < m_cols ); -// assert( rows >= 0 && rows < m_rows ); -// return m_data[ rows*m_cols + cols ]; -// } - -// float& Array2D::operator()( int index ) -// { -// assert( index >= 0 && index < m_rows*m_cols ); -// return m_data[index]; -// } - -// const float& Array2D::operator()( int index ) const -// { -// assert( index >= 0 && index <= m_rows*m_cols ); -// return m_data[index]; -// } - - void Array2D::reset(const float value) - { - VEX_vset(this->m_data, value, this->m_rows*this->m_cols); - } - - void Array2D::scale(const float value) - { - // O[i] = c * I[i] - VEX_vsmul(this->m_data, value, this->m_data, this->m_rows*this->m_cols); - } - - - /** - * 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 - */ - void copyArray(const Array2D *from, Array2D *to) - { - assert( from->getRows() == to->getRows() ); - assert( from->getCols() == to->getCols() ); - - const float* f = from->getRawData(); - float* t = to->getRawData(); - - const int V_ELEMS = from->getRows()*from->getCols(); - - VEX_vcopy(f, t, V_ELEMS); - } - - void copyArray(const Array2D *from, Array2D *to, int x_ul, int y_ul, int x_br, int y_br) - { - const float* fv = from->getRawData(); - float* tv = to->getRawData(); - - const int IN_W = from->getCols(); - const int IN_H = from->getRows(); - const int OUT_W = to->getCols(); - const int OUT_H = to->getRows(); - - assert( OUT_H <= IN_H ); - assert( OUT_H <= IN_H ); - assert( x_ul >= 0 ); - assert( y_ul >= 0 ); - assert( x_br <= IN_W ); - assert( y_br <= IN_H ); - - // move to row (x_ul, y_ul) - fv = &fv[IN_W*y_ul + x_ul]; - -#pragma omp parallel for - for (int r = 0; r < OUT_H; r++) - { - //NOTE: do NOT use VEX_vcopy - for (int c = 0; c < OUT_W; c++) - { - tv[r*OUT_W + c] = fv[r*IN_W + c]; - } - } - } - - /** - * Set all elements of the array to a give value. - * - * @param array array to modify - * @param value all elements of the array will be set to this value - */ - void setArray(Array2D *array, const float value) - { - array->reset(value); - } - - /** - * Perform element-by-element multiplication: z = x * y. z must be the same as x or y. - * - * @param z array where the result is stored - * @param x first element of the multiplication - * @param y second element of the multiplication - */ - void multiplyArray(Array2D *z, const Array2D *x, const Array2D *y) - { - assert( x->getRows() == y->getRows() ); - assert( x->getCols() == y->getCols() ); - assert( x->getRows() == z->getRows() ); - assert( x->getCols() == z->getCols() ); - - const float* xv = x->getRawData(); - const float* yv = y->getRawData(); - float* zv = z->getRawData(); - - const int elements = x->getRows()*x->getCols(); - - VEX_vmul(xv, yv, zv, elements); - } - - /** - * Perform element-by-element division: z = x / y. z must be the same as x or y. - * - * @param z array where the result is stored - * @param x first element of the division - * @param y second element of the division - */ - void divideArray(Array2D *z, const Array2D *x, const Array2D *y) - { - assert( x->getRows() == y->getRows() ); - assert( x->getCols() == y->getCols() ); - assert( x->getRows() == z->getRows() ); - assert( x->getCols() == z->getCols() ); - - const float* xv = x->getRawData(); - const float* yv = y->getRawData(); - float* zv = z->getRawData(); - - const int elements = x->getRows()*x->getCols(); - - VEX_vdiv(xv, yv, zv, elements); - } -} - - - - diff -Nru luminance-hdr-2.3.0/src/Libpfs/array2d.h luminance-hdr-2.3.1/src/Libpfs/array2d.h --- luminance-hdr-2.3.0/src/Libpfs/array2d.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/array2d.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,12 +1,8 @@ -/** - * @file - * @brief PFS library - general 2d array interface - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia - * +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2011-2012 Davide Anastasia + * * This library 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; either @@ -20,188 +16,198 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * $Id: array2d.h,v 1.1 2005/06/15 13:36:55 rafm Exp $ - * - * @author Davide Anastasia - * This version is different then the one in the PFSTOOLS - * Classes Array2D and Array2DImpl are joined to create a clean class, - * which allows faster access to vector data, in order to create high performance - * routines. Old access functions are still available. - * + * ---------------------------------------------------------------------- */ -#ifndef ARRAY2D_H -#define ARRAY2D_H +#ifndef PFS_ARRAY2D_H +#define PFS_ARRAY2D_H + +#include +#include +#include +#include + +#include + +//! \file array2d.h +//! \brief general 2d array interface +//! \author Davide Anastasia +//! \note This version is different then the one in the PFSTOOLS. This version +//! is inspired by the one in PFSTOOLS, but they are now quite different and +//! most likely, not compatible namespace pfs { - /** - * @brief Two dimensional array of floats - * - * This class holds 2 dimensional arrays of floats in column-major order. - * Allows easy indexing and retrieving array dimensions. It offers an undirect - * access to the data (using (x)(y) or (elem) ) or a direct access to the data - * (using getRawData()). - */ - class Array2D - { - private: - float* m_data; - int m_cols; - int m_rows; - bool m_is_data_owned; - - Array2D& operator = (const Array2D& other); - Array2D(const Array2D& other); - - public: - Array2D(int cols, int rows); - Array2D(int cols, int rows, float* data); - - - /** - * Each implementing class should provide its own destructor. - * It must be virtual to allow derived class to call their destructor as well. - */ - virtual ~Array2D(); - - /** - * Access an element of the array for reading and - * writing. Whether the given row and column are checked against - * array bounds depends on an implementing class. - * - * Note, that if an Array2D object is passed as a pointer (what - * is usually the case), to access its elements, you have to use - * somewhat strange syntax: (*array)(row, column). - * - * @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) - */ - float& operator()( int cols, int rows ); - - /** - * Access an element of the array for reading. Whether the given - * row and column are checked against array bounds depends on an - * implementing class. - * - * Note, that if an Array2D object is passed as a pointer (what - * is usually the case), to access its elements, you have to use - * somewhat strange syntax: (*array)(row, column). - * - * @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) - */ - const float& operator()( int cols, int rows ) const; - - /** - * Access an element of the array for reading and writing. This - * is probably faster way of accessing elements than - * operator(col, row). However there is no guarantee on the - * order of elements as it usually depends on an implementing - * class. The only assumption that can be make is that there are - * exactly columns*rows elements and they are all unique. - * - * Whether the given index is checked against array bounds - * depends on an implementing class. - * - * Note, that if an Array2D object is passed as a pointer (what - * is usually the case), to access its elements, you have to use - * somewhat strange syntax: (*array)(index). - * - * @param index index of an element within the range 0..(getCols()*getRows()-1) - */ - float& operator()( int index ); - - /** - * Access an element of the array for reading. This - * is probably faster way of accessing elements than - * operator(col, row). However there is no guarantee on the - * order of elements as it usually depends on an implementing - * class. The only assumption that can be make is that there are - * exactly columns*rows elements and they are all unique. - * - * Whether the given index is checked against array bounds - * depends on an implementing class. - * - * Note, that if an Array2D object is passed as a pointer (what - * is usually the case), to access its elements, you have to use - * somewhat strange syntax: (*array)(index). - * - * @param index index of an element within the range 0..(getCols()*getRows()-1) - */ - const float& operator()( int index ) const; - - /** - * Get number of columns or, in case of an image, width. - */ - int getCols() const; - - /** - * Get number of rows or, in case of an image, height. - */ - int getRows() const; - - /** - * Direct access to the raw data - */ - float* getRawData(); - - /** - * Direct access to the raw data - */ - const float* getRawData() const; - - /** - * Reset the entire vector data to the value "value" - */ - void reset(const float value = 0.0f); - - /** - * Scale entire 2D array by "value" - */ - void scale(const float value); - }; - - inline int Array2D::getCols() const { return m_cols; } - inline int Array2D::getRows() const { return m_rows; } - inline float* Array2D::getRawData() { return m_data; } - inline const float* Array2D::getRawData() const { return m_data; } - - inline float& Array2D::operator()( int cols, int rows ) - { - //assert( cols >= 0 && cols < m_cols ); - //assert( rows >= 0 && rows < m_rows ); - return m_data[ rows*m_cols + cols ]; - } - - inline const float& Array2D::operator()( int cols, int rows ) const - { - //assert( cols >= 0 && cols < m_cols ); - //assert( rows >= 0 && rows < m_rows ); - return m_data[ rows*m_cols + cols ]; - } - - inline float& Array2D::operator()( int index ) - { - //assert( index >= 0 && index < m_rows*m_cols ); - return m_data[index]; - } - - inline const float& Array2D::operator()( int index ) const - { - //assert( index >= 0 && index <= m_rows*m_cols ); - return m_data[index]; - } - - void copyArray(const Array2D *from, Array2D *to); - void copyArray(const Array2D *from, Array2D *to, int x_ul, int y_ul, int x_br, int y_br); - - void setArray(Array2D *array, const float value); - void multiplyArray(Array2D *z, const Array2D *x, const Array2D *y); - void divideArray(Array2D *z, const Array2D *x, const Array2D *y); +//! +//! \brief Two dimensional array of data +//! +//! This class holds 2 dimensional arrays of an unspecified type in row-major +//! order. Allows easy indexing and retrieving array dimensions. +//! It offers an undirect access to the data (using (x)(y) or (elem) ) or a +//! 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; + + //! \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); + + //! \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); + + //! \brief assignment operator (always performs deep copy) + self& operator=(const self& other); + + //! \brief virtual destructor + virtual ~Array2D() {} + + //! Access an element of the array. + //! Whether the given row and column are checked against + //! array bounds depends on an implementing class. + //! + //! \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; + + //! Access an element of the array. This method mocks the subscript operator + //! in a vector class + //! //! + //! \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; + + //! \brief Get number of columns or, in case of an image, width. + 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 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(); } + + //! \brief Direct access to the raw data + const Type* data() const + { return m_data.data(); } + + //! \brief Reset the entire vector data to the value "value" + void reset(const Type& value = Type()); + + //! \brief Swap the content of the current instance with \a other + void swap(self& other); + +public: + // element/row 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; } + + //! \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); } + + // 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(); } + +private: + DataBuffer m_data; + + size_t m_cols; + size_t m_rows; +}; + +//! \brief typedef provided for backward compatibility with the old API +typedef ::pfs::Array2D Array2Df; + +//! \brief Set all elements of the array to a give value. +//! +//! \param array array to modify +//! \param value all elements of the array will be set to this value +template +void setArray(Array2D& array, const Type& value); + +//! \brief Perform element-by-element multiplication: z = x * y. +//! z must be the same as x or y. +//! +//! \param z array where the result is stored +//! \param x first element of the multiplication +//! \param y second element of the multiplication +template +void multiplyArray(Array2D& z, const Array2D& x, const Array2D& y); + +//! \brief Perform element-by-element division: z = x / y. +//! z must be the same as x or y. +//! +//! \param z array where the result is stored +//! \param x first element of the division +//! \param y second element of the division +template +void divideArray(Array2D& z, const Array2D& x, const Array2D& y); + +} // namespace pfs + +namespace std +{ +template +void swap(::pfs::Array2D& a, ::pfs::Array2D& b) +{ + a.swap(b); } +} // namespace std + +#include -#endif // ARRAY2D_H +#endif // PFS_ARRAY2D_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/array2d.hxx luminance-hdr-2.3.1/src/Libpfs/array2d.hxx --- luminance-hdr-2.3.0/src/Libpfs/array2d.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/array2d.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,178 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2010-2012 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_ARRAY2D_HXX +#define PFS_ARRAY2D_HXX + +//! \file array2d.hxx +//! \brief General 2d Array interface +//! \author Davide Anastasia +//! \note This class is different then the one in the PFSTOOLS + +#include +#include + +#include +#include + +using namespace std; + +namespace pfs { + +template +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); +} + +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); +} + +template +Array2D& Array2D::operator=(const Array2D& other) +{ + using std::swap; + + Array2D newState(other); + swap(*this, newState); + + return *this; +} + +template +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); +} + +template +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) +{ +#ifndef NDEBUG + return m_data.at( rows*m_cols + cols ); +#else + return m_data[ rows*m_cols + cols ]; +#endif +} + +template +inline +const Type& Array2D::operator()( size_t cols, size_t rows ) const +{ +#ifndef NDEBUG + return m_data.at( rows*m_cols + cols ); +#else + return m_data[ rows*m_cols + cols ]; +#endif +} + +template +inline +Type& Array2D::operator()( size_t index ) +{ +#ifndef NDEBUG + return m_data.at( index ); +#else + return m_data[index]; +#endif +} + +template +inline +const Type& Array2D::operator()( size_t index ) const +{ +#ifndef NDEBUG + return m_data.at( index ); +#else + return m_data[index]; +#endif +} + +template +void Array2D::reset(const Type& value) +{ + std::fill(m_data.begin(), m_data.end(), value); +} + +template +void setArray(Array2D& array, const Type& value) +{ + array.reset(value); +} + +template +void multiplyArray(Array2D& z, const Array2D& x, const Array2D& y) +{ + assert( x.getRows() == y.getRows() ); + assert( x.getCols() == y.getCols() ); + assert( x.getRows() == z.getRows() ); + assert( x.getCols() == z.getCols() ); + + vex::vmul(x.getRawData(), y.getRawData(), + z.getRawData(), + x.getRows()*x.getCols()); +} + +template +void divideArray(Array2D& z, const Array2D& x, const Array2D& y) +{ + assert( x.getRows() == y.getRows() ); + assert( x.getCols() == y.getCols() ); + assert( x.getRows() == z.getRows() ); + assert( x.getCols() == z.getCols() ); + + vex::vdiv( x.getRawData(), y.getRawData(), + z.getRawData(), + x.getRows()*x.getCols() ); +} + +} // Libpfs + +#endif // PFS_ARRAY2D_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/array2d_fwd.h luminance-hdr-2.3.1/src/Libpfs/array2d_fwd.h --- luminance-hdr-2.3.0/src/Libpfs/array2d_fwd.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/array2d_fwd.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia + +#ifndef PFS_ARRAY2D_FWD_H +#define PFS_ARRAY2D_FWD_H + +namespace pfs +{ +template +class Array2D; + +//! \brief typedef provided for backward compatibility with the old API +typedef Array2D Array2Df; +} // namespace pfs + +#endif /* PFS_ARRAY2D_FWD_H */ diff -Nru luminance-hdr-2.3.0/src/Libpfs/channel.cpp luminance-hdr-2.3.1/src/Libpfs/channel.cpp --- luminance-hdr-2.3.0/src/Libpfs/channel.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/channel.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,10 +1,8 @@ -/** - * @brief PFS library - PFS Channel - * +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia + * Copyright (C) 2011-2012 Davide Anastasia * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,124 +18,28 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * @author Davide Anastasia */ +//! \author Rafal Mantiuk, +//! \author Davide Anastasia + #include "channel.h" #include "tag.h" #include -using namespace std; +namespace pfs { + +Channel::Channel( size_t width, size_t height, const std::string& channelName) + : ChannelData( width, height ) + , m_name( channelName ) + , m_tags() +{} -namespace pfs -{ - //------------------------------------------------------------------------------ - // Channel implementation - //------------------------------------------------------------------------------ - - Channel::Channel( int width, int height, std::string n_name) - { - channel_impl = new Array2D( width, height ); - tags = new TagContainer(); - name = n_name; - - //std::cout << "Channel constructor (" << name->data() << ")" << std::endl; - } - - Channel::~Channel() - { - //std::cout << "Channel destructor (" << name->data() << ")" << std::endl; - - delete channel_impl; - delete tags; - } - - // Channel implementation - TagContainer* Channel::getTags() - { - return tags; - } - - float* Channel::getRawData() - { - return channel_impl->getRawData(); - } - - const float* Channel::getRawData() const - { - return channel_impl->getRawData(); - } - - //Array2D implementation - // virtual int getCols() const - // { - // return channel_map->getCols(); - // } - // - // virtual int getRows() const - // { - // return channel_map->getRows(); - // } - - /** - * Gets width of the channel (in pixels). - * This is a synonym for Array2D::getCols(). - */ - int Channel::getWidth() const - { - return channel_impl->getCols(); - } - - /** - * Gets height of the channel (in pixels). - * This is a synonym for Array2D::getRows(). - */ - int Channel::getHeight() const - { - return channel_impl->getRows(); - } - - std::string Channel::getName() const - { - return name; - } - - // inline float& operator()( int x, int y ) - // { - // return channel_map->operator()(x, y); - // } - // - // inline const float& operator()( int x, int y ) const - // { - // return channel_map->operator()(x, y); - // } - // - // inline float& operator()( int rowMajorIndex ) - // { - // return channel_map->operator()(rowMajorIndex); - // } - // - // inline const float& operator()( int rowMajorIndex ) const - // { - // return channel_map->operator()(rowMajorIndex); - // } - - Array2D* Channel::getChannelData() - { - return channel_impl; - } - - void Channel::setChannelData(Array2D *array) - { - if (channel_impl) - delete channel_impl; - channel_impl = array; - } +Channel::~Channel() +{} -} +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/channel.h luminance-hdr-2.3.1/src/Libpfs/channel.h --- luminance-hdr-2.3.0/src/Libpfs/channel.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/channel.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,10 +1,8 @@ -/** - * @brief PFS library - PFS Channel - * +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia + * Copyright (C) 2011-2012 Davide Anastasia * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,153 +18,70 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * @author Davide Anastasia */ + +//! \brief PFS library - PFS Channel +//! \author Rafal Mantiuk, +//! \author Davide Anastasia -#ifndef CHANNEL_H -#define CHANNEL_H +#ifndef PFS_CHANNEL_H +#define PFS_CHANNEL_H #include #include +#include -#include "pfs.h" // SelfPtr -#include "array2d.h" -#include "tag.h" +#include +#include -namespace pfs +namespace pfs { + +//! \brief Channel interface represents a 2D rectangular array with +//! associated tags. +class Channel : public Array2D { +public: + typedef Array2D ChannelData; -/** - * TODO: change it! - * Channel interface represents a 2D rectangular array with - * associated tags. - */ -// class Channel /*: public Array2D */ -// { -// public: -// virtual int getWidth() const = 0; -// virtual int getHeight() const = 0; -// virtual std::string getName() const = 0; -// virtual TagContainer *getTags() = 0; -// virtual float *getRawData() = 0; -// virtual Array2DImpl* getChannelData() = 0; -// /* Empty Virtual Destructor for Channel */ -// virtual ~Channel() { } -// }; - - //class ChannelImpl: public Channel - class Channel - { - friend class DOMIO; - - /* width = cols */ - /* height = rows */ - protected: - std::string name; - Array2D* channel_impl; - - TagContainer *tags; - - public: - Channel( int width, int height, std::string n_name); - - virtual ~Channel(); - - /** - * Returns TagContainer that can be used to access or modify - * tags associated with this Channel object. - */ - TagContainer *getTags(); - - /** - * For performance reasons, the channels can be accessed as a - * table of float values. Data is given in row-major order, i.e. - * it is indexed data[x+y*width]. If performance is not crucial, - * use Array2D interface instead. - * - * @return a table of floats of the size width*height - */ - float *getRawData(); - const float* getRawData() const; - - /** - * Gets width of the channel (in pixels). - * This is a synonym for Array2D::getCols(). - */ - virtual int getWidth() const; - - /** - * Gets height of the channel (in pixels). - * This is a synonym for Array2D::getRows(). - */ - virtual int getHeight() const; - - /** - * Gets name of the channel. - */ - virtual std::string getName() const; - - Array2D* getChannelData(); - void setChannelData(Array2D *); - }; - - //------------------------------------------------------------------------------ - // Map of channels - //------------------------------------------------------------------------------ - struct string_cmp: public std::binary_function - { - bool operator()(std::string s1, std::string s2) const - { - return (s1.compare(s2) < 0); - } - }; - - typedef std::map ChannelMap; //, str_cmp> ; - - //------------------------------------------------------------------------------ - // Channel Iterator Interface - //------------------------------------------------------------------------------ - /** - * Iterator that allows to get the list of available channels in a frame. - */ - class ChannelIterator - { - ChannelMap::iterator it; - ChannelMap *cm; - public: - inline ChannelIterator( ChannelMap *cm ) : cm(cm) - { - reset(); - } - - inline void reset() - { - it = cm->begin(); - } - - /** - * Get next item on the list. - */ - inline Channel *getNext() - { - if ( !hasNext() ) return NULL; - return (it++)->second; - } - - /** - * Returns true if there is still an item left on the list. - */ - inline bool hasNext() const - { - return it != cm->end(); - } - }; + Channel(size_t width, size_t height, const std::string& channelName); + + virtual ~Channel(); - typedef SelfDestructPtr ChannelIteratorPtr; -} + using ChannelData::data; + using ChannelData::resize; + + //! + //! \brief Returns TagContainer that can be used to access or modify + //! tags associated with this Channel object. + //! + TagContainer &getTags(); + const TagContainer &getTags() const; + + //! \brief Gets width of the channel (in pixels). + //! This is a synonym for Array2D::getCols(). + //! + size_t getWidth() const; + + //! Gets height of the channel (in pixels). + //! This is a synonym for Array2D::getRows(). + //! + size_t getHeight() const; + + //! Gets name of the channel. + //! + 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; +}; +} // namespace pfs -#endif // CHANNEL_H +#include +#endif // PFS_CHANNEL_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/channel.hxx luminance-hdr-2.3.1/src/Libpfs/channel.hxx --- luminance-hdr-2.3.0/src/Libpfs/channel.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/channel.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 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 inline functions for pfs::Channel +//! \author Davide Anastasia + +#ifndef PFS_CHANNEL_HXX +#define PFS_CHANNEL_HXX + +#include + +namespace pfs { + +inline const std::string& Channel::getName() const +{ return m_name; } + +inline size_t Channel::getWidth() const +{ return getCols(); } + +inline size_t Channel::getHeight() const +{ return getRows(); } + +inline TagContainer& Channel::getTags() +{ return m_tags; } + +inline const TagContainer& Channel::getTags() const +{ return m_tags; } + +} // pfs + +#endif // PFS_CHANNEL_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/colorspace/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/colorspace/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB COLORSPACE_H *.h) +FILE(GLOB COLORSPACE_HXX *.hxx) +FILE(GLOB COLORSPACE_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${COLORSPACE_H} ${COLORSPACE_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${COLORSPACE_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/colorspace.cpp luminance-hdr-2.3.1/src/Libpfs/colorspace/colorspace.cpp --- luminance-hdr-2.3.0/src/Libpfs/colorspace/colorspace.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/colorspace.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,269 @@ +/** + * @brief PFS library - color space transformations + * + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Rafal Mantiuk, + * + * @author Davide Anastasia (2010 10 13) + * 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 $ + */ + +#include "colorspace.h" + +#include +#include +#include +#include + +#include "Libpfs/pfs.h" +#include "Libpfs/array2d.h" +#include "Libpfs/utils/msec_timer.h" + +#include "Libpfs/utils/transform.h" +#include "Libpfs/colorspace/rgb.h" +#include "Libpfs/colorspace/xyz.h" + +#include + +using namespace std; +using namespace boost::assign; + +namespace pfs { + +//----------------------------------------------------------- +// sRGB conversion functions +//----------------------------------------------------------- +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(); +#endif + + utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), + outC1->begin(), outC2->begin(), outC3->begin(), + colorspace::ConvertSRGB2XYZ()); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "transformSRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; +#endif + +} +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()); +} + +//----------------------------------------------------------- +// RGB conversion functions +//----------------------------------------------------------- +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(); +#endif + + utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), + outC1->begin(), outC2->begin(), outC3->begin(), + colorspace::ConvertRGB2XYZ()); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "transformRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; +#endif +} + +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 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(); +#endif + + utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), + outC1->begin(), outC2->begin(), outC3->begin(), + colorspace::ConvertXYZ2SRGB()); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + 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 ) +{ +#ifdef TIMER_PROFILING + msec_timer f_timer; + f_timer.start(); +#endif + + utils::transform(inC1->begin(), inC1->end(), inC2->begin(), inC3->begin(), + outC1->begin(), outC2->begin(), outC3->begin(), + colorspace::ConvertXYZ2RGB()); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + 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++ ) + { + 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); + + // 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); + 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++ ) + { + 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); + + X = x/y * Y; + Z = (1.f-x-y)/y * Y; + outY = Y; + } +} + +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; + 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++ ) + { + 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); + + outY = Y; + } +} + +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() ); + + // 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) + // Yuv -> * + (CSTransformProfile(CS_YUV, CS_XYZ), transformYuv2XYZ) + // Yxy -> * + (CSTransformProfile(CS_Yxy, CS_XYZ), transformYxy2XYZ) + ; + + CSTransformMap::const_iterator itTransform = + s_csTransformMap.find( CSTransformProfile(inCS, outCS) ); + + if ( itTransform == s_csTransformMap.end() ) + { + throw Exception( "Unsupported color tranform" ); + } +#ifndef NDEBUG + std::cerr << __FUNCTION__ << ": Found right match for colorspace conversion\n"; +#endif + // CSTransformFunc func = + (itTransform->second)( inC1, inC2, inC3, outC1, outC2, outC3 ); +} +} // namespace pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/colorspace.h luminance-hdr-2.3.1/src/Libpfs/colorspace/colorspace.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace/colorspace.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/colorspace.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,106 @@ +/** + * @brief PFS library - color space transformations + * + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2010-2013 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + * + * @author Rafal Mantiuk, + * + * @author Davide Anastasia (2010 10 13) + * 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 $ + */ + +#ifndef COLORSPACE_H +#define COLORSPACE_H + +#include +#include + +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)) +}; + +// 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); + +// 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); + +// 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); + +// Yuv -> * +void transformYuv2XYZ(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); + +//! \brief Transform color channels from one color space into +//! another. Input and output channels may point to the same data +//! for in-memory transform. +//! +//! \param inCS input color space +//! \param inC1 first color channel of the input image +//! \param inC2 second color channel of the input image +//! \param inC3 third color channel of the input image +//! \param outCS output color space +//! \param outC1 first color channel of the output image +//! \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 ); + +} + +#endif // COLORSPACE_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.cpp luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.cpp --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include + +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); + } + if ( sample >= -0.04045f ) + { + return sample*(1.f/12.92f); + } + return -pow((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); + } + if ( sample >= -0.0031308f ) { + return (sample * 12.92f); + } + return ((0.055f - 1.f)*pow(-sample, 1.f/2.4f) - 0.055f); +} + +} +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.h luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * 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 RGB conversion functions +//! \author Davide Anastasia + +#ifndef PFS_COLORSPACE_RGB_H +#define PFS_COLORSPACE_RGB_H + +namespace pfs { +namespace colorspace { + +//! \brief Functor SRGB -> RGB conversion +struct ConvertSRGB2RGB { + //! \brief single sample expanding SRGB -> RGB + 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; +}; + +//! \brief Functor RGB -> SRGB conversion +struct ConvertRGB2SRGB { + //! \brief single sample companding SRGB -> RGB + 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; +}; + +} // colorspace +} // pfs + +#include // inline functions or template +#endif // PFS_COLORSPACE_RGB_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.hxx luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.hxx --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgb.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgb.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * 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 RGB conversion functions +//! \author Davide Anastasia + +#ifndef PFS_COLORSPACE_RGB_HXX +#define PFS_COLORSPACE_RGB_HXX + +#include + +namespace pfs { +namespace colorspace { + +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 +{ + o1 = (*this)(i1); + o2 = (*this)(i2); + o3 = (*this)(i3); +} + +} +} + +#endif // PFS_COLORSPACE_RGB_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper.cpp luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper.cpp --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,236 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \file RGBRemapper.cpp +//! \brief This file creates common routines for mapping float RGB values into +//! 8-bits or 16-bits integer RGB (QRgb or quint16) +//! \author Davide Anastasia +//! \since Luminance HDR 2.3.0-beta1 + +#include + +#include +#include +#include +#include "arch/math.h" + +namespace +{ +template +inline +O_ scaleAndRound(float value, float MIN_, float MAX_) +{ + value *= MAX_; + value = std::min(value, MAX_); + value = std::max(value, MIN_); + value += 0.5f; + + return static_cast(value); +} + +const float& clamp(const float& value, const float& min_, const float& max_) +{ + if ( value > max_ ) return max_; + if ( value < min_ ) return min_; + return value; +} + +// useful data structure to implement a triple of float as RGB pixel + + +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; +} + +RGBRemapper::RGBRemapper(float minValue, float maxValue, + RGBMappingType mappingMethod) + : m_MinValue(minValue) + , m_MaxValue(maxValue) + , m_Range(maxValue - minValue) + , m_LogRange(log2f(maxValue/minValue)) + { + setMappingMethod( mappingMethod ); + } + +RGBRemapper::~RGBRemapper() +{} + +void RGBRemapper::setMinMax(float minValue, float maxValue) +{ + m_MinValue = minValue; + m_MaxValue = maxValue; + m_Range = maxValue - minValue; + m_LogRange = log2f(maxValue/minValue); +} + +void RGBRemapper::setMappingMethod(RGBMappingType method) +{ + m_MappingMethod = method; + + switch ( m_MappingMethod ) + { + case MAP_LINEAR: + m_MappingFunc = &RGBRemapper::mappingLinear; + break; + case MAP_GAMMA1_4: + m_MappingFunc = &RGBRemapper::mappingGamma14; + break; + case MAP_GAMMA1_8: + m_MappingFunc = &RGBRemapper::mappingGamma18; + break; + case MAP_GAMMA2_6: + m_MappingFunc = &RGBRemapper::mappingGamma26; + break; + case MAP_LOGARITHMIC: + m_MappingFunc = &RGBRemapper::mappingLog; + break; + default: + case MAP_GAMMA2_2: + m_MappingFunc = &RGBRemapper::mappingGamma22; + break; + } +} + +RGBRemapper::RgbF3 RGBRemapper::buildRgb(float r, float g, float b) const +{ +#ifndef NDEBUG + float rx = clamp((r - m_MinValue)/m_Range, 0.f, 1.f); + float gx = clamp((g - m_MinValue)/m_Range, 0.f, 1.f); + float bx = clamp((b - m_MinValue)/m_Range, 0.f, 1.f); + + return RGBRemapper::RgbF3(rx, gx, bx); +#else + return RGBRemapper::RgbF3( clamp((r - m_MinValue)/m_Range, 0.f, 1.f), + clamp((g - m_MinValue)/m_Range, 0.f, 1.f), + clamp((b - m_MinValue)/m_Range, 0.f, 1.f) ); +#endif +} + +RGBRemapper::RgbF3 RGBRemapper::mappingLinear(float r, float g, float b) const +{ + return buildRgb(r,g,b); +} + +RGBRemapper::RgbF3 RGBRemapper::mappingGamma14(float r, float g, float b) const +{ + RgbF3 pixel = buildRgb(r,g,b); + + pixel.red = powf(pixel.red, GAMMA_1_4); + pixel.green = powf(pixel.green, GAMMA_1_4); + pixel.blue = powf(pixel.blue, GAMMA_1_4); + + return pixel; +} + +RGBRemapper::RgbF3 RGBRemapper::mappingGamma18(float r, float g, float b) const +{ + RgbF3 pixel = buildRgb(r,g,b); + + pixel.red = powf(pixel.red, GAMMA_1_8); + pixel.green = powf(pixel.green, GAMMA_1_8); + pixel.blue = powf(pixel.blue, GAMMA_1_8); + + return pixel; +} + +RGBRemapper::RgbF3 RGBRemapper::mappingGamma22(float r, float g, float b) const +{ + RgbF3 pixel = buildRgb(r,g,b); + + pixel.red = powf(pixel.red, GAMMA_2_2); + pixel.green = powf(pixel.green, GAMMA_2_2); + pixel.blue = powf(pixel.blue, GAMMA_2_2); + + return pixel; +} + +RGBRemapper::RgbF3 RGBRemapper::mappingGamma26(float r, float g, float b) const +{ + RgbF3 pixel = buildRgb(r,g,b); + + // I have problems with Clang++ in using the powf function + pixel.red = powf(pixel.red, GAMMA_2_6); + pixel.green = powf(pixel.green, GAMMA_2_6); + pixel.blue = powf(pixel.blue, GAMMA_2_6); + + return pixel; +} + +RGBRemapper::RgbF3 RGBRemapper::mappingLog(float r, float g, float b) const +{ + return RgbF3(log2f(r/m_MinValue)/m_LogRange, + log2f(g/m_MinValue)/m_LogRange, + log2f(b/m_MinValue)/m_LogRange); +} + +inline +RGBRemapper::RgbF3 RGBRemapper::get(float r, float g, float b) const +{ + return (this->*m_MappingFunc)(r, g, b); +} + +void RGBRemapper::toQRgb(float r, float g, float b, QRgb& qrgb) const +{ + RgbF3 rgb = get(r,g,b); + + qrgb = qRgb( scaleAndRound(rgb.red, 0.f, 255.f), + scaleAndRound(rgb.green, 0.f, 255.f), + scaleAndRound(rgb.blue, 0.f, 255.f) ); +} + +void RGBRemapper::toUint8(float rI, float gI, float bI, + uint8_t& rO, uint8_t& gO, uint8_t& bO) const +{ + RgbF3 rgb = get(rI, gI, bI); + + rO = scaleAndRound(rgb.red, 0.f, 255.f); + gO = scaleAndRound(rgb.green, 0.f, 255.f); + bO = scaleAndRound(rgb.blue, 0.f, 255.f); +} + +void RGBRemapper::toFloat(float rI, float gI, float bI, + float& rO, float& gO, float& bO) const +{ + RgbF3 rgb = get(rI, gI, bI); + + assert(rgb.red <= 1.0f); + assert(rgb.red >= 0.0f); + assert(rgb.green >= 0.0f); + assert(rgb.green <= 1.0f); + assert(rgb.blue >= 0.0f); + assert(rgb.blue <= 1.0f); + + rO = rgb.red; + gO = rgb.green; + bO = rgb.blue; +} + +void RGBRemapper::toUint16(float r, float g, float b, + uint16_t& red, uint16_t& green, uint16_t& blue) const +{ + RgbF3 rgb = get(r,g,b); + + red = scaleAndRound(rgb.red, 0.f, 65535.f); + green = scaleAndRound(rgb.green, 0.f, 65535.f); + blue = scaleAndRound(rgb.blue, 0.f, 65535.f); +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper.h luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,114 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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_RGBREMAPPER_H +#define PFS_RGBREMAPPER_H + +//! \file RGBRemapper.h +//! \brief This file creates common routines for mapping RGB values into +//! different +//! \author Davide Anastasia +//! \since Luminance HDR 2.3.0-beta1 + +#include +#include + +#include +#include + +class RGBRemapper +{ +public: + // ctor + RGBRemapper(float minValue = 0.0f, float maxValue = 1.0f, + RGBMappingType mappingMethod = MAP_LINEAR); + + ~RGBRemapper(); + + // non-const functions + void setMinMax(float min, float max); + void setMappingMethod(RGBMappingType method); + + // const functions + //float getMinLuminance() const; + //float getMaxLuminance() const; + RGBMappingType getMappingType() const { return m_MappingMethod; } + + void toQRgb(float r, float g, float b, QRgb& qrgb) const; + + void toUint8(float rI, float gI, float bI, + uint8_t& rO, uint8_t& gO, uint8_t& bO) const; + void operator()(float rI, float gI, float bI, + uint8_t& rO, uint8_t& gO, uint8_t& bO) const + { + this->toUint8(rI, gI, bI, rO, gO, bO); + } + + void toUint16(float r, float g, float b, + uint16_t& red, uint16_t& green, uint16_t& blue) const; + void operator()(float rI, float gI, float bI, + uint16_t& rO, uint16_t& gO, uint16_t& bO) const + { + this->toUint16(rI, gI, bI, rO, gO, bO); + } + + void toFloat(float rI, float gI, float bI, + float& rO, float& gO, float& bO) const; + void operator()(float rI, float gI, float bI, + float& rO, float& gO, float& bO) const + { + this->toFloat(rI, gI, bI, rO, gO, bO); + } +private: + struct RgbF3 { + RgbF3(float r, float g, float b) + : red(r) , green(g), blue(b) + {} + + float red; + float green; + float blue; + }; + + // pointer to function + typedef RgbF3 (RGBRemapper::*MappingFunc)(float, float, float) const; + + RGBMappingType m_MappingMethod; + MappingFunc m_MappingFunc; + + float m_MinValue; + float m_MaxValue; + float m_Range; + float m_LogRange; + + RgbF3 get(float r, float g, float b) const; + + // private stuff! + RgbF3 buildRgb(float r, float g, float b) const; + RgbF3 mappingLinear(float r, float g, float b) const; + RgbF3 mappingGamma14(float r, float g, float b) const; + RgbF3 mappingGamma18(float r, float g, float b) const; + RgbF3 mappingGamma22(float r, float g, float b) const; + RgbF3 mappingGamma26(float r, float g, float b) const; + RgbF3 mappingLog(float r, float g, float b) const; +}; + +#endif // PFS_RGBREMAPPER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper_fwd.h luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper_fwd.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace/rgbremapper_fwd.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/rgbremapper_fwd.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 Forward declaration for RGBRemapper + +#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, + MAP_LOGARITHMIC = 5 +}; + +class RGBRemapper; + +#endif // PFS_RGBREMAPPER_FWD_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.cpp luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.cpp --- luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * 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 WITHo ANY WARRANTY; witho 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 + * ---------------------------------------------------------------------- + */ + +#include +#include + +namespace pfs { +namespace colorspace { + +//! \brief Basic matrices for the SRGB <-> XYZ conversion +//! \ref http://www.brucelidbloom.com/Eqn_RGB_XYZ_Matrix.html +static const float rgb2xyzD65Mat[3][3] = +{ { 0.4124564f, 0.3575761f, 0.1804375f }, + { 0.2126729f, 0.7151522f, 0.0721750f }, + { 0.0193339f, 0.1191920f, 0.9503041f } }; + +static 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 ConvertRGB2Y::operator()(float i1, float i2, float i3, float& o) const +{ + o = rgb2xyzD65Mat[1][0]*i1 + + rgb2xyzD65Mat[1][1]*i2 + + rgb2xyzD65Mat[1][2]*i3; +} + +} // colorspace +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.h luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_COLORSPACE_XYZ_H +#define PFS_COLORSPACE_XYZ_H + +//! \brief XYZ conversion functions +//! \author Davide Anastasia + +namespace pfs { +namespace colorspace { + +struct ConvertRGB2XYZ { + 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; +}; + +struct ConvertRGB2Y { + void operator()(float i1, float i2, float i3, float& o) const; +}; + +struct ConvertSRGB2Y { + 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; +}; + +struct ConvertXYZ2SRGB { + void operator()(float i1, float i2, float i3, + float& o1, float& o2, float& o3) const; +}; + + + +} +} + +#include +#endif // PFS_COLORSPACE_XYZ_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.hxx luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.hxx --- luminance-hdr-2.3.0/src/Libpfs/colorspace/xyz.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace/xyz.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_COLORSPACE_XYZ_HXX +#define PFS_COLORSPACE_XYZ_HXX + +//! \brief XYZ conversion functions +//! \author Davide Anastasia + +#include +#include + +namespace pfs { +namespace colorspace { + +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 +{ + 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 +{ + colorspace::ConvertSRGB2RGB()(i1, i2, i3, i1, i2, i3); + colorspace::ConvertRGB2Y()(i1, i2, i3, o); +} + +} // namespace +} // pfs + +#endif // PFS_COLORSPACE_XYZ_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace.cpp luminance-hdr-2.3.1/src/Libpfs/colorspace.cpp --- luminance-hdr-2.3.0/src/Libpfs/colorspace.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,431 +0,0 @@ -/** - * @brief PFS library - color space transformations - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * This library 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; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * - * @author Davide Anastasia (2010 10 13) - * 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 $ - */ - -#include -#include -#include -#include - -#include "pfs.h" -#include "array2d.h" -#include "colorspace.h" - -#include "Common/msec_timer.h" -#include "vex.h" - -using namespace std; - -namespace pfs -{ - static inline float clamp( const float v, const float min, const float max ) - { - if( v < min ) return min; - if( v > max ) return max; - return v; - } - - //--- 7 digits approximation of precise values - static const float rgb2xyzD65Mat[3][3] = - { { 0.412424f, 0.357579f, 0.180464f }, - { 0.212656f, 0.715158f, 0.072186f }, - { 0.019332f, 0.119193f, 0.950444f } }; - - static const float xyz2rgbD65Mat[3][3] = - { { 3.240708f, -1.537259f, -0.498570f }, - { -0.969257f, 1.875995f, 0.041555f }, - { 0.055636f, -0.203996f, 1.057069f } }; - - // //--- precise values for matrix convertion (above float precission) - // static const float rgb2xyzD65Mat[3][3] = - // { { 0.412424, 0.357579, 0.180464 }, - // { 0.212656, 0.715158, 0.0721856 }, - // { 0.0193324, 0.119193, 0.950444 } }; - - // static const float xyz2rgbD65Mat[3][3] = - // { { 3.24071, -1.53726, -0.498571 }, - // { -0.969258, 1.87599, 0.0415557 }, - // { 0.0556352, -0.203996, 1.05707 } }; - - // //--- original values which lead to mean sq error of above 3 for green channel - // static const float rgb2xyzD65Mat[3][3] = - // { { 0.4124f, 0.3576f, 0.1805f }, - // { 0.2126f, 0.7152f, 0.0722f }, - // { 0.0193f, 0.1192f, 0.9505f } }; - - // static const float xyz2rgbD65Mat[3][3] = - // { { 3.2406f, -1.5372f, -0.4986f }, - // { -0.9689f, 1.8758f, 0.0415f }, - // { 0.0557f, -0.2040f, 1.0570f } }; - - //----------------------------------------------------------- - // sRGB conversion functions - //----------------------------------------------------------- - void transformSRGB2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *outC3) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - const float* r = inC1->getRawData(); - const float* g = inC2->getRawData(); - const float* b = inC3->getRawData(); - - float* x = outC1->getRawData(); - float* y = outC2->getRawData(); - float* z = outC3->getRawData(); - - float i1, i2, i3; - float t1, t2, t3; - - int elems = inC1->getRows()*inC1->getCols(); - -#pragma omp parallel for private(i1,i2,i3,t1,t2,t3) - for( int idx = 0; idx < elems ; idx++ ) - { - i1 = clamp(r[idx], 0.f, 1.f); - i2 = clamp(g[idx], 0.f, 1.f); - i3 = clamp(b[idx], 0.f, 1.f); - - t1 = (i1 <= 0.04045f ? i1 / 12.92f : powf( (i1 + 0.055f) / 1.055f, 2.4f ) ); - t2 = (i2 <= 0.04045f ? i2 / 12.92f : powf( (i2 + 0.055f) / 1.055f, 2.4f ) ); - t3 = (i3 <= 0.04045f ? i3 / 12.92f : powf( (i3 + 0.055f) / 1.055f, 2.4f ) ); - - x[idx] = rgb2xyzD65Mat[0][0]*t1 + rgb2xyzD65Mat[0][1]*t2 + rgb2xyzD65Mat[0][2]*t3; - y[idx] = rgb2xyzD65Mat[1][0]*t1 + rgb2xyzD65Mat[1][1]*t2 + rgb2xyzD65Mat[1][2]*t3; - z[idx] = rgb2xyzD65Mat[2][0]*t1 + rgb2xyzD65Mat[2][1]*t2 + rgb2xyzD65Mat[2][2]*t3; - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "transformSRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; -#endif - } - - void transformXYZ2SRGB(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *outC3) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - const float* x = inC1->getRawData(); - const float* y = inC2->getRawData(); - const float* z = inC3->getRawData(); - - float* r = outC1->getRawData(); - float* g = outC2->getRawData(); - float* b = outC3->getRawData(); - - float i1, i2, i3; - float t1, t2, t3; - - const int ELEMS = inC1->getRows()*inC1->getCols(); - -#pragma omp parallel for private(i1,i2,i3,t1,t2,t3) - for( int idx = 0; idx < ELEMS; idx++ ) - { - i1 = x[idx]; - i2 = y[idx]; - i3 = z[idx]; - - t1 = xyz2rgbD65Mat[0][0]*i1 + xyz2rgbD65Mat[0][1]*i2 + xyz2rgbD65Mat[0][2]*i3; - t2 = xyz2rgbD65Mat[1][0]*i1 + xyz2rgbD65Mat[1][1]*i2 + xyz2rgbD65Mat[1][2]*i3; - t3 = xyz2rgbD65Mat[2][0]*i1 + xyz2rgbD65Mat[2][1]*i2 + xyz2rgbD65Mat[2][2]*i3; - - t1 = clamp( t1, 0.f, 1.f ); - t2 = clamp( t2, 0.f, 1.f ); - t3 = clamp( t3, 0.f, 1.f ); - - r[idx] = (t1 <= 0.0031308f ? t1 *= 12.92f : 1.055f * powf( t1, 1.f/2.4f ) - 0.055f); - g[idx] = (t2 <= 0.0031308f ? t2 *= 12.92f : 1.055f * powf( t2, 1.f/2.4f ) - 0.055f); - b[idx] = (t3 <= 0.0031308f ? t3 *= 12.92f : 1.055f * powf( t3, 1.f/2.4f ) - 0.055f); - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "transformXYZ2SRGB() = " << f_timer.get_time() << " msec" << std::endl; -#endif - } - - void transformXYZ2Yuv( const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *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); - - // 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); - outY = Y; - } - - } - - void transformYuv2XYZ( const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *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); - - X = x/y * Y; - Z = (1.f-x-y)/y * Y; - outY = Y; - } - } - - void transformYxy2XYZ( const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *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; - outY = Y; - } - } - - void transformXYZ2Yxy( const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *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); - - outY = Y; - } - } - - void transformRGB2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *outC3) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - const float* r = inC1->getRawData(); - const float* g = inC2->getRawData(); - const float* b = inC3->getRawData(); - - float* x = outC1->getRawData(); - float* y = outC2->getRawData(); - float* z = outC3->getRawData(); - - float i1, i2, i3; - const int ELEMS = inC1->getRows()*inC1->getCols(); - -#pragma omp parallel for private(i1,i2,i3) - for( int idx = 0; idx < ELEMS; idx++ ) - { - i1 = r[idx]; - i2 = g[idx]; - i3 = b[idx]; - - x[idx] = rgb2xyzD65Mat[0][0]*i1 + rgb2xyzD65Mat[0][1]*i2 + rgb2xyzD65Mat[0][2]*i3; - y[idx] = rgb2xyzD65Mat[1][0]*i1 + rgb2xyzD65Mat[1][1]*i2 + rgb2xyzD65Mat[1][2]*i3; - z[idx] = rgb2xyzD65Mat[2][0]*i1 + rgb2xyzD65Mat[2][1]*i2 + rgb2xyzD65Mat[2][2]*i3; - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "transformRGB2XYZ() = " << f_timer.get_time() << " msec" << std::endl; -#endif - } - - void transformXYZ2RGB(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - Array2D *outC1, Array2D *outC2, Array2D *outC3 ) - { -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - const float* x = inC1->getRawData(); - const float* y = inC2->getRawData(); - const float* z = inC3->getRawData(); - - float* r = outC1->getRawData(); - float* g = outC2->getRawData(); - float* b = outC3->getRawData(); - - float i1, i2, i3; - const int ELEMS = inC1->getRows()*inC1->getCols(); - -#pragma omp parallel for schedule(static, 5120) private(i1,i2,i3) - for( int idx = 0; idx < ELEMS; idx++ ) - { - i1 = x[idx]; - i2 = y[idx]; - i3 = z[idx]; - - r[idx] = xyz2rgbD65Mat[0][0]*i1 + xyz2rgbD65Mat[0][1]*i2 + xyz2rgbD65Mat[0][2]*i3; - g[idx] = xyz2rgbD65Mat[1][0]*i1 + xyz2rgbD65Mat[1][1]*i2 + xyz2rgbD65Mat[1][2]*i3; - b[idx] = xyz2rgbD65Mat[2][0]*i1 + xyz2rgbD65Mat[2][1]*i2 + xyz2rgbD65Mat[2][2]*i3; - } - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "transformXYZ2RGB() = " << f_timer.get_time() << " msec" << std::endl; -#endif - } - - typedef void(*CSTransformFunc)( const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3 ); - - struct CSTransEdge - { - CSTransEdge *next; - ColorSpace srcCS; - ColorSpace destCS; - CSTransformFunc func; - }; - - CSTransEdge TN_XYZRGB = { NULL, CS_XYZ, CS_RGB, transformXYZ2RGB }; - CSTransEdge TN_XYZYUV = { &TN_XYZRGB, CS_XYZ, CS_YUV, transformXYZ2Yuv }; - CSTransEdge TN_XYZYxy = { &TN_XYZYUV, CS_XYZ, CS_Yxy, transformXYZ2Yxy }; - CSTransEdge TN_XYZSRGB = { &TN_XYZYxy, CS_XYZ, CS_SRGB, transformXYZ2SRGB }; - - CSTransEdge TN_RGBXYZ = { NULL, CS_RGB, CS_XYZ, transformRGB2XYZ }; - - CSTransEdge TN_SRGBXYZ = { NULL, CS_SRGB, CS_XYZ, transformSRGB2XYZ }; - - CSTransEdge TN_YUV2XYZ = { NULL, CS_YUV, CS_XYZ, transformYuv2XYZ }; - - CSTransEdge TN_Yxy2XYZ = { NULL, CS_Yxy, CS_XYZ, transformYxy2XYZ }; - - CSTransEdge *CSTransGraph[] = - { - &TN_XYZSRGB, - &TN_RGBXYZ, - &TN_SRGBXYZ, - &TN_YUV2XYZ, - &TN_Yxy2XYZ - }; - - void transformColorSpace(ColorSpace inCS, const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - ColorSpace outCS, Array2D *outC1, Array2D *outC2, Array2D *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() ); - - - CSTransEdge *gotByEdge[ CS_LAST ] = { NULL }; - - // Breadth First Search - std::list bfsList; - bfsList.push_back( inCS ); - - bool found = false; - while( !bfsList.empty() ) - { - ColorSpace node = bfsList.front(); - bfsList.pop_front(); - // std::cerr << "Graph Node: " << node << "\n"; - - if( node == outCS ) - { - found = true; - break; - } - for( CSTransEdge *edge = CSTransGraph[node]; edge != NULL; edge = edge->next ) - { - if( edge->destCS != inCS && gotByEdge[ edge->destCS ] == NULL ) { - bfsList.push_back( edge->destCS ); - gotByEdge[ edge->destCS ] = edge; - } - } - } - - if( !found ) - { - // TODO: All transforms should be supported - throw Exception( "Not supported color tranform" ); - } - else - { - // Reverse path - std::list step; - ColorSpace currentNode = outCS; - while( currentNode != inCS ) - { - // std::cerr << "edge: " << gotByEdge[ currentNode ]->srcCS << " -- " - // << gotByEdge[ currentNode ]->destCS << "\n"; - step.push_front( gotByEdge[ currentNode ] ); - currentNode = gotByEdge[ currentNode ]->srcCS; - } - // Execute path - std::list::iterator it; - for( it = step.begin(); it != step.end(); it++ ) - { - // std::cerr << "edge: " << (*it)->srcCS << " -- " - // << (*it)->destCS << "\n"; - if( it == step.begin() ) - (*it)->func( inC1, inC2, inC3, outC1, outC2, outC3 ); - else - (*it)->func( outC1, outC2, outC3, outC1, outC2, outC3 ); - } - } - } -} - diff -Nru luminance-hdr-2.3.0/src/Libpfs/colorspace.h luminance-hdr-2.3.1/src/Libpfs/colorspace.h --- luminance-hdr-2.3.0/src/Libpfs/colorspace.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/colorspace.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/** - * @brief PFS library - color space transformations - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * - * This library 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; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * - * @author Davide Anastasia (2010 10 13) - * 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 $ - */ - -#ifndef COLORSPACE_H -#define COLORSPACE_H - -#include "array2d.h" - -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, ///< Absolute XYZ space, reference white - D65 - CS_SRGB, ///< 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, ///< Perceptually uniform u and v color coordinates, Y is calibrated luminance in cd/m^2 - CS_Yxy, ///< Luminance and normalized chromacities (x=X/(X+Y+Z), y=Y/(X+Y+Z)) - CS_LAST ///< For internal purposes only - }; - - void multiplyByMatrix(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3, const float mat[3][3]); - - void transformSRGB2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - void transformXYZ2SRGB(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - - void transformXYZ2Yuv(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - void transformYuv2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - - void transformYxy2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - void transformXYZ2Yxy(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - - void transformRGB2XYZ(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - void transformXYZ2RGB(const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, Array2D *outC1, Array2D *outC2, Array2D *outC3); - - /** - * Transform color channels from one color space into - * another. Input and output channels may point to the same data - * for in-memory transform. - * - * @param inCS input color space - * @param inC1 first color channel of the input image - * @param inC2 second color channel of the input image - * @param inC3 third color channel of the input image - * @param outCS output color space - * @param outC1 first color channel of the output image - * @param outC2 second color channel of the output image - * @param outC3 third color channel of the output image - */ - void transformColorSpace( ColorSpace inCS, - const Array2D *inC1, const Array2D *inC2, const Array2D *inC3, - ColorSpace outCS, - Array2D *outC1, Array2D *outC2, Array2D *outC3 ); - -} - -#endif // COLORSPACE_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/domio.cpp luminance-hdr-2.3.1/src/Libpfs/domio.cpp --- luminance-hdr-2.3.0/src/Libpfs/domio.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/domio.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,175 +0,0 @@ -/** - * @brief PFS library - DOM I/O - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia - * - * This library 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; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * @author Davide Anastasia - */ - -#include -#include - -#include "domio.h" -#include "frame.h" -#include "channel.h" -#include "array2d.h" - -using namespace std; - -namespace pfs -{ - const char *PFSFILEID="PFS1\x0a"; - - DOMIO::DOMIO() - { } - - DOMIO::~DOMIO() - { } - - Frame* DOMIO::readFrame( FILE *inputStream ) - { - assert( inputStream != NULL ); - -#ifdef HAVE_SETMODE - // Needed under MS windows (text translation IO for stdin/out) - int old_mode = setmode( fileno( inputStream ), _O_BINARY ); -#endif - - size_t read; - - char buf[5]; - read = fread( buf, 1, 5, inputStream ); - if( read == 0 ) return NULL; // EOF - - if( memcmp( buf, PFSFILEID, 5 ) ) throw Exception( "Incorrect PFS file header" ); - - int width, height, channelCount; - read = fscanf( inputStream, "%d %d" PFSEOL, &width, &height ); - if( read != 2 || width <= 0 || width > MAX_RES || height <= 0 || height > MAX_RES ) - throw Exception( "Corrupted PFS file: missing or wrong 'width', 'height' tags" ); - read = fscanf( inputStream, "%d" PFSEOL, &channelCount ); - if( read != 1 || channelCount < 0 || channelCount > MAX_CHANNEL_COUNT ) - throw Exception( "Corrupted PFS file: missing or wrong 'channelCount' tag" ); - - //Frame *frame = (Frame*)createFrame( width, height ); - Frame* frame = new Frame(width, height); - - readTags( frame->m_tags, inputStream ); - - //Read channel IDs and tags - std::list orderedChannel; - for( int i = 0; i < channelCount; i++ ) - { - char channelName[MAX_CHANNEL_NAME+1], *rs; - rs = fgets( channelName, MAX_CHANNEL_NAME, inputStream ); - if( rs == NULL ) - throw Exception( "Corrupted PFS file: missing channel name" ); - size_t len = strlen( channelName ); - // fprintf( stderr, "s = '%s' len = %d\n", channelName, len ); - if( len < 1 || channelName[len-1] != PFSEOLCH ) - throw Exception( "Corrupted PFS file: bad channel name" ); - channelName[len-1] = 0; - Channel *ch = frame->createChannel( channelName ); - readTags( ch->tags, inputStream ); - orderedChannel.push_back( ch ); - } - - read = fread( buf, 1, 4, inputStream ); - if( read == 0 || memcmp( buf, "ENDH", 4 ) ) - throw Exception( "Corrupted PFS file: missing end of header (ENDH) token" ); - - - //Read channels - std::list::iterator it; - for ( it = orderedChannel.begin(); it != orderedChannel.end(); it++ ) - { - Channel *ch = *it; - unsigned int size = frame->getWidth()*frame->getHeight(); - read = fread( ch->getRawData(), sizeof( float ), size, inputStream ); - if ( read != size ) - throw Exception( "Corrupted PFS file: missing channel data" ); - } -#ifdef HAVE_SETMODE - setmode( fileno( inputStream ), old_mode ); -#endif - return frame; - } - - - Frame* DOMIO::createFrame( int width, int height ) - { - Frame *frame = new Frame( width, height ); - if ( frame == NULL ) throw Exception( "Out of memory" ); - return frame; - } - - - void DOMIO::writeFrame( Frame *src_frame, FILE *outputStream ) - { - assert( outputStream != NULL ); - assert( src_frame != NULL ); -#ifdef HAVE_SETMODE - // Needed under MS windows (text translation IO for stdin/out) - int old_mode = setmode( fileno( outputStream ), _O_BINARY ); -#endif - - fwrite( PFSFILEID, 1, 5, outputStream ); // Write header ID - - fprintf( outputStream, "%d %d" PFSEOL, src_frame->getWidth(), src_frame->getHeight() ); - //fprintf( outputStream, "%d" PFSEOL, src_frame->channel.size() ); - fprintf( outputStream, "%zd" PFSEOL, src_frame->m_channels.size() ); - - writeTags( src_frame->m_tags, outputStream ); - - //Write channel IDs and tags - for ( ChannelMap::iterator it = src_frame->m_channels.begin(); it != src_frame->m_channels.end(); it++ ) - { - fprintf( outputStream, "%s" PFSEOL, it->second->getName().c_str() ); - writeTags( it->second->tags, outputStream ); - } - - fprintf( outputStream, "ENDH"); - - //Write channels - { - for( ChannelMap::iterator it = src_frame->m_channels.begin(); it != src_frame->m_channels.end(); it++ ) - { - int size = src_frame->getWidth()*src_frame->getHeight(); - fwrite( it->second->getRawData(), sizeof( float ), size, outputStream ); - } - } - - //Very important for pfsoutavi !!! - fflush(outputStream); -#ifdef HAVE_SETMODE - setmode( fileno( outputStream ), old_mode ); -#endif - } - - void DOMIO::freeFrame( Frame *frame ) - { - delete frame; - frame = NULL; - } - -} - diff -Nru luminance-hdr-2.3.0/src/Libpfs/domio.h luminance-hdr-2.3.1/src/Libpfs/domio.h --- luminance-hdr-2.3.0/src/Libpfs/domio.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/domio.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/** - * @brief PFS library - DOM I/O - * - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia - * - * This library 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; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * @author Davide Anastasia - */ - -#ifndef DOMIO_H -#define DOMIO_H - -#include "frame.h" - -namespace pfs -{ - /** - * Reading and writing frames in PFS format from/to streams. - */ - class DOMIO - { - public: - DOMIO(); - ~DOMIO(); - - /** - * Creates a frame that can be latter written to the stream - * using writeFrame method. This method and readFrame are the - * only way to create Frame objects. - * - * Note: Frame object must be released with freeFrame methods - * as soon as it is no longer needed. Otherwise the - * application will run out of memory. - * - * @param width width of the frame to create - * @param height height of the frame to create - * @return Frame object that can be modified and written back to PFS - * stream using writeFrame method - */ - Frame *createFrame( int width, int height ); - - /** - * Read PFS frame from the input Stream. This method and - * createFrame are the only way to create Frame objects. - * - * Note: Frame object must be released with freeFrame methods - * as soon as it is no longer needed. Otherwise the - * application will run out of memory. - * - * @param inputStream read frame from that stream - * @return Frame object that contains PFS frame read from - * the stream. NULL if there are no more frames. - */ - Frame *readFrame( FILE *inputStream ); - - /** - * Writes Frame object to outputStream in PFS format. - * - * @param frame Frame object to be written. This object - * must be created with readFrame or createFrame method. - * @param outputStream write frame to that stream - */ - void writeFrame( Frame *frame, FILE *outputStream ); - - /** - * Deallocated memory allocated with createFrame or readFrame. Must - * be called as soon as frame is not needed. Pointer to a frame is - * invalid after this method call. - * - * @param frame Frame object to be freed - */ - void freeFrame( Frame *frame ); - }; - -} - -#endif // DOMIO_H - - - - diff -Nru luminance-hdr-2.3.0/src/Libpfs/exception.h luminance-hdr-2.3.1/src/Libpfs/exception.h --- luminance-hdr-2.3.0/src/Libpfs/exception.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/exception.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * 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 Base class for C++ exceptions inside the library +//! \author Davide Anastasia + +#ifndef PFS_EXCEPTION_H +#define PFS_EXCEPTION_H + +#include + +namespace pfs { + +/** + * 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) + {} +}; + +} + +#endif // PFS_EXCEPTION_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/exif/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/exif/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/exif/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/exif/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB EXIF_H *.h) +FILE(GLOB EXIF_HXX *.hxx) +FILE(GLOB EXIF_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${EXIF_H} ${EXIF_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${EXIF_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/exif/exif_data.cpp luminance-hdr-2.3.1/src/Libpfs/exif/exif_data.cpp --- luminance-hdr-2.3.0/src/Libpfs/exif/exif_data.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/exif/exif_data.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,230 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#include "exif_data.hpp" + +#include +#include +#include + +namespace pfs +{ +namespace exif +{ + +namespace +{ +// reflected-light meter calibration constant +const float K = 12.07488f; +// default ISO value for camera that do not report io +const float DEFAULT_ISO = 100.f; +// invalid value +const float INVALID_VALUE = -1.f; +// invalid value +const float INVALID_EV_VALUE = -100000.f; +// default EVCOMP value +const float DEFAULT_EVCOMP = 0.0f; + +float log_base(float value, float base) +{ + return (std::log(value) / std::log(base)); +} + +} + +exif_data::exif_data() +{ + reset(); +} + +exif_data::exif_data(const std::string& filename) +{ + reset(); + from_file(filename); +} + +void exif_data::from_file(const std::string& filename) +{ + reset(); + try + { + ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); + image->readMetadata(); + ::Exiv2::ExifData &exifData = image->exifData(); + + // if data is empty + if (exifData.empty()) return; + + // Exiv2 iterator in read-only + ::Exiv2::ExifData::const_iterator it = exifData.end(); + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime"))) != exifData.end()) + { + m_exposure_time = it->toFloat(); + } + 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) + { + div = static_cast(tmp + 0.5f); + } + else + { + num = static_cast(1.0f/tmp + 0.5f); + } + m_exposure_time = static_cast(num)/div; + } + + + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber"))) != exifData.end()) + { + m_f_number = it->toFloat(); + } + else if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ApertureValue"))) != exifData.end()) + { + m_f_number = 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_f_number == 0.0f) + { + m_f_number = 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()) + { + m_iso_speed = it->toFloat(); + } + + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureBiasValue"))) != exifData.end()) + { + m_ev_compensation = it->toFloat(); + } + } + catch (Exiv2::AnyError& e) + { + return; + } +} + +const float& exif_data::exposure_time() const +{ + return m_exposure_time; +} +bool exif_data::is_exposure_time() const +{ + return (m_exposure_time != INVALID_VALUE); +} +void exif_data::exposure_time(float et) +{ + m_exposure_time = et; +} + +const float& exif_data::iso_speed() const +{ + return m_iso_speed; +} +bool exif_data::is_iso_speed() const +{ + return true; +} +void exif_data::iso_speed(float iso) +{ + m_iso_speed = iso; +} + +const float& exif_data::f_number() const +{ + return m_f_number; +} +bool exif_data::is_f_number() const +{ + return (m_f_number != INVALID_VALUE); +} +void exif_data::f_number(float fnum) +{ + m_f_number = fnum; +} + +float exif_data::exposure_value() const +{ + if ( is_f_number() && is_exposure_time() ) + { + return log_base((m_f_number*m_f_number)/m_exposure_time, 2.0f); + } + return INVALID_EV_VALUE; +} +bool exif_data::is_exposure_value() const +{ + return (exposure_value() != INVALID_EV_VALUE); +} + +const float& exif_data::exposure_value_compensation() const +{ + return m_ev_compensation; +} +bool exif_data::is_exposure_value_compensation() const +{ + return (m_ev_compensation != 0.0f); +} +void exif_data::exposure_value_compensation(float evcomp) +{ + m_ev_compensation = evcomp; +} + +float exif_data::average_scene_luminance() const +{ + if ( is_iso_speed() && is_f_number() && is_exposure_time() ) + { + return ( (m_exposure_time * m_iso_speed) / (m_f_number*m_f_number*K) ); + } + return INVALID_VALUE; +} + +void exif_data::reset() +{ + // reset internal value + m_exposure_time = INVALID_VALUE; + m_iso_speed = DEFAULT_ISO; + m_f_number = INVALID_VALUE; + m_ev_compensation = DEFAULT_EVCOMP; +} + +bool exif_data::is_valid() const +{ + return ( is_iso_speed() && is_f_number() && is_exposure_time() ); +} + +std::ostream& operator<<(std::ostream& out, const exif_data& exif_data) +{ + out << "Exposure time = " << exif_data.m_exposure_time << ", "; + out << "F value = " << exif_data.m_f_number << ", "; + out << "ISO = " << exif_data.m_iso_speed << ", "; + out << "Exposure value = " << exif_data.exposure_value() << " (" << exif_data.m_ev_compensation << "), "; + out << "Average Scene Luminance = " << exif_data.average_scene_luminance(); + + return out; +} + +} // namespace exif +} // namespace LibHDR diff -Nru luminance-hdr-2.3.0/src/Libpfs/exif/exif_data.hpp luminance-hdr-2.3.1/src/Libpfs/exif/exif_data.hpp --- luminance-hdr-2.3.0/src/Libpfs/exif/exif_data.hpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/exif/exif_data.hpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,115 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#include +#include +#include + +namespace pfs +{ +//! \namespace Contains all the operations based on EXIF data +namespace exif +{ + +//! \class exif_data +//! \brief Holds Exif Data +//! \author Davide Anastasia +class exif_data +{ +public: + //! \brief empty ctor + exif_data(); + + //! + //! \param[in] filename Name of source file + explicit exif_data(const std::string& filename); + + //! \brief read exif data from file + //! \param[in] filename Name of source file + void from_file(const std::string& filename); + + const float& exposure_time() const; + bool is_exposure_time() const; + void exposure_time(float et); + + const float& iso_speed() const; + bool is_iso_speed() const; + void iso_speed(float iso); + + const float& f_number() const; + bool is_f_number() const; + void f_number(float fnum); + + float exposure_value() const; + bool is_exposure_value() const; + + const float& exposure_value_compensation() const; + bool is_exposure_value_compensation() const; + void exposure_value_compensation(float evcomp); + + //! \brief 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. + //! 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. + //! + //! [1] http://en.wikipedia.org/wiki/APEX_system + //! [2] http://en.wikipedia.org/wiki/Exposure_value + //! [3] http://en.wikipedia.org/wiki/Light_meter + //! [4] http://doug.kerr.home.att.net/pumpkin/#APEX + //! + //! This function tries first to obtain the shutter speed from either of + //! two exif tags (there is no standard between camera manifacturers): + //! 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. + //! \note This description is copied from the original source code in + //! Luminance HDR http://qtpfsgui.sourceforge.net/ + float average_scene_luminance() const; + + //! \brief reset Exif Data + void reset(); + + //! \brief returns whether enough information are available to compute + //! additional values + bool is_valid() const; + + friend std::ostream& operator<<(std::ostream& out, + const exif_data& exifdata); +private: + float m_exposure_time; + float m_iso_speed; + float m_f_number; + float m_ev_compensation; +}; + +std::ostream& operator<<(std::ostream& out, const exif_data& exifdata); + +} // exif +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/fixedstrideiterator.h luminance-hdr-2.3.1/src/Libpfs/fixedstrideiterator.h --- luminance-hdr-2.3.0/src/Libpfs/fixedstrideiterator.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/fixedstrideiterator.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,190 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2012 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_FIXEDSTRIDEITERATOR_H +#define PFS_FIXEDSTRIDEITERATOR_H + +#include +#include + +namespace pfs { + +//! \author Davide Anastasia +//! \brief stride iterator +//! \ref C++ Cookbook +//! \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 typedefs + typedef FixedStrideIterator self; + typedef typename std::iterator< std::random_access_iterator_tag, IterType> 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::pointer pointer; + + // ctors + 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; } + + //! \brief Postfix increment + self operator++(int) { + self tmp(*this); + m_data += StepSize; + return tmp; + } + + //! \brief Increment + 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); } + + //! \brief Prefix decrement + self& operator--() + { m_data -= StepSize; return *this; } + + //! \brief Postfix decrement + self operator--(int) { + self tmp(*this); + m_data -= StepSize; + return tmp; + } + + //! \brief Decrement + 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); } + + //! \brief dereferencing + reference operator*() const + { return *m_data; } + + //! \brief pointer + pointer operator->() const + { return m_data; } + + //! \brief subscription + reference operator[](const difference_type& n) + { return m_data[n * StepSize]; } + + // friend operators + template + friend bool operator==(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + friend bool operator!=(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + friend bool operator<(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + friend bool operator<=(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + friend bool operator>(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + friend bool operator>=(const FixedStrideIterator& x, const FixedStrideIterator& y); + + template + 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); + +private: + IterType m_data; +}; + +template +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); } + +template +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); } + +template +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); } + +template +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; } + +} // pfs + +#endif // PFS_FIXEDSTRIDEITERATOR_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/frame.cpp luminance-hdr-2.3.1/src/Libpfs/frame.cpp --- luminance-hdr-2.3.0/src/Libpfs/frame.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/frame.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -27,132 +27,205 @@ */ #include -#include -#include +#include +#include #include "frame.h" -#include "domio.h" #include "channel.h" using namespace std; namespace pfs { - Frame::Frame( int width, int height ): m_width( width ), m_height( height ), - m_channel_iter( &m_channels ) +Frame::Frame(size_t width, size_t height ) + : m_width( width ) + , m_height( height ) +{} + +namespace +{ +struct ChannelDeleter +{ + template + inline + void operator()(T* p) { - m_tags = new TagContainer(); + delete p; } +}; +} - Frame::~Frame() - { - delete m_tags; - ChannelMap::iterator it = m_channels.begin(); - while ( it != m_channels.end() ) - { - Channel *ch = it->second; - // Nasty trick because hashmap - // elements point to string that is - // freed by the channel - ChannelMap::iterator itToDelete = it; +Frame::~Frame() +{ + for_each(m_channels.begin(), + m_channels.end(), + ChannelDeleter()); +} - it++; - m_channels.erase( itToDelete ); - delete ch; - } - } +//! \brief Changes the size of the frame +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)); - void Frame::getXYZChannels( Channel* &X, Channel* &Y, Channel* &Z ) + m_width = width; + m_height = height; +} + +namespace +{ +struct FindChannel +{ + FindChannel(const std::string& nameChannel) + : nameChannel_(nameChannel) + {} + + inline + bool operator()(const Channel* channel) const + { + return !(channel->getName().compare( nameChannel_ )); + } + +private: + std::string nameChannel_; +}; +} + +void Frame::getXYZChannels(const Channel* &X, const Channel* &Y, const Channel* &Z ) const +{ + // find X + ChannelContainer::const_iterator it( + std::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 = std::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 = std::find_if(m_channels.begin(), + m_channels.end(), + FindChannel("Z")); + if ( it == m_channels.end() ) { - ChannelMap::iterator it; + X = Y = Z = NULL; + return; + } + Z = *it; +} - // find X - it = m_channels.find("X"); - if ( it == m_channels.end() ) - { - X = Y = Z = NULL; - return; - } - X = it->second; +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_); +} - // find Y - it = m_channels.find("Y"); - if ( it == m_channels.end() ) - { - X = Y = Z = NULL; - return; - } - Y = it->second; +void Frame::createXYZChannels( Channel* &X, Channel* &Y, Channel* &Z ) +{ + X = createChannel("X"); + Y = createChannel("Y"); + Z = createChannel("Z"); +} - // find Y - it = m_channels.find("Z"); - if ( it == m_channels.end() ) - { - X = Y = Z = NULL; - return; - } - Z = it->second; - } +const Channel* Frame::getChannel(const std::string &name) const +{ + ChannelContainer::const_iterator it = std::find_if(m_channels.begin(), + m_channels.end(), + FindChannel(name)); + if ( it == m_channels.end() ) + return NULL; + else + return *it; +} - void Frame::createXYZChannels( Channel* &X, Channel* &Y, Channel* &Z ) - { - X = createChannel("X"); - Y = createChannel("Y"); - Z = createChannel("Z"); - } +Channel* Frame::getChannel(const std::string& name) +{ + return const_cast(static_cast(*this).getChannel(name)); +} - Channel* Frame::getChannel( std::string name ) +Channel* Frame::createChannel(const std::string& name) +{ + ChannelContainer::iterator it = std::find_if(m_channels.begin(), + m_channels.end(), + FindChannel(name)); + if ( it != m_channels.end() ) { - ChannelMap::iterator it = m_channels.find(name); - if ( it == m_channels.end() ) - return NULL; - else - return it->second; + return *it; } - - Channel* Frame::createChannel( std::string name ) + else { - ChannelMap::iterator it = m_channels.find(name); + Channel* ch = new Channel( m_width, m_height, name ); - if ( it != m_channels.end() ) - { - return it->second; //m_channels[name]; - } - else - { - Channel *ch = new Channel( m_width, m_height, name ); - m_channels.insert( std::pair(name, ch) ); + m_channels.push_back( ch ); - return ch; - } + return ch; } +} - void Frame::removeChannel( Channel *ch ) +void Frame::removeChannel(const std::string& channel) +{ + ChannelContainer::iterator it = std::find_if(m_channels.begin(), + m_channels.end(), + FindChannel(channel)); + if ( it != m_channels.end() ) { - assert( ch != NULL ); - ChannelMap::iterator it = m_channels.find( ch->getName() ); - assert( it != m_channels.end() && it->second == ch ); - + Channel* ch = *it; m_channels.erase( it ); delete ch; } +} - ChannelIterator* Frame::getChannels() - { - m_channel_iter.reset(); - return &m_channel_iter; - } +ChannelContainer& Frame::getChannels() +{ + return this->m_channels; +} - ChannelIteratorPtr Frame::getChannelIterator() - { - return ChannelIteratorPtr( new ChannelIterator( &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; +} + +void Frame::swap(Frame& other) +{ + std::swap(m_width, other.m_width); + std::swap(m_height, other.m_height); + m_channels.swap( other.m_channels ); + m_tags.swap( other.m_tags ); } +} // namespace pfs + diff -Nru luminance-hdr-2.3.0/src/Libpfs/frame.h luminance-hdr-2.3.1/src/Libpfs/frame.h --- luminance-hdr-2.3.0/src/Libpfs/frame.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/frame.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,5 +1,4 @@ -/** - * @brief PFS library - Frame +/* * * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- @@ -21,158 +20,136 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Rafal Mantiuk, - * @author Davide Anastasia - * Frame definition split from pfs.cpp */ +//! @brief PFS library - Frame +//! @author Rafal Mantiuk, +//! @author Davide Anastasia +//! Frame definition split from pfs.cpp + #ifndef PFS_FRAME_H #define PFS_FRAME_H #include +#include -#include "channel.h" -#include "tag.h" +#include +#include +#include namespace pfs { +typedef std::vector< Channel* > 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: + Frame(size_t width, size_t height); + ~Frame(); + + //! \return width of the frame (in pixels). + inline + size_t getWidth() const + { return m_width; } + + //! \return height of the frame (in pixels). + inline + size_t getHeight() const + { return m_height; } + + //! \brief Changes the size of the frame + void resize(size_t width, size_t height); + + //! Gets color channels in XYZ color space. May return NULLs + //! if such channels do not exist. Values assigned to + //! X, Y, Z are always either all NULLs or valid pointers to + //! channels. + //! + //! \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(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 + //! creating new ones. Note, that nothing can be assumed about + //! the content of each channel. + //! + //! \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); + + //! 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; + + //! Creates a named channel. If the channel already exists, returns + //! existing channel. + //! + //! Note that new channels should be created only for the first + //! frame. The channels should not changes for the subsequent + //! frames of a sequence. + //! + //! \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); + + //! 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); + + //! \return \c ChannelContainer associated to the internal list of \c Channel + ChannelContainer& getChannels(); + + const ChannelContainer& getChannels() const; + + + //! \brief Returns TagContainer that can be used to access or modify + //! tags associated with this Frame object. + TagContainer& getTags(); + + //! Returns TagContainer that can be used to access or modify + //! tags associated with this Frame object. + const TagContainer& getTags() const; + + //! \brief exif data for the current \c Frame +// const ::pfs::exif::exif_data& exif() const +// { +// return m_exifData; +// } + +// ::pfs::exif::exif_data& exif() +// { +// return m_exifData; +// } + + void swap(Frame& other); + +private: + size_t m_width; + size_t m_height; + + TagContainer m_tags; + ChannelContainer m_channels; + + // ::pfs::exif::exif_data m_exifData; +}; - /** - * 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 - { - friend class DOMIO; - - protected: - int m_width; - int m_height; - - TagContainer *m_tags; - - ChannelMap m_channels; - ChannelIterator m_channel_iter; - - public: - - Frame( int width, int height ); - ~Frame(); - - /** - * Gets width of the channels (in pixels). - */ - inline int getWidth() const - { - return m_width; - } - - /** - * Gets height of the channels (in pixels). - */ - inline int getHeight() const - { - return m_height; - } - - /** - * Gets color channels in XYZ color space. May return NULLs - * if such channels do not exist. Values assigned to - * X, Y, Z are always either all NULLs or valid pointers to - * channels. - * - * @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 ); - - /** - * Creates color channels in XYZ color space. If such channels - * already exists, returns existing channels, rather than - * creating new ones. Note, that nothing can be assumed about - * the content of each channel. - * - * @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 ); - - /** - * 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( std::string name ); - - /** - * Creates a named channel. If the channel already exists, returns - * existing channel. - * - * Note that new channels should be created only for the first - * frame. The channels should not changes for the subsequent - * frames of a sequence. - * - * @param name [in] name of the channel. Name must be 8 or less - * character long. - * @return existing or newly created channel - */ - Channel *createChannel( 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( Channel *ch ); - - /** - * Use ChannelIterator to iterate over all Channels in the Frame. - * ChannelIteratorPtr is a smart pointer, which destructs - * ChannelIterator when ChannelIteratorPtr is destructed. Use -> - * operator to access ChannelIterator members from a - * ChannelIteratorPtr object. - * - * To iterate over all channels, use the following code: - * - * pfs::ChannelIteratorPtr it( frame->getChannelIterator() ); - * while( it->hasNext() ) { - * pfs::Channel *ch = cit->getNext(); - * //Do whatever is needed - * } - * - */ - ChannelIteratorPtr getChannelIterator(); - - /** - * DEPRECATED!!! Use getChannelIterator instead. - * - * Returns iterator for all available channels. - * - * Note that only one iterator for particular frame can be used at - * a time. This method returns each time the same data structure, - * so the iterator from previous call is lost after the call. The - * iterator MUST NOT be deleted after use. - * - * Object ChannelIterator MUST NOT be freed. It's responsibility - * of a Frame object. - */ - // TODO: remove this rubbish - ChannelIterator *getChannels(); - - /** - * Returns TagContainer that can be used to access or modify - * tags associated with this Frame object. - */ - TagContainer *getTags(); - }; -} +} // namespace pfs #endif // PFS_FRAME_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/io/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/io/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB IO_H *.h) +FILE(GLOB IO_HXX *.hxx) +FILE(GLOB IO_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${IO_H} ${IO_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${IO_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/exrreader.cpp luminance-hdr-2.3.1/src/Libpfs/io/exrreader.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/exrreader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/exrreader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,269 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * 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 Read files in OpenEXR format, based on PFSTOOLS code +//! \author Grzegorz Krawczyk +//! \author Davide Anastasia +//! Adaptation for Luminance HDR and other small improvements + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +using namespace Imf; +using namespace Imath; +using namespace std; + +namespace { +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; + ret.replace(pos, 1, "\\n"); + pos += 2; + } + return ret; +} +} + +namespace pfs { +namespace io { + +class EXRReader::EXRReaderData { +public: + EXRReaderData(const string& filename) + : file_(filename.c_str()) + // , dw_(file_.header().displayWindow()) + , dtw_(file_.header().dataWindow()) + {} + + Imf::InputFile file_; + // Box2i dtw_; + Box2i dtw_; +}; + +EXRReader::EXRReader(const string &filename) + : FrameReader(filename) +{ + EXRReader::open(); +} + +EXRReader::~EXRReader() {} + +void EXRReader::open() +{ + // open file and read dimensions + m_data.reset( new EXRReaderData(filename().c_str()) ); + + 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); + assert(height > 0); + + // check that file contains RGB data + bool red = false; + 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; + } + + if ( !(red && green && blue) ) { + throw pfs::io::InvalidHeader("OpenEXR file " + filename() + " does " \ + " not contain RGB data"); + } + + // check boundaries + /* + if ( (m_data->dtw_.min.x < m_data->dw_.min.x && + m_data->dtw_.max.x > m_data->dw_.max.x) || + (m_data->dtw_.min.y < m_data->dw_.min.y && + m_data->dtw_.max.y > m_data->dw_.max.y) ) + { + throw pfs::io::InvalidHeader("No support for OpenEXR files DataWindow" \ + " greater than DisplayWindow" ); + } + */ + + setWidth(width); + setHeight(height); +} + +void EXRReader::close() +{ + m_data.reset(); + + setWidth(0); + setHeight(0); +} + +void EXRReader::read(Frame & frame, const Params &/*params*/) +{ + if ( !isOpen() ) open(); + + // helpers... + InputFile& file = m_data->file_; + Box2i& dtw = m_data->dtw_; + + pfs::Frame tempFrame( width(), height() ); + pfs::Channel *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 + + + + // 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 ) + { + if ( !strcmp( i.name(), "R" ) || + !strcmp( i.name(), "G" ) || !strcmp( i.name(), "B" ) ) continue; + + std::string channelName( i.name() ); + if ( channelName == "Z" ) { + channelName = "DEPTH"; + } + pfs::Channel *pfsCh = tempFrame.createChannel( channelName ); + frameBuffer.insert( i.name(), // name + Slice( FLOAT, // type + (char *)(pfsCh->data() - dtw.min.x - dtw.min.y * width()), + sizeof(float), // xStride + sizeof(float) * width(), // yStride + 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 ) + { + const char *attribName = it.name(); + const StringAttribute *attrib = + file.header().findTypedAttribute(attribName); + + if ( attrib == NULL ) continue; // Skip if type is not String + + // fprintf( stderr, "Tag: %s = %s\n", attribName, attrib->value().c_str() ); + + const char *colon = strstr( attribName, ":" ); + if ( colon == NULL ) // frame 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 + << " channel because it does not exist\n"; + } else { + ch->getTags().setTag(colon + 1, + escapeString( attrib->value() )); + } + } + } + + 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(); + + for ( int i = 0; i < pixelCount; i++ ) + { + (*X)(i) *= scaleFactor; + (*Y)(i) *= scaleFactor; + (*Z)(i) *= scaleFactor; + } + + // const StringAttribute *relativeLum = + // file.header().findTypedAttribute("RELATIVE_LUMINANCE"); + + std::string luminanceTag = tempFrame.getTags().getTag("LUMINANCE"); + if ( luminanceTag.empty() ) + { + tempFrame.getTags().setTag("LUMINANCE", "ABSOLUTE"); + } + } + + tempFrame.getTags().setTag( "FILE_NAME", filename() ); + + frame.swap( tempFrame ); +} + +} // io +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/exrreader.h luminance-hdr-2.3.1/src/Libpfs/io/exrreader.h --- luminance-hdr-2.3.0/src/Libpfs/io/exrreader.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/exrreader.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_IO_EXRREADER_H +#define PFS_IO_EXRREADER_H + +#include +#include + +namespace pfs { +namespace io { + +class EXRReader : public FrameReader { +public: + EXRReader(const std::string& filename); + ~EXRReader(); + + bool isOpen() const + { return (m_data.get() != NULL); } + + void close(); + void open(); + void read(Frame &frame, const Params ¶ms); + +protected: + class EXRReaderData; + + boost::scoped_ptr m_data; +}; + +} // io +} // pfs + + +#endif // #ifndef PFS_IO_EXRREADER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/exrwriter.cpp luminance-hdr-2.3.1/src/Libpfs/io/exrwriter.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/exrwriter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/exrwriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006,2007 Giuseppe Rota + * 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 + * ---------------------------------------------------------------------- + */ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +// #define min(x,y) ( (x)<(y) ? (x) : (y) ) + +using namespace Imf; +using namespace Imath; +using namespace std; + +namespace pfs { +namespace io { + +EXRWriter::EXRWriter(const string &filename) + : FrameWriter(filename) +{} + +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 + 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 ) { + header.insert(it->first.c_str(), StringAttribute(it->second)); + } + + // Copy all channel tags + 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(); + pfs::TagContainer::const_iterator itEnd = (*ch)->getTags().end(); + + for ( ; it != itEnd; ++it ) { + header.insert(string(channelName + ":" + it->first).c_str(), + StringAttribute(it->second)); + } + } + + FrameBuffer frameBuffer; + + // Define channels in Header + // 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 + + 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 + + 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 + + OutputFile file(filename().c_str(), header); + file.setFrameBuffer(frameBuffer); + file.writePixels(frame.getHeight()); + + return true; +} + +} // pfs +} // io diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/exrwriter.h luminance-hdr-2.3.1/src/Libpfs/io/exrwriter.h --- luminance-hdr-2.3.0/src/Libpfs/io/exrwriter.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/exrwriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006,2007 Giuseppe Rota + * 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 EXR File Writer +//! \author Rafal Mantiuk +//! \author Giuseppe Rota +//! \author Davide Anastasia +//! Adaptation for Luminance HDR and LibHDR + +#ifndef PFS_IO_EXRWRITER_H +#define PFS_IO_EXRWRITER_H + +#include + +namespace pfs { +namespace io { + +class EXRWriter : public FrameWriter { +public: + EXRWriter(const std::string& filename); + + bool write(const Frame &frame, const Params ¶ms); +}; + +} // pfs +} // io + +#endif // PFS_IO_EXRWRITER_H + diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/framereader.cpp luminance-hdr-2.3.1/src/Libpfs/io/framereader.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/framereader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/framereader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +namespace pfs { +namespace io { + +FrameReader::FrameReader(const std::string& filename) + : m_filename(filename) + , m_width(0) + , m_height(0) +{} + +FrameReader::~FrameReader() +{} + +} // io +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/framereader.h luminance-hdr-2.3.1/src/Libpfs/io/framereader.h --- luminance-hdr-2.3.0/src/Libpfs/io/framereader.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/framereader.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * 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 Interface for the FrameReader base class +//! \author Davide Anastasia + +#ifndef PFS_IO_FRAMEREADER_H +#define PFS_IO_FRAMEREADER_H + +#include +#include + +namespace pfs { +class Frame; + +namespace io { + +class FrameReader +{ +public: + FrameReader(const std::string& filename); + + virtual ~FrameReader(); + + const std::string& filename() const + { return m_filename; } + + size_t width() const + { return m_width; } + + 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) = 0; + +protected: + void setWidth(size_t width) + { m_width = width; } + + void setHeight(size_t height) + { m_height = height; } + +private: + std::string m_filename; + size_t m_width; + size_t m_height; +}; + +} +} + +#endif // PFS_IO_FRAMEREADER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/framewriter.cpp luminance-hdr-2.3.1/src/Libpfs/io/framewriter.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/framewriter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/framewriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +namespace pfs { +namespace io { + +FrameWriter::FrameWriter(const std::string& filename) + : m_filename(filename) +{} + +FrameWriter::~FrameWriter() +{} + +} // io +} // pfs + + diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/framewriter.h luminance-hdr-2.3.1/src/Libpfs/io/framewriter.h --- luminance-hdr-2.3.0/src/Libpfs/io/framewriter.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/framewriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * 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 Interface for the FrameWriter base class +//! \author Davide Anastasia + +#ifndef PFS_IO_FRAMEWRITER_H +#define PFS_IO_FRAMEWRITER_H + +#include +#include +#include + +namespace pfs { +class Frame; + +namespace io { + +class FrameWriter +{ +public: + FrameWriter(const std::string& filename); + virtual ~FrameWriter(); + + virtual bool write(const pfs::Frame& frame, const pfs::Params& params) = 0; + + const std::string& filename() const + { return m_filename; } + +private: + std::string m_filename; +}; + +} // io +} // pfs + +#endif // PFS_IO_FRAMEWRITER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/ioexception.h luminance-hdr-2.3.1/src/Libpfs/io/ioexception.h --- luminance-hdr-2.3.0/src/Libpfs/io/ioexception.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/ioexception.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_IO_IOEXCEPTION_H +#define PFS_IO_IOEXCEPTION_H + +#include + +namespace pfs { +namespace io { + +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 ReadException : public Exception +{ +public: + ReadException(const std::string& message) + : Exception(message) + {} +}; + +class WriteException : public Exception +{ +public: + WriteException(const std::string& message) + : Exception(message) + {} +}; + +} +} + + +#endif // PFS_IO_IOEXCEPTION_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/pfscommon.h luminance-hdr-2.3.1/src/Libpfs/io/pfscommon.h --- luminance-hdr-2.3.0/src/Libpfs/io/pfscommon.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/pfscommon.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * 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 PFS file format common (used for compatibility with PFSTOOLS) +//! \author Davide Anastasia + +#ifndef PFS_IO_PFSCOMMON_H +#define PFS_IO_PFSCOMMON_H + +#define PFSEOL "\x0a" +#define PFSEOLCH '\x0a' + +#define MAX_RES 65535 +#define MAX_CHANNEL_NAME 32 +#define MAX_TAG_STRING 1024 +#define MAX_CHANNEL_COUNT 1024 + +#endif // PFS_IO_PFSCOMMON_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/pfsreader.cpp luminance-hdr-2.3.1/src/Libpfs/io/pfsreader.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/pfsreader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/pfsreader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,172 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#include + +#include + +namespace pfs { +namespace io { + +static const char *PFSFILEID = "PFS1\x0a"; + +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" ); + } + + 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("="); + if (found != std::string::npos) { +#ifndef NDEBUG + std::clog << "found tag: " << data.substr(0, found) << "=" + << data.substr(found + 1, data.size()) << std::endl; +#endif + + tags.setTag( data.substr(0, found), + data.substr(found + 1, data.size()) ); + + } else { + throw Exception( "Corrupted PFS tag section ('=' sign missing)" ); + } + } +} + +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 ) { + 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 ); +#endif + char buf[5]; + 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" ); + } + + 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" ); + } + 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" ); + } + m_channelCount = channelCount; +} + +void PfsReader::close() +{ + setWidth(0); + setHeight(0); + m_file.reset(); + m_channelCount = 0; +} + +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 ( int 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 ); + // fprintf( stderr, "s = '%s' len = %d\n", channelName, len ); + if ( len < 1 || channelName[len-1] != PFSEOLCH ) { + throw ReadException( "Corrupted PFS file: bad channel name" ); + } + + channelName[len-1] = 0; + Channel *ch = tempFrame.createChannel( channelName ); + readTags(ch->getTags(), m_file.data()); + 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" ); + } + + //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" ); + } + } +#ifdef HAVE_SETMODE + setmode( fileno( inputStream ), old_mode ); +#endif + + frame.swap( tempFrame ); +} + +} // io +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/pfsreader.h luminance-hdr-2.3.1/src/Libpfs/io/pfsreader.h --- luminance-hdr-2.3.0/src/Libpfs/io/pfsreader.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/pfsreader.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * 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 PFS file format reader (used for compatibility with PFSTOOLS) +//! \note Most of the code of this class is derived from the code in PFSTOOLS +//! \author Davide Anastasia + +#ifndef PFS_IO_PFSREADER_H +#define PFS_IO_PFSREADER_H + +#include +#include +#include +#include +#include + +namespace pfs { +class Frame; + +namespace io { + +class PfsReader : public FrameReader +{ +public: + PfsReader(const std::string& filename); + + bool isOpen() const + { return m_file; } + + void open(); + void close(); + void read(Frame &frame, const Params &); + +private: + utils::ScopedStdIoFile m_file; + size_t m_channelCount; +}; + +} // io +} // pfs + +#endif // PFS_IO_PFSREADER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/pfswriter.cpp luminance-hdr-2.3.1/src/Libpfs/io/pfswriter.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/pfswriter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/pfswriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,99 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include + +#include +#include +#include +#include +#include + +namespace pfs { +namespace io { + +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 ); + } +} + +PfsWriter::PfsWriter(const std::string &filename) + : FrameWriter(filename) +{} + +bool PfsWriter::write(const Frame &frame, const Params &/*params*/) +{ + utils::ScopedStdIoFile outputStream(fopen(filename().c_str(), "wb")); + +#ifdef HAVE_SETMODE + // Needed under MS windows (text translation IO for stdin/out) + int old_mode = setmode( fileno( outputStream.data() ), _O_BINARY ); +#endif + + // Write header ID + fwrite( PFSFILEID, 1, 5, outputStream.data() ); + + const ChannelContainer& channels = frame.getChannels(); + + 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) + { + fprintf(outputStream.data(), "%s" PFSEOL, (*it)->getName().c_str()); + writeTags((*it)->getTags(), outputStream.data()); + } + + 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() ); + } + + // Very important for pfsoutavi !!! + fflush( outputStream.data() ); +#ifdef HAVE_SETMODE + setmode( fileno( outputStream.data() ), old_mode ); +#endif + return true; +} + +} // io +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/pfswriter.h luminance-hdr-2.3.1/src/Libpfs/io/pfswriter.h --- luminance-hdr-2.3.0/src/Libpfs/io/pfswriter.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/pfswriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * 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 PFS file format writer (used for compatibility with PFSTOOLS) +//! \note Most of the code of this class is derived from the code in PFSTOOLS +//! \author Davide Anastasia + +#ifndef PFS_IO_PFSWRITER_H +#define PFS_IO_PFSWRITER_H + +#include +#include +#include +#include + +namespace pfs { +class Frame; + +namespace io { + +class PfsWriter : public FrameWriter { +public: + PfsWriter(const std::string& filename); + + bool write(const pfs::Frame& frame, const pfs::Params& params); +}; + +} // io +} // pfs + +#endif // PFS_IO_PFSWRITER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/rgbecommon.h luminance-hdr-2.3.1/src/Libpfs/io/rgbecommon.h --- luminance-hdr-2.3.0/src/Libpfs/io/rgbecommon.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/rgbecommon.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2007 Giuseppe Rota + * 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 Radiance RGBE file format reader common code +//! \author Grzegorz Krawczyk +//! \author Rafal Mantiuk, +//! \author Giuseppe Rota +//! \author Davide Anastasia +//! Code adaptation for Luminance HDR and LibHDR + +#ifndef PFS_IO_RGBECOMMON_H +#define PFS_IO_RGBECOMMON_H + +//! \brief constant to change between radiance and luminance +#define WHITE_EFFICACY 179.0f + +typedef unsigned char Trgbe; + +//! \name RGB values and their exponent +struct Trgbe_pixel +{ + Trgbe r; + Trgbe g; + Trgbe b; + Trgbe e; +}; + +#endif // PFS_IO_RGBECOMMON_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/rgbereader.cpp luminance-hdr-2.3.1/src/Libpfs/io/rgbereader.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/rgbereader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/rgbereader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,297 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2007 Giuseppe Rota + * 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 + * ---------------------------------------------------------------------- + */ + +#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 + { + 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 + r = g = b = 0.f; +} + +// Reading RGBE files +void readRadianceHeader(FILE *file, int &width, int &height, float &exposure) +{ + // DEBUG_STR << "RGBE: reading header..." << endl; + + // read header information + char head[255]; + float fval; + int format = 0; + exposure = 1.0f; + + 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 ) { + // format specifier found + format = 1; + } + if ( strcmp(head, "#?RGBE\n") == 0 ) { + // format specifier found + format = 1; + } + if ( strcmp(head, "#?AUTOPANO\n") == 0 ) { + // format specifier found + format=1; + } + if ( head[0]=='#' ) { + // comment found - skip + continue; + } + if ( strcmp(head, "FORMAT=32-bit_rle_rgbe\n") == 0 ) { + // header found + continue; + } + if ( sscanf(head, "EXPOSURE=%f", &fval) == 1 ) + { + // exposure value + exposure *= fval; + } + } + + // ignore wierd exposure adjustments + if ( exposure > 1e12 || exposure < 1e-12 ) { + exposure = 1.0f; + } + + 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" ); + } + + assert(height > 0); + assert(width > 0); + + /* + if( ybuf[1]=='x' || ybuf[1]=='X' ) { + height += width; + width = height - width; + height = height - width; + } +*/ + // DEBUG_STR << "RGBE: image size " << width << "x" << height << endl; +} + +void RLERead(FILE* file, Trgbe* scanline, int size) +{ + int peek = 0; + while ( peek < size ) + { + Trgbe p[2]; + if ( fread(p, sizeof(p), 1, file) == 0) { + throw pfs::io::ReadException("RGBE: Invalid data size"); + } + if ( p[0]>128 ) + { + // a run + int run_len = p[0]-128; + + while ( run_len > 0 ) + { + scanline[peek++] = p[1]; + run_len--; + } + } + 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) { + throw pfs::io::ReadException("RGBE: Invalid data size"); + } + peek += nonrun_len; + } + } + } + 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) +{ + // read image + // depending on format read either rle or normal (note: only rle supported) + std::vector scanline(width*4); + + for (int y = 0; y < height; ++y) + { + // read rle header + Trgbe header[4]; + 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 ) + { + //--- simple scanline (not rle) + 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 << ")" < +//! \author Rafal Mantiuk, +//! \author Giuseppe Rota +//! \author Davide Anastasia +//! Code adaptation for Luminance HDR and LibHDR + +#ifndef PFS_IO_RGBEREADER_H +#define PFS_IO_RGBEREADER_H + +#include +#include +#include +#include + +namespace pfs { +namespace io { + +class RGBEReader : public FrameReader +{ +public: + RGBEReader(const std::string& filename); + + bool isOpen() const + { return m_file; } + + void open(); + void close(); + void read(Frame &frame, const Params ¶ms); + +private: + utils::ScopedStdIoFile m_file; + float m_exposure; +}; + +} +} + +#endif diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/rgbewriter.cpp luminance-hdr-2.3.1/src/Libpfs/io/rgbewriter.cpp --- luminance-hdr-2.3.0/src/Libpfs/io/rgbewriter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/rgbewriter.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,207 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2007 Giuseppe Rota + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include + +using namespace std; + +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]) ) + { + peek++; + run_len++; + } + } + + if ( run_len > 4 ) + { + // write a non run: scanline[0] to scanline[run_start] + 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]; + } + 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[1] = scanline[run_start]; + fwrite(buf, sizeof(*buf), 2, file); + } + else + { + // write a non run: scanline[0] to scanline[peek] + std::vector buf(peek+1); + + buf[0] = peek; + for ( int i=0 ; i scanlineR(width); + std::vector scanlineG(width); + std::vector scanlineB(width); + std::vector scanlineE(width); + + for ( size_t y=0 ; y> 8;; + header[3] = width & 0xFF; + fwrite(header, sizeof(header), 1, file); + + // each channel is encoded separately + for ( int x=0 ; x < width ; x++ ) + { + Trgbe_pixel p; + rgb2rgbe( X(x,y), Y(x,y), Z(x,y), p ); + scanlineR[x] = p.r; + scanlineG[x] = p.g; + scanlineB[x] = p.b; + scanlineE[x] = p.e; + } + RLEWrite(file, scanlineR.data(), width); + RLEWrite(file, scanlineG.data(), width); + RLEWrite(file, scanlineB.data(), width); + RLEWrite(file, scanlineE.data(), width); + } +} + +RGBEWriter::RGBEWriter(const std::string &filename) + : FrameWriter(filename) +{} + +bool RGBEWriter::write(const Frame &frame, const Params &/*params*/) +{ + utils::ScopedStdIoFile outputStream(fopen(filename().c_str(), "wb")); + + 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); + + return true; +} + +} // io +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/io/rgbewriter.h luminance-hdr-2.3.1/src/Libpfs/io/rgbewriter.h --- luminance-hdr-2.3.0/src/Libpfs/io/rgbewriter.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/io/rgbewriter.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2007 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2007 Giuseppe Rota + * 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 IO operations on Radiance's RGBE file format +//! \author Grzegorz Krawczyk +//! \author Rafal Mantiuk, +//! \author Giuseppe Rota +//! \author Davide Anastasia +//! Code adaptation for Luminance HDR and LibHDR + +#ifndef PFS_IO_RGBEWRITER_H +#define PFS_IO_RGBEWRITER_H + +#include +#include +#include +#include + +namespace pfs { +class Frame; + +namespace io { + +class RGBEWriter : public FrameWriter +{ +public: + RGBEWriter(const std::string& filename); + + bool write(const Frame &frame, const Params ¶ms); +}; + +} +} + +#endif // PFS_IO_RGBEWRITER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/manip/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/manip/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB MANIP_H *.h) +FILE(GLOB MANIP_HXX *.hxx) +FILE(GLOB MANIP_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${MANIP_H} ${MANIP_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${MANIP_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/copy.cpp luminance-hdr-2.3.1/src/Libpfs/manip/copy.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/copy.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/copy.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + * + */ + +//! \author Davide Anastasia + +#include "copy.h" + +#include "Libpfs/frame.h" + +#include + +namespace pfs +{ + +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(); + + pfs::Frame *outFrame = new pfs::Frame(outWidth, outHeight); + + const ChannelContainer& channels = inFrame->getChannels(); + + for ( ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); + ++it) + { + const pfs::Channel* inCh = *it; + + pfs::Channel *outCh = outFrame->createChannel(inCh->getName()); + + copy(inCh, outCh); + } + + pfs::copyTags(inFrame, outFrame); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "pfscopy() = " << f_timer.get_time() << " msec" << std::endl; +#endif + + return outFrame; +} + +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/copy.h luminance-hdr-2.3.1/src/Libpfs/manip/copy.h --- luminance-hdr-2.3.0/src/Libpfs/manip/copy.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/copy.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + * + */ + +//! \author Davide Anastasia + +#ifndef PFS_COPY_H +#define PFS_COPY_H + +#include "Libpfs/array2d_fwd.h" + +namespace pfs +{ +class Frame; + +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 +void copy(const Array2D *from, Array2D *to); + +} // pfs + +#include "copy.hxx" + +#endif // #ifndef PFS_COPY_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/copy.hxx luminance-hdr-2.3.1/src/Libpfs/manip/copy.hxx --- luminance-hdr-2.3.0/src/Libpfs/manip/copy.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/copy.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + * + */ + +//! \author Davide Anastasia + +#ifndef PFS_COPY_HXX +#define PFS_COPY_HXX + +#include "copy.h" + +#include +#include + +namespace pfs +{ + +template +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 diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/cut.cpp luminance-hdr-2.3.1/src/Libpfs/manip/cut.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/cut.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/cut.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2009 Franco Comida + * Copyrighr (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 + * ---------------------------------------------------------------------- + * + */ + +//! \author Dorota Zdrojewska, +//! \author Franco Comida +//! Adapted for Luminance HDR +//! \author Davide Anastasia +//! Improved for better performance + +#include "cut.h" + +#include +#include +#include +#include +#include + +#include "Libpfs/utils/msec_timer.h" +#include "Libpfs/frame.h" + +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) +{ +#ifdef TIMER_PROFILING + msec_timer f_timer; + f_timer.start(); +#endif + + // ---- Boundary Check! + // if (x_ul < 0) x_ul = 0; + // if (y_ul < 0) y_ul = 0; + if (x_br > inFrame->getWidth()) x_br = inFrame->getWidth(); + if (y_br > inFrame->getHeight()) y_br = inFrame->getHeight(); + // ----- + + pfs::Frame *outFrame = new pfs::Frame((x_br-x_ul), (y_br-y_ul)); + + const ChannelContainer& channels = inFrame->getChannels(); + + 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); + } + + pfs::copyTags(inFrame, outFrame); + +#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 << ") = " << f_timer.get_time() << " msec" << std::endl; +#endif + + return outFrame; +} + +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/cut.h luminance-hdr-2.3.1/src/Libpfs/manip/cut.h --- luminance-hdr-2.3.0/src/Libpfs/manip/cut.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/cut.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,48 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2009 Franco Comida + * Copyrighr (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_CUT_H +#define PFS_CUT_H + +#include +#include + +//! \brief Cut a rectangle out of images in PFS stream +//! \author Franco Comida +//! \author Davide Anastasia + +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); + +template +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" + +#endif diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/cut.hxx luminance-hdr-2.3.1/src/Libpfs/manip/cut.hxx --- luminance-hdr-2.3.0/src/Libpfs/manip/cut.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/cut.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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_CUT_HXX +#define PFS_CUT_HXX + +//! \author Davide Anastasia + +#include "cut.h" + +#include +#include + +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... + assert( y_ul >= 0 ); // must be obvious... + 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; + // if ( y_ul < 0 ) y_ul = 0; + 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++) + { + std::copy(from->row_begin(r + y_ul) + x_ul, + from->row_end(r + y_ul) - x_br, + to->row_begin(r)); + } +} + +} // pfs + +#endif // PFS_CUT_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/gamma.cpp luminance-hdr-2.3.1/src/Libpfs/manip/gamma.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/gamma.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/gamma.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * 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 gamma correction the the pfs stream +//! \author Rafal Mantiuk, + +#include "gamma.h" + +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/frame.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/utils/msec_timer.h" + +namespace pfs +{ + +void applyGamma(pfs::Frame* frame, float gamma) +{ + float multiplier = 1.0f; + + if ( gamma == 1.0f ) return; + + pfs::Channel *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); +} + + +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++) + { + if (Vin[idx] > 0.0f) + { + Vin[idx] = powf(Vin[idx]*multiplier, exponent); + } + else + { + Vin[idx] = 0.0f; + } + } + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "applyGamma() = " << f_timer.get_time() << " msec" << std::endl; +#endif +} + +} + diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/gamma.h luminance-hdr-2.3.1/src/Libpfs/manip/gamma.h --- luminance-hdr-2.3.0/src/Libpfs/manip/gamma.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/gamma.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * 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_GAMMA_H +#define PFS_GAMMA_H + +#include "Libpfs/array2d_fwd.h" + +//! \brief Apply gamma correction the the pfs stream +//! \author Rafal Mantiuk +//! \author Davide Anastasia + +namespace pfs +{ +class Frame; + +//! \brief Apply \c gamma on the input \c frame +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); + +} + +#endif // PFSGAMMA_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/gamma_levels.cpp luminance-hdr-2.3.1/src/Libpfs/manip/gamma_levels.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/gamma_levels.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/gamma_levels.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,156 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2011-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 gamma and black/white point to the input frame +//! \author Davide Anastasia + +#include +#include + +#include "Libpfs/frame.h" +#include "Libpfs/channel.h" +#include "Libpfs/utils/msec_timer.h" + +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; + return v; +} + +////! \note I assume that *in* contains only value between [0,1] +//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); +// //LUT[i] = clamp(blackout+value*(whiteout-blackout),0,255); + +// const float* in_vector = in->getRawData(); +// float* out_vector = out->getRawData(); + +// const int ELEMS = in->getCols()*in->getRows(); + +// if (gamma != 1.0f) +// { +//#pragma omp parallel for +// for (int idx = 0; idx < ELEMS; ++idx) +// { +// float tmp = (in_vector[idx] - black_in)/(white_in - black_in); +// tmp = powf(tmp, gamma); + +// tmp = black_out + tmp*(white_out-black_out); + +// out_vector[idx] = clamp(tmp, 0.0f, 1.0f); +// } +// } +// else +// { +//#pragma omp parallel for +// for (int idx = 0; idx < ELEMS; ++idx) +// { +// float tmp = (in_vector[idx] - black_in)/(white_in - black_in); +// //tmp = powf(tmp, gamma); + +// tmp = black_out + tmp*(white_out-black_out); + +// out_vector[idx] = clamp(tmp, 0.0f, 1.0f); +// } +// } +//} + +} + +namespace pfs +{ + +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(); +#endif + +#ifndef NDEBUG + std::cerr << "Black in =" << black_in << "black out =" << black_out + << "White in =" << white_in << "white out =" << white_out + << "Gamma =" << gamma + << std::endl; +#endif + + 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 ); + + 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; +#pragma omp parallel for + 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 c = powf(L, gamma - 1.0f); + + red = (red - black_in) / (white_in - black_in); + red *= c; + + green = (green - black_in) / (white_in - black_in); + green *= c; + + blue = (blue - black_in) / (white_in - black_in); + blue *= c; + + R_o[idx] = clamp(black_out + red * (white_out - black_out), 0.f, 1.f); + G_o[idx] = clamp(black_out + green * (white_out - black_out), 0.f, 1.f); + B_o[idx] = clamp(black_out + blue * (white_out - black_out), 0.f, 1.f); + } + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "gamma_levels() = " << f_timer.get_time() << " msec" << std::endl; +#endif +} + +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/gamma_levels.h luminance-hdr-2.3.1/src/Libpfs/manip/gamma_levels.h --- luminance-hdr-2.3.0/src/Libpfs/manip/gamma_levels.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/gamma_levels.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2011-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 gamma and black/white point to the input frame +//! \author Davide Anastasia + +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); + +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/projection.cpp luminance-hdr-2.3.1/src/Libpfs/manip/projection.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/projection.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/projection.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,626 @@ +/* + * This file is a part of Luminance HDR package (based on PFSTOOLS code). + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2008 Giuseppe Rota + * 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 + * ---------------------------------------------------------------------- + * + */ + +#include "projection.h" + +#include +#include +// #include +// #include + +#include "Libpfs/array2d.h" +#include "arch/math.h" + + +using namespace std; + +ProjectionFactory ProjectionFactory::singleton(true); + +PolarProjection PolarProjection::singleton(true); +CylindricalProjection CylindricalProjection::singleton(true); +AngularProjection AngularProjection::singleton(true); +MirrorBallProjection MirrorBallProjection::singleton(true); + +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 *= (M_PI / 180); + + 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 *= (M_PI / 180); + + 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 *= (M_PI / 180); + + double c = cos(angle); + double s = sin(angle); + + double x2 = c * x + -s * y; + double y2 = s * x + c * y; + + x = x2; + y = y2; + } +}; + +class Point2D +{ + public: + double x, y; + + Point2D(double x, double y) + { + this->x = x; + this->y = y; + } +}; + + +///PROJECTIONFACTORY +ProjectionFactory::ProjectionFactory(bool ) { +} + +void ProjectionFactory::registerProjection(const char *name, ProjectionCreator ptr) { + singleton.projections[ string( name ) ] = ptr; +} + +// TODO: check this function +Projection *ProjectionFactory::getProjection(char *name) { + char *opts; + Projection *projection = NULL; + + if( (opts = strchr(name, '/')) ) + { + *opts++ = '\0'; + } + + + ProjectionCreator projectionCreator = singleton.projections.find(string(name))->second; + + if(projectionCreator != NULL) + { + projection = projectionCreator(); + + if(opts != NULL) + projection->setOptions(opts); + } + + return projection; +} + +//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++; + } +} +///END PROJECTIONFACTORY + + +///MIRRORBALL +MirrorBallProjection::MirrorBallProjection(bool initialization) { + name = "mirrorball"; + + if(initialization) + ProjectionFactory::registerProjection(name, this->create); +} + +Projection* MirrorBallProjection::create() { + return new MirrorBallProjection(false); +} + +const char *MirrorBallProjection::getName(void) { + return name; +} + +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; + else + return true; +} + +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 ) ); + + Vector3D *direction = new Vector3D(phi, theta); +// double t; + + direction->y = -direction->y; + + return 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; + } + + return new Point2D(u, v); +} +///END MIRRORBALL + + +///ANGULAR +AngularProjection::AngularProjection(bool initialization) { + name = "angular"; + totalAngle = 360; + if(initialization) + ProjectionFactory::registerProjection(name, this->create); +} + +Projection* AngularProjection::create() { + AngularProjection *p = new AngularProjection(false); + p->totalAngle = 360; + + return (Projection *)p; +} + +void AngularProjection::setOptions(char *opts) { + char *delimiter; + static const char *OPTION_ANGLE = "angle"; + + 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"; + } + } + else + { + throw " error: angular projection: unknown option.\n"; + } + + opts = delimiter + 1; + } +} + +const char *AngularProjection::getName(void) { + return name; +} + +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; + else + return true; +} + +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 = M_PI * sqrt( u * u + v * v ); + + Vector3D *direction = new Vector3D(phi, theta); +// double t; + + direction->y = -direction->y; + + return 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 = (1 / (2 * M_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 + + +///CYLINDRICAL +CylindricalProjection::CylindricalProjection(bool initialization) { + name = "cylindrical"; + + 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() { + return new CylindricalProjection(false); +} + +CylindricalProjection::~CylindricalProjection() { + delete pole; + delete equator; + delete cross; +} + +double CylindricalProjection::getSizeRatio(void) { + return 2; +} + +bool CylindricalProjection::isValidPixel(double /*u*/, double /*v*/) { + return true; +} + +Vector3D* CylindricalProjection::uvToDirection(double u, double v) { + u = 0.75 - u; + + u *= M_PI * 2; + + v = acos( 1 - 2 * v ); + + Vector3D *direction = new Vector3D(u, v); + + double temp = direction->z; + direction->z = direction->y; + direction->y = temp; + + return direction; +} + +Point2D* CylindricalProjection::directionToUV(Vector3D *direction) { + double u, v; + double lat = direction->dot(pole); + + v = ( 1 - lat ) / 2; + + 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) / (2 * M_PI); + + 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 ); + return new Point2D(u, v); +} +///END CYLINDRICAL + + +///POLAR +PolarProjection::PolarProjection(bool initialization) { + name = "polar"; + + 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); +} + +PolarProjection::~PolarProjection() { + delete pole; + delete equator; + delete cross; +} + +double PolarProjection::getSizeRatio(void) { + return 2; +} + +bool PolarProjection::isValidPixel(double /*u*/, double /*v*/) { + return true; +} + +Vector3D* PolarProjection::uvToDirection(double u, double v) { + u = 0.75 - u; + + u *= M_PI * 2; + v *= M_PI; + + Vector3D *direction = new Vector3D(u, v); + + double temp = direction->z; + direction->z = direction->y; + direction->y = temp; + + return direction; +} + +Point2D* PolarProjection::directionToUV(Vector3D *direction) { + double u, v; + double lat = acos(direction->dot(pole)); + + v = lat * M_1_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) / (2 * M_PI); + + 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 ); + 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(); + + 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; + + pixVal += (*in)(ix, iy); + } + + + delete direction; + delete p; + + (*out)(x,y) = pixVal * scaler; + } + } + } +} + + + diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/projection.h luminance-hdr-2.3.1/src/Libpfs/manip/projection.h --- luminance-hdr-2.3.0/src/Libpfs/manip/projection.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/projection.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,163 @@ +/* + * This file is a part of Luminance HDR package (based on PFSTOOLS code). + * ---------------------------------------------------------------------- + * Copyright (C) 2003-2004 Rafal Mantiuk and Grzegorz Krawczyk + * Copyright (C) 2006-2008 Giuseppe Rota + * 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_PROJECTION_H +#define PFS_PROJECTION_H + +//! \brief Perform projective transformations of spherical images +//! \author Giuseppe Rota +//! \author Miloslaw Smyk, + +#include +#include + +#include "Libpfs/array2d_fwd.h" + +class Vector3D; +class Point2D; + +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 void setOptions(char *) + { + } + + virtual const char *getName(void) + { + return name; + } +}; + + + +typedef Projection*(*ProjectionCreator)(void); +class ProjectionFactory +{ + static ProjectionFactory singleton; + ProjectionFactory(bool ); + public: + std::map < std::string, ProjectionCreator > projections; + static void registerProjection(const char *name, ProjectionCreator ptr); + static Projection *getProjection(char *name); + static void listProjectionNames(void); +}; + +class MirrorBallProjection : public Projection +{ + 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; + 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; + 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; + 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); + +#endif // PFS_PROJECTION_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/resize.cpp luminance-hdr-2.3.1/src/Libpfs/manip/resize.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/resize.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/resize.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * 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 Resize images in PFS stream +//! \author Rafal Mantiuk, +//! \author Davide Anastasia + +#include +#include +#include +#include +#include +#include + +#include "resize.h" + +#include "Libpfs/utils/msec_timer.h" + +#include "Libpfs/frame.h" + +namespace pfs +{ + + +Frame* resize(Frame* frame, int xSize) +{ +#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()); + + 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() ); + + resize(*it, newCh); + } + pfs::copyTags( frame, resizedFrame ); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "resizeFrame() = " << f_timer.get_time() << " msec" << std::endl; +#endif + + return resizedFrame; +} + +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/resize.h luminance-hdr-2.3.1/src/Libpfs/manip/resize.h --- luminance-hdr-2.3.0/src/Libpfs/manip/resize.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/resize.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * 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_RESIZE_H +#define PFS_RESIZE_H + +//! \brief Resize images in PFS stream +//! \author Rafal Mantiuk, +//! \author Davide Anastasia + +#include "Libpfs/array2d_fwd.h" + +namespace pfs +{ +// forward declaration +class Frame; + +Frame* resize(Frame* frame, int xSize); + +template +void resize(const Array2D *from, Array2D *to); +} + +#include "resize.hxx" + +#endif // PFS_RESIZE_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/resize.hxx luminance-hdr-2.3.1/src/Libpfs/manip/resize.hxx --- luminance-hdr-2.3.0/src/Libpfs/manip/resize.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/resize.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,125 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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_RESIZE_HXX +#define PFS_RESIZE_HXX + +#include "resize.h" +#include "copy.h" + +namespace pfs +{ +namespace detail +{ +const size_t BLOCK_FACTOR = 96; + +//! \author Davide Anastasia +//! \note Code derived from +//! 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; + + Type A, B, C, D; + Type outputPixel; + size_t x = 0; + size_t y = 0; + size_t index = 0; + + 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 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 (size_t i = iO, iEnd = std::min(iO + BLOCK_FACTOR, h2); + 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++) + { + x = static_cast(x_ratio * j); + x_diff = (x_ratio * j) - x; + + index = y*w + x; + + A = pixels[index]; + B = pixels[index + 1]; + C = pixels[index + w]; + D = pixels[index + w + 1]; + + // 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) ); + + output[i*w2 + j] = outputPixel; + } + } + } + } + } // end parallel region +} + +template +void resample(const ::pfs::Array2D *in, ::pfs::Array2D *out) +{ + resizeBilinearGray(in->data(), out->data(), + in->getCols(), in->getRows(), + out->getCols(), out->getRows()); +} + +} // anonymous + +template +void resize(const Array2D *in, Array2D *out ) +{ + if ( in->getCols() == out->getCols() && in->getRows() == out->getRows() ) + { + pfs::copy(in, out); + } + else + { + detail::resample(in, out); + } +} + +} // pfs + +#endif // PFS_RESIZE_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/rotate.cpp luminance-hdr-2.3.1/src/Libpfs/manip/rotate.cpp --- luminance-hdr-2.3.0/src/Libpfs/manip/rotate.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/rotate.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,74 @@ +/** + * @brief Resize images in PFS stream + * + * This file is a part of PFSTOOLS package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk, + * Alexander Efremov + * + * 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 Alexander Efremov, + * + * $Id: pfsrotate.cpp,v 1.1 2005/06/15 13:36:54 rafm Exp $ + */ + +#include "rotate.h" + +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/frame.h" + +#include "Libpfs/utils/msec_timer.h" + +namespace pfs +{ + +pfs::Frame* rotate(const pfs::Frame* frame, bool clock_wise) +{ +#ifdef TIMER_PROFILING + msec_timer f_timer; + f_timer.start(); +#endif + + int xSize = frame->getHeight(); + int ySize = frame->getWidth(); + pfs::Frame *resizedFrame = new pfs::Frame( xSize, ySize ); + + const ChannelContainer& channels = frame->getChannels(); + + 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 ); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "rotateFrame() = " << f_timer.get_time() << " msec" << std::endl; +#endif + + return resizedFrame; +} + +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/rotate.h luminance-hdr-2.3.1/src/Libpfs/manip/rotate.h --- luminance-hdr-2.3.0/src/Libpfs/manip/rotate.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/rotate.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk, + * Alexander Efremov + * + * 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 Resize images in PFS stream +//! \author Alexander Efremov, + +#ifndef PFS_ROTATE_H +#define PFS_ROTATE_H + +#include "Libpfs/array2d_fwd.h" + +namespace pfs +{ +class Frame; + +//! \brief rotate frame into a newly created one +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 diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/rotate.hxx luminance-hdr-2.3.1/src/Libpfs/manip/rotate.hxx --- luminance-hdr-2.3.0/src/Libpfs/manip/rotate.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/rotate.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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_ROTATE_HXX +#define PFS_ROTATE_HXX + +#include "rotate.h" + +namespace pfs +{ + +template +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 O_ROWS = out->getRows(); + const int O_COLS = out->getCols(); + + 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]; + } + } + } + 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]; + } + } + } +} + +} + +#endif // #ifndef PFS_ROTATE_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/shift.h luminance-hdr-2.3.1/src/Libpfs/manip/shift.h --- luminance-hdr-2.3.0/src/Libpfs/manip/shift.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/shift.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,39 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef PFS_SHIFT_H +#define PFS_SHIFT_H + +#include "Libpfs/array2d_fwd.h" + +namespace pfs +{ +// forward declare + +//! \brief shift image by \a dx \a dy +template +pfs::Array2D* shift(const pfs::Array2D& in, int dx, int dy); + +} // pfs + +#include "shift.hxx" + +#endif // PFS_SHIFT_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/manip/shift.hxx luminance-hdr-2.3.1/src/Libpfs/manip/shift.hxx --- luminance-hdr-2.3.0/src/Libpfs/manip/shift.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/manip/shift.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,121 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef PFS_SHIFT_HXX +#define PFS_SHIFT_HXX + +#include "shift.h" + +#include +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/utils/msec_timer.h" + +namespace pfs +{ + +template +Array2D *shift(const Array2D& in, int dx, int dy) +{ + typedef Array2D Array2DType; + + using namespace std; + +#ifdef TIMER_PROFILING + msec_timer stop_watch; + stop_watch.start(); +#endif + + Array2DType *out = new Array2DType(in.getCols(), in.getRows()); + + // fill first row... if any! + for (int idx = 0; idx < -dy; idx++) + { + fill(out->row_begin(idx), out->row_end(idx), 0.0f); + } + + // fill middle portion + if ( dx < 0 ) + { + for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); + row < rowEnd; + row++) + { + // Begin output line + typename Array2DType::iterator itBegin = out->row_begin(row); + // Pivot iterator + typename Array2DType::iterator itTh = itBegin - dx; + + // fill zero at the begin of the line + fill(itBegin, itTh, 0.0f); + // copy data + copy(in.row_begin(row + dy), + in.row_end(row + dy) + dx, + itTh); + } + } + else if (dx > 0) + { + for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); + 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), 0.0f); + } + } + else + { + for (int row = max(0, -dy), rowEnd = in.getRows() - max(0, dy); + row < rowEnd; + row++) + { + // copy data + copy(in.row_begin(row + dy), in.row_end(row + dy), + out->row_begin(row)); + } + } + + // fill last rows... if any! + for (int idx = dy; idx > 0; idx--) + { + fill(out->row_begin(out->getRows() - idx), + out->row_end(out->getRows() - idx), + 0.0f); + } + +#ifdef TIMER_PROFILING + stop_watch.stop_and_update(); + std::cout << "shiftPfsArray2D = " << stop_watch.get_time() << " msec" << std::endl; +#endif + + return out; +} + +} // pfs + +#endif // PFS_SHIFT_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/params.cpp luminance-hdr-2.3.1/src/Libpfs/params.cpp --- luminance-hdr-2.3.0/src/Libpfs/params.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/params.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include "params.h" + +#include +#include + +using namespace std; + +namespace pfs { + +// 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; + return 1; +} + +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) + { + diff = charDiff(str1[idx], str2[idx]); + } + if ( diff != 0 ) return diff; + + 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 ); +} +} // namespace pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/params.h luminance-hdr-2.3.1/src/Libpfs/params.h --- luminance-hdr-2.3.0/src/Libpfs/params.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/params.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,132 @@ +/* + * 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 Type safe variant container for generic function parameters +//! \author Davide Anastasia + +#ifndef LIBPFS_PARAMS_H +#define LIBPFS_PARAMS_H + +#include +#include +#include +#include +#include + +namespace pfs { + +struct StringUnsensitiveComp { + bool operator()(const std::string& str1, const std::string& str2) const; +}; + +struct Param +{ + Param() + : value_() {} + Param(const boost::any& value) + : value_(value) {} + + template + Param(const Type& value) + : value_(value) {} + + template + const Type& as(const Type& defaultValue) const { + try { + return boost::any_cast(value_); + } + catch (const boost::bad_any_cast & ex) + { +#ifndef NDEBUG + std::cerr << ex.what() << std::endl; +#endif + return defaultValue; + } + } + + //! \throws boost::bad_any_cast + template + const Type& as() const { + return boost::any_cast(value_); + } + + operator const boost::any& () const { + return value_; + } + +private: + boost::any value_; +}; + + +class Params +{ +public: + typedef std::map< std::string, Param, StringUnsensitiveComp > ParamsHolder; + typedef ParamsHolder::iterator iterator; + typedef ParamsHolder::const_iterator const_iterator; + + //! \brief empty parameters holder ctor + Params() + : holder_() {} + //! \brief copy ctor + Params(const ParamsHolder& params) + : holder_(params) {} + //! \brief single key,value pair ctor + 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) { + return set(key, value); + } + + Params& set(const std::string& key, const Param& value) { + holder_[key] = value; + return *this; + } + + ParamsHolder::size_type count(const std::string& key) const { + return holder_.count(key); + } + + operator const ParamsHolder& () { + return holder_; + } + + iterator begin() { return holder_.begin(); } + iterator end() { return holder_.end(); } + + const_iterator begin() const { return holder_.begin(); } + const_iterator end() const { return holder_.end(); } + +private: + ParamsHolder holder_; +}; + + + +} // pfs + +#endif // LIBPFS_PARAMS_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/pfs.h luminance-hdr-2.3.1/src/Libpfs/pfs.h --- luminance-hdr-2.3.0/src/Libpfs/pfs.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/pfs.h 2013-04-07 18:41:14.000000000 +0000 @@ -40,15 +40,16 @@ #ifndef PFS_H #define PFS_H -#include +//#include +//#include -#define PFSEOL "\x0a" -#define PFSEOLCH '\x0a' +//#define PFSEOL "\x0a" +//#define PFSEOLCH '\x0a' -#define MAX_RES 65535 -#define MAX_CHANNEL_NAME 32 -#define MAX_TAG_STRING 1024 -#define MAX_CHANNEL_COUNT 1024 +//#define MAX_RES 65535 +//#define MAX_CHANNEL_NAME 32 +//#define MAX_TAG_STRING 1024 +//#define MAX_CHANNEL_COUNT 1024 /** * All classes and function from PFS library reside in pfs namespace. @@ -56,205 +57,7 @@ namespace pfs { - /** - * Utility class that keeps pointer and deletes pointed object - * when the class is deleted. - * - * Note that it is not a full implementation of the smart pointer - * and memory management is not fool proof. You should never store - * this object as a global variable or a field of a class. These - * objects should be used only as local variables. - */ - template - class SelfDestructPtr - { - T *ptr; - mutable bool itsOwn; - public: - explicit SelfDestructPtr( T *ptr = 0 ) /*: ptr(ptr) , itsOwn(ptr!=0) */ - { - this->ptr = ptr; - if (this->ptr != 0) itsOwn = true; - } - - SelfDestructPtr( const SelfDestructPtr& r ) - /* : itsOwn(r.itsOwn), ptr(r.release()) */ - { - itsOwn = r.itsOwn; - ptr = r.release(); - } - - SelfDestructPtr& operator=( const SelfDestructPtr& r ) { - if (&r != this) { - if (ptr != r.ptr) { - if( itsOwn ) delete ptr; - itsOwn = r.itsOwn; - } - else if( r.itsOwn ) itsOwn = true; - ptr = r.release(); - } - return *this; - } - - ~SelfDestructPtr() - { - if( itsOwn ) - delete ptr; - } - - bool operator==( const SelfDestructPtr &x ) const { - return *(ptr) == *(x.ptr); - } - - bool operator!=( const SelfDestructPtr &x ) const { - return *(ptr) != *(x.ptr); - } - - T& operator*() const {return *ptr;} - T* operator->() const {return ptr;} - T* get() const {return ptr;} - T* release() const {itsOwn = false; return ptr;} - - }; - - /** - * A pair of a file name and file handler, returned from - * FrameFileIterator. - */ -// struct FrameFile -// { -// FrameFile( FILE *fh, const char* fileName ): fh(fh), fileName( fileName ) -// { -// } - -// /** -// * File handler. -// */ -// FILE *fh; - -// /** -// * File name. -// */ -// const char *fileName; -// }; - -//class FrameFileIteratorImpl; - - -///** -// * Utility class that can be used to iterate over file names -// * specified as command line arguments. It can handle patterns, -// * like frame%04d.hdr, where %04d is replaced with specified -// * range of frame numbers. -// * -// */ - -// class FrameFileIterator -// { -// FrameFileIteratorImpl *impl; -// public: -// /** -// * Creates new iterator over frame files. Command line -// * arguments are parsed and all recognized arguments are -// * removed. -// * -// * @param argc argument count passed to program's main function. -// * @param argv argument values passed to program's main function. -// * @param fopenMode mode used to fopen frame files, usually "rb" or "wb" -// * @param fileNamePrefix each frame pattern must be preceded -// * with this string (for example "-i'). If NULL, every argument that -// * does not start with "-" is treated as a frame pattern. -// * @param stdinout if set, treat '-' file name specially and instead -// * of opening a named file, use filedescriptor passed as this parameter. -// * It should be used to get or write data to stdin / stdout. -// * @param optstring parameter string passed to getopt() -// * function. When optstring != NULL, FrameFileIterator will skip -// * all parameters and their required arguments. Optional -// * arguments are not handled. -// * @param getopt_long parameter structure passed to getopt_long() -// * function. When getopt_long != NULL, FrameFileIterator will skip -// * all parameters and their required arguments. Optional -// * arguments are not handled. -// * @throws CommandLineException on bad syntax of command line options -// */ -// FrameFileIterator( int &argc, char* argv[], const char *fopenMode, -// const char *fileNamePrefix = NULL, FILE *stdinout = NULL, -// const char *optstring = NULL, const struct option *getopt_long = NULL ); -// ~FrameFileIterator(); - -// /** -// * Get the file handle FILE* and file name for the next -// * frame. Note that fileName string is valid until next -// * call to getNextFrameFile or closeFrameFile. -// * -// * When file handle is no longer needed, closeFileFile -// * should be called. -// * -// * @return file handle FILE* and file name of the next frame. -// * Returns file handle == NULL if there are no more frames. -// * -// * @throws Exception if the file is not found -// */ -// FrameFile getNextFrameFile( ); - -// /** -// * Close file openned with getNextFrameFile. -// * -// * @param frameFile FrameFile object returned from getNextFrameFile -// */ -// void closeFrameFile( FrameFile &frameFile ); - -// static void printUsage( FILE *out, const char *progName ); - -// }; - -/** - * General exception class used to throw exceptions from pfs library. - */ - class Exception - { - char msg[1024]; - public: - /** - * Creates a new exception. - * - * @param message description of the cause for the - * exception. The copy of the message string is made, so it can - * be freed after creating Exception. - */ - Exception( const char* const message ) - { - strcpy( msg, message ); - } - - ~Exception() {} - - /** - * Returns the description of the problem. - * - * @return text description of the cause for the exception - */ - const char* getMessage() - { - return msg; - } - }; - - -/** - * Exception class used to throw exceptions from FileFileIterator class. - */ -// class CommandLineException: public Exception -// { -// public: -// CommandLineException( const char* const message ): Exception( message ) -// { -// } -// }; - } - - #endif diff -Nru luminance-hdr-2.3.0/src/Libpfs/progress.cpp luminance-hdr-2.3.1/src/Libpfs/progress.cpp --- luminance-hdr-2.3.0/src/Libpfs/progress.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/progress.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * This file is a part of LuminanceHDR 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 + * ---------------------------------------------------------------------- + * + */ + +//! @author Davide Anastasia + +#include "progress.h" + +namespace pfs +{ + +Progress::Progress() + : m_maximum(0) + , m_minimum(0) + , m_value(0) + , m_canceled(false) +{} + +void Progress::setMaximum(int maximum) +{ + m_maximum = maximum; +} + +void Progress::setMinimum(int minimum) +{ + m_minimum = minimum; +} + +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; +} + +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; +} + +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/progress.h luminance-hdr-2.3.1/src/Libpfs/progress.h --- luminance-hdr-2.3.0/src/Libpfs/progress.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/progress.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * This file is a part of LuminanceHDR 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 + * ---------------------------------------------------------------------- + * + */ + +//! @author Davide Anastasia + +#ifndef LIBPFS_PROGRESS_H +#define LIBPFS_PROGRESS_H + +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 +//! instance, based on Qt) +//! \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: + Progress(); + + //! \brief virtual dtor, enable derivation + virtual ~Progress() {} + + virtual void setMaximum(int maximum); + virtual void setMinimum(int minimum); + virtual void setRange(int minimum, int maximum); + + virtual int maximum() const; + virtual int minimum() const; + + virtual void setValue(int value); + + ///! \brief increment the counter of 1 and return the new value + // this kind of function could be particularly useful in a multithreading + // environment, controlling the call with a monitor + // virtual int next(); + + virtual int value() const; + + virtual void cancel(bool b = true); + virtual bool canceled() const; + +private: + int m_maximum; + int m_minimum; + + int m_value; + + bool m_canceled; +}; + +} + +#endif // LIBPFS_PROGRESS_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/strideiterator.h luminance-hdr-2.3.1/src/Libpfs/strideiterator.h --- luminance-hdr-2.3.0/src/Libpfs/strideiterator.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/strideiterator.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,198 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2012 Davide Anastasia + * + * This library 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; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_STRIDE_ITERATOR_H +#define PFS_STRIDE_ITERATOR_H + +#include +#include + +namespace pfs { + +//! \author Davide Anastasia +//! \brief stride iterator +//! \ref C++ Cookbook +//! \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 typedefs + typedef StrideIterator self; + typedef typename std::iterator< std::random_access_iterator_tag, IterType> 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::pointer pointer; + + // ctors + 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) + {} + + // operators + //! \brief Prefix increment + self& operator++() + { m_data += m_step; return *this; } + + //! \brief Postfix increment + self operator++(int) { + self tmp(*this); + m_data += m_step; + return tmp; + } + + //! \brief Increment + 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); } + + //! \brief Prefix decrement + self& operator--() + { m_data -= m_step; return *this; } + + //! \brief Postfix decrement + self operator--(int) { + self tmp(*this); + m_data -= m_step; + return tmp; + } + + //! \brief Decrement + 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); } + + //! \brief dereferencing + reference operator*() const + { return *m_data; } + + //! \brief pointer + pointer operator->() const + { return m_data; } + + //! \brief subscription + reference operator[](const difference_type& n) + { return m_data[n * m_step]; } + + // friend operators + template + friend bool operator==(const StrideIterator& x, const StrideIterator& y); + + template + friend bool operator!=(const StrideIterator& x, const StrideIterator& y); + + template + friend bool operator<(const StrideIterator& x, const StrideIterator& y); + + template + friend bool operator<=(const StrideIterator& x, const StrideIterator& y); + + template + friend bool operator>(const StrideIterator& x, const StrideIterator& y); + + template + friend bool operator>=(const StrideIterator& x, const StrideIterator& y); + + template + friend typename StrideIterator::difference_type operator+( + const StrideIterator& x, const StrideIterator& y); + + template + friend typename StrideIterator::difference_type operator-( + const StrideIterator& x, const StrideIterator& y); + +private: + IterType m_data; + difference_type m_step; +}; + +template +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) { + assert(x.m_step == y.m_step); + return (x.m_data != y.m_data); +} + +template +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) { + assert(x.m_step == y.m_step); + return (x.m_data <= y.m_data); +} + +template +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) { + 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) { + 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) { + assert(x.m_step == y.m_step); + return (x.m_data - y.m_data) / x.m_step; +} + +} // pfs + +#endif // PFS_STRIDE_ITERATOR_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/tag.cpp luminance-hdr-2.3.1/src/Libpfs/tag.cpp --- luminance-hdr-2.3.0/src/Libpfs/tag.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/tag.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -25,170 +25,80 @@ * @author Davide Anastasia */ -#include "tag.h" -#include "frame.h" +#include +#include -#include -#include +#include #include +#include +#include using namespace std; namespace pfs { - TagList::const_iterator TagContainer::tagsBegin() const - { - return m_tags.begin(); - } - - TagList::const_iterator TagContainer::tagsEnd() const - { - return m_tags.end(); - } - - int TagContainer::getSize() const - { - return (int)m_tags.size(); - } - - void TagContainer::appendTagEOL( const char *tagValue ) - { - assert( tagValue[strlen( tagValue ) -1] == PFSEOLCH ); - m_tags.push_back( string( tagValue, strlen( tagValue ) -1 ) ); - } - - void TagContainer::appendTag( const string &tagValue ) - { - m_tags.push_back( tagValue ); - } - - TagList::iterator TagContainer::findTag( const char *tagName ) - { - size_t tagNameLen = strlen( tagName ); - TagList::iterator it; - for( it = m_tags.begin(); it != m_tags.end(); it++ ) - { - if ( !memcmp( tagName, it->c_str(), tagNameLen ) ) break; // Found - } - return it; - } - - void TagContainer::setTag( const char *tagName, const char *tagValue ) - { - string tagVal( tagName ); - tagVal += "="; - tagVal += tagValue; - - TagList::iterator element = findTag( tagName ); - if ( element == m_tags.end() ) - { - // Does not exist - m_tags.push_back( tagVal ); - } - else - { - // Already exist - *element = tagVal; - } - } - - const char *TagContainer::getTag( const char *tagName ) - { - TagList::iterator element = findTag( tagName ); - if ( element == m_tags.end() ) return NULL; - - std::string::size_type equalSign = element->find( '=' ); - assert( equalSign != string::npos ); +std::string TagContainer::getTag(const string &tagName) const +{ + TagList::const_iterator it = m_tags.find(tagName); + if ( it != m_tags.end() ) + return it->second; + return std::string(); +} - return element->c_str() + equalSign + 1; - } +void TagContainer::removeTag(const std::string& tagName) +{ + m_tags.erase(tagName); +} - const char* TagContainer::getString( const char *tagName ) - { - return getTag( tagName ); - } +void TagContainer::setTag(const string &tagName, const string &tagValue) +{ + m_tags[tagName] = tagValue; +} - void TagContainer::setString( const char *tagName, const char *tagValue ) - { - setTag( tagName, tagValue ); - } +std::ostream& operator<<(std::ostream& out, const TagContainer& tags) +{ + if (tags.size() == 0) return out; - void TagContainer::removeTag( const char *tagName ) - { - TagList::iterator element = findTag( tagName ); - if( element != m_tags.end() ) m_tags.erase( element ); - } + TagContainer::const_iterator itEnd = tags.end(); + std::advance(itEnd, -1); + TagContainer::const_iterator it = tags.begin(); - TagIteratorPtr TagContainer::getIterator() const - { - return TagIteratorPtr( new TagIterator( m_tags ) ); - } + std::stringstream ss; - void TagContainer::removeAllTags() + for ( ; it != itEnd; ++it) { - m_tags.clear(); + ss << it->first << "=" << it->second << " "; } + ss << it->first << "=" << it->second; + return (out << ss.str()); +} - void copyTags( Frame *from, Frame *to ) - { - copyTags( from->getTags(), to->getTags() ); - pfs::ChannelIterator *it = from->getChannels(); - while ( it->hasNext() ) - { - pfs::Channel *fromCh = it->getNext(); - pfs::Channel *toCh = to->getChannel( fromCh->getName() ); - if ( toCh == NULL ) // Skip if there is no corresponding channel - continue; - copyTags( fromCh->getTags(), toCh->getTags() ); - } - - } +void copyTags(const TagContainer& f, TagContainer& t) +{ + t.clear(); + t = f; +} - void copyTags( const TagContainer *f, TagContainer *t ) - { - t->removeAllTags(); +void copyTags(const Frame *from, Frame *to) +{ + copyTags( from->getTags(), to->getTags() ); - for ( TagList::const_iterator it = f->tagsBegin(); it != f->tagsEnd(); it++ ) - { - t->appendTag( *it ); - } - } + const ChannelContainer& channels = from->getChannels(); - void readTags( TagContainer *tags, FILE *in ) + for (ChannelContainer::const_iterator it = channels.begin(); + it != channels.end(); + ++it) { - int readItems; - int tagCount; - 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" ); - } + const pfs::Channel *fromCh = *it; + pfs::Channel *toCh = to->getChannel( fromCh->getName() ); - char buf[MAX_TAG_STRING+1]; - for( int i = 0; i < tagCount; i++ ) + // Skip if there is no corresponding channel + if ( toCh != NULL ) { - char *read = fgets( buf, MAX_TAG_STRING, in ); - if( read == NULL ) throw Exception( "Corrupted PFS tag section: missing tag" ); - char *equalSign = strstr( buf, "=" ); - if( equalSign == NULL ) throw Exception( "Corrupted PFS tag section ('=' sign missing)" ); - tags->appendTagEOL( buf ); + copyTags(fromCh->getTags(), toCh->getTags()); } } - - void writeTags( const TagContainer *tags, FILE *out ) - { - fprintf( out, "%d" PFSEOL, tags->getSize() ); - for (TagList::const_iterator it = tags->tagsBegin(); it != tags->tagsEnd(); it++ ) - { - fprintf( out, "%s", it->c_str() ); - fprintf( out, PFSEOL ); - } - } - } - - - - +} // pfs diff -Nru luminance-hdr-2.3.0/src/Libpfs/tag.h luminance-hdr-2.3.1/src/Libpfs/tag.h --- luminance-hdr-2.3.0/src/Libpfs/tag.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/tag.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,10 +1,8 @@ -/** - * @brief PFS library - PFS Tag Handling - * +/* * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2003,2004 Rafal Mantiuk and Grzegorz Krawczyk - * Copyright (C) 2011 Davide Anastasia + * Copyright (C) 2011-2013 Davide Anastasia * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,162 +18,91 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- - * - * @author Rafal Mantiuk, - * @author Davide Anastasia */ + +//! \brief PFS library - PFS Tag Handling +//! \author Rafal Mantiuk, +//! \author Davide Anastasia +//! Modified to use std::map instead than a list of strings #ifndef PFS_TAG_H #define PFS_TAG_H -#include +#include #include -#include - -#include "pfs.h" - -using namespace std; namespace pfs { - class Frame; - - typedef list TagList; +class Frame; - /** - * Iterator that allows to get the list of available tags in a - * TagContainer. - */ - class TagIterator - { - TagList::const_iterator it; - const TagList &tagList; - string tagName; - - public: - inline TagIterator( const TagList &tagList ) : tagList( tagList ) - { - it = tagList.begin(); - } - - /** - * Get next item on the list. - * - * @return name of the tag - */ - inline const char *getNext() - { - const string &tag = *(it++); - size_t equalSign = tag.find( '=' ); - //assert( equalSign != -1 ); - assert( equalSign != string::npos ); - tagName = string( tag, 0, equalSign ); - return tagName.c_str(); - } - - /** - * Returns true if there is still an item left on the list. - */ - inline bool hasNext() const - { - return it != tagList.end(); - } - }; - - typedef SelfDestructPtr TagIteratorPtr; - - //------------------------------------------------------------------------------ - // TagContainer interface allows to read and modify tags. A tag is "name"="value" pair. - // ------------------------------------------------------------------------------ - class TagContainer - { - protected: - - TagList m_tags; - - public: - - //TagContainer() { } - //~TagContainer() { } - - TagList::const_iterator tagsBegin() const; - TagList::const_iterator tagsEnd() const; - - int getSize() const; - - void appendTagEOL( const char *tagValue ); - void appendTag( const string &tagValue ); - - TagList::iterator findTag( const char *tagName ); - - void setTag( const char *tagName, const char *tagValue ); - const char *getTag( const char *tagName ); - - /** - * Set or add a string tag of the name tagName. - * @param tagName name of the tag to add or set - * @param tagValue value of the tag - */ - void setString( const char *tagName, const char *tagValue ); - - /** - * Get a string tag of the name tagName from the TagContainer. - * @param tagName name of the tag to retrieve - * @return tag value or NULL if tag was not found - */ - const char* getString( const char *tagName ); - - /** - * Removes (if exists) a tag of the name tagName from the TagContainer. - * @param tagName name of the tag to remove - */ - void removeTag( const char *tagName ); - - void removeAllTags(); - - /** - * Use TagIterator to iterate over all tags in the TagContainer. - * TagIteratorPtr is a smart pointer, which destructs - * TagIterator when TagIteratorPtr is destructed. Use -> - * operator to access TagIterator members from a TagIteratorPtr - * object. - * - * To iterate over all tags, use the following code: - * - * pfs::TagIteratorPtr it( frame->getTags()->getIterator() ); - * while( it->hasNext() ) { - * const char *tagName = it->getNext(); - * //Do something - * } - * - */ - TagIteratorPtr getIterator() const; - }; - - - /** - * Copy all tags from both the frame and its channels to the - * destination frame. If there is no corresponding destination - * channel for a source channel, the tags from that source channel - * will not be copied. Note, that all 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( Frame *from, Frame *to ); - - /** - * Copy all tags from one container into another. Note, that all - * 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 ); +class TagContainer +{ +public: + typedef std::map TagList; - void writeTags( const TagContainer *tags, FILE *out ); - void readTags( TagContainer *tags, FILE *in ); + TagContainer() + : m_tags() + {} + + 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); + + //! \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; + + //! \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 clear() + { m_tags.clear(); } + + 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(); } + +private: + TagList m_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 +//! channel for a source channel, the tags from that source channel +//! will not be copied. Note, that all 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 Frame *from, Frame *to); + +//! Copy all tags from one container into another. Note, that all +//! 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 diff -Nru luminance-hdr-2.3.0/src/Libpfs/tm/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/tm/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/tm/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/tm/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB TMENGINE_H *.h) +FILE(GLOB TMENGINE_HXX *.hxx) +FILE(GLOB TMENGINE_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${TMENGINE_H} ${TMENGINE_H} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${TMENGINE_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/tm/TonemapOperator.cpp luminance-hdr-2.3.1/src/Libpfs/tm/TonemapOperator.cpp --- luminance-hdr-2.3.0/src/Libpfs/tm/TonemapOperator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/tm/TonemapOperator.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,332 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2006,2007 Giuseppe Rota + * Copyright (C) 2011 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 + * ---------------------------------------------------------------------- + * + * Original Work + * @author Giuseppe Rota + * Improvements, bugfixing + * @author Franco Comida + * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread + * @author Davide Anastasia + * + * + */ + +#include + +#include +#include + +#include "TonemappingOperators/pfstmo.h" + +#include "Libpfs/frame.h" +#include "Libpfs/channel.h" +#include "Libpfs/colorspace/colorspace.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(); + } + + TMOperator getType() const + { + return Key; + } +}; + +class TonemapOperatorMantiuk06 + : public TonemapOperatorRegister +{ +public: + void tonemapFrame(pfs::Frame& workingFrame, TonemappingOptions* opts, pfs::Progress& ph) + { + ph.setMaximum(100); + + // pfstmo_mantiuk06 not reentrant + m_mutex.lock(); + 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 (...) + { + m_mutex.unlock(); + throw std::runtime_error("Tonemap Failed"); + } + m_mutex.unlock(); + } + +private: + // It may be removed, because the issue in the race condition of the + // operator has been solved + static QMutex m_mutex; +}; + +QMutex TonemapOperatorMantiuk06::m_mutex; // static member + +struct TonemapOperatorMantiuk08 + : 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); + + 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) + { + ph.setMaximum(100); + + float ratio = opts->origxsize / opts->xsize; + int detail_level = 0; + if ( ratio < 2 ) + detail_level = 3; + else if ( ratio < 4 ) + detail_level = 2; + else if ( ratio < 8 ) + detail_level = 1; + else + detail_level = 0; + + // std::cout << "RATIO = " << ratio << ", "; + // std::cout << "DETAIL_LEVEL = " << detail_level << std::endl; + + 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); + } +}; + +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); + } +}; + +class TonemapOperatorDurand02 + : public TonemapOperatorRegister +{ + void tonemapFrame(pfs::Frame& workingframe, TonemappingOptions* opts, pfs::Progress& ph) + { + ph.setMaximum(100); + + // pfstmo_durand02 not reentrant + m_mutex.lock(); + 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"); + } + m_mutex.unlock(); + } + +private: + static QMutex m_mutex; +}; + +QMutex TonemapOperatorDurand02::m_mutex; + + +struct TonemapOperatorReinhard02 + : 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); + + 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"); + } + m_mutex.unlock(); + + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, + pfs::CS_SRGB, X, Y, Z); + } + +private: + static QMutex m_mutex; +}; + +QMutex TonemapOperatorReinhard02::m_mutex; + +struct TonemapOperatorReinhard05 + : 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); + } +}; + +struct TonemapOperatorAshikhmin02 + : 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); + } +}; + +struct TonemapOperatorPattanaik00 + : 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_pattanaik00(workingframe, + opts->operator_options.pattanaikoptions.local, + opts->operator_options.pattanaikoptions.multiplier, + opts->operator_options.pattanaikoptions.cone, + opts->operator_options.pattanaikoptions.rod, + opts->operator_options.pattanaikoptions.autolum, + ph); + + + pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, + pfs::CS_SRGB, X, Y, Z); + } +}; + +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) + (drago, TonemapOperatorRegister::create) + (durand, TonemapOperatorRegister::create) + (reinhard02, TonemapOperatorRegister::create) + (reinhard05, TonemapOperatorRegister::create) + (ashikhmin, TonemapOperatorRegister::create) + (pattanaik, TonemapOperatorRegister::create) + ; + return reg; +} + +TonemapOperator::TonemapOperator() +{} + +TonemapOperator::~TonemapOperator() +{} + +TonemapOperator* TonemapOperator::getTonemapOperator(const TMOperator tmo) +{ + TonemapOperatorCreatorMap::const_iterator it = registry().find(tmo); + if ( it != registry().end() ) + { + return (it->second)(); + } + throw std::runtime_error("Invalid TMOperator"); +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/tm/TonemapOperator.h luminance-hdr-2.3.1/src/Libpfs/tm/TonemapOperator.h --- luminance-hdr-2.3.0/src/Libpfs/tm/TonemapOperator.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/tm/TonemapOperator.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2006,2007 Giuseppe Rota + * Copyright (C) 2011 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 + * ---------------------------------------------------------------------- + * + * Original Work + * @author Giuseppe Rota + * Improvements, bugfixing + * @author Franco Comida + * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread + * @author Davide Anastasia + * + */ + +#ifndef TONEMAPOPERATOR_H +#define TONEMAPOPERATOR_H + +#include + +#include "Core/TonemappingOptions.h" + +// Forward declaration +namespace pfs +{ +class Progress; +class Frame; +} + +class TonemapOperator +{ +public: + static TonemapOperator* getTonemapOperator(const TMOperator tmo); + virtual ~TonemapOperator(); + + //! + //! \return return the underlying type of the TonemapOperator + //! + virtual TMOperator getType() const = 0; + + //! + //! Get a Frame in RGB and processes it. + //! \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; + +protected: + TonemapOperator(); +}; + +#endif // TONEMAPOPERATOR_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/utils/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/utils/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB UTILS_H *.h) +FILE(GLOB UTILS_HXX *.hxx) +FILE(GLOB UTILS_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${UTILS_H} ${UTILS_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${UTILS_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/chain.h luminance-hdr-2.3.1/src/Libpfs/utils/chain.h --- luminance-hdr-2.3.0/src/Libpfs/utils/chain.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/chain.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#ifndef PFS_UTILS_CHAIN_H +#define PFS_UTILS_CHAIN_H + +namespace pfs { +namespace utils { + +template +struct Chain { + Chain(const Func1& func1, const Func2& func2) + : func1_(func1), func2_(func2) + {} + + template + void operator()(Type v1, Type v2, Type v3, + Type& o1, Type& o2, Type& o3) + { + func1_(v1, v2, v3, v1, v2, v3); + func2_(v1, v2, v3, o1, o2, o3); + } +private: + Func1 func1_; + Func2 func2_; +}; + +} // utils +} // pfs + + +#endif // PFS_UTILS_CHAIN_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/msec_timer.cpp luminance-hdr-2.3.1/src/Libpfs/utils/msec_timer.cpp --- luminance-hdr-2.3.0/src/Libpfs/utils/msec_timer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/msec_timer.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,126 @@ +/** + * @brief Milliseconds Timer + * + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + * + * http://msdn.microsoft.com/en-us/library/ms644904%28v=VS.85%29.aspx + * + * @author Davide Anastasia, + * + */ + +#include "msec_timer.h" + +//costructor +msec_timer::msec_timer(): +#ifdef WIN_TIMER +wrk_time(0.0) +#elif __APPLE__ +start_t(0), stop_t(0), wrk_time(0), conversion(1.0) +#else +wrk_time(0.0) +#endif +{ +#ifdef WIN_TIMER + QueryPerformanceFrequency(&freq); +#elif __APPLE__ + 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); +#else + +#endif +} + +msec_timer::~msec_timer() // destructor +{ + // nothing to do +} + +void msec_timer::start() +{ +#ifdef WIN_TIMER + QueryPerformanceCounter(&start_t); +#elif __APPLE__ + start_t = mach_absolute_time(); +#else + gettimeofday(&start_t, NULL); +#endif +} + +void msec_timer::stop() +{ +#ifdef WIN_TIMER + QueryPerformanceCounter(&stop_t); +#elif __APPLE__ + stop_t = mach_absolute_time(); +#else + gettimeofday(&stop_t, NULL); +#endif +} + +void msec_timer::update() +{ +#ifdef WIN_TIMER + wrk_time += ((double)(stop_t.QuadPart - start_t.QuadPart)); +#elif __APPLE__ + 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); +#endif +} + +void msec_timer::stop_and_update() +{ + stop(); + update(); +} + +void msec_timer::reset() +{ + wrk_time = 0.0; +} + +double msec_timer::get_time() +{ +#ifdef WIN_TIMER + return (wrk_time * 1000.0 / freq.QuadPart); +#elif __APPLE__ + return (conversion * (double) wrk_time * 1000.0); +#else + return wrk_time; +#endif +} + +void msec_timer::get_timer_type() +{ +#ifdef WIN_TIMER + printf(" QueryPerformanceCounter()\n"); +#elif __APPLE__ + printf(" mach_absolute_time()\n"); +#else + // 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)); +} diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/msec_timer.h luminance-hdr-2.3.1/src/Libpfs/utils/msec_timer.h --- luminance-hdr-2.3.0/src/Libpfs/utils/msec_timer.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/msec_timer.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,89 @@ +/** + * @brief Milliseconds Timer + * + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + * + * http://msdn.microsoft.com/en-us/library/ms644904%28v=VS.85%29.aspx + * + * @author Davide Anastasia, + * + */ + +#ifndef MSEC_TIMER_H +#define MSEC_TIMER_H + +#if defined(_WIN32) || defined(__CYGWIN__) +#define WIN_TIMER +#endif + +/* + * this define enables the timing profile + * You should comment this define if you want to disable this feature + */ +#ifndef NDEBUG +#define TIMER_PROFILING +#endif + +#include +//#include + +// TIMER ----- +#ifdef WIN_TIMER +#define _WINSOCKAPI_ // stops windows.h including winsock.h +#include +#elif __APPLE__ +#include +#include +#else +//#include +#include +#endif + +class msec_timer { +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; +#else + 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(); + + void get_timer_type(); +}; + +double convert_to_gigaflops(double, double); + +#endif // MSEC_TIMER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandler.h luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandler.h --- luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandler.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandler.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,91 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 RESOURCEHANDLER_H +#define RESOURCEHANDLER_H + +namespace pfs { +namespace utils { + +template +struct ResourceHandlerTraits { + 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) + {} + + inline + void reset(T* p = 0) { + if (p == p_) return; + if (p_ != 0) { + Traits::cleanup(p_); + } + p_ = p; + } + + inline + ~ResourceHandler() { + T *oldD = this->p_; + Traits::cleanup(oldD); + this->p_ = 0; + } + + inline T* data() + { return p_; } + + inline const T* data() const + { return p_; } + + inline T* take() { + T* old_p = p_; + p_ = 0; + return old_p; + } + + inline operator bool() const + { return p_; } + + inline bool operator!() const + { return !p_; } + +private: + ResourceHandler(const ResourceHandler&); + ResourceHandler& operator=(const ResourceHandler&); + + T* p_; +}; + +} // utils +} // pfs + +#endif // RESOURCEHANDLER_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandlerlcms.h luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandlerlcms.h --- luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandlerlcms.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandlerlcms.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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 RESOURCEHANDLERLCMS_H +#define RESOURCEHANDLERLCMS_H + +//! \file ResourceHandlerLcms.h +//! \brief This file contains simple resource handlers for LCMS2 library +//! \author Davide Anastasia +//! \date 2012 05 05 +//! \since 2.3.0-beta1 + +#include + +#include +#include + +namespace pfs { +namespace utils { + +struct CleanUpCmsProfile +{ + static inline + void cleanup(cmsHPROFILE profile) { + if ( profile ) { +#ifndef NDEBUG + std::clog << "CleanUpCmsProfile::cleanup()\n"; +#endif + cmsCloseProfile(profile); + } + } +}; +typedef ResourceHandler ScopedCmsProfile; + +struct CleanUpCmsTransform +{ + static inline + void cleanup(cmsHTRANSFORM transform) { + if ( transform ) { +#ifndef NDEBUG + std::clog << "CleanUpCmsTransform::cleanup()\n"; +#endif + cmsDeleteTransform(transform); + } + } +}; +typedef ResourceHandler ScopedCmsTransform; + +} // utils +} // pfs + +#endif // RESOURCEHANDLERLCMS_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandlerstdio.h luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandlerstdio.h --- luminance-hdr-2.3.0/src/Libpfs/utils/resourcehandlerstdio.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/resourcehandlerstdio.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * 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 RESOURCEHANDLERSTDIO_H +#define RESOURCEHANDLERSTDIO_H + +//! \file resourcehandlerstdio.h +//! \brief This file contains resource handlers for cstdio +//! \author Davide Anastasia +//! \date 2012 05 05 +//! \since 2.3.0-beta1 + +#include +#include +#include + +namespace pfs { +namespace utils { + +struct CleanUpStdIoFile +{ + static inline + void cleanup(FILE* p) { + if ( p ) { + fclose(p); + } + } +}; + +typedef ResourceHandler ScopedStdIoFile; + +} // utils +} // pfs + +#endif // RESOURCEHANDLERSTDIO_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/transform.h luminance-hdr-2.3.1/src/Libpfs/utils/transform.h --- luminance-hdr-2.3.0/src/Libpfs/utils/transform.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/transform.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * 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 colorspace conversion base functions +//! \author Davide Anastasia + +#ifndef PFS_COLORSPACE_TRANSFORM_H +#define PFS_COLORSPACE_TRANSFORM_H + +namespace pfs { +namespace utils { + +template +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, + OutputIterator out1, OutputIterator out2, OutputIterator out3, + ConversionOperator convOp); + +template +void transform(InputIterator in1, InputIterator in1End, InputIterator in2, InputIterator in3, + OutputIterator out1, ConversionOperator convOp); + +} // utils +} // pfs + +#include +#endif // PFS_COLORSPACE_TRANSFORM_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/utils/transform.hxx luminance-hdr-2.3.1/src/Libpfs/utils/transform.hxx --- luminance-hdr-2.3.0/src/Libpfs/utils/transform.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/utils/transform.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,131 @@ +/* + * 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 colorspace conversion base functions +//! \author Davide Anastasia + +#ifndef PFS_COLORSPACE_TRANSFORM_HXX +#define PFS_COLORSPACE_TRANSFORM_HXX + +#include +#include +#include +#include + +namespace pfs { +namespace utils { + +namespace detail { + +// 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 ) + { + convOp(*in1++, *in2++, *in3++, *out1++, *out2++, *out3++); + } +} + +// 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); +#pragma omp parallel for + for ( int idx = 0; idx < numElem; ++idx) { + convOp(in1[idx], in2[idx], in3[idx], + out1[idx], out2[idx], out3[idx]); + } +} + +} // detail + +template +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()); +} + +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 ) + { + convOp(*in1++, *in2++, *in3++, *out++); + } +} + +// 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); +#pragma omp parallel for + for ( int idx = 0; idx < numElem; ++idx) { + convOp(in1[idx], in2[idx], in3[idx], out[idx]); + } +} + +} // detail + +template +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()); +} + +} // utils +} // pfs + +#endif // PFS_COLORSPACE_TRANSFORM_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/CMakeLists.txt luminance-hdr-2.3.1/src/Libpfs/vex/CMakeLists.txt --- luminance-hdr-2.3.0/src/Libpfs/vex/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,6 @@ +FILE(GLOB VEX_H *.h) +FILE(GLOB VEX_HXX *.hxx) +FILE(GLOB VEX_CPP *.cpp) + +SET(LIBPFS_H ${LIBPFS_H} ${VEX_H} ${VEX_HXX} PARENT_SCOPE) +SET(LIBPFS_CPP ${LIBPFS_CPP} ${VEX_CPP} PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/dotproduct.h luminance-hdr-2.3.1/src/Libpfs/vex/dotproduct.h --- luminance-hdr-2.3.0/src/Libpfs/vex/dotproduct.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/dotproduct.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef VEX_DOTPRODUCT_H +#define VEX_DOTPRODUCT_H + +#include + +//! \file dotproduct.h +//! \brief Multithread function for the calculation of the dot product between +//! vectors +//! \author Davide Anastasia +//! \date 2012.08.28 + +//! \brief Perform the dotProduct of the element of \c v1 and \c v2 +//! output = \sum_{i=0}^{n}{v1[i] * v2[i]} +// v1 . v2 +template +_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); + + +#include "dotproduct.hxx" +#endif // VEX_DOTPRODUCT_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/dotproduct.hxx luminance-hdr-2.3.1/src/Libpfs/vex/dotproduct.hxx --- luminance-hdr-2.3.0/src/Libpfs/vex/dotproduct.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/dotproduct.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,57 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +//! \author Davide Anastasia + +#ifndef VEX_DOTPRODUCT_HXX +#define VEX_DOTPRODUCT_HXX + +#include "dotproduct.h" + +namespace vex +{ + +template +_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++) + { + dotProd += (v1[idx] * v2[idx]); + } + return static_cast<_Type>(dotProd); +} + +template +_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++) + { + dotProd += (v1[idx] * v1[idx]); + } + return static_cast<_Type>(dotProd); +} +} + +#endif // VEX_DOTPRODUCT_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/minmax.h luminance-hdr-2.3.1/src/Libpfs/vex/minmax.h --- luminance-hdr-2.3.0/src/Libpfs/vex/minmax.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/minmax.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,37 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef VEX_MINMAX_H +#define VEX_MINMAX_H + +namespace vex +{ + +template +_Type minElement(const _Type* data, size_t size); + +template +_Type maxElement(const _Type* data, size_t size); + +} + +#include "minmax.hxx" +#endif // VEX_MINMAX_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/minmax.hxx luminance-hdr-2.3.1/src/Libpfs/vex/minmax.hxx --- luminance-hdr-2.3.0/src/Libpfs/vex/minmax.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/minmax.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,47 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef VEX_MINMAX_HXX +#define VEX_MINMAX_HXX + +#include "minmax.h" + +#include +#include + +namespace vex +{ + +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) +{ + return *std::max_element(vector, vector + vectorSize); +} + +} // namespace vex + +#endif // VEX_MINMAX_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/sse.cpp luminance-hdr-2.3.1/src/Libpfs/vex/sse.cpp --- luminance-hdr-2.3.0/src/Libpfs/vex/sse.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/sse.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,114 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2011 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 SSE for high performance vector operations (Vector EXtension - VEX) +//! @author Davide Anastasia, + +#include "vex.h" + +#ifdef LUMINANCE_USE_SSE + +/* 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))); + + /* 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[ */ +#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); +#elif EXP_POLY_DEGREE == 4 + 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); +#elif EXP_POLY_DEGREE == 2 + expfpart = POLY2(fpart, 1.0017247f, 6.5763628e-1f, 3.3718944e-1f); +#else +#error +#endif + + 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 one = _mm_set1_ps(1.0f); + + __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 m = _mm_or_ps(_mm_castsi128_ps(_mm_and_si128(i, mant)), one); + + v4sf p; + + /* 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); +#elif LOG_POLY_DEGREE == 5 + 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); +#elif LOG_POLY_DEGREE == 3 + 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); +} + +v4sf _mm_pow_ps(v4sf x, v4sf y) +{ + return _mm_exp2_ps(_mm_log2_ps(x) * y); +} + +#endif // LUMINANCE_USE_SSE diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/sse.h luminance-hdr-2.3.1/src/Libpfs/vex/sse.h --- luminance-hdr-2.3.0/src/Libpfs/vex/sse.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/sse.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2011 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 SSE for high performance vector operations (Vector EXtension - VEX) +//! @author Davide Anastasia, + +#ifndef VEX_H +#define VEX_H + +#ifdef __SSE__ + +//#if __ppc__ || __ppc7400__ || __ppc64__ || __ppc970__ +//#include +#if __i386__ || __x86_64__ +// #define LUMINANCE_USE_SSE +#include +#include +#include +//#include +//#include + +#else +#error unsupported architecture +#endif + +#endif // __SSE__ + +#ifdef LUMINANCE_USE_SSE +typedef __v4sf v4sf; +v4sf _mm_log2_ps(v4sf); +v4sf _mm_exp2_ps(v4sf); +v4sf _mm_pow_ps(v4sf, v4sf); +#endif + +#endif diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/vex.h luminance-hdr-2.3.1/src/Libpfs/vex/vex.h --- luminance-hdr-2.3.0/src/Libpfs/vex/vex.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/vex.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,112 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2011-2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef VEX_VEX_H +#define VEX_VEX_H + +//! \brief This file contains a series of extensions for vector operations +//! exploiting TBB to improve parallelism +//! It will slowly replace the old vex header +//! \note VEX stays for Vector EXtensions +//! \author Davide Anastasia + +#include +#include +#include + +namespace vex +{ +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: + T 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: + T s_; +}; + +} // vex::numeric + +//! \brief multiplies element-wise \c A and \c B and stores into \c C +//! C[i] = A[i] * B[i] +//! \param[in] A first input vector +//! \param[in] B second input vector +//! \param[out] C output vector +//! \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); + +//! \brief multiplies 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); + + +//! \brief multiplies 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); + +//! \brief multiplies element-wise \c A and \c B 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); + +//! \brief multiplies 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); + +//! \brief multiplies element-wise \c A and \c B 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); + +//! // O[i] = c * I[i] +template +void vsmul(const _Type* I, float c, _Type* O, size_t size); + +} // vex + +#include "vex.hxx" + +#endif // VEX_VEX_H diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex/vex.hxx luminance-hdr-2.3.1/src/Libpfs/vex/vex.hxx --- luminance-hdr-2.3.0/src/Libpfs/vex/vex.hxx 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex/vex.hxx 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,98 @@ +/* +* This file is a part of Luminance HDR package. +* ---------------------------------------------------------------------- +* Copyright (C) 2011-2012 Davide Anastasia +* +* This library 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; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* ---------------------------------------------------------------------- +*/ + +#ifndef VEX_VEX_HXX +#define VEX_VEX_HXX + +#include "vex.h" + +#include +#include +#include + +namespace vex +{ +namespace detail +{ + +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++) + { + C[idx] = currOp(A[idx], B[idx]); + } +} + +} + +template +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>()); +} + +template +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) +{ + 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) +{ + detail::op(A, B, C, size, numeric::vsubs<_Type>(s)); +} + + +template +void vsmul(const _Type* I, 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]; + } +} + +} // vex + +#endif // VEX_VEX_HXX diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex.cpp luminance-hdr-2.3.1/src/Libpfs/vex.cpp --- luminance-hdr-2.3.0/src/Libpfs/vex.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,657 +0,0 @@ -/** - * @brief SSE for high performance vector operations - * - * This file is a part of LuminanceHDR package - * ---------------------------------------------------------------------- - * 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, - * - */ - -#include -#include "vex.h" - -#ifdef _OPENMP -#include -#endif - -// Prefetch definition taken from: -// http://software.intel.com/en-us/forums/showthread.php?t=46284 -// tune FETCH_DISTANCE according to real world experiments -#define PREFETCH_T0(addr, nrOfBytesAhead) _mm_prefetch(((char *)(addr))+nrOfBytesAhead, _MM_HINT_T0) -#define FETCH_DISTANCE 512 - -void VEX_vsub(const float* A, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - __m128 a, b, c; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a,b,c) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l], c); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+4], c); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+8], c); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+12], c); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - c = _mm_sub_ss(a, b); - _mm_store_ss(&pC[l], c); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] - B[idx]; - } -#endif -} - -void VEX_vsubs(const float* A, const float premultiplier, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - __m128 a, b, c; - const __m128 val = _mm_set1_ps(premultiplier); - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a,b,c) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - b = _mm_mul_ps(b, val); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l], c); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - b = _mm_mul_ps(b, val); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+4], c); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - b = _mm_mul_ps(b, val); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+8], c); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - b = _mm_mul_ps(b, val); - c = _mm_sub_ps(a, b); - _mm_store_ps(&C[l+12], c); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - b = _mm_mul_ss(b, val); - c = _mm_sub_ss(a, b); - _mm_store_ss(&pC[l], c); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] - premultiplier * B[idx]; - } -#endif -} - -void VEX_vadd(const float* A, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - __m128 a, b, c; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a,b,c) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l], c); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+4], c); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+8], c); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+12], c); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - c = _mm_add_ss(a, b); - _mm_store_ss(&pC[l], c); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] + B[idx]; - } -#endif -} - -void VEX_vadds(const float* A, const float premultiplier, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - const __m128 val = _mm_set1_ps(premultiplier); - __m128 a, b, c; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a,b,c) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - b = _mm_mul_ps(b, val); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l], c); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - b = _mm_mul_ps(b, val); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+4], c); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - b = _mm_mul_ps(b, val); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+8], c); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - b = _mm_mul_ps(b, val); - c = _mm_add_ps(a, b); - _mm_store_ps(&C[l+12], c); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - b = _mm_mul_ss(b, val); - c = _mm_add_ss(a, b); - _mm_store_ss(&pC[l], c); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] + premultiplier * B[idx]; - } -#endif -} - -void VEX_vsmul(const float* I, const float premultiplier, float* O, const int N) -{ -#ifdef LUMINANCE_USE_SSE - const __m128 val = _mm_set1_ps(premultiplier); - __m128 t; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(t) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&I[l], FETCH_DISTANCE); - PREFETCH_T0(&O[l], FETCH_DISTANCE); - - t = _mm_load_ps(&I[l]); - t = _mm_mul_ps(t, val); - _mm_store_ps(&O[l], t); - - t = _mm_load_ps(&I[l+4]); - t = _mm_mul_ps(t, val); - _mm_store_ps(&O[l+4], t); - - t = _mm_load_ps(&I[l+8]); - t = _mm_mul_ps(t, val); - _mm_store_ps(&O[l+8], t); - - t = _mm_load_ps(&I[l+12]); - t = _mm_mul_ps(t, val); - _mm_store_ps(&O[l+12], t); - } - - const float* pI = &I[ELEMS_LOOP1]; - float* pO = &O[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - t = _mm_load_ss(&pI[l]); - t = _mm_mul_ss(t, val); - _mm_store_ss(&pO[l], t); - } -#else - // plain code -#pragma omp parallel for - for(int idx = 0; idx < N; ++idx) - { - O[idx] = premultiplier * I[idx]; - } -#endif -} - -void VEX_vmul(const float* A, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - __m128 a, b; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a, b) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - a = _mm_mul_ps(a, b); - _mm_store_ps(&C[l], a); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - a = _mm_mul_ps(a, b); - _mm_store_ps(&C[l+4], a); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - a = _mm_mul_ps(a, b); - _mm_store_ps(&C[l+8], a); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - a = _mm_mul_ps(a, b); - _mm_store_ps(&C[l+12], a); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - a = _mm_mul_ss(a, b); - _mm_store_ss(&pC[l], a); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] * B[idx]; - } -#endif -} - -void VEX_vdiv(const float* A, const float* B, float* C, const int N) -{ -#ifdef LUMINANCE_USE_SSE - __m128 a, b; - - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) private(a, b) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&A[l], FETCH_DISTANCE); - PREFETCH_T0(&B[l], FETCH_DISTANCE); - PREFETCH_T0(&C[l], FETCH_DISTANCE); - - a = _mm_load_ps(&A[l]); - b = _mm_load_ps(&B[l]); - a = _mm_div_ps(a, b); - _mm_store_ps(&C[l], a); - - a = _mm_load_ps(&A[l+4]); - b = _mm_load_ps(&B[l+4]); - a = _mm_div_ps(a, b); - _mm_store_ps(&C[l+4], a); - - a = _mm_load_ps(&A[l+8]); - b = _mm_load_ps(&B[l+8]); - a = _mm_div_ps(a, b); - _mm_store_ps(&C[l+8], a); - - a = _mm_load_ps(&A[l+12]); - b = _mm_load_ps(&B[l+12]); - a = _mm_div_ps(a, b); - _mm_store_ps(&C[l+12], a); - } - - const float* pA = &A[ELEMS_LOOP1]; - const float* pB = &B[ELEMS_LOOP1]; - float* pC = &C[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - a = _mm_load_ss(&pA[l]); - b = _mm_load_ss(&pB[l]); - a = _mm_div_ss(a, b); - _mm_store_ss(&pC[l], a); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx ) - { - C[idx] = A[idx] / B[idx]; - } -#endif -} - -void VEX_vcopy(const float* I, float* O, const int N) -{ -#ifdef LUMINANCE_USE_SSE - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - -#pragma omp parallel for schedule(static, 5120) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&O[l], FETCH_DISTANCE); - PREFETCH_T0(&I[l], FETCH_DISTANCE); - - _mm_store_ps(&O[l], _mm_load_ps(&I[l])); - _mm_store_ps(&O[l+4], _mm_load_ps(&I[l+4])); - _mm_store_ps(&O[l+8], _mm_load_ps(&I[l+8])); - _mm_store_ps(&O[l+12], _mm_load_ps(&I[l+12])); - } - - const float* pI = &I[ELEMS_LOOP1]; - float* pO = &O[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - _mm_store_ss(&pO[l], _mm_load_ss(&pI[l])); - } - _mm_sfence(); -#else - // plain code -#pragma omp parallel for - for(int idx = 0; idx < N; ++idx) - { - O[idx] = I[idx]; - } -#endif -} - -void VEX_vset(float* IO, const float premultiplier, const int N) -{ -#ifdef LUMINANCE_USE_SSE - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - - const __m128 val = _mm_set1_ps(premultiplier); - -#pragma omp parallel for schedule(static, 5120) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&IO[l], FETCH_DISTANCE); - - _mm_store_ps(&IO[l], val); - _mm_store_ps(&IO[l+4], val); - _mm_store_ps(&IO[l+8], val); - _mm_store_ps(&IO[l+12], val); - } - - float* pIO = &IO[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - _mm_store_ss(&pIO[l], val); - } -#else - // plain code -#pragma omp parallel for - for(int idx = 0; idx < N; ++idx) - { - IO[idx] = premultiplier; - } -#endif -} - -void VEX_vreset(float* IO, const int N) -{ -#ifdef LUMINANCE_USE_SSE - const int LOOP1 = (N >> 4); - const int ELEMS_LOOP1 = (LOOP1 << 4); - const int LOOP2 = (N - ELEMS_LOOP1); - - const __m128 zero = _mm_setzero_ps(); - -#pragma omp parallel for schedule(static, 5120) - for (int l = 0; l < ELEMS_LOOP1; l+=16) - { - PREFETCH_T0(&IO[l], FETCH_DISTANCE); - - _mm_store_ps(&IO[l], zero); - _mm_store_ps(&IO[l+4], zero); - _mm_store_ps(&IO[l+8], zero); - _mm_store_ps(&IO[l+12], zero); - } - - float* pIO = &IO[ELEMS_LOOP1]; - - for (int l = 0; l < LOOP2; l++) - { - _mm_store_ss(&pIO[l], zero); - } -#else - // plain code -#pragma omp parallel for - for (int idx = 0; idx < N; ++idx) - { - IO[idx] = 0.0f; - } -#endif -} - -void VEX_dotpr(const float* I1, const float* I2, float& val, const int N) -{ - float t_val = 0.0f; -#pragma omp parallel for reduction(+:t_val) - for (int idx = 0; idx < N; ++idx) - { - t_val += I1[idx] * I2[idx]; - } - val = t_val; -} - -#ifdef LUMINANCE_USE_SSE - -/* 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))); - - /* 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[ */ -#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); -#elif EXP_POLY_DEGREE == 4 - 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); -#elif EXP_POLY_DEGREE == 2 - expfpart = POLY2(fpart, 1.0017247f, 6.5763628e-1f, 3.3718944e-1f); -#else -#error -#endif - - 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 one = _mm_set1_ps(1.0f); - - __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 m = _mm_or_ps(_mm_castsi128_ps(_mm_and_si128(i, mant)), one); - - v4sf p; - - /* 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); -#elif LOG_POLY_DEGREE == 5 - 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); -#elif LOG_POLY_DEGREE == 3 - 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); -} - -v4sf _mm_pow_ps(v4sf x, v4sf y) -{ - return _mm_exp2_ps(_mm_log2_ps(x) * y); -} - -#endif // LUMINANCE_USE_SSE diff -Nru luminance-hdr-2.3.0/src/Libpfs/vex.h luminance-hdr-2.3.1/src/Libpfs/vex.h --- luminance-hdr-2.3.0/src/Libpfs/vex.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Libpfs/vex.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/** - * @brief SSE for high performance vector operations (Vector EXtension - VEX) - * - * This file is a part of Luminance HDR package - * ---------------------------------------------------------------------- - * 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 VEX_H -#define VEX_H - -#ifdef __SSE__ - -//#if __ppc__ || __ppc7400__ || __ppc64__ || __ppc970__ -//#include -#if __i386__ || __x86_64__ -#define LUMINANCE_USE_SSE -#include -#include -#include -//#include -//#include - -#else -#error unsupported architecture -#endif - -#endif - -// C[i] = A[i] - B[i] -void VEX_vsub(const float* A, const float* B, float* C, const int N); -// C[i] = A[i] - val * B[i] -void VEX_vsubs(const float* A, const float premultiplier, const float* B, float* C, const int N); - -// C[i] = A[i] + B[i] -void VEX_vadd(const float* A, const float* B, float* C, const int N); -// C[i] = A[i] + val * B[i] -void VEX_vadds(const float* A, const float premultiplier, const float* B, float* C, const int N); - -// C[i] = A[i] * B[i] -void VEX_vmul(const float* A, const float* B, float* C, const int N); -// O[i] = c * I[i] -void VEX_vsmul(const float* I, const float c, float* O, const int N); - -// C[i] = A[i] / B[i] -void VEX_vdiv(const float* A, const float* B, float* C, const int N); - -// O[i] = i[i] -void VEX_vcopy(const float* I, float* O, const int N); - -// IO[i] = value -void VEX_vset(float* IO, const float value, const int N); - -// IO[i] = 0.0f -void VEX_vreset(float* IO, const int N); - -void VEX_dotpr(const float* I1, const float* I2, float& val, const int N); - -//void mm_3x3(float i1, float i2, float i3, float &o1, float &o2, float &o3, const float mat[3][3]); - -#ifdef LUMINANCE_USE_SSE -typedef __v4sf v4sf; -v4sf _mm_log2_ps(v4sf); -v4sf _mm_exp2_ps(v4sf); -v4sf _mm_pow_ps(v4sf, v4sf); -#endif - -#endif diff -Nru luminance-hdr-2.3.0/src/MainCli/commandline.cpp luminance-hdr-2.3.1/src/MainCli/commandline.cpp --- luminance-hdr-2.3.0/src/MainCli/commandline.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainCli/commandline.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -39,11 +39,12 @@ #include "Core/IOWorker.h" #include "Core/TMWorker.h" -#include "TonemappingEngine/TonemapOperator.h" + +#include "Libpfs/tm/TonemapOperator.h" #if defined(_MSC_VER) - #include - #include +#include +#include #endif namespace @@ -147,6 +148,7 @@ { "tmoptions", required_argument, NULL, 'p' }, { "output", required_argument, NULL, 'o' }, { "quality", required_argument, NULL, 'q' }, + { "savealigned", required_argument, NULL, 'd' }, { NULL, 0, NULL, 0 } }; @@ -157,7 +159,8 @@ alignMode(NO_ALIGN), tmopts(TMOptionsOperations::getDefaultTMOptions()), verbose(false), - quality(100) + quality(100), + saveAlignedImagesPrefix("") { hdrcreationconfig.weights = TRIANGULAR; hdrcreationconfig.response_curve = LINEAR; @@ -177,7 +180,7 @@ // cliOptions += cmdLineOptions[i].val; // } - while( (c = getopt_long_only (argc, argv, ":hva:e:c:l:s:g:r:t:p:o:u:q:", cmdLineOptions, &optionIndex)) != -1 ) + while( (c = getopt_long_only (argc, argv, ":hva:e:c:l:s:g:r:t:p:o:u:q:d:", cmdLineOptions, &optionIndex)) != -1 ) { switch ( c ) { @@ -411,6 +414,9 @@ if (quality < 0 || quality > 100) printErrorAndExit(tr("Error: Quality must be in the range [0-100].")); break; + case 'd': + saveAlignedImagesPrefix = QString(optarg); + break; case '?': printErrorAndExit(tr("Error: Unknown option %1.").arg(optopt)); case ':': @@ -532,9 +538,17 @@ { if (errorcode != 0) printIfVerbose( tr("Failed aligning images.") , verbose); - hdrCreationManager->removeTempFiles(); printIfVerbose( tr("Creating (in memory) the HDR.") , verbose); + + if (errorcode == 0 && alignMode != NO_ALIGN && saveAlignedImagesPrefix != "") { + if (hdrCreationManager->inputImageType() == HdrCreationManager::LDR_INPUT_TYPE) + hdrCreationManager->saveLDRs(saveAlignedImagesPrefix); + else + hdrCreationManager->saveMDRs(saveAlignedImagesPrefix); + } + + hdrCreationManager->removeTempFiles(); HDR.reset( hdrCreationManager->createHdr(false,1) ); saveHDR(); @@ -587,8 +601,18 @@ // The scoped pointer will free the memory automatically later on QScopedPointer tm_frame( tm_worker.computeTonemap(HDR.data(), tmopts.data()) ); + QString inputfname; // to copy EXIF tags from 1st input image to saved LDR + if (inputFiles.isEmpty()) + inputfname = ""; + else + inputfname = inputFiles.first(); + // Create an ad-hoc IOWorker to save the file - if ( IOWorker().write_ldr_frame(tm_frame.data(), saveLdrFilename, quality, tmopts.data()) ) + if ( IOWorker().write_ldr_frame(tm_frame.data(), saveLdrFilename, + inputfname, + hdrCreationManager->getExpotimes(), + tmopts.data(), + pfs::Params("quality", (size_t)quality) ) ) { // File save successful printIfVerbose( tr("Image %1 saved successfully").arg(saveLdrFilename) , verbose); @@ -617,21 +641,22 @@ QString help= tr("Usage: %1 [OPTIONS]... [INPUTFILES]...").arg(progname) + "\n" + "\t" + tr("Commandline interface to %1.").arg(progname) + "\n\n" + - "\t" + tr("-h --help Display this help.") + "\n" + - "\t" + tr("-v --verbose Print more messages during execution.") + "\n" + - "\t" + tr("-a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment).") + "\n" + - "\t" + tr("-e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES).") + "\n" + - "\t" + tr("-c --config HDR creation config. Possible values: ") + "\n" + + "\t" + tr("-h --help Display this help.") + "\n" + + "\t" + tr("-v --verbose Print more messages during execution.") + "\n" + + "\t" + tr("-a --align AIS|MTB Align Engine to use during HDR creation (default: no alignment).") + "\n" + + "\t" + tr("-d --savealigned prefix Save aligned images to files which names start with prefix") + "\n" + + "\t" + tr("-e --ev EV1,EV2,... Specify numerical EV values (as many as INPUTFILES).") + "\n" + + "\t" + tr("-c --config HDR creation config. Possible values: ") + "\n" + "\t\t" + tr("weight=triangular|gaussian|plateau:response_curve=from_file|linear|gamma|log|robertson:model=robertson|debevec:curve_filename=your_file_here.m") + "\n" + "\t\t" + tr("(Default is weight=triangular:response_curve=linear:model=debevec) ") + "\n" + - "\t" + tr("-l --load HDR_FILE Load an HDR instead of creating a new one. ") + "\n" + - "\t" + tr("-s --save HDR_FILE Save to a HDR file format. (default: don't save) ") + "\n" + - "\t" + tr("-g --gamma VALUE Gamma value to use during tone mapping. (default: 1) ") + "\n" + - "\t" + tr("-r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) ") + "\n" + - "\t" + tr("-t --tmo Tone mapping operator. Legal values are: ") + "\n" + + "\t" + tr("-l --load HDR_FILE Load an HDR instead of creating a new one. ") + "\n" + + "\t" + tr("-s --save HDR_FILE Save to a HDR file format. (default: don't save) ") + "\n" + + "\t" + tr("-g --gamma VALUE Gamma value to use during tone mapping. (default: 1) ") + "\n" + + "\t" + tr("-r --resize VALUE Width you want to resize your HDR to (resized before gamma and tone mapping) ") + "\n" + + "\t" + tr("-t --tmo Tone mapping operator. Legal values are: ") + "\n" + "\t\t" + tr("ashikhmin|drago|durand|fattal|pattanaik|reinhard02|reinhard05|mantiuk06|mantiuk08") + "\n" + "\t\t" + tr("(Default is mantiuk06)") + "\n" + - "\t" + tr("-p --tmoptions Tone mapping operator options. Legal values are: ") + "\n" + + "\t" + tr("-p --tmoptions Tone mapping operator options. Legal values are: ") + "\n" + "\t\t" + tr("alpha=VALUE:beta=VALUE:color=VALUE:noise=VALUE:new=true|false (for fattal)") + "\n" + "\t\t" + tr("contrast=VALUE:saturation=VALUE:detail=VALUE:equalization=true|false (for mantiuk06)") + "\n" + "\t\t" + tr("colorsaturation=VALUE:contrastenhancement=VALUE:luminancelevel=VALUE:setluminance=true|false (for mantiuk08)") + "\n" + @@ -642,9 +667,9 @@ "\t\t" + tr("scales=true|false:key=VALUE:phi=VALUE:num=VALUE:low=VALUE:high=VALUE (for reinhard02)") + "\n" + "\t\t" + tr("brightness=VALUE:chroma=VALUE:lightness=VALUE (for reinhard05)") + "\n" + "\t\t" + tr("(default is contrast=0.3:equalization=false:saturation=1.8, see also -o)") + "\n" + - "\t" + tr("-o --output LDR_FILE File name you want to save your tone mapped LDR to.") + "\n" + - "\t" + tr("-q --quality VALUE Quality of the saved tone mapped file (0-100).") + "\n" + - "\t" + tr(" (No tonemapping is performed unless -o is specified).") + "\n\n" + + "\t" + tr("-o --output LDR_FILE File name you want to save your tone mapped LDR to.") + "\n" + + "\t" + tr("-q --quality VALUE Quality of the saved tone mapped file (0-100).") + "\n" + + "\t" + tr(" (No tonemapping is performed unless -o is specified).") + "\n\n" + tr("You must either load an existing HDR file (via the -l option) or specify INPUTFILES to create a new HDR.\n"); printErrorAndExit(help); } diff -Nru luminance-hdr-2.3.0/src/MainCli/commandline.h luminance-hdr-2.3.1/src/MainCli/commandline.h --- luminance-hdr-2.3.0/src/MainCli/commandline.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainCli/commandline.h 2013-04-07 18:41:14.000000000 +0000 @@ -82,6 +82,7 @@ int maximum; bool started; int quality; + QString saveAlignedImagesPrefix; void startTonemap(); diff -Nru luminance-hdr-2.3.0/src/MainCli/main.cpp luminance-hdr-2.3.1/src/MainCli/main.cpp --- luminance-hdr-2.3.0/src/MainCli/main.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainCli/main.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -23,13 +23,18 @@ #include +#include "Common/LuminanceOptions.h" +#include "Common/TranslatorManager.h" + #include "MainCli/commandline.h" -#include "Common/global.h" + int main( int argc, char ** argv ) { QCoreApplication application( argc, argv ); - installTranslators(false); + LuminanceOptions lumOpts; + + TranslatorManager::setLanguage( lumOpts.getGuiLang(), false ); CommandLineInterfaceManager cli( argc, argv ); diff -Nru luminance-hdr-2.3.0/src/MainGui/main.cpp luminance-hdr-2.3.1/src/MainGui/main.cpp --- luminance-hdr-2.3.0/src/MainGui/main.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainGui/main.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -2,6 +2,7 @@ * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2006,2007 Giuseppe Rota + * 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 @@ -19,6 +20,7 @@ * ---------------------------------------------------------------------- * * @author Giuseppe Rota + * @author Davide Anastasia */ #include @@ -29,35 +31,33 @@ #include #include "Common/global.h" +#include "Common/config.h" +#include "Common/TranslatorManager.h" #include "MainWindow/MainWindow.h" -#ifdef WIN32 -#include -#include -#endif - namespace { QStringList getCliFiles(const QStringList& arguments) { - QStringList return_value; // empty QStringList; + // 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 - for (int i = 1; i < arguments.size(); ++i) - { + for (int i = 1; i < arguments.size(); ++i) { QFile file( arguments.at(i).toLocal8Bit() ); - if ( file.exists() ) return_value.push_back( arguments.at(i).toLocal8Bit() ); + if ( file.exists() ) { + fileList.push_back( arguments.at(i).toLocal8Bit() ); + } } - return return_value; + return fileList; } } - #ifdef WIN32 -inline void customMessageHandler(QtMsgType type, const char *msg) +void customMessageHandler(QtMsgType type, const char *msg) { QString txt; switch (type) { @@ -76,9 +76,11 @@ } QFile outFile("debuglog.txt"); - outFile.open(QIODevice::WriteOnly | QIODevice::Append); - QTextStream ts(&outFile); - ts << txt << endl; + if (outFile.open(QIODevice::WriteOnly | QIODevice::Append)) + { + QTextStream ts(&outFile); + ts << txt << endl; + } } #endif @@ -88,31 +90,29 @@ QApplication application( argc, argv ); #ifdef WIN32 - //qInstallMsgHandler(customMessageHandler); + // qInstallMsgHandler(customMessageHandler); +#endif - bool found_DLL = false; - foreach (QString path, application.libraryPaths()) - { - if ( QFile::exists(path+"/imageformats/qjpeg4.dll") ) - { - found_DLL = true; - } - } - if (!found_DLL) + QCoreApplication::setApplicationName(LUMINANCEAPPLICATION); + QCoreApplication::setOrganizationName(LUMINANCEORGANIZATION); + + LuminanceOptions::isCurrentPortableMode = + QDir(QApplication::applicationDirPath()).exists("PortableMode.txt"); + + if (LuminanceOptions::isCurrentPortableMode) { - QMessageBox::critical(NULL, - QObject::tr("Aborting..."), - QObject::tr("Cannot find Qt's JPEG Plugin...
    Please unzip the DLL package with the option \"use folder names\" activated.")); - return 1; + QSettings::setDefaultFormat(QSettings::IniFormat); + QSettings::setPath(QSettings::IniFormat, + QSettings::UserScope, QDir::currentPath()); } -#endif - installTranslators(true); - MainWindow* MW = new MainWindow; + LuminanceOptions::conditionallyDoUpgrade(); + TranslatorManager::setLanguage( LuminanceOptions().getGuiLang() ); - MW->setInputFiles( getCliFiles( application.arguments() ) ); + MainWindow* mainWindow = new MainWindow; - MW->show(); + mainWindow->show(); + mainWindow->openFiles( getCliFiles( application.arguments() ) ); return application.exec(); } diff -Nru luminance-hdr-2.3.0/src/MainWindow/CMakeLists.txt luminance-hdr-2.3.1/src/MainWindow/CMakeLists.txt --- luminance-hdr-2.3.0/src/MainWindow/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -4,10 +4,14 @@ ${CMAKE_CURRENT_SOURCE_DIR}/Splash.ui) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h -${CMAKE_CURRENT_SOURCE_DIR}/DnDOption.h) +${CMAKE_CURRENT_SOURCE_DIR}/DnDOption.h +${CMAKE_CURRENT_SOURCE_DIR}/UpdateChecker.h +) SET(FILES_CPP ${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.cpp -${CMAKE_CURRENT_SOURCE_DIR}/DnDOption.cpp) +${CMAKE_CURRENT_SOURCE_DIR}/DnDOption.cpp +${CMAKE_CURRENT_SOURCE_DIR}/UpdateChecker.cpp +) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff -Nru luminance-hdr-2.3.0/src/MainWindow/MainWindow.cpp luminance-hdr-2.3.1/src/MainWindow/MainWindow.cpp --- luminance-hdr-2.3.0/src/MainWindow/MainWindow.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/MainWindow.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,8 +1,8 @@ /** * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 Davide Anastasia + * Copyright (C) 2006-2007 Giuseppe Rota + * Copyright (C) 2011-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 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -49,27 +50,34 @@ #include "MainWindow/MainWindow.h" #include "MainWindow/DnDOption.h" +#include "MainWindow/UpdateChecker.h" #include "ui_Splash.h" #include "ui_MainWindow.h" + +#include "Libpfs/frame.h" +#include "Libpfs/params.h" +#include "Libpfs/manip/cut.h" +#include "Libpfs/manip/rotate.h" +#include "Libpfs/manip/gamma_levels.h" + #include "Common/archs.h" #include "Common/config.h" #include "Common/global.h" #include "OsIntegration/osintegration.h" -#include "TonemappingPanel/TonemappingWarnDialog.h" #include "BatchHDR/BatchHDRDialog.h" #include "BatchTM/BatchTMDialog.h" #include "Fileformat/pfs_file_format.h" -#include "Filter/pfscut.h" -#include "Filter/pfsrotate.h" -#include "Filter/pfsgammaandlevels.h" + #include "TransplantExif/TransplantExifDialog.h" #include "Viewers/HdrViewer.h" #include "Viewers/LuminanceRangeWidget.h" #include "Viewers/LdrViewer.h" #include "UI/ImageQualityDialog.h" -#include "Libpfs/frame.h" +#include "UI/TiffModeDialog.h" #include "UI/UMessageBox.h" +#include "UI/GammaAndLevels.h" + #include "PreviewPanel/PreviewPanel.h" #include "HelpBrowser/helpbrowser.h" #include "TonemappingPanel/TMOProgressIndicator.h" @@ -81,20 +89,18 @@ #include "Core/IOWorker.h" #include "Core/TMWorker.h" #include "TonemappingPanel/TMOProgressIndicator.h" -#include "UI/GammaAndLevels.h" namespace { QString getLdrFileNameFromSaveDialog(const QString& suggested_file_name, 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 += "PNG (*.png *.PNG);;"; filetypes += "PPM PBM (*.ppm *.pbm *.PPM *.PBM);;"; filetypes += "BMP (*.bmp *.BMP);;"; - filetypes += "16 bits TIFF (*.tif *.tiff *.TIF *.TIFF)"; + filetypes += "TIFF (*.tif *.tiff *.TIF *.TIFF)"; return QFileDialog::getSaveFileName(parent, QObject::tr("Save the LDR image as..."), @@ -113,15 +119,13 @@ return QFileDialog::getSaveFileName(parent, QObject::tr("Save the HDR image as..."), - LuminanceOptions().getDefaultPathHdrInOut() + "/" + suggested_file_name, + LuminanceOptions().getDefaultPathHdrOut() + "/" + suggested_file_name, filetypes); } void getCropCoords(GenericViewer* gv, int& x_ul, int& y_ul, int& x_br, int& y_br) { -#ifdef QT_DEBUG assert( gv != NULL ); -#endif QRect cropRect = gv->getSelectionRect().normalized(); cropRect.getCoords(&x_ul, &y_ul, &x_br, &y_br); @@ -139,10 +143,12 @@ return g_v->getViewerMode(); } } - } +// static members! int MainWindow::sm_NumMainWindows = 0; +QScopedPointer MainWindow::sm_updateChecker; + MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), @@ -151,13 +157,15 @@ init(); } -MainWindow::MainWindow(pfs::Frame* curr_frame, QString new_file, bool needSaving, QWidget *parent): +MainWindow::MainWindow(pfs::Frame* curr_frame, const QString& new_file, + const QStringList& inputFileNames, + bool needSaving, QWidget *parent): QMainWindow(parent), m_Ui(new Ui::MainWindow) { init(); - emit load_success(curr_frame, new_file, needSaving); + emit load_success(curr_frame, new_file, inputFileNames, needSaving); } MainWindow::~MainWindow() @@ -171,30 +179,36 @@ 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("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()); - //wait for the working thread to finish + // wait for the working thread to finish m_IOThread->wait(500); m_TMThread->wait(500); + + sm_updateChecker.reset(); } clearRecentFileActions(); + delete luminance_options; } void MainWindow::init() { - OsIntegration::getInstance().init(this); + luminance_options = new LuminanceOptions(); sm_NumMainWindows++; helpBrowser = NULL; num_ldr_generated = 0; curr_num_ldr_open = 0; + splash = 0; - if ( sm_NumMainWindows == 1) + if ( sm_NumMainWindows == 1 ) { // Register symbols on the first activation! qRegisterMetaType("QImage"); @@ -204,6 +218,8 @@ qRegisterMetaType("HdrViewer*"); qRegisterMetaType("LdrViewer*"); qRegisterMetaType("GenericViewer*"); + qRegisterMetaType >("QVector"); + qRegisterMetaType("pfs::Params"); QDir dir(QDir::homePath()); @@ -226,16 +242,15 @@ setupTM(); createConnections(); - if ( sm_NumMainWindows == 1 ) - { - // SPLASH SCREEN ---------------------------------------------------------------------- - if (luminance_options.value("ShowSplashScreen", true).toBool()) - { - showSplash(); - //UMessageBox::donationSplashMB(); - } - // END SPLASH SCREEN ------------------------------------------------------------------ + if ( sm_NumMainWindows == 1 ) { + // SPLASH SCREEN --------------------------------------------------- + showSplash(); + // UMessageBox::donationSplashMB(); + // END SPLASH SCREEN ----------------------------------------------- + sm_updateChecker.reset(new UpdateChecker(this)); } + + OsIntegration::getInstance().init(this); } void MainWindow::createUI() @@ -243,22 +258,31 @@ m_Ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); - restoreState(luminance_options.value("MainWindowState").toByteArray()); - restoreGeometry(luminance_options.value("MainWindowGeometry").toByteArray()); + restoreState(luminance_options->value("MainWindowState").toByteArray()); + restoreGeometry(luminance_options->value("MainWindowGeometry").toByteArray()); setAcceptDrops(true); setWindowModified(false); - setWindowTitle(QString("Luminance HDR "LUMINANCEVERSION)); // + " " + g_GIT_SHA1); + setWindowTitle(QString("Luminance HDR " LUMINANCEVERSION)); // + " " + g_GIT_SHA1); } void MainWindow::createCentralWidget() { // Central Widget Area m_centralwidget_splitter = new QSplitter; //(this); + m_bottom_splitter = new QSplitter; //(this); + m_bottom_splitter->setOrientation(Qt::Vertical); + setCentralWidget(m_centralwidget_splitter); + m_PreviewPanel = new PreviewPanel(); + // create tonemapping panel - tmPanel = new TonemappingPanel; //(m_centralwidget_splitter); + tmPanel = new TonemappingPanel(m_PreviewPanel); //(m_centralwidget_splitter); + + connect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), tmPanel, SLOT(setRealtimePreviews(bool))); + connect(m_Ui->actionRealtimePreviews, SIGNAL(toggled(bool)), luminance_options, SLOT(setRealtimePreviewsActive(bool))); + tmPanel->setRealtimePreviews(luminance_options->isRealtimePreviewsActive()); m_tabwidget = new QTabWidget; //(m_centralwidget_splitter); @@ -266,29 +290,40 @@ m_tabwidget->setTabsClosable(true); m_centralwidget_splitter->addWidget(tmPanel); - m_centralwidget_splitter->addWidget(m_tabwidget); + m_centralwidget_splitter->addWidget(m_bottom_splitter); + m_bottom_splitter->addWidget(m_tabwidget); + + m_bottom_splitter->setStretchFactor(0, 10); + m_bottom_splitter->setStretchFactor(1, 1); m_centralwidget_splitter->setStretchFactor(0, 1); m_centralwidget_splitter->setStretchFactor(1, 5); // create preview panel - previewPanel = new PreviewPanel(m_centralwidget_splitter); + m_PreviewscrollArea = new QScrollArea; + m_PreviewscrollArea->setWidgetResizable(true); + m_PreviewscrollArea->setWidget(m_PreviewPanel); - // add panel to central widget - m_centralwidget_splitter->addWidget(previewPanel); - m_centralwidget_splitter->setStretchFactor(2, 0); + m_centralwidget_splitter->addWidget(m_PreviewscrollArea); - previewPanel->hide(); + if (luminance_options->getPreviewPanelMode()) { + showPreviewsOnTheBottom(); + } + 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(tmPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); connect(this, SIGNAL(updatedHDR(pfs::Frame*)), tmPanel, SLOT(updatedHDR(pfs::Frame*))); - connect(this, SIGNAL(destroyed()), previewPanel, SLOT(deleteLater())); + 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_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()); QPalette pal = m_tabwidget->palette(); pal.setColor(QPalette::Dark, Qt::darkGray); @@ -301,11 +336,13 @@ QTabBar* tabBar = m_tabwidget->findChild(QLatin1String("qt_tabwidget_tabbar")); tabBar->setAutoFillBackground( true ); tabBar->setBackgroundRole(QPalette::Window); + + m_PreviewscrollArea->hide(); } void MainWindow::createToolBar() { - //main toolbars setup + // main toolbars setup QActionGroup *toolBarOptsGroup = new QActionGroup(this); toolBarOptsGroup->addAction(m_Ui->actionText_Under_Icons); toolBarOptsGroup->addAction(m_Ui->actionIcons_Only); @@ -317,13 +354,19 @@ 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())); + + // 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())); } void MainWindow::createMenus() { // About(s) connect(m_Ui->actionAbout_Qt,SIGNAL(triggered()),qApp,SLOT(aboutQt())); - connect(m_Ui->actionWhat_s_This,SIGNAL(triggered()),this,SLOT(enterWhatsThis())); // I/O @@ -339,7 +382,7 @@ 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->actionShowPreviewPanel, SIGNAL(toggled(bool)), luminance_options, SLOT(setPreviewPanelActive(bool))); //recent files initRecentFileActions(); @@ -362,7 +405,7 @@ //load from settings the path where hdrs have been previously opened/loaded //load from settings the main toolbar visualization mode - switch ( luminance_options.getMainWindowToolBarMode() ) { + switch ( luminance_options->getMainWindowToolBarMode() ) { case Qt::ToolButtonIconOnly: Icons_Only(); m_Ui->actionIcons_Only->setChecked(true); @@ -380,8 +423,12 @@ m_Ui->actionText_Under_Icons->setChecked(true); break; } - m_Ui->actionShowPreviewPanel->setChecked(luminance_options.isPreviewPanelActive()); + m_Ui->actionShowPreviewPanel->setChecked(luminance_options->isPreviewPanelActive()); + m_Ui->actionRealtimePreviews->setChecked(luminance_options->isRealtimePreviewsActive()); + bool isPreviewPanelRight = luminance_options->getPreviewPanelMode() == 0; + m_Ui->actionShow_on_the_bottom->setChecked(!isPreviewPanelRight); + m_Ui->actionShow_on_the_right->setChecked(isPreviewPanelRight); } void MainWindow::on_actionDonate_triggered() @@ -394,12 +441,12 @@ createNewHdr(QStringList()); // redirect on createNewHdr-method to avoid moc warning } -void MainWindow::createNewHdr(QStringList files) +void MainWindow::createNewHdr(const QStringList& files) { - QScopedPointer wizard( new HdrWizard (this, files) ); + QScopedPointer wizard( new HdrWizard(this, files, m_inputFilesName, m_inputExpoTimes) ); if (wizard->exec() == QDialog::Accepted) { - emit load_success(wizard->getPfsFrameHDR(), wizard->getCaptionTEXT(), true); + emit load_success(wizard->getPfsFrameHDR(), wizard->getCaptionTEXT(), wizard->getInputFilesNames(), true); } } @@ -417,23 +464,22 @@ QStringList files = QFileDialog::getOpenFileNames(this, tr("Load one or more HDR images..."), - luminance_options.getDefaultPathHdrInOut(), + luminance_options->getDefaultPathHdrIn(), filetypes ); - if ( !files.isEmpty() ) - { - // Update working folder - // All the files are in the same folder, so I pick the first as reference to update the settings - QFileInfo qfi(files.first()); + if ( files.isEmpty() ) return; - luminance_options.setDefaultPathHdrInOut( qfi.path() ); + // Update working folder + // All the files are in the same folder, so I pick the first as reference to update the settings + QFileInfo qfi(files.first()); - foreach(QString filename, files) - { - //emit open_hdr_frame(filename); - QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", Qt::QueuedConnection, - Q_ARG(QString, filename)); - } + luminance_options->setDefaultPathHdrIn( qfi.path() ); + + foreach (const QString& filename, files) + { + // emit open_hdr_frame(filename); + QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", Qt::QueuedConnection, + Q_ARG(QString, filename)); } } @@ -441,13 +487,15 @@ { if (m_tabwidget->count() <= 0) return; - QString dir = QFileDialog::getExistingDirectory(this, - tr("Save files in"), - luminance_options.getDefaultPathLdrOut()); + QString dir = QFileDialog::getExistingDirectory( + this, + tr("Save files in"), + luminance_options->getDefaultPathLdrOut() + ); if (!dir.isEmpty()) { - luminance_options.setDefaultPathLdrOut(dir); + luminance_options->setDefaultPathLdrOut(dir); for (int i = 0; i < m_tabwidget->count(); i++) { @@ -459,11 +507,16 @@ LdrViewer *l_v = dynamic_cast(g_v); QString ldr_name = QFileInfo(getCurrentHDRName()).baseName(); - QString outfname = luminance_options.getDefaultPathLdrOut() + "/" + ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg"; + QString outfname = luminance_options->getDefaultPathLdrOut() + + "/" + ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg"; - //emit save_ldr_frame(l_v, outfname, 100); QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, - Q_ARG(GenericViewer*, l_v), Q_ARG(QString, outfname), Q_ARG(int, 100)); + 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))); } } } @@ -474,78 +527,90 @@ if (m_tabwidget->count() <= 0) return; GenericViewer* g_v = (GenericViewer*)m_tabwidget->currentWidget(); - if ( g_v->isHDR() ) - { - /* - * In this case I'm saving an HDR - */ + if ( g_v->isHDR() ) { + // In this case I'm saving an HDR QString fname = getHdrFileNameFromSaveDialog(g_v->getFileName(), this); - if ( !fname.isEmpty() ) + if ( fname.isEmpty() ) return; + + QFileInfo qfi(fname); + QString format = qfi.suffix(); + + // Update working folder + luminance_options->setDefaultPathHdrOut( qfi.path() ); + + pfs::Params p; + if ( format == "tif" || format == "tiff" ) { - // Update working folder - luminance_options.setDefaultPathHdrInOut( QFileInfo(fname).path() ); + TiffModeDialog t(true, this); + if ( t.exec() == QDialog::Rejected ) return; - //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)); + 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 - { - /* - * In this case I'm saving an LDR - */ + else { + // In this case I'm saving an LDR + LdrViewer* l_v = dynamic_cast(g_v); if ( l_v == NULL ) return; QString ldr_name = QFileInfo(getCurrentHDRName()).baseName(); - QString outfname = getLdrFileNameFromSaveDialog(ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg", this); + QString outputFilename = getLdrFileNameFromSaveDialog(ldr_name + "_" + l_v->getFileNamePostFix() + ".jpg", this); - if ( !outfname.isEmpty() ) - { - QFileInfo qfi(outfname); - QString format = qfi.suffix(); + if ( outputFilename.isEmpty() ) return; - luminance_options.setDefaultPathLdrOut( qfi.path() ); + QFileInfo qfi(outputFilename); + QString format = qfi.suffix(); - if ( format.isEmpty() ) - { - // default as JPG - format = "jpg"; - outfname += ".jpg"; - } + luminance_options->setDefaultPathLdrOut( qfi.path() ); - int quality = 100; // default value is 100% - if ( format == "png" || format == "jpg" ) - { - // How costly is this function? I doesn't seem to be much - QImage image = l_v->getQImage(); + if ( format.isEmpty() ) { // default as JPG + format = "jpg"; + outputFilename += ".jpg"; + } - ImageQualityDialog savedFileQuality(&image, format, this); - QString winTitle(QObject::tr("Save as...")); - winTitle += format.toUpper(); - savedFileQuality.setWindowTitle( winTitle ); - if ( savedFileQuality.exec() == QDialog::Rejected ) - return; - else - quality = savedFileQuality.getQuality(); - } - // CALL m_IOWorker->write_ldr_frame(l_v, outfname, quality); - QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, - Q_ARG(GenericViewer*, l_v), - Q_ARG(QString, outfname), - Q_ARG(int, quality), - Q_ARG(TonemappingOptions*, l_v->getTonemappingOptions())); + pfs::Params p; + if ( format == "png" || format == "jpg" ) + { + ImageQualityDialog savedFileQuality(l_v->getFrame(), format, 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" ) + { + TiffModeDialog t(false, this); + 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)); + } } -void MainWindow::save_hdr_success(GenericViewer* saved_hdr, QString fname) +void MainWindow::save_hdr_success(GenericViewer* saved_hdr, const QString& fname) { QFileInfo qfi(fname); @@ -562,7 +627,7 @@ // TODO pass the name of the file, so the user know which file didn't save correctly } -void MainWindow::save_ldr_success(GenericViewer* saved_ldr, QString fname) +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()); @@ -594,7 +659,10 @@ QMetaObject::invokeMethod(m_IOWorker, "write_ldr_frame", Qt::QueuedConnection, Q_ARG(GenericViewer*, g_v), Q_ARG(QString, outfname), - Q_ARG(int, 100)); + Q_ARG(QString, QString()), + Q_ARG(QVector, QVector()), + Q_ARG(TonemappingOptions*, NULL), + Q_ARG(pfs::Params, pfs::Params("quality", 100u)) ); } catch (...) { @@ -661,7 +729,7 @@ m_Ui->rotatecw->setEnabled(false); QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); - pfs::Frame *rotated = pfs::rotateFrame(curr_g_v->getFrame(), clockwise); + pfs::Frame *rotated = pfs::rotate(curr_g_v->getFrame(), clockwise); curr_g_v->setFrame(rotated); if ( !curr_g_v->needsSaving() ) @@ -934,30 +1002,32 @@ void MainWindow::ioEnd() { //statusBar()->removeWidget(m_ProgressBar); - m_ProgressBar->hide(); m_ProgressBar->reset(); + m_ProgressBar->hide(); QApplication::restoreOverrideCursor(); - statusBar()->showMessage(tr("Done!"), 10000); + statusBar()->showMessage(tr("Done!"), 800); } -void MainWindow::load_failed(QString error_message) +void MainWindow::load_failed(const QString& errorMessage) { + m_ProgressBar->reset(); + m_ProgressBar->hide(); + QApplication::restoreOverrideCursor(); // TODO: use unified style? - QMessageBox::critical(this, tr("Aborting..."), error_message, QMessageBox::Ok, QMessageBox::NoButton); - - m_ProgressBar->hide(); - m_ProgressBar->reset(); + QMessageBox::critical(this, tr("Aborting..."), errorMessage, + QMessageBox::Ok, QMessageBox::NoButton); } -void MainWindow::load_success(pfs::Frame* new_hdr_frame, QString new_fname, bool 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, needSaving); + MainWindow *other = new MainWindow(new_hdr_frame, new_fname, inputFileNames, needSaving); other->move(x() + 40, y() + 40); other->show(); } @@ -967,58 +1037,69 @@ qDebug() << "Filename: " << new_fname; #endif - HdrViewer* newhdr = new HdrViewer(new_hdr_frame, this, needSaving, luminance_options.getViewerNegColor(), luminance_options.getViewerNanInfColor()); + HdrViewer* newhdr = new HdrViewer(new_hdr_frame, this, needSaving, + luminance_options->getViewerNegColor(), + luminance_options->getViewerNanInfColor()); 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(selectionReady(bool)), + this, SLOT(enableCrop(bool))); + connect(newhdr, SIGNAL(changed(GenericViewer*)), + this, SLOT(syncViewers(GenericViewer*))); + connect(newhdr, SIGNAL(changed(GenericViewer*)), + this, SLOT(updateMagnificationButtons(GenericViewer*))); newhdr->setViewerMode( getCurrentViewerMode(*m_tabwidget) ); QFileInfo qfileinfo(new_fname); 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...) + // it doesn't exist on the file system, so I have just got back a + // file from some creational operation (new hdr, crop...) + newhdr->setFileName(QString("untitled")); - m_tabwidget->addTab(newhdr, new_fname.prepend("(*) ")); + m_tabwidget->addTab(newhdr, QString(new_fname).prepend("(*) ")); setMainWindowModified(true); } else { - // the new file exists on the file system, so I can use this value to set captions and so on + // the new file exists on the file system, so I can use this value + // to set captions and so on newhdr->setFileName(new_fname); m_tabwidget->addTab(newhdr, qfileinfo.fileName()); setCurrentFile(new_fname); } + m_inputFilesName = inputFileNames; + tm_status.is_hdr_ready = true; tm_status.curr_tm_frame = newhdr; m_tabwidget->setCurrentWidget(newhdr); tmPanel->setEnabled(true); + tmPanel->updatedHDR(new_hdr_frame); m_Ui->actionShowPreviewPanel->setEnabled(true); showPreviewPanel(m_Ui->actionShowPreviewPanel->isChecked()); - emit updatedHDR(newhdr->getFrame()); // signal: I have a new HDR open + // signal: I have a new HDR open + emit updatedHDR(newhdr->getFrame()); } } void MainWindow::on_OptionsAction_triggered() { - unsigned int negcol = luminance_options.getViewerNegColor(); - unsigned int naninfcol = luminance_options.getViewerNanInfColor(); + unsigned int negcol = luminance_options->getViewerNegColor(); + unsigned int naninfcol = luminance_options->getViewerNanInfColor(); PreferencesDialog *opts = new PreferencesDialog(this); opts->setAttribute(Qt::WA_DeleteOnClose); if ( opts->exec() == QDialog::Accepted ) { - if (negcol != luminance_options.getViewerNegColor() || naninfcol != luminance_options.getViewerNanInfColor()) + if (negcol != luminance_options->getViewerNegColor() || naninfcol != luminance_options->getViewerNanInfColor()) { for (int idx = 0; idx < m_tabwidget->count(); idx++) { @@ -1026,11 +1107,11 @@ HdrViewer* hdr_v = dynamic_cast(viewer); if ( hdr_v != NULL ) { - hdr_v->update_colors(luminance_options.getViewerNegColor(), luminance_options.getViewerNanInfColor()); + hdr_v->update_colors(luminance_options->getViewerNegColor(), luminance_options->getViewerNanInfColor()); } } } - m_Ui->actionShowPreviewPanel->setChecked(luminance_options.isPreviewPanelActive()); + m_Ui->actionShowPreviewPanel->setChecked(luminance_options->isPreviewPanelActive()); } } @@ -1055,23 +1136,30 @@ event->acceptProposedAction(); } +void MainWindow::openFile(const QString& filename) +{ + QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", + Qt::QueuedConnection, + Q_ARG(QString, filename)); +} + void MainWindow::openFiles(const QStringList& files) { if (files.size() > 0) { - switch (DnDOptionDialog::showDndDialog(this, files)) { + switch (DnDOptionDialog::showDndDialog(this, files)) + { case DnDOptionDialog::ACTION_NEW_HDR: - createNewHdr(files); - break; + { + createNewHdr(files); + } break; case DnDOptionDialog::ACTION_OPEN_HDR: - foreach (QString filename, files) + { + foreach (const QString& filename, files) { - //qDebug() << filename; - //emit open_hdr_frame(filename); - QMetaObject::invokeMethod(m_IOWorker, "read_hdr_frame", Qt::QueuedConnection, - Q_ARG(QString, filename)); + openFile(filename); } - break; + } break; } } } @@ -1079,39 +1167,42 @@ void MainWindow::Text_Under_Icons() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - luminance_options.setMainWindowToolBarMode(Qt::ToolButtonTextUnderIcon); + luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextUnderIcon); } void MainWindow::Icons_Only() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); - luminance_options.setMainWindowToolBarMode(Qt::ToolButtonIconOnly); + luminance_options->setMainWindowToolBarMode(Qt::ToolButtonIconOnly); } void MainWindow::Text_Alongside_Icons() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - luminance_options.setMainWindowToolBarMode(Qt::ToolButtonTextBesideIcon); + luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextBesideIcon); } void MainWindow::Text_Only() { m_Ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextOnly); - luminance_options.setMainWindowToolBarMode(Qt::ToolButtonTextOnly); + luminance_options->setMainWindowToolBarMode(Qt::ToolButtonTextOnly); } void MainWindow::showSplash() { - // TODO: change implementation with a static member of UMessageBox - splash = new QDialog(this); - splash->setAttribute(Qt::WA_DeleteOnClose); - Ui::SplashLuminance ui; - ui.setupUi(splash); - connect(ui.yesButton, SIGNAL(clicked()), this, SLOT(splashShowDonationsPage())); - connect(ui.noButton, SIGNAL(clicked()), this, SLOT(splashClose())); - connect(ui.askMeLaterButton, SIGNAL(clicked()), splash, SLOT(close())); + if (luminance_options->value("ShowSplashScreen", true).toBool()) + { + // TODO: change implementation with a static member of UMessageBox + splash = new QDialog(this); + splash->setAttribute(Qt::WA_DeleteOnClose); + Ui::SplashLuminance ui; + ui.setupUi(splash); + connect(ui.yesButton, SIGNAL(clicked()), this, SLOT(splashShowDonationsPage())); + connect(ui.noButton, SIGNAL(clicked()), this, SLOT(splashClose())); + connect(ui.askMeLaterButton, SIGNAL(clicked()), splash, SLOT(close())); - splash->show(); + splash->show(); + } } void MainWindow::splashShowDonationsPage() @@ -1122,10 +1213,23 @@ void MainWindow::splashClose() { - luminance_options.setValue("ShowSplashScreen", false); + luminance_options->setValue("ShowSplashScreen", false); splash->close(); } +void MainWindow::on_updateAvailable() +{ + m_Ui->actionUpdateAvailable->setVisible(true); +} + +void MainWindow::on_actionUpdateAvailable_triggered() +{ + if (sm_updateChecker) + { + sm_updateChecker->trayMessageClicked(); + } +} + void MainWindow::on_actionAbout_Luminance_triggered() { UMessageBox::about(); @@ -1216,9 +1320,9 @@ cropRect.getCoords(&x_ul, &y_ul, &x_br, &y_br); disableCrop(); pfs::Frame *original_frame = curr_g_v->getFrame(); - pfs::Frame *cropped_frame = pfs::pfscut(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")), true); + emit load_success(cropped_frame, QString(tr("Cropped Image")), m_inputFilesName, true); curr_g_v->removeSelection(); } @@ -1261,6 +1365,8 @@ } } + + bool MainWindow::maybeSave() { // if no HDR is open, return true @@ -1269,44 +1375,39 @@ 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); + 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(), this); - - if ( !fname.isEmpty() ) - { - // Update working folder - QFileInfo qfi(fname); - luminance_options.setDefaultPathHdrInOut(qfi.path()); + case QMessageBox::Save: { + // if save == success return true; + // else return false; + QString fname = getHdrFileNameFromSaveDialog(QString("Untitled"), this); - // 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: + if ( !fname.isEmpty() ) { - return true; + // Update working folder + QFileInfo qfi(fname); + luminance_options->setDefaultPathHdrOut(qfi.path()); + + // 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); } - break; - case QMessageBox::Cancel: - default: + else { return false; } - break; + } break; + case QMessageBox::Discard: { + return true; + } break; + case QMessageBox::Cancel: + default: { + return false; + } break; } } else return true; @@ -1353,7 +1454,6 @@ // start thread waiting for signals (I/O requests) m_TMThread->start(); - } void MainWindow::tonemapBegin() @@ -1380,17 +1480,26 @@ if ( (opts->tmoperator == fattal) && (opts->operator_options.fattaloptions.fftsolver == false) && (opts->xsize != opts->origxsize) && - (luminance_options.isShowFattalWarning()) ) + (luminance_options->isShowFattalWarning()) ) { - TonemappingWarningDialog tonemappingWarningDialog(this); + 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.setDefaultButton(QMessageBox::No); + warningDialog.setIcon(QMessageBox::Warning); + - switch ( tonemappingWarningDialog.exec() ) + switch ( warningDialog.exec() ) { case QMessageBox::Yes : {} break; case QMessageBox::YesAll : { - luminance_options.setShowFattalWarning(false); + luminance_options->setShowFattalWarning(false); } break; case QMessageBox::No : default: @@ -1400,7 +1509,7 @@ } } - previewPanel->setEnabled(false); + m_PreviewPanel->setEnabled(false); tm_status.curr_tm_options = opts; @@ -1426,7 +1535,6 @@ //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)); - } } @@ -1456,8 +1564,8 @@ } m_tabwidget->setCurrentWidget(n); - previewPanel->setEnabled(true); - + m_PreviewPanel->setEnabled(true); + if (m_Ui->actionSoft_Proofing->isChecked()) { LdrViewer *viewer = static_cast(n); viewer->doSoftProofing(false); @@ -1468,12 +1576,14 @@ } } -void MainWindow::tonemapFailed(QString error_msg) +void MainWindow::tonemapFailed(const QString& error_msg) { - QMessageBox::critical(this,tr("Luminance HDR"),tr("Error: %1").arg(error_msg), - QMessageBox::Ok,QMessageBox::NoButton); + QMessageBox::critical(this, tr("Luminance HDR"), + tr("Error: %1").arg(error_msg), + QMessageBox::Ok, QMessageBox::NoButton); tmPanel->setEnabled(true); + m_TMProgressBar->hide(); } /* @@ -1512,25 +1622,25 @@ { if (tm_status.is_hdr_ready) { - previewPanel->show(); + m_PreviewscrollArea->show(); // ask panel to refresh itself - previewPanel->updatePreviews(tm_status.curr_tm_frame->getFrame()); + m_PreviewPanel->updatePreviews(tm_status.curr_tm_frame->getFrame()); // connect signals - connect(this, SIGNAL(updatedHDR(pfs::Frame*)), previewPanel, SLOT(updatePreviews(pfs::Frame*))); - connect(previewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); - connect(previewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), tmPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); + 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*)), tmPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); } } else { - previewPanel->hide(); + m_PreviewscrollArea->hide(); // disconnect signals - disconnect(this, SIGNAL(updatedHDR(pfs::Frame*)), previewPanel, SLOT(updatePreviews(pfs::Frame*))); - disconnect(previewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), this, SLOT(tonemapImage(TonemappingOptions*))); - disconnect(previewPanel, SIGNAL(startTonemapping(TonemappingOptions*)), tmPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); + 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*)), tmPanel, SLOT(updateTonemappingParams(TonemappingOptions*))); } } @@ -1600,7 +1710,10 @@ tmPanel->setEnabled(false); - previewPanel->hide(); + m_inputFilesName.clear(); + m_inputExpoTimes.clear(); + + m_PreviewscrollArea->hide(); } } else @@ -1651,7 +1764,7 @@ */ void MainWindow::setCurrentFile(const QString &fileName) { - QStringList files = luminance_options.value(KEY_RECENT_FILES).toStringList(); + QStringList files = luminance_options->value(KEY_RECENT_FILES).toStringList(); files.removeAll(fileName); files.prepend(fileName); while (files.size() > MAX_RECENT_FILES) @@ -1659,7 +1772,7 @@ files.removeLast(); } - luminance_options.setValue(KEY_RECENT_FILES, files); + luminance_options->setValue(KEY_RECENT_FILES, files); // Update ALL MainWindow foreach (QWidget *widget, QApplication::topLevelWidgets()) @@ -1668,11 +1781,14 @@ if (mainWin) mainWin->updateRecentFileActions(); } + + OsIntegration::getInstance().addRecentFile(fileName); + } void MainWindow::updateRecentFileActions() { - QStringList files = luminance_options.value(KEY_RECENT_FILES).toStringList(); + QStringList files = luminance_options->value(KEY_RECENT_FILES).toStringList(); int numRecentFiles = qMin(files.size(), (int)MAX_RECENT_FILES); separatorRecentFiles->setVisible(numRecentFiles > 0); @@ -1730,14 +1846,15 @@ { qDebug() << "GammaAndLevels accepted!"; - pfs::Frame* frame = pfs::gamma_levels(current->getFrame(), - g_n_l->getBlackPointInput(), - g_n_l->getWhitePointInput(), - g_n_l->getBlackPointOutput(), - g_n_l->getWhitePointOutput(), - g_n_l->getGamma()); + // 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()); - current->setFrame(frame); + // current->setFrame(frame); } else { qDebug() << "GammaAndLevels refused!"; @@ -1749,25 +1866,14 @@ } } -void MainWindow::setInputFiles(const QStringList& files) -{ - inputFiles = files; - QTimer::singleShot(0, this, SLOT(openInputFiles())); -} - -void MainWindow::openInputFiles() -{ - openFiles(inputFiles); -} - void MainWindow::on_actionSoft_Proofing_toggled(bool doProof) { GenericViewer* current = (GenericViewer*) m_tabwidget->currentWidget(); - if ( current==NULL ) return; + if ( current == NULL ) return; if ( current->isHDR() ) return; LdrViewer *viewer = (LdrViewer *) current; if (doProof) { - qDebug() << "MainWindow:: do soft proofing"; + qDebug() << "MainWindow:: do soft proofing"; if (m_Ui->actionGamut_Check->isChecked()) m_Ui->actionGamut_Check->setChecked(false); viewer->doSoftProofing(false); @@ -1781,17 +1887,17 @@ void MainWindow::on_actionGamut_Check_toggled(bool doGamut) { GenericViewer* current = (GenericViewer*) m_tabwidget->currentWidget(); - if ( current==NULL ) return; + if ( current == NULL ) return; if ( current->isHDR() ) return; LdrViewer *viewer = (LdrViewer *) current; if (doGamut) { - qDebug() << "MainWindow:: do gamut check"; + qDebug() << "MainWindow:: do gamut check"; if (m_Ui->actionSoft_Proofing->isChecked()) m_Ui->actionSoft_Proofing->setChecked(false); viewer->doSoftProofing(true); } else { - qDebug() << "MainWindow:: undo gamut check"; + qDebug() << "MainWindow:: undo gamut check"; viewer->undoSoftProofing(); } } @@ -1808,17 +1914,34 @@ QWidget *wgt = m_tabwidget->widget(i); GenericViewer *g_v = (GenericViewer *)wgt; - if (g_v == NULL) - return; + 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()) + { + l_v->undoSoftProofing(); + } + else if (m_Ui->actionSoft_Proofing->isChecked()) + { + l_v->doSoftProofing(false); + } + else if (m_Ui->actionGamut_Check->isChecked()) + { + l_v->doSoftProofing(true); + } + } +} + +void MainWindow::showPreviewsOnTheRight() +{ + m_PreviewscrollArea->setParent(m_centralwidget_splitter); + luminance_options->setPreviewPanelMode(0); +} - 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()) - l_v->doSoftProofing(false); - else if (m_Ui->actionGamut_Check->isChecked()) - l_v->doSoftProofing(true); - } +void MainWindow::showPreviewsOnTheBottom() +{ + m_PreviewscrollArea->setParent(m_bottom_splitter); + luminance_options->setPreviewPanelMode(1); } diff -Nru luminance-hdr-2.3.0/src/MainWindow/MainWindow.h luminance-hdr-2.3.1/src/MainWindow/MainWindow.h --- luminance-hdr-2.3.0/src/MainWindow/MainWindow.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/MainWindow.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,8 +1,8 @@ /** * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 Davide Anastasia + * Copyright (C) 2006-2007 Giuseppe Rota + * Copyright (C) 2011-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 @@ -31,8 +31,8 @@ * Division of the Central Widget using QSplitter */ -#ifndef MAINGUI_IMPL_H -#define MAINGUI_IMPL_H +#ifndef MAINWINDOW_H +#define MAINWINDOW_H #include #include @@ -40,8 +40,11 @@ #include #include #include +#include #include #include +#include +#include #include "Common/LuminanceOptions.h" @@ -65,6 +68,9 @@ class TonemappingOptions; // #include "Core/TonemappingOptions.h" class TMWorker; + +class UpdateChecker; // #include "MainWindow/UpdateChecker.h" + class MainWindow: public QMainWindow { Q_OBJECT @@ -72,32 +78,37 @@ public: MainWindow(QWidget *parent = 0); // Constructor loading file inside - MainWindow(pfs::Frame* curr_frame, QString new_fname, 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: // I/O - void save_hdr_success(GenericViewer* saved_hdr, QString fname); + void save_hdr_success(GenericViewer* saved_hdr, const QString& fname); void save_hdr_failed(); - void save_ldr_success(GenericViewer* saved_ldr, QString fname); + void save_ldr_success(GenericViewer* saved_ldr, const QString& fname); void save_ldr_failed(); - void load_failed(QString); - void load_success(pfs::Frame* new_hdr_frame, QString new_fname, bool needSaving = false); + 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 setInputFiles(const QStringList& files); + void openFile(const QString& file); + void openFiles(const QStringList& files); protected Q_SLOTS: + void on_fileNewAction_triggered(); - void createNewHdr(QStringList files); + void createNewHdr(const QStringList& files); - void on_fileOpenAction_triggered(); //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(); void on_actionSave_Hdr_Preview_triggered(); @@ -134,13 +145,13 @@ void on_actionFix_Histogram_toggled(bool checked); - void openInputFiles(); - // Tool Bar Handling void Text_Under_Icons(); void Icons_Only(); void Text_Alongside_Icons(); void Text_Only(); + void showPreviewsOnTheRight(); + void showPreviewsOnTheBottom(); // Window Menu Display and Functionalities void updateWindowMenu(); @@ -164,13 +175,16 @@ void splashShowDonationsPage(); void splashClose(); + void on_updateAvailable(); + void on_actionUpdateAvailable_triggered(); + // TM void tonemapBegin(); void tonemapEnd(); void tonemapImage(TonemappingOptions *opts); void addLdrFrame(pfs::Frame*, TonemappingOptions*); //void addLDRResult(QImage*, quint16*); - void tonemapFailed(QString); + void tonemapFailed(const QString&); // lock functionalities void on_actionLock_toggled(bool); @@ -192,10 +206,12 @@ protected: QSplitter *m_centralwidget_splitter; + QSplitter *m_bottom_splitter; + QTabWidget *m_tabwidget; QSignalMapper *windowMapper; - LuminanceOptions luminance_options; + LuminanceOptions *luminance_options; QDialog *splash; // Recent Files Management @@ -206,13 +222,22 @@ QList openMainWindows; HelpBrowser* helpBrowser; - QStringList inputFiles; - - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); - virtual void changeEvent(QEvent* event); + //! \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 this contains the exposure times of the images to write to LDR + //! as EXIF comment + QVector m_inputExpoTimes; + + //! \group Event handler + void dragEnterEvent(QDragEnterEvent *); + void dropEvent(QDropEvent *); + void changeEvent(QEvent* event); void closeEvent(QCloseEvent *); + //! + + void dispatchrotate(bool clockwise); @@ -246,13 +271,12 @@ bool maybeSave(); // Preview Panel - PreviewPanel *previewPanel; + QScrollArea *m_PreviewscrollArea; + PreviewPanel *m_PreviewPanel; - void openFiles(const QStringList& files); - - #ifdef Q_WS_WIN - bool winEvent(MSG * message, long * result); - #endif +#ifdef Q_WS_WIN + bool winEvent(MSG * message, long * result); +#endif private: static int sm_NumMainWindows; @@ -271,6 +295,8 @@ TMOProgressIndicator* m_TMProgressBar; // Tone Mapping Panel TonemappingPanel *tmPanel; + + static QScopedPointer sm_updateChecker; }; -#endif +#endif // MAINWINDOW_H diff -Nru luminance-hdr-2.3.0/src/MainWindow/MainWindow.ui luminance-hdr-2.3.1/src/MainWindow/MainWindow.ui --- luminance-hdr-2.3.0/src/MainWindow/MainWindow.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/MainWindow.ui 2013-04-07 18:41:14.000000000 +0000 @@ -14,8 +14,8 @@ Luminance HDR - - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png Qt::ToolButtonTextUnderIcon @@ -30,7 +30,7 @@ 0 0 1238 - 24 + 19 @@ -38,6 +38,7 @@ &Tools + @@ -51,6 +52,7 @@ + @@ -94,6 +96,13 @@ + + + Preview Panel + + + + @@ -103,6 +112,7 @@ +
    @@ -127,6 +137,8 @@ + + @@ -598,23 +610,6 @@ Ctrl+E - - - false - - - &Align Images... - - - WORK IN PROGRESS - - - WORK IN PROGRESS - - - WORK IN PROGRESS - - &About Qt @@ -629,27 +624,6 @@ Show information about Qt library that is used by Luminance - - - &Tile - - - - - &Cascade - - - Cascade - - - Cascade - - - - - Toolbars - - true @@ -986,6 +960,48 @@ Gamut Check + + + true + + + true + + + Show on the right + + + + + true + + + Show on the bottom + + + + + true + + + true + + + Realtime Previews + + + + + + :/new/prefix1/images/vcs-update-required.png:/new/prefix1/images/vcs-update-required.png + + + Update + + + false + + diff -Nru luminance-hdr-2.3.0/src/MainWindow/UpdateChecker.cpp luminance-hdr-2.3.1/src/MainWindow/UpdateChecker.cpp --- luminance-hdr-2.3.0/src/MainWindow/UpdateChecker.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/UpdateChecker.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,129 @@ +/** + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * + * 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 Daniel Kaneider + */ + +#include +#include +#include +#include + +#include "Common/global.h" +#include "Common/config.h" +#include "Common/LuminanceOptions.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()) +{ + LuminanceOptions options; + if (options.checkForUpdate()) + { + connect(this, SIGNAL(updateAvailable()), parent, SLOT(on_updateAvailable())); + 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())); + + m_networkManager->get(QNetworkRequest(QUrl(QString("http://qtpfsgui.sourceforge.net/updater/get.php?c=%1").arg(LUMINANCEVERSION_NUM)))); + } +} + +UpdateChecker::~UpdateChecker() { + m_tray->hide(); + m_tray->deleteLater(); + m_networkManager->deleteLater(); +} + +void UpdateChecker::trayMessageClicked() const +{ + QDesktopServices::openUrl(QUrl(m_latestUrl)); + m_tray->hide(); +} + +void UpdateChecker::requestFinished(QNetworkReply* reply) +{ + if (reply->error() == QNetworkReply::NoError) + { + LuminanceOptions options; + options.setUpdateChecked(); + + QDomDocument document; + document.setContent(reply); + + // + // + //2.3.1 + //http://qtpfsgui.sourceforge.net/?p=251 + // + + QDomNode nodeRoot = document.documentElement(); + if (!nodeRoot.isNull()) + { + QDomNode nodeVersion = nodeRoot.firstChildElement("version"); + QDomNode nodeUrl = nodeRoot.firstChildElement("url"); + if (!nodeVersion.isNull() && !nodeUrl.isNull()) + { + m_version = nodeVersion.toElement().text(); + m_latestUrl = nodeUrl.toElement().text(); + + if (m_version == LUMINANCEVERSION) return; + + qDebug() << m_version; + + QString msgTitle = QString("Luminance HDR %1").arg(m_version); + QString msgContent = tr("A new release is ready for download!"); + QWidget* widgetP = (QWidget*)parent(); + + emit updateAvailable(); + +#if defined(Q_WS_MAC) || defined(Q_WS_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()) + { + 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 ) + { + trayMessageClicked(); + } + } +#endif + } + } + } +} diff -Nru luminance-hdr-2.3.0/src/MainWindow/UpdateChecker.h luminance-hdr-2.3.1/src/MainWindow/UpdateChecker.h --- luminance-hdr-2.3.0/src/MainWindow/UpdateChecker.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/MainWindow/UpdateChecker.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,56 @@ +/** + * This file is a part of LuminanceHDR package. + * ---------------------------------------------------------------------- + * + * 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 Daniel Kaneider + */ + +#ifndef UPDATECHECKER_IMPL_H +#define UPDATECHECKER_IMPL_H + +#include +#include +#include +#include +#include + +class UpdateChecker : public QObject +{ + Q_OBJECT +public: + UpdateChecker(QWidget *parent); + virtual ~UpdateChecker(); + +public slots: + void trayMessageClicked() const; + +protected slots: + void requestFinished(QNetworkReply*); + +signals: + void updateAvailable(); + +private: + QSystemTrayIcon* m_tray; + QNetworkAccessManager* m_networkManager; + + QString m_latestUrl; + QString m_version; +}; + +#endif diff -Nru luminance-hdr-2.3.0/src/OsIntegration/ecwin7.cpp luminance-hdr-2.3.1/src/OsIntegration/ecwin7.cpp --- luminance-hdr-2.3.0/src/OsIntegration/ecwin7.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/OsIntegration/ecwin7.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -32,6 +32,7 @@ mTaskbar = NULL; mOverlayIcon = NULL; mTaskbarMessageId = RegisterWindowMessage(L"TaskbarButtonCreated"); + mWindowId = NULL; #endif } @@ -61,6 +62,13 @@ } #endif +void EcWin7::addRecentFile(const QString& filename) +{ +#ifdef Q_OS_WIN + SHAddToRecentDocs(SHARD_PATHW, filename.toStdWString().c_str()); +#endif +} + // Set progress bar current value void EcWin7::setProgressValue(int value, int max) { diff -Nru luminance-hdr-2.3.0/src/OsIntegration/ecwin7.h luminance-hdr-2.3.1/src/OsIntegration/ecwin7.h --- luminance-hdr-2.3.0/src/OsIntegration/ecwin7.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/OsIntegration/ecwin7.h 2013-04-07 18:41:14.000000000 +0000 @@ -29,82 +29,8 @@ #define _WINSOCKAPI_ // stops windows.h including winsock.h #include #include +#include -#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK - -// Structs types and enums definitions for Windows 7 taskbar - -typedef enum THUMBBUTTONMASK -{ - THB_BITMAP = 0x1, - THB_ICON = 0x2, - THB_TOOLTIP = 0x4, - THB_FLAGS = 0x8 -} THUMBBUTTONMASK; - -typedef enum THUMBBUTTONFLAGS -{ - THBF_ENABLED = 0, - THBF_DISABLED = 0x1, - THBF_DISMISSONCLICK = 0x2, - THBF_NOBACKGROUND = 0x4, - THBF_HIDDEN = 0x8, - THBF_NONINTERACTIVE = 0x10 -} THUMBBUTTONFLAGS; - -typedef struct THUMBBUTTON -{ - THUMBBUTTONMASK dwMask; - UINT iId; - UINT iBitmap; - HICON hIcon; - WCHAR szTip[260]; - THUMBBUTTONFLAGS dwFlags; -} THUMBBUTTON; -typedef struct THUMBBUTTON *LPTHUMBBUTTON; - -typedef enum TBPFLAG -{ - TBPF_NOPROGRESS = 0, - TBPF_INDETERMINATE = 0x1, - TBPF_NORMAL = 0x2, - TBPF_ERROR = 0x4, - TBPF_PAUSED = 0x8 -} TBPFLAG; - -typedef IUnknown *HIMAGELIST; - -// Taskbar interface -DECLARE_INTERFACE_(ITaskbarList3,IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - // ITaskbarList - STDMETHOD(HrInit) (THIS) PURE; - STDMETHOD(AddTab) (THIS_ HWND hwnd) PURE; - STDMETHOD(DeleteTab) (THIS_ HWND hwnd) PURE; - STDMETHOD(ActivateTab) (THIS_ HWND hwnd) PURE; - STDMETHOD(SetActiveAlt) (THIS_ HWND hwnd) PURE; - STDMETHOD (MarkFullscreenWindow) (THIS_ HWND hwnd, int fFullscreen) PURE; - // ITaskbarList3 - STDMETHOD (SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE; - STDMETHOD (SetProgressState) (THIS_ HWND hwnd, TBPFLAG tbpFlags) PURE; - STDMETHOD (RegisterTab) (THIS_ HWND hwndTab,HWND hwndMDI) PURE; - STDMETHOD (UnregisterTab) (THIS_ HWND hwndTab) PURE; - STDMETHOD (SetTabOrder) (THIS_ HWND hwndTab, HWND hwndInsertBefore) PURE; - STDMETHOD (SetTabActive) (THIS_ HWND hwndTab, HWND hwndMDI, DWORD dwReserved) PURE; - STDMETHOD (ThumbBarAddButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE; - STDMETHOD (ThumbBarUpdateButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE; - STDMETHOD (ThumbBarSetImageList) (THIS_ HWND hwnd, HIMAGELIST himl) PURE; - STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE; - STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE; - STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE; -}; -typedef ITaskbarList3 *LPITaskbarList3; - -// Windows only data d#endifefinitions - END #endif // ******************************************************************** @@ -120,6 +46,8 @@ #ifdef Q_WS_WIN bool winEvent(MSG * message, long * result); #endif + void addRecentFile(const QString& filename); + // Overlay icon handling void setOverlayIcon(QString iconName, QString description); diff -Nru luminance-hdr-2.3.0/src/OsIntegration/osintegration.cpp luminance-hdr-2.3.1/src/OsIntegration/osintegration.cpp --- luminance-hdr-2.3.0/src/OsIntegration/osintegration.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/OsIntegration/osintegration.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -54,6 +54,13 @@ #endif } +void OsIntegration::addRecentFile(const QString& filename) + { +#ifdef Q_OS_WIN + winProgressbar->addRecentFile(filename); +#endif + } + #ifdef Q_WS_WIN bool OsIntegration::winEvent(MSG * message, long * result) { diff -Nru luminance-hdr-2.3.0/src/OsIntegration/osintegration.h luminance-hdr-2.3.1/src/OsIntegration/osintegration.h --- luminance-hdr-2.3.0/src/OsIntegration/osintegration.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/OsIntegration/osintegration.h 2013-04-07 18:41:14.000000000 +0000 @@ -41,6 +41,7 @@ #ifdef Q_WS_WIN bool winEvent(MSG * message, long * result); #endif + void addRecentFile(const QString& filename); private: OsIntegration(); diff -Nru luminance-hdr-2.3.0/src/Preferences/PreferencesDialog.cpp luminance-hdr-2.3.1/src/Preferences/PreferencesDialog.cpp --- luminance-hdr-2.3.0/src/Preferences/PreferencesDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Preferences/PreferencesDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -35,6 +36,7 @@ #include "Common/global.h" #include "Common/config.h" #include "Common/LuminanceOptions.h" +#include "Common/TranslatorManager.h" #include "Preferences/PreferencesDialog.h" // UI @@ -130,24 +132,6 @@ return temp_ais_options; } -int mappingBatchTmQStringToInt(const QString& string) -{ - if (string == "JPEG") - return 0; - else if (string == "PNG") - return 1; - else if (string == "PPM") - return 2; - else if (string == "PBM") - return 3; - else if (string == "BMP") - return 4; - else if (string == "TIFF") - return 5; - return 0; // I assume JPEG... at least it doesn't crash! :| -} - - } PreferencesDialog::PreferencesDialog(QWidget *p): @@ -156,45 +140,57 @@ { m_Ui->setupUi(this); - fromIso639ToGuiIndex["cs"]=0; - fromIso639ToGuiIndex["zh"]=1; - fromIso639ToGuiIndex["en"]=2; - fromIso639ToGuiIndex["fi"]=3; - fromIso639ToGuiIndex["fr"]=4; - fromIso639ToGuiIndex["de"]=5; - fromIso639ToGuiIndex["hu"]=6; - fromIso639ToGuiIndex["id"]=7; - fromIso639ToGuiIndex["it"]=8; - fromIso639ToGuiIndex["pl"]=9; - fromIso639ToGuiIndex["ro"]=10; - fromIso639ToGuiIndex["ru"]=11; - fromIso639ToGuiIndex["es"]=12; +#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"); +#endif +#ifdef DEMOSAICING_GPL3 + qDebug() << "PreferencesDialog: Found AMaZE"; + m_Ui->user_qual_comboBox->addItem("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["ru"]=10; + fromIso639ToGuiIndex["ro"]=11; + fromIso639ToGuiIndex["fi"]=12; fromIso639ToGuiIndex["tr"]=13; - //fromIso639ToGuiIndex["hi"]=14; - //fromIso639ToGuiIndex["sk"]=15; + fromIso639ToGuiIndex["zh"]=14; - fromGuiIndexToIso639[0]="cs"; - fromGuiIndexToIso639[1]="zh"; - fromGuiIndexToIso639[2]="en"; - fromGuiIndexToIso639[3]="fi"; - fromGuiIndexToIso639[4]="fr"; - fromGuiIndexToIso639[5]="de"; - fromGuiIndexToIso639[6]="hu"; - fromGuiIndexToIso639[7]="id"; - fromGuiIndexToIso639[8]="it"; - fromGuiIndexToIso639[9]="pl"; - fromGuiIndexToIso639[10]="ro"; - fromGuiIndexToIso639[11]="ru"; - fromGuiIndexToIso639[12]="es"; + 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]="ru"; + fromGuiIndexToIso639[11]="ro"; + fromGuiIndexToIso639[12]="fi"; fromGuiIndexToIso639[13]="tr"; - //fromGuiIndexToIso639[14]="hi"; - //fromGuiIndexToIso639[15]="sk"; + fromGuiIndexToIso639[14]="zh"; negcolor = LuminanceOptions().getViewerNegColor(); infnancolor = LuminanceOptions().getViewerNanInfColor(); 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))); @@ -232,12 +228,14 @@ 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()] ); - installTranslators(true); + TranslatorManager::setLanguage( luminance_options.getGuiLang() ); } // UI @@ -249,8 +247,13 @@ luminance_options.setPreviewWidth( m_Ui->previewsWidthSpinBox->value() ); luminance_options.setShowFirstPageWizard( m_Ui->checkBoxWizardShowFirstPage->isChecked() ); + if (m_Ui->chkPortableMode->isChecked() != LuminanceOptions::isCurrentPortableMode) + { + restartNeeded = true; + luminance_options.setPortableMode(m_Ui->chkPortableMode->isChecked()); + } + // --- Batch TM - luminance_options.setBatchTmLdrFormat( m_Ui->batchLdrFormatComboBox->currentText() ); luminance_options.setBatchTmNumThreads( m_Ui->numThreadspinBox->value() ); // --- Other Parameters @@ -260,7 +263,26 @@ // --- RAW parameters luminance_options.setRawFourColorRGB( m_Ui->four_color_rgb_CB->isChecked() ); luminance_options.setRawDoNotUseFujiRotate( m_Ui->do_not_use_fuji_rotate_CB->isChecked() ); - luminance_options.setRawUserQuality( m_Ui->user_qual_comboBox->currentIndex() ); + 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() ); @@ -299,6 +321,10 @@ luminance_options.setValue(KEY_BLUE_TOOLBUTTON, m_Ui->blue_toolButton->isEnabled()); luminance_options.setValue(KEY_GREEN_TOOLBUTTON, m_Ui->green_toolButton->isEnabled()); + if (restartNeeded) + { + QMessageBox::information(this, tr("Restart"), tr("For the settings to take effect, please restart the application!")); + } accept(); } @@ -589,9 +615,6 @@ // Temp directory m_Ui->lineEditTempPath->setText(luminance_options.getTempDir()); - // Batch TM output format - int current_batch_tm_output_type = mappingBatchTmQStringToInt( luminance_options.getBatchTmLdrFormat() ); - m_Ui->batchLdrFormatComboBox->setCurrentIndex( current_batch_tm_output_type ); m_Ui->numThreadspinBox->setValue( luminance_options.getBatchTmNumThreads() ); @@ -607,9 +630,37 @@ m_Ui->checkBoxTMOWindowsPreviewPanel->setChecked(luminance_options.isPreviewPanelActive()); m_Ui->checkBoxWizardShowFirstPage->setChecked(luminance_options.isShowFirstPageWizard()); + m_Ui->chkPortableMode->setChecked(LuminanceOptions::isCurrentPortableMode); + + QFile file(QDir(QApplication::applicationDirPath()).filePath(".write")); + bool dirWritable = file.open(QIODevice::ReadWrite); + 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()); + +#ifdef DEMOSAICING_GPL2 + bool GPL2 = true; +#else + bool GPL2 = false; +#endif +#ifdef DEMOSAICING_GPL3 + bool GPL3 = true; +#else + bool GPL3 = false; +#endif + + 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->med_passes_spinBox->setValue(luminance_options.getRawMedPasses()); diff -Nru luminance-hdr-2.3.0/src/Preferences/PreferencesDialog.ui luminance-hdr-2.3.1/src/Preferences/PreferencesDialog.ui --- luminance-hdr-2.3.0/src/Preferences/PreferencesDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Preferences/PreferencesDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -254,7 +254,7 @@ 0 - + @@ -283,17 +283,26 @@ - :/flags/images/CZEC0001.PNG + :/new/prefix1/images/flags/CZEC0001.PNG - 中文 + Dansk + + + + :/new/prefix1/images/flags/DK.PNG:/new/prefix1/images/flags/DK.PNG + + + + + Deutsch - :/flags/images/CHIN0001.PNG + :/new/prefix1/images/flags/GERM0001.PNG @@ -303,17 +312,17 @@ - :/flags/images/UNKG0001.PNG + :/new/prefix1/images/flags/UNKG0001.PNG - Suomi + Español - :/flags/images/FINL0001.PNG + :/new/prefix1/images/flags/SPAN0001.PNG @@ -323,57 +332,57 @@ - :/flags/images/FRAN0001.PNG + :/new/prefix1/images/flags/FRAN0001.PNG - Deutsch + Indonesia - :/flags/images/GERM0001.PNG + :/new/prefix1/images/flags/INDN0001.PNG - Magyar + Italiano - :/flags/images/HUNG0001.PNG + :/new/prefix1/images/flags/ITAL0001.PNG - Indonesia + Magyar - :/flags/images/INDN0001.PNG + :/new/prefix1/images/flags/HUNG0001.PNG - Italiano + Polski - :/flags/images/ITAL0001.PNG + :/new/prefix1/images/flags/POLA0001.PNG - Polski + Русский - :/flags/images/POLA0001.PNG + :/new/prefix1/images/flags/RUSS0001.PNG @@ -383,37 +392,37 @@ - :/flags/images/RMNA0001.PNG + :/new/prefix1/images/flags/RMNA0001.PNG - Русский + Suomi - :/flags/images/RUSS0001.PNG + :/new/prefix1/images/flags/FINL0001.PNG - Español + Türk - :/flags/images/SPAN0001.PNG + :/new/prefix1/images/flags/TURK0001.PNG - Türk + 中文 - :/flags/images/TURK0001.PNG + :/new/prefix1/images/flags/CHIN0001.PNG @@ -454,7 +463,17 @@ - + + + + Saves the settings along the program files, to be portable + + + Portable mode + + + + Always show Preview Panel @@ -464,7 +483,7 @@ - + Always show Wizard first page @@ -643,77 +662,6 @@ - - - Which LDR image format to save to - - - Batch Tonemapping Default Output Format - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - - 0 - 0 - - - - - 250 - 0 - - - - - 250 - 16777215 - - - - Which LDR image format to save to - - - - JPEG - - - - - PNG - - - - - PPM - - - - - PBM - - - - - BMP - - - - - TIFF - - - - - Amount of threads to use on multicore/SMP machines @@ -729,7 +677,7 @@ - + @@ -2454,9 +2402,6 @@ &OK - - true - diff -Nru luminance-hdr-2.3.0/src/PreviewPanel/CMakeLists.txt luminance-hdr-2.3.1/src/PreviewPanel/CMakeLists.txt --- luminance-hdr-2.3.0/src/PreviewPanel/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,5 +1,3 @@ -SET(FILES_UI -${CMAKE_CURRENT_SOURCE_DIR}/PreviewPanel.ui) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/PreviewPanel.h ${CMAKE_CURRENT_SOURCE_DIR}/PreviewLabel.h) @@ -10,9 +8,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) QT4_WRAP_CPP(FILES_MOC ${FILES_H}) -QT4_WRAP_UI(FILES_UI_H ${FILES_UI}) -ADD_LIBRARY(previewpanel ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H}) +ADD_LIBRARY(previewpanel ${FILES_H} ${FILES_CPP} ${FILES_MOC}) 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.3.0/src/PreviewPanel/PreviewLabel.cpp luminance-hdr-2.3.1/src/PreviewPanel/PreviewLabel.cpp --- luminance-hdr-2.3.0/src/PreviewPanel/PreviewLabel.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/PreviewLabel.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -21,15 +21,27 @@ * @author Franco Comida */ +#include + #include "PreviewLabel.h" PreviewLabel::PreviewLabel(QWidget *parent, TMOperator tm_operator): QLabel(parent), - m_TMOptions(new TonemappingOptions) + 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() { delete m_TMOptions; @@ -37,15 +49,38 @@ void PreviewLabel::mousePressEvent(QMouseEvent *event) { - if (event->buttons() == Qt::LeftButton) - { - emit clicked(m_TMOptions); + if (event->buttons() == Qt::LeftButton) { + (m_isFromPanel) ? emit clicked(m_TMOptions) : emit clicked(m_index); + } + else if (event->buttons() == Qt::RightButton) { + QMenu menu(this); + menu.addActions(actions()); + menu.exec(event->globalPos()); } } +void PreviewLabel::mouseDoubleClickEvent(QMouseEvent *event) +{ + emit clicked(m_TMOptions); +} + void PreviewLabel::assignNewQImage(QSharedPointer new_qimage) { setPixmap( QPixmap::fromImage(*new_qimage) ); adjustSize(); } +void PreviewLabel::setComment(QString comment) +{ + m_comment = comment; +} + +QString PreviewLabel::getComment() +{ + return m_comment; +} + +void PreviewLabel::setIndex(int index) +{ + m_index = index; +} diff -Nru luminance-hdr-2.3.0/src/PreviewPanel/PreviewLabel.h luminance-hdr-2.3.1/src/PreviewPanel/PreviewLabel.h --- luminance-hdr-2.3.0/src/PreviewPanel/PreviewLabel.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/PreviewLabel.h 2013-04-07 18:41:14.000000000 +0000 @@ -36,21 +36,31 @@ public: PreviewLabel(QWidget *parent = 0, TMOperator tm_operator = mantiuk06); + PreviewLabel(QWidget *parent = 0, TonemappingOptions *tonemappingOptions = 0, int index = -1); ~PreviewLabel(); + void setTonemappingOptions(TonemappingOptions *); TonemappingOptions* getTonemappingOptions(); + void setComment(QString); + QString getComment(); + void setIndex(int); public Q_SLOTS: void assignNewQImage(QSharedPointer new_qimage); protected: void mousePressEvent(QMouseEvent *event); + void mouseDoubleClickEvent(QMouseEvent *event); signals: void clicked(TonemappingOptions*); + void clicked(int); private: TonemappingOptions* m_TMOptions; + int m_index; + QString m_comment; + bool m_isFromPanel; }; inline TonemappingOptions* PreviewLabel::getTonemappingOptions() @@ -58,4 +68,10 @@ return m_TMOptions; } +inline void PreviewLabel::setTonemappingOptions(TonemappingOptions *tmopts) +{ + if (m_TMOptions) + delete m_TMOptions; + m_TMOptions = tmopts; +} #endif diff -Nru luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.cpp luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.cpp --- luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -26,15 +26,19 @@ #include #include "PreviewPanel.h" -#include "ui_PreviewPanel.h" -#include "Filter/pfssize.h" -#include "Filter/pfscut.h" +#include "Libpfs/frame.h" +#include "Libpfs/manip/copy.h" +#include "Libpfs/manip/resize.h" + #include "Core/TMWorker.h" +#include "Libpfs/tm/TonemapOperator.h" + #include "Fileformat/pfsoutldrimage.h" #include "PreviewPanel/PreviewLabel.h" -#include "TonemappingEngine/TonemapOperator.h" + #include "Common/LuminanceOptions.h" +#include "UI/FlowLayout.h" namespace // anoymous namespace { @@ -47,7 +51,7 @@ { tm_options->origxsize = frame->getWidth(); tm_options->xsize = frame->getWidth(); - tm_options->pregamma = 1.0f; + //tm_options->pregamma = 1.0f; //TODO check this tm_options->tonemapSelection = false; } @@ -79,24 +83,33 @@ #endif } - ProgressHelper fake_progress_helper; - // Copy Reference Frame - QSharedPointer temp_frame( pfs::pfscopy(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); - - // 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 So I queue a SLOT request on the m_PreviewPanel - QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, - Q_ARG(QSharedPointer, qimage)); + //QScopedPointer tm_operator( TonemapOperator::getTonemapOperator(tm_options->tmoperator)); + //tm_operator->tonemapFrame(temp_frame.data(), tm_options, fake_progress_helper); + try { + QScopedPointer tmWorker(new TMWorker); + QSharedPointer frame (tmWorker->computeTonemap(temp_frame.data(), tm_options)); + + // Create QImage from pfs::Frame into QSharedPointer, and I give it to the preview panel + //QSharedPointer qimage(fromLDRPFStoQImage(temp_frame.data())); + 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 So I queue a SLOT request on the m_PreviewPanel + 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!"; @@ -111,58 +124,88 @@ PreviewPanel::PreviewPanel(QWidget *parent): QWidget(parent), - m_Ui(new Ui::PreviewPanel) + 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"); - m_Ui->setupUi(this); - - PreviewLabel * labelMantiuk06 = new PreviewLabel(m_Ui->frameMantiuk06, mantiuk06); + PreviewLabel * labelMantiuk06 = new PreviewLabel(this, mantiuk06); labelMantiuk06->setText("Mantiuk '06"); + labelMantiuk06->setToolTip("Mantiuk '06"); + labelMantiuk06->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelMantiuk06); connect(labelMantiuk06, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelMantiuk08 = new PreviewLabel(m_Ui->frameMantiuk08, mantiuk08); + PreviewLabel * labelMantiuk08 = new PreviewLabel(this, mantiuk08); labelMantiuk08->setText("Mantiuk '08"); + labelMantiuk08->setToolTip("Mantiuk '08"); + labelMantiuk08->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelMantiuk08); connect(labelMantiuk08, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelFattal = new PreviewLabel(m_Ui->frameFattal, fattal); + PreviewLabel * labelFattal = new PreviewLabel(this, fattal); labelFattal->setText("Fattal"); + labelFattal->setToolTip("Fattal"); + labelFattal->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelFattal); connect(labelFattal, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelDrago = new PreviewLabel(m_Ui->frameDrago, drago); + PreviewLabel * labelDrago = new PreviewLabel(this, drago); labelDrago->setText("Drago"); + labelDrago->setToolTip("Drago"); + labelDrago->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelDrago); connect(labelDrago, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelDurand = new PreviewLabel(m_Ui->frameDurand, durand); + PreviewLabel * labelDurand = new PreviewLabel(this, durand); labelDurand->setText("Durand"); + labelDurand->setToolTip("Durand"); + labelDurand->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelDurand); connect(labelDurand, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelReinhard02= new PreviewLabel(m_Ui->frameReinhard02, reinhard02); + PreviewLabel * labelReinhard02= new PreviewLabel(this, reinhard02); labelReinhard02->setText("Reinhard '02"); + labelReinhard02->setToolTip("Reinhard '02"); + labelReinhard02->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelReinhard02); connect(labelReinhard02, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelReinhard05 = new PreviewLabel(m_Ui->frameReinhard05, reinhard05); + PreviewLabel * labelReinhard05 = new PreviewLabel(this, reinhard05); labelReinhard05->setText("Reinhard '05"); + labelReinhard05->setToolTip("Reinhard '05"); + labelReinhard05->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelReinhard05); connect(labelReinhard05, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelAshikhmin = new PreviewLabel(m_Ui->frameAshikhmin, ashikhmin); + PreviewLabel * labelAshikhmin = new PreviewLabel(this, ashikhmin); labelAshikhmin->setText("Ashikhmin"); + labelAshikhmin->setToolTip("Ashikhmin"); + labelAshikhmin->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelAshikhmin); connect(labelAshikhmin, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); - PreviewLabel * labelPattanaik = new PreviewLabel(m_Ui->framePattanaik, pattanaik); + PreviewLabel * labelPattanaik = new PreviewLabel(this, pattanaik); labelPattanaik->setText("Pattanaik"); + labelPattanaik->setToolTip("Pattanaik"); + labelPattanaik->setFrameStyle(QFrame::Box); m_ListPreviewLabel.push_back(labelPattanaik); connect(labelPattanaik, SIGNAL(clicked(TonemappingOptions*)), this, SLOT(tonemapPreview(TonemappingOptions*))); + + FlowLayout *flowLayout = new FlowLayout; + + flowLayout->addWidget(labelMantiuk06); + flowLayout->addWidget(labelMantiuk08); + flowLayout->addWidget(labelFattal); + flowLayout->addWidget(labelDrago); + flowLayout->addWidget(labelDurand); + flowLayout->addWidget(labelReinhard02); + flowLayout->addWidget(labelReinhard05); + flowLayout->addWidget(labelAshikhmin); + flowLayout->addWidget(labelPattanaik); + + setLayout(flowLayout); } PreviewPanel::~PreviewPanel() @@ -172,20 +215,11 @@ #endif } -void PreviewPanel::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LanguageChange) { - m_Ui->retranslateUi(this); - } - - QWidget::changeEvent(event); -} - -void PreviewPanel::updatePreviews(pfs::Frame* frame) +void PreviewPanel::updatePreviews(pfs::Frame* frame, int index) { if ( frame == NULL ) return; - original_width_frame = frame->getWidth(); + m_original_width_frame = frame->getWidth(); int frame_width = frame->getWidth(); int frame_height = frame->getHeight(); @@ -197,13 +231,19 @@ resized_width = PREVIEW_HEIGHT*ratio; } // 1. make a resized copy - QSharedPointer current_frame( pfs::resizeFrame(frame, resized_width)); + QSharedPointer current_frame( pfs::resize(frame, resized_width)); // 2. (non concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() - foreach(PreviewLabel* current_label, m_ListPreviewLabel) - { + if (index == -1) { + foreach(PreviewLabel* current_label, m_ListPreviewLabel) + { + PreviewLabelUpdater updater(current_frame); + updater(current_label); + } + } + else { PreviewLabelUpdater updater(current_frame); - updater(current_label); + updater(m_ListPreviewLabel.at(index)); } // 2. (concurrent) for each PreviewLabel, call PreviewLabelUpdater::operator() //QtConcurrent::map (m_ListPreviewLabel, PreviewLabelUpdater(current_frame) ); @@ -216,7 +256,17 @@ #endif opts->xsize = LuminanceOptions().getPreviewWidth(); - opts->origxsize = original_width_frame; + opts->origxsize = m_original_width_frame; emit startTonemapping(opts); } + +QSize PreviewPanel::getLabelSize() +{ + return m_ListPreviewLabel.at(0)->pixmap()->size(); +} + +PreviewLabel *PreviewPanel::getLabel(int index) +{ + return m_ListPreviewLabel.at(index); +} diff -Nru luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.h luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.h --- luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.h 2013-04-07 18:41:14.000000000 +0000 @@ -45,12 +45,11 @@ public: PreviewPanel(QWidget *parent = 0); ~PreviewPanel(); - -protected: - virtual void changeEvent(QEvent* event); + QSize getLabelSize(); + PreviewLabel *getLabel(int); public Q_SLOTS: - void updatePreviews(pfs::Frame* frame); + void updatePreviews(pfs::Frame* frame, int index = -1); protected Q_SLOTS: void tonemapPreview(TonemappingOptions*); @@ -59,9 +58,7 @@ void startTonemapping(TonemappingOptions*); private: - int original_width_frame; + int m_original_width_frame; QList m_ListPreviewLabel; - - QScopedPointer m_Ui; }; #endif diff -Nru luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.ui luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.ui --- luminance-hdr-2.3.0/src/PreviewPanel/PreviewPanel.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewPanel/PreviewPanel.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,323 +0,0 @@ - - - PreviewPanel - - - - 0 - 0 - 140 - 430 - - - - - 0 - 0 - - - - Preview - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 120 - 0 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - true - - - Qt::AlignCenter - - - - - 0 - 0 - 124 - 950 - - - - - 120 - 0 - - - - - 0 - - - 0 - - - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Mantiuk '06 - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Mantiuk '08 - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Fattal - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Drago - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Durand - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Reinhard '02 - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Reinhard '05 - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Ashikhmin - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - 0 - 0 - - - - - 120 - 100 - - - - Pattanaik - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - - - - - - - - diff -Nru luminance-hdr-2.3.0/src/PreviewSettings/CMakeLists.txt luminance-hdr-2.3.1/src/PreviewSettings/CMakeLists.txt --- luminance-hdr-2.3.0/src/PreviewSettings/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewSettings/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,13 @@ +SET(FILES_H +${CMAKE_CURRENT_SOURCE_DIR}/PreviewSettings.h) +SET(FILES_CPP +${CMAKE_CURRENT_SOURCE_DIR}/PreviewSettings.cpp) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + +QT4_WRAP_CPP(FILES_MOC ${FILES_H}) + +ADD_LIBRARY(previewsettings ${FILES_H} ${FILES_CPP} ${FILES_MOC}) + +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.3.0/src/PreviewSettings/PreviewSettings.cpp luminance-hdr-2.3.1/src/PreviewSettings/PreviewSettings.cpp --- luminance-hdr-2.3.0/src/PreviewSettings/PreviewSettings.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewSettings/PreviewSettings.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,227 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 "PreviewSettings.h" + +#include "Libpfs/frame.h" +#include "Libpfs/manip/cut.h" +#include "Libpfs/manip/copy.h" +#include "Libpfs/manip/resize.h" +#include "Libpfs/progress.h" +#include "Libpfs/tm/TonemapOperator.h" + +#include "Core/TMWorker.h" +#include "Fileformat/pfsoutldrimage.h" +#include "PreviewPanel/PreviewLabel.h" +#include "Common/LuminanceOptions.h" + +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 +//! 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; +} + +class PreviewLabelUpdater +{ +public: + 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 + //! in case something wrong happens, it shouldn't leak + void operator()(PreviewLabel* to_update) + { +#ifdef QT_DEBUG + //qDebug() << QThread::currentThread() << "running..."; +#endif + + // retrieve TM parameters + TonemappingOptions* tm_options = to_update->getTonemappingOptions(); + resetTonemappingOptions(tm_options, m_ReferenceFrame.data()); + + if ( m_ReferenceFrame.isNull() ) + { +#ifdef QT_DEBUG + qDebug() << "operator()() for TM" << static_cast(tm_options->tmoperator) << " received a NULL pointer"; + return; +#endif + } + + pfs::Progress fake_progress; + + // Copy Reference Frame + QSharedPointer temp_frame( pfs::copy(m_ReferenceFrame.data()) ); + + // Tone Mapping + 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 + 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 So I queue a SLOT request on the m_PreviewSettings + QMetaObject::invokeMethod(to_update, "assignNewQImage", Qt::QueuedConnection, + Q_ARG(QSharedPointer, qimage)); + +#ifdef QT_DEBUG + //qDebug() << QThread::currentThread() << "done!"; +#endif + } + +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() + //! see run() inside PreviewLabelUpdater + qRegisterMetaType< QSharedPointer >("QSharedPointer"); + + m_flowLayout = new FlowLayout; + + setLayout(m_flowLayout); +} + +PreviewSettings::~PreviewSettings() +{ +#ifdef QT_DEBUG + qDebug() << "PreviewSettings::~PreviewSettings()"; +#endif +} + +void PreviewSettings::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::LanguageChange) { + //m_Ui->retranslateUi(this); + } + + QWidget::changeEvent(event); +} + +void PreviewSettings::updatePreviews(pfs::Frame* frame) +{ + if ( frame == NULL ) return; + + m_original_width_frame = frame->getWidth(); + + int frame_width = frame->getWidth(); + 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; + } + // 1. make a resized copy + QSharedPointer current_frame( pfs::resize(frame, resized_width) ); + + // 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) ); +} + +void PreviewSettings::tonemapPreview(TonemappingOptions* opts) +{ +#ifdef QT_DEBUG + qDebug() << "void PreviewSettings::tonemapPreview()"; +#endif + + opts->xsize = LuminanceOptions().getPreviewWidth(); + opts->origxsize = m_original_width_frame; + + emit startTonemapping(opts); +} + +QSize PreviewSettings::getLabelSize() +{ + return m_ListPreviewLabel.at(0)->pixmap()->size(); +} + +void PreviewSettings::addPreviewLabel(PreviewLabel *label) +{ + TonemappingOptions *opts = label->getTonemappingOptions(); + QString text = opts->getCaption(false, QString("\n")); + + if (label->actions().isEmpty()) { + QAction* pAction = new QAction(tr("Load settings"), label); + label->addAction(pAction); + connect(pAction, SIGNAL(triggered()), this, SIGNAL(triggered())); + } + + label->setToolTip(text); + + m_ListPreviewLabel.append(label); + label->setFrameStyle(QFrame::Box); + m_flowLayout->addWidget(label); +} + +void PreviewSettings::selectLabel(int index) { + for (int i = 0; i < m_flowLayout->getSize(); i++) { + QWidget *w = m_flowLayout->itemAt(i)->widget(); + QLabel *l = static_cast(w); + l->setLineWidth((i == index) ? 3 : 1); + } +} + +PreviewLabel * PreviewSettings::getPreviewLabel(int index) { + QWidget *w = m_flowLayout->itemAt(index)->widget(); + return static_cast(w); +} + +void PreviewSettings::clear() { + int size = m_flowLayout->getSize(); + for (int i = 0; i < size; i++) { + m_flowLayout->takeAt(i); + } + m_ListPreviewLabel.clear(); +} diff -Nru luminance-hdr-2.3.0/src/PreviewSettings/PreviewSettings.h luminance-hdr-2.3.1/src/PreviewSettings/PreviewSettings.h --- luminance-hdr-2.3.0/src/PreviewSettings/PreviewSettings.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/PreviewSettings/PreviewSettings.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,70 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 PREVIEWSETTINGS_IMPL_H +#define PREVIEWSETTINGS_IMPL_H + +#include + +#include "UI/FlowLayout.h" + +// forward declaration +namespace pfs { + class Frame; // #include "Libpfs/frame.h" +} + +class TonemappingOptions; // #include "Core/TonemappingOptions.h" +class PreviewLabel; // #include "PreviewSettings/PreviewLabel.h" + +class PreviewSettings : public QWidget +{ + Q_OBJECT + +public: + PreviewSettings(QWidget *parent = 0); + ~PreviewSettings(); + void addPreviewLabel(PreviewLabel *label); + PreviewLabel *getPreviewLabel(int index); + QSize getLabelSize(); + int getSize() { return m_ListPreviewLabel.size(); } + void clear(); +protected: + virtual void changeEvent(QEvent* event); + +public Q_SLOTS: + void selectLabel(int index); + void updatePreviews(pfs::Frame* frame); + +protected Q_SLOTS: + void tonemapPreview(TonemappingOptions*); + +Q_SIGNALS: + void startTonemapping(TonemappingOptions*); + void triggered(); + +private: + int m_original_width_frame; + QList m_ListPreviewLabel; + FlowLayout *m_flowLayout; +}; +#endif diff -Nru luminance-hdr-2.3.0/src/Projection/ProjectionsDialog.cpp luminance-hdr-2.3.1/src/Projection/ProjectionsDialog.cpp --- luminance-hdr-2.3.0/src/Projection/ProjectionsDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Projection/ProjectionsDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -23,9 +23,9 @@ #include "ProjectionsDialog.h" #include "ui_ProjectionsDialog.h" -#include "Filter/pfspanoramic.h" + #include "Libpfs/frame.h" -#include "Libpfs/domio.h" +#include "Libpfs/manip/projection.h" ProjectionsDialog::ProjectionsDialog(QWidget *parent,pfs::Frame *orig): QDialog(parent), @@ -89,26 +89,24 @@ ((AngularProjection*)(transforminfo->dstProjection))->setAngle(v); } -void ProjectionsDialog::okClicked() { +void ProjectionsDialog::okClicked() +{ qDebug("Projective Transformation from %s to %s", transforminfo->srcProjection->getName(), transforminfo->dstProjection->getName()); - //TODO - pfs::DOMIO pfsio; - pfs::Channel *R,*G,*B; - //original->getRGBChannels( R,G,B ); - R = original->getChannel("R"); - G = original->getChannel("G"); - B = original->getChannel("B"); - int xSize=original->getWidth(); - int ySize=(int)(xSize / transforminfo->dstProjection->getSizeRatio()); - transformed = pfsio.createFrame( xSize,ySize ); - pfs::ChannelIterator *it = original->getChannels(); - while( it->hasNext() ) - { - pfs::Channel *originalCh = it->getNext(); - pfs::Channel *newCh = transformed->createChannel( originalCh->getName() ); - transformArray(originalCh->getChannelData(), newCh->getChannelData(), transforminfo); - } + int xSize = original->getWidth(); + int ySize = static_cast(xSize / transforminfo->dstProjection->getSizeRatio()); + transformed = new pfs::Frame( xSize,ySize ); + + 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() ); + + transformArray(*it, newCh, transforminfo); + } + pfs::copyTags( original, transformed ); emit accept(); } diff -Nru luminance-hdr-2.3.0/src/Resize/ResizeDialog.cpp luminance-hdr-2.3.1/src/Resize/ResizeDialog.cpp --- luminance-hdr-2.3.0/src/Resize/ResizeDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Resize/ResizeDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -24,17 +24,18 @@ #include "ResizeDialog.h" #include "ui_ResizeDialog.h" -#include "Filter/pfssize.h" #include "Libpfs/frame.h" +#include "Libpfs/manip/resize.h" ResizeDialog::ResizeDialog(QWidget *parent, pfs::Frame *orig): QDialog(parent), - original(orig), + m_original(orig), + m_resized(NULL), m_Ui(new Ui::ResizeDialog) { m_Ui->setupUi(this); - orig_width = original->getWidth(); - orig_height = original->getHeight(); + orig_width = m_original->getWidth(); + orig_height = m_original->getHeight(); resized_width = orig_width; resized_height = orig_height; @@ -68,7 +69,7 @@ } pfs::Frame* ResizeDialog::getResizedFrame() { - return resized; + return m_resized; } void ResizeDialog::scaledPressed() { @@ -76,7 +77,7 @@ emit reject(); return; } - resized = pfs::resizeFrame(original,resized_width); + m_resized = pfs::resize(m_original, resized_width); accept(); } diff -Nru luminance-hdr-2.3.0/src/Resize/ResizeDialog.h luminance-hdr-2.3.1/src/Resize/ResizeDialog.h --- luminance-hdr-2.3.0/src/Resize/ResizeDialog.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Resize/ResizeDialog.h 2013-04-07 18:41:14.000000000 +0000 @@ -48,8 +48,8 @@ void update_widthSpinBox(); void defaultpressed(); private: - pfs::Frame *original; - pfs::Frame *resized; + pfs::Frame* m_original; + pfs::Frame* m_resized; int orig_width,orig_height; int resized_width,resized_height; void updatelabel(); diff -Nru luminance-hdr-2.3.0/src/Resize/ResizeDialog.ui luminance-hdr-2.3.1/src/Resize/ResizeDialog.ui --- luminance-hdr-2.3.0/src/Resize/ResizeDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Resize/ResizeDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -13,7 +13,7 @@ Scale Image - :/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png true diff -Nru luminance-hdr-2.3.0/src/Threads/HdrInputLoader.cpp luminance-hdr-2.3.1/src/Threads/HdrInputLoader.cpp --- luminance-hdr-2.3.0/src/Threads/HdrInputLoader.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Threads/HdrInputLoader.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -32,13 +32,14 @@ #include "Exif/ExifOperations.h" #include "Fileformat/pfs_file_format.h" #include "Threads/HdrInputLoader.h" +#include "Libpfs/exception.h" +HdrInputLoader::HdrInputLoader(const QString& filename, int image_idx) + : QThread(0), image_idx(image_idx), fname(filename) +{} - -HdrInputLoader::HdrInputLoader(QString filename, int image_idx) : QThread(0), image_idx(image_idx), fname(filename) { -} - -HdrInputLoader::~HdrInputLoader() { +HdrInputLoader::~HdrInputLoader() +{ wait(); } @@ -123,12 +124,12 @@ emit mdrReady(frame, image_idx, expotime, outfname); } } - catch(pfs::Exception e) { - emit loadFailed(QString(tr("ERROR: %1")).arg(e.getMessage()),image_idx); + catch (pfs::Exception& e) { + emit loadFailed(QString(tr("ERROR: %1")).arg(e.what()),image_idx); //QApplication::restoreOverrideCursor(); return; } - catch (QString err) { + catch (QString& err) { emit loadFailed((err + " : %1").arg(fname), image_idx); return; } diff -Nru luminance-hdr-2.3.0/src/Threads/HdrInputLoader.h luminance-hdr-2.3.1/src/Threads/HdrInputLoader.h --- luminance-hdr-2.3.0/src/Threads/HdrInputLoader.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Threads/HdrInputLoader.h 2013-04-07 18:41:14.000000000 +0000 @@ -44,7 +44,7 @@ Q_OBJECT public: - HdrInputLoader(QString filename, int image_idx); + HdrInputLoader(const QString &filename, int image_idx); ~HdrInputLoader(); static void conditionallyRotateImage(QFileInfo qfi, QImage** oldImage); diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/CMakeLists.txt luminance-hdr-2.3.1/src/TonemappingEngine/CMakeLists.txt --- luminance-hdr-2.3.0/src/TonemappingEngine/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -FILE(GLOB TMENGINE_H *.h) -FILE(GLOB TMENGINE_CPP *.cpp) - -ADD_LIBRARY(tmengine ${TMENGINE_H} ${TMENGINE_CPP}) -SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} tmengine PARENT_SCOPE) -SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} tmengine PARENT_SCOPE) diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperator.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperator.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperator.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - * - */ - -#include "TonemappingEngine/TonemapOperator.h" -#include "TonemappingEngine/TonemapOperatorAshikhmin02.h" -#include "TonemappingEngine/TonemapOperatorDrago03.h" -#include "TonemappingEngine/TonemapOperatorDurand02.h" -#include "TonemappingEngine/TonemapOperatorFattal02.h" -#include "TonemappingEngine/TonemapOperatorMantiuk06.h" -#include "TonemappingEngine/TonemapOperatorMantiuk08.h" -#include "TonemappingEngine/TonemapOperatorPattanaik00.h" -#include "TonemappingEngine/TonemapOperatorReinhard02.h" -#include "TonemappingEngine/TonemapOperatorReinhard05.h" - -TonemapOperator::TonemapOperator() -{} - -TonemapOperator::~TonemapOperator() -{} - -TonemapOperator* TonemapOperator::getTonemapOperator(const TMOperator tmo) -{ - switch (tmo) - { - case ashikhmin: - return new TonemapOperatorAshikhmin02(); - case drago: - return new TonemapOperatorDrago03(); - case durand: - return new TonemapOperatorDurand02(); - case fattal: - return new TonemapOperatorFattal02(); - case mantiuk08: - return new TonemapOperatorMantiuk08(); - case pattanaik: - return new TonemapOperatorPattanaik00(); - case reinhard02: - return new TonemapOperatorReinhard02(); - case reinhard05: - return new TonemapOperatorReinhard05(); - // just to be sure - case mantiuk06: - default: - return new TonemapOperatorMantiuk06(); - - } -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperator.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperator.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperator.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_H -#define TONEMAP_OPERATOR_H - -#include - -#include "Core/TonemappingOptions.h" -#include "Common/ProgressHelper.h" - -// Forward declaration -namespace pfs { - class Frame; -} - -class TonemapOperator -{ -public: - static TonemapOperator* getTonemapOperator(const TMOperator tmo); - virtual ~TonemapOperator(); - - ///! - ///! return the underlying type of the TonemapOperator - ///! - virtual TMOperator getType() = 0; - - ///! - ///! Get a Frame in RGB and processes it. - ///! Frame is MODIFIED. - ///! If you want to keep the original frame, make a copy before - ///! - virtual void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph) = 0; - -protected: - TonemapOperator(); - -}; - - - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorAshikhmin02.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorAshikhmin02.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorAshikhmin02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorAshikhmin02.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorAshikhmin02.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorAshikhmin02::TonemapOperatorAshikhmin02(): - TonemapOperator() -{} - -void TonemapOperatorAshikhmin02::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - pfstmo_ashikhmin02(workingframe, - opts->operator_options.ashikhminoptions.simple, - opts->operator_options.ashikhminoptions.lct, - (opts->operator_options.ashikhminoptions.eq2 ? 2 : 4), - &ph); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_RGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorAshikhmin02::getType() -{ - return ashikhmin; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorAshikhmin02.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorAshikhmin02.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorAshikhmin02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorAshikhmin02.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_ASHIKHMIN02_H -#define TONEMAP_OPERATOR_ASHIKHMIN02_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorAshikhmin02: public TonemapOperator -{ -public: - TonemapOperatorAshikhmin02(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDrago03.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDrago03.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDrago03.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDrago03.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorDrago03.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorDrago03::TonemapOperatorDrago03(): - TonemapOperator() -{} - -void TonemapOperatorDrago03::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - pfstmo_drago03(workingframe, opts->operator_options.dragooptions.bias, &ph); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_SRGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorDrago03::getType() -{ - return drago; -} - diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDrago03.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDrago03.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDrago03.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDrago03.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_DRAGO03_H -#define TONEMAP_OPERATOR_DRAGO03_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorDrago03: public TonemapOperator -{ -public: - TonemapOperatorDrago03(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDurand02.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDurand02.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDurand02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDurand02.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorDurand02.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -QMutex TonemapOperatorDurand02::m_Mutex; - -TonemapOperatorDurand02::TonemapOperatorDurand02(): - TonemapOperator() -{} - -void TonemapOperatorDurand02::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - // pfstmo_durand02 not reentrant - m_Mutex.lock(); - pfstmo_durand02(workingframe, - opts->operator_options.durandoptions.spatial, - opts->operator_options.durandoptions.range, - opts->operator_options.durandoptions.base, - &ph); - m_Mutex.unlock(); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_SRGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorDurand02::getType() -{ - return durand; -} - diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDurand02.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDurand02.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorDurand02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorDurand02.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_DURAND02_H -#define TONEMAP_OPERATOR_DURAND02_H - -#include - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorDurand02: public TonemapOperator -{ -public: - TonemapOperatorDurand02(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); - -private: - static QMutex m_Mutex; -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorFattal02.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorFattal02.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorFattal02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorFattal02.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include - -#include "TonemappingEngine/TonemapOperatorFattal02.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorFattal02::TonemapOperatorFattal02(): - TonemapOperator() -{} - -void TonemapOperatorFattal02::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - float ratio = opts->origxsize / opts->xsize; - int detail_level = 0; - if ( ratio < 2 ) - detail_level = 3; - else if ( ratio < 4 ) - detail_level = 2; - else if ( ratio < 8 ) - detail_level = 1; - else - detail_level = 0; - -// std::cout << "RATIO = " << ratio << ", "; -// std::cout << "DETAIL_LEVEL = " << detail_level << std::endl; - - 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); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_RGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorFattal02::getType() -{ - return fattal; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorFattal02.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorFattal02.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorFattal02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorFattal02.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_FATTAL02_H -#define TONEMAP_OPERATOR_FATTAL02_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorFattal02: public TonemapOperator -{ -public: - TonemapOperatorFattal02(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); - -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk06.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk06.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk06.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk06.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorMantiuk06.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -QMutex TonemapOperatorMantiuk06::m_Mutex; - -TonemapOperatorMantiuk06::TonemapOperatorMantiuk06(): - TonemapOperator() -{} - -void TonemapOperatorMantiuk06::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - // pfstmo_mantiuk06 not reentrant - m_Mutex.lock(); - pfstmo_mantiuk06(workingframe, - opts->operator_options.mantiuk06options.contrastfactor, - opts->operator_options.mantiuk06options.saturationfactor, - opts->operator_options.mantiuk06options.detailfactor, - opts->operator_options.mantiuk06options.contrastequalization, - &ph); - m_Mutex.unlock(); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_SRGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorMantiuk06::getType() -{ - return mantiuk06; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk06.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk06.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk06.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk06.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_MANTIUK06_H -#define TONEMAP_OPERATOR_MANTIUK06_H - -#include - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorMantiuk06: public TonemapOperator -{ -public: - TonemapOperatorMantiuk06(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); - -private: - // It may be removed, because the issue in the race condition of the operator has been solved - static QMutex m_Mutex; -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk08.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk08.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk08.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk08.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2008,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorMantiuk08.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorMantiuk08::TonemapOperatorMantiuk08(): - TonemapOperator() -{} - -void TonemapOperatorMantiuk08::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - pfstmo_mantiuk08(workingframe, - opts->operator_options.mantiuk08options.colorsaturation, - opts->operator_options.mantiuk08options.contrastenhancement, - opts->operator_options.mantiuk08options.luminancelevel, - opts->operator_options.mantiuk08options.setluminance, - &ph); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_RGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorMantiuk08::getType() -{ - return mantiuk08; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk08.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk08.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorMantiuk08.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorMantiuk08.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_MANTIUK08_H -#define TONEMAP_OPERATOR_MANTIUK08_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorMantiuk08: public TonemapOperator -{ -public: - TonemapOperatorMantiuk08(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorPattanaik00.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorPattanaik00.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorPattanaik00.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorPattanaik00.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorPattanaik00.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorPattanaik00::TonemapOperatorPattanaik00(): - TonemapOperator() -{} - -void TonemapOperatorPattanaik00::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - pfstmo_pattanaik00(workingframe, - opts->operator_options.pattanaikoptions.local, - opts->operator_options.pattanaikoptions.multiplier, - opts->operator_options.pattanaikoptions.cone, - opts->operator_options.pattanaikoptions.rod, - opts->operator_options.pattanaikoptions.autolum, - &ph); - - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_SRGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorPattanaik00::getType() -{ - return pattanaik; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorPattanaik00.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorPattanaik00.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorPattanaik00.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorPattanaik00.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_PATTANAIK00_H -#define TONEMAP_OPERATOR_PATTANAIK00_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorPattanaik00: public TonemapOperator -{ -public: - TonemapOperatorPattanaik00(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard02.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard02.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard02.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorReinhard02.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -QMutex TonemapOperatorReinhard02::m_Mutex; - -TonemapOperatorReinhard02::TonemapOperatorReinhard02(): - TonemapOperator() -{} - -void TonemapOperatorReinhard02::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - m_Mutex.lock(); - 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); - m_Mutex.unlock(); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_SRGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorReinhard02::getType() -{ - return reinhard02; -} - diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard02.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard02.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard02.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_REINHARD02_H -#define TONEMAP_OPERATOR_REINHARD02_H - -#include - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorReinhard02: public TonemapOperator -{ -public: - TonemapOperatorReinhard02(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); - -private: - static QMutex m_Mutex; -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard05.cpp luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard05.cpp --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard05.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard05.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#include "TonemappingEngine/TonemapOperatorReinhard05.h" -#include "TonemappingOperators/pfstmo.h" -#include "Core/TonemappingOptions.h" -#include "Libpfs/channel.h" -#include "Libpfs/colorspace.h" - -TonemapOperatorReinhard05::TonemapOperatorReinhard05(): - TonemapOperator() -{} - -void TonemapOperatorReinhard05::tonemapFrame(pfs::Frame* workingframe, TonemappingOptions* opts, ProgressHelper& ph) -{ - ph.emitSetMaximum(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->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); - - pfstmo_reinhard05(workingframe, - opts->operator_options.reinhard05options.brightness, - opts->operator_options.reinhard05options.chromaticAdaptation, - opts->operator_options.reinhard05options.lightAdaptation, - &ph); - - pfs::transformColorSpace(pfs::CS_XYZ, X->getChannelData(), Y->getChannelData(), Z->getChannelData(), - pfs::CS_RGB, X->getChannelData(), Y->getChannelData(), Z->getChannelData()); -} - -TMOperator TonemapOperatorReinhard05::getType() -{ - return reinhard05; -} diff -Nru luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard05.h luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard05.h --- luminance-hdr-2.3.0/src/TonemappingEngine/TonemapOperatorReinhard05.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingEngine/TonemapOperatorReinhard05.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007 Giuseppe Rota - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * Original Work - * @author Giuseppe Rota - * Improvements, bugfixing - * @author Franco Comida - * Refactory of TMThread.h class to TonemapOperator in order to remove dependency from QObject and QThread - * @author Davide Anastasia - * - */ - -#ifndef TONEMAP_OPERATOR_REINHARD05_H -#define TONEMAP_OPERATOR_REINHARD05_H - -#include "TonemappingEngine/TonemapOperator.h" - -class TonemapOperatorReinhard05: public TonemapOperator -{ -public: - TonemapOperatorReinhard05(); - - TMOperator getType(); - void tonemapFrame(pfs::Frame*, TonemappingOptions*, ProgressHelper& ph); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/ashikhmin02/pfstmo_ashikhmin02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -30,80 +30,80 @@ #include #include #include -#include +#include #include -#include "Libpfs/colorspace.h" + #include "Libpfs/frame.h" -#include "Common/ProgressHelper.h" -#include "tmo_ashikhmin02.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/progress.h" -void calculateLuminance( pfs::Array2D* Y, float& avLum, float& maxLum, float& minLum); +#include "tmo_ashikhmin02.h" -void pfstmo_ashikhmin02(pfs::Frame* inpfsframe, bool simple_flag, float lc_value, int eq, ProgressHelper *ph) +namespace { - assert(inpfsframe!=NULL); +void calculateLuminance( pfs::Array2Df* Y, float& avLum, float& maxLum, float& minLum) +{ + avLum = 0.0f; + maxLum = 0.0f; + minLum = 0.0f; - //--- default tone mapping parameters; + int size = Y->getCols() * Y->getRows(); + + for ( int i=0 ; i maxLum ) ? (*Y)(i) : maxLum ; + minLum = ( (*Y)(i) < minLum ) ? (*Y)(i) : minLum ; + } + avLum =exp( avLum/ size); +} +} +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 ("; std::cout << "simple: " << simple_flag; std::cout << ", lc_value: " << lc_value; std::cout << ", eq: " << eq << ")" << std::endl; +#endif - pfs::Channel *X, *Y, *Z; - inpfsframe->getXYZChannels(X,Y,Z); - assert( X!=NULL && Y!=NULL && Z!=NULL ); - - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); + pfs::Channel *Xr, *Yr, *Zr; + frame.getXYZChannels(Xr, Yr, Zr); + assert( Xr != NULL ); + assert( Yr != NULL ); + assert( Zr != NULL ); pfs::transformColorSpace( pfs::CS_RGB, Xr, Yr, Zr, pfs::CS_XYZ, Xr, Yr, Zr ); float maxLum, avLum, minLum; - calculateLuminance( Yr, avLum, maxLum, minLum); + calculateLuminance(Yr, avLum, maxLum, minLum); int w = Yr->getCols(); int h = Yr->getRows(); - pfs::Array2D* L = new pfs::Array2D(w,h); - tmo_ashikhmin02(Yr, L, maxLum, minLum, avLum, simple_flag, lc_value, eq, ph); + pfs::Array2Df L(w,h); + tmo_ashikhmin02(Yr, &L, maxLum, minLum, avLum, simple_flag, lc_value, eq, ph); // TODO: this section can be rewritten using SSE Function for ( int x=0 ; xisTerminationRequested()) - ph->newValue( 100 ); - - delete L; - - pfs::transformColorSpace(pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, Xr, Yr, Zr); -} - -void calculateLuminance( pfs::Array2D* 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 ; + ph.setValue( 100 ); } - avLum =exp( avLum/ size); + + pfs::transformColorSpace(pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, Xr, Yr, Zr); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/ashikhmin02/pyramid.h luminance-hdr-2.3.1/src/TonemappingOperators/ashikhmin02/pyramid.h --- luminance-hdr-2.3.0/src/TonemappingOperators/ashikhmin02/pyramid.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/ashikhmin02/pyramid.h 2013-04-07 18:41:14.000000000 +0000 @@ -30,7 +30,7 @@ #include -#include "Libpfs/array2d.h" +#include "Libpfs/array2d_fwd.h" class Pyramid { // each level of a Gaussian pyramid public: @@ -50,7 +50,7 @@ double lambda; - pfs::Array2D* GP; + pfs::Array2Df* GP; int flag; inline double getPixel(int x, int y) { @@ -64,11 +64,14 @@ //////////////////////////////////////////////////////// -class GaussianPyramid { +class GaussianPyramid +{ public: - GaussianPyramid() {}; + GaussianPyramid() + {} - GaussianPyramid(pfs::Array2D* lum_map, int im_height, int im_width) { + 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; @@ -92,12 +95,13 @@ g_weights[4][2] = 0.0200; constructPyramid(lum_map, im_width, im_height); - }; + } - ~GaussianPyramid() { + ~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; @@ -230,11 +234,11 @@ p[index].size = w * h; p[index].kernel_size = k_size; p[index].lambda = lambda; - p[index].GP = new pfs::Array2D(w, h); + p[index].GP = new pfs::Array2Df(w, h); p[index].flag = 1; } - void constructPyramid(pfs::Array2D* lum_map, int im_width, int im_height) { + void constructPyramid(pfs::Array2Df* lum_map, int im_width, int im_height) { initializeNewLevel(0, im_width, im_height, 1, 1.0); for(int y=0; y #include -#include "Common/ProgressHelper.h" #include "Libpfs/array2d.h" #include "Libpfs/frame.h" +#include "Libpfs/progress.h" #include "tmo_ashikhmin02.h" #include "pyramid.h" @@ -42,7 +42,8 @@ //------------------------------------------- -float calc_LAL_interpolated(GaussianPyramid *myPyramid, int x, int y, int s) { +float calc_LAL_interpolated(GaussianPyramid *myPyramid, int x, int y, int s) +{ float ratio = myPyramid->p[s-1].lambda; float newX = (float)x * ratio; @@ -139,7 +140,7 @@ //////////////////////////////////////////////////////// -void getMaxMin(pfs::Array2D* lum_map, float& maxLum, float& minLum) { +void getMaxMin(pfs::Array2Df* lum_map, float& maxLum, float& minLum) { maxLum = minLum = 0.0; for(int i=0; igetCols() * lum_map->getRows(); i++) { @@ -148,7 +149,7 @@ } } -void Normalize(pfs::Array2D* lum_map, int nrows, int ncols) { +void Normalize(pfs::Array2Df* lum_map, int nrows, int ncols) { float maxLum, minLum; getMaxMin(lum_map, maxLum, minLum); float range = maxLum - minLum; @@ -159,7 +160,7 @@ //////////////////////////////////////////////////////// -int tmo_ashikhmin02(pfs::Array2D* Y, pfs::Array2D* L, float maxLum, float minLum, float /*avLum*/, bool simple_flag, float lc_value, int eq, ProgressHelper *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) { assert(Y!=NULL); assert(L!=NULL); @@ -192,10 +193,10 @@ GaussianPyramid *myPyramid = new GaussianPyramid(Y, nrows, ncols); // LAL calculation - pfs::Array2D* la = new pfs::Array2D(ncols, nrows); + pfs::Array2Df* la = new pfs::Array2Df(ncols, nrows); for(int y=0; ynewValue(100*y/nrows); - if (ph->isTerminationRequested()) + ph.setValue(100*y/nrows); + if (ph.canceled()) break; for(int x=0; xnewValue(100*y/nrows); - if (ph->isTerminationRequested()) + ph.setValue(100*y/nrows); + if (ph.canceled()) break; for(int x=0; xnewValue(100*y/nrows); - if (ph->isTerminationRequested()) + ph.setValue(100*y/nrows); + if (ph.canceled()) break; for(int x=0; x -/** - * @brief Michael Ashikhmin tone mapping operator - * - * @param Y [in] image luminance values - * @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 lc_value local contrast threshold - * @param eq chose equation number from the paper (ie equation 2. or 4. ) - */ -int tmo_ashikhmin02(pfs::Array2D* Y, pfs::Array2D* L, float maxLum, float minLum, float avLum, bool simple_flag, float lc_value, int eq, ProgressHelper *ph); +namespace pfs +{ +class Frame; +class Progress; +} -void pfstmo_ashikhmin02(pfs::Frame* inhdrframe, bool simple, float lc_value, int eq, ProgressHelper *ph); +//! \brief Michael Ashikhmin tone mapping operator +//! +//! \param Y [in] image luminance values +//! \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 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); #endif // TMO_ASHIKHMIN02_H diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/drago03/pfstmo_drago03.cpp luminance-hdr-2.3.1/src/TonemappingOperators/drago03/pfstmo_drago03.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/drago03/pfstmo_drago03.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/drago03/pfstmo_drago03.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -34,50 +34,68 @@ #include #include "Libpfs/frame.h" -#include "Common/ProgressHelper.h" +#include "Libpfs/progress.h" +#include "Libpfs/exception.h" #include "tmo_drago03.h" -void pfstmo_drago03(pfs::Frame *frame, float biasValue, ProgressHelper *ph) +namespace +{ +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 pfstmo_drago03(pfs::Frame& frame, float biasValue, pfs::Progress &ph) { std::cout << "pfstmo_drago03 ("; std::cout << "bias: " << biasValue << ")" << std::endl; pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); + frame.getXYZChannels( X, Y, Z ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); //--- - if( Y == NULL ) + if ( Y == NULL ) + { throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + } - pfs::Array2D *Xr = X->getChannelData(); - pfs::Array2D *Yr = Y->getChannelData(); - pfs::Array2D *Zr = Z->getChannelData(); + pfs::Array2Df& Xr = *X; + pfs::Array2Df& Yr = *Y; + pfs::Array2Df& Zr = *Z; - int w = Yr->getCols(); - int h = Yr->getRows(); + int w = Yr.getCols(); + int h = Yr.getRows(); - float maxLum,avLum; - calculateLuminance( w, h, Yr->getRawData(), avLum, maxLum ); + float maxLum; + float avLum; + calculateLuminance(w, h, Yr.data(), avLum, maxLum); - pfs::Array2D* L = new pfs::Array2D(w, h); - tmo_drago03(w, h, Yr->getRawData(), L->getRawData(), maxLum, avLum, biasValue, ph); + pfs::Array2Df L(w, h); + tmo_drago03(Yr, L, maxLum, avLum, biasValue, ph); - for( int x=0 ; xisTerminationRequested()) - ph->newValue( 100 ); - - delete L; + if (!ph.canceled()) + { + ph.setValue( 100 ); + } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/drago03/tmo_drago03.cpp luminance-hdr-2.3.1/src/TonemappingOperators/drago03/tmo_drago03.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/drago03/tmo_drago03.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/drago03/tmo_drago03.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,73 +31,73 @@ #include "tmo_drago03.h" -#include -#include +#include +#include + +#include "Libpfs/frame.h" +#include "Libpfs/progress.h" #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" -/// Type of algorithm -#define FAST 0 +namespace +{ -inline float biasFunc(float b, float x) +inline +float biasFunc(float b, float x) { - return pow(x, b); // pow(x, log(bias)/log(0.5) + return std::pow(x, b); // pow(x, log(bias)/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; + avLum = 0.0f; + maxLum = 0.0f; - int size = width * height; + int size = width * height; - for( int i=0 ; i maxLum ) ? Y[i] : maxLum ; - } - avLum =exp( avLum/ size); + for( int i=0 ; i maxLum ) ? Y[i] : maxLum ; + } + avLum =exp( avLum/ size); } -void tmo_drago03(unsigned int width, unsigned int height, - const float* nY, float* nL, +void tmo_drago03(const pfs::Array2Df& Y, pfs::Array2Df& L, float maxLum, float avLum, float bias, - ProgressHelper *ph) + pfs::Progress &ph) { - const float LOG05 = -0.693147f; // log(0.5) + assert(Y.getRows() == L.getRows()); + assert(Y.getCols() == L.getCols()); - assert(nY!=NULL); - assert(nL!=NULL); + // normalize maximum luminance by average luminance + maxLum /= avLum; - const pfs::Array2D* Y = new pfs::Array2D(width, height, const_cast(nY)); - pfs::Array2D* L = new pfs::Array2D(width, height, nL); + float divider = std::log10(maxLum + 1.0f); + float biasP = log(bias)/LOG05; - int nrows = Y->getRows(); // image size - int ncols = Y->getCols(); - assert(nrows==L->getRows() && ncols==L->getCols() ); - - maxLum /= avLum; // normalize maximum luminance by average luminance - - float divider = log10(maxLum+1.0f); - float biasP = log(bias)/LOG05; - -#if !FAST - // Normal tone mapping of every pixel - for( int y=0 ; ynewValue(100*y/nrows); - if (ph->isTerminationRequested()) - break; - for( int x=0 ; x -/** - * @brief Frederic Drago Logmapping Algorithm - * - * Implementation obtained from source code provided - * by Frederic Drago on 16 May 2003. - * - * @param width image width - * @param height image height - * @param Y [in] image luminance values - * @param L [out] tone mapped values - * @param maxLum maximum luminance in the image - * @param avLum logarithmic average of luminance in the image - * @param bias bias parameter of tone mapping algorithm (eg 0.85) - */ +namespace pfs +{ +class Progress; +} -void tmo_drago03(unsigned int width, unsigned int height, - const float* Y, float* L, - float maxLum, float avLum, float bias, ProgressHelper *ph); +//! \brief Frederic Drago Logmapping Algorithm +//! +//! Original implementation obtained from source code provided +//! by Frederic Drago on 16 May 2003 (pfstmo) +//! +//! \param width image width +//! \param height image height +//! \param Y [in] image luminance values +//! \param L [out] tone mapped values +//! \param maxLum maximum luminance in the image +//! \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); -/** - * @brief Find average and maximum luminance in an image - * - * @param Y [in] image luminance values - * @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 ); +//! \brief Find average and maximum luminance in an image +//! +//! \param Y [in] image luminance values +//! \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); #endif diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/bilateral.cpp luminance-hdr-2.3.1/src/TonemappingOperators/durand02/bilateral.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/bilateral.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/bilateral.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,8 +31,8 @@ #include "arch/math.h" #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" #include "Libpfs/array2d.h" +#include "Libpfs/progress.h" #ifdef BRANCH_PREDICTION #define likely(x) __builtin_expect((x),1) @@ -51,97 +51,104 @@ // support functions -void gaussianKernel( pfs::Array2D *kern, float sigma ) +void gaussianKernel( pfs::Array2Df *kern, float sigma ) { - for( int y = 0; y < kern->getRows(); y++ ) { - for( int x = 0; x < kern->getCols(); x++ ) { - float rx = (float)(x - kern->getCols()/2); - float ry = (float)(y - kern->getRows()/2); - float d2 = rx*rx + ry*ry; - (*kern)(x, y) = exp( -d2 / (2.*sigma*sigma) ); + float sigma2Sqr = 2.0f * sigma * sigma; + int col_2 = kern->getCols() / 2; + int row_2 = kern->getRows() / 2; + for( int y = 0; y < kern->getRows(); y++ ) { + for( 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 ); + } } - } } class GaussLookup { - float *gauss; - float maxVal; - float scaleFactor; - int N; + float *gauss; + float maxVal; + float scaleFactor; + int N; + public: - GaussLookup( float sigma, int N ) : N(N) + GaussLookup( float sigma, int N ) : N(N) { - float sigma2 = sigma*sigma; - maxVal = sqrt(-log(0.01)*2.0*sigma2); - gauss = new float[N]; - for( int i = 0; i < N; i++ ) { - float x = (float)i/(float)(N-1)*maxVal; - gauss[i] = exp(-x*x/(2.0*sigma2)); - } - scaleFactor = (float)(N-1) / maxVal; + 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; + gauss[i] = exp(-x * x / (sigma2Sqr)); + } + scaleFactor = (float)(N-1) / maxVal; } - float getValue( float x ) + ~GaussLookup() { - x = fabs( x ); - if( unlikely( x > maxVal ) ) return 0; - return gauss[ (int)(x*scaleFactor) ]; + delete[] gauss; } + float getValue( float x ) + { + x = fabs( x ); + if( unlikely( x > maxVal ) ) return 0; + return gauss[ (int)(x*scaleFactor) ]; + } }; - - -void bilateralFilter( const pfs::Array2D *I, pfs::Array2D *J, - float sigma_s, float sigma_r, - pfstmo_progress_callback progress_cb ) +void bilateralFilter(const pfs::Array2Df *I, pfs::Array2Df *J, + float sigma_s, float sigma_r, + pfs::Progress& ph) { - const pfs::Array2D *X1 = I; // intensity data // DAVIDE : CHECK THIS! + 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_2 = sKernelSize / 2; - // x +- sigma_s*2 should contain 95% of the Gaussian distrib - int sKernelSize = (int)( sigma_s*4 + 0.5 ) + 1; + pfs::Array2Df sKernel(sKernelSize, sKernelSize); + gaussianKernel( &sKernel, sigma_s ); + GaussLookup gauss( sigma_r, 256 ); - pfs::Array2D sKernel(sKernelSize, sKernelSize); - gaussianKernel( &sKernel, sigma_s ); - GaussLookup gauss( sigma_r, 256 ); - - for( int y = 0; y < I->getRows(); y++ ) - { - progress_cb( y * 100 / I->getRows() ); - - for( int x = 0; x < I->getCols(); x++ ) + for( int y = 0; y < I->getRows(); y++ ) { - float val = 0; - float k = 0; - float I_s = (*X1)(x,y); //!! previously 'I' not 'X1' - - if( unlikely( !finite( I_s ) ) ) - I_s = 0.0f; - - for( int py = max( 0, y - sKernelSize/2); - py < min( I->getRows(), y + sKernelSize/2); py++ ) - { - for( int px = max( 0, x - sKernelSize/2); - px < min( I->getCols(), x + sKernelSize/2); px++ ) - { - float I_p = (*X1)(px, py); //!! previously 'I' not 'X1' - if( unlikely( !finite( 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( !finite( Ixy ) ) ) - Ixy = 0.0f; - - val += Ixy*mult; //!! but here we want 'I' - k += mult; - } - } - //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; + ph.setValue( y * 100 / I->getRows() ); + + for( 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( !finite( I_s ) ) ) + I_s = 0.0f; + + 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( !finite( 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( !finite( Ixy ) ) ) + Ixy = 0.0f; + + val += Ixy * mult; //!! but here we want 'I' + k += mult; + } + } + //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; + } } - } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/bilateral.h luminance-hdr-2.3.1/src/TonemappingOperators/durand02/bilateral.h --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/bilateral.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/bilateral.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,27 +32,24 @@ #ifndef BILATERAL_H #define BILATERAL_H -// forward declaration -class ProgressHelper; - -namespace pfs { - class Array2D; +namespace pfs +{ +class Array2D; +class Progress; } -/** - * @brief Bilateral filtering - * - * Conventional (slow) algorithm. - * - * @param I [in] input array - * @param J [out] filtered array - * @param sigma_s sigma value for spatial kernel - * @param sigma_r sigma value for range kernel - * - * $Id: bilateral.h,v 1.3 2008/09/09 00:56:49 rafm Exp $ - */ -void bilateralFilter( const pfs::Array2D *I, pfs::Array2D *J, - float sigma_s, float sigma_r, - ProgressHelper *ph ); +//! +//! @brief Bilateral filtering +//! +//! Conventional (slow) algorithm. +//! +//! \param I [in] input array +//! \param J [out] filtered array +//! \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); -#endif /* #ifndef _bilateral_h_ */ +#endif /* #ifndef BILATERAL_H */ diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/fastbilateral.cpp luminance-hdr-2.3.1/src/TonemappingOperators/durand02/fastbilateral.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/fastbilateral.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/fastbilateral.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -28,12 +28,12 @@ */ #include +#include + #include -#include #include "Libpfs/array2d.h" -#include "Common/ProgressHelper.h" -#include "TonemappingOperators/pfstmo.h" +#include "Libpfs/progress.h" #include "fastbilateral.h" #ifdef BRANCH_PREDICTION @@ -44,21 +44,8 @@ #define unlikely(x) (x) #endif - using namespace std; - -inline float max( float a, float b ) -{ - return a > b ? a : b; -} - -inline float min( float a, float b ) -{ - return a < b ? a : b; -} - - // TODO: use spatial convolution rather than FFT, should be much // faster except for a very large kernels class GaussianBlur @@ -85,12 +72,12 @@ } - void blur( const pfs::Array2D *I, pfs::Array2D *J ) + void blur( const pfs::Array2Df& I, pfs::Array2Df& J ) { int x,y; - int nx = I->getCols(); - int ny = I->getRows(); + int nx = I.getCols(); + int ny = I.getRows(); int nsize = nx * ny; int ox = nx; @@ -98,7 +85,7 @@ for( y=0 ; ygetCols(); - int h = I->getRows(); + int w = I.getCols(); + int h = I.getRows(); int size = w * h; // find range of values in the input array - float maxI = (*I)(0); - float minI = (*I)(0); - for(i=0 ; imaxI ) ) maxI = v; if( unlikely( vnewValue( j * 100 / NB_SEGMENTS ); - if (ph->isTerminationRequested()) + ph.setValue( j * 100 / NB_SEGMENTS ); + if (ph.canceled()) break; float jI = minI + j*stepI; // current intensity value - for( i=0 ; i jI + stepI ) ) + 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; + if( likely( I(i) > jI ) ) { + float wi = (stepI - (I(i)-jI)) / stepI; + J(i) += (*JJ)(i)*wi; } else - (*J)(i) += (*JJ)(i); + J(i) += (*JJ)(i); } } else if( j == NB_SEGMENTS-1 ) { // if the last segment - to account for the range boundary - for( i=0 ; i0.0f ) ) - (*J)(i) += (*JJ)(i)*wi; + J(i) += (*JJ)(i)*wi; } } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/fastbilateral.h luminance-hdr-2.3.1/src/TonemappingOperators/durand02/fastbilateral.h --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/fastbilateral.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/fastbilateral.h 2013-04-07 18:41:14.000000000 +0000 @@ -31,25 +31,26 @@ #ifndef FASTBILATERAL_H #define FASTBILATERAL_H -class ProgressHelper; +#include -namespace pfs { - class Array2D; +namespace pfs +{ +class Progress; } +//! +//! @brief Fast bilateral filtering +//! +//! Pieceweise linear algorithm (fast). +//! +//! \param I [in] input array +//! \param J [out] filtered array +//! \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, + float sigma_s, float sigma_r, int downsample, + pfs::Progress& ph); -/** - * @brief Fast bilateral filtering - * - * Pieceweise linear algorithm (fast). - * - * @param I [in] input array - * @param J [out] filtered array - * @param sigma_s sigma value for spatial kernel - * @param sigma_r sigma value for range kernel - */ -void fastBilateralFilter( const pfs::Array2D *I, pfs::Array2D *J, - float sigma_s, float sigma_r, int downsample, - ProgressHelper *ph ); +#endif /* #ifndef FASTBILATERAL_H */ -#endif /* #ifndef _fastbilateral_h_ */ diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/pfstmo_durand02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/durand02/pfstmo_durand02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/pfstmo_durand02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/pfstmo_durand02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,60 +31,68 @@ * $Id: pfstmo_durand02.cpp,v 1.5 2009/02/23 19:09:41 rafm Exp $ */ - #include +#include #include -#include "Libpfs/colorspace.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/exception.h" #include "Libpfs/frame.h" #include "tmo_durand02.h" -void pfstmo_durand02(pfs::Frame* frame, float sigma_s, float sigma_r, float baseContrast, ProgressHelper *ph) +namespace pfs +{ +class Progress; +} + +namespace +{ +const int downsample = 1; +const bool original_algorithm = false; +} + +//--- default tone mapping parameters; +//#ifdef HAVE_FFTW3F +// float sigma_s = 40.0f; +//#else +//float sigma_s = 8.0f; +//#endif +//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) { - //--- default tone mapping parameters; - //#ifdef HAVE_FFTW3F - // float sigma_s = 40.0f; - //#else - //float sigma_s = 8.0f; - //#endif - //float sigma_r = 0.4f; - //float baseContrast = 5.0f; - int downsample=1; - bool original_algorithm = false; - - std::cout << "pfstmo_durand02 ("; -#ifdef HAVE_FFTW3F - std::cout << "fftw3f ON"; -#else - std::cout << "fftw3f OFF"; +#ifndef NDEBUG + std::stringstream ss; + + ss << "pfstmo_durand02 ("; + #ifdef HAVE_FFTW3F + ss << "fftw3f ON"; + #else + ss << "fftw3f OFF"; + #endif + ss << ", sigma_s: " << sigma_s; + ss << ", sigma_r: " << sigma_r; + ss << ", base contrast: " << baseContrast << ")"; + + std::cout << ss.str() << std::endl; #endif - std::cout << ", sigma_s: " << sigma_s; - std::cout << ", sigma_r: " << sigma_r; - std::cout << ", base contrast: " << baseContrast << ")" << std::endl; - + pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); + frame.getXYZChannels( X, Y, Z ); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); //--- - - if( Y==NULL || X==NULL || Z==NULL) + + if ( Y == NULL || X == NULL || Z == NULL ) + { throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + } - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); - - // tone mapping - int w = Y->getWidth(); - int h = Y->getHeight(); - - pfs::transformColorSpace(pfs::CS_XYZ, Xr, Yr, Zr, - pfs::CS_RGB, Xr, Yr, Zr); - - tmo_durand02( w, h, X->getRawData(), Y->getRawData(), Z->getRawData(), sigma_s, sigma_r, baseContrast, downsample, !original_algorithm, ph ); - - pfs::transformColorSpace(pfs::CS_RGB, Xr, Yr, Zr, - pfs::CS_XYZ, Xr, Yr, Zr); + tmo_durand02(*X, *Y, *Z, + sigma_s, sigma_r, baseContrast, downsample, !original_algorithm, + ph); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/durand02/tmo_durand02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/durand02/tmo_durand02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/durand02/tmo_durand02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/durand02/tmo_durand02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,10 +35,11 @@ #include #include #include -#include +#include +#include "Libpfs/array2d.h" +#include "Libpfs/progress.h" #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" //#undef HAVE_FFTW3F @@ -48,9 +49,43 @@ #include "bilateral.h" #endif -static void findMaxMinPercentile(pfs::Array2D* I, - float minPrct, float& minLum, - float maxPrct, float& maxLum); +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); + } + return (1.055f * std::pow( value, 1.f/2.4f ) - 0.055f); +} +} /* @@ -69,116 +104,91 @@ */ -void tmo_durand02(unsigned int width, unsigned int height, - float *nR, float *nG, float *nB, - float sigma_s, float sigma_r, float baseContrast, int downsample, - const bool color_correction, - ProgressHelper *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) { - pfs::Array2D* R = new pfs::Array2D(width, height, nR); - pfs::Array2D* G = new pfs::Array2D(width, height, nG); - pfs::Array2D* B = new pfs::Array2D(width, height, nB); - - int i; - int w = R->getCols(); - int h = R->getRows(); - int size = w*h; - pfs::Array2D* I = new pfs::Array2D(w,h); // intensities - pfs::Array2D* BASE = new pfs::Array2D(w,h); // base layer - pfs::Array2D* DETAIL = new pfs::Array2D(w,h); // detail layer - - float min_pos = 1e10f; // minimum positive value (to avoid log(0)) - for( i=0 ; i 0) ) - min_pos = (*I)(i); - } - - for( i=0 ; i 0.0f ) + { + min_pos = I(i); + } + } + + for (int i = 0 ; i < size ; i++) + { + float L = I(i); + if ( L <= 0.0f ) + { + L = min_pos; + } + + R(i) /= L; + G(i) /= L; + B(i) /= L; - (*I)(i) = logf( L ); - } + I(i) = std::log( L ); + } #ifdef HAVE_FFTW3F - fastBilateralFilter( I, BASE, sigma_s, sigma_r, downsample, ph ); + fastBilateralFilter( I, BASE, sigma_s, sigma_r, downsample, ph ); #else - bilateralFilter( I, BASE, sigma_s, sigma_r, ph ); + bilateralFilter( &I, &BASE, sigma_s, sigma_r, ph ); #endif - //!! FIX: find minimum and maximum luminance, but skip 1% of outliers - float maxB,minB; - findMaxMinPercentile(BASE, 0.01f, minB, 0.99f, maxB); - - float compressionfactor = baseContrast / (maxB-minB); - - // Color correction factor - const float k1 = 1.48; - const float k2 = 0.82; - const float s = ( (1 + k1)*pow(compressionfactor,k2) )/( 1 + k1*pow(compressionfactor,k2) ); - - for( i=0 ; iisTerminationRequested()) - ph->newValue( 100 ); + if (!ph.canceled()) + { + ph.setValue( 100 ); + } } - - -/** - * @brief Find minimum and maximum value skipping the extreems - * - */ -static void findMaxMinPercentile(pfs::Array2D* I, - float minPrct, float& minLum, - float maxPrct, float& maxLum) -{ - int size = I->getRows() * I->getCols(); - std::vector vI; - - for( int i=0 ; i -/** - * @brief Fast bilateral filtering - * - * @param width image width - * @param height image height - * @param R red channel - * @param G green channel - * @param B blue channel - * @param sigma_s sigma for spatial kernel - * @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) - */ -void tmo_durand02(unsigned int width, unsigned int height, - float *R, float *G, float *B, - float sigma_s, float sigma_r, float baseContrast, int downsample, - const bool color_correction = true, - ProgressHelper *ph = 0); +namespace pfs +{ +class Progress; +} + +//! +//! \brief Fast bilateral filtering +//! +//! \param width image width +//! \param height image height +//! \param R red channel +//! \param G green channel +//! \param B blue channel +//! \param sigma_s sigma for spatial kernel +//! \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) +//! +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 diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde.cpp luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,14 +35,18 @@ #include "pde.h" #include +#include #include #include #include -#include "Libpfs/vex.h" +#include "Libpfs/progress.h" +#include "Libpfs/vex/vex.h" +#include "Libpfs/vex/sse.h" #include "Libpfs/array2d.h" +#include "Libpfs/manip/copy.h" + #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" using namespace std; @@ -105,7 +109,7 @@ // Full Multigrid Algorithm for solving partial differential equations ////////////////////////////////////////////////////////////////////// -static void restrict( const pfs::Array2D *in, pfs::Array2D *out ) +static void restrict( const pfs::Array2Df *in, pfs::Array2Df *out ) { const float inRows = in->getRows(); const float inCols = in->getCols(); @@ -170,7 +174,7 @@ // } -static void prolongate( const pfs::Array2D *in, pfs::Array2D *out ) +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(); @@ -208,7 +212,7 @@ } } -static void exact_sollution( pfs::Array2D */*F*/, pfs::Array2D *U ) +static void exact_sollution( pfs::Array2Df */*F*/, pfs::Array2Df *U ) { // DEBUG_STR << "exact sollution" << endl; @@ -219,8 +223,10 @@ float h = 1.0/sqrt(sx*sy*1.0f); float h2 = h*h; */ + U->reset(); - setArray( U, 0.0f); return; /* also works well?? */ + /* also works well?? */ + return; // if( sx==3 && sy==3 ) // { @@ -247,7 +253,7 @@ //static int rows, cols; // smooth u using f at level -static void smooth( pfs::Array2D *U, const pfs::Array2D *F ) +static void smooth( pfs::Array2Df *U, const pfs::Array2Df *F ) { // DEBUG_STR << "smooth" << endl; @@ -259,7 +265,7 @@ int iter; float err; - linbcg( n, F->getRawData(), U->getRawData(), BCG_TOL, BCG_STEPS, &iter, &err, rows, cols); + linbcg( n, F->data(), U->data(), BCG_TOL, BCG_STEPS, &iter, &err, rows, cols); // fprintf( stderr, "." ); @@ -296,17 +302,17 @@ // } } -static void calculate_defect( pfs::Array2D *D, const pfs::Array2D *U, const pfs::Array2D *F ) +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); + // float h = 1.0f/sqrt(sx*sy*1.0f); + // float h2i = 1.0/(h*h); - h2i = 1; + // h2i = 1; for( int y=0 ; ygetCols(); int ymax = F->getRows(); @@ -355,17 +360,17 @@ } // given function f restricted on levels - pfs::Array2D** RHS = new pfs::Array2D*[levels+1]; + pfs::Array2Df** RHS = new pfs::Array2Df*[levels+1]; // approximate initial sollutions on levels - pfs::Array2D** IU = new pfs::Array2D*[levels+1]; + pfs::Array2Df** IU = new pfs::Array2Df*[levels+1]; // target functions in cycles (approximate sollution error (uh - ~uh) ) - pfs::Array2D** VF = new pfs::Array2D*[levels+1]; + pfs::Array2Df** VF = new pfs::Array2Df*[levels+1]; - VF[0] = new pfs::Array2D(xmax,ymax); + VF[0] = new pfs::Array2Df(xmax,ymax); RHS[0] = F; - IU[0] = new pfs::Array2D(xmax,ymax); - pfs::copyArray( U, IU[0] ); + IU[0] = new pfs::Array2Df(xmax,ymax); + pfs::copy( U, IU[0] ); int sx=xmax; int sy=ymax; @@ -375,9 +380,9 @@ sx=sx/2+MODYF; sy=sy/2+MODYF; - RHS[k+1] = new pfs::Array2D(sx,sy); - IU[k+1] = new pfs::Array2D(sx,sy); - VF[k+1] = new pfs::Array2D(sx,sy); + 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] ); @@ -389,14 +394,14 @@ // 3. nested iterations for( k=levels-1; k>=0 ; k-- ) { - ph->newValue(20+70*(levels - k)/(levels+1)); + 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) - copyArray( RHS[k], VF[k] ); + pfs::copy( RHS[k], VF[k] ); // 5. V-cycle (twice repeated) for( int cycle=0 ; cyclereset(); // fprintf( stderr, "Level: %d --------\n", k2 ); @@ -417,7 +422,7 @@ // 8. calculate defect at level // d[k2] = Lh * ~u[k2] - f[k2] - pfs::Array2D* D = new pfs::Array2D(IU[k2]->getCols(), IU[k2]->getRows()); + 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 @@ -436,7 +441,7 @@ { // 12. interpolate correction from last coarser-grid to finer-grid // iu[k2+1] -> cor - pfs::Array2D* C = new pfs::Array2D(IU[k2]->getCols(), IU[k2]->getRows()); + 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 @@ -467,7 +472,7 @@ // dumpPFS( name, VF[k], "Y" ); // } - pfs::copyArray( IU[0], U ); + pfs::copy( IU[0], U ); // further improvement of the solution if(BCG_POST_IMPROVE) { @@ -475,14 +480,14 @@ float err; //DEBUG_STR << "FMG: cg post improving ..., maxiter=" << BCG_POST_STEPS; //DEBUG_STR << ", tol=" << BCG_POST_TOL << std::endl; - linbcg( xmax*ymax, F->getRawData(), U->getRawData(), + 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->newValue(90); + ph.setValue(90); delete VF[0]; delete IU[0]; @@ -559,7 +564,7 @@ */ static void linbcg(unsigned long n, const float b[], float x[], float tol, int itmax, int *iter, float *err, int rows, int cols) { - float ak,akden,bk,bkden=1.0,bknum,bnrm=1.0,zm1nrm,znrm; + float ak,akden,bk,bkden=1.0,bknum,bnrm=1.0,zm1nrm,znrm; float *p,*pp,*r,*rr,*z,*zz; p=new float[n+1]; @@ -590,41 +595,41 @@ asolve(rr,zz, rows, cols); bknum=0.0; #pragma omp parallel for shared(z, rr) reduction(+:bknum) if (n>OMP_THRESHOLD) schedule(static) - for (long j=0;j(n);j++) { bknum += z[j]*rr[j]; } if (*iter == 1) { - for (long j=0;j(n);j++) { p[j]=z[j]; } - for (long j=0;j(n);j++) { pp[j]=zz[j]; } } else { bk=bknum/bkden; - VEX_vadds(z, bk, p, p, n); - VEX_vadds(zz, bk, pp, pp, n); + vex::vadds(z, bk, p, p, n); + vex::vadds(zz, bk, pp, pp, n); } bkden=bknum; atimes(p,z,rows,cols); akden=0.0; #pragma omp parallel for shared(z, pp) reduction(+:akden) if (n>OMP_THRESHOLD) schedule(static) - for (long j=0;j(n);j++) { akden += z[j]*pp[j]; } ak=bknum/akden; atimes(pp,zz,rows,cols); - VEX_vadds(x, ak, p, x, n); - VEX_vsubs(r, ak, z, r, n); - VEX_vsubs(rr, ak, zz, rr, n); + vex::vadds(x, ak, p, x, n); + vex::vsubs(r, ak, z, r, n); + vex::vsubs(rr, ak, zz, rr, n); asolve(r,z, rows, cols); - znrm=1.0; - *err=snrm(n,r)/bnrm; + znrm = 1.0f; + *err = snrm(n,r)/bnrm; // fprintf( stderr, "iter=%4d err=%12.6f\n",*iter,*err); if (*err <= tol) break; } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde.h luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde.h --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,10 +32,11 @@ #ifndef FMG_PDE_H #define FMG_PDE_H -class ProgressHelper; +#include -namespace pfs { - class Array2D; +namespace pfs +{ +class Progress; } /** @@ -44,7 +45,7 @@ * @param F array with divergence * @param U [out] sollution */ -void solve_pde_multigrid(pfs::Array2D *F, pfs::Array2D *U, ProgressHelper *ph); +void solve_pde_multigrid(pfs::Array2Df *F, pfs::Array2Df *U, pfs::Progress &ph); /** * @brief solve poisson pde (Laplace U = F) using discrete cosine transform @@ -53,7 +54,8 @@ * @param U [out] solution * @param adjust_bound, adjust boundary values of F to make pde solvable */ -void solve_pde_fft(pfs::Array2D *F, pfs::Array2D *U, ProgressHelper *ph, bool adjust_bound=false); +void solve_pde_fft(pfs::Array2Df *F, pfs::Array2Df *U, + pfs::Progress &ph, bool adjust_bound = false); /** * @brief returns the residual error of the solution U, ie norm(Laplace U - F) @@ -61,7 +63,7 @@ * @param F [in] right hand side * @param U [in] solution */ -float residual_pde(pfs::Array2D *U, pfs::Array2D *F); +float residual_pde(pfs::Array2Df *U, pfs::Array2Df *F); #endif diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde_fft.cpp luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde_fft.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pde_fft.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pde_fft.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,3 +1,34 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * Copyright (C) 2012 Tino Kluge + * + * 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 + * ---------------------------------------------------------------------- + * + */ + +/** + * + * @file pde_fft.cpp + * @brief Direct Poisson solver using the discrete cosine transform + * + * @author Tino Kluge (tino.kluge@hrz.tu-chemnitz.de) + * + */ + ////////////////////////////////////////////////////////////////////// // Direct Poisson solver using the discrete cosine transform ////////////////////////////////////////////////////////////////////// @@ -45,8 +76,8 @@ #include #include +#include "Libpfs/progress.h" #include "Libpfs/array2d.h" -#include "Common/ProgressHelper.h" #include "pde.h" using namespace std; @@ -59,7 +90,7 @@ // returns T = EVy A EVx^tr // note, modifies input data -void transform_ev2normal(pfs::Array2D *A, pfs::Array2D *T) +void transform_ev2normal(pfs::Array2Df *A, pfs::Array2Df *T) { int width = A->getCols(); int height = A->getRows(); @@ -93,7 +124,7 @@ // executes 2d discrete cosine transform fftwf_plan p; - p=fftwf_plan_r2r_2d(height, width, A->getRawData(), T->getRawData(), + p=fftwf_plan_r2r_2d(height, width, A->data(), T->data(), FFTW_REDFT00, FFTW_REDFT00, FFTW_ESTIMATE); fftwf_execute(p); fftwf_destroy_plan(p); @@ -101,7 +132,7 @@ // returns T = EVy^-1 * A * (EVx^-1)^tr -void transform_normal2ev(pfs::Array2D *A, pfs::Array2D *T) +void transform_normal2ev(pfs::Array2Df *A, pfs::Array2Df *T) { int width = A->getCols(); int height = A->getRows(); @@ -109,7 +140,7 @@ // executes 2d discrete cosine transform fftwf_plan p; - p=fftwf_plan_r2r_2d(height, width, A->getRawData(), T->getRawData(), + p=fftwf_plan_r2r_2d(height, width, A->data(), T->data(), FFTW_REDFT00, FFTW_REDFT00, FFTW_ESTIMATE); fftwf_execute(p); fftwf_destroy_plan(p); @@ -145,7 +176,7 @@ } // makes boundary conditions compatible so that a solution exists -void make_compatible_boundary(pfs::Array2D *F) +void make_compatible_boundary(pfs::Array2Df *F) { int width = F->getCols(); int height = F->getRows(); @@ -188,10 +219,10 @@ // not modified and the equation might not have a solution but an // approximate solution with a minimum error is then calculated // double precision version -void solve_pde_fft(pfs::Array2D *F, pfs::Array2D *U, ProgressHelper *ph, - bool adjust_bound) +void solve_pde_fft(pfs::Array2Df *F, pfs::Array2Df *U, pfs::Progress &ph, + bool adjust_bound) { - ph->newValue(20); + ph.setValue(20); //DEBUG_STR << "solve_pde_fft: solving Laplace U = F ..." << std::endl; int width = F->getCols(); int height = F->getRows(); @@ -217,12 +248,13 @@ // transforms F into eigenvector space: Ftr = //DEBUG_STR << "solve_pde_fft: transform F to ev space (fft)" << std::endl; - pfs::Array2D* F_tr = new pfs::Array2D(width,height); + 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->newValue(50); - if (ph->isTerminationRequested()){ + ph.setValue(50); + if (ph.canceled()) + { delete F_tr; return; } @@ -232,10 +264,11 @@ // in the eigenvector space the solution is very simple //DEBUG_STR << "solve_pde_fft: solve in eigenvector space" << std::endl; - pfs::Array2D* U_tr = new pfs::Array2D(width,height); + 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 ; ynewValue(55); + ph.setValue(55); // transforms U_tr back to the normal space //DEBUG_STR << "solve_pde_fft: transform U_tr to normal space (fft)" << std::endl; transform_ev2normal(U_tr, U); delete U_tr; // no longer needed so release memory - ph->newValue(85); + 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 @@ -271,7 +305,7 @@ // fft parallel threads cleanup, better handled outside this function? fftwf_cleanup_threads(); - ph->newValue(90); + ph.setValue(90); //DEBUG_STR << "solve_pde_fft: done" << std::endl; } @@ -283,7 +317,7 @@ // returns the norm of (Laplace U - F) of all interior points // useful to compare solvers -float residual_pde(pfs::Array2D* U, pfs::Array2D* F) +float residual_pde(pfs::Array2Df* U, pfs::Array2Df* F) { int width = U->getCols(); int height = U->getRows(); diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/pfstmo_fattal02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -39,15 +39,16 @@ #include #include "Libpfs/frame.h" -#include "Libpfs/colorspace.h" -#include "Common/ProgressHelper.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/exception.h" +#include "Libpfs/progress.h" namespace { const float epsilon = 1e-4f; } -void pfstmo_fattal02(pfs::Frame* frame, +void pfstmo_fattal02(pfs::Frame& frame, float opt_alpha, float opt_beta, float opt_saturation, @@ -55,7 +56,7 @@ bool newfattal, bool fftsolver, int detail_level, - ProgressHelper *ph) + pfs::Progress &ph) { if (fftsolver) { @@ -67,7 +68,7 @@ { opt_noise = opt_alpha * 0.01f; } - +#ifndef NDEBUG std::stringstream ss; ss << "pfstmo_fattal02 ("; ss << "alpha: " << opt_alpha; @@ -75,56 +76,49 @@ ss << ". saturation: " << opt_saturation; ss << ", noise: " << opt_noise; ss << ", fftsolver: " << fftsolver << ")"; - std::cout << ss.str(); - std::cout << std::endl; - + std::cout << ss.str() << std::endl; +#endif + //Store RGB data temporarily in XYZ channels - pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); + pfs::Channel *R, *G, *B; + frame.getXYZChannels( R, G, B ); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); //--- - if ( Y==NULL || X==NULL || Z==NULL ) + if ( !R || !G || !B ) { throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); } - - pfs::Array2D& Xr = *X->getChannelData(); - pfs::Array2D& Yr = *Y->getChannelData(); - pfs::Array2D& Zr = *Z->getChannelData(); - + // tone mapping - int w = Y->getWidth(); - int h = Y->getHeight(); + int w = frame.getWidth(); + int h = frame.getHeight(); - pfs::Array2D L(w,h); + 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->isTerminationRequested() ) + if ( !ph.canceled() ) { - pfs::Array2D G(w, h); - pfs::Array2D& R = Xr; - pfs::Array2D& B = Zr; - - pfs::transformColorSpace(pfs::CS_XYZ, &Xr, &Yr, &Zr, - pfs::CS_RGB, &R, &G, &B); + 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 ); - R(i) = powf( std::max(R(i)/y, 0.f), opt_saturation ) * l; - G(i) = powf( std::max(G(i)/y, 0.f), opt_saturation ) * l; - B(i) = powf( std::max(B(i)/y, 0.f), opt_saturation ) * l; + 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; } - pfs::transformColorSpace(pfs::CS_RGB, &R, &G, &B, - pfs::CS_XYZ, &Xr, &Yr, &Zr); - - ph->newValue( 100 ); + ph.setValue( 100 ); } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/tmo_fattal02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/tmo_fattal02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/tmo_fattal02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/tmo_fattal02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -33,14 +33,17 @@ #include #include +#include #include #include #include #include +#include "Libpfs/array2d.h" +#include "Libpfs/progress.h" #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" + #include "pde.h" #include "tmo_fattal02.h" @@ -70,7 +73,7 @@ //-------------------------------------------------------------------- -void downSample(const pfs::Array2D& A, pfs::Array2D& B) +void downSample(const pfs::Array2Df& A, pfs::Array2Df& B) { const int width = B.getCols(); const int height = B.getRows(); @@ -93,12 +96,12 @@ } } -void gaussianBlur(const pfs::Array2D& I, pfs::Array2D& L) +void gaussianBlur(const pfs::Array2Df& I, pfs::Array2Df& L) { const int width = I.getCols(); const int height = I.getRows(); - pfs::Array2D T(width,height); + pfs::Array2Df T(width,height); //--- X blur //#pragma omp parallel for shared(I, T) @@ -131,29 +134,29 @@ } } -void createGaussianPyramids( pfs::Array2D* H, pfs::Array2D** pyramids, int nlevels) +void createGaussianPyramids( pfs::Array2Df* H, pfs::Array2Df** pyramids, int nlevels) { int width = H->getCols(); int height = H->getRows(); const int size = width*height; - pyramids[0] = new pfs::Array2D(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(); @@ -199,7 +202,7 @@ //-------------------------------------------------------------------- -void upSample(const pfs::Array2D& A, pfs::Array2D& B) +void upSample(const pfs::Array2Df& A, pfs::Array2Df& B) { const int width = B.getCols(); const int height = B.getRows(); @@ -235,15 +238,15 @@ } -void calculateFiMatrix(pfs::Array2D* FI, pfs::Array2D* 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::Array2D** fi = new pfs::Array2D*[nlevels]; + pfs::Array2Df** fi = new pfs::Array2Df*[nlevels]; - fi[nlevels-1] = new pfs::Array2D(width,height); + fi[nlevels-1] = new pfs::Array2Df(width,height); if (newfattal) { //#pragma omp parallel for shared(fi) @@ -288,7 +291,7 @@ { width = gradients[k-1]->getCols(); height = gradients[k-1]->getRows(); - fi[k-1] = new pfs::Array2D(width,height); + fi[k-1] = new pfs::Array2Df(width,height); } else fi[0] = FI; // highest level -> result @@ -308,14 +311,14 @@ } inline -void findMaxMinPercentile(const pfs::Array2D& I, +void findMaxMinPercentile(const pfs::Array2Df& I, float minPrct, float& minLum, float maxPrct, float& maxLum) { using namespace std; const int size = I.getRows() * I.getCols(); - const float* data = I.getRawData(); + const float* data = I.data(); std::vector vI; copy(data, data + size, back_inserter(vI)); @@ -327,17 +330,15 @@ void tmo_fattal02(size_t width, size_t height, - const pfs::Array2D& Y, - //const float* nY, - pfs::Array2D& L, - //float* nL, + const pfs::Array2Df& Y, + pfs::Array2Df& L, float alfa, float beta, float noise, bool newfattal, bool fftsolver, int detail_level, - ProgressHelper *ph) + pfs::Progress &ph) { static const float black_point = 0.1f; static const float white_point = 0.5f; @@ -346,8 +347,8 @@ if ( detail_level < 0 ) detail_level = 0; if ( detail_level > 3 ) detail_level = 3; - ph->newValue(2); - if (ph->isTerminationRequested()) return; + 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 @@ -371,13 +372,13 @@ minLum = ( Y(i) < minLum ) ? Y(i) : minLum; maxLum = ( Y(i) > maxLum ) ? Y(i) : maxLum; } - pfs::Array2D* H = new pfs::Array2D(width, height); + pfs::Array2Df* H = new pfs::Array2Df(width, height); //#pragma omp parallel for private(i) shared(H, Y, maxLum) for ( int i=0 ; inewValue(4); + ph.setValue(4); // create gaussian pyramids int mins = (widthnewValue(8); + ph.setValue(8); // calculate gradients and its average values on pyramid levels - pfs::Array2D** gradients = new pfs::Array2D*[nlevels]; + pfs::Array2Df** gradients = new pfs::Array2Df*[nlevels]; float* avgGrad = new float[nlevels]; for ( int k=0 ; kgetCols(), pyramids[k]->getRows()); + gradients[k] = new pfs::Array2Df(pyramids[k]->getCols(), pyramids[k]->getRows()); avgGrad[k] = calculateGradients(pyramids[k],gradients[k], k); } - ph->newValue(12); + ph.setValue(12); // calculate fi matrix - pfs::Array2D* FI = new pfs::Array2D(width, height); + 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 ; inewValue(16); - if (ph->isTerminationRequested()){ + ph.setValue(16); + if (ph.canceled()){ delete FI; delete H; return; @@ -426,8 +427,8 @@ // attenuate gradients - pfs::Array2D* Gx = new pfs::Array2D(width, height); - pfs::Array2D* Gy = new pfs::Array2D(width, height); + pfs::Array2Df* Gx = new pfs::Array2Df(width, height); + pfs::Array2Df* Gy = new pfs::Array2Df(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 @@ -457,14 +458,14 @@ } delete H; delete FI; - ph->newValue(18); + ph.setValue(18); // dumpPFS( "Gx.pfs", Gx, "Y" ); // dumpPFS( "Gy.pfs", Gy, "Y" ); // calculate divergence - pfs::Array2D DivG(width, height); + pfs::Array2Df DivG(width, height); for ( size_t y = 0; y < height; ++y ) { for ( size_t x = 0; x < width; ++x ) @@ -483,8 +484,8 @@ } delete Gx; delete Gy; - ph->newValue(20); - if (ph->isTerminationRequested()) + ph.setValue(20); + if (ph.canceled()) { return; } @@ -493,7 +494,7 @@ // solve pde and exponentiate (ie recover compressed image) { - pfs::Array2D U(width, height); + pfs::Array2Df U(width, height); if (fftsolver) { solve_pde_fft(&DivG, &U, ph); @@ -503,8 +504,8 @@ solve_pde_multigrid(&DivG, &U, ph); } printf("\npde residual error: %f\n", residual_pde(&U, &DivG)); - ph->newValue(90); - if ( ph->isTerminationRequested() ) + ph.setValue(90); + if ( ph.canceled() ) { return; } @@ -514,7 +515,7 @@ L(idx) = expf( gamma * U(idx) ); } } - ph->newValue(95); + ph.setValue(95); // remove percentile of min and max values and renormalize float cut_min = 0.01f * black_point; @@ -531,5 +532,5 @@ // note, we intentionally do not cut off values > 1.0 } - ph->newValue(96); + ph.setValue(96); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/tmo_fattal02.h luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/tmo_fattal02.h --- luminance-hdr-2.3.0/src/TonemappingOperators/fattal02/tmo_fattal02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/fattal02/tmo_fattal02.h 2013-04-07 18:41:14.000000000 +0000 @@ -33,36 +33,34 @@ #ifndef TMO_FATTAL02_H #define TMO_FATTAL02_H -#include +#include +#include -namespace pfs { -class Array2D; +namespace pfs +{ +class Progress; } -class ProgressHelper; - -/** - * @brief Gradient Domain High Dynamic Range Compression - * - * Implementation of Gradient Domain High Dynamic Range Compression - * by Raanan Fattal, Dani Lischinski, Michael Werman. - * - * @param width image width - * @param height image height - * @param Y [in] image luminance values - * @param L [out] tone mapped values - * @param alfa parameter alfa (refer to the paper) - * @param beta parameter beta (refer to the paper) - * @param noise gradient level of noise (extra parameter) - */ - +//! \brief Gradient Domain High Dynamic Range Compression +//! +//! Implementation of Gradient Domain High Dynamic Range Compression +//! by Raanan Fattal, Dani Lischinski, Michael Werman. +//! +//! \param width image width +//! \param height image height +//! \param Y [in] image luminance values +//! \param L [out] tone mapped values +//! \param alfa parameter alfa (refer to the paper) +//! \param beta parameter beta (refer to the paper) +//! \param noise gradient level of noise (extra parameter) +//! void tmo_fattal02(size_t width, size_t height, //const float* Y, float* L, - const pfs::Array2D& Y, - pfs::Array2D& L, + const pfs::Array2Df& Y, + pfs::Array2Df& L, float alfa, float beta, float noise, bool newfattal, bool fftsolver, int detail_level, - ProgressHelper *ph); + pfs::Progress &ph); #endif diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/contrast_domain.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/contrast_domain.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/contrast_domain.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/contrast_domain.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,16 +1,8 @@ -/** - * @Brief Contrast mapping TMO - * - * From: - * - * Rafal Mantiuk, Karol Myszkowski, Hans-Peter Seidel. - * A Perceptual Framework for Contrast Processing of High Dynamic Range Images - * In: ACM Transactions on Applied Perception 3 (3), pp. 286-308, 2006 - * http://www.mpi-inf.mpg.de/~mantiuk/contrast_domain/ - * - * This file is a part of LuminanceHDR package, based on pfstmo. +/* + * This file is a part of Luminance HDR package, based on pfstmo. * ---------------------------------------------------------------------- * Copyright (C) 2007 Grzegorz Krawczyk + * Copyright (C) 2010-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 @@ -27,33 +19,53 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- * - * @author Radoslaw Mantiuk, - * @author Rafal Mantiuk, - * Updated 2007/12/17 by Ed Brambley - * (more information on the changes: - * http://www.damtp.cam.ac.uk/user/ejb48/hdr/index.html) - * Updated 2008/06/25 by Ed Brambley - * bug fixes and openMP patches - * more on this: - * http://groups.google.com/group/pfstools/browse_thread/thread/de2378af98ec6185/0dee5304fc14e99d?hl=en#0dee5304fc14e99d - * Optimization improvements by Lebed Dmytry - * - * Updated 2008/07/26 by Dejan Beric - * Added the detail factor slider which offers more control over contrast in details - * Update 2010/10/06 by Axel Voitier - * detail_factor patch in order to remove potential issues in a multithreading environment - * @author Davide Anastasia - * Improvement & Clean up - * @author Bruce Guenter - * Added trivial downsample and upsample functions when both dimension are even - * - * $Id: contrast_domain.cpp,v 1.14 2008/08/26 17:08:49 rafm Exp $ */ +//! \brief Contrast mapping TMO [Mantiuk06] +//! +//! From: +//! +//! Rafal Mantiuk, Karol Myszkowski, Hans-Peter Seidel. +//! A Perceptual Framework for Contrast Processing of High Dynamic Range Images +//! In: ACM Transactions on Applied Perception 3 (3), pp. 286-308, 2006 +//! \ref http://www.mpi-inf.mpg.de/~mantiuk/contrast_domain/ +//! \author Radoslaw Mantiuk, +//! \author Rafal Mantiuk, +//! Updated 2007/12/17 by Ed Brambley +//! (more information on the changes: +//! http://www.damtp.cam.ac.uk/user/ejb48/hdr/index.html) +//! Updated 2008/06/25 by Ed Brambley +//! bug fixes and OpenMP patches +//! more on this: +//! http://tinyurl.com/9plnn8c +//! Optimization improvements by Lebed Dmytry +//! Updated 2008/07/26 by Dejan Beric +//! Added the detail factor slider which offers more control over contrast in +//! details +//! Update 2010/10/06 by Axel Voitier +//! detail_factor patch in order to remove potential issues in a multithreading +//! environment +//! \author Davide Anastasia +//! 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 +//! +//! \note This implementation of Mantiuk06, while originally based on the source +//! code available in PFSTMO, is different in many ways. For this reason, while +//! the file mentions the original authors (and history of the file as well, +//! as above), license applied to this file is uniquely GPL2. If you are looking +//! 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 #ifdef _OPENMP #include @@ -61,1341 +73,444 @@ #include "contrast_domain.h" #include "arch/malloc.h" -#include "arch/minmax.h" #include "arch/math.h" #include "TonemappingOperators/pfstmo.h" -#include "Libpfs/vex.h" -#include "Common/msec_timer.h" - -typedef struct pyramid_s { - int rows; - int cols; - float* Gx; - float* Gy; - struct pyramid_s* next; - struct pyramid_s* prev; -} pyramid_t; - -#define PYRAMID_MIN_PIXELS 3 -#define LOOKUP_W_TO_R 107 -//#define DEBUG_MANTIUK06 - -void contrast_equalization( pyramid_t *pp, const float contrastFactor ); - -void transform_to_luminance(pyramid_t* pyramid, float* const x, ProgressHelper *ph); -void matrix_subtract(const int n, const float* const a, float* const b); -void matrix_copy(const int n, const float* const a, float* const b); -void matrix_multiply_const(const int n, float* const a, const float val); -float* matrix_alloc(const int size); -void matrix_free(float* m); -float matrix_DotProduct(const int n, const float* const a, const float* const b); -void matrix_zero(const int n, float* const m); -void calculate_and_add_divergence(const int rows, const int cols, const float* const Gx, const float* const Gy, float* const divG); -void pyramid_calculate_divergence(pyramid_t* pyramid); -void pyramid_calculate_divergence_sum(pyramid_t* pyramid, float* divG_sum); -void calculate_scale_factor(const int n, const float* const G, float* const C); -void pyramid_calculate_scale_factor(pyramid_t* pyramid, pyramid_t* pC); -void scale_gradient(const int n, float* G, const float* C); -void pyramid_scale_gradient(pyramid_t* pyramid, pyramid_t* pC); -void pyramid_free(pyramid_t* pyramid); -pyramid_t* pyramid_allocate(const int cols, const int rows); -void calculate_gradient(const int cols, const int rows, const float* const lum, float* const Gx, float* const Gy); -void pyramid_calculate_gradient(const pyramid_t* pyramid, const float* lum); -void solveX(const int n, const float* const b, float* const x); -void multiplyA(pyramid_t* px, pyramid_t* pyramid, const float* const x, float* const divG_sum); -void lincg(pyramid_t* pyramid, pyramid_t* pC, const float* const b, float* const x, const int itmax, const float tol, ProgressHelper *ph); -float lookup_table(const int n, const float* const in_tab, const float* const out_tab, const float val); -void transform_to_R(const int n, float* const G, float detail_factor); -void pyramid_transform_to_R(pyramid_t* pyramid, float detail_factor); -void transform_to_G(const int n, float* const R, float detail_factor); -void pyramid_transform_to_G(pyramid_t* pyramid, float detail_factor); -void pyramid_gradient_multiply(pyramid_t* pyramid, const float val); - -void swap_pointers(float* &pOne, float* &pTwo); // utility function - -#ifdef DEBUG_MANTIUK06 - -void dump_matrix_to_file(const int width, const int height, const float* const m, const char * const file_name); -void matrix_show(const char* const text, int rows, int cols, const float* const data); -void pyramid_show(pyramid_t* pyramid); +#include "pyramid.h" -#endif - -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}; +#include "Libpfs/vex/sse.h" +#include "Libpfs/vex/vex.h" +#include "Libpfs/vex/minmax.h" +#include "Libpfs/vex/dotproduct.h" +#include "Libpfs/utils/msec_timer.h" +#include "Libpfs/progress.h" -inline int imin(int a, int b) -{ - return a < b ? a : b; -} - -// upsample the matrix -// upsampled matrix is twice bigger in each direction than data[] -// res should be a pointer to allocated memory for bigger matrix -// cols and rows are the dimensions of the output matrix -void matrix_upsample_full(const int outCols, const int outRows, const float* const in, float* const out) +// divG_sum = A * x = sum(divG(x)) +void multiplyA(PyramidT& px, const PyramidT& pC, + const pfs::Array2Df& x, pfs::Array2Df& sumOfDivG) { - const int inRows = outRows/2; - const int inCols = outCols/2; - - // Transpose of experimental downsampling matrix (theoretically the correct thing to do) - - const float dx = (float)inCols / ((float)outCols); - const float dy = (float)inRows / ((float)outRows); - const float factor = 1.0f / (dx*dy); // This gives a genuine upsampling matrix, not the transpose of the downsampling matrix - // const float factor = 1.0f; // Theoretically, this should be the best. - - #pragma omp parallel for schedule(static) - for (int y = 0; y < outRows; y++) - { - const float sy = y * dy; - const int iy1 = ( y * inRows) / outRows; - const int iy2 = imin(((y+1) * inRows) / outRows, inRows-1); - - for (int x = 0; x < outCols; x++) - { - const float sx = x * dx; - const int ix1 = ( x * inCols) / outCols; - const int ix2 = imin(((x+1) * inCols) / outCols, inCols-1); - - out[x + y*outCols] = (((ix1+1) - sx)*((iy1+1 - sy)) * in[ix1 + iy1*inCols] + - ((ix1+1) - sx)*(sy+dy - (iy1+1)) * in[ix1 + iy2*inCols] + - (sx+dx - (ix1+1))*((iy1+1 - sy)) * in[ix2 + iy1*inCols] + - (sx+dx - (ix1+1))*(sy+dx - (iy1+1)) * in[ix2 + iy2*inCols])*factor; - } - } -} + px.computeGradients( x ); -void matrix_upsample_simple(const int outCols, const int outRows, const float* const in, float* const out) -{ - #pragma omp parallel for schedule(static) - for (int y = 0; y < outRows; y++) - { - const int iy1 = y / 2; - float* outp = out + y*outCols; - const float* inp = in + iy1*(outCols/2); - for (int x = 0; x < outCols; x+=2) - { - const int ix1 = x / 2; - outp[x] = outp[x+1] = inp[ix1]; - } - } -} + // scale gradients by Cx,Cy from main pyramid + px.multiply( pC ); -void matrix_upsample(const int outCols, const int outRows, const float* const in, float* const out) -{ - if (outRows%2 == 0 && outCols%2 == 0) - matrix_upsample_simple(outCols, outRows, in, out); - else - matrix_upsample_full(outCols, outRows, in, out); + // calculate the sum of divergences + px.computeSumOfDivergence( sumOfDivG ); } -// downsample the matrix -void matrix_downsample_full(const int inCols, const int inRows, const float* const data, float* const res) +// conjugate linear equation solver overwrites pyramid! +// +// This version is a slightly modified version by +// Davide Anastasia +// March 25, 2011 +// +namespace { - const int outRows = inRows / 2; - const int outCols = inCols / 2; - - const float dx = (float)inCols / ((float)outCols); - const float dy = (float)inRows / ((float)outRows); - - // 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. - - const float normalize = 1.0f/(dx*dy); -#pragma omp parallel for schedule(static) - for (int y = 0; y < outRows; y++) - { - const int iy1 = ( y * inRows) / outRows; - const int iy2 = ((y+1) * inRows) / outRows; - const float fy1 = (iy1+1) - y * dy; - const float fy2 = (y+1) * dy - iy2; - - for (int x = 0; x < outCols; x++) - { - const int ix1 = ( x * inCols) / outCols; - const int 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 (int i = iy1; i <= iy2 && i < inRows; i++) - { - if (i == iy1) - 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 - else - factory = 1.0f; // We've got the full height of this pixel - for (int j = ix1; j <= ix2 && j < inCols; j++) - { - if (j == ix1) - 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 - else - factorx = 1.0f; // We've got the full width of this pixel - - pixVal += data[j + i*inCols] * factorx * factory; - } - } - - res[x + y * outCols] = pixVal * normalize; // Normalize by the area of the new pixel - } - } +const int NUM_BACKWARDS_CEILING = 3; } -void matrix_downsample_simple(const int inCols, const int inRows, const float* const data, float* const res) -{ - const int outRows = inRows / 2; - const int 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. +void lincg(PyramidT& pyramid, PyramidT& pC, + const pfs::Array2Df& b, pfs::Array2Df& x, + const int itmax, const float tol, + pfs::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; + + pfs::Array2Df x_best(cols, rows); + pfs::Array2Df r(cols, rows); + pfs::Array2Df p(cols, rows); + pfs::Array2Df Ap(cols, rows); + + // bnrm2 = ||b|| + const float bnrm2 = vex::dotProduct(b.data(), n); + + // r = b - Ax + multiplyA(pyramid, pC, x, r); // r = A x + vex::vsub(b.data(), r.data(), r.data(), n); // r = b - r -#pragma omp parallel for schedule(static) - for (int y = 0; y < outRows; y++) - { - const int iy1 = y * 2; - const float* datap = data + iy1 * inCols; - float* resp = res + y * outCols; + // rdotr = r.r + rdotr_best = rdotr_curr = vex::dotProduct(r.data(), n); - for (int x = 0; x < outCols; x++) + // 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 + + const float irdotr = rdotr_curr; + const float percent_sf = 100.0f/std::log(tol2*bnrm2/irdotr); + + int iter = 0; + int num_backwards = 0; + for (; iter < itmax; ++iter) + { + // TEST + ph.setValue( + static_cast(std::log(rdotr_curr/irdotr)*percent_sf) + ); + // User requested abort + if ( ph.canceled() && iter > 0 ) { - const int ix1 = x * 2; - - resp[x] = ( datap[ix1] - + datap[ix1+1] - + datap[ix1 + inCols] - + datap[ix1+1 + inCols]) / 4.0f; + break; } - } -} -void matrix_downsample(const int inCols, const int inRows, const float* const data, float* const res) -{ - if (inCols % 2 == 0 && inRows % 2 == 0) - matrix_downsample_simple(inCols, inRows, data, res); - else - matrix_downsample_full(inCols, inRows, data, res); -} + // Ap = A p + multiplyA(pyramid, pC, p, Ap); -// return = a - b -inline void matrix_subtract(const int n, const float* const a, float* const b) -{ - VEX_vsub(a, b, b, n); -} + // alpha = r.r / (p . Ap) + alpha = rdotr_curr / vex::dotProduct(p.data(), Ap.data(), n); -// copy matix a to b, return = a -inline void matrix_copy(const int n, const float* const a, float* const b) -{ - VEX_vcopy(a, b, n); -} + // r = r - alpha Ap + vex::vsubs(r.data(), alpha, Ap.data(), r.data(), n); -// multiply matrix a by scalar val -inline void matrix_multiply_const(const int n, float* const a, const float val) -{ - VEX_vsmul(a, val, a, n); -} + // rdotr = r.r + rdotr_prev = rdotr_curr; + rdotr_curr = vex::dotProduct(r.data(), n); -// alloc memory for the float table -inline float* matrix_alloc(int size) -{ -#ifdef __APPLE__ - float* m = (float*)malloc (sizeof(float)*size); -#else - float* m = (float*)_mm_malloc (sizeof(float)*size, 32); -#endif - if (m == NULL) - { - fprintf(stderr, "ERROR: malloc in matrix_alloc() (size:%d)", size); - exit(155); - } - return m; -} - -// free memory for matrix -inline void matrix_free(float* m) -{ - if (m != NULL) - { -#ifdef __APPLE__ - free(m); -#else - _mm_free(m); -#endif - m = NULL; - } - else - { - fprintf(stderr, "ERROR: This pointer has already been freed"); - } -} - -// multiply vector by vector (each vector should have one dimension equal to 1) -float matrix_DotProduct(const int n, const float* const a, const float* const b) -{ - float val = 0; - VEX_dotpr(a, b, val, n); - return val; -} - -// set zeros for matrix elements -inline void matrix_zero(int n, float* m) -{ - //bzero(m, n*sizeof(float)); - memset(m, 0, n*sizeof(float)); -} - -// Davide Anastasia (2010 08 31) -// calculate divergence of two gradient maps (Gx and Gy) -// divG(x,y) = Gx(x,y) - Gx(x-1,y) + Gy(x,y) - Gy(x,y-1) -inline void calculate_and_add_divergence(const int COLS, const int ROWS, const float* const Gx, const float* const Gy, float* const divG) -{ - float divGx, divGy; -#pragma omp parallel sections private(divGx, divGy) - { -#pragma omp section + // Have we gone unstable? + if (rdotr_curr > rdotr_prev) { - // kx = 0 AND ky = 0; - divG[0] += Gx[0] + Gy[0]; // OUT - - // ky = 0 - for (int kx=1; kx 0 - for(int kx=1; kxrows*pyramid->cols)/4); - - // Find the coarsest pyramid, and the number of pyramid levels - bool swap = true; - while (pyramid->next != NULL) - { - swap = (!swap); - pyramid = pyramid->next; - } - - // For every level, we swap temp and divG_sum - // So, if there are an odd number of levels... - if (swap) swap_pointers(divG_sum, temp); - - if (pyramid) - { - matrix_zero(pyramid->rows * pyramid->cols, temp); - calculate_and_add_divergence(pyramid->cols, pyramid->rows, pyramid->Gx, pyramid->Gy, temp); - - swap_pointers(divG_sum, temp); - pyramid = pyramid->prev; - } - - while (pyramid) - { - matrix_upsample(pyramid->cols, pyramid->rows, divG_sum, temp); - calculate_and_add_divergence(pyramid->cols, pyramid->rows, pyramid->Gx, pyramid->Gy, temp); - - swap_pointers(divG_sum, temp); - pyramid = pyramid->prev; - } - - matrix_free(temp); -} + // x = x + alpha * p + vex::vadds(x.data(), alpha, p.data(), x.data(), n); -// calculate scale factors (Cx,Cy) for gradients (Gx,Gy) -// C is equal to EDGE_WEIGHT for gradients smaller than GFIXATE or 1.0 otherwise -inline void calculate_scale_factor(const int n, const float* const G, float* const C) -{ - // float GFIXATE = 0.1f; - // float EDGE_WEIGHT = 0.01f; - const float detectT = 0.001f; - const float a = 0.038737f; - const float b = 0.537756f; - - #pragma omp parallel for schedule(static) - for(int i=0; irows * pyramid->cols, pyramid->Gx, pC->Gx); - calculate_scale_factor(pyramid->rows * pyramid->cols, pyramid->Gy, pC->Gy); - - pyramid = pyramid->next; - pC = pC->next; - } -} + if (num_backwards > NUM_BACKWARDS_CEILING) + { + // Reset + num_backwards = 0; + std::copy(x_best.begin(), x_best.end(), x.begin()); -// Scale gradient (Gx and Gy) by C (Cx and Cy) -// G = G * C -inline void scale_gradient(const int n, float* G, const float* C) -{ - VEX_vmul(G, C, G, n); -} + // r = Ax + multiplyA(pyramid, pC, x, r); -// scale gradients for the whole one pyramid with the use of (Cx,Cy) from the other pyramid -void pyramid_scale_gradient(pyramid_t* pyramid, pyramid_t* pC) -{ - while (pyramid != NULL) - { - scale_gradient(pyramid->rows * pyramid->cols, pyramid->Gx, pC->Gx); - scale_gradient(pyramid->rows * pyramid->cols, pyramid->Gy, pC->Gy); - - pyramid = pyramid->next; - pC = pC->next; - } -} + // r = b - r + vex::vsub(b.data(), r.data(), r.data(), n); + // rdotr = r.r + rdotr_best = rdotr_curr = vex::dotProduct(r.data(), r.size()); -// free memory allocated for the pyramid -void pyramid_free(pyramid_t* pyramid) -{ - pyramid_t* t_next; // = pyramid->next; - - while (pyramid) - { - t_next = pyramid->next; - - if (pyramid->Gx != NULL) - { - matrix_free(pyramid->Gx); //free(pyramid->Gx); - pyramid->Gx = NULL; + // p = r + std::copy(r.begin(), r.end(), p.begin()); + } + else + { + // p = r + beta * p + beta = rdotr_curr/rdotr_prev; + vex::vadds(r.data(), beta, p.data(), p.data(), n); + } } - if (pyramid->Gy != NULL) + + // Use the best version we found + if (rdotr_curr > rdotr_best) { - matrix_free(pyramid->Gy); //free(pyramid->Gy); - pyramid->Gy = NULL; + rdotr_curr = rdotr_best; + std::copy(x_best.begin(), x_best.end(), x.begin()); } - - //pyramid->prev = NULL; - //pyramid->next = NULL; - - free(pyramid); - pyramid = t_next; - } -} - -// allocate memory for the pyramid -pyramid_t * pyramid_allocate(int cols, int rows) -{ - pyramid_t* level = NULL; - pyramid_t* pyramid = NULL; - pyramid_t* prev = NULL; - - while (rows >= PYRAMID_MIN_PIXELS && cols >= PYRAMID_MIN_PIXELS) - { - level = (pyramid_t *) malloc(sizeof(pyramid_t)); - if (level == NULL) + if (rdotr_curr/bnrm2 > tol2) { - fprintf(stderr, "ERROR: malloc in pyramid_alloc() (size:%zu)", sizeof(pyramid_t) ); - exit(155); + // Not converged + ph.setValue( + 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::cerr << std::endl + << "pfstmo_mantiuk06: Warning: Not converged "\ + "(going unstable), error = " + << std::sqrt(rdotr_curr/bnrm2) + << " (should be below " << tol << ")" + << std::endl; + } } - memset( level, 0, sizeof(pyramid_t) ); - - level->rows = rows; - level->cols = cols; - const int size = level->rows * level->cols; - level->Gx = matrix_alloc(size); - level->Gy = matrix_alloc(size); - - level->prev = prev; - if (prev != NULL) - prev->next = level; - prev = level; - - if (pyramid == NULL) - pyramid = level; - - rows /= 2; - cols /= 2; - } - - return pyramid; -} - - -// calculate gradients -//TODO: check this implementation in Linux, where the OMP is enabled! -inline void calculate_gradient(const int COLS, const int ROWS, const float* const lum, float* const Gx, float* const Gy) -{ - int Y_IDX, IDX; - - #pragma omp parallel for schedule(static) private(Y_IDX, IDX) - for (int ky = 0; ky < ROWS-1; ky++) - { - Y_IDX = ky*COLS; - for (int kx = 0; kx < COLS-1; kx++) + else { - IDX = Y_IDX + kx; - - Gx[IDX] = lum[IDX + 1] - lum[IDX]; - Gy[IDX] = lum[IDX + COLS] - lum[IDX]; + ph.setValue( itmax ); } - - Gx[Y_IDX + COLS - 1] = 0.0f; // last columns (kx = COLS - 1) - Gy[Y_IDX + COLS - 1] = lum[Y_IDX + COLS - 1 + COLS] - lum[Y_IDX + COLS - 1]; - } - - // last row (ky = ROWS-1) - for (int kx = 0; kx < (COLS-1); kx++) - { - IDX = (ROWS - 1)*COLS + kx; - - Gx[IDX] = lum[IDX + 1] - lum[IDX]; - Gy[IDX] = 0.0f; - } - - // last row & last col = last element - Gx[ROWS*COLS - 1] = 0.0f; - Gy[ROWS*COLS - 1] = 0.0f; } -void swap_pointers(float* &pOne, float* &pTwo) +void transformToLuminance(PyramidT& pp, pfs::Array2Df& Y, + const int itmax, const float tol, + pfs::Progress& ph) { - float* pTemp = pOne; - pOne = pTwo; - pTwo = pTemp; -} + PyramidT pC = pp; // copy ctor -// calculate gradients for the pyramid -// lum_temp WILL NOT BE overwritten! -void pyramid_calculate_gradient(const pyramid_t* pyramid, const float* Y /*lum_temp*/) -{ - float* buffer1 = matrix_alloc((pyramid->rows*pyramid->cols)/4); // /4 - float* buffer2 = matrix_alloc((pyramid->rows*pyramid->cols)/16); // /16 - - float* p_t1 = buffer1; - float* p_t2 = buffer2; - - calculate_gradient(pyramid->cols, pyramid->rows, Y, pyramid->Gx, pyramid->Gy); - - pyramid_t* py_curr = pyramid->next; - pyramid_t* py_prev = py_curr->prev; - - if (py_curr) - { - matrix_downsample(py_prev->cols, py_prev->rows, Y, p_t1); - calculate_gradient(py_curr->cols, py_curr->rows, p_t1, py_curr->Gx, py_curr->Gy); - - py_prev = py_curr; - py_curr = py_curr->next; - } - - while (py_curr) - { - matrix_downsample(py_prev->cols, py_prev->rows, p_t1, p_t2); - calculate_gradient(py_curr->cols, py_curr->rows, p_t2, py_curr->Gx, py_curr->Gy); - - // swap pointers - swap_pointers(p_t1, p_t2); - - py_prev = py_curr; - py_curr = py_curr->next; - } - - matrix_free(buffer1); - matrix_free(buffer2); -} + pp.computeScaleFactors( pC ); -// x = -0.25 * b -inline void solveX(const int n, const float* const b, float* const x) -{ - VEX_vsmul(b, (-0.25f), x, n); -} + // pyramidScaleGradient(pp, pC); + pp.multiply( pC ); -// divG_sum = A * x = sum(divG(x)) -inline void multiplyA(pyramid_t* px, pyramid_t* pC, const float* const x, float* const divG_sum) -{ - pyramid_calculate_gradient(px, x); // x won't be changed - pyramid_scale_gradient(px, pC); // scale gradients by Cx,Cy from main pyramid - pyramid_calculate_divergence_sum(px, divG_sum); // calculate the sum of divergences -} + // size of the first level of the pyramid + pfs::Array2Df b( pp.getCols(), pp.getRows() ); + // calculate the sum of divergences (equal to b) + pp.computeSumOfDivergence( b ); -// conjugate linear equation solver -// overwrites pyramid! -// This version is a slightly modified version by Davide Anastasia -// March 25, 2011 -void lincg(pyramid_t* pyramid, pyramid_t* pC, const float* const b, float* const x, const int itmax, const float tol, ProgressHelper *ph) -{ - const int num_backwards_ceiling = 3; - - float rdotr_curr, rdotr_prev, rdotr_best; - float alpha, beta; - -#ifdef TIMER_PROFILING - msec_timer f_timer; - f_timer.start(); -#endif - - const int rows = pyramid->rows; - const int cols = pyramid->cols; - const int n = rows*cols; - const float tol2 = tol*tol; - - float* const x_best = matrix_alloc(n); - float* const r = matrix_alloc(n); - float* const p = matrix_alloc(n); - float* const Ap = matrix_alloc(n); - - // bnrm2 = ||b|| - const float bnrm2 = matrix_DotProduct(n, b, b); - - // r = b - Ax - multiplyA(pyramid, pC, x, r); // r = A x - matrix_subtract(n, b, r); // r = b - r - - // rdotr = r.r - rdotr_best = rdotr_curr = matrix_DotProduct(n, r, r); - - // Setup initial vector - matrix_copy(n, r, p); // p = r - matrix_copy(n, x, x_best); - - const float irdotr = rdotr_curr; - const float percent_sf = 100.0f/logf(tol2*bnrm2/irdotr); - - int iter = 0; - int num_backwards = 0; - for (; iter < itmax; iter++) - { - // TEST - ph->newValue( (int) (logf(rdotr_curr/irdotr)*percent_sf)); - // User requested abort - if (ph->isTerminationRequested() && iter > 0 ) - { - break; - } - - // Ap = A p - multiplyA(pyramid, pC, p, Ap); - - // alpha = r.r / (p . Ap) - alpha = rdotr_curr / matrix_DotProduct(n, p, Ap); - - // r = r - alpha Ap - #pragma omp parallel for schedule(static) - for (int i = 0; i < n; i++) - { - r[i] -= alpha * Ap[i]; - } - - // rdotr = r.r - rdotr_prev = rdotr_curr; - rdotr_curr = matrix_DotProduct(n, r, r); - - // Have we gone unstable? - if (rdotr_curr > rdotr_prev) - { - // Save where we've got to - if (num_backwards == 0 && rdotr_prev < rdotr_best) - { - rdotr_best = rdotr_prev; - matrix_copy(n, x, x_best); - } - - num_backwards++; - } - else - { - num_backwards = 0; - } - - // x = x + alpha * p - #pragma omp parallel for schedule(static) - for (int i = 0; i < n; i++) - { - x[i] += alpha * p[i]; - } - - // Exit if we're done - // fprintf(stderr, "iter:%d err:%f\n", iter+1, sqrtf(rdotr/bnrm2)); - if (rdotr_curr/bnrm2 < tol2) - break; - - if (num_backwards > num_backwards_ceiling) - { - // Reset - num_backwards = 0; - matrix_copy(n, x_best, x); - - // r = Ax - multiplyA(pyramid, pC, x, r); - - // r = b - r - matrix_subtract(n, b, r); - - // rdotr = r.r - rdotr_best = rdotr_curr = matrix_DotProduct(n, r, r); - - // p = r - matrix_copy(n, r, p); - } - else - { - // p = r + beta p - beta = rdotr_curr/rdotr_prev; - - #pragma omp parallel for schedule(static) - for (int i = 0; i < n; i++) - { - p[i] = r[i] + beta*p[i]; - } - } - } - - // Use the best version we found - if (rdotr_curr > rdotr_best) - { - rdotr_curr = rdotr_best; - matrix_copy(n, x_best, x); - } - - if (rdotr_curr/bnrm2 > tol2) - { - // Not converged - ph->newValue( (int) (logf(rdotr_curr/irdotr)*percent_sf)); - if (iter == itmax) - { - fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (hit maximum iterations), error = %g (should be below %g).\n", sqrtf(rdotr_curr/bnrm2), tol); - } - else - { - fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (going unstable), error = %g (should be below %g).\n", sqrtf(rdotr_curr/bnrm2), tol); - } - } - else - { - ph->newValue( itmax ); - } - - matrix_free(x_best); - matrix_free(p); - matrix_free(Ap); - matrix_free(r); - -#ifdef TIMER_PROFILING - f_timer.stop_and_update(); - std::cout << "lincg() = " << f_timer.get_time() << " msec" << std::endl; -#endif + // calculate luminances from gradients + lincg(pp, pC, b, Y, itmax, tol, ph); } -// conjugate linear equation solver -// overwrites pyramid! -//void lincg(pyramid_t* pyramid, pyramid_t* pC, const float* const b, float* const x, const int itmax, const float tol, ProgressHelper *ph) -//{ -// const int num_backwards_ceiling = 3; -// -//#ifdef TIMER_PROFILING -// //msec_timer f_timer; -// //f_timer.start(); -//#endif -// -// const int rows = pyramid->rows; -// const int cols = pyramid->cols; -// const int n = rows*cols; -// const float tol2 = tol*tol; -// -// float* const x_save = matrix_alloc(n); -// float* const r = matrix_alloc(n); -// float* const p = matrix_alloc(n); -// float* const Ap = matrix_alloc(n); -// -// // bnrm2 = ||b|| -// const float bnrm2 = matrix_DotProduct(n, b, b); -// -// // r = b - Ax -// multiplyA(pyramid, pC, x, r); -// matrix_subtract(n, b, r); -// -// // rdotr = r.r -// float rdotr = matrix_DotProduct(n, r, r); -// -// // p = r -// matrix_copy(n, r, p); -// -// // Setup initial vector -// float saved_rdotr = rdotr; -// matrix_copy(n, x, x_save); -// -// const float irdotr = rdotr; -// const float percent_sf = 100.0f/logf(tol2*bnrm2/irdotr); -// int iter = 0; -// int num_backwards = 0; -// -// for (; iter < itmax; iter++) -// { -// // TEST -// ph->newValue( (int) (logf(rdotr/irdotr)*percent_sf) ); -// if (ph->isTerminationRequested() && iter > 0 ) // User requested abort -// break; -// -// // Ap = A p -// multiplyA(pyramid, pC, p, Ap); -// -// // alpha = r.r / (p . Ap) -// const float alpha = rdotr / matrix_DotProduct(n, p, Ap); -// -// // r = r - alpha Ap -// VEX_vsubs(r, alpha, Ap, r, n); -// -// // rdotr = r.r -// const float old_rdotr = rdotr; -// rdotr = matrix_DotProduct(n, r, r); -// -// // Have we gone unstable? -// if (rdotr > old_rdotr) -// { -// // Save where we've got to -// if (num_backwards == 0 && old_rdotr < saved_rdotr) -// { -// saved_rdotr = old_rdotr; -// matrix_copy(n, x, x_save); -// } -// -// num_backwards++; -// } -// else -// { -// num_backwards = 0; -// } -// -// // x = x + alpha * p -// VEX_vadds(x, alpha, p, x, n); -// -// // Exit if we're done -// // fprintf(stderr, "iter:%d err:%f\n", iter+1, sqrtf(rdotr/bnrm2)); -// if (rdotr/bnrm2 < tol2) -// break; -// -// if (num_backwards > num_backwards_ceiling) -// { -// // Reset -// num_backwards = 0; -// matrix_copy(n, x_save, x); -// -// // r = Ax -// multiplyA(pyramid, pC, x, r); -// -// // r = b - r -// matrix_subtract(n, b, r); -// -// // rdotr = r.r -// rdotr = matrix_DotProduct(n, r, r); -// saved_rdotr = rdotr; -// -// // p = r -// matrix_copy(n, r, p); -// } -// else -// { -// // p = r + beta p -// const float beta = rdotr/old_rdotr; -// VEX_vadds(r, beta, p, p, n); -// } -// } -// -// // Use the best version we found -// if (rdotr > saved_rdotr) -// { -// rdotr = saved_rdotr; -// matrix_copy(n, x_save, x); -// } -// -// if (rdotr/bnrm2 > tol2) -// { -// // Not converged -// ph->newValue( (int) (logf(rdotr/irdotr)*percent_sf)); -// if (iter == itmax) -// fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (hit maximum iterations), error = %g (should be below %g).\n", sqrtf(rdotr/bnrm2), tol); -// else -// fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (going unstable), error = %g (should be below %g).\n", sqrtf(rdotr/bnrm2), tol); -// } -// else -// ph->newValue(100); -// -// matrix_free(x_save); -// matrix_free(p); -// matrix_free(Ap); -// matrix_free(r); -// -//#ifdef TIMER_PROFILING -// //f_timer.stop_and_update(); -// //std::cout << "lincg() = " << f_timer.get_time() << " msec" << std::endl; -//#endif -//} - - -// in_tab and out_tab should contain inccreasing float values -inline float lookup_table(const int n, const float* const in_tab, const float* const out_tab, const float val) +struct HistData { - if (unlikely(val < in_tab[0])) - return out_tab[0]; - - for (int 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; + float data; + float cdf; + size_t index; +}; + +struct HistDataCompareData { + bool operator()(const HistData& v1, const HistData& v2) const { + return (v1.data < v2.data); } - } - - return out_tab[n-1]; -} +}; +struct HistDataCompareIndex { + bool operator()(const HistData& v1, const HistData& v2) const { + return (v1.index < v2.index); + } +}; -// transform gradient (Gx,Gy) to R -inline void transform_to_R(const int n, float* const G, float detail_factor) +void contrastEqualization(PyramidT& pp, const float contrastFactor) { - const float log10=2.3025850929940456840179914546844*detail_factor; - - #pragma omp parallel for schedule(static) - for (int j=0; jsize(); } - - G[j] = Curr_G; - } -} -// transform from R to G -inline void transform_to_G(const int n, float* const R, float detail_factor) -{ - //here we are actually changing the base of logarithm - const float log10 = 2.3025850929940456840179914546844*detail_factor; - -#pragma omp parallel for schedule(static) - for(int j=0; j hist(totalPixels); + + // Build histogram info + size_t offset = 0; + for ( PyramidT::const_iterator itCurr = pp.begin(), itEnd = pp.end(); + itCurr != itEnd; + ++itCurr) { - Curr_R = -lookup_table(LOOKUP_W_TO_R, R_table, W_table, -Curr_R); - } else { - Curr_R = lookup_table(LOOKUP_W_TO_R, R_table, W_table, Curr_R); + 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) + ); + hist[offset].index = offset; + + offset++; + } } - - // W to G - if (Curr_R < 0.0f) + + 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) { - Curr_R = -log((-Curr_R) + 1.0f) / log10; - } else { - Curr_R = log(Curr_R + 1.0f) / log10; + hist[idx].cdf = idx*normalizationFactor; } - - R[j] = Curr_R; - } -} + // 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 ); -// transform gradient (Gx,Gy) to R for the whole pyramid -inline void pyramid_transform_to_R(pyramid_t* pyramid, float detail_factor) -{ - while (pyramid != NULL) - { - transform_to_R(pyramid->rows * pyramid->cols, pyramid->Gx, detail_factor); - transform_to_R(pyramid->rows * pyramid->cols, pyramid->Gy, detail_factor); - - pyramid = pyramid->next; - } -} + //Remap gradient magnitudes + offset = 0; + 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) + { + float scaleFactor = + contrastFactor * hist[offset].cdf / hist[offset].data; + *xyGradIter *= scaleFactor; -// transform from R to G for the pyramid -inline void pyramid_transform_to_G(pyramid_t* pyramid, float detail_factor) -{ - while (pyramid != NULL) - { - transform_to_G(pyramid->rows*pyramid->cols, pyramid->Gx, detail_factor); - transform_to_G(pyramid->rows*pyramid->cols, pyramid->Gy, detail_factor); - - pyramid = pyramid->next; - } + offset++; + } + } } -// multiply gradient (Gx,Gy) values by float scalar value for the whole pyramid -inline void pyramid_gradient_multiply(pyramid_t* pyramid, const float val) +namespace { - while (pyramid != NULL) - { - matrix_multiply_const(pyramid->rows*pyramid->cols, pyramid->Gx, val); - matrix_multiply_const(pyramid->rows*pyramid->cols, pyramid->Gy, val); - - pyramid = pyramid->next; - } -} +const float CUT_MARGIN = 0.1f; +const float DISP_DYN_RANGE = 2.3f; - -int sort_float(const void* const v1, const void* const v2) +void normalizeLuminanceAndRGB(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, + pfs::Array2Df& Y) { - if (*((float*)v1) < *((float*)v2)) - return -1; - - if(likely(*((float*)v1) > *((float*)v2))) - return 1; - - return 0; -} + const float Ymax = vex::maxElement(Y.data(), Y.size()); + const float clip_min = 1e-7f*Ymax; + // std::cout << "clip_min = " << clip_min << std::endl; + // std::cout << "Ymax = " << Ymax << std::endl; +#pragma omp parallel for + for (int idx = 0; idx < 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; -// transform gradients to luminance -void transform_to_luminance(pyramid_t* pp, float* const x, ProgressHelper *ph, const int itmax, const float tol) -{ - pyramid_t* pC = pyramid_allocate(pp->cols, pp->rows); - pyramid_calculate_scale_factor(pp, pC); // calculate (Cx,Cy) - pyramid_scale_gradient(pp, pC); // scale small gradients by (Cx,Cy); - - float* b = matrix_alloc(pp->cols * pp->rows); - pyramid_calculate_divergence_sum(pp, b); // calculate the sum of divergences (equal to b) - - // calculate luminances from gradients - lincg(pp, pC, b, x, itmax, tol, ph); - - matrix_free(b); - pyramid_free(pC); -} + float currY = 1.f/Y(idx); + R(idx) *= currY; + G(idx) *= currY; + B(idx) *= currY; + Y(idx) = std::log10( Y(idx) ); + } +} -struct hist_data +/* Renormalize luminance */ +void denormalizeLuminance(pfs::Array2Df& Y) { - float size; - float cdf; - int index; -}; + const size_t size = Y.size(); -int hist_data_order(const void* const v1, const void* const v2) -{ - if (((struct hist_data*) v1)->size < ((struct hist_data*) v2)->size) - return -1; - - if (((struct hist_data*) v1)->size > ((struct hist_data*) v2)->size) - return 1; - - return 0; -} + std::vector temp(size); + std::copy(Y.begin(), Y.end(), temp.begin()); + std::sort(temp.begin(), temp.end()); -int hist_data_index(const void* const v1, const void* const v2) -{ - return ((struct hist_data*) v1)->index - ((struct hist_data*) v2)->index; -} + 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); -void contrast_equalization(pyramid_t *pp, const float contrastFactor) -{ - // Count sizes - int total_pixels = 0; - pyramid_t* l = pp; - while (l != NULL) - { - total_pixels += l->rows * l->cols; - l = l->next; - } - - // Allocate memory - struct hist_data* hist = (struct hist_data*) malloc(sizeof(struct hist_data) * total_pixels); - if (hist == NULL) - { - fprintf(stderr, "ERROR: malloc in contrast_equalization() (size:%zu)", sizeof(struct hist_data) * total_pixels); - exit(155); - } - - // Build histogram info - l = pp; - int index = 0; - while ( l != NULL ) - { - const int pixels = l->rows*l->cols; - const int offset = index; - #pragma omp parallel for schedule(static) - for(int c = 0; c < pixels; c++) - { - hist[c+offset].size = sqrtf( l->Gx[c]*l->Gx[c] + l->Gy[c]*l->Gy[c] ); - hist[c+offset].index = c + offset; - } - index += pixels; - l = l->next; - } - - // Generate histogram - qsort(hist, total_pixels, sizeof(struct hist_data), hist_data_order); - - // Calculate cdf - const float norm = 1.0f / (float) total_pixels; - #pragma omp parallel for schedule(static) - for (int i = 0; i < total_pixels; i++) - { - hist[i].cdf = ((float) i) * norm; - } - - // Recalculate in terms of indexes - qsort(hist, total_pixels, sizeof(struct hist_data), hist_data_index); - - //Remap gradient magnitudes - l = pp; - index = 0; - while ( l != NULL ) - { - const int pixels = l->rows*l->cols; - const int offset = index; - - #pragma omp parallel for schedule(static) - for( int c = 0; c < pixels; c++) + 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++) { - const float scale = contrastFactor * hist[c+offset].cdf/hist[c+offset].size; - l->Gx[c] *= scale; - l->Gy[c] *= scale; - } - index += pixels; - l = l->next; - } - - free(hist); + Y(j) = (Y(j) - lumMin)*lumRange - DISP_DYN_RANGE; // x scaled + } } - -// tone mapping -int tmo_mantiuk06_contmap(const int c, const int r, float* const R, float* const G, float* const B, float* const Y, const float contrastFactor, const float saturationFactor, float detailfactor, const int itmax, const float tol, ProgressHelper *ph) +template +inline +T decode(const T& value) { - const int n = c*r; - - /* Normalize */ - float Ymax = Y[0]; - for (int j = 1; j < n; j++) - if (Y[j] > Ymax) - Ymax = Y[j]; - - const float clip_min = 1e-7f*Ymax; - - //TODO: use VEX, if you can - #pragma omp parallel for schedule(static) - for (int j = 0; j < n; j++) - { - if ( unlikely(R[j] < clip_min) ) R[j] = clip_min; - if ( unlikely(G[j] < clip_min) ) G[j] = clip_min; - if ( unlikely(B[j] < clip_min) ) B[j] = clip_min; - if ( unlikely(Y[j] < clip_min) ) Y[j] = clip_min; - } - - //TODO: use VEX - #pragma omp parallel for schedule(static) - for(int j=0;j 0.0f) - { - pyramid_gradient_multiply(pp, contrastFactor); // Contrast mapping - } - else - { - contrast_equalization(pp, -contrastFactor); // Contrast equalization - } - - pyramid_transform_to_G(pp, detailfactor); // transform R to gradients - transform_to_luminance(pp, Y, ph, itmax, tol); // transform gradients to luminance Y - pyramid_free(pp); - - /* Renormalize luminance */ - float* temp = matrix_alloc(n); - - matrix_copy(n, Y, temp); // copy Y to temp - qsort(temp, n, sizeof(float), sort_float); // sort temp in ascending order - - // const float median = (temp[(int)((n-1)/2)] + temp[(int)((n-1)/2+1)]) * 0.5f; // calculate median - const float CUT_MARGIN = 0.1f; - - float trim = (n-1) * CUT_MARGIN * 0.01f; - float delta = trim - floorf(trim); - const float l_min = temp[(int)floorf(trim)] * delta + temp[(int)ceilf(trim)] * (1.0f-delta); - - trim = (n-1) * (100.0f - CUT_MARGIN) * 0.01f; - delta = trim - floorf(trim); - const float l_max = temp[(int)floorf(trim)] * delta + temp[(int)ceilf(trim)] * (1.0f-delta); - - matrix_free(temp); - - const float disp_dyn_range = 2.3f; - - //TODO: is it possible to use VEX? - #pragma omp parallel for schedule(static) - for(int j=0; j(Y.size()); -// display matrix in the console (debugging) -void matrix_show(const char* const text, int cols, int rows, const float* const data) -{ - const int _cols = cols; - - if(rows > 8) - rows = 8; - if(cols > 8) - cols = 8; - - printf("\n%s\n", text); - for(int ky=0; kynext != NULL) - { - pyramid = pyramid->next; - } - - while (pyramid != NULL) - { - printf("\n----- pyramid_t level %d,%d\n", pyramid->cols, pyramid->rows); - - sprintf(ss, "Gx %p ", pyramid->Gx); - if (pyramid->Gx != NULL) +// tone mapping +int tmo_mantiuk06_contmap(pfs::Array2Df& R, pfs::Array2Df& G, pfs::Array2Df& B, + pfs::Array2Df& Y, + const float contrastFactor, + const float saturationFactor, + float detailfactor, + const int itmax, + const float tol, + pfs::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 size_t r = R.getRows(); + const size_t c = R.getCols(); + // const size_t n = r*c; + + normalizeLuminanceAndRGB(R, G, B, Y); + + // create pyramid + PyramidT pp(r, c); + // calculate gradients for pyramid (Y won't be changed) + pp.computeGradients( Y ); + // transform gradients to R + pp.transformToR( detailfactor ); + + // Contrast map + if ( contrastFactor > 0.0f ) { - matrix_show(ss,pyramid->cols, pyramid->rows, pyramid->Gx); + // Contrast mapping + pp.scale( contrastFactor ); } - sprintf(ss, "Gy %p ", pyramid->Gy); - if (pyramid->Gy != NULL) + else { - matrix_show(ss,pyramid->cols, pyramid->rows, pyramid->Gy); + // Contrast equalization + contrastEqualization(pp, -contrastFactor); } - - pyramid = pyramid->prev; - } -} -#endif + // transform R to gradients + pp.transformToG( detailfactor ); + // transform gradients to luminance Y (pp -> Y) + transformToLuminance(pp, Y, itmax, tol, ph); + + denormalizeLuminance(Y); + denormalizeRGB(R, G, B, Y, saturationFactor); + + return PFSTMO_OK; +} diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/contrast_domain.h luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/contrast_domain.h --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/contrast_domain.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/contrast_domain.h 2013-04-07 18:41:14.000000000 +0000 @@ -33,30 +33,32 @@ * * $Id: contrast_domain.h,v 1.7 2008/06/16 22:17:47 rafm Exp $ */ + #ifndef CONTRAST_DOMAIN_H #define CONTRAST_DOMAIN_H #include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" +#include -/** - * @brief: Tone mapping algorithm [Mantiuk2006] - * - * @param R red channel - * @param G green channel - * @param B blue channel - * @param Y luminance channel - * @param contrastFactor contrast scaling factor (in 0-1 range) - * @param saturationFactor color desaturation (in 0-1 range) - * @param itmax maximum number of iterations for convergence (typically 50) - * @param tol tolerence to get within for convergence (typically 1e-3) - * @param progress_cb callback function that reports progress - * @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 tmo_mantiuk06_contmap( int cols, int rows, float* R, float* G, float* B, float* Y, - float contrastFactor, float saturationFactor, float detailFactor, - int itmax = 200, float tol = 1e-3, ProgressHelper *ph = NULL); +//! \brief: Tone mapping algorithm [Mantiuk2006] +//! +//! \param R red channel +//! \param G green channel +//! \param B blue channel +//! \param Y luminance channel +//! \param contrastFactor contrast scaling factor (in 0-1 range) +//! \param saturationFactor color desaturation (in 0-1 range) +//! \param itmax maximum number of iterations for convergence (typically 50) +//! \param tol tolerence to get within for convergence (typically 1e-3) +//! \param ph callback class that reports progress +//! \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 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.3.0/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pfstmo_mantiuk06.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -34,78 +34,68 @@ * $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.h" -//#include "Common/msec_timer.h" +#include "Libpfs/frame.h" +#include "Libpfs/colorspace/colorspace.h" -void pfstmo_mantiuk06(pfs::Frame* frame, float scaleFactor, float saturationFactor, float detailFactor, bool cont_eq, ProgressHelper *ph) + +//--- default tone mapping parameters; +// float scaleFactor = 0.1f; +// float saturationFactor = 0.8f; +// bool cont_map = false, cont_eq = false +// bool cont_map = false; + +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) { -//#ifdef TIMER_PROFILING -// msec_timer f_timer; -//#endif - - //--- default tone mapping parameters; - //float scaleFactor = 0.1f; - //float saturationFactor = 0.8f; - //bool cont_map = false, cont_eq = false - //bool cont_map = false; - int itmax = 200; - float tol = 1e-3f; - - std::cout << "pfstmo_mantiuk06 ("; - if (!cont_eq) - { - std::cout << "Mode: Contrast Mapping, "; - } - else - { - scaleFactor = -scaleFactor; - std::cout << "Mode: Contrast Equalization, "; - } - - std::cout << "scaleFactor: " << scaleFactor; - std::cout << ", saturationFactor: " << saturationFactor; - std::cout << ", detailFactor: " << detailFactor << ")" << std::endl; - - pfs::Channel *inX, *inY, *inZ; - frame->getXYZChannels(inX, inY, inZ); - - int cols = frame->getWidth(); - int rows = frame->getHeight(); - - pfs::Array2D* Xr = inX->getChannelData(); - pfs::Array2D* Yr = inY->getChannelData(); - pfs::Array2D* Zr = inZ->getChannelData(); - - pfs::Array2D* G = new pfs::Array2D( cols, rows ); - - pfs::transformColorSpace( pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, Xr, G, Zr ); - -//#ifdef TIMER_PROFILING -// f_timer.start(); -//#endif - - tmo_mantiuk06_contmap(cols, rows, inX->getRawData(), G->getRawData(), inZ->getRawData(), inY->getRawData(), - scaleFactor, saturationFactor, detailFactor, itmax, tol, ph); - -//#ifdef TIMER_PROFILING -// f_timer.stop_and_update(); -//#endif - if ( !ph->isTerminationRequested() ) - { - pfs::transformColorSpace( pfs::CS_RGB, Xr, G, Zr, pfs::CS_XYZ, Xr, Yr, Zr ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); - } - - delete G; -//#ifdef TIMER_PROFILING -// std::cout << "pfstmo_mantiuk06() = " << f_timer.get_time() << " msec" << std::endl; -//#endif +#ifndef NDEBUG + std::stringstream ss; + + ss << "pfstmo_mantiuk06 ("; + if (!cont_eq) + { + ss << "Mode: Contrast Mapping, "; + } + else + { + scaleFactor = -scaleFactor; + ss << "Mode: Contrast Equalization, "; + } + + ss << "scaleFactor: " << scaleFactor; + ss << ", saturationFactor: " << saturationFactor; + ss << ", detailFactor: " << detailFactor << ")" << std::endl; + + std::cout << ss.str(); +#endif + + pfs::Channel *inRed, *inGreen, *inBlue; + frame.getXYZChannels(inRed, inGreen, inBlue); + + int cols = frame.getWidth(); + int rows = frame.getHeight(); + + pfs::Array2Df inY( cols, rows ); + pfs::transformRGB2Y(inRed, inGreen, inBlue, &inY); + + tmo_mantiuk06_contmap(*inRed, *inGreen, *inBlue, inY, + scaleFactor, saturationFactor, detailFactor, itmax, tol, + ph); + + frame.getTags().setTag("LUMINANCE", "RELATIVE"); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/pyramid.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pyramid.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/pyramid.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pyramid.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,685 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 Pyramid implementation for Mantiuk06 tonemapping operator +//! \author Davide Anastasia +//! \date 09 Sept 2012 +//! \note Implementation of this class is insired by the original implementation +//! of the Mantiuk06 operator found in PFSTMO. However, the actual +//! implementation found in this file (and its .cpp file) is based on STL +//! containers + +#include "pyramid.h" + +#include +#include +#include +#include +#include + +#ifdef _OPENMP +#include +#endif + +#include "Libpfs/array2d.h" +#include "Libpfs/vex/sse.h" +#include "Libpfs/vex/vex.h" + +using namespace pfs; + +namespace +{ +inline +size_t downscaleBy2(size_t value) +{ + return (value >> 1); +} +} + +namespace +{ +const size_t PYRAMID_MIN_PIXELS = 3; +} + +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() ); + + if ( !m_pyramid.size() ) return; + +#ifndef NDEBUG + assert((getElems()/4) > 0); + assert((getElems()/16) > 0); +#endif + + 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 ) + { + 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()); + calculateGradients(buffer2.data(), m_pyramid[idx]); + + buffer1.swap( buffer2 ); + } +} + +void PyramidT::computeSumOfDivergence(pfs::Array2Df& sumOfdivG) +{ + // zero dimension Array2D + pfs::Array2Df tempSumOfdivG( downscaleBy2(sumOfdivG.getCols()), + downscaleBy2(sumOfdivG.getRows()) ); + + if ( (numLevels() % 2) ) + { + sumOfdivG.swap(tempSumOfdivG); + tempSumOfdivG.reset(0.0f); + } + else + { + tempSumOfdivG.reset(0.0f); + } + + if ( numLevels() != 0 ) + { + calculateAndAddDivergence(m_pyramid[m_pyramid.size()-1], + tempSumOfdivG.data()); + tempSumOfdivG.swap(sumOfdivG); + } + + 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()); + 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 +{ + 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; + ++inCurr; + } +} + +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) +{ + 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); + + ++itCurr; + } +} + +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); + + ++itCurr; + } +} + +struct ScalePyramidS +{ + ScalePyramidS(float multiplier) + : multiplier_(multiplier) + {} + + void operator()(PyramidS& multiply) + { + vex::vsmul(multiply.data(), multiplier_, + multiply.data(), multiply.size()); + } +private: + float 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) +{ + // check that the pyramids have the same number of levels + 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() ); + + 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(); + PyramidContainer::value_type::iterator innerIt = outCurr->begin(); + PyramidContainer::value_type::iterator innerItEnd = outCurr->end(); + + while (innerIt != innerItEnd) + { + *innerIt *= *innerItOther; + + innerIt++; + innerItOther++; + } + } +} + +// downsample the matrix +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); + + // 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; + + float pixVal = 0.0f; + float factorx, factory; + 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 + else if (i == iy2) + 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++) + { + if (j == ix1) + 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 + else + factorx = 1.0f; // We've got the full width of this pixel + + pixVal += inputData[j + i*inCols] * factorx * factory; + } + } + + 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 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. + +#pragma omp parallel for + 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; + + 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; + } + } +} + +void matrixDownsample(size_t inCols, size_t inRows, + const float* inputData, float* outputData) +{ + if ( !(inCols % 2) && !(inRows % 2) ) + { + matrixDownsampleSimple(inCols, inRows, inputData, outputData); + } + else + { + matrixDownsampleFull(inCols, inRows, inputData, outputData); + } +} + +// upsample the matrix +// upsampled matrix is twice bigger in each direction than data[] +// 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; + +#pragma omp parallel for + 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); + + 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); + + 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) +{ +#pragma omp parallel for + 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) + { + const int ix1 = x / 2; + 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) ) + { + matrixUpsampleSimple(outCols, outRows, inputData, outputData); + } + else + { + matrixUpsampleFull(outCols, outRows, inputData, outputData); + } +} + +// calculate gradients +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 for nowait + 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; + + while ( currGxy != endGxy ) + { + currGxy->gX() = *(currLumU + 1) - *currLumU; + currGxy->gY() = *currLumL - *currLumU; + + ++currLumL; + ++currLumU; + ++currGxy; + } + // last sample of the row... + currGxy->gX() = 0.0f; + currGxy->gY() = *currLumL - *currLumU; + } + +#pragma omp single + { + PyramidS::iterator currGxy = gradient.row_begin(ROWS-1); + PyramidS::iterator endGxy = gradient.row_end(ROWS-1) - 1; + + const float* currLumU = inputData + (ROWS-1)*COLS; + + while ( currGxy != endGxy ) + { + currGxy->gX() = *(currLumU + 1) - *currLumU; + currGxy->gY() = 0.0f; + + ++currLumU; + ++currGxy; + } + // 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; + } + 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; + } +} + +//! \brief calculate divergence of two gradient maps (Gx and Gy) +//! divG(x,y) = [Gx(x,y) - Gx(x-1,y)] + [Gy(x,y) - Gy(x,y-1)] +//! \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) +{ + const int ROWS = G.getRows(); + const int COLS = G.getCols(); + + float divGx, divGy; +#pragma omp parallel private(divGx, divGy) + { + // kx = 0 AND ky = 0; + divG[0] += G(0).gX() + G(0).gY(); // OUT + + // ky = 0 +#pragma omp for nowait + for (int kx = 1; kx < COLS; kx++) + { + divGx = G(kx).gX() - G(kx - 1).gX(); + divGy = G(kx).gY(); + divG[kx] += divGx + divGy; // OUT + } +#pragma omp for nowait + for (int ky = 1; ky < ROWS; ky++) + { + // kx = 0 + divGx = G(ky*COLS).gX(); + divGy = G(ky*COLS).gY() - G(ky*COLS - COLS).gY(); + divG[ky*COLS] += divGx + divGy; // OUT + + // kx > 0 + for (int kx = 1; kx < COLS; kx++) + { + divGx = G(kx + ky*COLS).gX() - G(kx + ky*COLS-1).gX(); + divGy = G(kx + ky*COLS).gY() - G(kx + ky*COLS - COLS).gY(); + divG[kx + ky*COLS] += divGx + divGy; // OUT + } + } + } // end pragma parallel +} + +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.3.0/src/TonemappingOperators/mantiuk06/pyramid.h luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pyramid.h --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk06/pyramid.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk06/pyramid.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,185 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 Pyramid implementation for Mantiuk06 tonemapping operator +//! \author Davide Anastasia +//! \date 09 Sept 2012 +//! \note Implementation of this class is based on the original implementation +//! of the Mantiuk06 operator found in PFSTMO. However, the actual +//! implementation found in this file (and its .cpp file) is based on STL +//! containers + +#ifndef MANTIUK06_PYRAMID_H +#define MANTIUK06_PYRAMID_H + +#include +#include + +#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) + { + m_Gx *= multiplier; + m_Gy *= multiplier; + + return *this; + } + + inline + XYGradient& operator*=(const XYGradient& multiplier) + { + m_Gx *= multiplier.m_Gx; + m_Gy *= multiplier.m_Gy; + + return *this; + } + +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()); +} + +typedef ::pfs::Array2D< XYGradient > PyramidS; + +class PyramidT +{ +public: + typedef std::vector< PyramidS > PyramidContainer; + + // iterator + typedef PyramidContainer::iterator iterator; + typedef PyramidContainer::const_iterator const_iterator; + + 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(); } + + // 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 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); + + //! \param[out] data input vector of data + void computeSumOfDivergence(pfs::Array2Df& sumOfDivG); + + //! \param[out] result PyramidT structure that contains the scaling factors! + 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 + void transformToR(float detailFactor); + + //! \brief transform every level of the Pyramid in the G space + //! \note Please refer to the original paper for the meaning of R and G + void transformToG(float detailFactor); + + void scale(float multiplier); + void multiply(const PyramidT& multiplier); + +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 + size_t m_cols; + //! \brief container of PyramidS + PyramidContainer m_pyramid; +}; + +// 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); + +//! \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); + +//! \brief compute X and Y gradients from \a inputData into \a 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; +}; + +#endif // MANTIUK06_PYRAMID_H diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/cqpminimizer.c 2013-04-07 18:41:14.000000000 +0000 @@ -228,7 +228,7 @@ /* f = 0.5*(x^t)Qx+(q^t)x */ double f; - int status; + int status; gsl_vector * tmp = gsl_vector_alloc(minimizer->x->size); if(tmp == 0) diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.c luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/initial_point.c --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/initial_point.c 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/initial_point.c 2013-04-07 18:41:14.000000000 +0000 @@ -34,7 +34,7 @@ int pdip_initial_point_feasible_x(const gsl_matrix *A, const gsl_vector *b, gsl_vector *x) { - int status, signum; + int status, signum; /* x = A^t*(AA^t)^{-1}*b */ @@ -89,7 +89,6 @@ int pdip_initial_point_feasible_s(const gsl_matrix * C, const gsl_vector *d, const gsl_vector *x, gsl_vector *s) { - int status; /* s=Cx-d */ @@ -184,7 +183,7 @@ size_t i; - int status; + 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); diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/cqp/mg_pdip.c 2013-04-07 18:41:14.000000000 +0000 @@ -115,7 +115,7 @@ 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; + int status; size_t i, j, debug=0; @@ -506,7 +506,7 @@ gsl_vector *r) { - int status; + int status; gsl_vector_view r_block; /*gsl_cqp_geconstraints * constraints = (gsl_cqp_geconstraints *) cqp->constraints;*/ @@ -541,7 +541,7 @@ { size_t i; - int status; + int status; gsl_matrix_view kkt_block; @@ -615,10 +615,8 @@ 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; - int status; + int status; gsl_vector * tmp_v = gsl_vector_alloc(cqp->q->size); diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef _OPENMP #include @@ -48,7 +49,10 @@ #include #include #include "cqp/gsl_cqp.h" -#include "Libpfs/vex.h" + +#include "Libpfs/progress.h" +#include "Libpfs/array2d.h" +#include "Libpfs/vex/sse.h" #ifdef BRANCH_PREDICTION #define likely(x) __builtin_expect((x),1) @@ -278,14 +282,19 @@ #endif -static void compute_gaussian_level( const int width, const int height, const pfs::Array2D& in, pfs::Array2D& out, int level, pfs::Array2D& temp ) +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.25 - kernel_a/2, 0.25 , kernel_a, 0.25, 0.25 - kernel_a/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< datmo_compute_conditional_density( int width, int height, const float *L, ProgressHelper *ph) +std::auto_ptr datmo_compute_conditional_density( int width, int height, const float *L, pfs::Progress &ph) { - ph->newValue( 0 ); + ph.setValue( 0 ); - pfs::Array2D buf_1(width, height); - pfs::Array2D buf_2(width, height); - pfs::Array2D temp(width, height); + pfs::Array2Df buf_1(width, height); + pfs::Array2Df buf_2(width, height); + pfs::Array2Df temp(width, height); std::auto_ptr C(new conditional_density()); @@ -433,9 +442,9 @@ const int pix_count = width*height; - pfs::Array2D* LP_low = &buf_1; - pfs::Array2D* LP_high = &buf_2; - float* LP_high_raw = LP_high->getRawData(); + 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 ); @@ -515,8 +524,8 @@ } std::swap( LP_low, LP_high ); - ph->newValue( (f+1)*PROGRESS_CDF/C->f_count ); - if (ph->isTerminationRequested()) + ph.setValue( (f+1)*PROGRESS_CDF/C->f_count ); + if (ph.canceled()) break; } @@ -742,7 +751,7 @@ * 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, ProgressHelper *ph = NULL ) { + float enh_factor, double *y, const float white_y, pfs::Progress &ph ) { conditional_density *C = (conditional_density*)C_pub; @@ -969,8 +978,8 @@ if( converged ) break; } - ph->newValue( 95 ); - if (ph->isTerminationRequested()) + ph.setValue( 95 ); + if (ph.canceled()) return PFSTMO_ABORTED; // PFSTMO_OK is right // for( int i=0; i < L; i++ ) @@ -984,7 +993,7 @@ int datmo_compute_tone_curve( datmoToneCurve *tc, datmoConditionalDensity *cond_dens, DisplayFunction *df, DisplaySize *ds, const float enh_factor, - const float white_y, ProgressHelper *ph ) + const float white_y, pfs::Progress &ph ) { conditional_density *C = (conditional_density*)cond_dens; tc->init( C->x_count, C->x_scale ); diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_adaptive_tmo.h 2013-04-07 18:41:14.000000000 +0000 @@ -34,7 +34,11 @@ #include "TonemappingOperators/pfstmo.h" #include "Libpfs/pfs.h" -#include "Common/ProgressHelper.h" + +namespace pfs +{ +class Progress; +} class datmoToneCurve { @@ -75,7 +79,7 @@ * must be freed by the calling application using the 'delete' * statement. */ -std::auto_ptr datmo_compute_conditional_density( int width, int height, const float *L, ProgressHelper *ph = NULL ); +std::auto_ptr datmo_compute_conditional_density( int width, int height, const float *L, pfs::Progress &ph ); /** @@ -99,8 +103,8 @@ * error was encountered. */ int datmo_compute_tone_curve( datmoToneCurve *tc, datmoConditionalDensity *cond_dens, - DisplayFunction *df, DisplaySize *ds, const float enh_factor = 1.f, - const float white_y = -1, ProgressHelper *ph = NULL ); + DisplayFunction *df, DisplaySize *ds, const float enh_factor /*= 1.f*/, + const float white_y /*= -1*/, pfs::Progress &ph /*= NULL*/ ); /** * Deprectaied: use datmo_apply_tone_curve_cc() diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_function.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_function.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_function.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_function.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -59,13 +59,13 @@ DisplayFunctionGGBA::DisplayFunctionGGBA( const char *predefined ) { if( !strcasecmp( predefined, "lcd_office" ) ) { - init( 2.2f, 100, 0.8, 400, 0.01 ); + init( 2.2f, 100, 0.8f, 400, 0.01f ); } else if( !strcasecmp( predefined, "lcd" ) ) { - init( 2.2f, 200, 0.8, 60, 0.01 ); + init( 2.2f, 200, 0.8f, 60, 0.01f ); } else if( !strcasecmp( predefined, "lcd_bright" ) ) { - init( 2.6f, 500, 0.5, 10, 0.01 ); + init( 2.6f, 500, 0.5f, 10, 0.01f ); } else if( !strcasecmp( predefined, "crt" ) ) { - init( 2.2f, 80, 1, 60, 0.02 ); + init( 2.2f, 80, 1.0f, 60, 0.02f ); } else { throw pfs::Exception( "Unknown display type. Recognized types: lcd_office, lcd, lcd_bright, crt." ); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_function.h luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_function.h --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_function.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_function.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,9 +32,11 @@ #ifndef DISPLAY_FUNCTION_H #define DISPLAY_FUNCTION_H -#include +#include + #include "arch/math.h" -#include "Libpfs/vex.h" +#include "Libpfs/vex/sse.h" +#include class DisplayFunction { diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_size.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_size.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_size.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_size.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -43,7 +43,7 @@ DisplaySize::DisplaySize( int vres, float vd_screen_h, float vd_meters ) : view_d(vd_meters) { - ppd = vres * M_PI / (360* atan(0.5/vd_screen_h)); + ppd = vres * M_PI / (360* atan(0.5f/vd_screen_h)); } DisplaySize::DisplaySize( float ppd, float vd_meters ) : view_d(vd_meters), ppd( ppd ) diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_size.h luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_size.h --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/display_size.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/display_size.h 2013-04-07 18:41:14.000000000 +0000 @@ -33,6 +33,7 @@ #define DISPLAY_SIZE_H #include +#include class DisplaySize { diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/mantiuk08/pfstmo_mantiuk08.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -36,8 +36,9 @@ #include #include +#include "Libpfs/progress.h" #include "Libpfs/frame.h" -#include "Libpfs/colorspace.h" +#include "Libpfs/colorspace/colorspace.h" #include "display_adaptive_tmo.h" // TODO: remove this rubbish! @@ -45,7 +46,7 @@ using namespace std; -void pfstmo_mantiuk08(pfs::Frame* frame, float saturation_factor, float contrast_enhance_factor, float white_y, bool setluminance, ProgressHelper *ph) +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; @@ -56,10 +57,10 @@ if (!setluminance) white_y = -2.f; - if( contrast_enhance_factor <= 0.0f ) + 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 ) + if ( saturation_factor < 0.0f || saturation_factor > 2.0f ) throw pfs::Exception("incorrect saturation factor, accepted range is (0..2)"); std::cout << "pfstmo_mantiuk08 ("; @@ -81,23 +82,19 @@ ds->print( stderr ); pfs::Channel *inX, *inY, *inZ; - frame->getXYZChannels(inX, inY, inZ); - int cols = frame->getWidth(); - int rows = frame->getHeight(); - - pfs::Array2D R( cols, rows ); - pfs::Array2D* Xr = inX->getChannelData(); - pfs::Array2D* Yr = inY->getChannelData(); - pfs::Array2D* Zr = inZ->getChannelData(); + frame.getXYZChannels(inX, inY, inZ); + int cols = frame.getWidth(); + int rows = frame.getHeight(); - pfs::transformColorSpace( pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, Xr, &R, Zr); + pfs::Array2Df R( cols, rows ); + pfs::transformColorSpace(pfs::CS_XYZ, inX, inY, inZ, pfs::CS_RGB, inX, &R, inZ); if( white_y == -2.f ) - { - const char *white_y_str = frame->getTags()->getString( "WHITE_Y" ); - if( white_y_str != NULL ) + { + std::string white_y_str = frame.getTags().getTag( "WHITE_Y" ); + if( white_y_str.empty() ) { - white_y = strtod( white_y_str, NULL ); + white_y = strtod( white_y_str.c_str(), NULL ); if( white_y == 0 ) { white_y = -1; @@ -112,14 +109,14 @@ else fprintf( stderr, "%g\n", white_y ); - const char *lum_data = frame->getTags()->getString("LUMINANCE"); - if( lum_data != NULL && !strcmp( lum_data, "DISPLAY" )) { + std::string lum_data = frame.getTags().getTag("LUMINANCE"); + if( !lum_data.empty() && lum_data != "DISPLAY" ) { fprintf( stderr, PROG_NAME " warning: input image should be in linear (not gamma corrected) luminance factor units. Use '--linear' option with pfsin* commands.\n" ); } datmoToneCurve tc; - std::auto_ptr C = datmo_compute_conditional_density( cols, rows, inY->getRawData(), ph); + std::auto_ptr C = datmo_compute_conditional_density( cols, rows, inY->data(), ph); if( C.get() == NULL ) throw pfs::Exception("failed to analyse the image"); @@ -128,14 +125,14 @@ if( res != PFSTMO_OK ) throw pfs::Exception( "failed to compute the tone-curve" ); - res = datmo_apply_tone_curve_cc( inX->getRawData(), R.getRawData(), inZ->getRawData(), cols, rows, inX->getRawData(), R.getRawData(), inZ->getRawData(), inY->getRawData(), &tc, df, saturation_factor ); + res = datmo_apply_tone_curve_cc( inX->data(), R.data(), inZ->data(), cols, rows, inX->data(), R.data(), inZ->data(), inY->data(), &tc, df, saturation_factor ); if( res != PFSTMO_OK ) throw pfs::Exception( "failed to tone-map the image" ); - ph->newValue( 100 ); + ph.setValue( 100 ); - pfs::transformColorSpace( pfs::CS_RGB, Xr, &R, Zr, pfs::CS_XYZ, Xr, Yr, Zr ); - frame->getTags()->setString("LUMINANCE", "DISPLAY"); + pfs::transformColorSpace( pfs::CS_RGB, inX, &R, inZ, pfs::CS_XYZ, inX, inY, inZ ); + frame.getTags().setTag("LUMINANCE", "DISPLAY"); delete df; delete ds; diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp luminance-hdr-2.3.1/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/pattanaik00/pfstmo_pattanaik00.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,14 +35,33 @@ #include #include +#include +#include #include "Libpfs/frame.h" -#include "Libpfs/colorspace.h" -#include "Common/ProgressHelper.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/exception.h" +#include "Libpfs/progress.h" -void multiplyChannels( pfs::Array2D* X, pfs::Array2D* Y, pfs::Array2D* 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->getTags()->setString("LUMINANCE", "RELATIVE"); + frame.getXYZChannels( X, Y, Z ); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); //--- - if( Y==NULL || X==NULL || Z==NULL) + if ( Y==NULL || X==NULL || Z==NULL) + { throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); + } // adaptation model - if( multiplier != 1.0f ) - multiplyChannels(Xr, Yr, Zr, multiplier ); + if ( multiplier != 1.0f ) { + multiplyChannels(*X, *Y, *Z, multiplier ); + } if( !local ) { if( !timedependence ) { if( !autolum ) - am->setAdaptation(Acone,Arod); + am->setAdaptation(Acone, Arod); else - am->setAdaptation(Yr); + am->setAdaptation(*Y); } else - am->calculateAdaptation(Yr, 1.0f/fps); + am->calculateAdaptation(*Y, 1.0f/fps); } // tone mapping int w = Y->getWidth(); int h = Y->getHeight(); - pfs::Array2D* R = new pfs::Array2D(w,h); - pfs::Array2D* G = new pfs::Array2D(w,h); - pfs::Array2D* B = new pfs::Array2D(w,h); - - pfs::transformColorSpace( pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, R, G, B ); - tmo_pattanaik00( w, h, R->getRawData(), G->getRawData(), B->getRawData(), Y->getRawData(), am, local, ph ); - pfs::transformColorSpace( pfs::CS_RGB, R, G, B, pfs::CS_XYZ, Xr, Yr, Zr ); - - if (!ph->isTerminationRequested()) - ph->newValue(100); - - delete R; - delete G; - delete B; - delete am; // delete visual adaptation model -} -void multiplyChannels( pfs::Array2D* X, pfs::Array2D* Y, pfs::Array2D* Z, float mult ) -{ - int size = Y->getCols() * Y->getRows(); - - for( int i=0 ; i +#include + +#include "tmo_pattanaik00.h" #include "TonemappingOperators/pfstmo.h" #include "Libpfs/pfs.h" -#include "Common/ProgressHelper.h" -#include "tmo_pattanaik00.h" +#include "Libpfs/array2d.h" +#include "Libpfs/progress.h" /// sensitivity of human visual system float n = 0.73f; -//void calculateLocalAdaptation(const pfs::Array2D* Y, int x, int y, float& Acone, float& Arod); -void calculateLocalAdaptation(const pfs::Array2D* Y, int x, int y, float& Acone, float& Arod); float sigma_response_rod(float I); float sigma_response_cone(float I); float model_response(float I, float sigma); +namespace +{ +const float LOG5 = std::log(5.f); +/** + * @brief Calculate local adaptation for specified pixel coordinates + * + * Calculation based on article "Adaptive Gain Control" by Pattanaik + * 2002. + * + * @param Y luminance map + * @param x x-coordinate of pixel + * @param y x-coordinate of pixel + * @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) +{ + int width = Y.getCols(); + int height = Y.getRows(); -// tone mapping operator code -void tmo_pattanaik00( unsigned int width, unsigned int height, - float* nR, float* nG, float* nB, - const float* nY, VisualAdaptationModel* am, bool local, ProgressHelper *ph ) -{ - ///--- initialization of parameters + int kernel_size = 4; - const pfs::Array2D* Y = new pfs::Array2D(width, height, const_cast(nY)); - pfs::Array2D* R = new pfs::Array2D(width, height, nR); - pfs::Array2D* G = new pfs::Array2D(width, height, nG); - pfs::Array2D* B = new pfs::Array2D(width, height, nB); - - /// cones level of adaptation - float Acone = am->getAcone(); - /// rods level of adaptation - float Arod = am->getArod(); - /// cones bleaching term - float Bcone = am->getBcone(); - /// rods bleaching term - float Brod = am->getBrod(); - - /// 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; - - /// goal adaptation luminance while watching display - float G_display=25.0f; - /// display luminance of white - float display_white = G_display*white_factor; - /// display luminance of dark - float display_dark = G_display/dark_factor; - /// half-saturation constant for display - float display_sigma = sigma_response_cone(G_display); - - /// reference white for display - float REF_Wht_display = model_response(display_white, display_sigma); - /// reference black for display - 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)); - - ///--- precalculated parameters - - /// half-saturation constant for cones - float sigma_cone = sigma_response_cone(Acone); - /// half-saturation constant for rods - 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 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); - - /// scene luminance minus shift - float disp_x = 0.0f; - /// scene luminance to display luminance scale factor - float disp_y = 1.0f; - /// display luminance plus shift - float disp_z = 0.0f; + float logLc = std::log(Y(x,y))/LOG5; - float scale = (REF_Wht_display-REF_Blk_display) - / (REF_Wht_scene-REF_Blk_scene); + 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+kyREF_Wht_display ) + if ( pix_num > 0.0 ) { - disp_x = REF_Wht_scene; - disp_y = scale; - disp_z = REF_Wht_display; + Acone = Arod = (pix_sum / pix_num); } - else if( REF_Blk_scene 1.0f ) - { - if( REF_Wht_scene>REF_Wht_display ) +} +} + +// 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) +{ + ///--- initialization of parameters + /// cones level of adaptation + float Acone = am->getAcone(); + /// rods level of adaptation + float Arod = am->getArod(); + /// cones bleaching term + float Bcone = am->getBcone(); + /// rods bleaching term + float Brod = am->getBrod(); + + /// 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; + + /// goal adaptation luminance while watching display + float G_display=25.0f; + /// display luminance of white + float display_white = G_display*white_factor; + /// display luminance of dark + float display_dark = G_display/dark_factor; + /// half-saturation constant for display + float display_sigma = sigma_response_cone(G_display); + + /// reference white for display + float REF_Wht_display = model_response(display_white, display_sigma); + /// reference black for display + 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)); + + ///--- precalculated parameters + /// half-saturation constant for cones + float sigma_cone = sigma_response_cone(Acone); + /// half-saturation constant for rods + 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 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); + + /// scene luminance minus shift + float disp_x = 0.0f; + /// scene luminance to display luminance scale factor + float disp_y = 1.0f; + /// display luminance plus shift + float disp_z = 0.0f; + + float scale = (REF_Wht_display-REF_Blk_display) + / (REF_Wht_scene-REF_Blk_scene); + + if ( scale < 1.0f ) { - disp_x = REF_Wht_scene; - disp_y = 1.0f; - disp_z = REF_Wht_display; + 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 ) { - disp_x = REF_Blk_scene; - disp_y = 1.0f; - disp_z = REF_Blk_display; + 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_scenegetCols(); - int im_height = Y->getRows(); - for( int x=0 ; xnewValue(100*x/im_width); - if (ph->isTerminationRequested()) - break; - for( int y=0 ; y0.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 ); - 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; - - // inverse display model - float I = display_sigma * pow(Ra/(1.0f-Ra), 1.0f/n) / display_white; - - // 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; + ph.setValue(100*x/im_width); + if (ph.canceled()) + break; + for ( int y=0 ; y < im_height ; y++ ) + { + float l = Y(x,y); + float r = R(x,y)/l; + float g = G(x,y)/l; + float b = B(x,y)/l; + + if ( local ) + { + calculateLocalAdaptation(Y,x,y,Acone,Arod); + Bcone = 2e6/(2e6+Acone); + Brod = 0.04f/(0.04f+Arod); + + sigma_cone = sigma_response_cone(Acone); + sigma_rod = sigma_response_rod(Arod); + } + + // receptor responses + float Rrod = Brod*model_response(l, sigma_rod ); + float Rcone = Bcone*model_response(l, sigma_cone ); + float Rlum = Rrod + Rcone; + 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 ); + 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; + + // inverse display model + float I = display_sigma * pow(Ra/(1.0f-Ra), 1.0f/n) / display_white; + + // 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; + } } - } - delete B; - delete G; - delete R; - delete Y; } /////////////////////////////////////////////////////////// @@ -252,53 +295,6 @@ return pow(I,n)/(pow(I,n)+pow(sigma,n)); } - -/////////////////////////////////////////////////////////// - -/** - * @brief Calculate local adaptation for specified pixel coordinates - * - * Calculation based on article "Adaptive Gain Control" by Pattanaik - * 2002. - * - * @param Y luminance map - * @param x x-coordinate of pixel - * @param y x-coordinate of pixel - * @param Acone [out] calculated adaptation for cones - * @param Arod [out] calculated adaptation for rods - */ -void calculateLocalAdaptation(const pfs::Array2D* Y, int x, int y, float& Acone, float& Arod) -{ - int width = Y->getCols(); - int height = Y->getRows(); - - int kernel_size = 4; - static float LOG5 = log(5.f); - float logLc = log((*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+ky0.0 ) - Acone = Arod = (pix_sum / pix_num); - else - Acone = Arod = (*Y)(x,y); -} - - - -/////////////////////////////////////////////////////////// - VisualAdaptationModel::VisualAdaptationModel() { setAdaptation(60.0f, 60.0f); @@ -349,7 +345,7 @@ Brod += f; } -void VisualAdaptationModel::calculateAdaptation(pfs::Array2D *Y, float dt) +void VisualAdaptationModel::calculateAdaptation(const pfs::Array2Df& Y, float dt) { float Acone = calculateLogAvgLuminance(Y); calculateAdaptation(Acone, Acone, dt); @@ -363,20 +359,20 @@ Brod = 0.04f/(0.04f+Arod); } -void VisualAdaptationModel::setAdaptation(pfs::Array2D *Y) +void VisualAdaptationModel::setAdaptation(const pfs::Array2Df& Y) { float Acone = calculateLogAvgLuminance(Y) * 5.0f; setAdaptation(Acone, Acone); } -float VisualAdaptationModel::calculateLogAvgLuminance( pfs::Array2D* Y ) +float VisualAdaptationModel::calculateLogAvgLuminance(const pfs::Array2Df& Y) { - float avLum = 0.0f; + double avLum = 0.0f; - int size = Y->getCols() * Y->getRows(); + int size = Y.getCols() * Y.getRows(); for( int i=0 ; i(std::exp(avLum/size ) - 1e-4); } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.h luminance-hdr-2.3.1/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.h --- luminance-hdr-2.3.0/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/pattanaik00/tmo_pattanaik00.h 2013-04-07 18:41:14.000000000 +0000 @@ -35,113 +35,105 @@ #ifndef TMO_PATTANAIK00_H #define TMO_PATTANAIK00_H -namespace pfs { - class Array2D; - class Frame; +#include + +namespace pfs +{ +// class Frame; +class Progress; } -class ProgressHelper; class VisualAdaptationModel; -/** - * @brief: Tone mapping algorithm [Pattanaik2000] - * - * @param width image width - * @param height image height - * @param R red channel - * @param G green channel - * @param B blue channel - * @param Y luminance channel - * @param am pointer to adaptation model - * @param local false: use global version, true: use local version - */ -void tmo_pattanaik00( unsigned int width, unsigned int height, - float* R, float* G, float* B, - const float* Y, VisualAdaptationModel* am, bool local=false, ProgressHelper *ph = 0); - - -/** - * @brief Time-dependent Visual Adaptation Model - * - * Class for storing state of visual adaptation model. - */ +//! +//! \brief: Tone mapping algorithm [Pattanaik2000] +//! +//! \param width image width +//! \param height image height +//! \param R red channel +//! \param G green channel +//! \param B blue channel +//! \param Y luminance channel +//! \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); + +//! +//! @brief Time-dependent Visual Adaptation Model +//! +//! Class for storing state of visual adaptation model. +//! class VisualAdaptationModel { private: - /// cone's adaptation level + //! cone's adaptation level float Acone; - /// rod's adaptation level + //! rod's adaptation level float Arod; - /// cone's bleaching term + //! cone's bleaching term float Bcone; - /// rod's bleaching term + //! rod's bleaching term float Brod; - /// calculate logarithmic average of Y - float calculateLogAvgLuminance( pfs::Array2D* Y ); + //! calculate logarithmic average of Y + float calculateLogAvgLuminance( const pfs::Array2Df& Y ); public: - /** - * @brief Constructor - * Sets default adaptation state (office light conditions) - */ + //! + //! \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 - */ + //! @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(pfs::Array2D *Y, float dt); - - /** - * @brief Set adaptation level to given values - * - * @param Gcone goal adaptation value for cones - * @param Grod goal adaptation value for rods - */ + //! @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(pfs::Array2D *Y); + //! @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 + //! Get cone adaptation level float getAcone() { return Acone; } - /// Get rod adaptation level + //! Get rod adaptation level float getArod() { return Arod; } - /// Get cone bleaching term + //! Get cone bleaching term float getBcone() { return Bcone; } - /// Get rod bleaching term + //! Get rod bleaching term float getBrod() { return Brod; @@ -150,4 +142,4 @@ }; -#endif /* _tmo_pattanaik00_h_ */ +#endif /* TMO_PATTANAIK00_H */ diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/pfstmdefaultparams.h luminance-hdr-2.3.1/src/TonemappingOperators/pfstmdefaultparams.h --- luminance-hdr-2.3.0/src/TonemappingOperators/pfstmdefaultparams.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/pfstmdefaultparams.h 2013-04-07 18:41:14.000000000 +0000 @@ -30,53 +30,53 @@ // Ashikhmin #define ASHIKHMIN_SIMPLE false #define ASHIKHMIN_EQ2 true -#define ASHIKHMIN_LCT 0.5 +#define ASHIKHMIN_LCT 0.5f // Drago -#define DRAGO03_BIAS 0.85 +#define DRAGO03_BIAS 0.85f // Durand 02 -#define DURAND02_SPATIAL 2.0 -#define DURAND02_RANGE 2.0 -#define DURAND02_BASE 5.0 +#define DURAND02_SPATIAL 2.0f +#define DURAND02_RANGE 2.0f +#define DURAND02_BASE 5.0f // Fattal 02 -#define FATTAL02_ALPHA 1.0 -#define FATTAL02_BETA 0.9 -#define FATTAL02_COLOR 1.0 -#define FATTAL02_NOISE_REDUX 0.0 +#define FATTAL02_ALPHA 1.0f +#define FATTAL02_BETA 0.9f +#define FATTAL02_COLOR 1.0f +#define FATTAL02_NOISE_REDUX 0.0f #define FATTAL02_NEWFATTAL true // Mantiuk 06 -#define MANTIUK06_CONTRAST_FACTOR 0.1 -#define MANTIUK06_SATURATION_FACTOR 0.8 -#define MANTIUK06_DETAIL_FACTOR 0.8 +#define MANTIUK06_CONTRAST_FACTOR 0.1f +#define MANTIUK06_SATURATION_FACTOR 0.8f +#define MANTIUK06_DETAIL_FACTOR 0.8f #define MANTIUK06_CONSTRAST_EQUALIZATION false // Mantiuk 08 -#define MANTIUK08_COLOR_SATURATION 1.0 -#define MANTIUK08_CONTRAST_ENHANCEMENT 1.0 -#define MANTIUK08_LUMINANCE_LEVEL 1.0 +#define MANTIUK08_COLOR_SATURATION 1.0f +#define MANTIUK08_CONTRAST_ENHANCEMENT 1.0f +#define MANTIUK08_LUMINANCE_LEVEL 1.0f #define MANTIUK08_SET_LUMINANCE false // Pattanaik 00 #define PATTANAIK00_AUTOLUM true #define PATTANAIK00_LOCAL false -#define PATTANAIK00_CONE 0.5 -#define PATTANAIK00_ROD 0.5 -#define PATTANAIK00_MULTIPLIER 1.0 +#define PATTANAIK00_CONE 0.5f +#define PATTANAIK00_ROD 0.5f +#define PATTANAIK00_MULTIPLIER 1.0f // Reinhard 02 #define REINHARD02_SCALES false -#define REINHARD02_KEY 0.18 -#define REINHARD02_PHI 1.0 +#define REINHARD02_KEY 0.18f +#define REINHARD02_PHI 1.0f #define REINHARD02_RANGE 8 #define REINHARD02_LOWER 1 #define REINHARD02_UPPER 43 // Reinhard 05 -#define REINHARD05_BRIGHTNESS -10.0 -#define REINHARD05_CHROMATIC_ADAPTATION 0.0 -#define REINHARD05_LIGHT_ADAPTATION 1.0 +#define REINHARD05_BRIGHTNESS -10.0f +#define REINHARD05_CHROMATIC_ADAPTATION 0.0f +#define REINHARD05_LIGHT_ADAPTATION 1.0f #endif // PFSTMDEFAULTPARAMS_H diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/pfstmo.h luminance-hdr-2.3.1/src/TonemappingOperators/pfstmo.h --- luminance-hdr-2.3.0/src/TonemappingOperators/pfstmo.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/pfstmo.h 2013-04-07 18:41:14.000000000 +0000 @@ -25,14 +25,15 @@ * * $Id: pfstmo.h,v 1.3 2008/09/21 10:42:47 julians37 Exp $ */ + #ifndef PFSTMO_H #define PFSTMO_H -#include -#include -#include "Libpfs/array2d.h" -#include "Libpfs/frame.h" -#include "Common/ProgressHelper.h" +namespace pfs +{ +class Frame; +class Progress; +} #ifdef BRANCH_PREDICTION #define likely(x) __builtin_expect((x),1) @@ -47,28 +48,14 @@ #define PFSTMO_ABORTED -1 /* User aborted (from callback) */ #define PFSTMO_ERROR -2 /* Failed, encountered error */ -/* Return codes for the progress_callback */ -#define PFSTMO_CB_CONTINUE 1 -#define PFSTMO_CB_ABORT -1 - -/** - * This function is called from a tone-mapper to report current progress. - * - * @param progress the current progress in percent (grows from 0 to 100) - * @return return PFSTMO_CB_CONTINUE to continue tone-mapping or - * PFSTMO_CB_ABORT to request to stop. In some cases tone-mapping may - * not stop immediately, even if PFSTMO_CB_ABORT was returned. - */ -typedef int(*pfstmo_progress_callback)(int progress); - -void pfstmo_ashikhmin02(pfs::Frame* inpfsframe, bool simple_flag, float lc_value, int eq, ProgressHelper *ph); -void pfstmo_drago03(pfs::Frame *frame, float biasValue, ProgressHelper *ph); -void pfstmo_durand02(pfs::Frame* frame, float sigma_s, float sigma_r, float baseContrast, ProgressHelper *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, ProgressHelper *ph); -void pfstmo_mantiuk06(pfs::Frame* frame, float scaleFactor, float saturationFactor, float detailFactor, bool cont_eq, ProgressHelper *ph); -void pfstmo_mantiuk08(pfs::Frame* frame, float saturation_factor, float contrast_enhance_factor, float white_y, bool setluminance, ProgressHelper *ph); -void pfstmo_pattanaik00(pfs::Frame* frame, bool local, float multiplier, float Acone, float Arod, bool autolum, ProgressHelper *ph); -void pfstmo_reinhard02 (pfs::Frame* frame, float key, float phi, int num, int low, int high, bool use_scales, ProgressHelper *ph); -void pfstmo_reinhard05(pfs::Frame *frame, float brightness, float chromaticadaptation, float lightadaptation, ProgressHelper *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_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); #endif diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/approx.cpp luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/approx.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/approx.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/approx.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -34,7 +34,7 @@ double pyramid_lookup( int x, int y, int level ) /* PRE: */ { - int n, s; + // int n, s; /* Level 0 is a special case, the value is just the image */ if (level == 0) { @@ -46,8 +46,8 @@ /* Compute the size of the slice */ level--; - n = 1 << level; - s = PyramidWidth0 >> level; + // n = 1 << level; + int s = PyramidWidth0 >> level; //x = x >> level; //y = y >> level; diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/pfstmo_reinhard02.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,17 +31,21 @@ * $Id: pfstmo_reinhard02.cpp,v 1.3 2008/09/04 12:46:49 julians37 Exp $ */ +#include #include +#include #include "Libpfs/frame.h" +#include "Libpfs/exception.h" #include "tmo_reinhard02.h" -#include +namespace pfs +{ +class Progress; +} -void pfstmo_reinhard02 (pfs::Frame* frame, float key, float phi, int num, int low, int high, bool use_scales, ProgressHelper *ph ) +void pfstmo_reinhard02(pfs::Frame& frame, float key, float phi, int num, int low, int high, bool use_scales, pfs::Progress &ph ) { - //pfs::DOMIO pfsio; - //--- default tone mapping parameters; //float key = 0.18; //float phi = 1.0; @@ -50,7 +54,7 @@ //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; @@ -58,25 +62,22 @@ std::cout << ", lower scale: " << low; std::cout << ", upper scale: " << high; std::cout << ", use scales: " << use_scales << ")" << std::endl; - +#endif pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); + 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" ); - - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); + if ( Y==NULL || X==NULL || Z==NULL ) { + throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); + } // tone mapping - int w = Y->getWidth(); - int h = Y->getHeight(); - pfs::Array2D* L = new pfs::Array2D(w,h); + size_t w = Y->getWidth(); + size_t h = Y->getHeight(); + pfs::Array2Df L(w, h); - Reinhard02 tmoperator( w, h, Y->getRawData(), L->getRawData(), use_scales, key, phi, num, low, high, temporal_coherent, ph ); + Reinhard02 tmoperator( Y, &L, use_scales, key, phi, num, low, high, temporal_coherent, ph ); tmoperator.tmo_reinhard02(); @@ -85,12 +86,10 @@ { for( int y=0 ; y #include "arch/math.h" -#include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" #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)) @@ -263,32 +265,32 @@ * @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(unsigned int width, unsigned int height, - const float *nY, float *nL, - bool use_scales, float key, float phi, - int num, int low, int high, bool temporal_coherent, ProgressHelper *ph ) : -m_width(width), -m_height(height), -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) +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 = new pfs::Array2D(m_width, m_height, const_cast(nY)); - m_L = new pfs::Array2D(m_width, m_height, nL); + m_Y = Y; + m_L = L; } void Reinhard02::tmo_reinhard02() { - m_ph->newValue( 0 ); + m_ph.setValue( 0 ); int x,y; @@ -301,8 +303,8 @@ compute_bessel(); allocate_memory (); - m_ph->newValue( 10 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 10 ); + if (m_ph.canceled()) goto end; // reading image @@ -311,26 +313,26 @@ m_image[y][x][0] = (*m_Y)(x,y); copy_luminance(); - m_ph->newValue( 20 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 20 ); + if (m_ph.canceled()) goto end; scale_to_midtone(); - m_ph->newValue( 30 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 30 ); + if (m_ph.canceled()) goto end; if( m_use_scales ) { build_pyramid(m_luminance, m_cvts.xmax, m_cvts.ymax); } - m_ph->newValue( 50 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 50 ); + if (m_ph.canceled()) goto end; tonemap_image(); - m_ph->newValue( 85 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 85 ); + if (m_ph.canceled()) goto end; // saving image for( y=0 ; ynewValue( 95 ); - if (m_ph->isTerminationRequested()) + m_ph.setValue( 95 ); + if (m_ph.canceled()) goto end; deallocate_memory(); if( m_use_scales ) { clean_pyramid(); } - if (!m_ph->isTerminationRequested()) - m_ph->newValue( 100 ); + if (!m_ph.canceled()) + m_ph.setValue( 100 ); end: ; @@ -388,10 +390,10 @@ + (1-s)*t*Pyramid[level][y01][x0] + s*t*Pyramid[level][y01][x01]); } +/* PRE: */ double Reinhard02::pyramid_lookup( int x, int y, int level ) - /* PRE: */ { - int n, s; + // int n, s; /* Level 0 is a special case, the value is just the image */ if (level == 0) { @@ -403,8 +405,8 @@ /* Compute the size of the slice */ level--; - n = 1 << level; - s = PyramidWidth0 >> level; + // n = 1 << level; + int s = PyramidWidth0 >> level; //x = x >> level; //y = y >> level; diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/tmo_reinhard02.h luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/tmo_reinhard02.h --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard02/tmo_reinhard02.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard02/tmo_reinhard02.h 2013-04-07 18:41:14.000000000 +0000 @@ -11,7 +11,12 @@ #ifndef TMO_REINHARD02_H #define TMO_REINHARD02_H -class ProgressHelper; +#include + +namespace pfs +{ +class Progress; +} /** * Used to achieve temporal coherence @@ -89,12 +94,15 @@ class Reinhard02 { public: - Reinhard02(unsigned int width, unsigned int height, - const float *Y, float *L, - bool use_scales, float key, float phi, - int num, int low, int high, bool temporal_coherent, ProgressHelper *ph ); - ~Reinhard02() { delete m_Y; delete m_L; }; - void tmo_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); + + ~Reinhard02() + {} + + void tmo_reinhard02(); private: TemporalSmoothVariable m_avg_luminance, m_max_luminance; @@ -102,9 +110,9 @@ COLOR **m_image; double m_sigma_0, m_sigma_1; double **m_luminance; - unsigned int m_width, m_height; - const pfs::Array2D* m_Y; - pfs::Array2D* m_L; + unsigned 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; @@ -113,7 +121,7 @@ const double m_alpha; double m_bbeta; double m_threshold; - ProgressHelper *m_ph; + pfs::Progress &m_ph; double ***Pyramid; int PyramidHeight; diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/pfstmo_reinhard05.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -38,10 +38,11 @@ #include #include "Libpfs/frame.h" -#include "Libpfs/colorspace.h" -#include "Common/ProgressHelper.h" +#include "Libpfs/colorspace/colorspace.h" +#include "Libpfs/exception.h" +#include "Libpfs/progress.h" -void pfstmo_reinhard05(pfs::Frame *frame, float brightness, float chromaticadaptation, float lightadaptation, ProgressHelper *ph) +void pfstmo_reinhard05(pfs::Frame &frame, float brightness, float chromaticadaptation, float lightadaptation, pfs::Progress &ph) { //--- default tone mapping parameters; //float brightness = 0.0f; @@ -57,32 +58,29 @@ std::cout << ss.str(); - pfs::Channel *X, *Y, *Z; - frame->getXYZChannels( X, Y, Z ); - frame->getTags()->setString("LUMINANCE", "RELATIVE"); + pfs::Channel *R, *G, *B; + frame.getXYZChannels( R, G, B ); + frame.getTags().setTag("LUMINANCE", "RELATIVE"); //--- - if( Y==NULL || X==NULL || Z==NULL) + if ( !R || !G || !B ) + { throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" ); - - pfs::Array2D* Xr = X->getChannelData(); - pfs::Array2D* Yr = Y->getChannelData(); - pfs::Array2D* Zr = Z->getChannelData(); + } // tone mapping - int w = Y->getWidth(); - int h = Y->getHeight(); - - pfs::Array2D R(w,h); - pfs::Array2D G(w,h); - pfs::Array2D B(w,h); - - pfs::transformColorSpace( pfs::CS_XYZ, Xr, Yr, Zr, pfs::CS_RGB, &R, &G, &B ); - - tmo_reinhard05(w, h, R.getRawData(), G.getRawData(), B.getRawData(), Y->getRawData(), brightness, chromaticadaptation, lightadaptation, ph ); - - pfs::transformColorSpace( pfs::CS_RGB, &R, &G, &B, pfs::CS_XYZ, Xr, Yr, Zr ); + const unsigned int width = frame.getWidth(); + const unsigned int height = frame.getHeight(); - if (!ph->isTerminationRequested()) - ph->newValue( 100 ); + // is there a way to remove this copy as well? + // I am pretty sure there is! + 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); + + if (!ph.canceled()) + { + ph.setValue( 100 ); + } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/tmo_reinhard05.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -30,9 +30,9 @@ * @author Davide Anastasia */ -#include "TonemappingOperators/pfstmo.h" -#include "Common/ProgressHelper.h" #include "tmo_reinhard05.h" +#include "TonemappingOperators/pfstmo.h" +#include "Libpfs/progress.h" #include #include @@ -45,10 +45,11 @@ namespace { -class LuminanceEqualization : public std::unary_function +class LuminanceEqualization { private: - static float DISPL_F; + static const float DISPL_F; + public: LuminanceEqualization(): min_lum_( numeric_limits::max() ), @@ -70,27 +71,81 @@ float avg_lum_; float adapted_lum_; }; -// set class static member -float LuminanceEqualization::DISPL_F = 2.3e-5f; +const float LuminanceEqualization::DISPL_F = 2.3e-5f; + +void computeAverage(const float* samples, size_t numSamples, float& average) +{ + float summation = accumulate(samples, samples + numSamples, 0.0f); + average = summation/numSamples; +} + + +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_); + } +}; + + +struct LuminanceProperties +{ + float max; + float min; + float adaptedAverage; + float average; + 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()); + + 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; + + + // image key (k) + 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); + // image brightness (m?) + luminanceProperties.imageBrightness = std::exp(-params.m_brightness); +} class ChannelTransformation { public: ChannelTransformation(float& min_sample, float& max_sample, - const float& ch_average, const float& lum_average, - float brightness, - float contrast, - float chromatic_adaptation, - float light_adaptation): - min_sample_(min_sample), - max_sample_(max_sample), - channel_average_(ch_average), - luminance_average_(lum_average), - brightness_(brightness), - contrast_(contrast), - chromatic_adaptation_(chromatic_adaptation), - light_adaptation_(light_adaptation) + 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) @@ -98,13 +153,17 @@ if ( y_sample != 0.0f && ch_sample != 0.0f ) { // local light adaptation - float Il = chromatic_adaptation_ * ch_sample + (1-chromatic_adaptation_)*y_sample; + float Il = (params_.m_chromaticAdaptation * ch_sample) + + ((1.f - params_.m_chromaticAdaptation)*y_sample); // global light adaptation - float Ig = chromatic_adaptation_*channel_average_ + (1-chromatic_adaptation_)*luminance_average_; + float Ig = (params_.m_chromaticAdaptation*channelAverage_) + + ((1.f - params_.m_chromaticAdaptation)*lumProps_.average); // interpolated light adaptation - float Ia = light_adaptation_*Il + (1-light_adaptation_)*Ig; + float Ia = (params_.m_lightAdaptation*Il) + + ((1.f - params_.m_lightAdaptation)*Ig); // photoreceptor equation - ch_sample /= ch_sample + pow(brightness_*Ia, contrast_); + ch_sample /= ch_sample + + std::pow(lumProps_.imageBrightness*Ia, lumProps_.imageContrast); max_sample_ = std::max(ch_sample, max_sample_); min_sample_ = std::min(ch_sample, min_sample_); @@ -116,115 +175,88 @@ // output float& min_sample_; float& max_sample_; - // input - const float& channel_average_; - const float& luminance_average_; - // parameters - float brightness_; - float contrast_; - float chromatic_adaptation_; - float light_adaptation_; + + const float& channelAverage_; + const Reinhard05Params& params_; + const LuminanceProperties& lumProps_; }; -class Normalizer : public std::unary_function +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) { -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_); - } -}; + transform(samplesChannel, + samplesChannel + numSamples, + samplesLuminance, + outputSamples, + ChannelTransformation(minSample, + maxSample, + channelAverage, + params, + lumProps) + ); +} +void normalizeChannel(float* samples, size_t numSamples, float min, float max) +{ + for_each(samples, samples + numSamples, Normalizer(min, max)); +} } -void tmo_reinhard05(unsigned int width, unsigned int height, +void tmo_reinhard05(size_t width, size_t height, float* nR, float* nG, float* nB, const float* nY, - const float br, - const float ca, - const float la, - ProgressHelper *ph) + const Reinhard05Params& params, + pfs::Progress &ph) { float Cav[] = {0.0f, 0.0f, 0.0f}; - const int im_width = width; - const int im_height = height; - const int im_size = im_width * im_height; - - // Average RED Channel - Cav[0] = accumulate(nR, nR + im_size, 0.0f); - Cav[0] /= im_size; - // Average RED Channel - Cav[1] = accumulate(nG, nG + im_size, 0.0f); - Cav[1] /= im_size; - // Average RED Channel - Cav[1] = accumulate(nB, nB + im_size, 0.0f); - Cav[1] /= im_size; + const size_t imSize = width * height; - // equalization parameters for the Luminance Channel - LuminanceEqualization lum_eq = for_each(nY, nY + im_size, LuminanceEqualization()); + computeAverage(nR, imSize, Cav[0]); + computeAverage(nG, imSize, Cav[1]); + computeAverage(nB, imSize, Cav[2]); - float max_lum = logf(lum_eq.max_lum_); - float min_lum = logf(lum_eq.min_lum_); - float world_lum = lum_eq.adapted_lum_/im_size; - float Lav = lum_eq.avg_lum_/im_size; - - // image key - const float k = (max_lum - world_lum) / (max_lum - min_lum); - // image contrast based on key value - const float m = 0.3f + 0.7f*powf(k, 1.4f); - // image brightness - const float f = exp(-br); + LuminanceProperties luminanceProperties; + computeLuminanceProperties(nY, imSize, luminanceProperties, params); // output - float max_col = 0.0f; - float min_col = 1.0f; + float max_col = std::numeric_limits::min(); + float min_col = std::numeric_limits::max(); - int xTotal = 0; + // transform Red Channel + transformChannel(nR, nY, nR, imSize, Cav[0], params, luminanceProperties, min_col, max_col); + ph.setValue(22); - float* temp_red = nR; - float* temp_green = nG; - float* temp_blue = nB; - const float* temp_lum = nY; + // transform Green Channel + transformChannel(nG, nY, nG, imSize, Cav[1], params, luminanceProperties, min_col, max_col); + ph.setValue(44); - // this loop cannot easily parallelizabile with OpenMP, it will be parallelizabile in LibHDR - for (int i = 0; i < im_height; ++i) - { - // transform Red Channel - temp_red = transform(temp_red, temp_red + im_width, temp_lum, temp_red, ChannelTransformation(min_col, max_col, Cav[0], Lav, f, m, ca, la) ); - // transform Green Channel - temp_green = transform(temp_green, temp_green + im_width, temp_lum, temp_green, ChannelTransformation(min_col, max_col, Cav[1], Lav, f, m, ca, la) ); - // transform Blue Channel - temp_blue = transform(temp_blue, temp_blue + im_width, temp_lum, temp_blue, ChannelTransformation(min_col, max_col, Cav[2], Lav, f, m, ca, la) ); - - temp_lum += im_width; - ph->newValue(66 * (xTotal++) / im_height); - } + // transform Blue Channel + transformChannel(nB, nY, nB, imSize, Cav[2], params, luminanceProperties, min_col, max_col); + ph.setValue(66); - if (!ph->isTerminationRequested()) + if (!ph.canceled()) { //--- normalize intensities // normalize RED channel - for_each(nR, nR + im_size, Normalizer(min_col, max_col)); - ph->newValue(77); // done! + normalizeChannel(nR, imSize, min_col, max_col); + ph.setValue(77); // done! // normalize GREEN channel - for_each(nG, nG + im_size, Normalizer(min_col, max_col)); - ph->newValue(88); + normalizeChannel(nG, imSize, min_col, max_col); + ph.setValue(88); // normalize BLUE channel - for_each(nB, nB + im_size, Normalizer(min_col, max_col)); - ph->newValue(99); + normalizeChannel(nB, imSize, min_col, max_col); + ph.setValue(99); } } diff -Nru luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.h luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/tmo_reinhard05.h --- luminance-hdr-2.3.0/src/TonemappingOperators/reinhard05/tmo_reinhard05.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingOperators/reinhard05/tmo_reinhard05.h 2013-04-07 18:41:14.000000000 +0000 @@ -33,23 +33,46 @@ #ifndef TMO_REINHARD05_H #define TMO_REINHARD05_H -class ProgressHelper; +#include -/** - * @brief: Tone mapping algorithm [Reinhard2005] - * - * @param width image width - * @param height image height - * @param R red channel - * @param G green channel - * @param B blue channel - * @param Y luminance channel - * @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(unsigned int width, unsigned int height, - float* R, float* G, float* B, - const float* Y, float br, float ca, float la, ProgressHelper *ph ); +namespace pfs +{ +class Progress; +} + +struct Reinhard05Params +{ + Reinhard05Params(float brightness, + float chromaticAdaptation, + float lightAdaptation) + : m_brightness(brightness) + , m_chromaticAdaptation(chromaticAdaptation) + , m_lightAdaptation(lightAdaptation) + { + // ideally double check that parameters are not outside + // of the allowed range! + } + + float m_brightness; + float m_chromaticAdaptation; + float m_lightAdaptation; +}; + +//! \brief: Tone mapping algorithm [Reinhard2005] +//! +//! \param width image width +//! \param height image height +//! \param R red channel +//! \param G green channel +//! \param B blue channel +//! \param Y luminance channel +//! \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, + pfs::Progress &ph); #endif // TMO_REINHARD05_H diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/CMakeLists.txt luminance-hdr-2.3.1/src/TonemappingPanel/CMakeLists.txt --- luminance-hdr-2.3.0/src/TonemappingPanel/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,16 +1,19 @@ SET(FILES_UI ${CMAKE_CURRENT_SOURCE_DIR}/SavingParametersDialog.ui -${CMAKE_CURRENT_SOURCE_DIR}/TonemappingPanel.ui) +${CMAKE_CURRENT_SOURCE_DIR}/TonemappingPanel.ui +${CMAKE_CURRENT_SOURCE_DIR}/TonemappingSettings.ui) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/SavingParametersDialog.h ${CMAKE_CURRENT_SOURCE_DIR}/TMOProgressIndicator.h ${CMAKE_CURRENT_SOURCE_DIR}/TonemappingPanel.h -${CMAKE_CURRENT_SOURCE_DIR}/TonemappingWarnDialog.h) +${CMAKE_CURRENT_SOURCE_DIR}/TonemappingSettings.h +) SET(FILES_CPP ${CMAKE_CURRENT_SOURCE_DIR}/SavingParametersDialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/TMOProgressIndicator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/TonemappingPanel.cpp -${CMAKE_CURRENT_SOURCE_DIR}/TonemappingWarnDialog.cpp) +${CMAKE_CURRENT_SOURCE_DIR}/TonemappingSettings.cpp +) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.cpp luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.cpp --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -43,17 +43,20 @@ #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" -TonemappingPanel::TonemappingPanel(QWidget *parent): +TonemappingPanel::TonemappingPanel(PreviewPanel *panel, QWidget *parent): QWidget(parent), adding_custom_size(false), + m_previewPanel(panel), m_Ui(new Ui::TonemappingPanel) { m_Ui->setupUi(this); @@ -154,8 +157,7 @@ connect(m_Ui->loadButton, SIGNAL(clicked()), this, SLOT(loadParameters())); connect(m_Ui->saveButton, SIGNAL(clicked()), this, SLOT(saveParameters())); - connect(m_Ui->loadCommentsButton, SIGNAL(clicked()), this, SLOT(loadComments())); - + createDatabase(); } @@ -211,21 +213,10 @@ void TonemappingPanel::createDatabase() { - QDir dir(QDir::homePath()); - - QString filename = dir.absolutePath(); -#ifdef WIN32 - filename += "/LuminanceHDR"; -#else - filename += "/.LuminanceHDR"; -#endif - - filename += "/saved_parameters.db"; - - qDebug() << filename; + LuminanceOptions options; QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); - db.setDatabaseName(filename); + db.setDatabaseName(options.getDatabaseFileName()); db.setHostName("localhost"); bool ok = db.open(); if (!ok) @@ -275,6 +266,10 @@ 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(); + // 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(); } void TonemappingPanel::setSizes(int width, int height) @@ -316,6 +311,8 @@ betaGang->setDefault(); saturation2Gang->setDefault(); noiseGang->setDefault(); + fftSolverGang->setDefault(); + m_Ui->fftVersionCheckBox->setChecked(true); break; case mantiuk06: contrastfactorGang->setDefault(); @@ -408,11 +405,17 @@ } void TonemappingPanel::fillToneMappingOptions() -{ +{ toneMappingOptions = new TonemappingOptions; toneMappingOptionsToDelete.push_back(toneMappingOptions); - toneMappingOptions->origxsize = sizes[0]; - toneMappingOptions->xsize = sizes[m_Ui->sizeComboBox->currentIndex()]; + if (sizes.size()) + { + toneMappingOptions->origxsize = sizes[0]; + toneMappingOptions->xsize = sizes[m_Ui->sizeComboBox->currentIndex()]; + } else { + toneMappingOptions->origxsize = 0; + toneMappingOptions->xsize = 0; + } toneMappingOptions->pregamma = pregammaGang->v(); // toneMappingOptions->tonemapSelection = checkBoxSelection->isChecked(); // toneMappingOptions->tonemapOriginal = checkBoxOriginal->isChecked(); @@ -542,116 +545,70 @@ void TonemappingPanel::on_undoButton_clicked() { - switch (currentTmoOperator) - { - case ashikhmin: - simpleGang->undo(); - eq2Gang->undo(); - contrastGang->undo(); - break; - case drago: - biasGang->undo(); - break; - case durand: - spatialGang->undo(); - rangeGang->undo(); - baseGang->undo(); - break; - case fattal: - alphaGang->undo(); - betaGang->undo(); - saturation2Gang->undo(); - noiseGang->undo(); -// oldFattalGang->undo(); - fftSolverGang->undo(); - break; - case mantiuk06: - contrastfactorGang->undo(); - saturationfactorGang->undo(); - detailfactorGang->undo(); - break; - case mantiuk08: - colorSaturationGang->undo(); - contrastEnhancementGang->undo(); - luminanceLevelGang->undo(); - break; - case pattanaik: - autoYGang->undo(); - pattalocalGang->undo(); - coneGang->undo(); - rodGang->undo(); - multiplierGang->undo(); - break; - case reinhard02: - usescalesGang->undo(); - keyGang->undo(); - phiGang->undo(); - range2Gang->undo(); - lowerGang->undo(); - upperGang->undo(); - break; - case reinhard05: - brightnessGang->undo(); - chromaticGang->undo(); - lightGang->undo(); - break; - } + 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->redo(); - eq2Gang->redo(); - contrastGang->redo(); + (simpleGang->*redoUndo)(); + (eq2Gang->*redoUndo)(); + (contrastGang->*redoUndo)(); break; case drago: - biasGang->redo(); + (biasGang->*redoUndo)(); break; case durand: - spatialGang->redo(); - rangeGang->redo(); - baseGang->redo(); + (spatialGang->*redoUndo)(); + (rangeGang->*redoUndo)(); + (baseGang->*redoUndo)(); break; case fattal: - alphaGang->redo(); - betaGang->redo(); - saturation2Gang->redo(); - noiseGang->redo(); -// oldFattalGang->redo(); - fftSolverGang->redo(); + (alphaGang->*redoUndo)(); + (betaGang->*redoUndo)(); + (saturation2Gang->*redoUndo)(); + (noiseGang->*redoUndo)(); +// (oldFattalGang->*redoUndo)(); + (fftSolverGang->*redoUndo)(); break; case mantiuk06: - contrastfactorGang->redo(); - saturationfactorGang->redo(); - detailfactorGang->redo(); + (contrastfactorGang->*redoUndo)(); + (saturationfactorGang->*redoUndo)(); + (detailfactorGang->*redoUndo)(); break; case mantiuk08: - colorSaturationGang->redo(); - contrastEnhancementGang->redo(); - luminanceLevelGang->redo(); + (colorSaturationGang->*redoUndo)(); + (contrastEnhancementGang->*redoUndo)(); + (luminanceLevelGang->*redoUndo)(); break; case pattanaik: - autoYGang->redo(); - pattalocalGang->redo(); - coneGang->redo(); - rodGang->redo(); - multiplierGang->redo(); + (autoYGang->*redoUndo)(); + (pattalocalGang->*redoUndo)(); + (coneGang->*redoUndo)(); + (rodGang->*redoUndo)(); + (multiplierGang->*redoUndo)(); break; case reinhard02: - usescalesGang->redo(); - keyGang->redo(); - phiGang->redo(); - range2Gang->redo(); - lowerGang->redo(); - upperGang->redo(); + (usescalesGang->*redoUndo)(); + (keyGang->*redoUndo)(); + (phiGang->*redoUndo)(); + (range2Gang->*redoUndo)(); + (lowerGang->*redoUndo)(); + (upperGang->*redoUndo)(); break; case reinhard05: - brightnessGang->redo(); - chromaticGang->redo(); - lightGang->redo(); + (brightnessGang->*redoUndo)(); + (chromaticGang->*redoUndo)(); + (lightGang->*redoUndo)(); break; } } @@ -746,7 +703,7 @@ out << "BETA=" << betaGang->v() << endl; out << "COLOR=" << saturation2Gang->v() << endl; out << "NOISE=" << noiseGang->v() << endl; - out << "OLDFATTAL=NO" << endl; + out << "OLDFATTAL=" << (m_Ui->fftVersionCheckBox->isChecked() ? "NO" : "YES") << endl; } else if (current_page == m_Ui->page_ashikhmin) { @@ -840,7 +797,7 @@ sizes.push_back(value.toInt()); fillCustomSizeComboBox(); m_Ui->sizeComboBox->setCurrentIndex(m_Ui->sizeComboBox->count() - 1); - } + } else m_Ui->sizeComboBox->setCurrentIndex(idx); } @@ -907,8 +864,8 @@ m_Ui->saturation2Slider->setValue(saturation2Gang->v2p(value.toFloat())); } else if (field == "NOISE") { m_Ui->noiseSlider->setValue(noiseGang->v2p(value.toFloat())); -// } else if (field == "OLDFATTAL") { -// m_Ui->oldFattalCheckBox->setChecked(value == "YES"); + } else if (field == "OLDFATTAL") { + m_Ui->fftVersionCheckBox->setChecked(value != "YES"); } else if (field == "MULTIPLIER") { m_Ui->multiplierSlider->setValue(multiplierGang->v2p(value.toFloat())); } else if (field == "LOCAL") { @@ -946,7 +903,7 @@ void TonemappingPanel::on_addCustomSizeButton_clicked() { bool ok; - int i = QInputDialog::getInteger(this, + 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) @@ -976,7 +933,7 @@ m_Ui->loadsettingsbutton->setEnabled(b); m_Ui->savesettingsbutton->setEnabled(b); m_Ui->defaultButton->setEnabled(b); - if (b) + if (b) { updateUndoState(); } @@ -998,10 +955,9 @@ m_Ui->applyButton->setEnabled(b); // DB - m_Ui->loadCommentsButton->setEnabled(b); m_Ui->loadButton->setEnabled(b); m_Ui->saveButton->setEnabled(b); - + //m_Ui->qualityHS->setEnabled(b); //m_Ui->qualitySB->setEnabled(b); @@ -1018,6 +974,7 @@ void TonemappingPanel::updatedHDR(pfs::Frame* f) { setSizes(f->getWidth(), f->getHeight()); + m_currentFrame = f; } /* @@ -1039,8 +996,8 @@ { // Ashikhmin float lct; - bool simple, - eq2; + bool simple, + eq2; // Drago float bias; // Durand @@ -1105,7 +1062,7 @@ beta = betaGang->v(); colorSat = saturation2Gang->v(); noiseReduction = noiseGang->v(); - oldFattal = false; //always false! // oldFattalGang->isCheckBox1Checked(); + oldFattal = !fftSolverGang->isCheckBox1Checked(); execFattalQuery(alpha, beta, colorSat, noiseReduction, oldFattal, comment); break; case mantiuk06: @@ -1145,19 +1102,17 @@ lightAdaptation = lightGang->v(); execReinhard05Query(brightness, chromaticAdaptation, lightAdaptation, comment); break; - } + } } } void TonemappingPanel::loadParameters() { - SavedParametersDialog dialog(currentTmoOperator); + TonemappingSettings dialog(this, m_currentFrame); + if (dialog.exec()) { - QSqlQueryModel *model = dialog.getModel(); - if (model->rowCount() == 0) - return; - int selectedRow = dialog.getCurrentIndex().row(); + TonemappingOptions *tmopts = dialog.getTonemappingOptions(); // Ashikhmin bool simple, eq2; @@ -1173,7 +1128,7 @@ beta, colorSat, noiseReduction; - bool oldFattal; + bool fftsolver; // Mantiuk 06 bool contrastEqualization; float contrastFactor; @@ -1204,12 +1159,13 @@ // Pre-gamma float pregamma; - switch (currentTmoOperator) { + switch (tmopts->tmoperator) { case ashikhmin: - simple = model->record(selectedRow).value("simple").toBool(); - eq2 = model->record(selectedRow).value("eq2").toBool(); - lct = model->record(selectedRow).value("lct").toFloat(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + m_Ui->stackedWidget_operators->setCurrentIndex(ashikhmin); + simple = tmopts->operator_options.ashikhminoptions.simple; + eq2 = tmopts->operator_options.ashikhminoptions.eq2; + lct = tmopts->operator_options.ashikhminoptions.lct; + pregamma = tmopts->pregamma; m_Ui->simpleCheckBox->setChecked(simple); if (eq2) m_Ui->eq2RadioButton->setChecked(true); @@ -1221,18 +1177,20 @@ m_Ui->pregammadsb->setValue(pregamma); break; case drago: - bias = model->record(selectedRow).value("bias").toFloat(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + m_Ui->stackedWidget_operators->setCurrentIndex(drago); + bias = tmopts->operator_options.dragooptions.bias; + pregamma = tmopts->pregamma; m_Ui->biasSlider->setValue(bias); m_Ui->biasdsb->setValue(bias); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); break; case durand: - spatial = model->record(selectedRow).value("spatial").toFloat(); - range = model->record(selectedRow).value("range").toFloat(); - base = model->record(selectedRow).value("base").toFloat(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + 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; m_Ui->spatialSlider->setValue(spatial); m_Ui->spatialdsb->setValue(spatial); m_Ui->rangeSlider->setValue(range); @@ -1243,12 +1201,13 @@ m_Ui->pregammadsb->setValue(pregamma); break; case fattal: - alpha = model->record(selectedRow).value("alpha").toFloat(); - beta = model->record(selectedRow).value("beta").toFloat(); - colorSat = model->record(selectedRow).value("colorSaturation").toFloat(); - noiseReduction = model->record(selectedRow).value("noiseReduction").toFloat(); - oldFattal = model->record(selectedRow).value("oldFattal").toBool(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + 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; + fftsolver = tmopts->operator_options.fattaloptions.fftsolver; + pregamma = tmopts->pregamma; m_Ui->alphaSlider->setValue(alpha); m_Ui->alphadsb->setValue(alpha); m_Ui->betaSlider->setValue(beta); @@ -1257,16 +1216,17 @@ m_Ui->saturation2dsb->setValue(colorSat); m_Ui->noiseSlider->setValue(noiseReduction); m_Ui->noisedsb->setValue(noiseReduction); -// m_Ui->oldFattalCheckBox->setChecked(oldFattal); + m_Ui->fftVersionCheckBox->setChecked(fftsolver); m_Ui->pregammaSlider->setValue(pregamma); m_Ui->pregammadsb->setValue(pregamma); break; case mantiuk06: - contrastEqualization = model->record(selectedRow).value("contrastEqualization").toBool(); - contrastFactor = model->record(selectedRow).value("contrastFactor").toFloat(); - saturationFactor = model->record(selectedRow).value("saturationFactor").toFloat(); - detailFactor = model->record(selectedRow).value("detailFactor").toFloat(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + 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; + pregamma = tmopts->pregamma; m_Ui->contrastEqualizCheckBox->setChecked(contrastEqualization); m_Ui->contrastFactorSlider->setValue(contrastFactor); m_Ui->contrastFactordsb->setValue(contrastFactor); @@ -1278,11 +1238,12 @@ m_Ui->pregammadsb->setValue(pregamma); break; case mantiuk08: - colorSaturation = model->record(selectedRow).value("colorSaturation").toFloat(); - contrastEnhancement = model->record(selectedRow).value("contrastEnhancement").toFloat(); - luminanceLevel = model->record(selectedRow).value("luminanceLevel").toFloat(); - manualLuminanceLevel = model->record(selectedRow).value("manualLuminanceLevel").toBool(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + 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; + pregamma = tmopts->pregamma; m_Ui->colorSaturationSlider->setValue(colorSaturation); m_Ui->colorSaturationDSB->setValue(colorSaturation); m_Ui->contrastEnhancementSlider->setValue(contrastEnhancement); @@ -1294,12 +1255,13 @@ m_Ui->pregammadsb->setValue(pregamma); break; case pattanaik: - multiplier = model->record(selectedRow).value("multiplier").toFloat(); - rod = model->record(selectedRow).value("rod").toFloat(); - cone = model->record(selectedRow).value("cone").toFloat(); - autolum = model->record(selectedRow).value("autolum").toBool(); - local = model->record(selectedRow).value("local").toBool(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + m_Ui->stackedWidget_operators->setCurrentIndex(pattanaik); + 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; m_Ui->multiplierSlider->setValue(multiplier); m_Ui->multiplierdsb->setValue(multiplier); m_Ui->coneSlider->setValue(cone); @@ -1312,13 +1274,14 @@ m_Ui->pregammadsb->setValue(pregamma); break; case reinhard02: - scales = model->record(selectedRow).value("scales").toBool(); - key = model->record(selectedRow).value("key").toFloat(); - phi = model->record(selectedRow).value("phi").toFloat(); - irange = model->record(selectedRow).value("range").toInt(); - lower = model->record(selectedRow).value("lower").toInt(); - upper = model->record(selectedRow).value("upper").toInt(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + m_Ui->stackedWidget_operators->setCurrentIndex(reinhard02); + scales = tmopts->operator_options.reinhard02options.scales; + key = tmopts->operator_options.reinhard02options.key; + phi = tmopts->operator_options.reinhard02options.phi; + irange = tmopts->operator_options.reinhard02options.range; + lower = tmopts->operator_options.reinhard02options.lower; + upper = tmopts->operator_options.reinhard02options.upper; + pregamma = tmopts->pregamma; m_Ui->usescalescheckbox->setChecked(scales); m_Ui->keySlider->setValue(key); m_Ui->keydsb->setValue(key); @@ -1334,10 +1297,11 @@ m_Ui->pregammadsb->setValue(pregamma); break; case reinhard05: - brightness = model->record(selectedRow).value("brightness").toFloat(); - chromaticAdaptation = model->record(selectedRow).value("chromaticAdaptation").toFloat(); - lightAdaptation = model->record(selectedRow).value("lightAdaptation").toFloat(); - pregamma = model->record(selectedRow).value("pregamma").toFloat(); + m_Ui->stackedWidget_operators->setCurrentIndex(reinhard05); + brightness = tmopts->operator_options.reinhard05options.brightness; + chromaticAdaptation = tmopts->operator_options.reinhard05options.chromaticAdaptation; + lightAdaptation = tmopts->operator_options.reinhard05options.lightAdaptation; + pregamma = tmopts->pregamma; m_Ui->brightnessSlider->setValue(brightness); m_Ui->brightnessdsb->setValue(brightness); m_Ui->chromaticAdaptSlider->setValue(chromaticAdaptation); @@ -1348,178 +1312,13 @@ m_Ui->pregammadsb->setValue(pregamma); break; } - } -} - -void TonemappingPanel::loadComments() -{ - SavedParametersDialog dialog(this); - if (dialog.exec()) - { - QSqlQueryModel *model = dialog.getModel(); - int selectedRow = dialog.getCurrentIndex().row(); - QString comment, tmOperator; - comment = model->record(selectedRow).value("comment").toString(); - tmOperator = model->record(selectedRow).value("operator").toString(); - - QSqlTableModel *temp_model = new QSqlTableModel; - temp_model->setTable(tmOperator); - temp_model->select(); - QSqlQuery query("SELECT * from " + tmOperator + " WHERE comment = '" + comment + "'"); - if (tmOperator == "ashikhmin") - { - m_Ui->stackedWidget_operators->setCurrentIndex(ashikhmin); - updateCurrentTmoOperator(ashikhmin); - while (query.next()) - { - m_Ui->simpleCheckBox->setChecked(query.value(0).toBool()); - if (query.value(1).toBool()) - m_Ui->eq2RadioButton->setChecked(true); - else - m_Ui->eq4RadioButton->setChecked(true); - m_Ui->contrastSlider->setValue(query.value(2).toFloat()); - m_Ui->contrastdsb->setValue(query.value(2).toFloat()); - m_Ui->pregammaSlider->setValue(query.value(3).toFloat()); - m_Ui->pregammadsb->setValue(query.value(3).toFloat()); - } - } - else if (tmOperator == "drago") - { - m_Ui->stackedWidget_operators->setCurrentIndex(drago); - updateCurrentTmoOperator(drago); - while (query.next()) - { - m_Ui->biasSlider->setValue(query.value(0).toFloat()); - m_Ui->biasdsb->setValue(query.value(0).toFloat()); - m_Ui->pregammaSlider->setValue(query.value(1).toFloat()); - m_Ui->pregammadsb->setValue(query.value(1).toFloat()); - } - } - else if (tmOperator == "durand") - { - m_Ui->stackedWidget_operators->setCurrentIndex(durand); - updateCurrentTmoOperator(durand); - while (query.next()) - { - m_Ui->spatialSlider->setValue(query.value(0).toFloat()); - m_Ui->spatialdsb->setValue(query.value(0).toFloat()); - m_Ui->rangeSlider->setValue(query.value(1).toFloat()); - m_Ui->rangedsb->setValue(query.value(1).toFloat()); - m_Ui->baseSlider->setValue(query.value(2).toFloat()); - m_Ui->basedsb->setValue(query.value(2).toFloat()); - m_Ui->pregammaSlider->setValue(query.value(3).toFloat()); - m_Ui->pregammadsb->setValue(query.value(3).toFloat()); - } - } - else if (tmOperator == "fattal") - { - m_Ui->stackedWidget_operators->setCurrentIndex(fattal); - updateCurrentTmoOperator(fattal); - while (query.next()) - { - m_Ui->alphaSlider->setValue(query.value(0).toFloat()); - m_Ui->alphadsb->setValue(query.value(0).toFloat()); - m_Ui->betaSlider->setValue(query.value(1).toFloat()); - m_Ui->betadsb->setValue(query.value(1).toFloat()); - m_Ui->saturation2Slider->setValue(query.value(2).toFloat()); - m_Ui->saturation2dsb->setValue(query.value(2).toFloat()); - m_Ui->noiseSlider->setValue(query.value(3).toFloat()); - m_Ui->noisedsb->setValue(query.value(3).toFloat()); -// m_Ui->oldFattalCheckBox->setChecked(query.value(4).toBool()); - m_Ui->pregammaSlider->setValue(query.value(5).toFloat()); - m_Ui->pregammadsb->setValue(query.value(5).toFloat()); - } - } - else if (tmOperator == "mantiuk06") - { - m_Ui->stackedWidget_operators->setCurrentIndex(mantiuk06); - updateCurrentTmoOperator(mantiuk06); - while (query.next()) - { - m_Ui->contrastEqualizCheckBox->setChecked(query.value(0).toBool()); - m_Ui->contrastFactorSlider->setValue(query.value(1).toFloat()); - m_Ui->contrastFactordsb->setValue(query.value(1).toFloat()); - m_Ui->saturationFactorSlider->setValue(query.value(2).toFloat()); - m_Ui->saturationFactordsb->setValue(query.value(2).toFloat()); - m_Ui->detailFactorSlider->setValue(query.value(3).toFloat()); - m_Ui->detailFactordsb->setValue(query.value(3).toFloat()); - m_Ui->pregammaSlider->setValue(query.value(4).toFloat()); - m_Ui->pregammadsb->setValue(query.value(4).toFloat()); - } - } - else if (tmOperator == "mantiuk08") - { - m_Ui->stackedWidget_operators->setCurrentIndex(mantiuk08); - updateCurrentTmoOperator(mantiuk08); - while (query.next()) - { - m_Ui->colorSaturationSlider->setValue(query.value(0).toFloat()); - m_Ui->colorSaturationDSB->setValue(query.value(0).toFloat()); - m_Ui->contrastEnhancementSlider->setValue(query.value(1).toFloat()); - m_Ui->contrastEnhancementDSB->setValue(query.value(1).toFloat()); - m_Ui->luminanceLevelSlider->setValue(query.value(2).toFloat()); - m_Ui->luminanceLevelDSB->setValue(query.value(2).toFloat()); - m_Ui->luminanceLevelCheckBox->setChecked(query.value(3).toBool()); - m_Ui->pregammaSlider->setValue(query.value(4).toFloat()); - m_Ui->pregammadsb->setValue(query.value(4).toFloat()); - } - } - else if (tmOperator == "pattanaik") - { - m_Ui->stackedWidget_operators->setCurrentIndex(pattanaik); - updateCurrentTmoOperator(pattanaik); - while (query.next()) - { - m_Ui->multiplierSlider->setValue(query.value(0).toFloat()); - m_Ui->multiplierdsb->setValue(query.value(0).toFloat()); - m_Ui->coneSlider->setValue(query.value(1).toFloat()); - m_Ui->conedsb->setValue(query.value(1).toFloat()); - m_Ui->rodSlider->setValue(query.value(2).toFloat()); - m_Ui->roddsb->setValue(query.value(2).toFloat()); - m_Ui->pattalocal->setChecked(query.value(3).toBool()); - m_Ui->autoYcheckbox->setChecked(query.value(4).toBool()); - m_Ui->pregammaSlider->setValue(query.value(5).toFloat()); - m_Ui->pregammadsb->setValue(query.value(5).toFloat()); - } - } - else if (tmOperator == "reinhard02") - { - m_Ui->stackedWidget_operators->setCurrentIndex(reinhard02); - updateCurrentTmoOperator(reinhard02); - while (query.next()) - { - m_Ui->usescalescheckbox->setChecked(query.value(0).toBool()); - m_Ui->keySlider->setValue(query.value(1).toFloat()); - m_Ui->keydsb->setValue(query.value(1).toFloat()); - m_Ui->phiSlider->setValue(query.value(2).toFloat()); - m_Ui->phidsb->setValue(query.value(2).toFloat()); - m_Ui->range2Slider->setValue(query.value(3).toInt()); - m_Ui->range2dsb->setValue(query.value(3).toInt()); - m_Ui->lowerSlider->setValue(query.value(4).toInt()); - m_Ui->lowerdsb->setValue(query.value(4).toInt()); - m_Ui->upperSlider->setValue(query.value(5).toInt()); - m_Ui->upperdsb->setValue(query.value(5).toInt()); - m_Ui->pregammaSlider->setValue(query.value(6).toFloat()); - m_Ui->pregammadsb->setValue(query.value(6).toFloat()); - } - } - else if (tmOperator == "reinhard05") - { - m_Ui->stackedWidget_operators->setCurrentIndex(reinhard05); - updateCurrentTmoOperator(reinhard05); - while (query.next()) - { - m_Ui->brightnessSlider->setValue(query.value(0).toFloat()); - m_Ui->brightnessdsb->setValue(query.value(0).toFloat()); - m_Ui->chromaticAdaptSlider->setValue(query.value(1).toFloat()); - m_Ui->chromaticAdaptdsb->setValue(query.value(1).toFloat()); - m_Ui->lightAdaptSlider->setValue(query.value(2).toFloat()); - m_Ui->lightAdaptdsb->setValue(query.value(2).toFloat()); - m_Ui->pregammaSlider->setValue(query.value(3).toFloat()); - m_Ui->pregammadsb->setValue(query.value(3).toFloat()); - } - } - delete temp_model; + if (dialog.wantsTonemap()) { + TonemappingOptions *t = new TonemappingOptions(*tmopts); + toneMappingOptionsToDelete.push_back(t); + t->origxsize = sizes[0]; + t->xsize = sizes[0]; + emit startTonemapping(t); + } } } @@ -1699,6 +1498,244 @@ return m_Ui->replaceLdrCheckBox->isChecked(); } -// ------------------------- // END FILE +void TonemappingPanel::updatePreviews(double v) +{ + int index = m_Ui->stackedWidget_operators->currentIndex(); + TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + fillToneMappingOptions(); + QObject* eventSender(sender()); + // Mantiuk06 + if (eventSender == m_Ui->contrastFactordsb) + tmopts->operator_options.mantiuk06options.contrastfactor = v; + else if(eventSender == m_Ui->saturationFactordsb) + tmopts->operator_options.mantiuk06options.saturationfactor = v; + else if(eventSender == m_Ui->detailFactordsb) + tmopts->operator_options.mantiuk06options.detailfactor = v; + // Mantiuk08 + else if(eventSender == m_Ui->colorSaturationDSB) + tmopts->operator_options.mantiuk08options.colorsaturation = v; + else if(eventSender == m_Ui->contrastEnhancementDSB) + tmopts->operator_options.mantiuk08options.contrastenhancement = v; + else if(eventSender == m_Ui->luminanceLevelDSB) + tmopts->operator_options.mantiuk08options.luminancelevel = v; + // Fattal + else if(eventSender == m_Ui->alphadsb) + tmopts->operator_options.fattaloptions.alpha = v; + else if(eventSender == m_Ui->betadsb) + tmopts->operator_options.fattaloptions.beta = v; + else if(eventSender == m_Ui->saturation2dsb) + tmopts->operator_options.fattaloptions.color = v; + else if(eventSender == m_Ui->noisedsb) + tmopts->operator_options.fattaloptions.noiseredux = v; + // Drago + else if(eventSender == m_Ui->biasdsb) + tmopts->operator_options.dragooptions.bias = v; + // Durand + else if(eventSender == m_Ui->basedsb) + tmopts->operator_options.durandoptions.base = v; + else if(eventSender == m_Ui->spatialdsb) + tmopts->operator_options.durandoptions.spatial = v; + else if(eventSender == m_Ui->rangedsb) + tmopts->operator_options.durandoptions.range = v; + // Reinhard02 + else if(eventSender == m_Ui->keydsb) + tmopts->operator_options.reinhard02options.key = v; + else if(eventSender == m_Ui->phidsb) + tmopts->operator_options.reinhard02options.phi = v; + else if(eventSender == m_Ui->range2dsb) + tmopts->operator_options.reinhard02options.range = (int)v; + else if(eventSender == m_Ui->lowerdsb) + tmopts->operator_options.reinhard02options.lower = (int)v; + else if(eventSender == m_Ui->upperdsb) + tmopts->operator_options.reinhard02options.upper = (int)v; + // Reinhard05 + else if(eventSender == m_Ui->brightnessdsb) + tmopts->operator_options.reinhard05options.brightness = v; + else if(eventSender == m_Ui->chromaticAdaptdsb) + tmopts->operator_options.reinhard05options.chromaticAdaptation = v; + else if(eventSender == m_Ui->lightAdaptdsb) + tmopts->operator_options.reinhard05options.lightAdaptation = v; + // Ashikhmin + else if(eventSender == m_Ui->contrastdsb) + tmopts->operator_options.ashikhminoptions.lct = v; + // Pattanaik + else if(eventSender == m_Ui->multiplierdsb) + tmopts->operator_options.pattanaikoptions.multiplier = v; + else if(eventSender == m_Ui->conedsb) + tmopts->operator_options.pattanaikoptions.cone = v; + else if(eventSender == m_Ui->roddsb) + tmopts->operator_options.pattanaikoptions.rod = v; + else if(eventSender == m_Ui->pregammadsb) + tmopts->pregamma = v; + + if (index >= 0) + { + m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); + m_previewPanel->updatePreviews(m_currentFrame, index); + } +} + +void TonemappingPanel::updatePreviewsCB(int state) +{ + int index = m_Ui->stackedWidget_operators->currentIndex(); + TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + fillToneMappingOptions(); + QObject* eventSender(sender()); + // Mantiuk06 + if (eventSender == m_Ui->contrastEqualizCheckBox) + tmopts->operator_options.mantiuk06options.contrastequalization = state; + // Mantiuk08 + else if (eventSender == m_Ui->luminanceLevelCheckBox) + tmopts->operator_options.mantiuk08options.luminancelevel = state; + // Fattal + else if (eventSender == m_Ui->fftVersionCheckBox) + tmopts->operator_options.fattaloptions.fftsolver = state; + // Reinhard02 + else if (eventSender == m_Ui->usescalescheckbox) + tmopts->operator_options.reinhard02options.scales = state; + // Ashikhmin + else if (eventSender == m_Ui->simpleCheckBox) + tmopts->operator_options.ashikhminoptions.simple = state; + // Pattanaik + else if (eventSender == m_Ui->pattalocal) + tmopts->operator_options.pattanaikoptions.local = state; + else if (eventSender == m_Ui->autoYcheckbox) + tmopts->operator_options.pattanaikoptions.autolum = state; + + if (index >= 0) + { + m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); + m_previewPanel->updatePreviews(m_currentFrame, index); + } +} + +void TonemappingPanel::updatePreviewsRB(bool toggled) +{ + int index = m_Ui->stackedWidget_operators->currentIndex(); + TonemappingOptions *tmopts = new TonemappingOptions(*toneMappingOptions); // make a copy + fillToneMappingOptions(); + + // Only one sender: Ashikhmin + tmopts->operator_options.ashikhminoptions.eq2 = toggled; + + if (index >= 0) + { + m_previewPanel->getLabel(index)->setTonemappingOptions(tmopts); + m_previewPanel->updatePreviews(m_currentFrame, index); + } +} + +void TonemappingPanel::setRealtimePreviews(bool toggled) +{ + if (toggled) { + fillToneMappingOptions(); + + 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->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->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->biasdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + + 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))); + + 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->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))); + + connect(m_Ui->contrastdsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + + 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->pregammadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + + connect(m_Ui->contrastEqualizCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->luminanceLevelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->fftVersionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->usescalescheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->simpleCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->pattalocal, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + connect(m_Ui->autoYcheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + connect(m_Ui->eq2RadioButton, SIGNAL(toggled(bool)), this, SLOT(updatePreviewsRB(bool))); + } + 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->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))); + + + 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->contrastdsb, 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))); + + disconnect(m_Ui->pregammadsb, SIGNAL(valueChanged(double)), this, SLOT(updatePreviews(double))); + + disconnect(m_Ui->contrastEqualizCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->luminanceLevelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->fftVersionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->usescalescheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->simpleCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->pattalocal, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + disconnect(m_Ui->autoYcheckbox, SIGNAL(stateChanged(int)), this, SLOT(updatePreviewsCB(int))); + + disconnect(m_Ui->eq2RadioButton, SIGNAL(toggled(bool)), this, SLOT(updatePreviewsRB(bool))); + } +} +// ------------------------- // END FILE \ No newline at end of file diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.h luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.h --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,6 +32,7 @@ #include "Core/TonemappingOptions.h" #include "Libpfs/frame.h" +#include "PreviewPanel/PreviewPanel.h" class Gang; @@ -104,9 +105,11 @@ float heightToWidthRatio; bool adding_custom_size; + PreviewPanel *m_previewPanel; void createDatabase(); + pfs::Frame *m_currentFrame; QScopedPointer m_Ui; protected Q_SLOTS: @@ -127,7 +130,6 @@ void updateUndoState(); void loadParameters(); void saveParameters(); - void loadComments(); void execMantiuk06Query(bool, float, float, float, QString); void execMantiuk08Query(float, float, float, bool, QString); void execAshikhminQuery(bool, bool, float, QString); @@ -137,9 +139,13 @@ void execPattanaikQuery(bool, bool, float, float, float, QString); void execReinhard02Query(bool, float, float, int, int, int, QString); void execReinhard05Query(float, float, float, QString); + + void updatePreviews(double); + void updatePreviewsCB(int); + void updatePreviewsRB(bool); public: - TonemappingPanel(QWidget *parent = 0); + TonemappingPanel(PreviewPanel *p = 0, QWidget *parent = 0); ~TonemappingPanel(); void setSizes(int, int); bool replaceLdr(); @@ -148,10 +154,15 @@ void setEnabled(bool); void updatedHDR(pfs::Frame*); void updateTonemappingParams(TonemappingOptions *opts); + void setRealtimePreviews(bool); signals: void startTonemapping(TonemappingOptions*); +private: + void onUndoRedo(bool undo); + + }; #endif diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.ui luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.ui --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingPanel.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingPanel.ui 2013-04-07 18:41:14.000000000 +0000 @@ -29,8 +29,8 @@ - - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png Tone mapping operators and their options @@ -3069,37 +3069,30 @@ - - - - Load saved parameters - - - ... - - - - :/new/prefix1/images/vcs_commit.png:/new/prefix1/images/vcs_commit.png + + + + Qt::Horizontal - + - 24 - 24 + 40 + 20 - + - - + + - Load parameters by comment + Load saved parameters ... - :/new/prefix1/images/vcs_add.png:/new/prefix1/images/vcs_add.png + :/new/prefix1/images/vcs_commit.png:/new/prefix1/images/vcs_commit.png @@ -3109,19 +3102,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -3459,7 +3439,6 @@ loadsettingsbutton saveButton loadButton - loadCommentsButton sizeComboBox addCustomSizeButton pregammaSlider diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.cpp luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.cpp --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,485 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 "Core/TonemappingOptions.h" +#include "PreviewPanel/PreviewLabel.h" +#include "TonemappingSettings.h" +#include "ui_TonemappingSettings.h" + +namespace // anoymous namespace +{ +const int PREVIEW_WIDTH = PREVIEW_WIDTH; +const int PREVIEW_HEIGHT = 100; + +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(); + return opts1->getPostfix() < opts2->getPostfix(); +} + +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) +{ + m_Ui->setupUi(this); + + m_Ui->splitter->setStretchFactor(0,1); + m_Ui->splitter->setStretchFactor(1,10); + + m_previewSettings = new PreviewSettings(m_Ui->scrollArea); + + m_Ui->scrollArea->setWidgetResizable(true); + + m_Ui->scrollArea->setWidget(m_previewSettings); + + fillPreviews(); + + if (m_Ui->listWidget->count() != 0) { + m_currentIndex = 0; + m_Ui->listWidget->setCurrentRow(0); + m_previewSettings->selectLabel(0); + } + else + m_Ui->applyButton->setDisabled(true); + + 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())); +} + +TonemappingSettings::~TonemappingSettings() +{ + qDeleteAll(m_previewLabelList); +} + +void TonemappingSettings::fillPreviews() +{ + int index = 0; + QString sqlQuery; + int origxsize = m_frame->getWidth(); + float pregamma; + QString comment; + + sqlQuery = "SELECT *, 'ashikhmin' AS operator FROM ashikhmin"; + m_modelPreviews->setQuery(sqlQuery); + + bool simple; + bool eq2; + float lct; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoAshikhmin = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + simple = m_modelPreviews->record(selectedRow).value("simple").toBool(); + eq2 = m_modelPreviews->record(selectedRow).value("eq2").toBool(); + lct = m_modelPreviews->record(selectedRow).value("lct").toFloat(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoAshikhmin->origxsize = origxsize; + tmoAshikhmin->xsize = PREVIEW_WIDTH; + tmoAshikhmin->pregamma = pregamma; + tmoAshikhmin->tmoperator = ashikhmin; + tmoAshikhmin->operator_options.ashikhminoptions.simple = simple; + tmoAshikhmin->operator_options.ashikhminoptions.eq2 = eq2; + tmoAshikhmin->operator_options.ashikhminoptions.lct = lct; + + PreviewLabel *previewLabelAshikhmin = new PreviewLabel(0, tmoAshikhmin, index++); + m_previewLabelList.append(previewLabelAshikhmin); + previewLabelAshikhmin->setComment(comment); + connect(previewLabelAshikhmin, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelAshikhmin, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelAshikhmin, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelAshikhmin); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'drago' AS operator FROM drago"; + m_modelPreviews->setQuery(sqlQuery); + + float bias; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoDrago = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + bias = m_modelPreviews->record(selectedRow).value("bias").toFloat(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoDrago->origxsize = origxsize; + tmoDrago->xsize = PREVIEW_WIDTH; + tmoDrago->pregamma = pregamma; + tmoDrago->tmoperator = drago; + tmoDrago->operator_options.dragooptions.bias = bias; + + PreviewLabel *previewLabelDrago = new PreviewLabel(0, tmoDrago, index++); + m_previewLabelList.append(previewLabelDrago); + previewLabelDrago->setComment(comment); + connect(previewLabelDrago, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelDrago, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelDrago, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelDrago); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'durand' AS operator FROM durand"; + m_modelPreviews->setQuery(sqlQuery); + + float spatial, + range, + base; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoDurand = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + spatial = m_modelPreviews->record(selectedRow).value("spatial").toFloat(); + range = m_modelPreviews->record(selectedRow).value("range").toFloat(); + base = m_modelPreviews->record(selectedRow).value("base").toFloat(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoDurand->origxsize = origxsize; + tmoDurand->xsize = PREVIEW_WIDTH; + tmoDurand->pregamma = pregamma; + tmoDurand->tmoperator = durand; + tmoDurand->operator_options.durandoptions.spatial = spatial; + tmoDurand->operator_options.durandoptions.range = range; + tmoDurand->operator_options.durandoptions.base = base; + + PreviewLabel *previewLabelDurand = new PreviewLabel(0, tmoDurand, index++); + m_previewLabelList.append(previewLabelDurand); + previewLabelDurand->setComment(comment); + connect(previewLabelDurand, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelDurand, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelDurand, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelDurand); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'fattal' AS operator FROM fattal"; + m_modelPreviews->setQuery(sqlQuery); + + float alpha, + beta, + colorSat, + noiseReduction; + bool fftsolver; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoFattal = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + 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(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoFattal->origxsize = origxsize; + tmoFattal->xsize = PREVIEW_WIDTH; + tmoFattal->pregamma = pregamma; + tmoFattal->tmoperator = fattal; + tmoFattal->operator_options.fattaloptions.alpha = alpha; + tmoFattal->operator_options.fattaloptions.beta = beta; + tmoFattal->operator_options.fattaloptions.color = colorSat; + tmoFattal->operator_options.fattaloptions.noiseredux = noiseReduction; + tmoFattal->operator_options.fattaloptions.fftsolver = fftsolver; + + PreviewLabel *previewLabelFattal = new PreviewLabel(0, tmoFattal, index++); + m_previewLabelList.append(previewLabelFattal); + previewLabelFattal->setComment(comment); + connect(previewLabelFattal, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelFattal, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelFattal, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelFattal); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'mantiuk06' AS operator FROM mantiuk06"; + m_modelPreviews->setQuery(sqlQuery); + + bool contrastEqualization; + float contrastFactor; + float saturationFactor; + float detailFactor; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoMantiuk06 = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + 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(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoMantiuk06->origxsize = origxsize; + tmoMantiuk06->xsize = PREVIEW_WIDTH; + tmoMantiuk06->pregamma = pregamma; + tmoMantiuk06->tmoperator = mantiuk06; + tmoMantiuk06->operator_options.mantiuk06options.contrastfactor = contrastFactor; + tmoMantiuk06->operator_options.mantiuk06options.saturationfactor = saturationFactor; + tmoMantiuk06->operator_options.mantiuk06options.detailfactor = detailFactor; + tmoMantiuk06->operator_options.mantiuk06options.contrastequalization = contrastEqualization; + + PreviewLabel *previewLabelMantiuk06 = new PreviewLabel(0, tmoMantiuk06, index++); + m_previewLabelList.append(previewLabelMantiuk06); + previewLabelMantiuk06->setComment(comment); + connect(previewLabelMantiuk06, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelMantiuk06, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelMantiuk06, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelMantiuk06); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'mantiuk08' AS operator FROM mantiuk08"; + m_modelPreviews->setQuery(sqlQuery); + + float colorSaturation, + contrastEnhancement, + luminanceLevel; + bool manualLuminanceLevel; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoMantiuk08 = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + 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(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoMantiuk08->origxsize = origxsize; + tmoMantiuk08->xsize = PREVIEW_WIDTH; + tmoMantiuk08->pregamma = pregamma; + tmoMantiuk08->tmoperator = mantiuk08; + tmoMantiuk08->operator_options.mantiuk08options.colorsaturation = colorSaturation; + tmoMantiuk08->operator_options.mantiuk08options.contrastenhancement = contrastEnhancement; + tmoMantiuk08->operator_options.mantiuk08options.luminancelevel = luminanceLevel; + tmoMantiuk08->operator_options.mantiuk08options.setluminance = manualLuminanceLevel; + + PreviewLabel *previewLabelMantiuk08 = new PreviewLabel(0, tmoMantiuk08, index++); + m_previewLabelList.append(previewLabelMantiuk08); + previewLabelMantiuk08->setComment(comment); + connect(previewLabelMantiuk08, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelMantiuk08, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelMantiuk08, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelMantiuk08); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'pattanaik' AS operator FROM pattanaik"; + m_modelPreviews->setQuery(sqlQuery); + + float multiplier, + rod, + cone; + bool autolum, + local; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoPattanaik = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + 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(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoPattanaik->origxsize = origxsize; + tmoPattanaik->xsize = PREVIEW_WIDTH; + tmoPattanaik->pregamma = pregamma; + tmoPattanaik->tmoperator = pattanaik; + tmoPattanaik->operator_options.pattanaikoptions.autolum = autolum; + tmoPattanaik->operator_options.pattanaikoptions.local = local; + tmoPattanaik->operator_options.pattanaikoptions.cone = cone; + tmoPattanaik->operator_options.pattanaikoptions.rod = rod; + tmoPattanaik->operator_options.pattanaikoptions.multiplier = multiplier; + + PreviewLabel *previewLabelPattanaik = new PreviewLabel(0, tmoPattanaik, index++); + m_previewLabelList.append(previewLabelPattanaik); + previewLabelPattanaik->setComment(comment); + connect(previewLabelPattanaik, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelPattanaik, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelPattanaik, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelPattanaik); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'reinhard02' AS operator FROM reinhard02"; + m_modelPreviews->setQuery(sqlQuery); + + bool scales; + float key, + phi; + int irange, + lower, + upper; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoReinhard02 = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + 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(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoReinhard02->origxsize = origxsize; + tmoReinhard02->xsize = PREVIEW_WIDTH; + tmoReinhard02->pregamma = pregamma; + tmoReinhard02->tmoperator = reinhard02; + tmoReinhard02->operator_options.reinhard02options.scales = scales; + tmoReinhard02->operator_options.reinhard02options.key = key; + tmoReinhard02->operator_options.reinhard02options.phi = phi; + tmoReinhard02->operator_options.reinhard02options.range = irange; + tmoReinhard02->operator_options.reinhard02options.lower = lower; + tmoReinhard02->operator_options.reinhard02options.upper = upper; + + PreviewLabel *previewLabelReinhard02 = new PreviewLabel(0, tmoReinhard02, index++); + m_previewLabelList.append(previewLabelReinhard02); + previewLabelReinhard02->setComment(comment); + connect(previewLabelReinhard02, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelReinhard02, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelReinhard02, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelReinhard02); + m_Ui->listWidget->addItem(comment); + } + + sqlQuery = "SELECT *, 'reinhard05' AS operator FROM reinhard05"; + m_modelPreviews->setQuery(sqlQuery); + + float brightness, + chromaticAdaptation, + lightAdaptation; + + for (int selectedRow = 0; selectedRow < m_modelPreviews->rowCount(); selectedRow++) { + TonemappingOptions *tmoReinhard05 = new TonemappingOptions; + comment = m_modelPreviews->record(selectedRow).value("comment").toString(); + brightness = m_modelPreviews->record(selectedRow).value("brightness").toFloat(); + chromaticAdaptation = m_modelPreviews->record(selectedRow).value("chromaticAdaptation").toFloat(); + lightAdaptation = m_modelPreviews->record(selectedRow).value("lightAdaptation").toFloat(); + pregamma = m_modelPreviews->record(selectedRow).value("pregamma").toFloat(); + + tmoReinhard05->origxsize = origxsize; + tmoReinhard05->xsize = PREVIEW_WIDTH; + tmoReinhard05->pregamma = pregamma; + tmoReinhard05->tmoperator = reinhard05; + tmoReinhard05->operator_options.reinhard05options.brightness = brightness; + tmoReinhard05->operator_options.reinhard05options.chromaticAdaptation = chromaticAdaptation; + tmoReinhard05->operator_options.reinhard05options.lightAdaptation = lightAdaptation; + + PreviewLabel *previewLabelReinhard05 = new PreviewLabel(0, tmoReinhard05, index++); + m_previewLabelList.append(previewLabelReinhard05); + previewLabelReinhard05->setComment(comment); + connect(previewLabelReinhard05, SIGNAL(clicked(int)), m_previewSettings, SLOT(selectLabel(int))); + connect(previewLabelReinhard05, SIGNAL(clicked(int)), this, SLOT(updateListView(int))); + connect(previewLabelReinhard05, SIGNAL(clicked(TonemappingOptions *)), this, SLOT(tonemapPreview(TonemappingOptions *))); + m_previewSettings->addPreviewLabel(previewLabelReinhard05); + m_Ui->listWidget->addItem(comment); + } + m_previewSettings->updatePreviews(m_frame); +} + +void TonemappingSettings::listWidgetChanged(int row) { + m_currentIndex = row; + m_previewSettings->selectLabel(row); +} + +void TonemappingSettings::updateListView(int row) { + m_currentIndex = row; + m_Ui->listWidget->setCurrentRow(row); +} + +TonemappingOptions *TonemappingSettings::getTonemappingOptions() { + return m_previewSettings->getPreviewLabel(m_currentIndex)->getTonemappingOptions(); +} + +void TonemappingSettings::sortPreviews(int index) { + m_Ui->listWidget->clear(); + QList l; + int listSize = m_previewSettings->getSize(); + for (int i = 0; i < listSize; i++) { + l.append(m_previewSettings->getPreviewLabel(i)); + } + m_previewSettings->clear(); + switch (index) { + case 0: + std::sort(l.begin(), l.end(), compareByComment); + break; + case 1: + std::sort(l.begin(), l.end(), compareByOperator); + break; + case 2: + std::sort(l.begin(), l.end(), compareByMostUsefulOperators); + break; + } + for (int i = 0; i < listSize; i++) { + PreviewLabel *pl = l.at(i); + pl->setIndex(i); + m_previewSettings->addPreviewLabel(pl); + m_Ui->listWidget->addItem(pl->getComment()); + } + m_Ui->listWidget->setCurrentRow(0); + m_previewSettings->selectLabel(0); + m_currentIndex = 0; +} + +void TonemappingSettings::tonemapPreview(TonemappingOptions* opt) +{ + m_wantsTonemap = true; + accept(); +} + +void TonemappingSettings::on_btnTonemap_clicked() +{ + m_wantsTonemap = true; + accept(); +} diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.h luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.h --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,67 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2012 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 TONEMAPPINGSETTINGS_H +#define TONEMAPPINGSETTINGS_H + +#include +#include + +#include "PreviewSettings/PreviewSettings.h" +#include "Libpfs/frame.h" + +namespace Ui +{ + class TonemappingSettings; +} + +class TonemappingSettings: public QDialog +{ + Q_OBJECT + +public: + TonemappingSettings(QWidget *parent = 0, pfs::Frame *frame = NULL); + ~TonemappingSettings(); + TonemappingOptions * getTonemappingOptions(); + bool wantsTonemap() { return m_wantsTonemap; } + +protected: + void fillPreviews(); + pfs::Frame *m_frame; + PreviewSettings* m_previewSettings; + QSqlQueryModel* m_modelPreviews; + int m_currentIndex; + QList m_previewLabelList; + bool m_wantsTonemap; + QScopedPointer m_Ui; + +protected Q_SLOTS: + void listWidgetChanged(int row); + void updateListView(int); + void sortPreviews(int); + void tonemapPreview(TonemappingOptions *); + void on_btnTonemap_clicked(); +}; + +#endif diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.ui luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.ui --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingSettings.ui 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingSettings.ui 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,222 @@ + + + TonemappingSettings + + + + 0 + 0 + 823 + 534 + + + + Load Custom Settings + + + + + + Qt::Horizontal + + + false + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + + + + + + + + + + 4 + 0 + + + + true + + + + + 0 + 0 + 367 + 453 + + + + + + + + + + + + + Sort by + + + + + + + Comments: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + Comment + + + + + Operator + + + + + Most Useful Operators + + + + + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Tonemap + + + + + + + Load + + + + + + + Cancel + + + + + + + + + + + + + + cancelButton + clicked() + TonemappingSettings + reject() + + + 664 + 454 + + + 385 + -10 + + + + + applyButton + clicked() + TonemappingSettings + accept() + + + 606 + 455 + + + 416 + -4 + + + + + diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingWarnDialog.cpp luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingWarnDialog.cpp --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingWarnDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingWarnDialog.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2010 Elizabeth Oldham - * 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 - * ---------------------------------------------------------------------- - * - * @author Elizabeth Oldham - * @author Davide Anastasia - * Refactoring - * - */ - -#include - -#include "TonemappingWarnDialog.h" -#include "Common/LuminanceOptions.h" - -TonemappingWarningDialog::TonemappingWarningDialog(QWidget *p): - UMessageBox(p) -{ - this->setText( tr("Fattal Warning") ); - this->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?") ); - this->setStandardButtons(QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No); - this->setDefaultButton(QMessageBox::No); - this->setIcon(QMessageBox::Warning); -} - -TonemappingWarningDialog::~TonemappingWarningDialog() -{} - diff -Nru luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingWarnDialog.h luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingWarnDialog.h --- luminance-hdr-2.3.0/src/TonemappingPanel/TonemappingWarnDialog.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TonemappingPanel/TonemappingWarnDialog.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -/** - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2010 Elizabeth Oldham - * - * 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 Elizabeth Oldham - */ - -#ifndef TMOWARN_IMPL_H -#define TMOWARN_IMPL_H - -#include - -#include "UI/UMessageBox.h" -#include "Common/LuminanceOptions.h" -#include "Common/global.h" - -class TonemappingWarningDialog : public UMessageBox -{ - Q_OBJECT - -public: - TonemappingWarningDialog(QWidget *p = 0); - ~TonemappingWarningDialog(); -}; - -#endif diff -Nru luminance-hdr-2.3.0/src/TransplantExif/TransplantExifDialog.ui luminance-hdr-2.3.1/src/TransplantExif/TransplantExifDialog.ui --- luminance-hdr-2.3.0/src/TransplantExif/TransplantExifDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/TransplantExif/TransplantExifDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -16,7 +16,7 @@ - :/new/prefix1/images/luminance.png:/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png:/new/prefix1/images/luminance-hdr.png diff -Nru luminance-hdr-2.3.0/src/UI/CMakeLists.txt luminance-hdr-2.3.1/src/UI/CMakeLists.txt --- luminance-hdr-2.3.0/src/UI/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -1,18 +1,23 @@ SET(FILES_UI ${CMAKE_CURRENT_SOURCE_DIR}/GammaAndLevels.ui ${CMAKE_CURRENT_SOURCE_DIR}/ImageQualityDialog.ui +${CMAKE_CURRENT_SOURCE_DIR}/TiffModeDialog.ui ${CMAKE_CURRENT_SOURCE_DIR}/about.ui) SET(FILES_H ${CMAKE_CURRENT_SOURCE_DIR}/GammaAndLevels.h ${CMAKE_CURRENT_SOURCE_DIR}/Gang.h -${CMAKE_CURRENT_SOURCE_DIR}/ImageQualityDialog.h) +${CMAKE_CURRENT_SOURCE_DIR}/ImageQualityDialog.h +${CMAKE_CURRENT_SOURCE_DIR}/TiffModeDialog.h) SET(FILES_HXX -${CMAKE_CURRENT_SOURCE_DIR}/UMessageBox.h) +${CMAKE_CURRENT_SOURCE_DIR}/UMessageBox.h +${CMAKE_CURRENT_SOURCE_DIR}/FlowLayout.h) SET(FILES_CPP ${CMAKE_CURRENT_SOURCE_DIR}/GammaAndLevels.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Gang.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UMessageBox.cpp -${CMAKE_CURRENT_SOURCE_DIR}/ImageQualityDialog.cpp) +${CMAKE_CURRENT_SOURCE_DIR}/FlowLayout.cpp +${CMAKE_CURRENT_SOURCE_DIR}/ImageQualityDialog.cpp +${CMAKE_CURRENT_SOURCE_DIR}/TiffModeDialog.cpp) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) diff -Nru luminance-hdr-2.3.0/src/UI/FlowLayout.cpp luminance-hdr-2.3.1/src/UI/FlowLayout.cpp --- luminance-hdr-2.3.0/src/UI/FlowLayout.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/FlowLayout.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "FlowLayout.h" +//! [1] +FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int 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) +{ + setContentsMargins(margin, margin, margin, margin); +} +//! [1] + +//! [2] +FlowLayout::~FlowLayout() +{ + QLayoutItem *item; + while ((item = takeAt(0))) + delete item; +} +//! [2] + +//! [3] +void FlowLayout::addItem(QLayoutItem *item) +{ + itemList.append(item); +} +//! [3] + +//! [4] +int FlowLayout::horizontalSpacing() const +{ + if (m_hSpace >= 0) { + return m_hSpace; + } else { + return smartSpacing(QStyle::PM_LayoutHorizontalSpacing); + } +} + +int FlowLayout::verticalSpacing() const +{ + if (m_vSpace >= 0) { + return m_vSpace; + } else { + return smartSpacing(QStyle::PM_LayoutVerticalSpacing); + } +} +//! [4] + +//! [5] +int FlowLayout::count() const +{ + return itemList.size(); +} + +QLayoutItem *FlowLayout::itemAt(int index) const +{ + return itemList.value(index); +} + +QLayoutItem *FlowLayout::takeAt(int index) +{ + if (index >= 0 && index < itemList.size()) + return itemList.takeAt(index); + else + return 0; +} +//! [5] + +//! [6] +Qt::Orientations FlowLayout::expandingDirections() const +{ + return 0; +} +//! [6] + +//! [7] +bool FlowLayout::hasHeightForWidth() const +{ + return true; +} + +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) +{ + QLayout::setGeometry(rect); + doLayout(rect, false); +} + +QSize FlowLayout::sizeHint() const +{ + return minimumSize(); +} + +QSize FlowLayout::minimumSize() const +{ + QSize size; + QLayoutItem *item; + foreach (item, itemList) + size = size.expandedTo(item->minimumSize()); + + size += QSize(2*margin(), 2*margin()); + return size; +} +//! [8] + +//! [9] +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] + +//! [10] + QLayoutItem *item; + foreach (item, itemList) { + QWidget *wid = item->widget(); + int spaceX = horizontalSpacing(); + if (spaceX == -1) + 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] + int nextX = x + item->sizeHint().width() + spaceX; + if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) { + x = effectiveRect.x(); + y = y + lineHeight + spaceY; + nextX = x + item->sizeHint().width() + spaceX; + lineHeight = 0; + } + + if (!testOnly) + item->setGeometry(QRect(QPoint(x, y), item->sizeHint())); + + x = nextX; + lineHeight = qMax(lineHeight, item->sizeHint().height()); + } + return y + lineHeight - rect.y() + bottom; +} +//! [11] +//! [12] +int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const +{ + QObject *parent = this->parent(); + if (!parent) { + return -1; + } else if (parent->isWidgetType()) { + QWidget *pw = static_cast(parent); + return pw->style()->pixelMetric(pm, 0, pw); + } else { + return static_cast(parent)->spacing(); + } +} +//! [12] diff -Nru luminance-hdr-2.3.0/src/UI/FlowLayout.h luminance-hdr-2.3.1/src/UI/FlowLayout.h --- luminance-hdr-2.3.0/src/UI/FlowLayout.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/FlowLayout.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FLOWLAYOUT_H +#define FLOWLAYOUT_H + +#include +#include +#include +#include +//! [0] +class FlowLayout : public QLayout +{ +public: + FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); + FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); + ~FlowLayout(); + + void addItem(QLayoutItem *item); + int horizontalSpacing() const; + int verticalSpacing() const; + Qt::Orientations expandingDirections() const; + bool hasHeightForWidth() const; + int heightForWidth(int) const; + int count() const; + QLayoutItem *itemAt(int index) const; + QSize minimumSize() const; + void setGeometry(const QRect &rect); + QSize sizeHint() const; + QLayoutItem *takeAt(int index); + int getSize() { return itemList.size(); } + +private: + int doLayout(const QRect &rect, bool testOnly) const; + int smartSpacing(QStyle::PixelMetric pm) const; + + QList itemList; + int m_hSpace; + int m_vSpace; +}; +//! [0] + +#endif diff -Nru luminance-hdr-2.3.0/src/UI/Gang.cpp luminance-hdr-2.3.1/src/UI/Gang.cpp --- luminance-hdr-2.3.0/src/UI/Gang.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/Gang.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -231,21 +231,22 @@ //cout << "/Gang::setDefault()" << endl; } -QString Gang::flag(const QString f) const +QString Gang::flag(const QString& f) const { - if( ! changed() ) - return ""; + if ( !changed() ) return ""; + return QString(" %1 %2").arg(f).arg(value); } -QString Gang::fname(const QString f) const +QString Gang::fname(const QString& f) const { - if( ! changed() ) - return ""; + if ( !changed() ) return ""; + return QString(".%1%2").arg(f).arg(value); } -void Gang::setupUndo() { +void Gang::setupUndo() +{ bool isCbx1Checked = false; bool isCbx2Checked = false; bool isRb1Checked = false; @@ -283,7 +284,8 @@ //cout << "/Gang::setupUndo()" << endl; } -void Gang::undo() { +void Gang::undo() +{ //cout << "Gang::undo(): size: " << tmoSettingsList->size() << endl; //cout << "Gang::undo(): index: " << tmoSettingsList->index() << endl; if (tmoSettingsList->index() == tmoSettingsList->size() - 1) { diff -Nru luminance-hdr-2.3.0/src/UI/Gang.h luminance-hdr-2.3.1/src/UI/Gang.h --- luminance-hdr-2.3.0/src/UI/Gang.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/Gang.h 2013-04-07 18:41:14.000000000 +0000 @@ -41,27 +41,31 @@ { Q_OBJECT public: - 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(); - friend class TmoSettings; - float v() const { return value; }; - bool isCheckBox1Checked() const { return isCbx1Checked; }; - bool isCheckBox2Checked() const { return isCbx2Checked; }; - bool isRadioButton1Checked() const { return isRb1Checked; }; - bool isRadioButton2Checked() const { return isRb2Checked; }; + 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(); + + float v() const; + bool isCheckBox1Checked() const; + bool isCheckBox2Checked() const; + bool isRadioButton1Checked() const; + bool isRadioButton2Checked() const; float p2v(const int p) const; int v2p(const float x) const; void setDefault(); - bool changed() const { return changed_; }; - QString flag(const QString f) const; - QString fname(const QString f) const; + bool changed() const; + QString flag(const QString& f) const; + QString fname(const QString& f) const; void setupUndo(); void undo(); void redo(); void updateUndoState(); + protected slots: void sliderMoved(int p); void sliderValueChanged(int p); @@ -70,10 +74,12 @@ void checkBox2Checked(bool); void radioButton1Checked(bool); void radioButton2Checked(bool); + signals: void finished(); void enableUndo(bool); void enableRedo(bool); + private: QSlider *s; QDoubleSpinBox *dsb; @@ -103,6 +109,24 @@ TmoSettingsList *tmoSettingsList; }; +inline float Gang::v() const +{ return value; } + +inline bool Gang::isCheckBox1Checked() const +{ return isCbx1Checked; } + +inline bool Gang::isCheckBox2Checked() const +{ return isCbx2Checked; } + +inline bool Gang::isRadioButton1Checked() const +{ return isRb1Checked; } + +inline bool Gang::isRadioButton2Checked() const +{ return isRb2Checked; } + +inline bool Gang::changed() const +{ return changed_; } + // //==================================== Undo/Redo =================================================== // diff -Nru luminance-hdr-2.3.0/src/UI/ImageQualityDialog.cpp luminance-hdr-2.3.1/src/UI/ImageQualityDialog.cpp --- luminance-hdr-2.3.0/src/UI/ImageQualityDialog.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/ImageQualityDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -30,61 +30,72 @@ #include "ImageQualityDialog.h" #include "ui_ImageQualityDialog.h" -#include "Fileformat/jpegwriter.h" -#include "Fileformat/pngwriter.h" +#include +#include ImageQualityDialog::~ImageQualityDialog() {} -ImageQualityDialog::ImageQualityDialog(const QImage *img, QString fmt, QWidget *parent): - QDialog(parent), - image(img), - m_Ui(new Ui::ImgQualityDialog) +ImageQualityDialog::ImageQualityDialog(const pfs::Frame* frame, + const QString& fmt, QWidget *parent) + : QDialog(parent) + , m_frame(frame) + , m_format(fmt) + , m_ui(new Ui::ImgQualityDialog) { - m_Ui->setupUi(this); - format = fmt; - connect(m_Ui->spinBox, SIGNAL(valueChanged(int)), this, SLOT(reset(int))); - connect(m_Ui->horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(reset(int))); + m_ui->setupUi(this); + + connect(m_ui->spinBox, SIGNAL(valueChanged(int)), + this, SLOT(reset(int))); + connect(m_ui->horizontalSlider, SIGNAL(valueChanged(int)), + this, SLOT(reset(int))); +#ifdef Q_WS_MAC + this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#endif } int ImageQualityDialog::getQuality(void) { - return m_Ui->spinBox->value(); + return m_ui->spinBox->value(); } void ImageQualityDialog::on_getSizeButton_clicked() { - qDebug() << format; + pfs::Params params( "quality", (size_t)getQuality() ); + setCursor(QCursor(Qt::WaitCursor)); - int quality = m_Ui->spinBox->value(); int size = 0; - if (format.startsWith("jp")) + if (m_format.startsWith("jp")) { - JpegWriter writer(image, quality); - writer.writeQImageToJpeg(); + JpegWriter writer; + writer.write(*m_frame, params); size = writer.getFileSize(); } - else if (format.startsWith("png")) + else if (m_format.startsWith("png")) { - PngWriter writer(image, quality); - writer.writeQImageToPng(); + PngWriter writer; + writer.write(*m_frame, params); size = writer.getFileSize(); } - else - { - QByteArray ba; - QBuffer buffer(&ba); - buffer.open(QIODevice::WriteOnly); - image->save(&buffer, (const char *) format.toLatin1(), quality); - size = ba.size(); - } + else { return; } +// 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 ); - //label_filesize->setText(QString::number( ba.size() )); //the JPG on disk differs by 374 more bytes - m_Ui->label_filesize->setText( s ); //the JPG on disk differs by 374 more bytes + QString s = def.toString(size); + // the JPG on disk differs by 374 more bytes + // label_filesize->setText(QString::number( ba.size() )); + // the JPG on disk differs by 374 more bytes + m_ui->label_filesize->setText(s); setCursor(QCursor(Qt::ArrowCursor)); } void ImageQualityDialog::reset(int) { - m_Ui->label_filesize->setText(tr("Unknown")); + m_ui->label_filesize->setText(tr("Unknown")); } diff -Nru luminance-hdr-2.3.0/src/UI/ImageQualityDialog.h luminance-hdr-2.3.1/src/UI/ImageQualityDialog.h --- luminance-hdr-2.3.0/src/UI/ImageQualityDialog.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/ImageQualityDialog.h 2013-04-07 18:41:14.000000000 +0000 @@ -21,13 +21,17 @@ * @author Franco Comida */ -#ifndef IMAGEQUALITYDIALOG_IMPL_H -#define IMAGEQUALITYDIALOG_IMPL_H +#ifndef IMAGEQUALITYDIALOG_H +#define IMAGEQUALITYDIALOG_H #include namespace Ui { - class ImgQualityDialog; +class ImgQualityDialog; +} + +namespace pfs { +class Frame; } class ImageQualityDialog : public QDialog //, private Ui::ImgQualityDialog @@ -35,17 +39,20 @@ Q_OBJECT public: - ImageQualityDialog(const QImage *img, QString fmt, QWidget *parent = 0); + ImageQualityDialog(const pfs::Frame* frame, const QString& fmt, QWidget *parent = 0); ~ImageQualityDialog(); + int getQuality(void); + protected slots: void on_getSizeButton_clicked(); void reset(int); protected: - const QImage *image; - QString format; + const pfs::Frame* m_frame; + QString m_format; - QScopedPointer m_Ui; + QScopedPointer m_ui; }; -#endif + +#endif // IMAGEQUALITYDIALOG_H diff -Nru luminance-hdr-2.3.0/src/UI/ImageQualityDialog.ui luminance-hdr-2.3.1/src/UI/ImageQualityDialog.ui --- luminance-hdr-2.3.0/src/UI/ImageQualityDialog.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/ImageQualityDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -6,26 +6,20 @@ 0 0 - 380 - 200 + 424 + 161 - + 0 0 - - - 380 - 200 - - - 380 - 200 + 16777215 + 165 @@ -34,165 +28,154 @@ true - - - + + + 4 + + + + + Saved File Quality + + + + + + + 60 + 0 + + + + + 60 + 16777215 + + + + File size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 60 + 0 + + + + + 60 + 16777215 + + + + Quality + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Unknown + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 100 + + + 100 + + + + + + + Ca&lculate + + + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + 100 + + + 25 + + + 100 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + + + + + + + + + + Qt::Horizontal + + + + 48 + 26 + + + + - - - Saved File Quality + + + &Cancel - - - - - - - Qt::Vertical - - - - 335 - 13 - - - - - - - - - - Quality: - - - - - - - 100 - - - 100 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - - - - - 100 - - - 100 - - - - - - - - - Qt::Vertical - - - - 330 - 13 - - - - - - - - - - - - File size: - - - - - - - Unknown - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Ca&lculate - - - - - - - - - - - Qt::Horizontal - - - - 48 - 26 - - - - - - - - &Save - - - - - - - &Cancel - - - - + + + &Save + + - - horizontalSlider - spinBox - getSizeButton - saveButton - cancelButton - diff -Nru luminance-hdr-2.3.0/src/UI/TiffModeDialog.cpp luminance-hdr-2.3.1/src/UI/TiffModeDialog.cpp --- luminance-hdr-2.3.0/src/UI/TiffModeDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/TiffModeDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,37 @@ +#include "TiffModeDialog.h" +#include "ui_TiffModeDialog.h" + +TiffModeDialog::TiffModeDialog(bool hdrMode, QWidget *parent) + : QDialog(parent) + , m_hdrMode(hdrMode) + , m_ui(new Ui::TiffModeDialog) +{ + 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"); + } 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"); + } + +#ifdef Q_WS_MAC + this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window +#endif +} + +TiffModeDialog::~TiffModeDialog() +{ + delete m_ui; +} + +int TiffModeDialog::getTiffWriterMode() +{ + if ( m_hdrMode ) { + return m_ui->comboBox->currentIndex() + 2; + } else { + return m_ui->comboBox->currentIndex(); + } +} diff -Nru luminance-hdr-2.3.0/src/UI/TiffModeDialog.h luminance-hdr-2.3.1/src/UI/TiffModeDialog.h --- luminance-hdr-2.3.0/src/UI/TiffModeDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/TiffModeDialog.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,25 @@ +#ifndef TIFFMODEDIALOG_H +#define TIFFMODEDIALOG_H + +#include + +namespace Ui { +class TiffModeDialog; +} + +class TiffModeDialog : public QDialog +{ + Q_OBJECT + +public: + explicit TiffModeDialog(bool hdrMode = false, QWidget *parent = 0); + ~TiffModeDialog(); + + int getTiffWriterMode(); + +private: + bool m_hdrMode; + Ui::TiffModeDialog *m_ui; +}; + +#endif // TIFFMODEDIALOG_H diff -Nru luminance-hdr-2.3.0/src/UI/TiffModeDialog.ui luminance-hdr-2.3.1/src/UI/TiffModeDialog.ui --- luminance-hdr-2.3.0/src/UI/TiffModeDialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/TiffModeDialog.ui 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,67 @@ + + + TiffModeDialog + + + + 0 + 0 + 400 + 84 + + + + Save as ...TIFF + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + TiffModeDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + TiffModeDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru luminance-hdr-2.3.0/src/UI/UMessageBox.cpp luminance-hdr-2.3.1/src/UI/UMessageBox.cpp --- luminance-hdr-2.3.0/src/UI/UMessageBox.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/UMessageBox.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -43,7 +43,7 @@ QGridLayout* layout = reinterpret_cast(this->layout()); layout->addItem(m_horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); - this->setWindowTitle("Luminance HDR "LUMINANCEVERSION); + this->setWindowTitle("Luminance HDR " LUMINANCEVERSION); #ifdef Q_WS_MAC this->setWindowModality(Qt::WindowModal); // In OS X, the QMessageBox is modal to the window #endif @@ -101,9 +101,6 @@ foreach (QString path,paths) { QString fname(path+QString("/LICENSE")); -#ifdef WIN32 - fname+=".txt"; -#endif if (QFile::exists(fname)) { QFile file(fname); @@ -126,7 +123,7 @@ about->show(); } -int UMessageBox::warning(QString title, QString description, QWidget* parent) +int UMessageBox::warning(const QString &title, const QString &description, QWidget* parent) { UMessageBox WarningMsgBox(parent); WarningMsgBox.setText(title); @@ -138,7 +135,19 @@ return WarningMsgBox.exec(); } -int UMessageBox::saveDialog(QString title, QString description, QWidget* parent) +int UMessageBox::question(const QString &title, const QString &description, QWidget* parent) +{ + UMessageBox questionMsgBox(parent); + questionMsgBox.setText(title); + questionMsgBox.setInformativeText(description); + questionMsgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + questionMsgBox.setDefaultButton(QMessageBox::No); + questionMsgBox.setIcon(QMessageBox::Question); + + return questionMsgBox.exec(); +} + +int UMessageBox::saveDialog(const QString &title, const QString &description, QWidget* parent) { UMessageBox WarningMsgBox(parent); WarningMsgBox.setText(title); diff -Nru luminance-hdr-2.3.0/src/UI/UMessageBox.h luminance-hdr-2.3.1/src/UI/UMessageBox.h --- luminance-hdr-2.3.0/src/UI/UMessageBox.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/UMessageBox.h 2013-04-07 18:41:14.000000000 +0000 @@ -54,9 +54,10 @@ static void about(QWidget* parent = 0); - static int warning(QString title, 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(QString title, QString description, QWidget* parent = 0); + static int saveDialog(const QString& title, const QString& description, QWidget* parent = 0); /* * Function not yet used, it will... :) diff -Nru luminance-hdr-2.3.0/src/UI/about.ui luminance-hdr-2.3.1/src/UI/about.ui --- luminance-hdr-2.3.0/src/UI/about.ui 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/UI/about.ui 2013-04-07 18:41:14.000000000 +0000 @@ -42,7 +42,7 @@ - :/new/prefix1/images/luminance.png + :/new/prefix1/images/luminance-hdr.png true @@ -247,6 +247,22 @@ + + + Changelog + + + + + + + http://qtpfsgui.sourceforge.net/updater/Changelog + + + + + + &License Agreement @@ -343,7 +359,16 @@ - + + + QWebView + QWidget +
    QtWebKit/QWebView
    +
    +
    + + + pushButton diff -Nru luminance-hdr-2.3.0/src/Viewers/GenericViewer.cpp luminance-hdr-2.3.1/src/Viewers/GenericViewer.cpp --- luminance-hdr-2.3.0/src/Viewers/GenericViewer.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/GenericViewer.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -29,6 +29,8 @@ #include #include +#include +#include //#include #include "Viewers/GenericViewer.h" @@ -435,5 +437,5 @@ drag->setMimeData(mimeData); drag->setPixmap(mPixmap->pixmap().scaledToHeight(mPixmap->pixmap().height()/10)); - Qt::DropAction dropAction = drag->exec(); + /*Qt::DropAction dropAction =*/ drag->exec(); } diff -Nru luminance-hdr-2.3.0/src/Viewers/GenericViewer.h luminance-hdr-2.3.1/src/Viewers/GenericViewer.h --- luminance-hdr-2.3.0/src/Viewers/GenericViewer.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/GenericViewer.h 2013-04-07 18:41:14.000000000 +0000 @@ -32,11 +32,11 @@ #include #include -#include "Common/FloatRgbToQRgb.h" +#include // Forward declaration namespace pfs { - class Frame; // #include "Libpfs/frame.h" +class Frame; // #include "Libpfs/frame.h" } class PanIconWidget; // #include "Common/PanIconWidget.h" @@ -131,7 +131,7 @@ virtual float getMinLuminanceValue() = 0; //! \brief returns the mapping method - virtual LumMappingMethod getLuminanceMappingMethod() + virtual RGBMappingType getLuminanceMappingMethod() { return MAP_LINEAR; } diff -Nru luminance-hdr-2.3.0/src/Viewers/HdrViewer.cpp luminance-hdr-2.3.1/src/Viewers/HdrViewer.cpp --- luminance-hdr-2.3.0/src/Viewers/HdrViewer.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/HdrViewer.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -31,18 +31,21 @@ #include #include -#include +#include #include "arch/math.h" #include "Common/global.h" -#include "Common/msec_timer.h" + + #include "Viewers/IGraphicsPixmapItem.h" +#include "Viewers/LuminanceRangeWidget.h" + #include "Libpfs/array2d.h" #include "Libpfs/channel.h" #include "Libpfs/frame.h" -#include "Libpfs/domio.h" -#include "Viewers/LuminanceRangeWidget.h" -#include "Libpfs/vex.h" +#include "Libpfs/vex/sse.h" +#include "Libpfs/utils/msec_timer.h" +#include "Libpfs/colorspace/rgbremapper.h" namespace // anonymous namespace { @@ -50,11 +53,9 @@ // 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::Array2D* getPrimaryChannel(pfs::Frame* frame) +const pfs::Array2Df* getPrimaryChannel(const pfs::Frame& frame) { - assert( frame != NULL ); - - return frame->getChannel("Y")->getChannelData(); + return frame.getChannel("Y"); } } // end anonymous namespace @@ -62,23 +63,23 @@ HdrViewer::HdrViewer(pfs::Frame* frame, QWidget *parent, bool ns, unsigned int neg, unsigned int naninf) : GenericViewer(frame, parent, ns) - , m_MappingMethod(MAP_GAMMA2_2) - , m_MinValue(0.f) - , m_MaxValue(1.f) - , m_NanInfColor(naninf) - , m_NegColor(neg) + , m_mappingMethod(MAP_GAMMA2_2) + , m_minValue(0.f) + , m_maxValue(1.f) + , m_nanInfColor(naninf) + , m_negColor(neg) { - init_ui(); + initUi(); // 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->setHistogramImage(getPrimaryChannel(*getFrame())); m_lumRange->fitToDynamicRange(); - m_MappingMethod = static_cast( 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() ); mPixmap->setPixmap(QPixmap::fromImage(mapFrameToImage(getFrame()))); @@ -86,19 +87,19 @@ m_lumRange->blockSignals(false); } -void HdrViewer::init_ui() +void HdrViewer::initUi() { - mappingMethodLabel = new QLabel( mToolBar ); - mappingMethodLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); - mappingMethodCB = new QComboBox( mToolBar ); - mToolBar->addWidget(mappingMethodLabel); - mToolBar->addWidget(mappingMethodCB); + 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(); - mappingMethodLabel->setBuddy( mappingMethodCB ); + m_mappingMethodLabel->setBuddy( m_mappingMethodCB ); - histlabel = new QLabel( mToolBar ); + m_histLabel = new QLabel( mToolBar ); m_lumRange = new LuminanceRangeWidget( mToolBar ); - mToolBar->addWidget(histlabel); + mToolBar->addWidget(m_histLabel); mToolBar->addWidget(m_lumRange); mToolBar->addSeparator(); connect( m_lumRange, SIGNAL( updateRangeWindow() ), this, SLOT( updateRangeWindow() ) ); @@ -109,12 +110,12 @@ void HdrViewer::retranslateUi() { - mappingMethodLabel->setText(tr("&Mapping:")); - histlabel->setText(tr("Histogram:")); + m_mappingMethodLabel->setText(tr("&Mapping:")); + m_histLabel->setText(tr("Histogram:")); - int oldMappingMethodIndex = mappingMethodCB->currentIndex(); + int oldMappingMethodIndex = m_mappingMethodCB->currentIndex(); - disconnect( mappingMethodCB, SIGNAL( activated( int ) ), this, SLOT( setLumMappingMethod(int) ) ); + disconnect( m_mappingMethodCB, SIGNAL( activated( int ) ), this, SLOT( setLumMappingMethod(int) ) ); QStringList methods; methods << tr("Linear") << tr("Gamma 1.4") @@ -123,10 +124,10 @@ << tr("Gamma 2.6") << tr("Logarithmic"); - mappingMethodCB->clear(); - mappingMethodCB->addItems(methods); - mappingMethodCB->setCurrentIndex( oldMappingMethodIndex >= 0 ? oldMappingMethodIndex : 3 ); - connect( mappingMethodCB, SIGNAL( activated( int ) ), this, SLOT( setLumMappingMethod(int) ) ); + m_mappingMethodCB->clear(); + m_mappingMethodCB->addItems(methods); + m_mappingMethodCB->setCurrentIndex( oldMappingMethodIndex >= 0 ? oldMappingMethodIndex : 3 ); + connect( m_mappingMethodCB, SIGNAL( activated( int ) ), this, SLOT( setLumMappingMethod(int) ) ); GenericViewer::retranslateUi(); } @@ -155,7 +156,7 @@ refreshPixmap(); // I need to set the histogram again during the setFrame function - m_lumRange->setHistogramImage(getPrimaryChannel(getFrame())); + m_lumRange->setHistogramImage(getPrimaryChannel(*getFrame())); m_lumRange->fitToDynamicRange(); m_lumRange->blockSignals(false); } @@ -173,29 +174,29 @@ void HdrViewer::setRangeWindow( float min, float max ) { - m_MinValue = min; - m_MaxValue = max; + m_minValue = min; + m_maxValue = max; refreshPixmap(); } int HdrViewer::getLumMappingMethod() { - return mappingMethodCB->currentIndex(); + return m_mappingMethodCB->currentIndex(); } void HdrViewer::setLumMappingMethod( int method ) { - mappingMethodCB->setCurrentIndex( method ); - m_MappingMethod = static_cast(method); + m_mappingMethodCB->setCurrentIndex( method ); + m_mappingMethod = static_cast(method); refreshPixmap(); } void HdrViewer::update_colors(int neg, int naninf) { - m_NanInfColor = naninf; - m_NegColor = neg; + m_nanInfColor = naninf; + m_negColor = neg; refreshPixmap(); } @@ -217,18 +218,18 @@ //! \brief returns max value of the handled frame float HdrViewer::getMaxLuminanceValue() { - return m_MaxValue; + return m_maxValue; } //! \brief returns min value of the handled frame float HdrViewer::getMinLuminanceValue() { - return m_MinValue; + return m_minValue; } -LumMappingMethod HdrViewer::getLuminanceMappingMethod() +RGBMappingType HdrViewer::getLuminanceMappingMethod() { - return m_MappingMethod; + return m_mappingMethod; } QImage HdrViewer::mapFrameToImage(pfs::Frame* in_frame) @@ -243,31 +244,32 @@ in_frame->getXYZChannels( ChR, ChG, ChB ); assert( ChR != NULL && ChG != NULL && ChB != NULL); - const float* R = ChR->getChannelData()->getRawData(); - const float* G = ChG->getChannelData()->getRawData(); - const float* B = ChB->getChannelData()->getRawData(); + const float* R = ChR->data(); + const float* G = ChG->data(); + const float* B = ChB->data(); assert( R != NULL && G != NULL && B != NULL ); QImage return_qimage(in_frame->getWidth(), in_frame->getHeight(), QImage::Format_RGB32); QRgb *pixels = reinterpret_cast(return_qimage.bits()); - FloatRgbToQRgb converter(m_MinValue, m_MaxValue, m_MappingMethod); + RGBRemapper rgbRemapper(m_minValue, m_maxValue, m_mappingMethod); + int indexEnd = in_frame->getWidth()*in_frame->getHeight(); #pragma omp parallel for - for ( int index = 0; index < in_frame->getWidth()*in_frame->getHeight(); ++index ) + for ( int index = 0; index < indexEnd; ++index ) { if ( !finite( R[index] ) || !finite( G[index] ) || !finite( B[index] ) ) // x is NaN or Inf { - pixels[index] = m_NanInfColor; + pixels[index] = m_nanInfColor; } else if ( R[index] < 0 || G[index]<0 || B[index]<0 ) // x is negative { - pixels[index] = m_NegColor; + pixels[index] = m_negColor; } else { - converter.toQRgb(R[index], G[index], B[index], pixels[index]); + rgbRemapper.toQRgb(R[index], G[index], B[index], pixels[index]); } } diff -Nru luminance-hdr-2.3.0/src/Viewers/HdrViewer.h luminance-hdr-2.3.1/src/Viewers/HdrViewer.h --- luminance-hdr-2.3.0/src/Viewers/HdrViewer.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/HdrViewer.h 2013-04-07 18:41:14.000000000 +0000 @@ -31,33 +31,30 @@ #ifndef IMAGEHDRVIEWER_H #define IMAGEHDRVIEWER_H +#include #include #include #include #include #include "GenericViewer.h" -#include "Common/FloatRgbToQRgb.h" - -#include // Forward declaration -namespace pfs { - class Array2D; - class Frame; +namespace pfs +{ +class Frame; } -class LuminanceRangeWidget; // #include "LuminanceRangeWidget.h" -// class HdrViewerMapping; +class LuminanceRangeWidget; class HdrViewer : public GenericViewer { Q_OBJECT -private: - void init_ui(); public: - HdrViewer(pfs::Frame* frame, QWidget *parent = 0, bool ns = false, unsigned int negcol = 0, unsigned int naninfcol = 0); + HdrViewer(pfs::Frame* frame, QWidget* parent = 0, + bool ns = false, + unsigned int negcol = 0, unsigned int naninfcol = 0); virtual ~HdrViewer(); LuminanceRangeWidget* lumRange(); @@ -76,7 +73,7 @@ //! \brief returns min value of the handled frame float getMinLuminanceValue(); - LumMappingMethod getLuminanceMappingMethod(); + RGBMappingType getLuminanceMappingMethod(); public Q_SLOTS: void updateRangeWindow(); @@ -92,22 +89,23 @@ void setRangeWindow(float min, float max); // UI - LuminanceRangeWidget *m_lumRange; - QComboBox *mappingMethodCB; - QLabel *mappingMethodLabel; - QLabel *histlabel; + LuminanceRangeWidget* m_lumRange; + QComboBox* m_mappingMethodCB; + QLabel* m_mappingMethodLabel; + QLabel* m_histLabel; private: + void initUi(); void refreshPixmap(); - LumMappingMethod m_MappingMethod; - float m_MinValue; - float m_MaxValue; + RGBMappingType m_mappingMethod; + float m_minValue; + float m_maxValue; //! \brief NaN or Inf color - int m_NanInfColor; + int m_nanInfColor; //! \brief Neg color - int m_NegColor; + int m_negColor; QImage mapFrameToImage(pfs::Frame* in_frame); }; diff -Nru luminance-hdr-2.3.0/src/Viewers/Histogram.cpp luminance-hdr-2.3.1/src/Viewers/Histogram.cpp --- luminance-hdr-2.3.0/src/Viewers/Histogram.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/Histogram.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -25,31 +25,32 @@ * $Id: histogram.cpp,v 1.2 2005/09/02 13:10:35 rafm Exp $ */ +#include "Histogram.h" + #include #include -#include "Histogram.h" +#include -Histogram::Histogram( int bins, int accuracy ): - bins( bins ), accuracy( accuracy ) -{ - P = new float[bins]; -} +Histogram::Histogram( int bins, int accuracy ) + : bins( bins ) + , accuracy( accuracy ) + , P( new float[bins] ) +{} Histogram::~Histogram() { - delete[] P; + delete[] P; } - -void Histogram::computeLog( const pfs::Array2D *image ) +void Histogram::computeLog( const pfs::Array2Df *image ) { const int size = image->getRows()*image->getCols(); float max, min; // Find min, max { - min = 999999999; - max = -999999999; + min = 999999999.0f; + max = -999999999.0f; for( int i = 0; i < size; i += accuracy ) { float v = (*image)(i); @@ -61,7 +62,7 @@ } -void Histogram::computeLog( const pfs::Array2D *image, float min, float max ) +void Histogram::computeLog( const pfs::Array2Df *image, float min, float max ) { const int size = image->getRows()*image->getCols(); diff -Nru luminance-hdr-2.3.0/src/Viewers/Histogram.h luminance-hdr-2.3.1/src/Viewers/Histogram.h --- luminance-hdr-2.3.0/src/Viewers/Histogram.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/Histogram.h 2013-04-07 18:41:14.000000000 +0000 @@ -28,20 +28,21 @@ */ #include -#include "Libpfs/array2d.h" +#include "Libpfs/array2d_fwd.h" class Histogram { - float *P; int bins; int accuracy; + float *P; + public: Histogram( int bins, int accuracy = 1 ); ~Histogram(); - void computeLog( const pfs::Array2D *image ); - void computeLog( const pfs::Array2D *image, float min, float max ); + void computeLog( const pfs::Array2Df *image ); + void computeLog( const pfs::Array2Df *image, float min, float max ); int getBins() const { diff -Nru luminance-hdr-2.3.0/src/Viewers/ISelectionAnchor.cpp luminance-hdr-2.3.1/src/Viewers/ISelectionAnchor.cpp --- luminance-hdr-2.3.0/src/Viewers/ISelectionAnchor.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/ISelectionAnchor.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -1,137 +1,137 @@ -/** - * This file is a part of Luminance HDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2011 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 - * ---------------------------------------------------------------------- - * - * @author Davide Anastasia - * - */ - -#include -#include - -#include "Viewers/ISelectionAnchor.h" - -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); -} - -// 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) -//{ -// event->setAccepted(false); -//} - -//void ISelectionAnchor::mousePressEvent(QGraphicsSceneDragDropEvent *event) -//{ -// event->setAccepted(false); -//} - -void ISelectionAnchor::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) -{ - mMouseState = MOUSE_BUTTON_RELEASED; - event->setAccepted(false); -} - -void ISelectionAnchor::mousePressEvent(QGraphicsSceneMouseEvent* event) -{ - mMouseState = MOUSE_BUTTON_PRESSED; - event->setAccepted(false); -} - -void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneMouseEvent* event) -{ - mMouseState = MOUSE_MOVING; - event->setAccepted(false); -} - -// change the color on hover events to indicate to the use the object has -// been captured by the mouse - -void ISelectionAnchor::hoverLeaveEvent(QGraphicsSceneHoverEvent*) -{ - unsetCursor(); - mAnchorColor = Qt::black; - this->update(); -} - -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; -// } - - mAnchorColor = Qt::red; - this->update(); -} - -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(); - - // 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(); - - 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() ); -} +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * Copyright (C) 2011 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 + * ---------------------------------------------------------------------- + * + * @author Davide Anastasia + * + */ + +#include +#include + +#include "Viewers/ISelectionAnchor.h" + +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); +} + +// 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) +//{ +// event->setAccepted(false); +//} + +//void ISelectionAnchor::mousePressEvent(QGraphicsSceneDragDropEvent *event) +//{ +// event->setAccepted(false); +//} + +void ISelectionAnchor::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + mMouseState = MOUSE_BUTTON_RELEASED; + event->setAccepted(false); +} + +void ISelectionAnchor::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + mMouseState = MOUSE_BUTTON_PRESSED; + event->setAccepted(false); +} + +void ISelectionAnchor::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + mMouseState = MOUSE_MOVING; + event->setAccepted(false); +} + +// change the color on hover events to indicate to the use the object has +// been captured by the mouse + +void ISelectionAnchor::hoverLeaveEvent(QGraphicsSceneHoverEvent*) +{ + unsetCursor(); + mAnchorColor = Qt::black; + this->update(); +} + +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; +// } + + mAnchorColor = Qt::red; + this->update(); +} + +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(); + + // 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(); + + 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() ); +} diff -Nru luminance-hdr-2.3.0/src/Viewers/LdrViewer.cpp luminance-hdr-2.3.1/src/Viewers/LdrViewer.cpp --- luminance-hdr-2.3.0/src/Viewers/LdrViewer.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/LdrViewer.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -35,14 +35,17 @@ #include "Viewers/LdrViewer.h" #include "Viewers/IGraphicsPixmapItem.h" #include "Core/TonemappingOptions.h" -#include "Libpfs/frame.h" #include "Fileformat/pfsoutldrimage.h" #include "Common/LuminanceOptions.h" -#include "Common/ResourceHandlerLcms.h" + +#include +#include + +using namespace pfs; namespace { -void parseOptions(const TonemappingOptions *opts, QString& caption) +void parseOptions(TonemappingOptions *opts, QString& caption) { if (opts == NULL) { @@ -51,13 +54,13 @@ else { TMOptionsOperations tmopts(opts); - //postfix = tmopts.getPostfix(); - caption = tmopts.getCaption(); + //postfix = opts->getPostfix(); + caption = opts->getCaption(); //exif_comment = tmopts.getExifComment(); } } -QImage* doCMSTransform(QImage* input_qimage, bool doProof, bool doGamutCheck) +bool doCMSTransform(QImage& qImage, bool doProof, bool doGamutCheck) { LuminanceOptions luminance_opts; QString monitor_fname = luminance_opts.getMonitorProfileFileName(); @@ -65,21 +68,20 @@ QString printer_fname = luminance_opts.getPrinterProfileFileName(); qDebug() << "Printer profile: " << printer_fname; - // CHECK MONITOR PROFILE NAME - // TODO: Check inside LuminanceOptions whether the file is on the filesystem - // or it has been removed! - if ( monitor_fname.isEmpty() ) return NULL; - - qDebug() << "Transform to Monitor Profile"; - QByteArray iccProfileMonitor( QFile::encodeName( monitor_fname ) ); - - QScopedPointer out_qimage( new QImage(input_qimage->width(), input_qimage->height(), QImage::Format_RGB32) ); + // Check Monitor Profile + if ( monitor_fname.isEmpty() ) + { + return false; + } - ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); - ScopedCmsProfile hOut( cmsOpenProfileFromFile(iccProfileMonitor.constData(), "r") ); + utils::ScopedCmsProfile hsRGB( cmsCreate_sRGBProfile() ); + utils::ScopedCmsProfile hOut( + cmsOpenProfileFromFile( + QFile::encodeName( monitor_fname ).constData(), "r") + ); - ScopedCmsProfile hProof; - ScopedCmsTransform xform; + utils::ScopedCmsProfile hProof; + utils::ScopedCmsTransform xform; // Check whether the output profile is open if ( !hOut ) @@ -89,14 +91,16 @@ QObject::tr("I cannot open monitor profile. Please select a different one."), QMessageBox::Ok, QMessageBox::NoButton); - return NULL; + return false; } // if (doProof && !printer_fname.isEmpty()) { - QByteArray iccProfilePrinter( QFile::encodeName( printer_fname ) ); - hProof.reset( cmsOpenProfileFromFile(iccProfilePrinter.constData(), "r") ); + hProof.reset( + cmsOpenProfileFromFile( + QFile::encodeName( printer_fname ).constData(), "r") + ); if ( !hProof ) { QMessageBox::warning(0, @@ -139,23 +143,21 @@ QObject::tr("I cannot perform the color transform. Please select a different monitor profile."), QMessageBox::Ok, QMessageBox::NoButton); - return NULL; + return false; } - cmsDoTransform(xform.data(), - input_qimage->bits(), - out_qimage->bits(), - (input_qimage->width() * input_qimage->height()) ); + cmsDoTransform( xform.data(), qImage.bits(), qImage.bits(), + qImage.width()*qImage.height() ); - return out_qimage.take(); + return true; } } - -LdrViewer::LdrViewer(pfs::Frame* frame, TonemappingOptions* opts, QWidget *parent, bool ns): - GenericViewer(frame, parent, ns), - informativeLabel(new QLabel( mToolBar)), - mTonemappingOptions(opts) +// This constructor is a bit of a mess! +LdrViewer::LdrViewer(pfs::Frame* frame, TonemappingOptions* opts, QWidget *parent, bool ns) + : GenericViewer(frame, parent, ns) + , informativeLabel(new QLabel(mToolBar)) + , mTonemappingOptions(opts) { mToolBar->addWidget(informativeLabel); @@ -167,16 +169,8 @@ LdrViewer::setTonemappingOptions(opts); QScopedPointer temp_qimage( fromLDRPFStoQImage(getFrame()) ); - QScopedPointer xformed_qimage( doCMSTransform(temp_qimage.data(), false, false) ); - - if (xformed_qimage == NULL) - { - setQImage(*temp_qimage); - } - else - { - setQImage(*xformed_qimage); - } + doCMSTransform(*temp_qimage, false, false); + setQImage(*temp_qimage); updateView(); retranslateUi(); @@ -198,12 +192,7 @@ QString LdrViewer::getFileNamePostFix() { - if ( mTonemappingOptions ) - { - TMOptionsOperations tm_ops(mTonemappingOptions); - return tm_ops.getPostfix(); - } else - return QString(); + return mTonemappingOptions ? mTonemappingOptions->getPostfix() : QString(); } QString LdrViewer::getExifComment() @@ -212,8 +201,11 @@ { TMOptionsOperations tm_ops(mTonemappingOptions); return tm_ops.getExifComment(); - } else + } + else + { return QString(); + } } void LdrViewer::updatePixmap() @@ -223,16 +215,9 @@ #endif QScopedPointer temp_qimage( fromLDRPFStoQImage(getFrame()) ); - QScopedPointer xformed_qimage( doCMSTransform(temp_qimage.data(), false, false) ); - if ( !xformed_qimage ) - { - mPixmap->setPixmap(QPixmap::fromImage(*temp_qimage)); - } - else - { - mPixmap->setPixmap(QPixmap::fromImage(*xformed_qimage)); - } + doCMSTransform(*temp_qimage, false, false); + mPixmap->setPixmap(QPixmap::fromImage(*temp_qimage)); informativeLabel->setText( tr("LDR image [%1 x %2]").arg(getWidth()).arg(getHeight()) ); } @@ -266,19 +251,17 @@ void LdrViewer::doSoftProofing(bool doGamutCheck) { QScopedPointer src_image( fromLDRPFStoQImage(getFrame()) ); - QScopedPointer image( doCMSTransform(src_image.data(), true, doGamutCheck) ); - if (image.data() != NULL) + if ( doCMSTransform(*src_image, true, doGamutCheck) ) { - mPixmap->setPixmap(QPixmap::fromImage(*image)); + mPixmap->setPixmap(QPixmap::fromImage(*src_image)); } } void LdrViewer::undoSoftProofing() { QScopedPointer src_image( fromLDRPFStoQImage(getFrame()) ); - QScopedPointer image( doCMSTransform(src_image.data(), false, false) ); - if (image.data() != NULL) + if ( doCMSTransform(*src_image, false, false) ) { - mPixmap->setPixmap(QPixmap::fromImage(*image)); + mPixmap->setPixmap(QPixmap::fromImage(*src_image)); } } diff -Nru luminance-hdr-2.3.0/src/Viewers/LuminanceRangeWidget.cpp luminance-hdr-2.3.1/src/Viewers/LuminanceRangeWidget.cpp --- luminance-hdr-2.3.0/src/Viewers/LuminanceRangeWidget.cpp 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/LuminanceRangeWidget.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -27,6 +27,7 @@ * $Id: luminancerange_widget.cpp,v 1.2 2005/09/02 13:10:35 rafm Exp $ */ +#include "LuminanceRangeWidget.h" #include #include @@ -35,9 +36,10 @@ #include #include #include -#include +#include + +#include -#include "LuminanceRangeWidget.h" #include "Histogram.h" static const float exposureStep = 0.25f; @@ -265,7 +267,7 @@ emit updateRangeWindow(); } -void LuminanceRangeWidget::setHistogramImage( const pfs::Array2D *image ) +void LuminanceRangeWidget::setHistogramImage( const pfs::Array2Df *image ) { histogramImage = image; delete histogram; diff -Nru luminance-hdr-2.3.0/src/Viewers/LuminanceRangeWidget.h luminance-hdr-2.3.1/src/Viewers/LuminanceRangeWidget.h --- luminance-hdr-2.3.0/src/Viewers/LuminanceRangeWidget.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/Viewers/LuminanceRangeWidget.h 2013-04-07 18:41:14.000000000 +0000 @@ -29,7 +29,7 @@ #include #include "Viewers/Histogram.h" -#include "Libpfs/array2d.h" +#include "Libpfs/array2d_fwd.h" class LuminanceRangeWidget : public QFrame { Q_OBJECT @@ -80,7 +80,7 @@ float valuePointer; Histogram *histogram; - const pfs::Array2D *histogramImage; + const pfs::Array2Df *histogramImage; QRect getPaintRect() const; @@ -96,7 +96,7 @@ void setRangeWindowMinMax( float min, float max ); - void setHistogramImage( const pfs::Array2D *image ); + void setHistogramImage( const pfs::Array2Df *image ); void showValuePointer( float value ); void hideValuePointer(); diff -Nru luminance-hdr-2.3.0/src/arch/CMakeLists.txt luminance-hdr-2.3.1/src/arch/CMakeLists.txt --- luminance-hdr-2.3.0/src/arch/CMakeLists.txt 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/arch/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -3,7 +3,6 @@ #${CMAKE_CURRENT_SOURCE_DIR}/math.h #${CMAKE_CURRENT_SOURCE_DIR}/msvc/math.h #${CMAKE_CURRENT_SOURCE_DIR}/freebsd/math.h -#${CMAKE_CURRENT_SOURCE_DIR}/minmax.h #${CMAKE_CURRENT_SOURCE_DIR}/string.h) #IF(MSVC) diff -Nru luminance-hdr-2.3.0/src/arch/malloc.h luminance-hdr-2.3.1/src/arch/malloc.h --- luminance-hdr-2.3.0/src/arch/malloc.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/arch/malloc.h 2013-04-07 18:41:14.000000000 +0000 @@ -23,13 +23,13 @@ */ #if defined(_MSC_VER) - #include +#include #else #if defined(__i386__) || defined(__x86_64__) - #include +#include #else - #define _mm_malloc(a,b) malloc(a) - #define _mm_free(a) free(a) - #include +#include +#define _mm_malloc(a,b) malloc(a) +#define _mm_free(a) free(a) #endif #endif diff -Nru luminance-hdr-2.3.0/src/arch/math.h luminance-hdr-2.3.1/src/arch/math.h --- luminance-hdr-2.3.0/src/arch/math.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/arch/math.h 2013-04-07 18:41:14.000000000 +0000 @@ -1,7 +1,8 @@ -/** - * This file is a part of LuminanceHDR package. +/* + * This file is a part of Luminance HDR package. * ---------------------------------------------------------------------- * Copyright (C) 2006,2007,2008 Giuseppe Rota + * Copyright (C) 2010-2012 Daniel Kaneider, 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 @@ -17,16 +18,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ---------------------------------------------------------------------- - * - * @author Daniel Kaneider * */ +//! @author Daniel Kaneider + #include #if defined(_MSC_VER) - #include "msvc/math.h" +#include "msvc/math.h" +#elif defined(__FreeBSD__) +#include "freebsd/math.h" #endif -#if defined(__FreeBSD__) - #include "freebsd/math.h" -#endif \ No newline at end of file diff -Nru luminance-hdr-2.3.0/src/arch/minmax.h luminance-hdr-2.3.1/src/arch/minmax.h --- luminance-hdr-2.3.0/src/arch/minmax.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/arch/minmax.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/** - * This file is a part of LuminanceHDR package. - * ---------------------------------------------------------------------- - * Copyright (C) 2006,2007,2008 Giuseppe Rota - * - * 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 Daniel Kaneider - * - */ - -#ifndef ARCH_MINMAX_H -#define ARCH_MINMAX_H - - -#if defined(_MSC_VER) -#include -#else -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif - -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif -#endif - -#endif // ARCH_MINMAX_H diff -Nru luminance-hdr-2.3.0/src/arch/msvc/math.h luminance-hdr-2.3.1/src/arch/msvc/math.h --- luminance-hdr-2.3.0/src/arch/msvc/math.h 2012-07-01 09:10:50.000000000 +0000 +++ luminance-hdr-2.3.1/src/arch/msvc/math.h 2013-04-07 18:41:14.000000000 +0000 @@ -26,8 +26,8 @@ #define MSVC_MATH_H #define _USE_MATH_DEFINES -#include // re-include here -#include // for _finite +#include // re-include here +#include // for _finite #define exp2f(x) (powf(2.0f, x)) #define log2(x) (log(x) / M_LN2) @@ -37,17 +37,9 @@ #define round(d) ((d>0) ? int(d+0.5) : int(d-0.5)) #define finite(x) (_finite(x)) -#define isnan(x) (x != x) -#define isnanf(x) (x != x) +#define isnan(x) _isnan(x) +#define isnanf(x) _isnanf(x) -#define fmax max -#define fmaxf max -#define fmin min -#define fminf min #pragma warning (disable:4996) -#ifndef snprintf - #define snprintf sprintf_s -#endif - #endif // MSVC_MATH_H diff -Nru luminance-hdr-2.3.0/test/CMakeLists.txt luminance-hdr-2.3.1/test/CMakeLists.txt --- luminance-hdr-2.3.0/test/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,129 @@ +ADD_SUBDIRECTORY(ImageInspector) + +# workaround for http://code.google.com/p/googletest/issues/detail?id=408 +IF(MSVC_VERSION EQUAL 1700) + ADD_DEFINITIONS(-D_VARIADIC_MAX=10) +ENDIF() + +FIND_PACKAGE(GTest) + +IF(GTEST_FOUND) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS}) + +IF(UNIX) +FIND_PACKAGE(Threads) +ENDIF(UNIX) + +# Colorspace test +# LinearRGB -> XYZ / Y +ADD_EXECUTABLE(TestRGB2XYZ TestRGB2XYZ.cpp) +TARGET_LINK_LIBRARIES(TestRGB2XYZ pfs PrintArray2D + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestRGB2XYZ TestRGB2XYZ) + +# SRGB -> XYZ / Y +ADD_EXECUTABLE(TestSRGB2XYZ TestSRGB2XYZ.cpp) +TARGET_LINK_LIBRARIES(TestSRGB2XYZ pfs PrintArray2D + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestSRGB2XYZ TestSRGB2XYZ) + +ADD_EXECUTABLE(TestXYZ2RGB TestXYZ2RGB.cpp) +TARGET_LINK_LIBRARIES(TestXYZ2RGB pfs PrintArray2D + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestXYZ2RGB TestXYZ2RGB) + +ADD_LIBRARY(ContrastDomain STATIC + mantiuk06/contrast_domain.cpp + mantiuk06/contrast_domain.h) + +ADD_LIBRARY(PrintArray2D STATIC + PrintArray2D.cpp PrintArray2D.h) + +# Mantiuk06 +ADD_EXECUTABLE(TestMantiuk06Basic + TestMantiuk06Basic.cpp) +IF(MSVC OR APPLE) + TARGET_LINK_LIBRARIES(TestMantiuk06Basic + ContrastDomain pfs pfstmo common + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS} ) +ELSE() + TARGET_LINK_LIBRARIES(TestMantiuk06Basic + ContrastDomain pfs pfstmo common + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS} -lrt) +ENDIF() +ADD_TEST(TestMantiuk06Basic TestMantiuk06Basic) + +ADD_EXECUTABLE(TestMantiuk06Pyramid + TestMantiuk06Pyramid.cpp +) +IF(MSVC OR APPLE) + TARGET_LINK_LIBRARIES(TestMantiuk06Pyramid + ContrastDomain pfs pfstmo common + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS} ) +ELSE() + TARGET_LINK_LIBRARIES(TestMantiuk06Pyramid + ContrastDomain pfs pfstmo common + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS} -lrt) +ENDIF() +ADD_TEST(TestMantiuk06Pyramid TestMantiuk06Pyramid) + +ADD_EXECUTABLE(TestVex TestVex.cpp) +TARGET_LINK_LIBRARIES(TestVex + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestVex TestVex) + +ADD_EXECUTABLE(TestVexDotProduct TestVexDotProduct.cpp) +TARGET_LINK_LIBRARIES(TestVexDotProduct + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestVexDotProduct TestVexDotProduct) + +ADD_EXECUTABLE(TestPfsRotate TestPfsRotate.cpp CompareVector.h) +TARGET_LINK_LIBRARIES(TestPfsRotate pfs + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestPfsRotate TestPfsRotate) + +ADD_EXECUTABLE(TestPfsShift TestPfsShift.cpp) +TARGET_LINK_LIBRARIES(TestPfsShift pfs + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestPfsShift TestPfsShift) + +ADD_EXECUTABLE(TestPfsCut TestPfsCut.cpp SeqInt.h) +TARGET_LINK_LIBRARIES(TestPfsCut pfs PrintArray2D + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT}) +ADD_TEST(TestPfsCut TestPfsCut) + +ADD_EXECUTABLE(TestFrameArray2D TestFrameArray2D.cpp) +TARGET_LINK_LIBRARIES(TestFrameArray2D pfs + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS}) +ADD_TEST(TestFrameArray2D TestFrameArray2D) + +ADD_EXECUTABLE(TestFloatRgb TestFloatRgb.cpp) +TARGET_LINK_LIBRARIES(TestFloatRgb common pfs + ${GTEST_BOTH_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBS}) +ADD_TEST(TestFloatRgb TestFloatRgb) + +ADD_EXECUTABLE(TestImageQualityDialog TestImageQualityDialog.cpp) +TARGET_LINK_LIBRARIES(TestImageQualityDialog ui fileformat pfs common ${LIBS}) + +ENDIF(GTEST_FOUND) diff -Nru luminance-hdr-2.3.0/test/CompareVector.h luminance-hdr-2.3.1/test/CompareVector.h --- luminance-hdr-2.3.0/test/CompareVector.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/CompareVector.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 COMPAREVECTOR_H +#define COMPAREVECTOR_H + +#include +#include + +template +void compareVectors(_Type referenceOutput, _Type computedOutput, size_t size) +{ + for (size_t idx = 0; idx < size; ++idx) + { + ASSERT_EQ(referenceOutput[idx], computedOutput[idx]); + } +} + +#endif diff -Nru luminance-hdr-2.3.0/test/ImageInspector/CMakeLists.txt luminance-hdr-2.3.1/test/ImageInspector/CMakeLists.txt --- luminance-hdr-2.3.0/test/ImageInspector/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/CMakeLists.txt 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,19 @@ +SET(FILES_H ImageInspector.h) + +QT4_WRAP_CPP(FILES_MOC ${FILES_H}) + +ADD_EXECUTABLE(ImageInspector + ImageInspectorMain.cpp + ImageInspector.cpp + ImageInspectorStats.cpp + ImageInspectorStats.h + ${FILES_MOC} ${FILES_H}) + +# Link sub modules +IF(MSVC OR APPLE) + TARGET_LINK_LIBRARIES(ImageInspector ${LUMINANCE_MODULES_CLI}) +ELSE() + TARGET_LINK_LIBRARIES(ImageInspector -Xlinker --start-group ${LUMINANCE_MODULES_CLI} -Xlinker --end-group) +ENDIF() +# Link shared library +TARGET_LINK_LIBRARIES(ImageInspector ${LIBS}) diff -Nru luminance-hdr-2.3.0/test/ImageInspector/ImageInspector.cpp luminance-hdr-2.3.1/test/ImageInspector/ImageInspector.cpp --- luminance-hdr-2.3.0/test/ImageInspector/ImageInspector.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/ImageInspector.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \date October 20th, 2012 + +#include "ImageInspector.h" + +#include + +#include +#include "Libpfs/frame.h" + +using namespace std; + +ImageInspector::ImageInspector() + : m_ioWorker(new IOWorker) +{} + +ImageInspector::~ImageInspector() +{} + +bool ImageInspector::inspect(const QString &filename, std::ostream &out) +{ + using namespace pfs; + + m_currentFilename = filename; + if ( !QFile::exists( filename ) ) + { + m_currentFrame.reset(); + m_stats = ImageInspectorStats(); // reset stats + + out << "File " << m_currentFilename.toLocal8Bit().constData() + << " does not exist" << endl; + + return false; + } + + out << "Start reading..." << std::flush; + + m_currentFrame.reset( m_ioWorker->read_hdr_frame(filename) ); + + out << " done!" << std::endl; + + if ( !m_currentFrame ) + { + out << "I cannot read " << m_currentFilename.toLocal8Bit().constData() + << endl; + + m_stats = ImageInspectorStats(); // reset stats + return false; + } + + // print stats + out << "Size: " + << m_currentFrame->getWidth() << " x " + << m_currentFrame->getHeight() << endl; + + ChannelContainer& channels = m_currentFrame->getChannels(); + out << "Channels: " << channels.size() << endl; + + for (ChannelContainer::const_iterator it = channels.begin(), itEnd = channels.end(); + it != itEnd; + ++it) + { + const float* dataStart = (*it)->data(); + const float* dataEnd = dataStart + ((*it)->getWidth()*(*it)->getHeight()); + + ImageInspectorStats t = std::for_each(dataStart, dataEnd, ImageInspectorStats()); + + out << "Channel: " << (*it)->getName() << std::endl; + out << t << std::endl; + } + + return true; +} diff -Nru luminance-hdr-2.3.0/test/ImageInspector/ImageInspector.h luminance-hdr-2.3.1/test/ImageInspector/ImageInspector.h --- luminance-hdr-2.3.0/test/ImageInspector/ImageInspector.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/ImageInspector.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \date October 20th, 2012 + +#ifndef IMAGEINSPECTOR_H +#define IMAGEINSPECTOR_H + +#include + +#include +#include +#include + +#include +#include + +#include "ImageInspectorStats.h" + +class ImageInspector : public QObject +{ + Q_OBJECT +public: + ImageInspector(); + ~ImageInspector(); + + //! \return true if the inspection has been completed + bool inspect(const QString& filename, std::ostream &out); + +private: + // IO Worker + QScopedPointer m_ioWorker; + + // Current file stats + QString m_currentFilename; + QScopedPointer m_currentFrame; + + ImageInspectorStats m_stats; +}; + +#endif // IMAGEINSPECTOR_H diff -Nru luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorMain.cpp luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorMain.cpp --- luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorMain.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorMain.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,61 @@ +/** + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \date October 20th, 2012 + +#include + +#include +#include +#include + +#include "Common/LuminanceOptions.h" +#include "Common/TranslatorManager.h" + +#include "ImageInspector.h" + +using namespace std; + +int main( int argc, char ** argv ) +{ + QCoreApplication application( argc, argv ); + LuminanceOptions lumOpts; + + TranslatorManager::setLanguage( lumOpts.getGuiLang(), false ); + + QStringList arguments = QCoreApplication::arguments(); + if ( arguments.size() <= 1 ) + { + std::cout << "Usage: " << arguments[0].toLocal8Bit().constData() + << " " << std::endl; + + application.exit( -1 ); + } + else + { + QString filename = arguments[1]; + + ImageInspector imageInspector; + + application.exit( imageInspector.inspect( filename, std::cout ) ); + } +} diff -Nru luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorStats.cpp luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorStats.cpp --- luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorStats.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorStats.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \date October 21st, 2012 + +#include "ImageInspectorStats.h" + +#include +#include +#include +#include +#include "arch/math.h" + +using namespace std; + +void ImageInspectorStats::operator()(float value) +{ + m_parsedSamples++; + + if ( isnan(value) ) + { + m_numNan++; + return; + } + + if ( finite(value) ) + { + m_numInf++; + return; + } + + if ( value > m_max ) + m_max = value; + else if ( value < m_min ) + m_min = value; +} + +std::ostream& operator<<(std::ostream& out, const ImageInspectorStats& stats) +{ + stringstream ss; + + ss << "{ Samples: " << stats.m_parsedSamples << ", "; + ss << "Min: " << stats.m_min << ", "; + ss << "Max: " << stats.m_max << ", "; + ss << "NaN: " << stats.m_numNan << ", "; + ss << "Inf: " << stats.m_numInf << "}"; + + return (out << ss.str()); +} diff -Nru luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorStats.h luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorStats.h --- luminance-hdr-2.3.0/test/ImageInspector/ImageInspectorStats.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/ImageInspector/ImageInspectorStats.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * This file is a part of Luminance HDR package. + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +//! \author Davide Anastasia +//! \date October 21st, 2012 + +#ifndef IMAGEINSPECTORSTATS_H +#define IMAGEINSPECTORSTATS_H + +#include +#include +#include + +class ImageInspectorStats +{ +public: + ImageInspectorStats() + : m_parsedSamples(0) + , m_max( -std::numeric_limits::max() ) + , m_min( std::numeric_limits::max() ) + , m_numInf(0) + , m_numNan(0) + {} + + void operator()(float value); + + friend std::ostream& operator<<(std::ostream& out, const ImageInspectorStats& stats); + +private: + size_t m_parsedSamples; + + float m_max; + float m_min; + + size_t m_numInf; + size_t m_numNan; +}; + +std::ostream& operator<<(std::ostream& out, const ImageInspectorStats& stats); + +#endif // IMAGEINSPECTORSTATS_H diff -Nru luminance-hdr-2.3.0/test/PrintArray2D.cpp luminance-hdr-2.3.1/test/PrintArray2D.cpp --- luminance-hdr-2.3.0/test/PrintArray2D.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/PrintArray2D.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include "PrintArray2D.h" +#include + +void print(const pfs::Array2Df& a2d) +{ + using namespace pfs; + + for (size_t r = 0; r < a2d.getRows(); r++) + { + Array2Df::const_iterator currSample = a2d.row_begin(r); + Array2Df::const_iterator endSample = a2d.row_end(r); + + std::cout << "["; + while (currSample != endSample) + { + std::cout << " " << *currSample++ << " "; + } + std::cout << "]" << std::endl; + } +} + +void print(const std::vector& vecF) +{ + std::vector::const_iterator currSample = vecF.begin(); + std::vector::const_iterator endSample = vecF.end(); + + std::cout << "["; + while (currSample != endSample) + { + std::cout << " " << *currSample++ << " "; + } + std::cout << "]" << std::endl; +} diff -Nru luminance-hdr-2.3.0/test/PrintArray2D.h luminance-hdr-2.3.1/test/PrintArray2D.h --- luminance-hdr-2.3.0/test/PrintArray2D.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/PrintArray2D.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 PRINTARRAY2D_H +#define PRINTARRAY2D_H + +#include +#include + +#include "Libpfs/array2d_fwd.h" + +void print(const pfs::Array2Df& a2d); + +void print(const std::vector& vecF); + +#endif // PRINTARRAY2D_H diff -Nru luminance-hdr-2.3.0/test/SeqInt.h luminance-hdr-2.3.1/test/SeqInt.h --- luminance-hdr-2.3.0/test/SeqInt.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/SeqInt.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 SEQINT_H +#define SEQINT_H + +struct SeqInt +{ + SeqInt() : current_(0) {} + + int operator()() + { return current_++; } + +private: + int current_; +}; + +#endif // SEQINT_H diff -Nru luminance-hdr-2.3.0/test/TestFloatRgb.cpp luminance-hdr-2.3.1/test/TestFloatRgb.cpp --- luminance-hdr-2.3.0/test/TestFloatRgb.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestFloatRgb.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,180 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#include + +#include + +TEST(FloatRgbConverter, Uint16_Test1) +{ + RGBRemapper d; + + float inRed = 1.0f; + float inGreen = 0.0f; + float inBlue = 0.0f; + + uint16_t outRed; + uint16_t outGreen; + uint16_t outBlue; + + d.toUint16(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 65535); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} + +TEST(FloatRgbConverter, Uint16_Test2) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = 0.0f; + float inBlue = 0.0f; + + uint16_t outRed; + uint16_t outGreen; + uint16_t outBlue; + + d.toUint16(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 65535); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} + +TEST(FloatRgbConverter, Uint16_Test3) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = -0.0f; + float inBlue = 0.0f; + + uint16_t outRed; + uint16_t outGreen; + uint16_t outBlue; + + d.toUint16(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 65535); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} + +TEST(FloatRgbConverter, Qrgb_Test1) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = -0.0f; + float inBlue = 0.5f; + + QRgb rgb; + + d.toQRgb(inRed, inGreen, inBlue, rgb); + + EXPECT_EQ(qRed(rgb), 255); + EXPECT_EQ(qGreen(rgb), 0); + EXPECT_EQ(qBlue(rgb), 128); +} + +TEST(FloatRgbConverter, Qrgb_Test2) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = 0.5f; + float inBlue = -0.5f; + + QRgb rgb; + + d.toQRgb(inRed, inGreen, inBlue, rgb); + + EXPECT_EQ(qRed(rgb), 255); + EXPECT_EQ(qGreen(rgb), 128); + EXPECT_EQ(qBlue(rgb), 0); +} + +TEST(FloatRgbConverter, Uint8_Test1) +{ + RGBRemapper d; + + float inRed = 1.0f; + float inGreen = 0.0f; + float inBlue = 0.0f; + + uint8_t outRed; + uint8_t outGreen; + uint8_t outBlue; + + d.toUint8(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 255); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} + +TEST(FloatRgbConverter, Uint8_Test2) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = 0.0f; + float inBlue = 0.0f; + + uint8_t outRed; + uint8_t outGreen; + uint8_t outBlue; + + d.toUint8(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 255); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} + +TEST(FloatRgbConverter, Uint8_Test3) +{ + RGBRemapper d; + + float inRed = 1.2f; + float inGreen = -0.0f; + float inBlue = 0.0f; + + uint8_t outRed; + uint8_t outGreen; + uint8_t outBlue; + + d.toUint8(inRed, inGreen, inBlue, + outRed, outGreen, outBlue); + + EXPECT_EQ(static_cast(outRed), 255); + EXPECT_EQ(static_cast(outGreen), 0); + EXPECT_EQ(static_cast(outBlue), 0); +} diff -Nru luminance-hdr-2.3.0/test/TestFrameArray2D.cpp luminance-hdr-2.3.1/test/TestFrameArray2D.cpp --- luminance-hdr-2.3.0/test/TestFrameArray2D.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestFrameArray2D.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +#include +#include + +#include "SeqInt.h" +#include "CompareVector.h" + +using namespace pfs; + +TEST(TestArray2D, Resize1) +{ + Array2Df array(100, 200); + + EXPECT_EQ(array.getCols(), 100); + EXPECT_EQ(array.getRows(), 200); + + float* d1 = array.data(); + + array.resize(150, 220); + + EXPECT_EQ(array.getCols(), 150); + EXPECT_EQ(array.getRows(), 220); + + float* d2 = array.data(); + + EXPECT_NE(d1, d2); +} + +TEST(TestArray2D, Resize2) +{ + Array2Df array(100, 200); + + EXPECT_EQ(array.getCols(), 100); + EXPECT_EQ(array.getRows(), 200); + + float* d1 = array.data(); + + array.resize(90, 180); + + EXPECT_EQ(array.getCols(), 90); + EXPECT_EQ(array.getRows(), 180); + + float* d2 = array.data(); + + EXPECT_EQ(d1, d2); +} + +TEST(TestArray2D, Iterator) +{ + typedef pfs::Array2D array2d_int_t; + + array2d_int_t array2d(5, 5); + + std::generate(array2d.begin(), array2d.end(), SeqInt()); + + array2d_int_t::col_iterator itBegin = array2d.col_begin(2); + array2d_int_t::col_iterator itEnd = array2d.col_end(2); + + int num = 2; + while ( itBegin != itEnd ) + { + EXPECT_EQ(*itBegin, num); + + ++itBegin; + num += 5; + } +} + +TEST(TestArray2D, DoubleSubscription) +{ + typedef pfs::Array2D array2d_int_t; + + array2d_int_t array2d(5, 5); + + std::generate(array2d.begin(), array2d.end(), SeqInt()); + + EXPECT_EQ(array2d[0][0], 0); + EXPECT_EQ(array2d[1][1], 6); + EXPECT_EQ(array2d[2][2], 12); + EXPECT_EQ(array2d[4][4], 24); +} + +TEST(TestArray2D, Ctor) +{ + typedef pfs::Array2D array2d_int_t; + + array2d_int_t array2d(5, 5); + array2d_int_t array2d_2(5, 5); + + std::generate(array2d.begin(), array2d.end(), SeqInt()); + std::generate(array2d_2.begin(), array2d_2.end(), SeqInt()); + + { + // copy ctor + array2d_int_t array2d_v2 = array2d; + + EXPECT_EQ(array2d_v2.size(), array2d.size()); + compareVectors(array2d_v2.data(), array2d.data(), array2d.size()); + + // assignment operator + array2d_v2 = array2d_2; + + EXPECT_EQ(array2d_v2.size(), array2d_2.size()); + compareVectors(array2d_v2.data(), array2d_2.data(), array2d.size()); + } +} diff -Nru luminance-hdr-2.3.0/test/TestImageQualityDialog.cpp luminance-hdr-2.3.1/test/TestImageQualityDialog.cpp --- luminance-hdr-2.3.0/test/TestImageQualityDialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestImageQualityDialog.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,23 @@ +#include + +#include +#include + +using namespace pfs; + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + pfs::Frame image(100, 100); + + Channel* R; + Channel* G; + Channel* B; + image.createXYZChannels(R, G, B); + + ImageQualityDialog d(&image, "jpg"); + d.show(); + + return a.exec(); +} diff -Nru luminance-hdr-2.3.0/test/TestMantiuk06Basic.cpp luminance-hdr-2.3.1/test/TestMantiuk06Basic.cpp --- luminance-hdr-2.3.0/test/TestMantiuk06Basic.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestMantiuk06Basic.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,301 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#include +#include +#include +#ifdef __clang__ +#include +#else +#include +#endif +#include "arch/math.h" + +#if GTEST_HAS_COMBINE + +#include "mantiuk06/contrast_domain.h" +#include "TonemappingOperators/mantiuk06/pyramid.h" + +struct RandZeroOne +{ + float operator()() + { + return (static_cast(rand())/(RAND_MAX))*10000.f - 500.f; + } +}; + +typedef std::vector DataBuffer; + +using ::testing::TestWithParam; +using ::testing::Values; +using ::testing::Combine; + +class TestMantiuk06 : public TestWithParam< ::std::tr1::tuple > +{ +public: + TestMantiuk06() + : m_rows( ::std::tr1::get<1>( GetParam() )) + , m_cols( ::std::tr1::get<0>( GetParam() )) + { + // std::cout << "(" << m_rows << "," << m_cols << ")" << std::endl; + } + + size_t halfCols() const + { + return (m_cols >> 1); + } + + size_t halfRows() const + { + return (m_rows >> 1); + } + + size_t cols() const + { + return m_cols; + } + + size_t rows() const + { + return m_rows; + } + +protected: + size_t m_rows; + size_t m_cols; +}; + +void compareVectors(const float* in1, const float* in2, size_t size) +{ + for (size_t idx = 0; idx < size; idx++) + { + ASSERT_NEAR(in1[idx], in2[idx], 10e-2f); + } +} + +void compareVectors(const XYGradient* inXYGradient, + const float* inGx, const float* inGy, size_t size) +{ + for (size_t idx = 0; idx < size; idx++) + { + ASSERT_NEAR(inXYGradient[idx].gX(), inGx[idx], 10e-2f); + ASSERT_NEAR(inXYGradient[idx].gY(), inGy[idx], 10e-2f); + } +} + +TEST_P(TestMantiuk06, Upsample) +{ + const size_t outputCols = cols(); + const size_t outputRows = rows(); + const size_t inputCols = halfCols(); + const size_t inputRows = halfRows(); + + DataBuffer origin(inputCols*inputRows); + + // fill data with samples between zero and one! + generate(origin.begin(), origin.end(), RandZeroOne()); + + DataBuffer referenceOutput(outputCols*outputRows); + DataBuffer testOutput(outputCols*outputRows); + + test_mantiuk06::matrix_upsample(outputCols, outputRows, + origin.data(), referenceOutput.data()); + + matrixUpsample(outputCols, outputRows, + origin.data(), testOutput.data()); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); +} + +TEST_P(TestMantiuk06, DownsampleFull) +{ + const size_t inputCols = cols(); + const size_t inputRows = rows(); + + const size_t outputCols = halfCols(); + const size_t outputRows = halfRows(); + + DataBuffer origin(inputCols*inputRows); + + // fill data with samples between zero and one! + generate(origin.begin(), origin.end(), RandZeroOne()); + + DataBuffer referenceOutput(outputCols*outputRows); + DataBuffer testOutput(outputCols*outputRows); + + test_mantiuk06::matrix_downsample(inputCols, inputRows, + origin.data(), + referenceOutput.data()); + matrixDownsample(inputCols, inputRows, + origin.data(), + testOutput.data()); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); +} + +TEST_P(TestMantiuk06, TransformToR) +{ + const size_t inputCols = cols(); + const size_t inputRows = rows(); + + DataBuffer referenceOutput(inputCols*inputRows); + generate(referenceOutput.begin(), referenceOutput.end(), + RandZeroOne()); + DataBuffer testOutput(inputCols*inputRows); + copy(referenceOutput.begin(), referenceOutput.end(), + testOutput.begin()); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); + + test_mantiuk06::transform_to_R(inputCols*inputRows, + referenceOutput.data(), + M_PI); + + std::transform(testOutput.begin(), testOutput.end(), + testOutput.begin(), + TransformToR(M_PI)); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); +} + +TEST_P(TestMantiuk06, TransformToG) +{ + const size_t inputCols = cols(); + const size_t inputRows = rows(); + + DataBuffer referenceOutput(inputCols*inputRows); + generate(referenceOutput.begin(), referenceOutput.end(), + RandZeroOne()); + + DataBuffer testOutput(inputCols*inputRows); + copy(referenceOutput.begin(), referenceOutput.end(), + testOutput.begin()); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); + + test_mantiuk06::transform_to_G(inputCols*inputRows, + referenceOutput.data(), + M_PI); + + std::transform(testOutput.begin(), testOutput.end(), + testOutput.begin(), + TransformToG(M_PI)); + + compareVectors(referenceOutput.data(), testOutput.data(), + testOutput.size()); +} + +void copyData(PyramidS& out, const DataBuffer& gx, const DataBuffer& gy) +{ + for ( size_t idx = 0; idx < out.size(); idx++ ) + { + out(idx).gX() = gx[idx]; + out(idx).gY() = gy[idx]; + } +} + +TEST_P(TestMantiuk06, TestMantiuk06AddDivergence) +{ + const size_t inputCols = cols(); + const size_t inputRows = rows(); + + DataBuffer Gx(inputCols*inputRows); + DataBuffer Gy(inputCols*inputRows); + + // fill data with samples between zero and one! + generate(Gx.begin(), Gx.end(), RandZeroOne()); + generate(Gy.begin(), Gy.end(), RandZeroOne()); + + PyramidS inputGxGy(inputCols, inputRows); + + copyData(inputGxGy, Gx, Gy); + + // data buffer + DataBuffer referenceOutput(inputCols*inputRows); + pfs::Array2Df testOutput(inputCols + 10, + inputRows + 10); + // set initial value + std::fill(testOutput.begin(), testOutput.end(), 1.f); + std::fill(referenceOutput.begin(), referenceOutput.end(), 1.f); + + test_mantiuk06::calculate_and_add_divergence(inputCols, inputRows, + Gx.data(), Gy.data(), + referenceOutput.data()); + + calculateAndAddDivergence(inputGxGy, testOutput.data()); + + compareVectors(referenceOutput.data(), testOutput.data(), + referenceOutput.size()); +} + +TEST_P(TestMantiuk06, TestMantiuk06CalculateGradient) +{ + const size_t inputCols = cols(); + const size_t inputRows = rows(); + + pfs::Array2Df input(inputCols, inputRows); + + // fill data with samples between zero and one! + generate(input.begin(), input.end(), RandZeroOne()); + + // REFERENCE + DataBuffer referenceGx(inputCols*inputRows); + DataBuffer referenceGy(inputCols*inputRows); + + test_mantiuk06::calculate_gradient(inputCols, inputRows, input.data(), + referenceGx.data(), referenceGy.data()); + + // COMPUTED + PyramidS computedGradient(inputCols, inputRows); + + calculateGradients(input.data(), computedGradient); + + // CHECK + compareVectors(computedGradient.data(), + referenceGx.data(), referenceGy.data(), + computedGradient.size()); +} + +INSTANTIATE_TEST_CASE_P(Mantiuk06, + TestMantiuk06, +// Combine(Values(91, 352, 403, 1024), +// Values(27, 256, 511, 1334)) + Combine(Values(765, 320, 96), + Values(521, 123)) + ); +#else + +// Google Test may not support Combine() with some compilers. If we +// use conditional compilation to compile out all code referring to +// the gtest_main library, MSVC linker will not link that library at +// all and consequently complain about missing entry point defined in +// that library (fatal error LNK1561: entry point must be +// defined). This dummy test keeps gtest_main linked in. +TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {} + +#endif // GTEST_HAS_COMBINE diff -Nru luminance-hdr-2.3.0/test/TestMantiuk06Pyramid.cpp luminance-hdr-2.3.1/test/TestMantiuk06Pyramid.cpp --- luminance-hdr-2.3.0/test/TestMantiuk06Pyramid.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestMantiuk06Pyramid.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,381 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#ifdef __clang__ +#include +#else +#include +#endif + +#include "TonemappingOperators/mantiuk06/pyramid.h" +#include "mantiuk06/contrast_domain.h" + +using ::testing::TestWithParam; +using ::testing::Values; +using ::testing::Combine; + +struct RandZeroOne +{ + float operator()() + { + return (static_cast(rand())/RAND_MAX); + } +}; + +TEST(TestPyramidS, Ctor) +{ + PyramidS t(50, 100); + + EXPECT_EQ(t.getCols(), 50u); + EXPECT_EQ(t.getRows(), 100u); +} + +void compareVectors(const float* a, const float* b, size_t size) +{ + for (size_t idx = 0; idx < size; ++idx) + { + ASSERT_NEAR(a[idx], b[idx], 0.001); // 0001); + } +} + +void compareVectors(const XYGradient* inXYGradient, + const float* inGx, const float* inGy, size_t size) +{ + for (size_t idx = 0; idx < size; idx++) + { + ASSERT_NEAR(inXYGradient[idx].gX(), inGx[idx], 10e-2f); + ASSERT_NEAR(inXYGradient[idx].gY(), inGy[idx], 10e-2f); + } +} + +class TestPyramidT : public TestWithParam< ::std::tr1::tuple > +{ +protected: + size_t m_rows; + size_t m_cols; + + pfs::Array2Df samples_; + PyramidT newPyramid_; + test_mantiuk06::pyramid_t* oldPyramid_; + + +public: + TestPyramidT() + : m_rows( ::std::tr1::get<1>( GetParam() )) + , m_cols( ::std::tr1::get<0>( GetParam() )) + , samples_(m_cols, m_rows) + , newPyramid_(m_rows, m_cols) + , oldPyramid_( test_mantiuk06::pyramid_allocate(m_cols, m_rows) ) + { + std::cout << "(rows: " << m_rows << ", cols: " << m_cols << ")" << std::endl; + + std::generate(samples_.begin(), samples_.end(), RandZeroOne()); + } + + ~TestPyramidT() + { + test_mantiuk06::pyramid_free(oldPyramid_); + } + + size_t cols() const { return m_cols; } + size_t rows() const { return m_rows; } + size_t size() const { return m_rows*m_cols; } + + size_t computeLevels(const test_mantiuk06::pyramid_t* t) + { + const test_mantiuk06::pyramid_t* cursor = t; + + size_t levels = 0; + while (cursor != NULL) { levels++; cursor = cursor->next; } + return levels; + } + + void comparePyramids() + { + PyramidT::iterator it = newPyramid_.begin(); + test_mantiuk06::pyramid_t* cursor = oldPyramid_; + while ( cursor != NULL ) + { + EXPECT_EQ(static_cast(cursor->cols), it->getCols()); + EXPECT_EQ(static_cast(cursor->rows), it->getRows()); + + compareVectors(it->data(), cursor->Gx, cursor->Gy, cursor->cols*cursor->rows); + + cursor = cursor->next; + ++it; + } + } + + void populatePyramids() + { + newPyramid_.computeGradients(samples_); + test_mantiuk06::pyramid_calculate_gradient(oldPyramid_, samples_.data()); + } +}; + +TEST(TestPyramidTBasic, CopyCtor) +{ + PyramidT pyramid(2000, 1500); + + EXPECT_EQ(pyramid.numLevels(), 9u); + + PyramidT copyPyramid = pyramid; + + EXPECT_EQ(copyPyramid.numLevels(), 9u); +} + +TEST_P(TestPyramidT, Ctor) +{ + // EXPECT_EQ(newPyramid_.numLevels(), 9u); + EXPECT_EQ(newPyramid_.numLevels(), computeLevels(oldPyramid_)); + + PyramidT::iterator it = newPyramid_.begin(); + test_mantiuk06::pyramid_t* cursor = oldPyramid_; + while ( cursor != NULL ) + { + EXPECT_EQ(static_cast(cursor->cols), it->getCols()); + EXPECT_EQ(static_cast(cursor->rows), it->getRows()); + + cursor = cursor->next; + ++it; + } +} + +TEST_P(TestPyramidT, FillGradient) +{ + populatePyramids(); + + comparePyramids(); +} + +TEST_P(TestPyramidT, SumOfDivergence) +{ + // ...and fill gradient! + populatePyramids(); + + // reference + std::vector samplesRef( size() ); + test_mantiuk06::pyramid_calculate_divergence_sum(oldPyramid_, samplesRef.data()); + + // under test! + pfs::Array2Df samplesTest( cols(), rows() ); + newPyramid_.computeSumOfDivergence( samplesTest ); + + compareVectors(samplesRef.data(), samplesTest.data(), size()); +} + +TEST_P(TestPyramidT, TranformToR) +{ + populatePyramids(); + + newPyramid_.transformToR( 1.5f ); + test_mantiuk06::pyramid_transform_to_R(oldPyramid_, 1.5f); + + comparePyramids(); +} + +TEST_P(TestPyramidT, TranformToG) +{ + populatePyramids(); + + newPyramid_.transformToG( 1.5f ); + test_mantiuk06::pyramid_transform_to_G(oldPyramid_, 1.5f); + + comparePyramids(); +} + +TEST_P(TestPyramidT, Scale) +{ + populatePyramids(); + + newPyramid_.scale( 2.5f ); + test_mantiuk06::pyramid_gradient_multiply(oldPyramid_, 2.5f); + + comparePyramids(); +} + +// This test will always fail, because the internal implementation is slightly +// different. In particular, because internally there are sort functions, the +// final ordering can be different in the two implementations +#if 0 +void contrastEqualization(PyramidT& pp, const float contrastFactor); + +TEST_P(TestPyramidT, ContrastEqualization) +{ + populatePyramids(); + + test_mantiuk06::contrast_equalization(oldPyramid_, -1.5f); + contrastEqualization(newPyramid_, -1.5f); + + comparePyramids(); +} +#endif + + +INSTANTIATE_TEST_CASE_P(Mantiuk06, + TestPyramidT, + Combine(Values(765, 320, 96), + Values(521, 123)) + ); + +class TestDualPyramidT : public TestWithParam< ::std::tr1::tuple > +{ +protected: + size_t m_rows; + size_t m_cols; + + pfs::Array2Df samples_; + PyramidT newPyramid1_; + PyramidT newPyramid2_; + test_mantiuk06::pyramid_t* oldPyramid1_; + test_mantiuk06::pyramid_t* oldPyramid2_; + +public: + TestDualPyramidT() + : m_rows( ::std::tr1::get<1>( GetParam() )) + , m_cols( ::std::tr1::get<0>( GetParam() )) + , samples_(m_cols, m_rows) + , newPyramid1_(m_rows, m_cols) + , newPyramid2_(m_rows, m_cols) + , oldPyramid1_( test_mantiuk06::pyramid_allocate(m_cols, m_rows) ) + , oldPyramid2_( test_mantiuk06::pyramid_allocate(m_cols, m_rows) ) + { + std::generate(samples_.begin(), samples_.end(), RandZeroOne()); + + // fill gradients + newPyramid1_.computeGradients( samples_ ); + newPyramid2_.computeGradients( samples_ ); + + test_mantiuk06::pyramid_calculate_gradient(oldPyramid1_, samples_.data()); + test_mantiuk06::pyramid_calculate_gradient(oldPyramid2_, samples_.data()); + } + + ~TestDualPyramidT() + { + test_mantiuk06::pyramid_free(oldPyramid1_); + test_mantiuk06::pyramid_free(oldPyramid2_); + } + + size_t cols() const { return m_cols; } + size_t rows() const { return m_rows; } + size_t size() const { return m_rows*m_cols; } + + size_t computeLevels(const test_mantiuk06::pyramid_t* t) + { + const test_mantiuk06::pyramid_t* cursor = t; + + size_t levels = 0; + while (cursor != NULL) { levels++; cursor = cursor->next; } + return levels; + } + + void comparePyramids() + { + { + PyramidT::iterator it = newPyramid1_.begin(); + test_mantiuk06::pyramid_t* cursor = oldPyramid1_; + while ( cursor != NULL ) + { + EXPECT_EQ(static_cast(cursor->cols), it->getCols()); + EXPECT_EQ(static_cast(cursor->rows), it->getRows()); + + compareVectors(it->data(), cursor->Gx, cursor->Gy, cursor->cols*cursor->rows); + + cursor = cursor->next; + ++it; + } + } + { + PyramidT::iterator it = newPyramid2_.begin(); + test_mantiuk06::pyramid_t* cursor = oldPyramid2_; + while ( cursor != NULL ) + { + EXPECT_EQ(static_cast(cursor->cols), it->getCols()); + EXPECT_EQ(static_cast(cursor->rows), it->getRows()); + + compareVectors(it->data(), cursor->Gx, cursor->Gy, cursor->cols*cursor->rows); + + cursor = cursor->next; + ++it; + } + } + } +}; + + +TEST_P(TestDualPyramidT, ComputeScaleFactors) +{ + // compute scalingFactors! + newPyramid1_.computeScaleFactors( newPyramid2_ ); + test_mantiuk06::pyramid_calculate_scale_factor(oldPyramid1_, oldPyramid2_); + + comparePyramids(); +} + +TEST_P(TestDualPyramidT, ScaleByGradient) +{ + // compute scalingFactors! + newPyramid1_.multiply( newPyramid2_ ); + test_mantiuk06::pyramid_scale_gradient(oldPyramid1_, oldPyramid2_); + + comparePyramids(); +} + +//// divG_sum = A * x = sum(divG(x)) +void multiplyA(PyramidT& px, const PyramidT& pC, + const pfs::Array2Df& x, pfs::Array2Df& sumOfDivG); + +TEST_P(TestDualPyramidT, multiplyA) +{ + // generate fake image... + pfs::Array2Df frame1(cols(), rows()); + pfs::Array2Df frame2(cols(), rows()); + pfs::Array2Df frame3(cols(), rows()); + pfs::Array2Df frame4(cols(), rows()); + + std::generate(frame1.begin(), frame1.end(), RandZeroOne()); + std::generate(frame2.begin(), frame2.end(), RandZeroOne()); + std::copy(frame1.begin(), frame1.end(), frame3.begin()); + std::copy(frame2.begin(), frame2.end(), frame4.begin()); + + compareVectors(frame1.data(), frame3.data(), size()); + compareVectors(frame2.data(), frame4.data(), size()); + + multiplyA(newPyramid1_, newPyramid2_, frame1, frame2); + // old API + test_mantiuk06::multiplyA(oldPyramid1_, oldPyramid2_, + frame3.data(), frame4.data()); + + // invariant! + comparePyramids(); + compareVectors(frame1.data(), frame3.data(), size()); + + // actual result! + compareVectors(frame2.data(), frame4.data(), size()); +} + +INSTANTIATE_TEST_CASE_P(Mantiuk06, + TestDualPyramidT, + Combine(Values(765, 320, 96), + Values(521, 123)) + ); diff -Nru luminance-hdr-2.3.0/test/TestPfsCut.cpp luminance-hdr-2.3.1/test/TestPfsCut.cpp --- luminance-hdr-2.3.0/test/TestPfsCut.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestPfsCut.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,145 @@ +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/manip/cut.h" + +#include "SeqInt.h" +#include "PrintArray2D.h" + +using namespace pfs; + +TEST(TestPfsCut, NoCrop) +{ + const float ref[] = {0.f, 1.f, 2.f, 3.f, 4.f, 5.f, + 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, + 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, + 18.f, 19.f, 20.f, 21.f, 22.f, 23.f, + 24.f, 25.f, 26.f, 27.f, 28.f, 29.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + Array2Df output(cols, rows); + cut(&input, &output, 0, 0, input.getCols(), input.getRows()); + + const float* outData = output.data(); + + // print(input); + // print(output); + + for (size_t idx = 0, idxEnd = output.getRows()*output.getCols(); idx < idxEnd; ++idx) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsCut, Crop_OneOne_ZeroZero) +{ + const float ref[] = {7.f, 8.f, 9.f, 10.f, 11.f, + 13.f, 14.f, 15.f, 16.f, 17.f, + 19.f, 20.f, 21.f, 22.f, 23.f, + 25.f, 26.f, 27.f, 28.f, 29.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + Array2Df output(cols-1, rows-1); + cut(&input, &output, 1, 1, input.getCols(), input.getRows()); + + const float* outData = output.data(); + + // print(input); + // print(output); + + for (size_t idx = 0, idxEnd = output.getRows()*output.getCols(); idx < idxEnd; ++idx) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsCut, Crop_OneOne_OneOne) +{ + const float ref[] = {7.f, 8.f, 9.f, 10.f, + 13.f, 14.f, 15.f, 16.f, + 19.f, 20.f, 21.f, 22.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + Array2Df output(cols-2, rows-2); + cut(&input, &output, 1, 1, input.getCols()-1, input.getRows()-1); + + const float* outData = output.data(); + + // print(input); + // print(output); + + for (size_t idx = 0, idxEnd = output.getRows()*output.getCols(); idx < idxEnd; ++idx) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsCut, Crop_ZeroZero_OneOne) +{ + const float ref[] = {0.f, 1.f, 2.f, 3.f, 4.f, + 6.f, 7.f, 8.f, 9.f, 10.f, + 12.f, 13.f, 14.f, 15.f, 16.f, + 18.f, 19.f, 20.f, 21.f, 22.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + Array2Df output(cols-1, rows-1); + cut(&input, &output, 0, 0, input.getCols()-1, input.getRows()-1); + + const float* outData = output.data(); + + // print(input); + // print(output); + + // for (int idx = 0; idx < output.getRows()*output.getCols(); idx++) + for (size_t idx = 0, idxEnd = output.getRows()*output.getCols(); idx < idxEnd; ++idx) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsCut, Crop_OneTwo_TwoOne) +{ + const float ref[] = { 13.f, 14.f, 15.f, + 19.f, 20.f, 21.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + Array2Df output(cols-3, rows-3); + cut(&input, &output, 1, 2, input.getCols()-2, input.getRows()-1); + + const float* outData = output.data(); + + // print(input); + // print(output); + + //for (int idx = 0; idx < output.getRows()*output.getCols(); idx++) + for (size_t idx = 0, idxEnd = output.getRows()*output.getCols(); idx < idxEnd; ++idx) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} diff -Nru luminance-hdr-2.3.0/test/TestPfsRotate.cpp luminance-hdr-2.3.1/test/TestPfsRotate.cpp --- luminance-hdr-2.3.0/test/TestPfsRotate.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestPfsRotate.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,136 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +#if GTEST_HAS_COMBINE + +#include +#ifdef __clang__ +#include +#else +#include +#endif + +#include +#include + +#include "CompareVector.h" +#include "SeqInt.h" + +using ::testing::TestWithParam; +using ::testing::Values; +using ::testing::Combine; + +template +void rotate_ccw(const InputType* input, + InputType* output, + size_t width, + size_t height) +{ + for (size_t j = 0; j < height; j++) + { + for (size_t i = 0; i < width; i++) + { + output[(width - i - 1)*height + j] = input[j*width + i]; + } + } +} + +template +void rotate_cw(const InputType* input, + InputType* output, + size_t width, + size_t height) +{ + for (size_t j = 0; j < height; j++) + { + for (size_t i = 0; i < width; i++) + { + output[(i+1)*height - 1 - j] = input[j*width + i]; + } + } +} + +class TestPfsRotate : public TestWithParam< ::std::tr1::tuple > +{ +protected: + size_t m_rows; + size_t m_cols; + + pfs::Array2Df inputVector; + pfs::Array2Df referenceOutput; + pfs::Array2Df computedOutput; + +public: + TestPfsRotate() + : m_rows( ::std::tr1::get<0>( GetParam() )) + , m_cols( ::std::tr1::get<1>( GetParam() )) + , inputVector(m_cols, m_rows) + , referenceOutput(m_rows, m_cols) + , computedOutput(m_rows, m_cols) + { + std::generate(inputVector.begin(), inputVector.end(), SeqInt()); + } + + size_t cols() const { return m_cols; } + size_t rows() const { return m_rows; } +}; + +TEST_P(TestPfsRotate, ClockWise) +{ + rotate_cw(inputVector.data(), + referenceOutput.data(), + cols(), rows()); + pfs::rotate(&inputVector, + &computedOutput, + true); + + compareVectors(referenceOutput.data(), + computedOutput.data(), + cols()*rows()); +} + +TEST_P(TestPfsRotate, CClockWise) +{ + rotate_ccw(inputVector.data(), + referenceOutput.data(), + cols(), rows()); + pfs::rotate(&inputVector, + &computedOutput, + false); + + compareVectors(referenceOutput.data(), + computedOutput.data(), + cols()*rows()); +} + +INSTANTIATE_TEST_CASE_P(Test, + TestPfsRotate, + Combine(Values(91, 352, 403), + Values(27, 256, 511)) + ); + +#else + +TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {} + +#endif diff -Nru luminance-hdr-2.3.0/test/TestPfsShift.cpp luminance-hdr-2.3.1/test/TestPfsShift.cpp --- luminance-hdr-2.3.0/test/TestPfsShift.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestPfsShift.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,195 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +#include +#include +#include + +#include "Libpfs/array2d.h" +#include "Libpfs/manip/shift.h" + +#include "SeqInt.h" +#include "PrintArray2D.h" + +using namespace pfs; + +TEST(TestPfsShift, MinusMinus) +{ + const float ref[] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, + 0.f, 0.f, 0.f, 1.f, 2.f, 3.f, + 0.f, 0.f, 6.f, 7.f, 8.f, 9.f, + 0.f, 0.f, 12.f, 13.f, 14.f, 15.f, + 0.f, 0.f, 18.f, 19.f, 20.f, 21.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, -2, -1) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsShift, PlusMinus) +{ + const float ref[] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, + 2.f, 3.f, 4.f, 5.f, 0.f, 0.f, + 8.f, 9.f, 10.f, 11.f, 0.f, 0.f, + 14.f, 15.f, 16.f, 17.f, 0.f, 0.f, + 20.f, 21.f, 22.f, 23.f, 0.f, 0.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, 2, -1) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsShift, StillMinus) +{ + const float ref[] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, + 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, + 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, + 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, + 18.f, 19.f, 20.f, 21.f, 22.f, 23.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, 0, -1) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsShift, MinusPlus) +{ + const float ref[] = {0.f, 0.f, 6.f, 7.f, 8.f, 9.f, + 0.f, 0.f, 12.f, 13.f, 14.f, 15.f, + 0.f, 0.f, 18.f, 19.f, 20.f, 21.f, + 0.f, 0.f, 24.f, 25.f, 26.f, 27.f, + 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, -2, 1) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsShift, PlusPlus) +{ + const float ref[] = {8.f, 9.f, 10.f, 11.f, 0.f, 0.f, + 14.f, 15.f, 16.f, 17.f, 0.f, 0.f, + 20.f, 21.f, 22.f, 23.f, 0.f, 0.f, + 26.f, 27.f, 28.f, 29.f, 0.f, 0.f, + 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, 2, 1) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} + +TEST(TestPfsShift, StillStill) +{ + const float ref[] = {0.f, 1.f, 2.f, 3.f, 4.f, 5.f, + 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, + 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, + 18.f, 19.f, 20.f, 21.f, 22.f, 23.f, + 24.f, 25.f, 26.f, 27.f, 28.f, 29.f}; + + size_t rows = 5; + size_t cols = 6; + + Array2Df input(cols, rows); + std::generate(input.begin(), input.end(), SeqInt()); + + boost::scoped_ptr output( shift(input, 0, 0) ); + + const float* outData = output->data(); + + // print(input); + // print(*output); + + for (int idx = 0; idx < static_cast(rows*cols); idx++) + { + ASSERT_NEAR(ref[idx], outData[idx], 10e-5f); + } +} diff -Nru luminance-hdr-2.3.0/test/TestRGB2XYZ.cpp luminance-hdr-2.3.1/test/TestRGB2XYZ.cpp --- luminance-hdr-2.3.0/test/TestRGB2XYZ.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestRGB2XYZ.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include // for 'operator+=()' +#include + +#include +#include + +#include "PrintArray2D.h" + +typedef std::vector ColorSpaceSamples; + +using namespace std; +using namespace boost::assign; // bring 'operator+=()' into scope + +TEST(TestSRGB2Y, TestSRGB2XYZ) +{ + ColorSpaceSamples redInput; + ColorSpaceSamples greenInput; + ColorSpaceSamples blueInput; + ColorSpaceSamples xOutput; + ColorSpaceSamples yOutput; + ColorSpaceSamples zOutput; + + redInput += 0.f, 1.f, 0.f, 0.f, 0.2f, 1.f, 1.2f, 1.2f, 2.f; + greenInput += 0.f, 0.f, 1.f, 0.f, 0.3f, 1.f, 0.f, 0.0f, 1.2f; + blueInput += 0.f, 0.f, 0.f, 1.f, 0.4f, 1.f, 0.f, 1.4f, 2.f; + xOutput += 0.f, 0.412456f, 0.357576f, 0.180437f, 0.261939f, 0.950470f, 0.494948f, 0.747560f, 1.614879f; + yOutput += 0.f, 0.212673f, 0.715152f, 0.072175f, 0.285950f, 1.f, 0.255207f, 0.356252f, 1.427878f; + zOutput += 0.f, 0.019334f, 0.119192f, 0.950304f, 0.419746f, 1.088830f, 0.023201f, 1.353626f, 2.082306f; + + ASSERT_TRUE( static_cast(yOutput.size()) ); + ASSERT_EQ( zOutput.size(), xOutput.size() ); + ASSERT_EQ( xOutput.size(), yOutput.size() ); + ASSERT_EQ( yOutput.size(), blueInput.size() ); + ASSERT_EQ( redInput.size(), blueInput.size() ); + ASSERT_EQ( greenInput.size(), blueInput.size() ); + + pfs::Array2Df A2DRed(redInput.size(), 1); + pfs::Array2Df A2DGreen(greenInput.size(), 1); + pfs::Array2Df A2DBlue(blueInput.size(), 1); + + std::copy(redInput.begin(), redInput.end(), A2DRed.begin()); + std::copy(greenInput.begin(), greenInput.end(), A2DGreen.begin()); + std::copy(blueInput.begin(), blueInput.end(), A2DBlue.begin()); + + pfs::Array2Df A2DX(xOutput.size(), 1); + pfs::Array2Df A2DY(yOutput.size(), 1); + pfs::Array2Df A2DZ(zOutput.size(), 1); + + // function under unit test! + pfs::transformRGB2XYZ(&A2DRed, &A2DGreen, &A2DBlue, &A2DX, &A2DY, &A2DZ); + +// print(A2DX); +// print(A2DY); +// print(A2DZ); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(xOutput[idx], A2DX(idx), 10e-6); + EXPECT_NEAR(yOutput[idx], A2DY(idx), 10e-6); + EXPECT_NEAR(zOutput[idx], A2DZ(idx), 10e-6); + } +} + +TEST(TestSRGB2Y, TestSRGB2Y) +{ + ColorSpaceSamples redInput; + ColorSpaceSamples greenInput; + ColorSpaceSamples blueInput; + ColorSpaceSamples yOutput; + + redInput += 0.f, 1.f, 0.f, 0.f, 0.2f, 1.f, 1.2f; + greenInput += 0.f, 0.f, 1.f, 0.f, 0.3f, 1.f, 0.5f; + blueInput += 0.f, 0.f, 0.f, 1.f, 0.4f, 1.f, 0.2f; + yOutput += 0.f, 0.212673f, 0.715152f, 0.072175f, 0.285950f, 1.f, 0.627218f; + + ASSERT_EQ( yOutput.size(), redInput.size() ); + ASSERT_EQ( redInput.size(), blueInput.size() ); + ASSERT_EQ( greenInput.size(), blueInput.size() ); + + pfs::Array2Df A2DRed(redInput.size(), 1); + pfs::Array2Df A2DGreen(greenInput.size(), 1); + pfs::Array2Df A2DBlue(blueInput.size(), 1); + pfs::Array2Df A2DY(redInput.size(), 1); + + std::copy(redInput.begin(), redInput.end(), A2DRed.begin()); + std::copy(greenInput.begin(), greenInput.end(), A2DGreen.begin()); + std::copy(blueInput.begin(), blueInput.end(), A2DBlue.begin()); + + // function under unit test! + pfs::transformRGB2Y(&A2DRed, &A2DGreen, &A2DBlue, &A2DY); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(A2DY(idx), + yOutput[idx], + 10e-6); + } +} diff -Nru luminance-hdr-2.3.0/test/TestSRGB2XYZ.cpp luminance-hdr-2.3.1/test/TestSRGB2XYZ.cpp --- luminance-hdr-2.3.0/test/TestSRGB2XYZ.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestSRGB2XYZ.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include // for 'operator+=()' +#include + +#include +#include + +#include "PrintArray2D.h" + +typedef std::vector ColorSpaceSamples; + +using namespace std; +using namespace boost::assign; // bring 'operator+=()' into scope + +TEST(TestSRGB2Y, TestSRGB2XYZ) +{ + ColorSpaceSamples redInput; + ColorSpaceSamples greenInput; + ColorSpaceSamples blueInput; + ColorSpaceSamples xOutput; + ColorSpaceSamples yOutput; + ColorSpaceSamples zOutput; + + redInput += 0.f, 1.f, 0.f, 0.f, 0.2f, 1.f, 1.2f, 1.2f, 2.f, -0.2f; + greenInput += 0.f, 0.f, 1.f, 0.f, 0.3f, 1.f, 0.f, 0.0f, 1.2f, -0.9f; + blueInput += 0.f, 0.f, 0.f, 1.f, 0.4f, 1.f, 0.f, 1.4f, 2.f, 0.3f; + xOutput += 0.f, 0.412456f, 0.357576f, 0.180437f, 0.063817f, 0.950470f, 0.625629f, 1.015924f, 3.479490f, -0.281999f; + yOutput += 0.f, 0.212673f, 0.715152f, 0.072175f, 0.069007f, 1.f, 0.322590f, 0.478708f, 2.495864f, -0.564874f; + zOutput += 0.f, 0.019334f, 0.119192f, 0.950304f, 0.135635f, 1.088830f, 0.029326f, 2.084876f, 4.984232f, -0.024894f; + + ASSERT_TRUE( static_cast(yOutput.size()) ); + ASSERT_EQ( zOutput.size(), xOutput.size() ); + ASSERT_EQ( xOutput.size(), yOutput.size() ); + ASSERT_EQ( yOutput.size(), blueInput.size() ); + ASSERT_EQ( redInput.size(), blueInput.size() ); + ASSERT_EQ( greenInput.size(), blueInput.size() ); + + pfs::Array2Df A2DRed(redInput.size(), 1); + pfs::Array2Df A2DGreen(greenInput.size(), 1); + pfs::Array2Df A2DBlue(blueInput.size(), 1); + + std::copy(redInput.begin(), redInput.end(), A2DRed.begin()); + std::copy(greenInput.begin(), greenInput.end(), A2DGreen.begin()); + std::copy(blueInput.begin(), blueInput.end(), A2DBlue.begin()); + + pfs::Array2Df A2DX(xOutput.size(), 1); + pfs::Array2Df A2DY(yOutput.size(), 1); + pfs::Array2Df A2DZ(zOutput.size(), 1); + + // function under unit test! + pfs::transformSRGB2XYZ(&A2DRed, &A2DGreen, &A2DBlue, &A2DX, &A2DY, &A2DZ); + + print(A2DX); + print(xOutput); + print(A2DY); + print(yOutput); + print(A2DZ); + print(zOutput); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(xOutput[idx], A2DX(idx), 10e-6); + EXPECT_NEAR(yOutput[idx], A2DY(idx), 10e-6); + EXPECT_NEAR(zOutput[idx], A2DZ(idx), 10e-6); + } +} + +TEST(TestSRGB2Y, TestSRGB2Y) +{ + ColorSpaceSamples redInput; + ColorSpaceSamples greenInput; + ColorSpaceSamples blueInput; + ColorSpaceSamples yOutput; + + redInput += 0.f, 1.f, 0.f, 0.f, 0.2f, 1.f, 1.2f, 1.2f, 2.f; + greenInput += 0.f, 0.f, 1.f, 0.f, 0.3f, 1.f, 0.f, 0.0f, 1.2f; + blueInput += 0.f, 0.f, 0.f, 1.f, 0.4f, 1.f, 0.f, 1.4f, 2.f; + yOutput += 0.f, 0.212673f, 0.715152f, 0.072175f, 0.069007f, 1.f, 0.322590f, 0.478708f, 2.495864; + + ASSERT_TRUE( static_cast(yOutput.size()) ); + ASSERT_EQ( yOutput.size(), blueInput.size() ); + ASSERT_EQ( redInput.size(), blueInput.size() ); + ASSERT_EQ( greenInput.size(), blueInput.size() ); + + pfs::Array2Df A2DRed(redInput.size(), 1); + pfs::Array2Df A2DGreen(greenInput.size(), 1); + pfs::Array2Df A2DBlue(blueInput.size(), 1); + pfs::Array2Df A2DY(yOutput.size(), 1); + + std::copy(redInput.begin(), redInput.end(), A2DRed.begin()); + std::copy(greenInput.begin(), greenInput.end(), A2DGreen.begin()); + std::copy(blueInput.begin(), blueInput.end(), A2DBlue.begin()); + + // function under unit test! + pfs::transformSRGB2Y(&A2DRed, &A2DGreen, &A2DBlue, + &A2DY); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(yOutput[idx], A2DY(idx), 10e-6); + } +} diff -Nru luminance-hdr-2.3.0/test/TestVex.cpp luminance-hdr-2.3.1/test/TestVex.cpp --- luminance-hdr-2.3.0/test/TestVex.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestVex.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,287 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include + +#include +#include +#include "arch/math.h" +#include +#include +#include +#include +#include + +#include +#include // for 'operator+=()' + +using namespace std; + +template +struct FillValue; + +template<> +struct FillValue +{ + float operator()() { return (static_cast(rand())/RAND_MAX)*2.f - 1.f; } +}; + +template<> +struct FillValue +{ + uint8_t operator()() { return (static_cast(rand())%255) + 1; } +}; + +template<> +struct FillValue +{ + uint16_t operator()() { return (static_cast(rand())%255) + 1; } +}; + +template<> +struct FillValue +{ + int32_t operator()() { + int32_t v = static_cast(rand())%256 - 128; + return (!v) ? 1 : v; + } +}; + +template +T getConst(); + +template<> +float getConst() { return static_cast(M_PI); } + +template<> +uint8_t getConst() { return 3u; } + +template<> +uint16_t getConst() { return 3u; } + +template<> +int32_t getConst() { return 5; } + +template +struct SmallSize +{ + typedef T value_type; + + static size_t elements() { return static_cast(1e6); } // 1Mp +}; + +template +struct MediumSize +{ + typedef T value_type; + + static size_t elements() { return static_cast(1e7); } // 10Mp +}; + +template +struct BigSize +{ + typedef T value_type; + + static size_t elements() { return static_cast(24e6); } // 24Mp +}; + +template +class TestVex : public testing::Test +{ +protected: + typedef typename T::value_type ValueType; + typedef std::vector< ValueType > TestVexContainer; + + + TestVexContainer input1; + TestVexContainer input2; + TestVexContainer outputReference; + TestVexContainer outputComputed; + ValueType s_; + + TestVex() + : input1( T::elements() ) + , input2( T::elements() ) + , outputReference( T::elements() ) + , outputComputed( T::elements() ) + , s_(getConst()) + { + std::generate(input1.begin(), input1.end(), FillValue()); + std::generate(input2.begin(), input2.end(), FillValue()); + std::fill(outputReference.begin(), outputReference.end(), ValueType()); + std::fill(outputComputed.begin(), outputComputed.end(), ValueType()); + } + + void compareResult() + { + for (size_t idx = 0; idx < this->outputComputed.size(); ++idx) + { + if ( this->outputComputed[idx] != this->outputReference[idx]) + { + EXPECT_NEAR(this->outputComputed[idx], + this->outputReference[idx], + 10e-9); + } + } + } + + void computeVmul() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + std::multiplies()); + } + + void computeVdiv() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + std::divides()); + } + + void computeVadd() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + std::plus()); + } + void computeVadds() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + vex::numeric::vadds(s_)); + } + + void computeVsub() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + std::minus()); + } + void computeVsubs() + { + std::transform(this->input1.begin(), + this->input1.end(), + this->input2.begin(), + this->outputReference.begin(), + vex::numeric::vsubs(s_)); + } + + void compareTime(double timeOld, double timeNew) + { + std::cout << "Speed up: " << timeOld/timeNew << std::endl; + } +}; + +using testing::Types; +// The list of types we want to test. +typedef testing::Types< + SmallSize, + SmallSize, + SmallSize, + SmallSize, + MediumSize, + MediumSize, + MediumSize, + MediumSize, + BigSize, + BigSize, + BigSize, + BigSize > Implementations; + +TYPED_TEST_CASE(TestVex, Implementations); + +TYPED_TEST(TestVex, vmul) +{ + vex::vmul(this->input1.data(), + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVmul(); + this->compareResult(); +} + +TYPED_TEST(TestVex, vdiv) +{ + vex::vdiv(this->input1.data(), + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVdiv(); + this->compareResult(); +} + +TYPED_TEST(TestVex, vadd) +{ + vex::vadd(this->input1.data(), + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVadd(); + this->compareResult(); +} +TYPED_TEST(TestVex, vadds) +{ + vex::vadds(this->input1.data(), + this->s_, + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVadds(); + this->compareResult(); +} + +TYPED_TEST(TestVex, vsub) +{ + vex::vsub(this->input1.data(), + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVsub(); + this->compareResult(); +} +TYPED_TEST(TestVex, vsubs) +{ + vex::vsubs(this->input1.data(), + this->s_, + this->input2.data(), + this->outputComputed.data(), + this->outputComputed.size()); + + this->computeVsubs(); + this->compareResult(); +} diff -Nru luminance-hdr-2.3.0/test/TestVexDotProduct.cpp luminance-hdr-2.3.1/test/TestVexDotProduct.cpp --- luminance-hdr-2.3.0/test/TestVexDotProduct.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestVexDotProduct.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * This file is a part of Luminance HDR package + * ---------------------------------------------------------------------- + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include +#include +#include +#include + +#include + +float myRand() +{ + return ( static_cast(rand())/(RAND_MAX) )*2000; +} + +TEST(TestVexDotProduct, SmallSize) +{ + std::vector inputVector(100); // 100 pixels + std::generate(inputVector.begin(), inputVector.end(), &myRand); + + float avg = std::inner_product(inputVector.begin(), inputVector.end(), + inputVector.begin(), 0.0f); + + float avgVex = vex::dotProduct(inputVector.data(), inputVector.size()); + + EXPECT_NEAR(avg, avgVex, 10e2); +} + +TEST(TestVexDotProduct, MediumSize) +{ + std::vector inputVector(1000000); // 1 mpixels + std::generate(inputVector.begin(), inputVector.end(), &myRand); + + float avg = std::inner_product(inputVector.begin(), inputVector.end(), + inputVector.begin(), 0.0f); + + float avgVex = vex::dotProduct(inputVector.data(), inputVector.size()); + + EXPECT_NEAR(avg, avgVex, 10e2); +} + +TEST(TestVexDotProduct, BigSize) +{ + std::vector inputVector(10000000); // 10 mpixels + std::generate(inputVector.begin(), inputVector.end(), &myRand); + + float avg = std::inner_product(inputVector.begin(), inputVector.end(), + inputVector.begin(), 0.0f); + + float avgVex = vex::dotProduct(inputVector.data(), inputVector.size()); + + EXPECT_NEAR(avg, avgVex, 10e2); +} + +TEST(TestVexDotProduct, HugeSize) +{ + std::vector inputVector(36000000); // 36 mpixels + std::generate(inputVector.begin(), inputVector.end(), &myRand); + + float avg = std::inner_product(inputVector.begin(), inputVector.end(), + inputVector.begin(), 0.0f); + + float avgVex = vex::dotProduct(inputVector.data(), inputVector.size()); + + EXPECT_NEAR(avg, avgVex, 10e2); +} diff -Nru luminance-hdr-2.3.0/test/TestXYZ2RGB.cpp luminance-hdr-2.3.1/test/TestXYZ2RGB.cpp --- luminance-hdr-2.3.0/test/TestXYZ2RGB.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/TestXYZ2RGB.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,135 @@ +/* + * 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 + * ---------------------------------------------------------------------- + */ + +#include +#include // for 'operator+=()' +#include + +#include +#include + +#include "PrintArray2D.h" + +typedef std::vector ColorSpaceSamples; + +using namespace std; +using namespace boost::assign; // bring 'operator+=()' into scope + +TEST(TestXYZ2RGB, TestXYZ2RGB) +{ + ColorSpaceSamples redOutput; + ColorSpaceSamples greenOutput; + ColorSpaceSamples blueOutput; + ColorSpaceSamples xInput; + ColorSpaceSamples yInput; + ColorSpaceSamples zInput; + + xInput += 0.f, 1.0f, 0.412456f, 0.357576f, 0.180437f, 0.261939f, 0.950470f, 0.494948f, 0.747560f, 1.614879f; + yInput += 0.f, 0.0f, 0.212673f, 0.715152f, 0.072175f, 0.285950f, 1.f, 0.255207f, 0.356252f, 1.427878f; + zInput += 0.f, 0.0f, 0.019334f, 0.119192f, 0.950304f, 0.419746f, 1.088830f, 0.023201f, 1.353626f, 2.082306f; + redOutput += 0.f, 3.240454f, 1.f, 0.f, 0.f, 0.2f, 1.f, 1.2f, 1.2f, 2.f; + greenOutput += 0.f, -0.969266f, 0.f, 1.f, 0.f, 0.3f, 1.f, 0.f, 0.0f, 1.2f; + blueOutput += 0.f, 0.055643f, 0.f, 0.f, 1.f, 0.4f, 1.f, 0.f, 1.4f, 2.f; + + ASSERT_EQ( zInput.size(), xInput.size() ); + ASSERT_EQ( xInput.size(), yInput.size() ); + ASSERT_EQ( yInput.size(), blueOutput.size() ); + ASSERT_EQ( redOutput.size(), blueOutput.size() ); + ASSERT_EQ( greenOutput.size(), blueOutput.size() ); + + pfs::Array2Df A2DX(xInput.size(), 1); + pfs::Array2Df A2DY(yInput.size(), 1); + pfs::Array2Df A2DZ(zInput.size(), 1); + + std::copy(xInput.begin(), xInput.end(), A2DX.begin()); + std::copy(yInput.begin(), yInput.end(), A2DY.begin()); + std::copy(zInput.begin(), zInput.end(), A2DZ.begin()); + + pfs::Array2Df A2DRed(redOutput.size(), 1); + pfs::Array2Df A2DGreen(greenOutput.size(), 1); + pfs::Array2Df A2DBlue(blueOutput.size(), 1); + + // function under unit test! + pfs::transformXYZ2RGB(&A2DX, &A2DY, &A2DZ, &A2DRed, &A2DGreen, &A2DBlue); + +// print(A2DX); +// print(A2DY); +// print(A2DZ); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(redOutput[idx], A2DRed(idx), 10e-6); + EXPECT_NEAR(greenOutput[idx], A2DGreen(idx), 10e-6); + EXPECT_NEAR(blueOutput[idx], A2DBlue(idx), 10e-6); + } +} + +TEST(TestXYZ2SRGB, TestXYZ2SRGB) +{ + ColorSpaceSamples redOutput; + ColorSpaceSamples greenOutput; + ColorSpaceSamples blueOutput; + ColorSpaceSamples xInput; + ColorSpaceSamples yInput; + ColorSpaceSamples zInput; + + xInput += 0.f, 1.0f, 0.412456f, 0.357576f, 0.180437f, 0.261939f, 0.950470f, 0.494948f, 0.747560f, 1.614879f; + yInput += 0.f, 0.0f, 0.212673f, 0.715152f, 0.072175f, 0.285950f, 1.f, 0.255207f, 0.356252f, 1.427878f; + zInput += 0.f, 0.0f, 0.019334f, 0.119192f, 0.950304f, 0.419746f, 1.088830f, 0.023201f, 1.353626f, 2.082306f; + redOutput += 0.f, 1.666888f, 0.999999f, 0.f, -0.000020f, 0.484529f, 1.f, 1.083269f, 1.083268f, 1.353256f; + greenOutput += 0.f, -0.986367f, 0.000009f, 1.f, 0.000006f, 0.583831f, 1.f, -0.000013f, -0.000008f, 1.083268f; + blueOutput += 0.f, 0.261598f, 0.000001f, 0.f, 1.f, 0.665185f, 1.f, 0.000006f, 1.158778f, 1.353256f; + + ASSERT_EQ( zInput.size(), xInput.size() ); + ASSERT_EQ( xInput.size(), yInput.size() ); + ASSERT_EQ( yInput.size(), blueOutput.size() ); + ASSERT_EQ( redOutput.size(), blueOutput.size() ); + ASSERT_EQ( greenOutput.size(), blueOutput.size() ); + + pfs::Array2Df A2DX(xInput.size(), 1); + pfs::Array2Df A2DY(yInput.size(), 1); + pfs::Array2Df A2DZ(zInput.size(), 1); + + std::copy(xInput.begin(), xInput.end(), A2DX.begin()); + std::copy(yInput.begin(), yInput.end(), A2DY.begin()); + std::copy(zInput.begin(), zInput.end(), A2DZ.begin()); + + pfs::Array2Df A2DRed(redOutput.size(), 1); + pfs::Array2Df A2DGreen(greenOutput.size(), 1); + pfs::Array2Df A2DBlue(blueOutput.size(), 1); + + // function under unit test! + pfs::transformXYZ2SRGB(&A2DX, &A2DY, &A2DZ, &A2DRed, &A2DGreen, &A2DBlue); + + print(A2DRed); + print(redOutput); + print(A2DGreen); + print(greenOutput); + print(A2DBlue); + print(blueOutput); + + for (size_t idx = 0; idx < A2DY.size(); ++idx) + { + EXPECT_NEAR(redOutput[idx], A2DRed(idx), 10e-2); + EXPECT_NEAR(greenOutput[idx], A2DGreen(idx), 10e-2); + EXPECT_NEAR(blueOutput[idx], A2DBlue(idx), 10e-2); + } +} diff -Nru luminance-hdr-2.3.0/test/mantiuk06/contrast_domain.cpp luminance-hdr-2.3.1/test/mantiuk06/contrast_domain.cpp --- luminance-hdr-2.3.0/test/mantiuk06/contrast_domain.cpp 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/mantiuk06/contrast_domain.cpp 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,1205 @@ +/** + * @Brief Contrast mapping TMO + * + * From: + * + * Rafal Mantiuk, Karol Myszkowski, Hans-Peter Seidel. + * A Perceptual Framework for Contrast Processing of High Dynamic Range Images + * In: ACM Transactions on Applied Perception 3 (3), pp. 286-308, 2006 + * http://www.mpi-inf.mpg.de/~mantiuk/contrast_domain/ + * + * This file is a part of LuminanceHDR package, based on pfstmo. + * ---------------------------------------------------------------------- + * Copyright (C) 2007 Grzegorz Krawczyk + * + * 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 Radoslaw Mantiuk, + * @author Rafal Mantiuk, + * Updated 2007/12/17 by Ed Brambley + * (more information on the changes: + * http://www.damtp.cam.ac.uk/user/ejb48/hdr/index.html) + * Updated 2008/06/25 by Ed Brambley + * bug fixes and openMP patches + * more on this: + * http://groups.google.com/group/pfstools/browse_thread/thread/de2378af98ec6185/0dee5304fc14e99d?hl=en#0dee5304fc14e99d + * Optimization improvements by Lebed Dmytry + * + * Updated 2008/07/26 by Dejan Beric + * Added the detail factor slider which offers more control over contrast in details + * Update 2010/10/06 by Axel Voitier + * detail_factor patch in order to remove potential issues in a multithreading environment + * @author Davide Anastasia + * Improvement & Clean up + * @author Bruce Guenter + * Added trivial downsample and upsample functions when both dimension are even + * + * $Id: contrast_domain.cpp,v 1.14 2008/08/26 17:08:49 rafm Exp $ + */ + +#include +#include +#include +#include +#include +#include + +#include "contrast_domain.h" +#include "arch/malloc.h" +#include "arch/math.h" +#include "TonemappingOperators/pfstmo.h" + +#include "Libpfs/vex/sse.h" +#include "Libpfs/vex/vex.h" +#include "Libpfs/vex/dotproduct.h" +#include "Libpfs/utils/msec_timer.h" + +namespace test_mantiuk06 +{ + +#define PYRAMID_MIN_PIXELS 3 +#define LOOKUP_W_TO_R 107 +//#define DEBUG_MANTIUK06 + +void swap_pointers(float* &pOne, float* &pTwo); // utility function + +#ifdef DEBUG_MANTIUK06 + +void dump_matrix_to_file(const int width, const int height, const float* const m, const char * const file_name); +void matrix_show(const char* const text, int rows, int cols, const float* const data); +void pyramid_show(pyramid_t* pyramid); + +#endif + +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}; + + int imin(int a, int b) +{ + return a < b ? a : b; +} + +// upsample the matrix +// upsampled matrix is twice bigger in each direction than data[] +// res should be a pointer to allocated memory for bigger matrix +// cols and rows are the dimensions of the output matrix +void matrix_upsample_full(const int outCols, const int outRows, const float* const in, float* const out) +{ + const int inRows = outRows/2; + const int inCols = outCols/2; + + // Transpose of experimental downsampling matrix (theoretically the correct thing to do) + + const float dx = (float)inCols / ((float)outCols); + const float dy = (float)inRows / ((float)outRows); + const float factor = 1.0f / (dx*dy); // This gives a genuine upsampling matrix, not the transpose of the downsampling matrix + // const float factor = 1.0f; // Theoretically, this should be the best. + + for (int y = 0; y < outRows; y++) + { + const float sy = y * dy; + const int iy1 = ( y * inRows) / outRows; + const int iy2 = imin(((y+1) * inRows) / outRows, inRows-1); + + for (int x = 0; x < outCols; x++) + { + const float sx = x * dx; + const int ix1 = ( x * inCols) / outCols; + const int ix2 = imin(((x+1) * inCols) / outCols, inCols-1); + + out[x + y*outCols] = (((ix1+1) - sx)*((iy1+1 - sy)) * in[ix1 + iy1*inCols] + + ((ix1+1) - sx)*(sy+dy - (iy1+1)) * in[ix1 + iy2*inCols] + + (sx+dx - (ix1+1))*((iy1+1 - sy)) * in[ix2 + iy1*inCols] + + (sx+dx - (ix1+1))*(sy+dx - (iy1+1)) * in[ix2 + iy2*inCols])*factor; + } + } +} + +void matrix_upsample_simple(const int outCols, const int outRows, const float* const in, float* const out) +{ + for (int y = 0; y < outRows; y++) + { + const int iy1 = y / 2; + float* outp = out + y*outCols; + const float* inp = in + iy1*(outCols/2); + for (int x = 0; x < outCols; x+=2) + { + const int ix1 = x / 2; + outp[x] = outp[x+1] = inp[ix1]; + } + } +} + +void matrix_upsample(const int outCols, const int outRows, const float* const in, float* const out) +{ + if (outRows%2 == 0 && outCols%2 == 0) + matrix_upsample_simple(outCols, outRows, in, out); + else + matrix_upsample_full(outCols, outRows, in, out); +} + +// downsample the matrix +void matrix_downsample_full(const int inCols, const int inRows, const float* const data, float* const res) +{ + const int outRows = inRows / 2; + const int outCols = inCols / 2; + + const float dx = (float)inCols / ((float)outCols); + const float dy = (float)inRows / ((float)outRows); + + // 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. + + const float normalize = 1.0f/(dx*dy); + for (int y = 0; y < outRows; y++) + { + const int iy1 = ( y * inRows) / outRows; + const int iy2 = ((y+1) * inRows) / outRows; + const float fy1 = (iy1+1) - y * dy; + const float fy2 = (y+1) * dy - iy2; + + for (int x = 0; x < outCols; x++) + { + const int ix1 = ( x * inCols) / outCols; + const int 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 (int i = iy1; i <= iy2 && i < inRows; i++) + { + if (i == iy1) + 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 + else + factory = 1.0f; // We've got the full height of this pixel + for (int j = ix1; j <= ix2 && j < inCols; j++) + { + if (j == ix1) + 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 + else + factorx = 1.0f; // We've got the full width of this pixel + + pixVal += data[j + i*inCols] * factorx * factory; + } + } + + res[x + y * outCols] = pixVal * normalize; // Normalize by the area of the new pixel + } + } +} + +void matrix_downsample_simple(const int inCols, const int inRows, const float* const data, float* const res) +{ + const int outRows = inRows / 2; + const int 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. + + for (int y = 0; y < outRows; y++) + { + const int iy1 = y * 2; + const float* datap = data + iy1 * inCols; + float* resp = res + y * outCols; + + for (int x = 0; x < outCols; x++) + { + const int ix1 = x*2; + + resp[x] = ( datap[ix1] + + datap[ix1+1] + + datap[ix1 + inCols] + + datap[ix1+1 + inCols]) / 4.0f; + } + } +} + +void matrix_downsample(const int inCols, const int inRows, const float* const data, float* const res) +{ + if (inCols % 2 == 0 && inRows % 2 == 0) + matrix_downsample_simple(inCols, inRows, data, res); + else + matrix_downsample_full(inCols, inRows, data, res); +} + +// return = a - b + void matrix_subtract(const int n, const float* const a, float* const b) +{ + vex::vsub(a, b, b, n); +} + +// copy matix a to b, return = a + void matrix_copy(const int n, const float* const a, float* const b) +{ + std::copy(a, a + n, b); +} + +// multiply matrix a by scalar val +void matrix_multiply_const(const int n, float* const a, const float val) +{ + vex::vsmul(a, val, a, n); +} + +// alloc memory for the float table + float* matrix_alloc(int size) +{ +#ifdef __APPLE__ + float* m = (float*)malloc (sizeof(float)*size); +#else + float* m = (float*)_mm_malloc (sizeof(float)*size, 32); +#endif + if (m == NULL) + { + fprintf(stderr, "ERROR: malloc in matrix_alloc() (size:%d)", size); + exit(155); + } + return m; +} + +// free memory for matrix + void matrix_free(float* m) +{ + if (m != NULL) + { +#ifdef __APPLE__ + free(m); +#else + _mm_free(m); +#endif + m = NULL; + } + else + { + fprintf(stderr, "ERROR: This pointer has already been freed"); + } +} + +// multiply vector by vector (each vector should have one dimension equal to 1) +float matrix_DotProduct(const int n, const float* const a, const float* const b) +{ + return vex::dotProduct(a, b, n); +} + +// set zeros for matrix elements + void matrix_zero(int n, float* m) +{ + //bzero(m, n*sizeof(float)); + memset(m, 0, n*sizeof(float)); +} + +// Davide Anastasia (2010 08 31) +// calculate divergence of two gradient maps (Gx and Gy) +// divG(x,y) = Gx(x,y) - Gx(x-1,y) + Gy(x,y) - Gy(x,y-1) +void calculate_and_add_divergence(const int COLS, const int ROWS, const float* const Gx, const float* const Gy, float* const divG) +{ + float divGx, divGy; + { + { + // kx = 0 AND ky = 0; + divG[0] += Gx[0] + Gy[0]; // OUT + + // ky = 0 + for (int kx=1; kx 0 + for(int kx=1; kxrows*pyramid->cols)/4); + + // Find the coarsest pyramid, and the number of pyramid levels + bool swap = true; + while (pyramid->next != NULL) + { + swap = (!swap); + pyramid = pyramid->next; + } + + // For every level, we swap temp and divG_sum + // So, if there are an odd number of levels... + if (swap) swap_pointers(divG_sum, temp); + + if (pyramid) + { + matrix_zero(pyramid->rows * pyramid->cols, temp); + calculate_and_add_divergence(pyramid->cols, pyramid->rows, pyramid->Gx, pyramid->Gy, temp); + + swap_pointers(divG_sum, temp); + pyramid = pyramid->prev; + } + + while (pyramid) + { + matrix_upsample(pyramid->cols, pyramid->rows, divG_sum, temp); + calculate_and_add_divergence(pyramid->cols, pyramid->rows, pyramid->Gx, pyramid->Gy, temp); + + swap_pointers(divG_sum, temp); + pyramid = pyramid->prev; + } + + matrix_free(temp); +} + +// calculate scale factors (Cx,Cy) for gradients (Gx,Gy) +// C is equal to EDGE_WEIGHT for gradients smaller than GFIXATE or 1.0 otherwise + void calculate_scale_factor(const int n, const float* const G, float* const C) +{ + // float GFIXATE = 0.1f; + // float EDGE_WEIGHT = 0.01f; + const float detectT = 0.001f; + const float a = 0.038737f; + const float b = 0.537756f; + + for(int i=0; irows * pyramid->cols, pyramid->Gx, pC->Gx); + calculate_scale_factor(pyramid->rows * pyramid->cols, pyramid->Gy, pC->Gy); + + pyramid = pyramid->next; + pC = pC->next; + } +} + +// Scale gradient (Gx and Gy) by C (Cx and Cy) +// G = G * C + void scale_gradient(const int n, float* G, const float* C) +{ + vex::vmul(G, C, G, n); // VEX_vmul(G, C, G, n); +} + +// scale gradients for the whole one pyramid with the use of (Cx,Cy) from the other pyramid +void pyramid_scale_gradient(pyramid_t* pyramid, const pyramid_t* pC) +{ + while (pyramid != NULL) + { + scale_gradient(pyramid->rows * pyramid->cols, pyramid->Gx, pC->Gx); + scale_gradient(pyramid->rows * pyramid->cols, pyramid->Gy, pC->Gy); + + pyramid = pyramid->next; + pC = pC->next; + } +} + + +// free memory allocated for the pyramid +void pyramid_free(pyramid_t* pyramid) +{ + pyramid_t* t_next; // = pyramid->next; + + while (pyramid) + { + t_next = pyramid->next; + + if (pyramid->Gx != NULL) + { + matrix_free(pyramid->Gx); //free(pyramid->Gx); + pyramid->Gx = NULL; + } + if (pyramid->Gy != NULL) + { + matrix_free(pyramid->Gy); //free(pyramid->Gy); + pyramid->Gy = NULL; + } + + //pyramid->prev = NULL; + //pyramid->next = NULL; + + free(pyramid); + pyramid = t_next; + } +} + + +// allocate memory for the pyramid +pyramid_t * pyramid_allocate(int cols, int rows) +{ + pyramid_t* level = NULL; + pyramid_t* pyramid = NULL; + pyramid_t* prev = NULL; + + while (rows >= PYRAMID_MIN_PIXELS && cols >= PYRAMID_MIN_PIXELS) + { + assert(rows != 0); + assert(cols != 0); + + level = (pyramid_t *) malloc(sizeof(pyramid_t)); + if (level == NULL) + { + fprintf(stderr, "ERROR: malloc in pyramid_alloc() (size:%zu)", sizeof(pyramid_t) ); + exit(155); + } + memset( level, 0, sizeof(pyramid_t) ); + + level->rows = rows; + level->cols = cols; + const int size = level->rows * level->cols; + + assert(size != 0); + + level->Gx = matrix_alloc(size); + if (level->Gx == NULL) + { + fprintf(stderr, "ERROR: malloc in pyramid_alloc() (size:%zu)", sizeof(pyramid_t) ); + exit(155); + } + level->Gy = matrix_alloc(size); + if (level->Gy == NULL) + { + fprintf(stderr, "ERROR: malloc in pyramid_alloc() (size:%zu)", sizeof(pyramid_t) ); + exit(155); + } + + level->prev = prev; + if (prev != NULL) + prev->next = level; + prev = level; + + if (pyramid == NULL) + pyramid = level; + + rows /= 2; + cols /= 2; + } + + return pyramid; +} + + +// calculate gradients + void calculate_gradient(const int COLS, const int ROWS, const float* const lum, float* const Gx, float* const Gy) +{ + int Y_IDX, IDX; + + for (int ky = 0; ky < ROWS-1; ky++) + { + Y_IDX = ky*COLS; + for (int kx = 0; kx < COLS-1; kx++) + { + IDX = Y_IDX + kx; + + Gx[IDX] = lum[IDX + 1] - lum[IDX]; + Gy[IDX] = lum[IDX + COLS] - lum[IDX]; + } + + Gx[Y_IDX + COLS - 1] = 0.0f; // last columns (kx = COLS - 1) + Gy[Y_IDX + COLS - 1] = lum[Y_IDX + COLS - 1 + COLS] - lum[Y_IDX + COLS - 1]; + } + + // last row (ky = ROWS-1) + for (int kx = 0; kx < (COLS-1); kx++) + { + IDX = (ROWS - 1)*COLS + kx; + + Gx[IDX] = lum[IDX + 1] - lum[IDX]; + Gy[IDX] = 0.0f; + } + + // last row & last col = last element + Gx[ROWS*COLS - 1] = 0.0f; + Gy[ROWS*COLS - 1] = 0.0f; +} + +void swap_pointers(float* &pOne, float* &pTwo) +{ + float* pTemp = pOne; + pOne = pTwo; + pTwo = pTemp; +} + +// calculate gradients for the pyramid +// lum_temp WILL NOT BE overwritten! +void pyramid_calculate_gradient(pyramid_t* pyramid, const float* Y) +{ + float* buffer1 = matrix_alloc((pyramid->rows*pyramid->cols)/4); // /4 + float* buffer2 = matrix_alloc((pyramid->rows*pyramid->cols)/16); // /16 + + float* p_t1 = buffer1; + float* p_t2 = buffer2; + + calculate_gradient(pyramid->cols, pyramid->rows, Y, pyramid->Gx, pyramid->Gy); + + pyramid_t* py_curr = pyramid->next; + pyramid_t* py_prev = py_curr->prev; + + if (py_curr) + { + matrix_downsample(py_prev->cols, py_prev->rows, Y, p_t1); + calculate_gradient(py_curr->cols, py_curr->rows, p_t1, py_curr->Gx, py_curr->Gy); + + py_prev = py_curr; + py_curr = py_curr->next; + } + + while (py_curr) + { + matrix_downsample(py_prev->cols, py_prev->rows, p_t1, p_t2); + calculate_gradient(py_curr->cols, py_curr->rows, p_t2, py_curr->Gx, py_curr->Gy); + + // swap pointers + swap_pointers(p_t1, p_t2); + + py_prev = py_curr; + py_curr = py_curr->next; + } + + matrix_free(buffer1); + matrix_free(buffer2); +} + +// divG_sum = A * x = sum(divG(x)) +void multiplyA(pyramid_t* px, pyramid_t* pC, const float* x, float* divG_sum) +{ + pyramid_calculate_gradient(px, x); // x won't be changed + pyramid_scale_gradient(px, pC); // scale gradients by Cx,Cy from main pyramid + pyramid_calculate_divergence_sum(px, divG_sum); // calculate the sum of divergences +} + + +// conjugate linear equation solver +// overwrites pyramid! +// This version is a slightly modified version by Davide Anastasia +// March 25, 2011 +void lincg(pyramid_t* pyramid, pyramid_t* pC, const float* const b, float* const x, const int itmax, const float tol, ProgressHelper *ph) +{ + const int num_backwards_ceiling = 3; + + float rdotr_curr, rdotr_prev, rdotr_best; + float alpha, beta; + +#ifdef TIMER_PROFILING + msec_timer f_timer; + f_timer.start(); +#endif + + const int rows = pyramid->rows; + const int cols = pyramid->cols; + const int n = rows*cols; + const float tol2 = tol*tol; + + float* const x_best = matrix_alloc(n); + float* const r = matrix_alloc(n); + float* const p = matrix_alloc(n); + float* const Ap = matrix_alloc(n); + + // bnrm2 = ||b|| + const float bnrm2 = matrix_DotProduct(n, b, b); + + // r = b - Ax + multiplyA(pyramid, pC, x, r); // r = A x + matrix_subtract(n, b, r); // r = b - r + + // rdotr = r.r + rdotr_best = rdotr_curr = matrix_DotProduct(n, r, r); + + // Setup initial vector + matrix_copy(n, r, p); // p = r + matrix_copy(n, x, x_best); + + const float irdotr = rdotr_curr; + const float percent_sf = 100.0f/logf(tol2*bnrm2/irdotr); + + int iter = 0; + int num_backwards = 0; + for (; iter < itmax; iter++) + { + // TEST + ph->setValue( (int) (logf(rdotr_curr/irdotr)*percent_sf)); + // User requested abort + if (ph->canceled() && iter > 0 ) + { + break; + } + + // Ap = A p + multiplyA(pyramid, pC, p, Ap); + + // alpha = r.r / (p . Ap) + alpha = rdotr_curr / matrix_DotProduct(n, p, Ap); + + // r = r - alpha Ap + for (int i = 0; i < n; i++) + { + r[i] -= alpha * Ap[i]; + } + + // rdotr = r.r + rdotr_prev = rdotr_curr; + rdotr_curr = matrix_DotProduct(n, r, r); + + // Have we gone unstable? + if (rdotr_curr > rdotr_prev) + { + // Save where we've got to + if (num_backwards == 0 && rdotr_prev < rdotr_best) + { + rdotr_best = rdotr_prev; + matrix_copy(n, x, x_best); + } + + num_backwards++; + } + else + { + num_backwards = 0; + } + + // x = x + alpha * p + for (int i = 0; i < n; i++) + { + x[i] += alpha * p[i]; + } + + // Exit if we're done + // fprintf(stderr, "iter:%d err:%f\n", iter+1, sqrtf(rdotr/bnrm2)); + if (rdotr_curr/bnrm2 < tol2) + break; + + if (num_backwards > num_backwards_ceiling) + { + // Reset + num_backwards = 0; + matrix_copy(n, x_best, x); + + // r = Ax + multiplyA(pyramid, pC, x, r); + + // r = b - r + matrix_subtract(n, b, r); + + // rdotr = r.r + rdotr_best = rdotr_curr = matrix_DotProduct(n, r, r); + + // p = r + matrix_copy(n, r, p); + } + else + { + // p = r + beta p + beta = rdotr_curr/rdotr_prev; + + for (int i = 0; i < n; i++) + { + p[i] = r[i] + beta*p[i]; + } + } + } + + // Use the best version we found + if (rdotr_curr > rdotr_best) + { + rdotr_curr = rdotr_best; + matrix_copy(n, x_best, x); + } + + if (rdotr_curr/bnrm2 > tol2) + { + // Not converged + ph->setValue( (int) (logf(rdotr_curr/irdotr)*percent_sf)); + if (iter == itmax) + { + fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (hit maximum iterations), error = %g (should be below %g).\n", sqrtf(rdotr_curr/bnrm2), tol); + } + else + { + fprintf(stderr, "\npfstmo_mantiuk06: Warning: Not converged (going unstable), error = %g (should be below %g).\n", sqrtf(rdotr_curr/bnrm2), tol); + } + } + else + { + ph->setValue( itmax ); + } + + matrix_free(x_best); + matrix_free(p); + matrix_free(Ap); + matrix_free(r); + +#ifdef TIMER_PROFILING + f_timer.stop_and_update(); + std::cout << "lincg() = " << f_timer.get_time() << " msec" << std::endl; +#endif +} + +// in_tab and out_tab should contain inccreasing float values + float lookup_table(const int n, const float* const in_tab, const float* const out_tab, const float val) +{ + if (unlikely(val < in_tab[0])) + return out_tab[0]; + + for (int 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 (Gx,Gy) to R + void transform_to_R(const int n, float* const G, float detail_factor) +{ + const float log10=2.3025850929940456840179914546844*detail_factor; + + for (int j=0; jrows * pyramid->cols, pyramid->Gx, detail_factor); + transform_to_R(pyramid->rows * pyramid->cols, pyramid->Gy, detail_factor); + + pyramid = pyramid->next; + } +} + + + +// transform from R to G for the pyramid +void pyramid_transform_to_G(pyramid_t* pyramid, float detail_factor) +{ + while (pyramid != NULL) + { + transform_to_G(pyramid->rows*pyramid->cols, pyramid->Gx, detail_factor); + transform_to_G(pyramid->rows*pyramid->cols, pyramid->Gy, detail_factor); + + pyramid = pyramid->next; + } +} + +// multiply gradient (Gx,Gy) values by float scalar value for the whole pyramid +void pyramid_gradient_multiply(pyramid_t* pyramid, const float val) +{ + while (pyramid != NULL) + { + matrix_multiply_const(pyramid->rows*pyramid->cols, pyramid->Gx, val); + matrix_multiply_const(pyramid->rows*pyramid->cols, pyramid->Gy, val); + + pyramid = pyramid->next; + } +} + + +int sort_float(const void* const v1, const void* const v2) +{ + if (*((float*)v1) < *((float*)v2)) + return -1; + + if(likely(*((float*)v1) > *((float*)v2))) + return 1; + + return 0; +} + + +// transform gradients to luminance +void transform_to_luminance(pyramid_t* pp, float* x, ProgressHelper *ph, const int itmax, const float tol) +{ + pyramid_t* pC = pyramid_allocate(pp->cols, pp->rows); + pyramid_calculate_scale_factor(pp, pC); // calculate (Cx,Cy) + pyramid_scale_gradient(pp, pC); // scale small gradients by (Cx,Cy); + + float* b = matrix_alloc(pp->cols * pp->rows); + pyramid_calculate_divergence_sum(pp, b); // calculate the sum of divergences (equal to b) + + // calculate luminances from gradients + lincg(pp, pC, b, x, itmax, tol, ph); + + matrix_free(b); + pyramid_free(pC); +} + + +struct hist_data +{ + float size; + float cdf; + int index; +}; + +int hist_data_order(const void* const v1, const void* const v2) +{ + if (((struct hist_data*) v1)->size < ((struct hist_data*) v2)->size) + return -1; + + if (((struct hist_data*) v1)->size > ((struct hist_data*) v2)->size) + return 1; + + return 0; +} + + +int hist_data_index(const void* const v1, const void* const v2) +{ + return ((struct hist_data*) v1)->index - ((struct hist_data*) v2)->index; +} + + +void contrast_equalization(pyramid_t *pp, const float contrastFactor) +{ + // Count sizes + int total_pixels = 0; + pyramid_t* l = pp; + while (l != NULL) + { + total_pixels += l->rows * l->cols; + l = l->next; + } + + // Allocate memory + struct hist_data* hist = (struct hist_data*) malloc(sizeof(struct hist_data) * total_pixels); + if (hist == NULL) + { + fprintf(stderr, "ERROR: malloc in contrast_equalization() (size:%zu)", sizeof(struct hist_data) * total_pixels); + exit(155); + } + + // Build histogram info + l = pp; + int index = 0; + while ( l != NULL ) + { + const int pixels = l->rows*l->cols; + const int offset = index; + for(int c = 0; c < pixels; c++) + { + hist[c+offset].size = sqrtf( l->Gx[c]*l->Gx[c] + l->Gy[c]*l->Gy[c] ); + hist[c+offset].index = c + offset; + } + index += pixels; + l = l->next; + } + + // Generate histogram + qsort(hist, total_pixels, sizeof(struct hist_data), hist_data_order); + assert( hist[0].size < hist[total_pixels-1].size ); + + // Calculate cdf + const float norm = 1.0f / (float) total_pixels; + for (int i = 0; i < total_pixels; i++) + { + hist[i].cdf = ((float) i) * norm; + } + + // Recalculate in terms of indexes + qsort(hist, total_pixels, sizeof(struct hist_data), hist_data_index); + assert( hist[0].index < hist[total_pixels-1].index ); + assert( hist[0].index == 0 ); + + + //Remap gradient magnitudes + l = pp; + index = 0; + while ( l != NULL ) + { + const int pixels = l->rows*l->cols; + const int offset = index; + + for( int c = 0; c < pixels; c++) + { + const float scale = contrastFactor * hist[c+offset].cdf/hist[c+offset].size; + l->Gx[c] *= scale; + l->Gy[c] *= scale; + } + index += pixels; + l = l->next; + } + + free(hist); +} + + +// tone mapping +int tmo_mantiuk06_contmap(const int c, const int r, float* const R, float* const G, float* const B, float* const Y, const float contrastFactor, const float saturationFactor, float detailfactor, const int itmax, const float tol, ProgressHelper *ph) +{ + const int n = c*r; + + /* Normalize */ + float Ymax = Y[0]; + for (int j = 1; j < n; j++) + if (Y[j] > Ymax) + Ymax = Y[j]; + + const float clip_min = 1e-7f*Ymax; + + //TODO: use VEX, if you can + for (int j = 0; j < n; j++) + { + if ( unlikely(R[j] < clip_min) ) R[j] = clip_min; + if ( unlikely(G[j] < clip_min) ) G[j] = clip_min; + if ( unlikely(B[j] < clip_min) ) B[j] = clip_min; + if ( unlikely(Y[j] < clip_min) ) Y[j] = clip_min; + } + + for(int j=0;j 0.0f) + { + pyramid_gradient_multiply(pp, contrastFactor); // Contrast mapping + } + else + { + contrast_equalization(pp, -contrastFactor); // Contrast equalization + } + + pyramid_transform_to_G(pp, detailfactor); // transform R to gradients + transform_to_luminance(pp, Y, ph, itmax, tol); // transform gradients to luminance Y + pyramid_free(pp); + + /* Renormalize luminance */ + float* temp = matrix_alloc(n); + + matrix_copy(n, Y, temp); // copy Y to temp + qsort(temp, n, sizeof(float), sort_float); // sort temp in ascending order + + // const float median = (temp[(int)((n-1)/2)] + temp[(int)((n-1)/2+1)]) * 0.5f; // calculate median + const float CUT_MARGIN = 0.1f; + + float trim = (n-1) * CUT_MARGIN * 0.01f; + float delta = trim - floorf(trim); + const float l_min = temp[(int)floorf(trim)] * delta + temp[(int)ceilf(trim)] * (1.0f-delta); + + trim = (n-1) * (100.0f - CUT_MARGIN) * 0.01f; + delta = trim - floorf(trim); + const float l_max = temp[(int)floorf(trim)] * delta + temp[(int)ceilf(trim)] * (1.0f-delta); + + matrix_free(temp); + + const float disp_dyn_range = 2.3f; + + for(int j=0; j 8) + rows = 8; + if(cols > 8) + cols = 8; + + printf("\n%s\n", text); + for(int ky=0; kynext != NULL) + { + pyramid = pyramid->next; + } + + while (pyramid != NULL) + { + printf("\n----- pyramid_t level %d,%d\n", pyramid->cols, pyramid->rows); + + sprintf(ss, "Gx %p ", pyramid->Gx); + if (pyramid->Gx != NULL) + { + matrix_show(ss,pyramid->cols, pyramid->rows, pyramid->Gx); + } + sprintf(ss, "Gy %p ", pyramid->Gy); + if (pyramid->Gy != NULL) + { + matrix_show(ss,pyramid->cols, pyramid->rows, pyramid->Gy); + } + + pyramid = pyramid->prev; + } +} + +#endif + +} // namespace test_mantiuk06 diff -Nru luminance-hdr-2.3.0/test/mantiuk06/contrast_domain.h luminance-hdr-2.3.1/test/mantiuk06/contrast_domain.h --- luminance-hdr-2.3.0/test/mantiuk06/contrast_domain.h 1970-01-01 00:00:00.000000000 +0000 +++ luminance-hdr-2.3.1/test/mantiuk06/contrast_domain.h 2013-04-07 18:41:14.000000000 +0000 @@ -0,0 +1,110 @@ +/** + * @brief Contrast mapping TMO + * + * From: + * + * Rafal Mantiuk, Karol Myszkowski, Hans-Peter Seidel. + * A Perceptual Framework for Contrast Processing of High Dynamic Range Images + * In: ACM Transactions on Applied Perception 3 (3), pp. 286-308, 2006 + * http://www.mpi-inf.mpg.de/~mantiuk/contrast_domain/ + * + * This file is a part of LuminanceHDR package, based on pfstmo. + * ---------------------------------------------------------------------- + * Copyright (C) 2007 Grzegorz Krawczyk + * + * 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 Radoslaw Mantiuk, + * @author Rafal Mantiuk, + * Updated 2007/12/17 by Ed Brambley + * + * $Id: contrast_domain.h,v 1.7 2008/06/16 22:17:47 rafm Exp $ + */ +#ifndef CONTRAST_DOMAIN_H +#define CONTRAST_DOMAIN_H + +#include "TonemappingOperators/pfstmo.h" +#include "Common/ProgressHelper.h" + +namespace test_mantiuk06 +{ +typedef struct pyramid_s { + int rows; + int cols; + float* Gx; + float* Gy; + struct pyramid_s* next; + struct pyramid_s* prev; +} pyramid_t; + +void contrast_equalization(pyramid_t *pp, const float contrastFactor); + +void transform_to_luminance(pyramid_t* pyramid, float* x, ProgressHelper *ph); +void matrix_subtract(const int n, const float* const a, float* const b); +void matrix_copy(const int n, const float* const a, float* const b); +void matrix_multiply_const(const int n, float* const a, const float val); +float* matrix_alloc(const int size); +void matrix_free(float* m); +float matrix_DotProduct(const int n, const float* const a, const float* const b); +void matrix_zero(const int n, float* const m); +void calculate_and_add_divergence(const int rows, const int cols, const float* const Gx, const float* const Gy, float* const divG); +void pyramid_calculate_divergence(pyramid_t* pyramid); +void pyramid_calculate_divergence_sum(pyramid_t* pyramid, float* divG_sum); +void calculate_scale_factor(const int n, const float* const G, float* const C); +void pyramid_calculate_scale_factor(const pyramid_t* pyramid, pyramid_t* pC); +void scale_gradient(const int n, float* G, const float* C); +void pyramid_scale_gradient(pyramid_t* pyramid, const pyramid_t* pC); +void pyramid_free(pyramid_t* pyramid); +pyramid_t* pyramid_allocate(const int cols, const int rows); +void calculate_gradient(const int cols, const int rows, const float* const lum, float* const Gx, float* const Gy); +void pyramid_calculate_gradient(pyramid_t* pyramid, const float* lum); +void solveX(const int n, const float* const b, float* const x); +void multiplyA(pyramid_t* px, pyramid_t* pyramid, const float* x, float* divG_sum); +void lincg(pyramid_t* pyramid, pyramid_t* pC, const float* const b, float* const x, const int itmax, const float tol, ProgressHelper *ph); +float lookup_table(const int n, const float* const in_tab, const float* const out_tab, const float val); +void transform_to_R(const int n, float* const G, float detail_factor); +void pyramid_transform_to_R(pyramid_t* pyramid, float detail_factor); +void transform_to_G(const int n, float* const R, float detail_factor); +void pyramid_transform_to_G(pyramid_t* pyramid, float detail_factor); +void pyramid_gradient_multiply(pyramid_t* pyramid, const float val); + +void matrix_upsample(const int outCols, const int outRows, const float* const in, float* const out); +void matrix_downsample(const int inCols, const int inRows, const float* const data, float* const res); + +/** + * @brief: Tone mapping algorithm [Mantiuk2006] + * + * @param R red channel + * @param G green channel + * @param B blue channel + * @param Y luminance channel + * @param contrastFactor contrast scaling factor (in 0-1 range) + * @param saturationFactor color desaturation (in 0-1 range) + * @param itmax maximum number of iterations for convergence (typically 50) + * @param tol tolerence to get within for convergence (typically 1e-3) + * @param progress_cb callback function that reports progress + * @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 tmo_mantiuk06_contmap( int cols, int rows, float* R, float* G, float* B, float* Y, + float contrastFactor, float saturationFactor, float detailFactor, + int itmax = 200, float tol = 1e-3, ProgressHelper *ph = NULL); + +} + +#endif +