Merge branch 'master' into dehaze

This commit is contained in:
Morgan Hardwood 2015-09-08 09:40:23 +02:00
commit 5d6f7080b7
76 changed files with 2999 additions and 2247 deletions

View File

@ -55,4 +55,5 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
Alberto Righetto
Kostia (Kildor) Romanov
Johan Thor
TooWaBoo
Colin Walker

View File

@ -1,36 +1,38 @@
# cmakefile executed within a makefile target
# If we find ReleaseInfo.cmake we use the info from there and don't need Mercurial to be installed
# If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed
find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH)
if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
# we look for the hg command in this paths by order of preference
# we look for the git command in this paths by order of preference
if (WIN32)
find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../)
find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../)
elseif (APPLE)
find_file(HG_CMD hg PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
find_file(HG_CMD hg)
find_file(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
find_file(GIT_CMD git)
set (SHELL "/bin/bash")
else (WIN32) # Linux
find_file(HG_CMD hg)
find_file(GIT_CMD git)
set (SHELL "/bin/bash")
endif (WIN32)
# Fail if Mercurial is not installed
if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
message(FATAL_ERROR "hg command not found!")
# Fail if Git is not installed
if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND)
message(FATAL_ERROR "git command not found!")
else ()
message(STATUS "hg command found: ${HG_CMD}")
message(STATUS "git command found: ${GIT_CMD}")
endif ()
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" branch OUTPUT_VARIABLE HG_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={node|short} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_CMD} symbolic-ref --short -q HEAD OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
string(REGEX REPLACE "-g.*" "" GIT_VERSION ${GIT_VERSION_WHOLE})
string(REPLACE "-" "." GIT_VERSION ${GIT_VERSION})
execute_process(COMMAND ${GIT_CMD} rev-parse --verify HEAD OUTPUT_VARIABLE GIT_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE})
if (NOT DEFINED CACHE_NAME_SUFFIX)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE})
message(STATUS "CACHE_NAME_SUFFIX was not defined, it is now \"${CACHE_NAME_SUFFIX}\"")
elseif (CACHE_NAME_SUFFIX STREQUAL "latesttag")
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE})
message(STATUS "CACHE_NAME_SUFFIX was \"latesttag\", it is now \"${CACHE_NAME_SUFFIX}\"")
else ()
message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"")
@ -40,9 +42,9 @@ else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
if (VERSION_SUFFIX STREQUAL "")
set (HG_VERSION_SUFFIX "${HG_VERSION}")
set (GIT_VERSION_SUFFIX "${GIT_VERSION}")
else ()
set (HG_VERSION_SUFFIX "${HG_VERSION} ${VERSION_SUFFIX}")
set (GIT_VERSION_SUFFIX "${GIT_VERSION} ${VERSION_SUFFIX}")
endif ()
# build version.h from template

View File

@ -1,6 +1,6 @@
Branch: ${HG_BRANCH}
Version: ${HG_VERSION_SUFFIX}
Changeset: ${HG_CHANGESET}
Branch: ${GIT_BRANCH}
Version: ${GIT_VERSION_SUFFIX}
Changeset: ${GIT_CHANGESET}
Compiler: ${COMPILER_INFO}
Processor: ${PROC_LABEL}
System: ${SYSTEM}

View File

@ -1,6 +1,5 @@
if (WIN32)
cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0015 OLD)
else (WIN32)
cmake_minimum_required(VERSION 2.6)
endif (WIN32)
@ -14,6 +13,16 @@ endif ()
string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
# assuming that Linux and Apple users will have gtk2 built by their installed gcc
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0)
message(STATUS "Gcc Version >= 5.0 ; adding -D_GLIBCXX_USE_CXX11_ABI=0 to build with Gtk2")
add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0)
# see here : https://gcc.gnu.org/gcc-5/changes.html#libstdcxx
endif()
endif()
if (UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
add_definitions (-D_DEBUG)
else ()
@ -45,6 +54,14 @@ endif ()
if (NOT(PROC_TARGET_NUMBER EQUAL 0))
set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS})
endif ()
if (UNIX AND PROC_LABEL STREQUAL "undefined")
execute_process(COMMAND uname -p OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE cpu)
if ("${cpu}" STREQUAL "unknown")
set(PROC_LABEL "${CMAKE_SYSTEM_PROCESSOR}")
else ()
set (PROC_LABEL "${cpu}")
endif ()
endif ()
# if it exists, the PROC_FORCED_LABEL value is loaded in PROC_LABEL to override the one of ProcessorTargets
if (DEFINED PROC_FORCED_LABEL)
@ -352,7 +369,6 @@ add_custom_target(AboutFile ALL
COMMAND ${ABOUT_COMMAND_WITH_ARGS}
COMMENT "Creating the about file")
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
## END: Generating AboutThisBuild.txt
install (FILES AUTHORS.txt DESTINATION "${CREDITSDIR}")

View File

@ -20,24 +20,35 @@ http://michaelezra.com/projects/rt/documentation/
Git handbook:
http://git-scm.com/book/en/
## Compilation, patching and Git
## Compilation, branches and Git
Before compiling RawTherapee you need to have the dependencies installed.
Refer to RawPedia for dependency requirements:
http://rawpedia.rawtherapee.com/Linux
The instructions below will be merged into that article on RawPedia soon.
Clone the source code:
`git clone https://github.com/Beep6581/RawTherapee ~/repo-rt`
### Clone the source code
Clone the source code either using HTTPS:
```
git clone https://github.com/Beep6581/RawTherapee ~/repo-rt
```
or using SSH (see https://help.github.com/articles/generating-ssh-keys/ ):
```
git clone git@github.com:Beep6581/RawTherapee.git ~/repo-rt
```
or update a previously cloned repository:
`cd ~/repo-rt && git fetch`
```
cd ~/repo-rt && git pull
```
Apply a patch:
If you want to apply a patch, use "git apply" if you just want to apply without committing, or "git am" if you want to automatically apply and commit:
`git apply /downloads/some.patch`
or
`git am /downloads/some.patch`
### Optionally pick a branch
New features and bug fixes are made on their own branches. Once tested, those branches are merged into the "master" branch. We used to test new features and bug fixes by sharing patches (.diff files) but git makes branching easy and branching makes sharing patches unnecessary.
To test a new feature or bug fix, just checkout [the right branch](https://github.com/Beep6581/RawTherapee/branches/active) before compiling:
```
git checkout <branchname>
```
Compile:
### Compile and run
To find out how many threads your CPU supports, run:
`grep -c processor /proc/cpuinfo`
Then replace the number in `-j8` below with this number. This will make compilation faster but it will have no effect on the speed of running RawTherapee.

View File

@ -19,16 +19,6 @@ else (WIN32)
endif (WIN32)
if (WIN32)
find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../)
# Fail if Mercurial is not installed
if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
message(FATAL_ERROR "hg command not found!")
else (HG_CMD STREQUAL HG_CMD-NOTFOUND)
message(STATUS "hg command found: ${HG_CMD}")
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (HG_CMD STREQUAL HG_CMD-NOTFOUND)
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
set(BUILD_BIT_DEPTH 32)
# 32 bits builds has to be installable on 64 bits system, to support WinXP/64.
@ -46,6 +36,27 @@ if (WIN32)
# set part of the output archive name
set(SYSTEM_NAME "WinVista")
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
# If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed
find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH)
if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
# we look for the git command in this paths by order of preference
find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../)
# Fail if Git is not installed
if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND)
message(FATAL_ERROR "git command not found!")
else ()
message(STATUS "git command found: ${GIT_CMD}")
endif ()
execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
string(REGEX REPLACE "-.*" "" GIT_VERSION ${GIT_VERSION_WHOLE})
string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE})
else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss")
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR})
endif (WIN32)

View File

@ -354,7 +354,7 @@ HISTORY_MSG_163;RGB corbes - R
HISTORY_MSG_164;RGB corbes - G
HISTORY_MSG_165;RGB corbes - B
HISTORY_MSG_166;Nivells neutrals
HISTORY_MSG_167;N&amp;B tons
HISTORY_MSG_167;Mètode demosaicat
HISTORY_MSG_168;Corba 'CC'
HISTORY_MSG_169;Corba 'CH'
HISTORY_MSG_170;Vibrància - corba

View File

@ -959,7 +959,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: <b>-</b>
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -683,7 +683,7 @@ TP_WBALANCE_TEMPERATURE;色溫
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -414,7 +414,7 @@ HISTORY_MSG_163;RGB křivky - Červená
HISTORY_MSG_164;RGB křivky - Zelená
HISTORY_MSG_165;RGB křivky - Modrá
HISTORY_MSG_166;Neutrální úrovně
HISTORY_MSG_167;--nepoužito--
HISTORY_MSG_167;Metoda demozajkování
HISTORY_MSG_168;L*a*b* - CC křivka
HISTORY_MSG_169;L*a*b* - CH Křivka
HISTORY_MSG_170;Živost - HH křivka

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

File diff suppressed because it is too large Load Diff

View File

@ -487,7 +487,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -397,7 +397,7 @@
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -440,7 +440,7 @@ HISTORY_MSG_163;Curvas RGB - Rojo
HISTORY_MSG_164;Curvas RGB - Verde
HISTORY_MSG_165;Curvas RGB - Azul
HISTORY_MSG_166;Niveles neutros
HISTORY_MSG_167;-No se usa--
HISTORY_MSG_167;Método de Interpolación
HISTORY_MSG_168;Curva 'CC'
HISTORY_MSG_169;Curva 'CM'
HISTORY_MSG_170;Vib - Curva

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -385,7 +385,7 @@ HISTORY_MSG_163;Courbes RVB - Rouge
HISTORY_MSG_164;Courbes RVB - Vert
HISTORY_MSG_165;Courbes RVB - Bleu
HISTORY_MSG_166;Niveaux Neutre
HISTORY_MSG_167;--inutilisé--
HISTORY_MSG_167;Algorithme de dématriçage
HISTORY_MSG_168;Courbe 'CC'
HISTORY_MSG_169;Courbe 'CT'
HISTORY_MSG_170;Vib. - Courbe

View File

@ -678,7 +678,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -384,7 +384,7 @@ HISTORY_MSG_163;Curve RGB - R (Rosso)
HISTORY_MSG_164;Curve RGB - G (Verde)
HISTORY_MSG_165;Curve RGB - B (Blu)
HISTORY_MSG_166;Livelli Neutrali
HISTORY_MSG_167;--inutilizzato--
HISTORY_MSG_167;Demosaicizzazione - Metodo
HISTORY_MSG_168;Curva 'CC'
HISTORY_MSG_169;Curva 'CH'
HISTORY_MSG_170;Vividezza - Curva

View File

@ -428,7 +428,7 @@ HISTORY_MSG_163;RGB カーブ - レッド
HISTORY_MSG_164;RGB カーブ - グリーン
HISTORY_MSG_165;RGB カーブ - ブルー
HISTORY_MSG_166;ニュートラル・レベル
HISTORY_MSG_167;--未使用--
HISTORY_MSG_167;デモザイク 方式
HISTORY_MSG_168;L*a*b* CC カーブ
HISTORY_MSG_169;L*a*b* CH カーブ
HISTORY_MSG_170;自然な彩度 - カーブ
@ -1933,9 +1933,3 @@ ZOOMPANEL_ZOOMFITSCREEN;画像全体を画面に合わせる\nショートカッ
ZOOMPANEL_ZOOMIN;ズームイン\nショートカット: <b>+</b>
ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: <b>-</b>
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
!GENERAL_APPLY;Apply
!GENERAL_OPEN;Open

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -963,7 +963,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés <b>-</b>
!GENERAL_WARNING;Warning
!HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram.
!HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram.
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -393,7 +393,7 @@ HISTORY_MSG_163;RGB-curve - R
HISTORY_MSG_164;RGB-curve - G
HISTORY_MSG_165;RGB-curve - B
HISTORY_MSG_166;Neutrale niveaus
HISTORY_MSG_167;-
HISTORY_MSG_167;Demozaïekmethode
HISTORY_MSG_168;L*a*b* - CC curve
HISTORY_MSG_169;L*a*b* - CH curve
HISTORY_MSG_170;Levendigheid curve

View File

@ -678,7 +678,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -388,7 +388,7 @@ HISTORY_MSG_163;Krzywe RGB - Czerwona
HISTORY_MSG_164;Krzywe RGB - Zielona
HISTORY_MSG_165;Krzywe RGB - Niebieska
HISTORY_MSG_166;Neutralna ekspozycja
HISTORY_MSG_167;-
HISTORY_MSG_167;Algorytm demozaikowania
HISTORY_MSG_168;L*a*b* - Krzywa CC
HISTORY_MSG_169;L*a*b* - Krzywa CH
HISTORY_MSG_170;Jaskrawość - Krzywa HH

View File

@ -388,7 +388,7 @@ HISTORY_MSG_163;Krzywe RGB - Czerwona
HISTORY_MSG_164;Krzywe RGB - Zielona
HISTORY_MSG_165;Krzywe RGB - Niebieska
HISTORY_MSG_166;Neutralna ekspozycja
HISTORY_MSG_167;-
HISTORY_MSG_167;Algorytm demozaikowania
HISTORY_MSG_168;L*a*b* - Krzywa CC
HISTORY_MSG_169;L*a*b* - Krzywa CH
HISTORY_MSG_170;Jaskrawosc - Krzywa HH

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -383,7 +383,7 @@ HISTORY_MSG_163;Кривая RGB: Красный
HISTORY_MSG_164;Кривая RGB: Зелёный
HISTORY_MSG_165;Кривая RGB: Синий
HISTORY_MSG_166;Нейтральные уровни
HISTORY_MSG_167;--неиспользуемый--
HISTORY_MSG_167;Демозаик
HISTORY_MSG_168;Кривая 'ЦЦ'
HISTORY_MSG_169;Кривая 'ЦО'
HISTORY_MSG_170;Рез: кривая

View File

@ -884,7 +884,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике <b>-</b>
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -884,7 +884,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike <b>-</b>
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -742,7 +742,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť <b>-</b>
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -680,7 +680,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K]
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -393,7 +393,7 @@ HISTORY_MSG_163;RGB-kurvor - Röd
HISTORY_MSG_164;RGB-kurvor - Grön
HISTORY_MSG_165;RGB-kurvor - Blå
HISTORY_MSG_166;Neutrala nivåer
HISTORY_MSG_167;--oanvänd--
HISTORY_MSG_167;Metod för demozaicing
HISTORY_MSG_168;'CC'-kurvan
HISTORY_MSG_169;'CH'-kurvan
HISTORY_MSG_170;Lyster-kurvan

View File

@ -679,7 +679,7 @@ TP_WBALANCE_TEMPERATURE;Isı
!HISTORY_MSG_164;RGB Curves - Green
!HISTORY_MSG_165;RGB Curves - Blue
!HISTORY_MSG_166;Exposure - Neutral
!HISTORY_MSG_167;--unused--
!HISTORY_MSG_167;Demosaicing method
!HISTORY_MSG_168;L*a*b* - CC curve
!HISTORY_MSG_169;L*a*b* - CH curve
!HISTORY_MSG_170;Vibrance - HH curve

View File

@ -397,7 +397,7 @@ HISTORY_MSG_163;RGB Curves - Red
HISTORY_MSG_164;RGB Curves - Green
HISTORY_MSG_165;RGB Curves - Blue
HISTORY_MSG_166;Exposure - Neutral
HISTORY_MSG_167;--unused--
HISTORY_MSG_167;Demosaicing method
HISTORY_MSG_168;L*a*b* - CC curve
HISTORY_MSG_169;L*a*b* - CH curve
HISTORY_MSG_170;Vibrance - HH curve

View File

@ -23,8 +23,8 @@
#define MyAppName "RawTherapee"
#define MyAppVersion "${HG_VERSION}"
#define MyAppFullVersion "${HG_VERSION}.${HG_TAGDISTANCE}"
#define MyAppVersion "${GIT_VERSION}"
#define MyAppFullVersion "${GIT_VERSION}.${GIT_TAGDISTANCE}"
#define MyAppPublisher "rawtherapee.com"
#define MyAppURL "http://www.rawtherapee.com/"
#define MyAppExeName "rawtherapee.exe"

View File

@ -11,7 +11,7 @@ set (RTENGINESOURCEFILES safegtk.cc colortemp.cc curves.cc flatcurves.cc diagona
dfmanager.cc ffmanager.cc rawimage.cc image8.cc image16.cc imagefloat.cc imagedata.cc imageio.cc improcfun.cc init.cc dcrop.cc
loadinitial.cc procparams.cc rawimagesource.cc demosaic_algos.cc shmap.cc simpleprocess.cc refreshmap.cc
fast_demo.cc amaze_demosaic_RT.cc CA_correct_RT.cc cfa_linedn_RT.cc green_equil_RT.cc hilite_recon.cc expo_before_b.cc
stdimagesource.cc myfile.cc iccjpeg.cc hlmultipliers.cc improccoordinator.cc editbuffer.cc
stdimagesource.cc myfile.cc iccjpeg.cc hlmultipliers.cc improccoordinator.cc editbuffer.cc coord.cc
processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc cieimage.cc
iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc ipvibrance.cc
imagedimensions.cc jpeg_memsrc.cc jdatasrc.cc iimage.cc

View File

@ -462,7 +462,6 @@ void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g
}
}
#ifndef __SSE2__
void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b, int gamu )
{
gamu = 1;
@ -480,7 +479,7 @@ void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g
z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b);
}
}
#else
#ifdef __SSE2__
void Ciecam02::cat02_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b )
{
//gamut correction M.H.Brill S.Susstrunk
@ -497,14 +496,14 @@ void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g,
z = b;
}
#ifndef __SSE2__
void Ciecam02::hpe_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b )
{
x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b);
y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b);
z = b;
}
#else
#ifdef __SSE2__
void Ciecam02::hpe_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b )
{
x = (F2V(1.910197f) * r) - (F2V(1.112124f) * g) + (F2V(0.201908f) * b);
@ -565,7 +564,6 @@ void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa,
b = (0.32787 * x) - (0.15681 * aa) - (4.49038 * bb);
}
#ifndef __SSE2__
void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb )
{
float x = (A / nbb) + 0.305f;
@ -577,7 +575,7 @@ void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa,
/* c1 c6 c7 */
b = (0.32787f * x) - (0.15681f * aa) - (4.49038f * bb);
}
#else
#ifdef __SSE2__
void Ciecam02::Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb )
{
vfloat c1 = F2V(0.32787f) * ((A / nbb) + F2V(0.305f));
@ -619,7 +617,6 @@ void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double
bb = (aa * sinh) / cosh;
}
}
#ifndef __SSE2__
void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a )
{
float2 sincosval = xsincosf((h * M_PI) / 180.0f);
@ -657,7 +654,7 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float
std::swap(aa, bb);
}
}
#else
#ifdef __SSE2__
void Ciecam02::calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a )
{
vfloat2 sincosval = xsincosf((h * F2V(M_PI)) / F2V(180.0f));
@ -862,7 +859,7 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q,
void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float &M, float &s, float &aw, float &fl, float &wh,
float x, float y, float z, float xw, float yw, float zw,
float yb, float la, float f, float c, float nc, float pilotd, int gamu, float pow1, float nbb, float ncb, float pfl, float cz, float d)
float c, float nc, int gamu, float pow1, float nbb, float ncb, float pfl, float cz, float d)
{
float r, g, b;
@ -876,9 +873,9 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q,
gamu = 1;
xyz_to_cat02float( r, g, b, x, y, z, gamu );
xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu );
rc = r * (((yw * d) / rw) + (1.0 - d));
gc = g * (((yw * d) / gw) + (1.0 - d));
bc = b * (((yw * d) / bw) + (1.0 - d));
rc = r * (((yw * d) / rw) + (1.f - d));
gc = g * (((yw * d) / gw) + (1.f - d));
bc = b * (((yw * d) / bw) + (1.f - d));
cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu );
@ -924,7 +921,7 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q,
#ifdef __SSE2__
void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw,
vfloat yb, vfloat la, vfloat f, vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d)
vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d)
{
vfloat r, g, b;
@ -979,6 +976,65 @@ void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat
}
#endif
void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, float fl,
float x, float y, float z, float xw, float yw, float zw,
float c, float nc, float pow1, float nbb, float ncb, float cz, float d)
{
float r, g, b;
float rw, gw, bw;
float rc, gc, bc;
float rp, gp, bp;
float rpa, gpa, bpa;
float a, ca, cb;
float e, t;
float myh;
int gamu = 1;
xyz_to_cat02float( r, g, b, x, y, z, gamu );
xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu );
rc = r * (((yw * d) / rw) + (1.f - d));
gc = g * (((yw * d) / gw) + (1.f - d));
bc = b * (((yw * d) / bw) + (1.f - d));
cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu );
if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
rp = MAXR(rp, 0.0f);
gp = MAXR(gp, 0.0f);
bp = MAXR(bp, 0.0f);
}
rpa = nonlinear_adaptationfloat( rp, fl );
gpa = nonlinear_adaptationfloat( gp, fl );
bpa = nonlinear_adaptationfloat( bp, fl );
ca = rpa - ((12.0f * gpa) - bpa) / 11.0f;
cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa));
myh = xatan2f( cb, ca );
if ( myh < 0.0f ) {
myh += (2.f * M_PI);
}
a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb;
if (gamu == 1) {
a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk
}
J = pow_F( a / aw, c * cz * 0.5f);
e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f);
t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa));
C = pow_F( t, 0.9f ) * J * pow1;
J *= J * 100.0f;
h = (myh * 180.f) / (float)M_PI;
}
void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, double C, double h,
double xw, double yw, double zw, double yb, double la,
double f, double c, double nc , int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw )
@ -1012,9 +1068,9 @@ void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, doub
cat02_to_xyz( x, y, z, r, g, b, gamu );
}
#ifndef __SSE2__
void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, float C, float h,
float xw, float yw, float zw, float yb, float la,
float xw, float yw, float zw,
float f, float c, float nc , int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw)
{
float r, g, b;
@ -1047,9 +1103,9 @@ void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, flo
cat02_to_xyzfloat( x, y, z, r, g, b, gamu );
}
#else
#ifdef __SSE2__
void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h,
vfloat xw, vfloat yw, vfloat zw, vfloat yb, vfloat la,
vfloat xw, vfloat yw, vfloat zw,
vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz)
{
vfloat r, g, b;
@ -1135,7 +1191,6 @@ double Ciecam02::inverse_nonlinear_adaptation( double c, double fl )
return c1 * (100.0 / fl) * pow( (27.13 * fabs( c - 0.1 )) / (400.0 - fabs( c - 0.1 )), 1.0 / 0.42 );
}
#ifndef __SSE2__
float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl )
{
c -= 0.1f;
@ -1153,7 +1208,7 @@ float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl )
return (100.0f / fl) * pow_F( (27.13f * fabsf( c )) / (400.0f - fabsf( c )), 2.38095238f );
}
#else
#ifdef __SSE2__
vfloat Ciecam02::inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl )
{
c -= F2V(0.1f);

View File

@ -55,13 +55,13 @@ private:
static float nonlinear_adaptationfloat( float c, float fl );
static double inverse_nonlinear_adaptation( double c, double fl );
#ifndef __SSE2__
static float inverse_nonlinear_adaptationfloat( float c, float fl );
static void calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a );
static void Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb );
static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b );
static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu );
#else
#ifdef __SSE2__
static vfloat inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl );
static void calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a );
static void Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb );
@ -85,17 +85,15 @@ public:
double yb, double la,
double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw);
#ifndef __SSE2__
static void jch2xyz_ciecam02float( float &x, float &y, float &z,
float J, float C, float h,
float xw, float yw, float zw,
float yb, float la,
float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw );
#else
#ifdef __SSE2__
static void jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z,
vfloat J, vfloat C, vfloat h,
vfloat xw, vfloat yw, vfloat zw,
vfloat yb, vfloat la,
vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz );
#endif
/**
@ -120,20 +118,24 @@ public:
double yb, double la,
double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d );
static void xyz2jch_ciecam02float( float &J, float &C, float &h,
float aw, float fl,
float x, float y, float z,
float xw, float yw, float zw,
float c, float nc, float n, float nbb, float ncb, float cz, float d );
static void xyz2jchqms_ciecam02float( float &J, float &C, float &h,
float &Q, float &M, float &s, float &aw, float &fl, float &wh,
float x, float y, float z,
float xw, float yw, float zw,
float yb, float la,
float f, float c, float nc, float pilotd, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d );
float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d );
#ifdef __SSE2__
static void xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h,
vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
vfloat x, vfloat y, vfloat z,
vfloat xw, vfloat yw, vfloat zw,
vfloat yb, vfloat la,
vfloat f, vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d );
vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d );
#endif

39
rtengine/coord.cc Normal file
View File

@ -0,0 +1,39 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#include "coord.h"
namespace rtengine
{
void Coord::setFromPolar(PolarCoord polar)
{
while (polar.angle < 0.f) {
polar.angle += 360.f;
}
while (polar.angle > 360.f) {
polar.angle -= 360.f;
}
x = polar.radius * cos(polar.angle / 180.f * M_PI);
y = polar.radius * sin(polar.angle / 180.f * M_PI);
}
}

View File

@ -16,12 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _COORD_H_
#define _COORD_H_
#ifndef __COORD__
#define __COORD__
#include "rt_math.h"
namespace rtengine
{
class PolarCoord;
// Do not confuse with rtengine::Coord2D, Coord is for the GUI
// Do not confuse with rtengine::Coord2D, this one is for the GUI
class Coord
{
public:
@ -51,6 +56,16 @@ public:
return retval;
}
bool operator== (const Coord& other) const
{
return other.x == x && other.y == y;
}
bool operator!= (const Coord& other) const
{
return other.x != x || other.y != y;
}
void operator+=(const Coord & rhs)
{
x += rhs.x;
@ -91,6 +106,14 @@ public:
PolarCoord() : radius(1.), angle(0.) {}
PolarCoord(double radius, double angle) : radius(radius), angle(angle) {}
PolarCoord(Coord start, Coord end) : radius(1.), angle(0.)
{
setFromCartesian(start, end);
}
PolarCoord(Coord delta) : radius(1.), angle(0.)
{
setFromCartesian(delta);
}
void set (double radius, double angle)
{
@ -134,6 +157,16 @@ public:
}
}
bool operator== (const PolarCoord& other) const
{
return other.radius == radius && other.angle == angle;
}
bool operator!= (const PolarCoord& other) const
{
return other.radius != radius || other.angle != angle;
}
void operator+=(const PolarCoord & rhs)
{
Coord thisCoord, rhsCoord;
@ -182,4 +215,7 @@ public:
};
}
#endif

View File

@ -33,6 +33,7 @@
#include "LUT.h"
#include "curves.h"
#include "opthelper.h"
#include "ciecam02.h"
#undef CLIPD
#define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f)
@ -2139,13 +2140,6 @@ float PerceptualToneCurve::calculateToneCurveContrastValue(void) const
void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurveState & state) const
{
float x, y, z;
cmsCIEXYZ XYZ;
cmsJCh JCh;
int thread_idx = 0;
#ifdef _OPENMP
thread_idx = omp_get_thread_num();
#endif
if (!state.isProphoto) {
// convert to prophoto space to make sure the same result is had regardless of working color space
@ -2190,12 +2184,16 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
// move to JCh so we can modulate chroma based on the global contrast-related chroma scaling factor
Color::Prophotoxyz(r, g, b, x, y, z);
XYZ.X = x * 100.0f / 65535;
XYZ.Y = y * 100.0f / 65535;
XYZ.Z = z * 100.0f / 65535;
cmsCIECAM02Forward(h02[thread_idx], &XYZ, &JCh);
if (!isfinite(JCh.J) || !isfinite(JCh.C) || !isfinite(JCh.h)) {
float J, C, h;
Ciecam02::xyz2jch_ciecam02float( J, C, h,
aw, fl,
x * 0.0015259022f, y * 0.0015259022f, z * 0.0015259022f,
xw, yw, zw,
c, nc, pow1, nbb, ncb, cz, d);
if (!isfinite(J) || !isfinite(C) || !isfinite(h)) {
// this can happen for dark noise colors or colors outside human gamut. Then we just return the curve's result.
if (!state.isProphoto) {
float newr = state.Prophoto2Working[0][0] * r + state.Prophoto2Working[0][1] * g + state.Prophoto2Working[0][2] * b;
@ -2215,24 +2213,24 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
{
// decrease chroma scaling sligthly of extremely saturated colors
float saturated_scale_factor = 0.95;
const float lolim = 35; // lower limit, below this chroma all colors will keep original chroma scaling factor
const float hilim = 60; // high limit, above this chroma the chroma scaling factor is multiplied with the saturated scale factor value above
float saturated_scale_factor = 0.95f;
const float lolim = 35.f; // lower limit, below this chroma all colors will keep original chroma scaling factor
const float hilim = 60.f; // high limit, above this chroma the chroma scaling factor is multiplied with the saturated scale factor value above
if (JCh.C < lolim) {
if (C < lolim) {
// chroma is low enough, don't scale
saturated_scale_factor = 1.0;
} else if (JCh.C < hilim) {
saturated_scale_factor = 1.f;
} else if (C < hilim) {
// S-curve transition between low and high limit
float x = (JCh.C - lolim) / (hilim - lolim); // x = [0..1], 0 at lolim, 1 at hilim
float x = (C - lolim) / (hilim - lolim); // x = [0..1], 0 at lolim, 1 at hilim
if (x < 0.5) {
x = 0.5 * powf(2 * x, 2);
if (x < 0.5f) {
x = 2.f * SQR(x);
} else {
x = 0.5 + 0.5 * (1 - powf(1 - 2 * (x - 0.5), 2));
x = 1.f - 2.f * SQR(1 - x);
}
saturated_scale_factor = 1.0 * (1.0 - x) + saturated_scale_factor * x;
saturated_scale_factor = (1.f - x) + saturated_scale_factor * x;
} else {
// do nothing, high saturation color, keep scale factor
}
@ -2242,11 +2240,11 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
{
// increase chroma scaling slightly of shadows
float nL = CurveFactory::gamma2(newLuminance / 65535); // apply gamma so we make comparison and transition with a more perceptual lightness scale
float dark_scale_factor = 1.20;
float nL = gamma2curve[newLuminance]; // apply gamma so we make comparison and transition with a more perceptual lightness scale
float dark_scale_factor = 1.20f;
//float dark_scale_factor = 1.0 + state.debug.p2 / 100.0f;
const float lolim = 0.15;
const float hilim = 0.50;
const float lolim = 0.15f;
const float hilim = 0.50f;
if (nL < lolim) {
// do nothing, keep scale factor
@ -2254,15 +2252,15 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
// S-curve transition
float x = (nL - lolim) / (hilim - lolim); // x = [0..1], 0 at lolim, 1 at hilim
if (x < 0.5) {
x = 0.5 * powf(2 * x, 2);
if (x < 0.5f) {
x = 2.f * SQR(x);
} else {
x = 0.5 + 0.5 * (1 - powf(1 - 2 * (x - 0.5), 2));
x = 1.f - 2.f * SQR(1 - x);
}
dark_scale_factor = dark_scale_factor * (1.0 - x) + 1.0 * x;
dark_scale_factor = dark_scale_factor * (1.0f - x) + x;
} else {
dark_scale_factor = 1.0;
dark_scale_factor = 1.f;
}
cmul *= dark_scale_factor;
@ -2270,34 +2268,38 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
{
// to avoid strange CIECAM02 chroma errors on close-to-shadow-clipping colors we reduce chroma scaling towards 1.0 for black colors
float dark_scale_factor = 1.0 / cmul;
const float lolim = 4;
const float hilim = 7;
float dark_scale_factor = 1.f / cmul;
const float lolim = 4.f;
const float hilim = 7.f;
if (JCh.J < lolim) {
if (J < lolim) {
// do nothing, keep scale factor
} else if (JCh.J < hilim) {
} else if (J < hilim) {
// S-curve transition
float x = (JCh.J - lolim) / (hilim - lolim);
float x = (J - lolim) / (hilim - lolim);
if (x < 0.5) {
x = 0.5 * powf(2 * x, 2);
if (x < 0.5f) {
x = 2.f * SQR(x);
} else {
x = 0.5 + 0.5 * (1 - powf(1 - 2 * (x - 0.5), 2));
x = 1.f - 2.f * SQR(1 - x);
}
dark_scale_factor = dark_scale_factor * (1.0 - x) + 1.0 * x;
dark_scale_factor = dark_scale_factor * (1.f - x) + x;
} else {
dark_scale_factor = 1.0;
dark_scale_factor = 1.f;
}
cmul *= dark_scale_factor;
}
JCh.C *= cmul;
cmsCIECAM02Reverse(h02[thread_idx], &JCh, &XYZ);
C *= cmul;
if (!isfinite(XYZ.X) || !isfinite(XYZ.Y) || !isfinite(XYZ.Z)) {
Ciecam02::jch2xyz_ciecam02float( x, y, z,
J, C, h,
xw, yw, zw,
f, c, nc, 1, pow1, nbb, ncb, fl, cz, d, aw );
if (!isfinite(x) || !isfinite(y) || !isfinite(z)) {
// can happen for colors on the rim of being outside gamut, that worked without chroma scaling but not with. Then we return only the curve's result.
if (!state.isProphoto) {
float newr = state.Prophoto2Working[0][0] * r + state.Prophoto2Working[0][1] * g + state.Prophoto2Working[0][2] * b;
@ -2311,10 +2313,10 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
return;
}
Color::xyz2Prophoto(XYZ.X, XYZ.Y, XYZ.Z, r, g, b);
r *= 655.35;
g *= 655.35;
b *= 655.35;
Color::xyz2Prophoto(x, y, z, r, g, b);
r *= 655.35f;
g *= 655.35f;
b *= 655.35f;
r = LIM<float>(r, 0.f, 65535.f);
g = LIM<float>(g, 0.f, 65535.f);
b = LIM<float>(b, 0.f, 65535.f);
@ -2329,34 +2331,34 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
Color::rgb2hsv(ar, ag, ab, ah, as, av);
Color::rgb2hsv(r, g, b, h, s, v);
float sat_scale = as <= 0.0 ? 1.0 : s / as; // saturation scale compared to Adobe curve
float keep = 0.2;
const float lolim = 1.00; // only mix in the Adobe curve if we have increased saturation compared to it
const float hilim = 1.20;
float sat_scale = as <= 0.f ? 1.f : s / as; // saturation scale compared to Adobe curve
float keep = 0.2f;
const float lolim = 1.00f; // only mix in the Adobe curve if we have increased saturation compared to it
const float hilim = 1.20f;
if (sat_scale < lolim) {
// saturation is low enough, don't desaturate
keep = 1.0;
keep = 1.f;
} else if (sat_scale < hilim) {
// S-curve transition
float x = (sat_scale - lolim) / (hilim - lolim); // x = [0..1], 0 at lolim, 1 at hilim
if (x < 0.5) {
x = 0.5 * powf(2 * x, 2);
if (x < 0.5f) {
x = 2.f * SQR(x);
} else {
x = 0.5 + 0.5 * (1 - powf(1 - 2 * (x - 0.5), 2));
x = 1.f - 2.f * SQR(1 - x);
}
keep = 1.0 * (1.0 - x) + keep * x;
keep = (1.f - x) + keep * x;
} else {
// do nothing, very high increase, keep minimum amount
}
if (keep < 1.0) {
if (keep < 1.f) {
// mix in some of the Adobe curve result
r = r * keep + (1.0 - keep) * ar;
g = g * keep + (1.0 - keep) * ag;
b = b * keep + (1.0 - keep) * ab;
r = r * keep + (1.f - keep) * ar;
g = g * keep + (1.f - keep) * ag;
b = b * keep + (1.f - keep) * ab;
}
}
@ -2370,41 +2372,28 @@ void PerceptualToneCurve::Apply(float &r, float &g, float &b, PerceptualToneCurv
}
}
cmsContext * PerceptualToneCurve::c02;
cmsHANDLE * PerceptualToneCurve::h02;
float PerceptualToneCurve::cf_range[2];
float PerceptualToneCurve::cf[1000];
LUTf PerceptualToneCurve::gamma2curve;
float PerceptualToneCurve::f, PerceptualToneCurve::c, PerceptualToneCurve::nc, PerceptualToneCurve::yb, PerceptualToneCurve::la, PerceptualToneCurve::xw, PerceptualToneCurve::yw, PerceptualToneCurve::zw, PerceptualToneCurve::gamut;
float PerceptualToneCurve::n, PerceptualToneCurve::d, PerceptualToneCurve::nbb, PerceptualToneCurve::ncb, PerceptualToneCurve::cz, PerceptualToneCurve::aw, PerceptualToneCurve::wh, PerceptualToneCurve::pfl, PerceptualToneCurve::fl, PerceptualToneCurve::pow1;
void PerceptualToneCurve::init()
{
{
// init ciecam02 state, used for chroma scalings
cmsViewingConditions vc;
vc.whitePoint = *cmsD50_XYZ();
vc.whitePoint.X *= 100;
vc.whitePoint.Y *= 100;
vc.whitePoint.Z *= 100;
vc.Yb = 20;
vc.La = 20;
vc.surround = AVG_SURROUND;
vc.D_value = 1.0;
// init ciecam02 state, used for chroma scalings
xw = 96.42f;
yw = 100.0f;
zw = 82.49f;
yb = 20;
la = 20;
f = 1.00f;
c = 0.69f;
nc = 1.00f;
int thread_count = 1;
#ifdef _OPENMP
thread_count = omp_get_max_threads();
#endif
h02 = (cmsHANDLE *)malloc(sizeof(h02[0]) * (thread_count + 1));
c02 = (cmsContext *)malloc(sizeof(c02[0]) * (thread_count + 1));
h02[thread_count] = NULL;
c02[thread_count] = NULL;
// little cms requires one state per thread, for thread safety
for (int i = 0; i < thread_count; i++) {
c02[i] = cmsCreateContext(NULL, NULL);
h02[i] = cmsCIECAM02Init(c02[i], &vc);
}
}
Ciecam02::initcam1float(gamut, yb, 1.f, f, la, xw, yw, zw, n, d, nbb, ncb,
cz, aw, wh, pfl, fl, c);
pow1 = pow_F( 1.64f - pow_F( 0.29f, n ), 0.73f );
{
// init contrast-value-to-chroma-scaling conversion curve
@ -2448,17 +2437,12 @@ void PerceptualToneCurve::init()
cf_range[0] = in_x[0];
cf_range[1] = in_x[in_len - 1];
}
}
gamma2curve(65536, 0);
void PerceptualToneCurve::cleanup()
{
for (int i = 0; h02[i] != NULL; i++) {
cmsCIECAM02Done(h02[i]);
cmsDeleteContext(c02[i]);
for (int i = 0; i < 65536; i++) {
gamma2curve[i] = CurveFactory::gamma2(i / 65535.0);
}
free(h02);
free(c02);
}
void PerceptualToneCurve::initApplyState(PerceptualToneCurveState & state, Glib::ustring workingSpace) const

View File

@ -827,10 +827,10 @@ public:
class PerceptualToneCurveState
{
public:
bool isProphoto;
float Working2Prophoto[3][3];
float Prophoto2Working[3][3];
float cmul_contrast;
bool isProphoto;
};
// Tone curve whose purpose is to keep the color appearance constant, that is the curve changes contrast
@ -840,10 +840,13 @@ public:
class PerceptualToneCurve : public ToneCurve
{
private:
static cmsHANDLE *h02;
static cmsContext *c02;
static float cf_range[2];
static float cf[1000];
static LUTf gamma2curve;
// for ciecam02
static float f, c, nc, yb, la, xw, yw, zw, gamut;
static float n, d, nbb, ncb, cz, aw, wh, pfl, fl, pow1;
static void cubic_spline(const float x[], const float y[], const int len, const float out_x[], float out_y[], const int out_len);
static float find_minimum_interval_halving(float (*func)(float x, void *arg), void *arg, float a, float b, float tol, int nmax);
static float find_tc_slope_fun(float k, void *arg);
@ -851,7 +854,6 @@ private:
float calculateToneCurveContrastValue() const;
public:
static void init();
static void cleanup();
void initApplyState(PerceptualToneCurveState & state, Glib::ustring workingSpace) const;
void Apply(float& r, float& g, float& b, PerceptualToneCurveState & state) const;
};

View File

@ -70,6 +70,10 @@ DiagonalCurve::DiagonalCurve (const std::vector<double>& p, int poly_pn)
identity = false;
}
if(x[0] == 0.f && x[1] == 0.f)
// Avoid crash when first two points are at x = 0 (git Issue 2888)
x[1] = 0.5f;
if (!identity) {
if (kind == DCT_Spline && N > 2) {
spline_cubic_set ();

View File

@ -22,6 +22,7 @@
#include "../rtgui/edit.h"
#include "array2D.h"
#include "iimage.h"
#include "coord.h"
namespace rtengine
{

View File

@ -26,13 +26,7 @@
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef __SSE__
#if defined( WIN32 ) && defined(__x86_64__)
#include <intrin.h>
#else
#include <xmmintrin.h>
#endif
#endif
#include "opthelper.h"
// classical filtering if the support window is small:
@ -88,13 +82,8 @@ template<class T> void gaussVertical3 (T** src, T** dst, AlignedBufferMP<double>
}
#ifdef __SSE__
#ifdef WIN32
template<class T> __attribute__((force_align_arg_pointer)) void gaussVertical3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
template<class T> SSEFUNCTION void gaussVertical3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
{
#else
template<class T> void gaussVertical3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
{
#endif
__m128 Tv, Tm1v, Tp1v;
__m128 c0v, c1v;
c0v = _mm_set1_ps(c0);
@ -107,7 +96,7 @@ template<class T> void gaussVertical3Sse (T** src, T** dst, int W, int H, const
Tm1v = _mm_loadu_ps( &src[0][i] );
_mm_storeu_ps( &dst[0][i], Tm1v);
if(H > 1) {
if (H > 1) {
Tv = _mm_loadu_ps( &src[1][i]);
}
@ -126,7 +115,7 @@ template<class T> void gaussVertical3Sse (T** src, T** dst, int W, int H, const
#pragma omp for
#endif
for(int i = W - (W % 4); i < W; i++) {
for (int i = W - (W % 4); i < W; i++) {
dst[0][i] = src[0][i];
for (int j = 1; j < H - 1; j++) {
@ -138,13 +127,8 @@ template<class T> void gaussVertical3Sse (T** src, T** dst, int W, int H, const
}
#ifdef WIN32
template<class T> __attribute__((force_align_arg_pointer)) void gaussHorizontal3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
template<class T> SSEFUNCTION void gaussHorizontal3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
{
#else
template<class T> void gaussHorizontal3Sse (T** src, T** dst, int W, int H, const float c0, const float c1)
{
#endif
float tmp[W][4] __attribute__ ((aligned (16)));
__m128 Tv, Tm1v, Tp1v;
@ -162,7 +146,7 @@ template<class T> void gaussHorizontal3Sse (T** src, T** dst, int W, int H, cons
dst[i + 3][0] = src[i + 3][0];
Tm1v = _mm_set_ps( src[i][0], src[i + 1][0], src[i + 2][0], src[i + 3][0] );
if(W > 1) {
if (W > 1) {
Tv = _mm_set_ps( src[i][1], src[i + 1][1], src[i + 2][1], src[i + 3][1] );
}
@ -191,7 +175,7 @@ template<class T> void gaussHorizontal3Sse (T** src, T** dst, int W, int H, cons
#pragma omp for
#endif
for(int i = H - (H % 4); i < H; i++) {
for (int i = H - (H % 4); i < H; i++) {
dst[i][0] = src[i][0];
for (int j = 1; j < W - 1; j++) {
@ -205,18 +189,15 @@ template<class T> void gaussHorizontal3Sse (T** src, T** dst, int W, int H, cons
// fast gaussian approximation if the support window is large
#ifdef WIN32
template<class T> __attribute__((force_align_arg_pointer)) void gaussHorizontalSse (T** src, T** dst, int W, int H, float sigma)
template<class T> SSEFUNCTION void gaussHorizontalSse (T** src, T** dst, int W, int H, float sigma)
{
#else
template<class T> void gaussHorizontalSse (T** src, T** dst, int W, int H, float sigma)
{
#endif
if (sigma < 0.25) {
// dont perform filtering
if (src != dst)
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H; i++) {
memcpy (dst[i], src[i], W * sizeof(T));
}
@ -279,7 +260,10 @@ template<class T> void gaussHorizontalSse (T** src, T** dst, int W, int H, float
b1v = _mm_set1_ps(b1);
b2v = _mm_set1_ps(b2);
b3v = _mm_set1_ps(b3);
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H - 3; i += 4) {
tmpV[0] = src[i + 3][0];
@ -351,9 +335,11 @@ template<class T> void gaussHorizontalSse (T** src, T** dst, int W, int H, float
}
// Borders are done without SSE
#ifdef _OPENMP
#pragma omp for
#endif
for(int i = H - (H % 4); i < H; i++) {
for (int i = H - (H % 4); i < H; i++) {
tmp[0][0] = B * src[i][0] + b1 * src[i][0] + b2 * src[i][0] + b3 * src[i][0];
tmp[1][0] = B * src[i][1] + b1 * tmp[0][0] + b2 * src[i][0] + b3 * src[i][0];
tmp[2][0] = B * src[i][2] + b1 * tmp[1][0] + b2 * tmp[0][0] + b3 * src[i][0];
@ -389,7 +375,7 @@ template<class T> void gaussHorizontal (T** src, T** dst, AlignedBufferMP<double
#ifdef __SSE__
if(sigma < 70) { // bigger sigma only with double precision
if (sigma < 70) { // bigger sigma only with double precision
gaussHorizontalSse<T> (src, dst, W, H, sigma);
return;
}
@ -399,7 +385,9 @@ template<class T> void gaussHorizontal (T** src, T** dst, AlignedBufferMP<double
if (sigma < 0.25) {
// dont perform filtering
if (src != dst)
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H; i++) {
memcpy (dst[i], src[i], W * sizeof(T));
}
@ -451,7 +439,9 @@ template<class T> void gaussHorizontal (T** src, T** dst, AlignedBufferMP<double
M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3);
}
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H; i++) {
AlignedBuffer<double>* pBuf = buffer.acquire();
@ -486,18 +476,15 @@ template<class T> void gaussHorizontal (T** src, T** dst, AlignedBufferMP<double
}
#ifdef __SSE__
#ifdef WIN32
template<class T> __attribute__((force_align_arg_pointer)) void gaussVerticalSse (T** src, T** dst, int W, int H, float sigma)
template<class T> SSEFUNCTION void gaussVerticalSse (T** src, T** dst, int W, int H, float sigma)
{
#else
template<class T> void gaussVerticalSse (T** src, T** dst, int W, int H, float sigma)
{
#endif
if (sigma < 0.25) {
// dont perform filtering
if (src != dst)
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H; i++) {
memcpy (dst[i], src[i], W * sizeof(T));
}
@ -614,9 +601,11 @@ template<class T> void gaussVerticalSse (T** src, T** dst, int W, int H, float s
}
// Borders are done without SSE
#ifdef _OPENMP
#pragma omp for
#endif
for(int i = W - (W % 4); i < W; i++) {
for (int i = W - (W % 4); i < W; i++) {
tmp[0][0] = B * src[0][i] + b1 * src[0][i] + b2 * src[0][i] + b3 * src[0][i];
tmp[1][0] = B * src[1][i] + b1 * tmp[0][0] + b2 * src[0][i] + b3 * src[0][i];
tmp[2][0] = B * src[2][i] + b1 * tmp[1][0] + b2 * tmp[0][0] + b3 * src[0][i];
@ -651,7 +640,7 @@ template<class T> void gaussVertical (T** src, T** dst, AlignedBufferMP<double>
#ifdef __SSE__
if(sigma < 70) { // bigger sigma only with double precision
if (sigma < 70) { // bigger sigma only with double precision
gaussVerticalSse<T> (src, dst, W, H, sigma);
return;
}
@ -659,9 +648,11 @@ template<class T> void gaussVertical (T** src, T** dst, AlignedBufferMP<double>
#endif
if (sigma < 0.25) {
// dont perform filtering
// don't perform filtering
if (src != dst)
#ifdef _OPENMP
#pragma omp for
#endif
for (int i = 0; i < H; i++) {
memcpy (dst[i], src[i], W * sizeof(T));
}
@ -713,38 +704,81 @@ template<class T> void gaussVertical (T** src, T** dst, AlignedBufferMP<double>
M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3);
}
// process 'numcols' columns for better usage of L1 cpu cache (especially faster for large values of H)
static const int numcols = 4;
double temp2[H][numcols] ALIGNED16;
double temp2Hm1[numcols], temp2H[numcols], temp2Hp1[numcols];
#ifdef _OPENMP
#pragma omp for
#pragma omp for nowait
#endif
for (int i = 0; i < W; i++) {
AlignedBuffer<double>* pBuf = buffer.acquire();
double* temp2 = pBuf->data;
temp2[0] = B * src[0][i] + b1 * src[0][i] + b2 * src[0][i] + b3 * src[0][i];
temp2[1] = B * src[1][i] + b1 * temp2[0] + b2 * src[0][i] + b3 * src[0][i];
temp2[2] = B * src[2][i] + b1 * temp2[1] + b2 * temp2[0] + b3 * src[0][i];
for (int j = 3; j < H; j++) {
temp2[j] = B * src[j][i] + b1 * temp2[j - 1] + b2 * temp2[j - 2] + b3 * temp2[j - 3];
for (int i = 0; i < W - numcols + 1; i += numcols) {
for (int k = 0; k < numcols; k++) {
temp2[0][k] = B * src[0][i + k] + b1 * src[0][i + k] + b2 * src[0][i + k] + b3 * src[0][i + k];
temp2[1][k] = B * src[1][i + k] + b1 * temp2[0][k] + b2 * src[0][i + k] + b3 * src[0][i + k];
temp2[2][k] = B * src[2][i + k] + b1 * temp2[1][k] + b2 * temp2[0][k] + b3 * src[0][i + k];
}
double temp2Hm1 = src[H - 1][i] + M[0][0] * (temp2[H - 1] - src[H - 1][i]) + M[0][1] * (temp2[H - 2] - src[H - 1][i]) + M[0][2] * (temp2[H - 3] - src[H - 1][i]);
double temp2H = src[H - 1][i] + M[1][0] * (temp2[H - 1] - src[H - 1][i]) + M[1][1] * (temp2[H - 2] - src[H - 1][i]) + M[1][2] * (temp2[H - 3] - src[H - 1][i]);
double temp2Hp1 = src[H - 1][i] + M[2][0] * (temp2[H - 1] - src[H - 1][i]) + M[2][1] * (temp2[H - 2] - src[H - 1][i]) + M[2][2] * (temp2[H - 3] - src[H - 1][i]);
for (int j = 3; j < H; j++) {
for (int k = 0; k < numcols; k++) {
temp2[j][k] = B * src[j][i + k] + b1 * temp2[j - 1][k] + b2 * temp2[j - 2][k] + b3 * temp2[j - 3][k];
}
}
temp2[H - 1] = temp2Hm1;
temp2[H - 2] = B * temp2[H - 2] + b1 * temp2[H - 1] + b2 * temp2H + b3 * temp2Hp1;
temp2[H - 3] = B * temp2[H - 3] + b1 * temp2[H - 2] + b2 * temp2[H - 1] + b3 * temp2H;
for (int k = 0; k < numcols; k++) {
temp2Hm1[k] = src[H - 1][i + k] + M[0][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[0][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[0][2] * (temp2[H - 3][k] - src[H - 1][i + k]);
temp2H[k] = src[H - 1][i + k] + M[1][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[1][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[1][2] * (temp2[H - 3][k] - src[H - 1][i + k]);
temp2Hp1[k] = src[H - 1][i + k] + M[2][0] * (temp2[H - 1][k] - src[H - 1][i + k]) + M[2][1] * (temp2[H - 2][k] - src[H - 1][i + k]) + M[2][2] * (temp2[H - 3][k] - src[H - 1][i + k]);
}
for (int k = 0; k < numcols; k++) {
temp2[H - 1][k] = temp2Hm1[k];
temp2[H - 2][k] = B * temp2[H - 2][k] + b1 * temp2[H - 1][k] + b2 * temp2H[k] + b3 * temp2Hp1[k];
temp2[H - 3][k] = B * temp2[H - 3][k] + b1 * temp2[H - 2][k] + b2 * temp2[H - 1][k] + b3 * temp2H[k];
}
for (int j = H - 4; j >= 0; j--) {
temp2[j] = B * temp2[j] + b1 * temp2[j + 1] + b2 * temp2[j + 2] + b3 * temp2[j + 3];
for (int k = 0; k < numcols; k++) {
temp2[j][k] = B * temp2[j][k] + b1 * temp2[j + 1][k] + b2 * temp2[j + 2][k] + b3 * temp2[j + 3][k];
}
}
for (int j = 0; j < H; j++) {
dst[j][i] = (T)temp2[j];
for (int k = 0; k < numcols; k++) {
dst[j][i + k] = (T)temp2[j][k];
}
}
}
#ifdef _OPENMP
#pragma omp single
#endif
// process remaining column
for (int i = W - (W % numcols); i < W; i++) {
temp2[0][0] = B * src[0][i] + b1 * src[0][i] + b2 * src[0][i] + b3 * src[0][i];
temp2[1][0] = B * src[1][i] + b1 * temp2[0][0] + b2 * src[0][i] + b3 * src[0][i];
temp2[2][0] = B * src[2][i] + b1 * temp2[1][0] + b2 * temp2[0][0] + b3 * src[0][i];
for (int j = 3; j < H; j++) {
temp2[j][0] = B * src[j][i] + b1 * temp2[j - 1][0] + b2 * temp2[j - 2][0] + b3 * temp2[j - 3][0];
}
buffer.release(pBuf);
double temp2Hm1 = src[H - 1][i] + M[0][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[0][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[0][2] * (temp2[H - 3][0] - src[H - 1][i]);
double temp2H = src[H - 1][i] + M[1][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[1][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[1][2] * (temp2[H - 3][0] - src[H - 1][i]);
double temp2Hp1 = src[H - 1][i] + M[2][0] * (temp2[H - 1][0] - src[H - 1][i]) + M[2][1] * (temp2[H - 2][0] - src[H - 1][i]) + M[2][2] * (temp2[H - 3][0] - src[H - 1][i]);
temp2[H - 1][0] = temp2Hm1;
temp2[H - 2][0] = B * temp2[H - 2][0] + b1 * temp2[H - 1][0] + b2 * temp2H + b3 * temp2Hp1;
temp2[H - 3][0] = B * temp2[H - 3][0] + b1 * temp2[H - 2][0] + b2 * temp2[H - 1][0] + b3 * temp2H;
for (int j = H - 4; j >= 0; j--) {
temp2[j][0] = B * temp2[j][0] + b1 * temp2[j + 1][0] + b2 * temp2[j + 2][0] + b3 * temp2[j + 3][0];
}
for (int j = 0; j < H; j++) {
dst[j][i] = (T)temp2[j][0];
}
}
}

View File

@ -22,19 +22,19 @@ typedef __m128i vint2;
//
#ifdef __GNUC__
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_store_ps(&x,y)
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define LVF(x) _mm_loadu_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_storeu_ps(&x,y)
#endif
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_store_ps(&x,y)
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define LVF(x) _mm_loadu_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_storeu_ps(&x,y)
#endif
#else
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_store_ps(&x,y)
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#define STVF(x,y) _mm_store_ps(&x,y)
#endif
// Load 8 floats from a and combine a[0],a[2],a[4] and a[6] into a vector of 4 floats

View File

@ -406,7 +406,10 @@ void ImageData::extractInfo ()
rtexif::Tag* flt = mnote->getTagP ("LensInfo/FocalLength");
if (flt) {
focal_len = flt->toDouble ();
// Don't replace Exif focal_len if Makernotes focal_len is 0
if (flt->toDouble() > 0) {
focal_len = flt->toDouble ();
}
} else if ((flt = mnote->getTagP ("FocalLength"))) {
rtexif::Tag* flt = mnote->getTag ("FocalLength");
focal_len = flt->toDouble ();

View File

@ -2049,8 +2049,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Q, M, s, F2V(aw), F2V(fl), F2V(wh),
x, y, z,
F2V(xw1), F2V(yw1), F2V(zw1),
F2V(yb), F2V(la),
F2V(f), F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d));
F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d));
STVF(Jbuffer[k], J);
STVF(Cbuffer[k], C);
STVF(hbuffer[k], h);
@ -2074,8 +2073,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Q, M, s, aw, fl, wh,
x, y, z,
xw1, yw1, zw1,
yb, la,
f, c, nc, pilot, gamu, pow1, nbb, ncb, pfl, cz, d);
c, nc, gamu, pow1, nbb, ncb, pfl, cz, d);
Jbuffer[k] = J;
Cbuffer[k] = C;
hbuffer[k] = h;
@ -2113,8 +2111,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Q, M, s, aw, fl, wh,
x, y, z,
xw1, yw1, zw1,
yb, la,
f, c, nc, pilot, gamu, pow1, nbb, ncb, pfl, cz, d);
c, nc, gamu, pow1, nbb, ncb, pfl, cz, d);
#endif
float Jpro, Cpro, hpro, Qpro, Mpro, spro;
Jpro = J;
@ -2545,7 +2542,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Ciecam02::jch2xyz_ciecam02float( xx, yy, zz,
J, C, h,
xw2, yw2, zw2,
yb2, la2,
f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj);
float x, y, z;
x = (float)xx * 655.35f;
@ -2607,7 +2603,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Ciecam02::jch2xyz_ciecam02float( x, y, z,
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
F2V(xw2), F2V(yw2), F2V(zw2),
F2V(yb2), F2V(la2),
F2V(f2), F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz));
STVF(xbuffer[k], x * c655d35);
STVF(ybuffer[k], y * c655d35);
@ -2936,7 +2931,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Ciecam02::jch2xyz_ciecam02float( xx, yy, zz,
ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j],
xw2, yw2, zw2,
yb2, la2,
f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj);
x = (float)xx * 655.35f;
y = (float)yy * 655.35f;
@ -2992,7 +2986,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
Ciecam02::jch2xyz_ciecam02float( x, y, z,
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
F2V(xw2), F2V(yw2), F2V(zw2),
F2V(yb2), F2V(la2),
F2V(f2), F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz));
x *= c655d35;
y *= c655d35;
@ -3178,7 +3171,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *e
SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve,
const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf)
{
LUTf fGammaLUTf;
Imagefloat *tmpImage = NULL;

View File

@ -313,16 +313,15 @@ public:
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili);
void WaveletcontAllLfinal(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili);
void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW,
struct cont_params &cp, const bool useChannelA);
void WaveletAandBAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b,
struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili);
void ContAllL (float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
void finalContAllL (int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili);
void finalContAllL (float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void ContAllAB (LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
int W_ab, int H_ab, const bool useChannelA);
void Evaluate2(wavelet_decomposition &WaveletCoeffs_L,

View File

@ -66,7 +66,6 @@ void cleanup ()
ProcParams::cleanup ();
Color::cleanup ();
PerceptualToneCurve::cleanup ();
ImProcFunctions::cleanupCache ();
Thumbnail::cleanupGamma ();
RawImageSource::cleanup ();

View File

@ -37,7 +37,6 @@
#include "mytime.h"
#include "sleef.c"
#include "opthelper.h"
#include "StopWatch.h"
#include "EdgePreservingDecomposition.h"
#ifdef _OPENMP
@ -994,7 +993,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
Evaluate2(*Ldecomp, cp, ind, mean, meanN, sigma, sigmaN, MaxP, MaxN, madL);
}
WaveletcontAllLfinal(labco, varhue, varchro, *Ldecomp, cp, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveWL, ChCurve, Chutili);
WaveletcontAllLfinal(*Ldecomp, cp, mean, sigma, MaxP, waOpacityCurveWL);
//Evaluate2(*Ldecomp, cp, ind, mean, meanN, sigma, sigmaN, MaxP, MaxN, madL);
Ldecomp->reconstruct(labco->data, cp.strength);
@ -1745,41 +1744,25 @@ void ImProcFunctions::EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterat
}
}
void ImProcFunctions::WaveletcontAllLfinal(LabImage * labco, float ** varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili)
void ImProcFunctions::WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean,float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL)
{
int maxlvl = WaveletCoeffs_L.maxlevel();
int W_L = WaveletCoeffs_L.level_W(0);
int H_L = WaveletCoeffs_L.level_H(0);
float * WavCoeffs_L0 = WaveletCoeffs_L.coeff0;
#ifdef _RT_NESTED_OPENMP
#pragma omp for schedule(dynamic) collapse(2)
#endif
for (int dir = 1; dir < 4; dir++) {
for (int lvl = 0; lvl < maxlvl; lvl++) {
int Wlvl_L = WaveletCoeffs_L.level_W(lvl);
int Hlvl_L = WaveletCoeffs_L.level_H(lvl);
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
finalContAllL (maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveWL, ChCurve, Chutili);
finalContAllL (WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, mean, sigma, MaxP, waOpacityCurveWL);
}
}
}
void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili)
{
//StopWatch Stop1("WaveletcontAllL");
int maxlvl = WaveletCoeffs_L.maxlevel();
int W_L = WaveletCoeffs_L.level_W(0);
int H_L = WaveletCoeffs_L.level_H(0);
@ -2530,14 +2513,10 @@ void ImProcFunctions::calckoe(float ** WavCoeffs_LL, struct cont_params cp, floa
}
void ImProcFunctions::finalContAllL (int maxlvl, LabImage * labco, float ** varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili)
void ImProcFunctions::finalContAllL (float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL)
{
bool lipschitz = true;
float edge = 1.f;
bool curvdiag = true;
if(curvdiag && cp.finena) {//curve
if(cp.diagcurv && cp.finena) {//curve
float insigma = 0.666f; //SD
float logmax = log(MaxP[level]); //log Max
float rapX = (mean[level] + sigma[level]) / MaxP[level]; //rapport between sD / max
@ -2547,47 +2526,30 @@ void ImProcFunctions::finalContAllL (int maxlvl, LabImage * labco, float ** varh
float asig = 0.166f / sigma[level];
float bsig = 0.5f - asig * mean[level];
float amean = 0.5f / mean[level];
float absciss;
float kinterm;
float kmul;
#ifdef _RT_NESTED_OPENMP
#pragma omp parallel for schedule(dynamic, W_L * 16) num_threads(wavNestedLevels) if(wavNestedLevels>1)
#endif
for (int i = 0; i < W_L * H_L; i++) {
edge = 1.f;
kinterm = 1.f;
float absciss;
if(cp.diagcurv) {
if(fabs(WavCoeffs_L[dir][i]) >= (mean[level] + sigma[level])) { //for max
float valcour = log(fabs(WavCoeffs_L[dir][i]));
float valc = valcour - logmax;
float vald = valc * rap;
absciss = exp(vald);
} else if(fabs(WavCoeffs_L[dir][i]) >= mean[level] && fabs(WavCoeffs_L[dir][i]) < (mean[level] + sigma[level])) {
absciss = asig * fabs(WavCoeffs_L[dir][i]) + bsig;
}
// else if(fabs(WavCoeffs_L[dir][i]) < mean[level]){
else {
absciss = amean * fabs(WavCoeffs_L[dir][i]);
}
// }
kinterm = 1.f;
kmul = 1.f;
float kc = kmul * (waOpacityCurveWL[absciss * 500.f] - 0.5f);
float reduceeffect = 1.5f;
if(kc <= 0.f) {
reduceeffect = 1.f;
}
kinterm = 1.f + reduceeffect * kmul * (waOpacityCurveWL[absciss * 500.f] - 0.5f);
if(kinterm < 0.f) {
kinterm = 0.01f;
}
if(fabsf(WavCoeffs_L[dir][i]) >= (mean[level] + sigma[level])) { //for max
float valcour = xlogf(fabsf(WavCoeffs_L[dir][i]));
float valc = valcour - logmax;
float vald = valc * rap;
absciss = xexpf(vald);
} else if(fabsf(WavCoeffs_L[dir][i]) >= mean[level]) {
absciss = asig * fabsf(WavCoeffs_L[dir][i]) + bsig;
} else {
absciss = amean * fabsf(WavCoeffs_L[dir][i]);
}
float kc = waOpacityCurveWL[absciss * 500.f] - 0.5f;
float reduceeffect = kc <= 0.f ? 1.f : 1.5f;
float kinterm = 1.f + reduceeffect * kc;
kinterm = kinterm <= 0.f ? 0.01f : kinterm;
WavCoeffs_L[dir][i] *= kinterm;
}
}

View File

@ -20,56 +20,56 @@
////////////////////////////////////////////////////////////////
#ifndef OPTHELPER_H
#define OPTHELPER_H
#define OPTHELPER_H
#ifdef __SSE2__
#include "sleefsseavx.c"
#ifdef __GNUC__
#if defined(WIN32) && !defined( __x86_64__ )
// needed for actual versions of GCC with 32-Bit Windows
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#else
#ifdef __SSE__
#ifdef __GNUC__
#if defined(WIN32) && !defined( __x86_64__ )
// needed for actual versions of GCC with 32-Bit Windows
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#endif
#ifdef __SSE2__
#include "sleefsseavx.c"
#ifdef __GNUC__
#if defined(WIN32) && !defined( __x86_64__ )
// needed for actual versions of GCC with 32-Bit Windows
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#else
#ifdef __SSE__
#ifdef __GNUC__
#if defined(WIN32) && !defined( __x86_64__ )
// needed for actual versions of GCC with 32-Bit Windows
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#else
#define SSEFUNCTION
#endif
#endif
#ifdef __GNUC__
#define RESTRICT __restrict__
#define LIKELY(x) __builtin_expect (!!(x), 1)
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
#define ALIGNED64 __attribute__ ((aligned (64)))
#define ALIGNED16 __attribute__ ((aligned (16)))
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define ALIGNED64
#define ALIGNED16
#endif
#else
#define RESTRICT
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#define ALIGNED64
#define ALIGNED16
#endif
#ifndef __clang__
#define _RT_NESTED_OPENMP _OPENMP
#endif
#ifdef __GNUC__
#define RESTRICT __restrict__
#define LIKELY(x) __builtin_expect (!!(x), 1)
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
#define ALIGNED64 __attribute__ ((aligned (64)))
#define ALIGNED16 __attribute__ ((aligned (16)))
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define ALIGNED64
#define ALIGNED16
#endif
#else
#define RESTRICT
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#define ALIGNED64
#define ALIGNED16
#endif
#ifndef __clang__
#define _RT_NESTED_OPENMP _OPENMP
#endif
#endif

View File

@ -24,6 +24,7 @@
#include <cstdio>
#include <cmath>
#include "LUT.h"
#include "coord.h"
class ParamsEdited;
@ -1251,7 +1252,7 @@ public:
ResizeParams resize; ///< Resize parameters
ColorManagementParams icm; ///< profiles/color spaces used during the image processing
RAWParams raw; ///< RAW parameters before demosaicing
WaveletParams wavelet; ///< wavelet wavelet parameters
WaveletParams wavelet; ///< Wavelet parameters
DirPyrEqualizerParams dirpyrequalizer; ///< directional pyramid wavelet parameters
HSVEqualizerParams hsvequalizer; ///< hsv wavelet parameters
FilmSimulationParams filmSimulation; ///< film simulation parameters

View File

@ -506,26 +506,26 @@ CAFocalInterpreter caFocalInterpreter;
class CALensInterpreter : public IntLensInterpreter< int >
{
public:
CALensInterpreter () // From EXIFTOOL database 'Canon.pm' V3.19
CALensInterpreter ()
{
choices.insert(p_t(1, "Canon EF 50mm f/1.8"));
choices.insert(p_t(2, "Canon EF 28mm f/2.8"));
choices.insert(p_t(3, "Canon EF 135mm f/2.8 Soft"));
choices.insert(p_t(4, "Canon EF 35-105mm f/3.5-4.5"));
choices.insert(p_t(4, "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens"));
choices.insert(p_t(4, "Sigma UC Zoom 35-135mm f/4-5.6"));
choices.insert(p_t(5, "Canon EF 35-70mm f/3.5-4.5"));
choices.insert(p_t(6, "Canon EF 28-70mm f/3.5-4.5"));
choices.insert(p_t(6, "Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens"));
choices.insert(p_t(6, "Sigma 18-50mm f/3.5-5.6 DC"));
choices.insert(p_t(6, "Sigma 18-125mm f/3.5-5.6 DC IF ASP"));
choices.insert(p_t(6, "Tokina AF 193-2 19-35mm f/3.5-4.5"));
choices.insert(p_t(6, "Sigma 28-80mm f/3.5-5.6 II Macro"));
choices.insert(p_t(7, "Canon EF 100-300mm f/5.6L"));
choices.insert(p_t(8, "Canon EF 100-300mm f/5.6"));
choices.insert(p_t(8, "Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens"));
choices.insert(p_t(8, "Sigma 70-300mm f/4-5.6 [APO] DG Macro"));
choices.insert(p_t(8, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6"));
choices.insert(p_t(9, "Canon EF 70-210mm f/4"));
choices.insert(p_t(9, "Sigma 55-200mm f/4-5.6 DC"));
choices.insert(p_t(10, "Canon EF 50mm f/2.5 Macro"));
choices.insert(p_t(10, "Canon EF 50mm f/2.5 Macro or Sigma Lens"));
choices.insert(p_t(10, "Sigma 50mm f/2.8 EX"));
choices.insert(p_t(10, "Sigma 28mm f/1.8"));
choices.insert(p_t(10, "Sigma 105mm f/2.8 Macro EX"));
@ -539,51 +539,59 @@ public:
choices.insert(p_t(18, "Canon EF 28-70mm f/3.5-4.5"));
choices.insert(p_t(20, "Canon EF 100-200mm f/4.5A"));
choices.insert(p_t(21, "Canon EF 80-200mm f/2.8L"));
choices.insert(p_t(22, "Canon EF 20-35mm f/2.8L"));
choices.insert(p_t(22, "Canon EF 20-35mm f/2.8L or Tokina Lens"));
choices.insert(p_t(22, "Tokina AT-X 280 AF Pro 28-80mm f/2.8 Aspherical"));
choices.insert(p_t(23, "Canon EF 35-105mm f/3.5-4.5"));
choices.insert(p_t(24, "Canon EF 35-80mm f/4-5.6 Power Zoom"));
choices.insert(p_t(25, "Canon EF 35-80mm f/4-5.6 Power Zoom"));
choices.insert(p_t(26, "Canon EF 100mm f/2.8 Macro"));
choices.insert(p_t(26, "Canon EF 100mm f/2.8 Macro or Other Lens"));
choices.insert(p_t(26, "Cosina 100mm f/3.5 Macro AF"));
choices.insert(p_t(26, "Tamron SP AF 90mm f/2.8 Di Macro"));
choices.insert(p_t(26, "Tamron SP AF 180mm f/3.5 Di Macro"));
choices.insert(p_t(26, "Carl Zeiss Planar T* 50mm f/1.4"));
choices.insert(p_t(27, "Canon EF 35-80mm f/4-5.6"));
choices.insert(p_t(28, "Canon EF 80-200mm f/4.5-5.6"));
choices.insert(p_t(28, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF Macro"));
choices.insert(p_t(28, "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens"));
choices.insert(p_t(28, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF"));
choices.insert(p_t(28, "Tamron AF 28-200mm f/3.8-5.6 Aspherical"));
choices.insert(p_t(28, "Tamron AF 70-300mm f/4.5-5.6 Di LD 1:2 Macro Zoom"));
choices.insert(p_t(28, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(28, "Tamron AF 70-300mm f/4-5.6 Di LD 1:2 Macro"));
choices.insert(p_t(28, "Tamron AF Aspherical 28-200mm f/3.8-5.6"));
choices.insert(p_t(29, "Canon EF 50mm f/1.8 II"));
choices.insert(p_t(30, "Canon EF 35-105mm f/4.5-5.6"));
choices.insert(p_t(31, "Canon EF 75-300mm f/4-5.6"));
choices.insert(p_t(31, "Canon EF 75-300mm f/4-5.6 or Tamron Lens"));
choices.insert(p_t(31, "Tamron SP AF 300mm f/2.8 LD IF"));
choices.insert(p_t(32, "Canon EF 24mm f/2.8"));
choices.insert(p_t(32, "Canon EF 24mm f/2.8 or Sigma Lens"));
choices.insert(p_t(32, "Sigma 15mm f/2.8 EX Fisheye"));
choices.insert(p_t(33, "Voigtlander or Carl Zeiss Lens"));
choices.insert(p_t(33, "Voigtlander Ultron 40mm f/2 SLII Aspherical"));
choices.insert(p_t(33, "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical"));
choices.insert(p_t(33, "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 15mm f/2.8 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 18mm f/3.5 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 21mm f/2.8 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 25mm f/2 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 28mm f/2 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/2 ZE"));
choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/1.4 ZE"));
choices.insert(p_t(33, "Carl Zeiss Planar T* 50mm f/1.4 ZE"));
choices.insert(p_t(33, "Carl Zeiss Makro-Planar T* 50mm f/2 ZE"));
choices.insert(p_t(33, "Carl Zeiss Makro-Planar T* 100mm f/2 ZE"));
choices.insert(p_t(33, "Carl Zeiss Apo-Sonnar T* 135mm f/2 ZE"));
choices.insert(p_t(35, "Canon EF 35-80mm f/4-5.6"));
choices.insert(p_t(36, "Canon EF 38-76mm f/4.5-5.6"));
choices.insert(p_t(37, "Canon EF 35-80mm f/4-5.6"));
choices.insert(p_t(37, "Canon EF 35-80mm f/4-5.6 or Tamron Lens"));
choices.insert(p_t(37, "Tamron 70-200mm f/2.8 Di LD IF Macro"));
choices.insert(p_t(37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical IF Macro (A20)"));
choices.insert(p_t(37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical IF"));
choices.insert(p_t(37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical IF Macro"));
choices.insert(p_t(37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20"));
choices.insert(p_t(37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]"));
choices.insert(p_t(37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro"));
choices.insert(p_t(38, "Canon EF 80-200mm f/4.5-5.6"));
choices.insert(p_t(39, "Canon EF 75-300mm f/4-5.6"));
choices.insert(p_t(40, "Canon EF 28-80mm f/3.5-5.6"));
choices.insert(p_t(41, "Canon EF 28-90mm f/4-5.6"));
choices.insert(p_t(42, "Canon EF 28-200mm f/3.5-5.6"));
choices.insert(p_t(42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical IF Macro (A20)"));
choices.insert(p_t(42, "Canon EF 28-200mm f/3.5-5.6 or Tamron Lens"));
choices.insert(p_t(42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20"));
choices.insert(p_t(43, "Canon EF 28-105mm f/4-5.6"));
choices.insert(p_t(44, "Canon EF 90-300mm f/4.5-5.6"));
choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6 II"));
choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6 [II]"));
choices.insert(p_t(46, "Canon EF 28-90mm f/4-5.6"));
choices.insert(p_t(48, "Canon EF-S 18-55mm f/3.5-5.6 IS"));
choices.insert(p_t(49, "Canon EF-S 55-250mm f/4-5.6 IS"));
@ -593,18 +601,18 @@ public:
choices.insert(p_t(53, "Canon EF-S 18-55mm f/3.5-5.6 III"));
choices.insert(p_t(54, "Canon EF-S 55-250mm f/4-5.6 IS II"));
choices.insert(p_t(94, "Canon TS-E 17mm f/4L"));
choices.insert(p_t(95, "Canon TS-E 24mm f/3.5 L II"));
choices.insert(p_t(95, "Canon TS-E 24.0mm f/3.5 L II"));
choices.insert(p_t(124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo"));
choices.insert(p_t(125, "Canon TS-E 24mm f/3.5L"));
choices.insert(p_t(126, "Canon TS-E 45mm f/2.8"));
choices.insert(p_t(127, "Canon TS-E 90mm f/2.8"));
choices.insert(p_t(129, "Canon EF 300mm f/2.8L"));
choices.insert(p_t(130, "Canon EF 50mm f/1.0L"));
choices.insert(p_t(131, "Canon EF 28-80mm f/2.8-4L"));
choices.insert(p_t(131, "Canon EF 28-80mm f/2.8-4L or Sigma Lens"));
choices.insert(p_t(131, "Sigma 8mm f/3.5 EX DG Circular Fisheye"));
choices.insert(p_t(131, "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM"));
choices.insert(p_t(131, "Sigma 17-70mm f/2.8-4.5 DC Macro"));
choices.insert(p_t(131, "Sigma APO 50-150mm f/2.8 EX DC HSM II"));
choices.insert(p_t(131, "Sigma APO 50-150mm f/2.8 [II] EX DC HSM"));
choices.insert(p_t(131, "Sigma APO 120-300mm f/2.8 EX DG HSM"));
choices.insert(p_t(131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"));
choices.insert(p_t(131, "Sigma 70-200mm f/2.8 APO EX HSM"));
@ -612,7 +620,7 @@ public:
choices.insert(p_t(134, "Canon EF 600mm f/4L IS"));
choices.insert(p_t(135, "Canon EF 200mm f/1.8L"));
choices.insert(p_t(136, "Canon EF 300mm f/2.8L"));
choices.insert(p_t(137, "Canon EF 85mm f/1.2L"));
choices.insert(p_t(137, "Canon EF 85mm f/1.2L or Sigma or Tamron Lens"));
choices.insert(p_t(137, "Sigma 18-50mm f/2.8-4.5 DC OS HSM"));
choices.insert(p_t(137, "Sigma 50-200mm f/4-5.6 DC OS HSM"));
choices.insert(p_t(137, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"));
@ -627,6 +635,8 @@ public:
choices.insert(p_t(137, "Tamron SP 60mm f/2 Macro Di II"));
choices.insert(p_t(137, "Sigma 10-20mm f/3.5 EX DC HSM"));
choices.insert(p_t(137, "Tamron SP 24-70mm f/2.8 Di VC USD"));
choices.insert(p_t(137, "Sigma 18-35mm f/1.8 DC HSM"));
choices.insert(p_t(137, "Sigma 12-24mm f/4.5-5.6 DG HSM II"));
choices.insert(p_t(138, "Canon EF 28-80mm f/2.8-4L"));
choices.insert(p_t(139, "Canon EF 400mm f/2.8L"));
choices.insert(p_t(140, "Canon EF 500mm f/4.5L"));
@ -639,85 +649,96 @@ public:
choices.insert(p_t(147, "Canon EF 35-135mm f/4-5.6 USM"));
choices.insert(p_t(148, "Canon EF 28-80mm f/3.5-5.6 USM"));
choices.insert(p_t(149, "Canon EF 100mm f/2 USM"));
choices.insert(p_t(150, "Canon EF 14mm f/2.8L"));
choices.insert(p_t(150, "Sigma 20mm f/1.8 EX"));
choices.insert(p_t(150, "Sigma 24mm f/1.8 DG Macro EX"));
choices.insert(p_t(150, "Canon EF 14mm f/2.8L or Sigma Lens"));
choices.insert(p_t(150, "Sigma 20mm EX f/1.8"));
choices.insert(p_t(150, "Sigma 30mm f/1.4 DC HSM"));
choices.insert(p_t(150, "Sigma 24mm f/1.8 DG Macro EX"));
choices.insert(p_t(150, "Sigma 28mm f/1.8 DG Macro EX"));
choices.insert(p_t(151, "Canon EF 200mm f/2.8L"));
choices.insert(p_t(152, "Canon EF 300mm f/4L IS"));
choices.insert(p_t(152, "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"));
choices.insert(p_t(152, "Canon EF 300mm f/4L IS or Sigma Lens"));
choices.insert(p_t(152, "Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM"));
choices.insert(p_t(152, "Sigma 14mm f/2.8 EX Aspherical HSM"));
choices.insert(p_t(152, "Sigma 10-20mm f/4-5.6"));
choices.insert(p_t(152, "Sigma 100-300mm f/4"));
choices.insert(p_t(153, "Canon EF 35-350mm f/3.5-5.6L"));
choices.insert(p_t(153, "Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens"));
choices.insert(p_t(153, "Sigma 50-500mm f/4-6.3 APO HSM EX"));
choices.insert(p_t(153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical IF Macro"));
choices.insert(p_t(153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical IF Macro (A14)"));
choices.insert(p_t(153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical IF Macro"));
choices.insert(p_t(153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro"));
choices.insert(p_t(153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14"));
choices.insert(p_t(153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro"));
choices.insert(p_t(154, "Canon EF 20mm f/2.8 USM"));
choices.insert(p_t(155, "Canon EF 85mm f/1.8 USM"));
choices.insert(p_t(156, "Canon EF 28-105mm f/3.5-4.5 USM"));
choices.insert(p_t(156, "Tamron SP 70-300mm f/4-5.6 Di VC USD"));
choices.insert(p_t(160, "Canon EF 20-35mm f/3.5-4.5 USM"));
choices.insert(p_t(156, "Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens"));
choices.insert(p_t(156, "Tamron SP 70-300mm f/4.0-5.6 Di VC USD"));
choices.insert(p_t(160, "Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens"));
choices.insert(p_t(160, "Tamron AF 19-35mm f/3.5-4.5"));
choices.insert(p_t(160, "Tokina AT-X 124 AF Pro DX 12-24mm f/4"));
choices.insert(p_t(160, "Tokina AT-X 107 AF DX 10-17mm f/3.5-4.5 Fisheye"));
choices.insert(p_t(160, "Tokina AT-X 116 AF Pro DX 11-16mm f/2.8"));
choices.insert(p_t(161, "Canon EF 28-70mm f/2.8L"));
choices.insert(p_t(161, "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens"));
choices.insert(p_t(161, "Sigma 24-70mm f/2.8 EX"));
choices.insert(p_t(161, "Sigma 28-70mm f/2.8 EX"));
choices.insert(p_t(161, "Sigma 24-60mm f/2.8 EX DG"));
choices.insert(p_t(161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical"));
choices.insert(p_t(161, "Tamron 90mm f/2.8"));
choices.insert(p_t(161, "Sigma 24-60mm f/2.8 EX DG"));
choices.insert(p_t(161, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"));
choices.insert(p_t(161, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(162, "Canon EF 200mm f/2.8L"));
choices.insert(p_t(163, "Canon EF 300mm f/4L"));
choices.insert(p_t(164, "Canon EF 400mm f/5.6L"));
choices.insert(p_t(165, "Canon EF 70-200mm f/2.8 L"));
choices.insert(p_t(166, "Canon EF 70-200mm f/2.8 L + x1.4"));
choices.insert(p_t(167, "Canon EF 70-200mm f/2.8 L + x2"));
choices.insert(p_t(166, "Canon EF 70-200mm f/2.8 L + 1.4x"));
choices.insert(p_t(167, "Canon EF 70-200mm f/2.8 L + 2x"));
choices.insert(p_t(168, "Canon EF 28mm f/1.8 USM"));
choices.insert(p_t(169, "Canon EF 17-35mm f/2.8L"));
choices.insert(p_t(169, "Canon EF 17-35mm f/2.8L or Sigma Lens"));
choices.insert(p_t(169, "Sigma 18-200mm f/3.5-6.3 DC OS"));
choices.insert(p_t(169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical"));
choices.insert(p_t(169, "Sigma 18-50mm f/2.8 Macro"));
choices.insert(p_t(169, "Sigma 30mm f/1.4 EX DC HSM"));
choices.insert(p_t(169, "Sigma 50mm f/1.4 EX DG HSM"));
choices.insert(p_t(169, "Sigma 85mm f/1.4 EX DG HSM"));
choices.insert(p_t(169, "Sigma 30mm f/1.4 EX DC HSM"));
choices.insert(p_t(169, "Sigma 35mm f/1.4 DG HSM"));
choices.insert(p_t(170, "Canon EF 200mm f/2.8L II"));
choices.insert(p_t(171, "Canon EF 300mm f/4L"));
choices.insert(p_t(172, "Canon EF 400mm f/5.6L"));
choices.insert(p_t(173, "Canon EF 180mm f/3.5L Macro"));
choices.insert(p_t(173, "Sigma 180mm f/3.5 EX HSM Macro"));
choices.insert(p_t(173, "Sigma APO 150mm f/2.8 EX DG HSM Macro"));
choices.insert(p_t(174, "Canon EF 135mm f/2L"));
choices.insert(p_t(172, "Canon EF 400mm f/5.6L or Sigma Lens"));
choices.insert(p_t(172, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"));
choices.insert(p_t(173, "Canon EF 180mm Macro f/3.5L or Sigma Lens"));
choices.insert(p_t(173, "Sigma 180mm EX HSM Macro f/3.5"));
choices.insert(p_t(173, "Sigma APO Macro 150mm f/2.8 EX DG HSM"));
choices.insert(p_t(174, "Canon EF 135mm f/2L or Sigma Lens"));
choices.insert(p_t(174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM"));
choices.insert(p_t(174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"));
choices.insert(p_t(174, "Sigma 150-500mm f/5-6.3 APO DG OS HSM"));
choices.insert(p_t(175, "Canon EF 400mm f/2.8L"));
choices.insert(p_t(176, "Canon EF 24-85mm f/3.5-4.5 USM"));
choices.insert(p_t(177, "Canon EF 300mm f/4L IS"));
choices.insert(p_t(178, "Canon EF 28-135mm f/3.5-5.6 IS"));
choices.insert(p_t(179, "Canon EF 24mm f/1.4L"));
choices.insert(p_t(180, "Canon EF 35mm f/1.4L"));
choices.insert(p_t(181, "Canon EF 100-400mm f/4.5-5.6L IS + x1.4"));
choices.insert(p_t(182, "Canon EF 100-400mm f/4.5-5.6L IS + x2"));
choices.insert(p_t(183, "Canon EF 100-400mm f/4.5-5.6L IS"));
choices.insert(p_t(180, "Canon EF 35mm f/1.4L or Sigma Lens"));
choices.insert(p_t(180, "Sigma 50mm f/1.4 DG HSM | A"));
choices.insert(p_t(180, "Sigma 24mm f/1.4 DG HSM | A"));
choices.insert(p_t(181, "Canon EF 100-400mm f/4.5-5.6L IS + 1.4x"));
choices.insert(p_t(182, "Canon EF 100-400mm f/4.5-5.6L IS + 2x"));
choices.insert(p_t(183, "Canon EF 100-400mm f/4.5-5.6L IS or Sigma Lens"));
choices.insert(p_t(183, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro"));
choices.insert(p_t(183, "Sigma 105mm f/2.8 EX DG OS HSM Macro"));
choices.insert(p_t(184, "Canon EF 400mm f/2.8L + x2"));
choices.insert(p_t(183, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro"));
choices.insert(p_t(183, "Sigma 150-600mm f/5-6.3 DG OS HSM | C"));
choices.insert(p_t(184, "Canon EF 400mm f/2.8L + 2x"));
choices.insert(p_t(185, "Canon EF 600mm f/4L IS"));
choices.insert(p_t(186, "Canon EF 70-200mm f/4L"));
choices.insert(p_t(187, "Canon EF 70-200mm f/4L + 1.4x"));
choices.insert(p_t(188, "Canon EF 70-200mm f/4L + 2x"));
choices.insert(p_t(189, "Canon EF 70-200mm f/4L + 2.8x"));
choices.insert(p_t(190, "Canon EF 100mm f/2.8 Macro"));
choices.insert(p_t(190, "Canon EF 100mm f/2.8 Macro USM"));
choices.insert(p_t(191, "Canon EF 400mm f/4 DO IS"));
choices.insert(p_t(193, "Canon EF 35-80mm f/4-5.6 USM"));
choices.insert(p_t(194, "Canon EF 80-200mm f/4.5-5.6 USM"));
choices.insert(p_t(195, "Canon EF 35-105mm f/4.5-5.6 USM"));
choices.insert(p_t(196, "Canon EF 75-300mm f/4-5.6 USM"));
choices.insert(p_t(197, "Canon EF 75-300mm f/4-5.6 IS USM"));
choices.insert(p_t(198, "Canon EF 50mm f/1.4 USM"));
choices.insert(p_t(198, "Canon EF 50mm f/1.4 USM or Zeiss Lens"));
choices.insert(p_t(198, "Zeiss Otus 55mm f/1.4 ZE"));
choices.insert(p_t(198, "Zeiss Otus 85mm f/1.4 ZE"));
choices.insert(p_t(199, "Canon EF 28-80mm f/3.5-5.6 USM"));
choices.insert(p_t(200, "Canon EF 75-300mm f/4-5.6 USM"));
choices.insert(p_t(201, "Canon EF 28-80mm f/3.5-5.6 USM"));
@ -727,20 +748,24 @@ public:
choices.insert(p_t(210, "Canon EF 28-90mm f/4-5.6 USM"));
choices.insert(p_t(211, "Canon EF 28-200mm f/3.5-5.6 USM"));
choices.insert(p_t(212, "Canon EF 28-105mm f/4-5.6 USM"));
choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6 USM"));
choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6 USM or Tamron Lens"));
choices.insert(p_t(213, "Tamron SP 150-600mm f/5-6.3 Di VC USD"));
choices.insert(p_t(213, "Tamron 16-300mm f/3.5-6.3 Di II VC PZD Macro"));
choices.insert(p_t(214, "Canon EF-S 18-55mm f/3.5-5.6 USM"));
choices.insert(p_t(215, "Canon EF 55-200mm f/4.5-5.6 II USM"));
choices.insert(p_t(217, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD"));
choices.insert(p_t(224, "Canon EF 70-200mm f/2.8L IS"));
choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS + x1.4"));
choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS + x2"));
choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + x2.8"));
choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS + 1.4x"));
choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS + 2x"));
choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + 2.8x"));
choices.insert(p_t(228, "Canon EF 28-105mm f/3.5-4.5 USM"));
choices.insert(p_t(229, "Canon EF 16-35mm f/2.8L"));
choices.insert(p_t(230, "Canon EF 24-70mm f/2.8L"));
choices.insert(p_t(231, "Canon EF 17-40mm f/4L"));
choices.insert(p_t(232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM"));
choices.insert(p_t(233, "Canon EF 28-300mm f/3.5-5.6L IS"));
choices.insert(p_t(234, "Canon EF-S 17-85mm f4-5.6 IS USM"));
choices.insert(p_t(234, "Canon EF-S 17-85mm f/4-5.6 IS USM or Tokina Lens"));
choices.insert(p_t(234, "Tokina AT-X 12-28mm f/4 PRO DX"));
choices.insert(p_t(235, "Canon EF-S 10-22mm f/3.5-4.5 USM"));
choices.insert(p_t(236, "Canon EF-S 60mm f/2.8 Macro USM"));
choices.insert(p_t(237, "Canon EF 24-105mm f/4L IS"));
@ -756,30 +781,45 @@ public:
choices.insert(p_t(247, "Canon EF 14mm f/2.8L II USM"));
choices.insert(p_t(248, "Canon EF 200mm f/2L IS"));
choices.insert(p_t(249, "Canon EF 800mm f/5.6L IS"));
choices.insert(p_t(250, "Canon EF 24mm f/1.4L II"));
choices.insert(p_t(250, "Canon EF 24 f/1.4L II"));
choices.insert(p_t(251, "Canon EF 70-200mm f/2.8L IS II USM"));
choices.insert(p_t(252, "Canon EF 70-200mm f/2.8L IS II USM + x1.4"));
choices.insert(p_t(253, "Canon EF 70-200mm f/2.8L IS II USM + x2"));
choices.insert(p_t(252, "Canon EF 70-200mm f/2.8L IS II USM + 1.4x"));
choices.insert(p_t(253, "Canon EF 70-200mm f/2.8L IS II USM + 2x"));
choices.insert(p_t(254, "Canon EF 100mm f/2.8L Macro IS USM"));
choices.insert(p_t(255, "Sigma 24-105mm f/4 DG OS HSM | A or Other Sigma Lens"));
choices.insert(p_t(255, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro"));
choices.insert(p_t(488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM"));
choices.insert(p_t(489, "Canon EF 70-300mm f/4-5.6L IS USM"));
choices.insert(p_t(490, "Canon EF 8-15mm f/4L USM"));
choices.insert(p_t(490, "Canon EF 8-15mm f/4L Fisheye USM"));
choices.insert(p_t(491, "Canon EF 300mm f/2.8L IS II USM"));
choices.insert(p_t(492, "Canon EF 400mm f/2.8L IS II USM"));
choices.insert(p_t(493, "Canon EF 500mm f/4L IS II USM or EF 24-105mm f4L IS USM"));
choices.insert(p_t(493, "Canon EF 24-105mm f/4L IS USM"));
choices.insert(p_t(494, "Canon EF 600mm f/4.0L IS II USM"));
choices.insert(p_t(495, "Canon EF 24-70mm f/2.8L II USM"));
choices.insert(p_t(496, "Canon EF 200-400mm f/4L IS USM"));
choices.insert(p_t(499, "Canon EF 200-400mm f/4L IS USM + 1.4x"));
choices.insert(p_t(502, "Canon EF 28mm f/2.8 IS USM"));
choices.insert(p_t(503, "Canon EF 24mm f/2.8 IS USM"));
choices.insert(p_t(504, "Canon EF 24-70mm f/4L IS USM"));
choices.insert(p_t(505, "Canon EF 35mm f/2 IS USM"));
choices.insert(p_t(506, "Canon EF 400mm f/4 DO IS II USM"));
choices.insert(p_t(507, "Canon EF 16-35mm f/4L IS USM"));
choices.insert(p_t(508, "Canon EF 11-24mm f/4L USM"));
choices.insert(p_t(747, "Canon EF 100-400mm f/4.5-5.6L IS II USM"));
choices.insert(p_t(4142, "Canon EF-S 18-135mm f/3.5-5.6 IS STM"));
choices.insert(p_t(4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM"));
choices.insert(p_t(4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM or Tamron Lens"));
choices.insert(p_t(4143, "Tamron 18-200mm f/3.5-6.3 Di III VC"));
choices.insert(p_t(4144, "Canon EF 40mm f/2.8 STM"));
choices.insert(p_t(4145, "Canon EF-M 22mm f/2 STM"));
choices.insert(p_t(4146, "Canon EF-S 18-55mm f/3.5-5.6 IS STM"));
choices.insert(p_t(4147, "Canon EF-M 11-22mm f/4-5.6 IS STM"));
choices.insert(p_t(4148, "Canon EF-S 55-250mm f/4-5.6 IS STM"));
choices.insert(p_t(4149, "Canon EF-M 55-200mm f/4.5-6.3 IS STM"));
choices.insert(p_t(4150, "Canon EF-S 10-18mm f/4.5-5.6 IS STM"));
choices.insert(p_t(4152, "Canon EF 24-105mm f/3.5-5.6 IS STM"));
choices.insert(p_t(4154, "Canon EF-S 24mm f/2.8 STM"));
choices.insert(p_t(4156, "Canon EF 50mm f/1.8 STM"));
}
virtual std::string toString (Tag* t)

View File

@ -318,7 +318,7 @@ class NALensDataInterpreter : public Interpreter
{
std::map<std::string, std::string> lenses;
public:
NALensDataInterpreter () // From EXIFTOOL database 'Nikon.pm' V2.80
NALensDataInterpreter ()
{
/* The key is a composite string made of 8 HEX bytes
* LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */
@ -327,94 +327,100 @@ public:
lenses["00 00 00 00 00 00 F1 0C"] = "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x";
lenses["00 00 00 00 00 00 F2 18"] = "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x";
lenses["00 00 48 48 53 53 00 01"] = "Loreo 40mm f/11-22 3D Lens in a Cap 9005";
lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF)";
lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 PRO DX AF 12-24mm f/4";
lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF)";
lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)";
lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro";
lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di";
lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)";
lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 AF PRO DX (AF 12-24mm f/4)";
lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF) (A08)";
lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) (A14)";
lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14)";
lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di (A08)";
lenses["00 40 11 11 2C 2C 00 00"] = "Samyang 8mm f/3.5 Fish-Eye";
lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 DX Fish-Eye AF 10-17mm f/3.5-4.5";
lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX AF 16.5-135mm f/3.5-5.6";
lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 PRO AF 17mm f/3.5";
lenses["00 40 2D 2D 2C 2C 00 00"] = "Carl Zeiss Distagon T* 18mm f/3.5 ZF.2";
lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 AF DX Fisheye (AF 10-17mm f/3.5-4.5)";
lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX (AF 16.5-135mm f/3.5-5.6)";
lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 AF PRO (AF 17mm f/3.5)";
lenses["00 40 2D 2D 2C 2C 00 00"] = "Carl Zeiss Distagon T* 3.5/18 ZF.2";
lenses["00 40 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)";
lenses["00 40 2D 88 2C 40 00 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)";
lenses["00 40 2D 88 2C 40 62 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)";
lenses["00 40 31 31 2C 2C 00 00"] = "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical";
lenses["00 40 37 80 2C 3C 00 02"] = "Tokina AT-X 242 AF 24-200mm f/3.5-5.6";
lenses["00 40 37 80 2C 3C 00 02"] = "Tokina AT-X 242 AF (AF 24-200mm f/3.5-5.6)";
lenses["00 40 64 64 2C 2C 00 00"] = "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus";
lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840D 80-400mm f/4.5-5.6";
lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840 D (AF 80-400mm f/4.5-5.6)";
lenses["00 47 10 10 24 24 00 00"] = "Fisheye Nikkor 8mm f/2.8 AiS";
lenses["00 47 25 25 24 24 00 02"] = "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)";
lenses["00 47 3C 3C 24 24 00 00"] = "Nikkor 28mm f/2.8 AiS";
lenses["00 47 44 44 24 24 00 06"] = "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)";
lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF 55-200mm f/4-5.6 Di II LD";
lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX AF 11-16mm f/2.8";
lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 PRO FX AF 16-28mm f/2.8";
lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX AF 16-50mm f/2.8";
lenses["00 48 32 32 24 24 00 00"] = "Carl Zeiss Distagon T* 21mm f/2.8 ZF.2";
lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 PRO AF 28-80mm f/2.8 Aspherical";
lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF 28-105mm f/2.8";
lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF 55-200mm f/4-5.6 Di II LD (A15)";
lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX (AF 11-16mm f/2.8)";
lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)";
lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX (AF 16-50mm f/2.8)";
lenses["00 48 32 32 24 24 00 00"] = "Carl Zeiss Distagon T* 2.8/21 ZF.2";
lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 AF PRO (AF 28-80mm f/2.8)";
lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF (176D)";
lenses["00 48 50 50 18 18 00 00"] = "Nikkor H 50mm f/2";
lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX AF 50-135mm f/2.8";
lenses["00 48 5C 8E 30 3C 00 06"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17)";
lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX (AF 50-135mm f/2.8)";
lenses["00 48 5C 8E 30 3C 00 06"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17NII)";
lenses["00 48 68 68 24 24 00 00"] = "Series E 100mm f/2.8";
lenses["00 48 80 80 30 30 00 00"] = "Nikkor 200mm f/4 AiS";
lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5";
lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)";
lenses["00 4C 6A 6A 20 20 00 00"] = "Nikkor 105mm f/2.5 AiS";
lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model (B01)";
lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 (A16)";
lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)";
lenses["00 54 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)";
lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 28mm f/2 ZF.2";
lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 2/28 ZF.2";
lenses["00 54 44 44 0C 0C 00 00"] = "Nikkor 35mm f/1.4 AiS";
lenses["00 54 44 44 18 18 00 00"] = "Carl Zeiss Distagon T* 35mm f/2 ZF.2";
lenses["00 54 44 44 18 18 00 00"] = "Carl Zeiss Distagon T* 2/35 ZF.2";
lenses["00 54 48 48 18 18 00 00"] = "Voigtlander Ultron 40mm f/2 SLII Aspherical";
lenses["00 54 50 50 0C 0C 00 00"] = "Carl Zeiss Planar T* 50mm f/1.4 ZF.2";
lenses["00 54 50 50 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 50mm f/2 ZF.2";
lenses["00 54 50 50 0C 0C 00 00"] = "Carl Zeiss Planar T* 1.4/50 ZF.2";
lenses["00 54 50 50 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 2/50 ZF.2";
lenses["00 54 53 53 0C 0C 00 00"] = "Zeiss Otus 1.4/55";
lenses["00 54 55 55 0C 0C 00 00"] = "Voigtlander Nokton 58mm f/1.4 SLII";
lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm f/4 UV-VIS-IR Macro Apo";
lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 85mm f/1.4 ZF.2";
lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 100mm f/2 ZF.2";
lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D 100mm f/2.8 Macro";
lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 PRO AF 300mm f/2.8";
lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo";
lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 1.4/85 ZF.2";
lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 2/100 ZF.2";
lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)";
lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 AF PRO (AF 300mm f/2.8)";
lenses["00 57 50 50 14 14 00 00"] = "Nikkor 50mm f/1.8 AI";
lenses["00 58 64 64 20 20 00 00"] = "Soligor C/D Macro MC 90mm f/2.5";
lenses["01 00 00 00 00 00 02 00"] = "AF Teleconverter TC-16A 1.6x";
lenses["01 00 00 00 00 00 08 00"] = "AF Teleconverter TC-16A 1.6x";
lenses["01 00 00 00 00 00 02 00"] = "TC-16A";
lenses["01 00 00 00 00 00 08 00"] = "TC-16A";
lenses["01 58 50 50 14 14 02 00"] = "AF Nikkor 50mm f/1.8";
lenses["01 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8";
lenses["02 2F 98 98 3D 3D 02 00"] = "Sigma APO 400mm f/5.6";
lenses["02 34 A0 A0 44 44 02 00"] = "Sigma APO 500mm f/7.2";
lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma APO 75-300mm f/4.5-5.6";
lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma 75-300mm f/4.5-5.6 APO";
lenses["02 37 A0 A0 34 34 02 00"] = "Sigma APO 500mm f/4.5";
lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm f/4-5.6";
lenses["02 3A 37 50 31 3D 02 00"] = "Sigma 24-50mm f/4-5.6 UC";
lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm f/4.0-5.6";
lenses["02 3B 44 61 30 3D 02 00"] = "Sigma 35-80mm f/4-5.6";
lenses["02 3C B0 B0 3C 3C 02 00"] = "Sigma APO 800mm f/5.6";
lenses["02 3F 24 24 2C 2C 02 00"] = "Sigma 14mm f/3.5";
lenses["02 3F 3C 5C 2D 35 02 00"] = "Sigma 28-70mm f/3.5-4.5 UC";
lenses["02 40 44 5C 2C 34 02 00"] = "Exakta AF 35-70mm f/3.5-4.5 MC";
lenses["02 40 44 5C 2C 34 02 00"] = "Exakta AF 35-70mm 1:3.5-4.5 MC";
lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm f/3.5-4.5 a";
lenses["02 40 5C 82 2C 35 02 00"] = "Sigma APO 70-210mm f/3.5-4.5";
lenses["02 42 44 5C 2A 34 02 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5";
lenses["02 42 44 5C 2A 34 08 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5";
lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Super Wide II Macro";
lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm f/2.8";
lenses["02 46 5C 82 25 25 02 00"] = "Sigma 70-210mm f/2.8 APO";
lenses["02 48 50 50 24 24 02 00"] = "Sigma 50mm f/2.8 Macro";
lenses["02 48 65 65 24 24 02 00"] = "Sigma 90mm f/2.8 Macro";
lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D Zoom UMCS 70-210mm f/4.5";
lenses["02 48 50 50 24 24 02 00"] = "Sigma Macro 50mm f/2.8";
lenses["02 48 65 65 24 24 02 00"] = "Sigma Macro 90mm f/2.8";
lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D Zoom UMCS 70-210mm 1:4.5";
lenses["03 48 5C 81 30 30 02 00"] = "AF Zoom-Nikkor 70-210mm f/4";
lenses["04 48 3C 3C 24 24 03 00"] = "AF Nikkor 28mm f/2.8";
lenses["05 54 50 50 0C 0C 04 00"] = "AF Nikkor 50mm f/1.4";
lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina AF 100mm f/3.5 Macro";
lenses["06 54 53 53 24 24 06 00"] = "AF Micro-Nikkor 55mm f/2.8";
lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro";
lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm f/3.5-4.5 MC";
lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm 1:3.5-4.5 MC";
lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)";
lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)";
lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)";
lenses["07 40 3C 62 2C 34 03 00"] = "AF Zoom-Nikkor 28-85mm f/3.5-4.5";
lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)";
lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm f/2.8-3.8 MC";
lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD AF 28-70mm f/2.8-4.5";
lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF 28-70mm f/2.8";
lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD (AF 28-70mm f/2.8-4.5)";
lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF (AF 28-70mm f/2.8)";
lenses["08 40 44 6A 2C 34 04 00"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5";
lenses["09 48 37 37 24 24 04 00"] = "AF Nikkor 24mm f/2.8";
lenses["0A 48 8E 8E 24 24 03 00"] = "AF Nikkor 300mm f/2.8 IF-ED";
@ -430,18 +436,19 @@ public:
lenses["10 48 8E 8E 30 30 08 00"] = "AF Nikkor 300mm f/4 IF-ED";
lenses["11 48 44 5C 24 24 08 00"] = "AF Zoom-Nikkor 35-70mm f/2.8";
lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro";
lenses["12 36 69 97 35 42 09 00"] = "Soligor AF Zoom 100-400mm f/4.5-6.7 MC";
lenses["12 36 69 97 35 42 09 00"] = "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC";
lenses["12 38 69 97 35 42 09 02"] = "Promaster Spectrum 7 100-400mm f/4.5-6.7";
lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro";
lenses["12 3B 68 8D 3D 43 09 02"] = "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro";
lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 SD AF 400mm f/5.6";
lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 AF SD (AF 400mm f/5.6)";
lenses["12 3D 3C 80 2E 3C DF 02"] = "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)";
lenses["12 44 5E 8E 34 3C 09 00"] = "Tokina 730 AF 75-300mm f/4.5-5.6";
lenses["12 44 5E 8E 34 3C 09 00"] = "Tokina AF 730 (AF 75-300mm f/4.5-5.6)";
lenses["12 48 5C 81 30 3C 09 00"] = "AF Nikkor 70-210mm f/4-5.6";
lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm f/4-5.6 UMCS";
lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS";
lenses["13 42 37 50 2A 34 0B 00"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5";
lenses["14 48 60 80 24 24 0B 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED";
lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF II 100-300mm f/4";
lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF 80-200mm f/2.8";
lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF (AF 100-300mm f/4)";
lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF (AF 80-200mm f/2.8)";
lenses["15 4C 62 62 14 14 0C 00"] = "AF Nikkor 85mm f/1.8";
lenses["17 3C A0 A0 30 30 0F 00"] = "Nikkor 500mm f/4 P ED IF";
lenses["17 3C A0 A0 30 30 11 00"] = "Nikkor 500mm f/4 P ED IF";
@ -461,13 +468,14 @@ public:
lenses["22 48 72 72 18 18 16 00"] = "AF DC-Nikkor 135mm f/2";
lenses["22 53 64 64 24 24 E0 02"] = "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)";
lenses["23 30 BE CA 3C 48 17 00"] = "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF";
lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF II 80-400mm f/4.5-5.6";
lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF-II (AF 80-400mm f/4.5-5.6)";
lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED";
lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO 80-200mm f/2.8";
lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO (AF 80-200mm f/2.8)";
lenses["25 44 44 8E 34 42 1B 02"] = "Tokina AF 353 (AF 35-300mm f/4.5-6.7)";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 270 AF PRO II 28-70mm f/2.6-2.8";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV 28-70mm f/2.8";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV (AF 28-70mm f/2.8)";
lenses["25 48 44 5C 24 24 1B 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D";
lenses["25 48 44 5C 24 24 3A 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D";
lenses["25 48 44 5C 24 24 52 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D";
lenses["26 3C 54 80 30 3C 1C 06"] = "Sigma 55-200mm f/4-5.6 DC";
lenses["26 3C 5C 82 30 3C 1C 02"] = "Sigma 70-210mm f/4-5.6 UC-II";
@ -475,7 +483,7 @@ public:
lenses["26 3C 98 98 3C 3C 1C 02"] = "Sigma APO Tele Macro 400mm f/5.6";
lenses["26 3D 3C 80 2F 3D 1C 02"] = "Sigma 28-300mm f/3.8-5.6 Aspherical";
lenses["26 3E 3C 6A 2E 3C 1C 02"] = "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF";
lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm f/3.5-4.5 EX Aspherical DG DF";
lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical DF";
lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical";
lenses["26 40 2D 50 2C 3C 1C 06"] = "Sigma 18-50mm f/3.5-5.6 DC";
lenses["26 40 2D 70 2B 3C 1C 06"] = "Sigma 18-125mm f/3.5-5.6 DC";
@ -491,26 +499,26 @@ public:
lenses["26 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro";
lenses["26 44 73 98 34 3C 1C 02"] = "Sigma 135-400mm f/4.5-5.6 APO Aspherical";
lenses["26 48 11 11 30 30 1C 02"] = "Sigma 8mm f/4 EX Circular Fisheye";
lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fish-Eye";
lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fisheye";
lenses["26 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC";
lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm f/2.8";
lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG";
lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG";
lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 DG High Speed Zoom";
lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 DG";
lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm f/2.8-4 Aspherical";
lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO Tele Macro 300mm f/4";
lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm f/2.8-4 EX Aspherical";
lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm f/2.8-4.5";
lenses["26 54 3C 5C 24 24 1C 02"] = "Sigma 28-70mm f/2.8 EX";
lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm f/1.8 EX Aspherical DG DF RF";
lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX Aspherical DG DF MACRO";
lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm f/1.8 EX DG DF";
lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm f/1.8 EX DG Aspherical RF";
lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro";
lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm f/1.8 EX DG Aspherical Macro";
lenses["27 48 8E 8E 24 24 1D 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED";
lenses["27 48 8E 8E 24 24 E1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E";
lenses["27 48 8E 8E 24 24 F1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E";
lenses["27 48 8E 8E 24 24 F2 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E";
lenses["27 48 8E 8E 30 30 1D 02"] = "Tokina AT-X 304 AF 300mm f/4";
lenses["27 48 8E 8E 30 30 1D 02"] = "Tokina AT-X 304 AF (AF 300mm f/4.0)";
lenses["27 54 8E 8E 24 24 1D 02"] = "Tamron SP AF 300mm f/2.8 LD-IF (360E)";
lenses["28 3C A6 A6 30 30 1D 02"] = "AF-I Nikkor 600mm f/4D IF-ED";
lenses["28 3C A6 A6 30 30 E1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-17E";
@ -522,8 +530,8 @@ public:
lenses["2D 48 80 80 30 30 21 02"] = "AF Micro-Nikkor 200mm f/4D IF-ED";
lenses["2E 48 5C 82 30 3C 22 02"] = "AF Nikkor 70-210mm f/4-5.6D";
lenses["2E 48 5C 82 30 3C 28 02"] = "AF Nikkor 70-210mm f/4-5.6D";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II 20-35mm f/3.5-4.5";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 193 19-35mm f/3.5-4.5";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II (AF 20-35mm f/3.5-4.5)";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 193 (AF 19-35mm f/3.5-4.5)";
lenses["2F 48 30 44 24 24 29 02"] = "AF Zoom-Nikkor 20-35mm f/2.8D IF";
lenses["2F 48 30 44 24 24 29 02"] = "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)";
lenses["30 48 98 98 24 24 24 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED";
@ -531,10 +539,10 @@ public:
lenses["30 48 98 98 24 24 F1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E";
lenses["30 48 98 98 24 24 F2 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E";
lenses["31 54 56 56 24 24 25 02"] = "AF Micro-Nikkor 60mm f/2.8D";
lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (172E/272E)";
lenses["32 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro";
lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 [Di] Macro 1:1 (172E/272E)";
lenses["32 54 50 50 24 24 35 02"] = "Sigma Macro 50mm f/2.8 EX DG";
lenses["32 54 6A 6A 24 24 35 02"] = "AF Micro-Nikkor 105mm f/2.8D";
lenses["32 54 6A 6A 24 24 35 02"] = "Sigma 105mm f/2.8 EX DG Macro";
lenses["32 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG";
lenses["33 48 2D 2D 24 24 31 02"] = "AF Nikkor 18mm f/2.8D";
lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)";
lenses["34 48 29 29 24 24 32 02"] = "AF Fisheye Nikkor 16mm f/2.8D";
@ -560,21 +568,21 @@ public:
lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)";
lenses["46 3C 44 60 30 3C 49 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D N";
lenses["47 42 37 50 2A 34 4A 02"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5D";
lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX Aspherical DG HSM";
lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM";
lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm f/4-6.3 EX APO RF HSM";
lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800mm f/5.6 EX DG HSM";
lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm f/5.6 EX HSM";
lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX HSM";
lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm f/2.8 EX Aspherical HSM";
lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM";
lenses["48 48 68 8E 30 30 4B 02"] = "Sigma 100-300mm f/4 EX IF HSM";
lenses["48 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM";
lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM";
lenses["48 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM";
lenses["48 48 76 76 24 24 4B 06"] = "Sigma APO Macro 150mm f/2.8 EX DG HSM";
lenses["48 48 8E 8E 24 24 4B 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED";
lenses["48 48 8E 8E 24 24 E1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E";
lenses["48 48 8E 8E 24 24 F1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E";
lenses["48 48 8E 8E 24 24 F2 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E";
lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma 180mm f/3.5 EX DG Macro";
lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM";
lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM";
lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm f/2.8 EX APO IF HSM";
@ -585,7 +593,9 @@ public:
lenses["49 3C A6 A6 30 30 F1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-14E";
lenses["49 3C A6 A6 30 30 F2 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-20E";
lenses["4A 40 11 11 2C 0C 4D 02"] = "Samyang 8mm f/3.5 Fish-Eye CS";
lenses["4A 48 1E 1E 24 0C 4D 02"] = "Samyang 12mm f/2.8 ED AS NCS Fish-Eye";
lenses["4A 48 24 24 24 0C 4D 02"] = "Samyang AE 14mm f/2.8 ED AS IF UMC";
lenses["4A 54 29 29 18 0C 4D 02"] = "Samyang 16mm f/2.0 ED AS UMC CS";
lenses["4A 54 62 62 0C 0C 4D 02"] = "AF Nikkor 85mm f/1.4D IF";
lenses["4A 60 44 44 0C 0C 4D 02"] = "Samyang 35mm f/1.4 AS UMC";
lenses["4A 60 62 62 0C 0C 4D 02"] = "Samyang AE 85mm f/1.4 AS IF UMC";
@ -594,6 +604,7 @@ public:
lenses["4B 3C A0 A0 30 30 F1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-14E";
lenses["4B 3C A0 A0 30 30 F2 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-20E";
lenses["4C 40 37 6E 2C 3C 4F 02"] = "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF";
lenses["4D 3E 3C 80 2E 3C 62 02"] = "Tamron AF 28-200mm f/3.8-5.6 XR Aspherical (IF) Macro (A03N)";
lenses["4D 40 3C 80 2C 3C 62 02"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF";
lenses["4D 41 3C 8E 2B 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)";
lenses["4D 41 3C 8E 2C 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)";
@ -625,7 +636,7 @@ public:
lenses["67 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["68 42 3C 60 2A 3C 6E 06"] = "AF Zoom-Nikkor 28-80mm f/3.3-5.6G";
lenses["69 47 5C 8E 30 3C 00 02"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)";
lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (772D)";
lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (572D/772D)";
lenses["69 48 5C 8E 30 3C 6F 06"] = "AF Zoom-Nikkor 70-300mm f/4-5.6G";
lenses["6A 48 8E 8E 30 30 70 02"] = "AF-S Nikkor 300mm f/4D IF-ED";
lenses["6B 48 24 24 24 24 71 02"] = "AF Nikkor ED 14mm f/2.8D";
@ -642,14 +653,17 @@ public:
lenses["78 40 37 6E 2C 3C 7C 0E"] = "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED";
lenses["79 40 11 11 2C 2C 1C 06"] = "Sigma 8mm f/3.5 EX Circular Fisheye";
lenses["79 40 3C 80 2C 3C 7F 06"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED";
lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma 70mm f/2.8 EX DG Macro";
lenses["79 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG";
lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma Macro 70mm f/2.8 EX DG";
lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm f/4-5.6 DC HSM";
lenses["7A 3C 1F 37 30 30 7E 06"] = "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED";
lenses["7A 3C 1F 37 30 30 7E 06"] = "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)";
lenses["7A 3C 1F 3C 30 30 7E 06"] = "Tokina AT-X 12-28 PRO DX (AF 12-28mm f/4)";
lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm f/3.5-5.6 DC HSM";
lenses["7A 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM";
lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM";
lenses["7A 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM";
lenses["7A 48 1C 29 24 24 7E 06"] = "Tokina AT-X 116 PRO DX II (AF 11-16mm f/2.8)";
lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM";
lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II";
@ -660,19 +674,25 @@ public:
lenses["7F 48 2B 5C 24 34 1C 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF";
lenses["7F 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["80 48 1A 1A 24 24 85 06"] = "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED";
lenses["81 34 76 A6 38 40 4B 0E"] = "Sigma 150-600mm f/5-6.3 DG OS HSM | S";
lenses["81 54 80 80 18 18 86 0E"] = "AF-S VR Nikkor 200mm f/2G IF-ED";
lenses["82 48 8E 8E 24 24 87 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED";
lenses["83 00 B0 B0 5A 5A 88 04"] = "FSA-L2 EDG 65 800mm f/13 G";
lenses["83 00 B0 B0 5A 5A 88 04"] = "FSA-L2, EDG 65, 800mm f/13 G";
lenses["88 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 DG HSM | A";
lenses["89 3C 53 80 30 3C 8B 06"] = "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED";
lenses["8A 3C 37 6A 30 30 4B 0E"] = "Sigma 24-105mm f/4 DG OS HSM";
lenses["8A 54 6A 6A 24 24 8C 0E"] = "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED";
lenses["8B 40 2D 80 2C 3C 8D 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED";
lenses["8B 40 2D 80 2C 3C FD 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]";
lenses["8B 4C 2D 44 14 14 4B 06"] = "Sigma 18-35mm f/1.8 DC HSM";
lenses["8C 40 2D 53 2C 3C 8E 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED";
lenses["8D 44 5C 8E 34 3C 8F 0E"] = "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED";
lenses["8E 3C 2B 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM Contemporary";
lenses["8F 40 2D 72 2C 3C 91 06"] = "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED";
lenses["8F 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM";
lenses["90 3B 53 80 30 3C 92 0E"] = "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED";
lenses["91 54 44 44 0C 0C 4B 06"] = "Sigma 35mm f/1.4 DG HSM | A";
lenses["90 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 II DC OS HSM";
lenses["91 54 44 44 0C 0C 4B 06"] = "Sigma 35mm f/1.4 DG HSM";
lenses["92 2C 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM";
lenses["92 48 24 37 24 24 94 06"] = "AF-S Zoom-Nikkor 14-24mm f/2.8G ED";
lenses["93 48 37 5C 24 24 95 06"] = "AF-S Zoom-Nikkor 24-70mm f/2.8G ED";
@ -682,8 +702,11 @@ public:
lenses["96 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 II DG HSM";
lenses["96 48 98 98 24 24 98 0E"] = "AF-S VR Nikkor 400mm f/2.8G ED";
lenses["97 3C A0 A0 30 30 99 0E"] = "AF-S VR Nikkor 500mm f/4G ED";
lenses["97 48 6A 6A 24 24 4B 0E"] = "Sigma Macro 105mm f/2.8 EX DG OS HSM";
lenses["98 3C A6 A6 30 30 9A 0E"] = "AF-S VR Nikkor 600mm f/4G ED";
lenses["98 48 50 76 24 24 4B 0E"] = "Sigma 50-150mm f/2.8 EX APO DC OS HSM";
lenses["99 40 29 62 2C 3C 9B 0E"] = "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED";
lenses["99 48 76 76 24 24 4B 0E"] = "Sigma APO Macro 150mm f/2.8 EX DG OS HSM";
lenses["9A 40 2D 53 2C 3C 9C 0E"] = "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G";
lenses["9B 00 4C 4C 24 24 9D 06"] = "PC-E Micro Nikkor 45mm f/2.8D ED";
lenses["9B 54 4C 4C 24 24 9D 02"] = "PC-E Micro Nikkor 45mm f/2.8D ED";
@ -697,28 +720,36 @@ public:
lenses["9E 40 2D 6A 2C 3C A0 0E"] = "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED";
lenses["9F 37 50 A0 34 40 4B 0E"] = "Sigma 50-500mm f/4.5-6.3 DG OS HSM";
lenses["9F 58 44 44 14 14 A1 06"] = "AF-S DX Nikkor 35mm f/1.8G";
lenses["A0 40 2D 74 2C 3C BB 0E"] = "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR";
lenses["A0 48 2A 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM";
lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical";
lenses["8B 4C 2D 44 14 14 4B 06"] = "Sigma 18-35mm f/1.8 DC HSM";
lenses["A0 54 50 50 0C 0C A2 06"] = "AF-S Nikkor 50mm f/1.4G";
lenses["A1 40 18 37 2C 34 A3 06"] = "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED";
lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm f/3.5 EX DC HSM";
lenses["A1 54 55 55 0C 0C BC 06"] = "AF-S Nikkor 58mm f/1.4G";
lenses["A2 40 2D 53 2C 3C BD 0E"] = "AF-S DX VR Nikkor 18-55mm f/3.5-5.6G II";
lenses["A2 48 5C 80 24 24 A4 0E"] = "AF-S Nikkor 70-200mm f/2.8G ED VR II";
lenses["A3 3C 29 44 30 30 A5 0E"] = "AF-S Nikkor 16-35mm f/4G ED VR";
lenses["A3 3C 5C 8E 30 3C 4B 0E"] = "Sigma 70-300mm f/4-5.6 DG OS";
lenses["A4 40 2D 8E 2C 40 BF 0E"] = "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR";
lenses["A4 47 2D 50 24 34 4B 0E"] = "Sigma 18-50mm f/2.8-4.5 DC OS HSM";
lenses["A4 54 37 37 0C 0C A6 06"] = "AF-S Nikkor 24mm f/1.4G ED";
lenses["A5 40 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC OS HSM";
lenses["A5 40 3C 8E 2C 3C A7 0E"] = "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR";
lenses["A5 4C 44 44 14 14 C0 06"] = "AF-S Nikkor 35mm f/1.8G";
lenses["A6 48 37 5C 24 24 4B 06"] = "Sigma 24-70mm f/2.8 IF EX DG HSM";
lenses["A6 48 8E 8E 24 24 A8 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED II";
lenses["A7 3C 53 80 30 3C C2 0E"] = "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II";
lenses["A7 49 80 A0 24 24 4B 06"] = "Sigma APO 200-500mm f/2.8 EX DG";
lenses["A7 4B 62 62 2C 2C A9 0E"] = "AF-S DX Micro Nikkor 85mm f/3.5G ED VR";
lenses["A8 48 80 98 30 30 AA 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II";
lenses["A8 48 8E 8E 30 30 C3 0E"] = "AF-S Nikkor 300mm f/4E PF ED VR";
lenses["A8 48 8E 8E 30 30 C3 4E"] = "AF-S Nikkor 300mm f/4E PF ED VR";
lenses["A9 4C 31 31 14 14 C4 06"] = "AF-S Nikkor 20mm f/1.8G ED";
lenses["A9 54 80 80 18 18 AB 0E"] = "AF-S Nikkor 200mm f/2G ED VR II";
lenses["AA 3C 37 6E 30 30 AC 0E"] = "AF-S Nikkor 24-120mm f/4G ED VR";
lenses["AA 48 37 5C 24 24 C5 4E"] = "AF-S Nikkor 24-70mm f/2.8E ED VR";
lenses["AC 38 53 8E 34 3C AE 0E"] = "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED";
lenses["AD 3C 2D 8E 2C 3C AF 0E"] = "AF-S DX Nikkor 18-300mm 3.5-5.6G ED VR";
lenses["AD 3C 2D 8E 2C 3C AF 0E"] = "AF-S DX Nikkor 18-300mm f/3.5-5.6G ED VR";
lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G";
lenses["AF 54 44 44 0C 0C B1 06"] = "AF-S Nikkor 35mm f/1.4G";
lenses["B0 4C 50 50 14 14 B2 06"] = "AF-S Nikkor 50mm f/1.8G";
@ -735,13 +766,16 @@ public:
lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM";
lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm f/2.8 EX DC HSM Fisheye";
lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 EX DG HSM";
lenses["D8 48 5C 5C 24 24 1C 06"] = "Sigma 70mm f/2.8 EX DG Macro";
lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma 70-300mm f/4-5.6 APO DG Macro HSM";
lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro";
lenses["E3 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro";
lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma 105mm f/2.8 EX DG Macro";
lenses["E3 54 50 50 24 24 35 02"] = "Sigma Macro 50mm f/2.8 EX DG";
lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG";
lenses["E6 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro";
lenses["E9 48 27 3E 24 24 DF 0E"] = "Tamron SP 15-30mm f/2.8 Di VC USD (A012)";
lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["EA 40 29 8E 2C 40 DF 0E"] = "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)";
lenses["EA 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fisheye";
lenses["EB 40 76 A6 38 40 DF 0E"] = "Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)";
lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM";
lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II";
lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM";
@ -752,8 +786,9 @@ public:
lenses["F3 54 2B 50 24 24 84 0E"] = "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)";
lenses["F4 54 56 56 18 18 84 06"] = "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)";
lenses["F5 40 2C 8A 2C 40 40 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)";
lenses["F5 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM";
lenses["F5 48 76 76 24 24 4B 06"] = "Sigma APO Macro 150mm f/2.8 EX DG HSM";
lenses["F6 3F 18 37 2C 34 84 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)";
lenses["F6 3F 18 37 2C 34 DF 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)";
lenses["F6 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["F7 53 5C 80 24 24 40 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
lenses["F7 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
@ -763,17 +798,18 @@ public:
lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["F9 40 3C 8E 2C 40 40 0E"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)";
lenses["FA 54 3C 5E 24 24 84 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)";
lenses["FA 54 3C 5E 24 24 DF 06"] = "Tamron SP AF 28-75mm f//2.8 XR Di LD Aspherical (IF) Macro (A09NII)";
lenses["FA 54 3C 5E 24 24 DF 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)";
lenses["FA 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM";
lenses["FB 54 2B 50 24 24 84 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)";
lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM";
lenses["FC 40 2D 80 2C 40 DF 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)";
lenses["FD 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM II";
lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye";
lenses["FE 48 37 5C 24 24 DF 0E"] = "Tamron SP 24-70mm f/2.8 Di VC USD";
lenses["FE 48 37 5C 24 24 DF 0E"] = "Tamron SP 24-70mm f/2.8 Di VC USD (A007)";
lenses["FE 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
lenses["FE 54 5C 80 24 24 DF 0E"] = "Tamron SP AF 70-200mm f//2.8 Di VC USD (A009)";
lenses["FE 54 64 64 24 24 DF 0E"] = "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1";
lenses["FE 54 5C 80 24 24 DF 0E"] = "Tamron SP 70-200mm f/2.8 Di VC USD (A009)";
lenses["FE 54 64 64 24 24 DF 0E"] = "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F004)";
lenses["FF 40 2D 80 2C 40 4B 06"] = "Sigma 18-200mm f/3.5-6.3 DC";
}
virtual std::string toString (Tag* t)
{

View File

@ -77,55 +77,59 @@ class OLLensTypeInterpreter : public Interpreter
{
std::map<std::string, std::string> lenses;
public:
OLLensTypeInterpreter () // From EXIFTOOL database 'Olympus.pm' V2.09
OLLensTypeInterpreter ()
{
// exadecimal bytes
lenses["00 01 00"] = "Zuiko Digital ED 50mm f/2 Macro";
lenses["00 01 01"] = "Zuiko Digital 40-150mm f/3.5-4.5";
lenses["00 01 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 02 00"] = "Zuiko Digital ED 150mm f/2";
lenses["00 02 10"] = "Zuiko Digital 17mm f/2.8 Pancake";
lenses["00 03 00"] = "Zuiko Digital ED 300mm f/2.8";
lenses["00 03 10"] = "Zuiko Digital ED 14-150mm f/4-5.6";
lenses["00 04 10"] = "Zuiko Digital ED 9-18mm f/4-5.6";
lenses["00 05 00"] = "Zuiko Digital 14-54mm f/2.8-3.5";
lenses["00 05 01"] = "Zuiko Digital Pro ED 90-250mm f/2.8";
lenses["00 05 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 L";
lenses["00 06 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5";
lenses["00 06 01"] = "Zuiko Digital ED 8mm f/3.5 Fisheye";
lenses["00 06 10"] = "Zuiko Digital ED 40-150mm f/4-5.6";
lenses["00 07 00"] = "Zuiko Digital 11-22mm f/2.8-3.5";
lenses["00 07 01"] = "Zuiko Digital 18-180mm f/3.5-6.3";
lenses["00 07 10"] = "Zuiko Digital ED 12mm f/2";
lenses["00 08 01"] = "Zuiko Digital 70-300mm f/4-5.6";
lenses["00 08 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7";
lenses["00 09 10"] = "Zuiko Digital 14-42mm f/3.5-5.6 II";
lenses["00 01 00"] = "Olympus Zuiko Digital ED 50mm f/2.0 Macro";
lenses["00 01 01"] = "Olympus Zuiko Digital 40-150mm f/3.5-4.5";
lenses["00 01 10"] = "Olympus M.Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 02 00"] = "Olympus Zuiko Digital ED 150mm f/2.0";
lenses["00 02 10"] = "Olympus M.Zuiko Digital 17mm f/2.8 Pancake";
lenses["00 03 00"] = "Olympus Zuiko Digital ED 300mm f/2.8";
lenses["00 03 10"] = "Olympus M.Zuiko Digital ED 14-150mm f/4.0-5.6 [II]";
lenses["00 04 10"] = "Olympus M.Zuiko Digital ED 9-18mm f/4.0-5.6";
lenses["00 05 00"] = "Olympus Zuiko Digital 14-54mm f/2.8-3.5";
lenses["00 05 01"] = "Olympus Zuiko Digital Pro ED 90-250mm f/2.8";
lenses["00 05 10"] = "Olympus M.Zuiko Digital ED 14-42mm f/3.5-5.6 L";
lenses["00 06 00"] = "Olympus Zuiko Digital ED 50-200mm f/2.8-3.5";
lenses["00 06 01"] = "Olympus Zuiko Digital ED 8mm f/3.5 Fisheye";
lenses["00 06 10"] = "Olympus M.Zuiko Digital ED 40-150mm f/4.0-5.6";
lenses["00 07 00"] = "Olympus Zuiko Digital 11-22mm f/2.8-3.5";
lenses["00 07 01"] = "Olympus Zuiko Digital 18-180mm f/3.5-6.3";
lenses["00 07 10"] = "Olympus M.Zuiko Digital ED 12mm f/2.0";
lenses["00 08 01"] = "Olympus Zuiko Digital 70-300mm f/4.0-5.6";
lenses["00 08 10"] = "Olympus M.Zuiko Digital ED 75-300mm f/4.8-6.7";
lenses["00 09 10"] = "Olympus M.Zuiko Digital 14-42mm f/3.5-5.6 II";
lenses["00 10 01"] = "Kenko Tokina Reflex 300mm f/6.3 MF Macro";
lenses["00 10 10"] = "Zuiko Digital ED 12-50mm f/3.5-6.3 EZ";
lenses["00 11 10"] = "Zuiko Digital 45mm f/1.8";
lenses["00 12 10"] = "Zuiko Digital ED 60mm f/2.8 Macro";
lenses["00 13 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 II R";
lenses["00 14 10"] = "Zuiko Digital ED 40-150mm f/4-5.6 R";
lenses["00 15 00"] = "Zuiko Digital ED 7-14mm f/4";
lenses["00 15 10"] = "Zuiko Digital ED 75mm f/1.8";
lenses["00 16 10"] = "Zuiko Digital 17mm f/1.8";
lenses["00 17 00"] = "Zuiko Digital Pro ED 35-100mm f/2";
lenses["00 18 00"] = "Zuiko Digital 14-45mm f/3.5-5.6";
lenses["00 18 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7 II";
lenses["00 19 10"] = "Zuiko Digital ED 12-40mm f/2.8 Pro";
lenses["00 20 00"] = "Zuiko Digital 35mm f/3.5 Macro";
lenses["00 22 00"] = "Zuiko Digital 17.5-45mm f/3.5-5.6";
lenses["00 23 00"] = "Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 24 00"] = "Zuiko Digital ED 40-150mm f/4-5.6";
lenses["00 30 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5 SWD";
lenses["00 31 00"] = "Zuiko Digital ED 12-60mm f/2.8-4 SWD";
lenses["00 32 00"] = "Zuiko Digital ED 14-35mm f/2 SWD";
lenses["00 33 00"] = "Zuiko Digital 25mm f/2.8";
lenses["00 34 00"] = "Zuiko Digital ED 9-18mm f/4-5.6";
lenses["00 35 00"] = "Zuiko Digital 14-54mm f/2.8-3.5 II";
lenses["00 10 10"] = "Olympus M.Zuiko Digital ED 12-50mm f/3.5-6.3 EZ";
lenses["00 11 10"] = "Olympus M.Zuiko Digital 45mm f/1.8";
lenses["00 12 10"] = "Olympus M.Zuiko Digital ED 60mm f/2.8 Macro";
lenses["00 13 10"] = "Olympus M.Zuiko Digital 14-42mm f/3.5-5.6 II R";
lenses["00 14 10"] = "Olympus M.Zuiko Digital ED 40-150mm f/4.0-5.6 R";
lenses["00 15 00"] = "Olympus Zuiko Digital ED 7-14mm f/4.0";
lenses["00 15 10"] = "Olympus M.Zuiko Digital ED 75mm f/1.8";
lenses["00 16 10"] = "Olympus M.Zuiko Digital 17mm f/1.8";
lenses["00 17 00"] = "Olympus Zuiko Digital Pro ED 35-100mm f/2.0";
lenses["00 18 00"] = "Olympus Zuiko Digital 14-45mm f/3.5-5.6";
lenses["00 18 10"] = "Olympus M.Zuiko Digital ED 75-300mm f/4.8-6.7 II";
lenses["00 19 10"] = "Olympus M.Zuiko Digital ED 12-40mm f/2.8 Pro";
lenses["00 20 00"] = "Olympus Zuiko Digital 35mm f/3.5 Macro";
lenses["00 20 10"] = "Olympus M.Zuiko Digital ED 40-150mm f/2.8 Pro";
lenses["00 21 10"] = "Olympus M.Zuiko Digital ED 14-42mm f/3.5-5.6 EZ";
lenses["00 22 00"] = "Olympus Zuiko Digital 17.5-45mm f/3.5-5.6";
lenses["00 22 10"] = "Olympus M.Zuiko Digital 25mm f/1.8";
lenses["00 23 00"] = "Olympus Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 23 10"] = "Olympus M.Zuiko Digital ED 7-14mm f/2.8 Pro";
lenses["00 24 00"] = "Olympus Zuiko Digital ED 40-150mm f/4.0-5.6";
lenses["00 25 10"] = "Olympus M.Zuiko Digital ED 8mm f/1.8 Fisheye Pro";
lenses["00 30 00"] = "Olympus Zuiko Digital ED 50-200mm f/2.8-3.5 SWD";
lenses["00 31 00"] = "Olympus Zuiko Digital ED 12-60mm f/2.8-4.0 SWD";
lenses["00 32 00"] = "Olympus Zuiko Digital ED 14-35mm f/2.0 SWD";
lenses["00 33 00"] = "Olympus Zuiko Digital 25mm f/2.8";
lenses["00 34 00"] = "Olympus Zuiko Digital ED 9-18mm f/4.0-5.6";
lenses["00 35 00"] = "Olympus Zuiko Digital 14-54mm f/2.8-3.5 II";
lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6 DC";
lenses["01 01 10"] = "Sigma 30mm f/2.8 EX DN";
lenses["01 02 00"] = "Sigma 55-200mm f/4-5.6 DC";
lenses["01 02 00"] = "Sigma 55-200mm f/4.0-5.6 DC";
lenses["01 02 10"] = "Sigma 19mm f/2.8 EX DN";
lenses["01 03 00"] = "Sigma 18-125mm f/3.5-5.6 DC";
lenses["01 03 10"] = "Sigma 30mm f/2.8 DN | A";
@ -133,44 +137,50 @@ public:
lenses["01 04 10"] = "Sigma 19mm f/2.8 DN | A";
lenses["01 05 00"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["01 05 10"] = "Sigma 60mm f/2.8 DN | A";
lenses["01 06 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF";
lenses["01 07 00"] = "Sigma 105mm f/2.8 EX DG Macro";
lenses["01 08 00"] = "Sigma 150mm f/2.8 EX DG APO HSM Macro";
lenses["01 06 00"] = "Sigma APO 50-500mm f/4.0-6.3 EX DG HSM";
lenses["01 07 00"] = "Sigma Macro 105mm f/2.8 EX DG";
lenses["01 08 00"] = "Sigma APO Macro 150mm f/2.8 EX DG HSM";
lenses["01 09 00"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["01 10 00"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro";
lenses["01 11 00"] = "Sigma 135-400mm f/4.5-5.6 DG APO";
lenses["01 12 00"] = "Sigma 300-800mm f/5.6 EX DG APO HSM";
lenses["01 11 00"] = "Sigma APO 135-400mm f/4.5-5.6 DG";
lenses["01 12 00"] = "Sigma APO 300-800mm f/5.6 EX DG HSM";
lenses["01 13 00"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["01 14 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM";
lenses["01 15 00"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["01 16 00"] = "Sigma 70-200mm f/2.8 II EX DG APO HSM Macro";
lenses["01 14 00"] = "Sigma APO 50-500mm f/4.0-6.3 EX DG HSM";
lenses["01 15 00"] = "Sigma 10-20mm f/4.0-5.6 EX DC HSM";
lenses["01 16 00"] = "Sigma APO 70-200mm f/2.8 II EX DG Macro HSM";
lenses["01 17 00"] = "Sigma 50mm f/1.4 EX DG HSM";
lenses["02 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph.";
lenses["02 01 10"] = "Lumix G Vario 14-45mm f/3.5-5.6 Asph. Mega OIS";
lenses["02 02 00"] = "Leica D Summilux 25mm f/1.4 Asph.";
lenses["02 02 10"] = "Lumix G Vario 45-200mm f/4-5.6 Mega OIS";
lenses["02 02 10"] = "Lumix G Vario 45-200mm f/4.0-5.6 Mega OIS";
lenses["02 03 00"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph. Mega OIS";
lenses["02 03 01"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph.";
lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f/4-5.8 Asph. Mega OIS";
lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f/4.0-5.8 Asph. Mega OIS";
lenses["02 04 00"] = "Leica D Vario Elmar 14-150mm f/3.5-5.6";
lenses["02 04 10"] = "Lumix G Vario 7-14mm f/4 Asph.";
lenses["02 04 10"] = "Lumix G Vario 7-14mm f/4.0 Asph.";
lenses["02 05 10"] = "Lumix G 20mm f/1.7 Asph.";
lenses["02 06 10"] = "Leica DG Macro-Elmarit 45mm f/2.8 Asph. Mega OIS";
lenses["02 07 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 Asph. Mega OIS";
lenses["02 08 10"] = "Lumix G Fisheye 8mm f/3.5";
lenses["02 09 10"] = "Lumix G Vario 100-300mm f/4-5.6 Mega OIS";
lenses["02 09 10"] = "Lumix G Vario 100-300mm f/4.0-5.6 Mega OIS";
lenses["02 10 10"] = "Lumix G 14mm f/2.5 Asph.";
lenses["02 11 10"] = "Lumix G 12.5mm f/12 3D";
lenses["02 12 10"] = "Leica DG Summilux 25mm f/1.4 Asph.";
lenses["02 13 10"] = "Lumix G X Vario PZ 45-175mm f/4-5.6 Asph. Power OIS";
lenses["02 13 10"] = "Lumix G X Vario PZ 45-175mm f/4.0-5.6 Asph. Power OIS";
lenses["02 14 10"] = "Lumix G X Vario PZ 14-42mm f/3.5-5.6 Asph. Power OIS";
lenses["02 15 10"] = "Lumix G X Vario 12-35mm f/2.8 Asph. Power OIS";
lenses["02 16 10"] = "Lumix G Vario 45-150mm f/4-5.6 Asph. Mega OIS";
lenses["02 16 10"] = "Lumix G Vario 45-150mm f/4.0-5.6 Asph. Mega OIS";
lenses["02 17 10"] = "Lumix G X Vario 35-100mm f/2.8 Power OIS";
lenses["02 18 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 II Asph. Mega OIS";
lenses["02 19 10"] = "Lumix G Vario 14-140mm f/3.5-5.6 Asph. Power OIS";
lenses["02 20 10"] = "Lumix G Vario 12-32mm f/3.5-5.6 Asph. Mega OIS";
lenses["02 21 10"] = "Leica DG Nocticron 42.5mm f/1.2 Asph. Power OIS";
lenses["02 22 10"] = "Leica DG Summilux 15mm f/1.7 Asph.";
lenses["02 24 10"] = "Lumix G Macro 30mm f/2.8 Asph. Mega OIS";
lenses["02 25 10"] = "Lumix G 42.5mm f/1.7 Asph. Power OIS";
lenses["03 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph.";
lenses["03 02 00"] = "Leica D Summilux 25mm f/1.4 Asph.";
lenses["05 01 10"] = "Tamron 14-150mm f/3.5-5.8 Di III";
}
virtual std::string toString (Tag* t)
{

View File

@ -649,38 +649,40 @@ PAColorSpaceInterpreter paColorSpaceInterpreter;
class PALensTypeInterpreter : public IntLensInterpreter< int >
{
public:
PALensTypeInterpreter () // From EXIFTOOL database 'Pentax.pm' V2.65
PALensTypeInterpreter ()
{
choices.insert(p_t( 0 + 0, "M-42 or No Lens"));
choices.insert(p_t(256 * 1 + 0, "K,M Lens"));
choices.insert(p_t(256 * 0 + 0, "M-42 or No Lens"));
choices.insert(p_t(256 * 1 + 0, "K or M Lens"));
choices.insert(p_t(256 * 2 + 0, "A Series Lens"));
choices.insert(p_t(256 * 3 + 0, "Sigma Lens"));
choices.insert(p_t(256 * 3 + 0, "Sigma"));
choices.insert(p_t(256 * 3 + 17, "smc PENTAX-FA SOFT 85mm f/2.8"));
choices.insert(p_t(256 * 3 + 18, "smc PENTAX-F 1.7X AF ADAPTER"));
choices.insert(p_t(256 * 3 + 19, "smc PENTAX-F 24-50mm f/4"));
choices.insert(p_t(256 * 3 + 20, "smc PENTAX-F 35-80mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 21, "smc PENTAX-F 80-200mm f/4.7-5.6"));
choices.insert(p_t(256 * 3 + 22, "smc PENTAX-F FISH-EYE 17-28mm f/3.5-4.5"));
choices.insert(p_t(256 * 3 + 23, "smc PENTAX-F 100-300mm f/4.5-5.6"));
choices.insert(p_t(256 * 3 + 23, "smc PENTAX-F 100-300mm f/4.5-5.6 or Sigma Lens"));
choices.insert(p_t(256 * 3 + 23, "Sigma AF 28-300mm f/3.5-5.6 DL IF"));
choices.insert(p_t(256 * 3 + 23, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro"));
choices.insert(p_t(256 * 3 + 23, "Tokina 80-200mm f/2.8 ATX-Pro"));
choices.insert(p_t(256 * 3 + 24, "smc PENTAX-F 35-135mm f/3.5-4.5"));
choices.insert(p_t(256 * 3 + 25, "smc PENTAX-F 35-105mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 25, "smc PENTAX-F 35-105mm f/4-5.6 or Sigma or Tokina Lens"));
choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-5.6 DL IF"));
choices.insert(p_t(256 * 3 + 25, "Sigma 55-200mm f/4-5.6 DC"));
choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DL IF"));
choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro"));
choices.insert(p_t(256 * 3 + 25, "Tokina 80-200mm f/2.8 ATX-Pro"));
choices.insert(p_t(256 * 3 + 26, "smc PENTAX-F* 250-600mm f/5.6 ED[IF]"));
choices.insert(p_t(256 * 3 + 27, "smc PENTAX-F 28-80mm f/3.5-4.5"));
choices.insert(p_t(256 * 3 + 27, "smc PENTAX-F 28-80mm f/3.5-4.5 or Tokina Lens"));
choices.insert(p_t(256 * 3 + 27, "Tokina AT-X Pro AF 28-70mm f/2.6-2.8"));
choices.insert(p_t(256 * 3 + 28, "smc PENTAX-F 35-70mm f/3.5-4.5"));
choices.insert(p_t(256 * 3 + 28, "smc PENTAX-F 35-70mm f/3.5-4.5 or Tokina Lens"));
choices.insert(p_t(256 * 3 + 28, "Tokina 19-35mm f/3.5-4.5 AF"));
choices.insert(p_t(256 * 3 + 28, "Tokina AT-X AF 400mm f/5.6"));
choices.insert(p_t(256 * 3 + 29, "PENTAX-F 28-80mm f/3.5-4.5"));
choices.insert(p_t(256 * 3 + 29, "PENTAX-F 28-80mm f/3.5-4.5 or Sigma or Tokina Lens"));
choices.insert(p_t(256 * 3 + 29, "Sigma AF 18-125mm f/3.5-5.6 DC"));
choices.insert(p_t(256 * 3 + 29, "Tokina AT-X PRO 28-70mm f/2.6-2.8"));
choices.insert(p_t(256 * 3 + 30, "PENTAX-F 70-200mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 31, "smc PENTAX-F 70-210mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 31, "smc PENTAX-F 70-210mm f/4-5.6 or Tokina or Takumar Lens"));
choices.insert(p_t(256 * 3 + 31, "Tokina AF 730 75-300mm f/4.5-5.6"));
choices.insert(p_t(256 * 3 + 31, "Takumar-F 70-210mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 32, "smc PENTAX-F 50mm f/1.4"));
@ -691,19 +693,22 @@ public:
choices.insert(p_t(256 * 3 + 38, "smc PENTAX-F* 300mm f/4.5 ED[IF]"));
choices.insert(p_t(256 * 3 + 39, "smc PENTAX-F* 600mm f/4 ED[IF]"));
choices.insert(p_t(256 * 3 + 40, "smc PENTAX-F Macro 100mm f/2.8"));
choices.insert(p_t(256 * 3 + 41, "smc PENTAX-F Macro 50mm f/2.8"));
choices.insert(p_t(256 * 3 + 41, "smc PENTAX-F Macro 50mm f/2.8 or Sigma Lens"));
choices.insert(p_t(256 * 3 + 41, "Sigma 50mm f/2.8 Macro"));
choices.insert(p_t(256 * 3 + 42, "Sigma 300mm f/2.8 EX DG APO IF"));
choices.insert(p_t(256 * 3 + 44, "Sigma or Tamron Lens (3 44)"));
choices.insert(p_t(256 * 3 + 44, "Sigma AF 10-20mm f/4-5.6 EX DC"));
choices.insert(p_t(256 * 3 + 44, "Sigma 12-24mm f/4.5-5.6 EX DG"));
choices.insert(p_t(256 * 3 + 44, "Sigma 17-70mm f/2.8-4.5 DC Macro"));
choices.insert(p_t(256 * 3 + 44, "Sigma 18-50mm f/3.5-5.6 DC"));
choices.insert(p_t(256 * 3 + 44, "Tamron 35-90mm f/4 AF"));
choices.insert(p_t(256 * 3 + 46, "Sigma or Samsung Lens (3 46)"));
choices.insert(p_t(256 * 3 + 46, "Sigma APO 70-200mm f/2.8 EX"));
choices.insert(p_t(256 * 3 + 46, "Sigma EX APO 100-300mm f/4 IF"));
choices.insert(p_t(256 * 3 + 46, "Samsung/Schneider D-XENON 50-200mm f/4-5.6 ED"));
choices.insert(p_t(256 * 3 + 50, "smc PENTAX-FA 28-70mm f/4 AL"));
choices.insert(p_t(256 * 3 + 51, "Sigma 28mm f/1.8 EX DG Aspherical Macro"));
choices.insert(p_t(256 * 3 + 52, "smc PENTAX-FA 28-200mm f/3.8-5.6 AL[IF]"));
choices.insert(p_t(256 * 3 + 52, "smc PENTAX-FA 28-200mm f/3.8-5.6 AL[IF] or Tamron Lens"));
choices.insert(p_t(256 * 3 + 52, "Tamron AF LD 28-200mm f/3.8-5.6 [IF] Aspherical (171D)"));
choices.insert(p_t(256 * 3 + 53, "smc PENTAX-FA 28-80mm f/3.5-5.6 AL"));
choices.insert(p_t(256 * 3 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]"));
@ -713,6 +718,7 @@ public:
choices.insert(p_t(256 * 3 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL"));
choices.insert(p_t(256 * 3 + 253, "smc PENTAX-DA 14mm f/2.8 ED[IF]"));
choices.insert(p_t(256 * 3 + 254, "smc PENTAX-DA 16-45mm f/4 ED AL"));
choices.insert(p_t(256 * 3 + 255, "Sigma Lens (3 255)"));
choices.insert(p_t(256 * 3 + 255, "Sigma 18-200mm f/3.5-6.3 DC"));
choices.insert(p_t(256 * 3 + 255, "Sigma DL-II 35-80mm f/4-5.6"));
choices.insert(p_t(256 * 3 + 255, "Sigma DL Zoom 75-300mm f/4-5.6"));
@ -722,10 +728,10 @@ public:
choices.insert(p_t(256 * 3 + 255, "Sigma 70-300mm f/4-5.6 Macro"));
choices.insert(p_t(256 * 3 + 255, "Sigma 55-200mm f/4-5.6 DC"));
choices.insert(p_t(256 * 3 + 255, "Sigma 18-50mm f/2.8 EX DC"));
choices.insert(p_t(256 * 4 + 1, "smc PENTAX-FA SOFT 28mm f/2.8"));
choices.insert(p_t(256 * 4 + 2, "smc PENTAX-FA 80-320mm f/4.5-5.6"));
choices.insert(p_t(256 * 4 + 3, "smc PENTAX-FA 43mm f/1.9 Limited"));
choices.insert(p_t(256 * 4 + 6, "smc PENTAX-FA 35-80mm f/4-5.6"));
choices.insert(p_t(256 * 4 + 1, "smc PENTAX-FA SOFT 28mm f/2.8"));
choices.insert(p_t(256 * 4 + 2, "smc PENTAX-FA 80-320mm f/4.5-5.6"));
choices.insert(p_t(256 * 4 + 3, "smc PENTAX-FA 43mm f/1.9 Limited"));
choices.insert(p_t(256 * 4 + 6, "smc PENTAX-FA 35-80mm f/4-5.6"));
choices.insert(p_t(256 * 4 + 12, "smc PENTAX-FA 50mm f/1.4"));
choices.insert(p_t(256 * 4 + 15, "smc PENTAX-FA 28-105mm f/4-5.6 [IF]"));
choices.insert(p_t(256 * 4 + 16, "Tamron AF 80-210mm f/4-5.6 (178D)"));
@ -736,25 +742,26 @@ public:
choices.insert(p_t(256 * 4 + 23, "smc PENTAX-FA 20-35mm f/4 AL"));
choices.insert(p_t(256 * 4 + 24, "smc PENTAX-FA 77mm f/1.8 Limited"));
choices.insert(p_t(256 * 4 + 25, "Tamron SP AF 14mm f/2.8"));
choices.insert(p_t(256 * 4 + 26, "smc PENTAX-FA Macro 100mm f/3.5"));
choices.insert(p_t(256 * 4 + 26, "smc PENTAX-FA Macro 100mm f/3.5 or Cosina Lens"));
choices.insert(p_t(256 * 4 + 26, "Cosina 100mm f/3.5 Macro"));
choices.insert(p_t(256 * 4 + 27, "Tamron AF 28-300mm f/3.5-6.3 LD Aspherical[IF] Macro (185D/285D)"));
choices.insert(p_t(256 * 4 + 28, "smc PENTAX-FA 35mm f/2 AL"));
choices.insert(p_t(256 * 4 + 29, "Tamron AF 28-200mm f/3.8-5.6 LD Super II Macro (371D)"));
choices.insert(p_t(256 * 4 + 34, "smc PENTAX-FA 24-90mm f/3.5-4.5 AL[IF]"));
choices.insert(p_t(256 * 4 + 35, "smc PENTAX-FA 100-300mm f/4.7-5.8"));
choices.insert(p_t(256 * 4 + 36, "Tamron AF70-300mm f/4-5.6 LD Macro"));
choices.insert(p_t(256 * 4 + 36, "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2"));
choices.insert(p_t(256 * 4 + 37, "Tamron SP AF 24-135mm f/3.5-5.6 AD AL (190D)"));
choices.insert(p_t(256 * 4 + 38, "smc PENTAX-FA 28-105mm f/3.2-4.5 AL[IF]"));
choices.insert(p_t(256 * 4 + 39, "smc PENTAX-FA 31mm f/1.8 AL Limited"));
choices.insert(p_t(256 * 4 + 41, "Tamron AF 28-200mm Super Zoom f/3.8-5.6 Aspherical XR [IF] Macro (A03)"));
choices.insert(p_t(256 * 4 + 43, "smc PENTAX-FA 28-90mm f/3.5-5.6"));
choices.insert(p_t(256 * 4 + 44, "smc PENTAX-FA J 75-300mm f/4.5-5.8 AL"));
choices.insert(p_t(256 * 4 + 45, "Tamron Lens (4 45)"));
choices.insert(p_t(256 * 4 + 45, "Tamron 28-300mm f/3.5-6.3 Ultra zoom XR"));
choices.insert(p_t(256 * 4 + 45, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(256 * 4 + 46, "smc PENTAX-FA J 28-80mm f/3.5-5.6 AL"));
choices.insert(p_t(256 * 4 + 47, "smc PENTAX-FA J 18-35mm f/4-5.6 AL"));
choices.insert(p_t(256 * 4 + 49, "Tamron SP AF 28-75mm f/2.8 XR Di (A09)"));
choices.insert(p_t(256 * 4 + 49, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(256 * 4 + 51, "smc PENTAX-D FA 50mm f/2.8 Macro"));
choices.insert(p_t(256 * 4 + 52, "smc PENTAX-D FA 100mm f/2.8 Macro"));
choices.insert(p_t(256 * 4 + 55, "Samsung/Schneider D-XENOGON 35mm f/2"));
@ -771,9 +778,9 @@ public:
choices.insert(p_t(256 * 4 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited"));
choices.insert(p_t(256 * 4 + 245, "Samsung/Schneider D-XENON 50-200mm f/4-5.6"));
choices.insert(p_t(256 * 4 + 246, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6"));
choices.insert(p_t(256 * 4 + 247, "smc PENTAX-DA 10-17mm f/3.5-4.5 ED [IF] Fisheye zoom"));
choices.insert(p_t(256 * 4 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]"));
choices.insert(p_t(256 * 4 + 248, "smc PENTAX-DA 12-24mm f/4 ED AL [IF]"));
choices.insert(p_t(256 * 4 + 249, "Tamron 18-200mm f/3.5-6.3 XR DiII (A14)"));
choices.insert(p_t(256 * 4 + 249, "Tamron XR DiII 18-200mm f/3.5-6.3 (A14)"));
choices.insert(p_t(256 * 4 + 250, "smc PENTAX-DA 50-200mm f/4-5.6 ED"));
choices.insert(p_t(256 * 4 + 251, "smc PENTAX-DA 40mm f/2.8 Limited"));
choices.insert(p_t(256 * 4 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL"));
@ -803,7 +810,7 @@ public:
choices.insert(p_t(256 * 6 + 5, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]"));
choices.insert(p_t(256 * 6 + 6, "smc PENTAX-FA* 28-70mm f/2.8 AL"));
choices.insert(p_t(256 * 6 + 7, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]"));
choices.insert(p_t(256 * 6 + 8, "smc PENTAX-FA 28-70mm f/4 AL"));
choices.insert(p_t(256 * 6 + 8, "smc PENTAX-FA 28-70mm f/4AL"));
choices.insert(p_t(256 * 6 + 9, "smc PENTAX-FA 20mm f/2.8"));
choices.insert(p_t(256 * 6 + 10, "smc PENTAX-FA* 400mm f/5.6 ED[IF]"));
choices.insert(p_t(256 * 6 + 13, "smc PENTAX-FA* 400mm f/5.6 ED[IF]"));
@ -811,7 +818,9 @@ public:
choices.insert(p_t(256 * 7 + 0, "smc PENTAX-DA 21mm f/3.2 AL Limited"));
choices.insert(p_t(256 * 7 + 58, "smc PENTAX-D FA Macro 100mm f/2.8 WR"));
choices.insert(p_t(256 * 7 + 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)"));
choices.insert(p_t(256 * 7 + 201, "smc Pentax-DA L 50-200mm f/4-5.6 ED WR"));
choices.insert(p_t(256 * 7 + 202, "smc PENTAX-DA L 18-55mm f/3.5-5.6 AL WR"));
choices.insert(p_t(256 * 7 + 203, "HD PENTAX-DA 55-300mm f/4-5.8 ED WR"));
choices.insert(p_t(256 * 7 + 204, "HD PENTAX-DA 15mm f/4 ED AL Limited"));
choices.insert(p_t(256 * 7 + 205, "HD PENTAX-DA 35mm f/2.8 Macro Limited"));
choices.insert(p_t(256 * 7 + 206, "HD PENTAX-DA 70mm f/2.4 Limited"));
@ -844,8 +853,10 @@ public:
choices.insert(p_t(256 * 7 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)"));
choices.insert(p_t(256 * 7 + 243, "smc PENTAX-DA 70mm f/2.4 Limited"));
choices.insert(p_t(256 * 7 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited"));
choices.insert(p_t(256 * 8 + 0, "Sigma 50-150mm f/2.8 II APO EX DC HSM"));
choices.insert(p_t(256 * 8 + 3, "Sigma AF 18-125mm f/3.5-5.6 DC"));
choices.insert(p_t(256 * 8 + 4, "Sigma 50mm f/1.4 EX DG HSM"));
choices.insert(p_t(256 * 8 + 7, "Sigma 24-70mm f/2.8 IF EX DG HSM"));
choices.insert(p_t(256 * 8 + 8, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"));
choices.insert(p_t(256 * 8 + 11, "Sigma 10-20mm f/3.5 EX DC HSM"));
choices.insert(p_t(256 * 8 + 12, "Sigma 70-300mm f/4-5.6 DG OS"));
@ -858,9 +869,19 @@ public:
choices.insert(p_t(256 * 8 + 21, "Sigma 17-50mm f/2.8 EX DC OS HSM"));
choices.insert(p_t(256 * 8 + 22, "Sigma 85mm f/1.4 EX DG HSM"));
choices.insert(p_t(256 * 8 + 23, "Sigma 70-200mm f/2.8 APO EX DG OS HSM"));
choices.insert(p_t(256 * 8 + 25, "Sigma 17-50mm f/2.8 EX DC HSM"));
choices.insert(p_t(256 * 8 + 27, "Sigma 18-200mm f/3.5-6.3 II DC HSM"));
choices.insert(p_t(256 * 8 + 28, "Sigma 18-250mm f/3.5-6.3 DC Macro HSM"));
choices.insert(p_t(256 * 8 + 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM | C")); // "| C" stands for "Contemporary" product line
choices.insert(p_t(256 * 8 + 29, "Sigma 35mm f/1.4 DG HSM"));
choices.insert(p_t(256 * 8 + 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM Contemporary"));
choices.insert(p_t(256 * 8 + 31, "Sigma 18-35mm f/1.8 DC HSM"));
choices.insert(p_t(256 * 8 + 32, "Sigma 30mm f/1.4 DC HSM | A"));
choices.insert(p_t(256 * 8 + 59, "HD PENTAX-D FA 150-450mm f/4.5-5.6 ED DC AW"));
choices.insert(p_t(256 * 8 + 60, "HD PENTAX-D FA* 70-200mm f/2.8 ED DC AW"));
choices.insert(p_t(256 * 8 + 198, "smc PENTAX-DA L 18-50mm f/4-5.6 DC WR RE"));
choices.insert(p_t(256 * 8 + 199, "HD PENTAX-DA 18-50mm f/4-5.6 DC WR RE"));
choices.insert(p_t(256 * 8 + 200, "HD PENTAX-DA 16-85mm f/3.5-5.6 ED DC WR"));
choices.insert(p_t(256 * 8 + 209, "HD PENTAX-DA 20-40mm f/2.8-4 ED Limited DC WR"));
choices.insert(p_t(256 * 8 + 210, "smc PENTAX-DA 18-270mm f/3.5-6.3 ED SDM"));
choices.insert(p_t(256 * 8 + 211, "HD PENTAX-DA 560mm f/5.6 ED AW"));
choices.insert(p_t(256 * 8 + 215, "smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR"));
@ -871,6 +892,7 @@ public:
choices.insert(p_t(256 * 8 + 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM"));
choices.insert(p_t(256 * 8 + 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM"));
choices.insert(p_t(256 * 8 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM"));
choices.insert(p_t(256 * 8 + 255, "Sigma Lens (8 255)"));
choices.insert(p_t(256 * 8 + 255, "Sigma 70-200mm f/2.8 EX DG Macro HSM II"));
choices.insert(p_t(256 * 8 + 255, "Sigma 150-500mm f/5-6.3 DG APO [OS] HSM"));
choices.insert(p_t(256 * 8 + 255, "Sigma 50-150mm f/2.8 II APO EX DC HSM"));
@ -896,11 +918,13 @@ public:
choices.insert(p_t(256 * 13 + 18, "smc PENTAX-D FA 645 55mm f/2.8 AL [IF] SDM AW"));
choices.insert(p_t(256 * 13 + 19, "smc PENTAX-D FA 645 25mm f/4 AL [IF] SDM AW"));
choices.insert(p_t(256 * 13 + 20, "HD PENTAX-D FA 645 90mm f/2.8 ED AW SR"));
choices.insert(p_t(256 * 13 + 253, "HD PENTAX-DA 645 28-45mm f/4.5 ED AW SR"));
choices.insert(p_t(256 * 21 + 0, "Pentax Q Manual Lens"));
choices.insert(p_t(256 * 21 + 1, "01 Standard Prime 8.5mm f/1.9"));
choices.insert(p_t(256 * 21 + 2, "02 Standard Zoom 5-15mm f/2.8-4.5"));
choices.insert(p_t(256 * 21 + 6, "06 Telephoto Zoom 15-45mm f/2.8"));
choices.insert(p_t(256 * 21 + 7, "07 Mount Shield 11.5mm f/9"));
choices.insert(p_t(256 * 21 + 8, "08 Wide Zoom 3.8-5.9mm f/3.7-4"));
choices.insert(p_t(256 * 22 + 3, "03 Fish-eye 3.2mm f/5.6"));
choices.insert(p_t(256 * 22 + 4, "04 Toy Lens Wide 6.3mm f/7.1"));
choices.insert(p_t(256 * 22 + 5, "05 Toy Lens Telephoto 18mm f/8"));

View File

@ -1133,7 +1133,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom )
int basepos = ftell (f);
fread (value, 1, 18, f);
directory = new TagDirectory*[2];
directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, bom);
// byte order for makernotes can be different from exif byte order. We have to get it from makernotes header
ByteOrder MakerNoteOrder;
if(value[10] == 'M' && value[11] == 'M')
MakerNoteOrder = rtexif::MOTOROLA;
else
MakerNoteOrder = rtexif::INTEL;
directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, MakerNoteOrder);
directory[1] = NULL;
}
} else if ( make.find( "Canon" ) != std::string::npos ) {

View File

@ -530,25 +530,24 @@ SAAntiBlurInterpreter saAntiBlurInterpreter;
class SALensIDInterpreter : public IntLensInterpreter< int >
{
public:
SALensIDInterpreter () // From EXIFTOOL database 'Sony.pm' V1.94 and 'Minolta' 2.04;
SALensIDInterpreter ()
{
// Please do not remove entries on database synchronization, and avoid transferring "categories' header" types
choices.insert(p_t(0, "Minolta AF 28-85mm f/3.5-4.5"));
choices.insert(p_t(0, "Minolta AF 28-85mm f/3.5-4.5 New"));
choices.insert(p_t(1, "Minolta AF 80-200mm f/2.8 HS-APO G"));
choices.insert(p_t(2, "Minolta AF 28-70mm f/2.8 G"));
choices.insert(p_t(3, "Minolta AF 28-80mm f/4-5.6"));
choices.insert(p_t(4, "Minolta AF 85mm f/1.4G"));
choices.insert(p_t(5, "Minolta AF 35-70mm f/3.5-4.5"));
choices.insert(p_t(6, "Minolta AF 24-85mm f/3.5-4.5"));
choices.insert(p_t(7, "Minolta AF 100-300mm f/4.5-5.6 APO"));
choices.insert(p_t(5, "Minolta AF 35-70mm f/3.5-4.5 [II]"));
choices.insert(p_t(6, "Minolta AF 24-85mm f/3.5-4.5 [New]"));
choices.insert(p_t(7, "Minolta AF 100-300mm f/4.5-5.6 APO [New] or 100-400mm or Sigma Lens"));
choices.insert(p_t(7, "Minolta AF 100-400mm f/4.5-6.7 APO"));
choices.insert(p_t(7, "Sigma AF 100-300mm f/4 EX DG IF"));
choices.insert(p_t(8, "Minolta AF 70-210mm f/4.5-5.6"));
choices.insert(p_t(8, "Minolta AF 70-210mm f/4.5-5.6 [II]"));
choices.insert(p_t(9, "Minolta AF 50mm f/3.5 Macro"));
choices.insert(p_t(10, "Minolta AF 28-105mm f/3.5-4.5 [New]"));
choices.insert(p_t(11, "Minolta AF 300mm f/4 HS-APO G"));
choices.insert(p_t(12, "Minolta AF 100mm f/2.8 Soft Focus"));
choices.insert(p_t(13, "Minolta AF 75-300mm f/4.5-5.6"));
choices.insert(p_t(13, "Minolta AF 75-300mm f/4.5-5.6 (New or II)"));
choices.insert(p_t(14, "Minolta AF 100-400mm f/4.5-6.7 APO"));
choices.insert(p_t(15, "Minolta AF 400mm f/4.5 HS-APO G"));
choices.insert(p_t(16, "Minolta AF 17-35mm f/3.5 G"));
@ -558,30 +557,30 @@ public:
choices.insert(p_t(20, "Minolta/Sony 135mm f/2.8 [T4.5] STF"));
choices.insert(p_t(22, "Minolta AF 35-80mm f/4-5.6 II"));
choices.insert(p_t(23, "Minolta AF 200mm f/4 Macro APO G"));
choices.insert(p_t(24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D)"));
choices.insert(p_t(24, "Sigma 18-50mm f/2.8 EX DC Macro"));
choices.insert(p_t(24, "Sigma 17-70mm f/2.8-4.5 DC Macro"));
choices.insert(p_t(24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D) or Sigma or Tamron Lens"));
choices.insert(p_t(24, "Sigma 18-50mm f/2.8"));
choices.insert(p_t(24, "Sigma 17-70mm f/2.8-4.5 (D)"));
choices.insert(p_t(24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF"));
choices.insert(p_t(24, "Sigma 18-200mm f/3.5-6.3 DC"));
choices.insert(p_t(24, "Sigma 18-125mm f/4-5,6 DC"));
choices.insert(p_t(24, "Tamron SP AF 28-75mm f/2.8 XR Di (IF) Macro"));
choices.insert(p_t(25, "Minolta AF 100-300mm f/4.5-5.6 APO D"));
choices.insert(p_t(25, "Sigma 100-300mm f/4 EX DG APO"));
choices.insert(p_t(24, "Sigma DC 18-125mm f/4-5,6 D"));
choices.insert(p_t(24, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(25, "Minolta AF 100-300mm f/4.5-5.6 APO (D) or Sigma Lens"));
choices.insert(p_t(25, "Sigma 100-300mm f/4 EX (APO (D) or D IF)"));
choices.insert(p_t(25, "Sigma 70mm f/2.8 EX DG Macro"));
choices.insert(p_t(25, "Sigma 20mm f/1.8 EX DG Aspherical RF"));
choices.insert(p_t(25, "Sigma 30mm f/1.4 EX DC"));
choices.insert(p_t(25, "Sigma 24mm f/1.8 EX DG ASP Macro"));
choices.insert(p_t(27, "Minolta AF 85mm f/1.4 G (D)"));
choices.insert(p_t(28, "Minolta/Sony AF 100mm f/2.8 Macro (D)"));
choices.insert(p_t(28, "Minolta/Sony AF 100mm f/2.8 Macro (D) or Tamron Lens"));
choices.insert(p_t(28, "Tamron SP AF 90mm f/2.8 Di Macro"));
choices.insert(p_t(28, "Tamron AF 180mm f/3.5 SP Di LD [IF] Macro"));
choices.insert(p_t(28, "Tamron SP AF 180mm f/3.5 Di LD [IF] Macro"));
choices.insert(p_t(29, "Minolta/Sony AF 75-300mm f/4.5-5.6 (D)"));
choices.insert(p_t(30, "Minolta AF 28-80mm f/3.5-5.6 (D)"));
choices.insert(p_t(30, "Minolta AF 28-80mm f/3.5-5.6 (D) or Sigma Lens"));
choices.insert(p_t(30, "Sigma AF 10-20mm f/4-5.6 EX DC"));
choices.insert(p_t(30, "Sigma AF 12-24mm f/4.5-5.6 EX DG"));
choices.insert(p_t(30, "Sigma 28-70mm EX DG F2.8"));
choices.insert(p_t(30, "Sigma 28-70mm EX DG f/2.8"));
choices.insert(p_t(30, "Sigma 55-200mm f/4-5.6 DC"));
choices.insert(p_t(31, "Minolta/Sony AF 50mm f/2.8 Macro (D)"));
choices.insert(p_t(31, "Minolta/Sony AF 50mm f/2.8 Macro (D) or f/3.5"));
choices.insert(p_t(31, "Minolta/Sony AF 50mm f/3.5 Macro"));
choices.insert(p_t(32, "Minolta/Sony AF 300mm f/2.8 G or 1.5x Teleconverter"));
choices.insert(p_t(33, "Minolta/Sony AF 70-200mm f/2.8 G"));
@ -590,56 +589,66 @@ public:
choices.insert(p_t(38, "Minolta AF 17-35mm f/2.8-4 (D)"));
choices.insert(p_t(39, "Minolta AF 28-75mm f/2.8 (D)"));
choices.insert(p_t(40, "Minolta/Sony AF DT 18-70mm f/3.5-5.6 (D)"));
choices.insert(p_t(41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D)"));
choices.insert(p_t(41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D) or Tamron Lens"));
choices.insert(p_t(41, "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical IF"));
choices.insert(p_t(42, "Minolta AF DT 18-200mm f/3.5-6.3 (D)"));
choices.insert(p_t(43, "Minolta AF 35mm f/1.4 G"));
choices.insert(p_t(44, "Sony AF 50mm f/1.4"));
choices.insert(p_t(45, "Carl Zeiss Planar T* 85mm f/1.4 ZA"));
choices.insert(p_t(46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA"));
choices.insert(p_t(47, "Carl Zeiss Sonnar T* 135mm F1.8 ZA"));
choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM"));
choices.insert(p_t(49, "Sony AF DT 55-200mm f/4-5.6"));
choices.insert(p_t(50, "Sony AF DT 18-250mm f/3.5-6.3"));
choices.insert(p_t(51, "Sony AF DT 16-105mm f/3.5-5.6"));
choices.insert(p_t(52, "Sony AF 70-300mm f/4.5-5.6 G SSM"));
choices.insert(p_t(52, "Tamron SP 70-300mm f/4-5.6 Di VC USD"));
choices.insert(p_t(53, "Sony AF 70-400mm f/4.5-5.6 G SSM"));
choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM"));
choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM"));
choices.insert(p_t(56, "Sony AF DT 55-200mm f/4-5.6 SAM"));
choices.insert(p_t(57, "Sony AF DT 50mm f/1.8 SAM"));
choices.insert(p_t(42, "Minolta/Sony AF DT 18-200mm f/3.5-6.3 (D)"));
choices.insert(p_t(43, "Sony 35mm f/1.4 G (SAL35F14G)"));
choices.insert(p_t(44, "Sony 50mm f/1.4 (SAL50F14)"));
choices.insert(p_t(45, "Carl Zeiss Planar T* 85mm f/1.4 ZA (SAL85F14Z)"));
choices.insert(p_t(46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA (SAL1680Z)"));
choices.insert(p_t(47, "Carl Zeiss Sonnar T* 135mm f/1.8 ZA (SAL135F18Z)"));
choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or ZA SSM II"));
choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)"));
choices.insert(p_t(49, "Sony DT 55-200mm f/4-5.6 (SAL55200)"));
choices.insert(p_t(50, "Sony DT 18-250mm f/3.5-6.3 (SAL18250)"));
choices.insert(p_t(51, "Sony DT 16-105mm f/3.5-5.6 (SAL16105)"));
choices.insert(p_t(52, "Sony 70-300mm f/4.5-5.6 G SSM (SAL70300G) or G SSM II or Tamron Lens"));
choices.insert(p_t(52, "Sony 70-300mm f/4.5-5.6 G SSM II (SAL70300G2)"));
choices.insert(p_t(52, "Tamron SP 70-300mm f/4-5.6 Di USD"));
choices.insert(p_t(53, "Sony 70-400mm f/4-5.6 G SSM (SAL70400G)"));
choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM (SAL1635Z) or ZA SSM II"));
choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II (SAL1635Z2)"));
choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM (SAL1855) or SAM II"));
choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM II (SAL18552)"));
choices.insert(p_t(56, "Sony DT 55-200mm f/4-5.6 SAM (SAL55200-2)"));
choices.insert(p_t(57, "Sony DT 50mm f/1.8 SAM (SAL50F18) or Tamron Lens"));
choices.insert(p_t(57, "Tamron SP AF 60mm f/2 Di II LD [IF] Macro 1:1"));
choices.insert(p_t(57, "Tamron 18-270mm f/3.5-6.3 Di II PZD"));
choices.insert(p_t(58, "Sony AF DT 30mm f/2.8 SAM Macro"));
choices.insert(p_t(59, "Sony AF 28-75mm f/2.8 SAM"));
choices.insert(p_t(60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM"));
choices.insert(p_t(61, "Sony AF 85mm f/2.8 SAM"));
choices.insert(p_t(62, "Sony DT 35mm f/1.8 SAM"));
choices.insert(p_t(63, "Sony DT 16-50mm f/2.8 SSM"));
choices.insert(p_t(64, "Sony 500mm f/4.0 G SSM"));
choices.insert(p_t(65, "Sony DT 18-135mm f/3.5-5.6 SAM"));
choices.insert(p_t(66, "Sony 300mm f/2.8 G SSM II"));
choices.insert(p_t(67, "Sony 70-20mm f/2.8 G SSM"));
choices.insert(p_t(68, "Sony DT 55-300mm f/4.5-5.6 SAM"));
choices.insert(p_t(69, "Sony 70-400mm f/4-5.6 G SSM II"));
choices.insert(p_t(70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM"));
choices.insert(p_t(128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)"));
choices.insert(p_t(128, "Tamron AF 28-300mm f/3.5-6.3"));
choices.insert(p_t(58, "Sony DT 30mm f/2.8 Macro SAM (SAL30M28)"));
choices.insert(p_t(59, "Sony 28-75mm f/2.8 SAM (SAL2875)"));
choices.insert(p_t(60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM (SAL24F20Z)"));
choices.insert(p_t(61, "Sony 85mm f/2.8 SAM (SAL85F28)"));
choices.insert(p_t(62, "Sony DT 35mm f/1.8 SAM (SAL35F18)"));
choices.insert(p_t(63, "Sony DT 16-50mm f/2.8 SSM (SAL1650)"));
choices.insert(p_t(64, "Sony 500mm f/4 G SSM (SAL500F40G)"));
choices.insert(p_t(65, "Sony DT 18-135mm f/3.5-5.6 SAM (SAL18135)"));
choices.insert(p_t(66, "Sony 300mm f/2.8 G SSM II (SAL300F28G2)"));
choices.insert(p_t(67, "Sony 70-200mm f/2.8 G SSM II (SAL70200G2)"));
choices.insert(p_t(68, "Sony DT 55-300mm f/4.5-5.6 SAM (SAL55300)"));
choices.insert(p_t(69, "Sony 70-400mm f/4-5.6 G SSM II (SAL70400G2)"));
choices.insert(p_t(70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM (SAL50F14Z)"));
choices.insert(p_t(128, "Tamron or Sigma Lens (128)"));
choices.insert(p_t(128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro"));
choices.insert(p_t(128, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro"));
choices.insert(p_t(128, "Tamron 80-300mm f/3.5-6.3"));
choices.insert(p_t(128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro"));
choices.insert(p_t(128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"));
choices.insert(p_t(128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II"));
choices.insert(p_t(128, "Sigma 10-20mm f/3.5 EX DC HSM"));
choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO Macro HSM"));
choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO MACRO HSM"));
choices.insert(p_t(128, "Sigma 10mm f/2.8 EX DC HSM Fisheye"));
choices.insert(p_t(128, "Sigma 35mm f/1.4 DG HSM"));
choices.insert(p_t(128, "Sigma 50mm f/1.4 EX DG HSM"));
choices.insert(p_t(128, "Sigma 85mm f/1.4 EX DG HSM"));
choices.insert(p_t(128, "Sigma 24-70mm f/2.8 IF EX DG HSM"));
choices.insert(p_t(128, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"));
choices.insert(p_t(128, "Sigma 17-50mm f/2.8 EX DC HSM"));
choices.insert(p_t(128, "Sigma 17-70mm f/2.8-4 DC Macro HSM"));
choices.insert(p_t(128, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro"));
choices.insert(p_t(128, "Sigma 150-500mm f/5-6.3 APO DG OS HSM"));
choices.insert(p_t(128, "Tamron AF 28-105mm f/4-5.6 [IF]"));
choices.insert(p_t(128, "Sigma 35mm f/1.4 DG HSM"));
choices.insert(p_t(128, "Sigma 18-35mm f/1.8 DC HSM"));
choices.insert(p_t(129, "Tamron Lens (129)"));
choices.insert(p_t(129, "Tamron 200-400mm f/5.6 LD"));
choices.insert(p_t(129, "Tamron 70-300mm f/4-5.6 LD"));
choices.insert(p_t(131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF"));
@ -647,43 +656,56 @@ public:
choices.insert(p_t(136, "Tokina EMZ M100 AF 100mm f/3.5"));
choices.insert(p_t(137, "Cosina 70-210mm f/2.8-4 AF"));
choices.insert(p_t(138, "Soligor 19-35mm f/3.5-4.5"));
choices.insert(p_t(139, "Tokina AF 28-300mm f/4-6.3"));
choices.insert(p_t(142, "Voigtlander 70-300mm f/4.5-5.6"));
choices.insert(p_t(146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL"));
choices.insert(p_t(194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]"));
choices.insert(p_t(203, "Tamron SP 70-200mm f/2.8 Di USD"));
choices.insert(p_t(204, "Tamron SP 24-70mm f/2.8 Di USD"));
choices.insert(p_t(213, "Tamron 16-300mm f/3.5-6.3 Di II PZD"));
choices.insert(p_t(214, "Tamron SP 150-600mm f/5-6.3 Di USD"));
choices.insert(p_t(224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD"));
choices.insert(p_t(255, "Tamron Lens (255)"));
choices.insert(p_t(255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical"));
choices.insert(p_t(255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD"));
choices.insert(p_t(255, "Tamron AF 55-200mm f/4-5.6 Di II LD Macro"));
choices.insert(p_t(255, "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2"));
choices.insert(p_t(255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD [IF]"));
choices.insert(p_t(255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]"));
choices.insert(p_t(255, "Tamron SP AF 70-200mm f/2.8 Di LD Macro [IF]"));
choices.insert(p_t(255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF]"));
choices.insert(p_t(255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD IF"));
choices.insert(p_t(255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical IF"));
choices.insert(p_t(255, "Tamron SP AF 70-200mm f/2.8 Di LD IF Macro"));
choices.insert(p_t(255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF"));
choices.insert(p_t(255, "Tamron AF 90-300mm f/4.5-5.6 Telemacro"));
choices.insert(p_t(2550, "Minolta AF 50mm f/1.7"));
choices.insert(p_t(2551, "Minolta AF 35-70mm f/4"));
choices.insert(p_t(2551, "Minolta AF 35-70mm f/4 or Other Lens"));
choices.insert(p_t(2551, "Sigma UC AF 28-70mm f/3.5-4.5"));
choices.insert(p_t(2551, "Sigma AF 28-70mm f/2.8"));
choices.insert(p_t(2551, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"));
choices.insert(p_t(2551, "Quantaray M-AF 35-80mm f/4-5.6"));
choices.insert(p_t(2552, "Minolta AF 28-85mm f/3.5-4.5 [New]"));
choices.insert(p_t(2551, "Tokina 28-70mm f/2.8-4.5 AF"));
choices.insert(p_t(2552, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"));
choices.insert(p_t(2552, "Tokina 19-35mm f/3.5-4.5"));
choices.insert(p_t(2552, "Tokina 28-70mm f/2.8 AT-X"));
choices.insert(p_t(2552, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"));
choices.insert(p_t(2552, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"));
choices.insert(p_t(2552, "Tokina AT-X PRO II AF 28-70mm f/2.6-2.8 270"));
choices.insert(p_t(2552, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"));
choices.insert(p_t(2552, "Tamron AF 19-35mm f/3.5-4.5"));
choices.insert(p_t(2552, "Angenieux AF 28-70mm f/2.6"));
choices.insert(p_t(2553, "Minolta AF 28-135mm f/4-4.5"));
choices.insert(p_t(2552, "Tokina AT-X 17 AF 17mm f/3.5"));
choices.insert(p_t(2552, "Tokina 20-35mm f/3.5-4.5 II AF"));
choices.insert(p_t(2553, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"));
choices.insert(p_t(2553, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"));
choices.insert(p_t(2553, "Sigma 28-105mm f/2.8-4 Aspherical"));
choices.insert(p_t(2553, "Sigma 28-105mm f/4-5.6 UC"));
choices.insert(p_t(2554, "Minolta AF 35-105mm f/3.5-4.5"));
choices.insert(p_t(2555, "Minolta AF 70-210mm f/4 Macro"));
choices.insert(p_t(2555, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"));
choices.insert(p_t(2555, "Sigma 70-210mm f/4-5.6 APO"));
choices.insert(p_t(2555, "Sigma M-AF 70-200mm f/2.8 EX APO"));
choices.insert(p_t(2555, "Sigma 75-200mm f/2.8-3.5"));
choices.insert(p_t(2556, "Minolta AF 135mm f/2.8"));
choices.insert(p_t(2557, "Minolta AF 28mm f/2.8"));
choices.insert(p_t(2557, "Minolta/Sony AF 28mm f/2.8"));
choices.insert(p_t(2558, "Minolta AF 24-50mm f/4"));
choices.insert(p_t(2560, "Minolta AF 100-200mm f/4.5"));
choices.insert(p_t(2561, "Minolta AF 75-300mm f/4.5-5.6"));
choices.insert(p_t(2561, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"));
choices.insert(p_t(2561, "Sigma 70-300mm f/4-5.6 DL Macro"));
choices.insert(p_t(2561, "Sigma 300mm f/4 APO Macro"));
choices.insert(p_t(2561, "Sigma AF 500mm f/4.5 APO"));
@ -691,54 +713,63 @@ public:
choices.insert(p_t(2561, "Tokina AT-X AF 300mm f/4"));
choices.insert(p_t(2561, "Tokina AT-X AF 400mm f/5.6 SD"));
choices.insert(p_t(2561, "Tokina AF 730 II 75-300mm f/4.5-5.6"));
choices.insert(p_t(2562, "Minolta/Sony AF 50mm f/1.4 [New]"));
choices.insert(p_t(2563, "Minolta AF 300mm f/2.8 G"));
choices.insert(p_t(2561, "Sigma 800mm f/5.6 APO"));
choices.insert(p_t(2561, "Sigma AF 400mm f/5.6 APO Macro"));
choices.insert(p_t(2562, "Minolta AF 50mm f/1.4 [New]"));
choices.insert(p_t(2563, "Minolta AF 300mm f/2.8 APO or Sigma Lens"));
choices.insert(p_t(2563, "Sigma AF 50-500mm f/4-6.3 EX DG APO"));
choices.insert(p_t(2563, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"));
choices.insert(p_t(2563, "Sigma AF 500mm f/4.5 EX DG APO"));
choices.insert(p_t(2563, "Sigma 400mm f/5.6 APO"));
choices.insert(p_t(2564, "Minolta AF 50mm f/2.8 Macro"));
choices.insert(p_t(2564, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"));
choices.insert(p_t(2564, "Sigma 50mm f/2.8 EX Macro"));
choices.insert(p_t(2565, "Minolta AF 600mm f/4"));
choices.insert(p_t(2566, "Minolta AF 24mm f/2.8"));
choices.insert(p_t(2566, "Minolta AF 24mm f/2.8 or Sigma Lens"));
choices.insert(p_t(2566, "Sigma 17-35mm f/2.8-4 EX Aspherical"));
choices.insert(p_t(2572, "Minolta/Sony AF 500mm f/8 Reflex"));
choices.insert(p_t(2578, "Minolta AF 16mm f/2.8 Fisheye"));
choices.insert(p_t(2578, "Sigma 8mm f/4 EX DG Fisheye"));
choices.insert(p_t(2578, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"));
choices.insert(p_t(2578, "Sigma 8mm f/4 EX [DG] Fisheye"));
choices.insert(p_t(2578, "Sigma 14mm f/3.5"));
choices.insert(p_t(2578, "Sigma 15mm f/2.8 Fisheye"));
choices.insert(p_t(2579, "Minolta AF 20mm f/2.8"));
choices.insert(p_t(2581, "Minolta/Sony AF 100mm f/2.8 Macro"));
choices.insert(p_t(2579, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"));
choices.insert(p_t(2579, "Tokina AT-X Pro DX 11-16mm f/2.8"));
choices.insert(p_t(2581, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"));
choices.insert(p_t(2581, "Sigma AF 90mm f/2.8 Macro"));
choices.insert(p_t(2581, "Sigma AF 105mm f/2.8 EX DG Macro"));
choices.insert(p_t(2581, "Sigma AF 105mm f/2.8 EX [DG] Macro"));
choices.insert(p_t(2581, "Sigma 180mm f/5.6 Macro"));
choices.insert(p_t(2581, "Tamron AF 90mm f/2.8 Macro"));
choices.insert(p_t(2585, "Minolta AF 35-105mm f/3.5-4.5 New"));
choices.insert(p_t(2581, "Sigma 180mm f/3.5 EX DG Macro"));
choices.insert(p_t(2581, "Tamron 90mm f/2.8 Macro"));
choices.insert(p_t(2585, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"));
choices.insert(p_t(2585, "Beroflex 35-135mm f/3.5-4.5"));
choices.insert(p_t(2585, "Tamron AF 24-135mm f/3.5-5.6"));
choices.insert(p_t(2585, "Tamron 24-135mm f/3.5-5.6"));
choices.insert(p_t(2588, "Minolta AF 70-210mm f/3.5-4.5"));
choices.insert(p_t(2589, "Minolta AF 80-200 f/2.8 APO"));
choices.insert(p_t(2589, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"));
choices.insert(p_t(2589, "Tokina 80-200mm f/2.8"));
choices.insert(p_t(2590, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"));
choices.insert(p_t(2590, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"));
choices.insert(p_t(2591, "Minolta AF 35mm f/1.4"));
choices.insert(p_t(2592, "Minolta AF 85mm f/1.4 G (D)"));
choices.insert(p_t(2593, "Minolta AF 200mm f/2.8 G APO"));
choices.insert(p_t(2594, "Minolta AF 3x-1x f/1.7-2.8 Macro"));
choices.insert(p_t(2596, "Minolta AF 28mm f/2"));
choices.insert(p_t(2597, "Minolta AF 35mm f/2"));
choices.insert(p_t(2597, "Minolta AF 35mm f/2 [New]"));
choices.insert(p_t(2598, "Minolta AF 100mm f/2"));
choices.insert(p_t(2601, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"));
choices.insert(p_t(2601, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"));
choices.insert(p_t(2604, "Minolta AF 80-200mm f/4.5-5.6"));
choices.insert(p_t(2605, "Minolta AF 35-80mm f/4-5.6"));
choices.insert(p_t(2606, "Minolta AF 100-300mm f/4.5-5.6 (D)"));
choices.insert(p_t(2606, "Minolta AF 100-300mm f/4.5-5.6"));
choices.insert(p_t(2607, "Minolta AF 35-80mm f/4-5.6"));
choices.insert(p_t(2608, "Minolta AF 300mm f/2.8 G"));
choices.insert(p_t(2608, "Minolta AF 300mm f/2.8 HS-APO G"));
choices.insert(p_t(2609, "Minolta AF 600mm f/4 HS-APO G"));
choices.insert(p_t(2612, "Minolta AF 200mm f/2.8 G HS-APO"));
choices.insert(p_t(2612, "Minolta AF 200mm f/2.8 HS-APO G"));
choices.insert(p_t(2613, "Minolta AF 50mm f/1.7 New"));
choices.insert(p_t(2615, "Minolta AF 28-105mm f/3.5-4.5 Power Zoom"));
choices.insert(p_t(2616, "Minolta AF 35-200mm f/4.5-5.6 Power Zoom"));
choices.insert(p_t(2618, "Minolta AF 28-80mm f/4-5.6 Power Zoom"));
choices.insert(p_t(2619, "Minolta AF 80-200mm f/4.5-5.6 Power Zoom"));
choices.insert(p_t(2615, "Minolta AF 28-105mm f/3.5-4.5 xi"));
choices.insert(p_t(2616, "Minolta AF 35-200mm f/4.5-5.6 xi"));
choices.insert(p_t(2618, "Minolta AF 28-80mm f/4-5.6 xi"));
choices.insert(p_t(2619, "Minolta AF 80-200mm f/4.5-5.6 xi"));
choices.insert(p_t(2620, "Minolta AF 28-70mm f/2.8 G"));
choices.insert(p_t(2621, "Minolta AF 100-300mm f/4.5-5.6 Power Zoom"));
choices.insert(p_t(2621, "Minolta AF 100-300mm f/4.5-5.6 xi"));
choices.insert(p_t(2624, "Minolta AF 35-80mm f/4-5.6 Power Zoom"));
choices.insert(p_t(2628, "Minolta AF 80-200mm f/2.8 G"));
choices.insert(p_t(2629, "Minolta AF 85mm f/1.4 New"));
@ -746,44 +777,96 @@ public:
choices.insert(p_t(2632, "Minolta AF 24-50mm f/4 New"));
choices.insert(p_t(2638, "Minolta AF 50mm f/2.8 Macro New"));
choices.insert(p_t(2639, "Minolta AF 100mm f/2.8 Macro"));
choices.insert(p_t(2641, "Minolta AF 20mm f/2.8 New"));
choices.insert(p_t(2641, "Minolta/Sony AF 20mm f/2.8 New"));
choices.insert(p_t(2642, "Minolta AF 24mm f/2.8 New"));
choices.insert(p_t(2644, "Minolta AF 100-400mm f/4.5-6.7 APO"));
choices.insert(p_t(2662, "Minolta AF 50mm f/1.4 New"));
choices.insert(p_t(2667, "Minolta AF 35mm f/2 New"));
choices.insert(p_t(2668, "Minolta AF 28mm f/2 New"));
choices.insert(p_t(2672, "Minolta AF 24-105mm f/3.5-4.5 (D)"));
choices.insert(p_t(4574, "Minolta AF 200mm f/2.8 G x2"));
choices.insert(p_t(4575, "1.4 x Teleconverter"));
choices.insert(p_t(3046, "Metabones Canon EF Speed Booster"));
choices.insert(p_t(4567, "Tokina 70-210mm f/4-5.6"));
choices.insert(p_t(4571, "Vivitar 70-210mm f/4.5-5.6"));
choices.insert(p_t(4574, "2x Teleconverter or Tamron or Tokina Lens"));
choices.insert(p_t(4574, "Tamron SP AF 90mm f/2.5"));
choices.insert(p_t(4574, "Tokina RF 500mm f/8.0 x2"));
choices.insert(p_t(4574, "Tokina 300mm f/2.8 x2"));
choices.insert(p_t(4575, "1.4x Teleconverter"));
choices.insert(p_t(4585, "Tamron SP AF 300mm f/2.8 LD IF"));
choices.insert(p_t(4586, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"));
choices.insert(p_t(4587, "Tamron AF 70-210mm f/2.8 SP LD"));
choices.insert(p_t(6118, "Metabones Canon EF Adapter"));
choices.insert(p_t(6553, "E-Mount, T-Mount, Other Lens or no lens"));
choices.insert(p_t(6553, "Sony E 16mm f/2.8"));
choices.insert(p_t(6553, "Sony E 18-55mm f/3.5-5.6 OSS"));
choices.insert(p_t(6553, "Sony E 55-210mm f/4.5-6.3 OSS"));
choices.insert(p_t(6553, "Sony E 18-200mm f/3.5-6.3 OSS"));
choices.insert(p_t(6553, "Sony E 30mm f/3.5 Macro"));
choices.insert(p_t(6553, "Sony E 24mm f/1.8 ZA"));
choices.insert(p_t(6553, "Sony E 50mm f/1.8 OSS"));
choices.insert(p_t(6553, "Sony E 16-70mm f/4 ZA OSS"));
choices.insert(p_t(6553, "Sony E 10-18mm f/4 OSS"));
choices.insert(p_t(6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS"));
choices.insert(p_t(6553, "Sony FE 35mm f/2.8 ZA"));
choices.insert(p_t(6553, "Sony FE 24-70mm f/4 ZA OSS"));
choices.insert(p_t(6553, "Sony E 18-200mm f/3.5-6.3 OSS LE"));
choices.insert(p_t(6553, "Sony E 20mm f/2.8"));
choices.insert(p_t(6553, "Sony E 35mm f/1.8 OSS"));
choices.insert(p_t(6553, "Sony E PZ 18-105mm f/4 G OSS"));
choices.insert(p_t(6553, "Sony FE 90mm f/2.8 Macro G OSS"));
choices.insert(p_t(6553, "Sony E 18-50mm f/4-5.6"));
choices.insert(p_t(6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS"));
choices.insert(p_t(6553, "Sony FE 55mm f/1.8 ZA"));
choices.insert(p_t(6553, "Sony FE 70-200mm f/4 G OSS"));
choices.insert(p_t(6553, "Sony FE 16-35mm f/4 ZA OSS"));
choices.insert(p_t(6553, "Sony FE 28-70mm f/3.5-5.6 OSS"));
choices.insert(p_t(6553, "Sony FE 35mm f/1.4 ZA"));
choices.insert(p_t(6553, "Sony FE 24-240mm f/3.5-6.3 OSS"));
choices.insert(p_t(6553, "Sony FE 28mm f/2"));
choices.insert(p_t(6553, "Sony FE PZ 28-135mm f/4 G OSS"));
choices.insert(p_t(6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"));
choices.insert(p_t(6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"));
choices.insert(p_t(6553, "Sigma 19mm f/2.8 [EX] DN"));
choices.insert(p_t(6553, "Sigma 30mm f/2.8 [EX] DN"));
choices.insert(p_t(6553, "Sigma 60mm f/2.8 DN"));
choices.insert(p_t(6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"));
choices.insert(p_t(6553, "Zeiss Batis 25mm f/2"));
choices.insert(p_t(6553, "Zeiss Batis 85mm f/1.8"));
choices.insert(p_t(6553, "Zeiss Loxia 35mm f/2"));
choices.insert(p_t(6553, "Zeiss Loxia 50mm f/2"));
choices.insert(p_t(6553, "Zeiss Touit 12mm f/2.8"));
choices.insert(p_t(6553, "Zeiss Touit 32mm f/1.8"));
choices.insert(p_t(6553, "Zeiss Touit 50mm f/2.8 Macro"));
choices.insert(p_t(6553, "Arax MC 35mm f/2.8 Tilt+Shift"));
choices.insert(p_t(6553, "Arax MC 80mm f/2.8 Tilt+Shift"));
choices.insert(p_t(6553, "Zenitar MF 16mm f/2.8 Fisheye M42"));
choices.insert(p_t(6553, "Samyang 500mm Mirror f/8"));
choices.insert(p_t(6553, "Samyang 500mm Mirror f/8.0"));
choices.insert(p_t(6553, "Pentacon Auto 135mm f/2.8"));
choices.insert(p_t(6553, "Pentacon Auto 29mm f/2.8"));
choices.insert(p_t(6553, "Helios 44-2 58mm f/2"));
choices.insert(p_t(6553, "Helios 44-2 58mm f/2.0"));
choices.insert(p_t(25501, "Minolta AF 50mm f/1.7"));
choices.insert(p_t(25511, "Minolta AF 35-70mm f/4"));
choices.insert(p_t(25511, "Minolta AF 35-70mm f/4 or Other Lens"));
choices.insert(p_t(25511, "Sigma UC AF 28-70mm f/3.5-4.5"));
choices.insert(p_t(25511, "Sigma AF 28-70mm f/2.8"));
choices.insert(p_t(25511, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"));
choices.insert(p_t(25511, "Quantaray M-AF 35-80mm f/4-5.6"));
choices.insert(p_t(25521, "Minolta AF 28-85mm f/3.5-4.5"));
choices.insert(p_t(25511, "Tokina 28-70mm f/2.8-4.5 AF"));
choices.insert(p_t(25521, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"));
choices.insert(p_t(25521, "Tokina 19-35mm f/3.5-4.5"));
choices.insert(p_t(25521, "Tokina 28-70mm f/2.8 AT-X"));
choices.insert(p_t(25521, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"));
choices.insert(p_t(25521, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"));
choices.insert(p_t(25521, "Tokina AT-X PRO II AF 28-70mm f/2.6-2.8 270"));
choices.insert(p_t(25521, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"));
choices.insert(p_t(25521, "Tamron AF 19-35mm f/3.5-4.5"));
choices.insert(p_t(25521, "Angenieux AF 28-70mm f/2.6"));
choices.insert(p_t(25521, "Tokina AT-X 17 AF 17mm f/3.5"));
choices.insert(p_t(25531, "Minolta AF 28-135mm f/4-4.5"));
choices.insert(p_t(25521, "Tokina 20-35mm f/3.5-4.5 II AF"));
choices.insert(p_t(25531, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"));
choices.insert(p_t(25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"));
choices.insert(p_t(25531, "Sigma 28-105mm f/2.8-4 Aspherical"));
choices.insert(p_t(25531, "Sigma 28-105mm f/4-5.6 UC"));
choices.insert(p_t(25541, "Minolta AF 35-105mm f/3.5-4.5"));
choices.insert(p_t(25551, "Minolta AF 70-210mm f/4 Macro"));
choices.insert(p_t(25551, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"));
choices.insert(p_t(25551, "Sigma 70-210mm f/4-5.6 APO"));
choices.insert(p_t(25551, "Sigma M-AF 70-200mm f/2.8 EX APO"));
choices.insert(p_t(25551, "Sigma 75-200mm f/2.8-3.5"));
@ -791,7 +874,7 @@ public:
choices.insert(p_t(25571, "Minolta/Sony AF 28mm f/2.8"));
choices.insert(p_t(25581, "Minolta AF 24-50mm f/4"));
choices.insert(p_t(25601, "Minolta AF 100-200mm f/4.5"));
choices.insert(p_t(25611, "Minolta AF 75-300mm f/4.5-5.6"));
choices.insert(p_t(25611, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"));
choices.insert(p_t(25611, "Sigma 70-300mm f/4-5.6 DL Macro"));
choices.insert(p_t(25611, "Sigma 300mm f/4 APO Macro"));
choices.insert(p_t(25611, "Sigma AF 500mm f/4.5 APO"));
@ -801,46 +884,46 @@ public:
choices.insert(p_t(25611, "Tokina AF 730 II 75-300mm f/4.5-5.6"));
choices.insert(p_t(25611, "Sigma 800mm f/5.6 APO"));
choices.insert(p_t(25611, "Sigma AF 400mm f/5.6 APO Macro"));
choices.insert(p_t(25621, "Minolta AF 50mm f/1.4"));
choices.insert(p_t(25631, "Minolta AF 300mm f/2.8 APO"));
choices.insert(p_t(25621, "Minolta AF 50mm f/1.4 [New]"));
choices.insert(p_t(25631, "Minolta AF 300mm f/2.8 APO or Sigma Lens"));
choices.insert(p_t(25631, "Sigma AF 50-500mm f/4-6.3 EX DG APO"));
choices.insert(p_t(25631, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"));
choices.insert(p_t(25631, "Sigma AF 500mm f/4.5 EX DG APO"));
choices.insert(p_t(25631, "Sigma 400mm f/5.6 APO"));
choices.insert(p_t(25641, "Minolta AF 50mm f/2.8 Macro"));
choices.insert(p_t(25641, "Sigma AF 50mm f/2.8 EX Macro"));
choices.insert(p_t(25641, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"));
choices.insert(p_t(25641, "Sigma 50mm f/2.8 EX Macro"));
choices.insert(p_t(25651, "Minolta AF 600mm f/4"));
choices.insert(p_t(25661, "Minolta AF 24mm f/2.8"));
choices.insert(p_t(25661, "Minolta AF 24mm f/2.8 or Sigma Lens"));
choices.insert(p_t(25661, "Sigma 17-35mm f/2.8-4 EX Aspherical"));
choices.insert(p_t(25721, "Minolta/Sony AF 500mm f/8 Reflex"));
choices.insert(p_t(25781, "Minolta/Sony AF 16mm f/2.8 Fisheye"));
choices.insert(p_t(25781, "Sigma 8mm f/4 EX DG Fisheye"));
choices.insert(p_t(25781, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"));
choices.insert(p_t(25781, "Sigma 8mm f/4 EX [DG] Fisheye"));
choices.insert(p_t(25781, "Sigma 14mm f/3.5"));
choices.insert(p_t(25781, "Sigma 15mm f/2.8 Fisheye"));
choices.insert(p_t(25791, "Minolta/Sony AF 20mm f/2.8"));
choices.insert(p_t(25791, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"));
choices.insert(p_t(25791, "Tokina AT-X Pro DX 11-16mm f/2.8"));
choices.insert(p_t(25811, "Minolta/Sony AF 100mm f/2.8 Macro"));
choices.insert(p_t(25811, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"));
choices.insert(p_t(25811, "Sigma AF 90mm f/2.8 Macro"));
choices.insert(p_t(25811, "Sigma AF 105mm f/2.8 EX DG Macro"));
choices.insert(p_t(25811, "Sigma AF 105mm f/2.8 EX [DG] Macro"));
choices.insert(p_t(25811, "Sigma 180mm f/5.6 Macro"));
choices.insert(p_t(25811, "Sigma 180mm f/3.5 EX DG Macro"));
choices.insert(p_t(25811, "Tamron 90mm f/2.8 Macro"));
choices.insert(p_t(25851, "Beroflex 35-135mm f/3.5-4.5"));
choices.insert(p_t(25858, "Minolta AF 35-105mm f/3.5-4.5"));
choices.insert(p_t(25858, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"));
choices.insert(p_t(25858, "Tamron 24-135mm f/3.5-5.6"));
choices.insert(p_t(25881, "Minolta AF 70-210mm f/3.5-4.5"));
choices.insert(p_t(25891, "Minolta AF 80-200mm f/2.8 APO"));
choices.insert(p_t(25891, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"));
choices.insert(p_t(25891, "Tokina 80-200mm f/2.8"));
choices.insert(p_t(25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO"));
choices.insert(p_t(25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"));
choices.insert(p_t(25901, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"));
choices.insert(p_t(25911, "Minolta AF 35mm f/1.4"));
choices.insert(p_t(25921, "Minolta AF 85mm f/1.4 G (D)"));
choices.insert(p_t(25931, "Minolta AF 200mm f/2.8 G APO"));
choices.insert(p_t(25941, "Minolta AF 3x-1x f/1.7-2.8 Macro"));
choices.insert(p_t(25961, "Minolta AF 28mm f/2"));
choices.insert(p_t(25971, "Minolta AF 35mm f/2"));
choices.insert(p_t(25971, "Minolta AF 35mm f/2 [New]"));
choices.insert(p_t(25981, "Minolta AF 100mm f/2"));
choices.insert(p_t(26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO"));
choices.insert(p_t(26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"));
choices.insert(p_t(26011, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"));
choices.insert(p_t(26041, "Minolta AF 80-200mm f/4.5-5.6"));
choices.insert(p_t(26051, "Minolta AF 35-80mm f/4-5.6"));
@ -870,13 +953,19 @@ public:
choices.insert(p_t(26671, "Minolta AF 35mm f/2 New"));
choices.insert(p_t(26681, "Minolta AF 28mm f/2 New"));
choices.insert(p_t(26721, "Minolta AF 24-105mm f/3.5-4.5 (D)"));
choices.insert(p_t(30464, "Metabones Canon EF Speed Booster"));
choices.insert(p_t(45671, "Tokina 70-210mm f/4-5.6"));
choices.insert(p_t(45711, "Vivitar 70-210mm f/4.5-5.6"));
choices.insert(p_t(45741, "2x Teleconverter or Tamron or Tokina Lens"));
choices.insert(p_t(45741, "Tamron SP AF 90mm f/2.5"));
choices.insert(p_t(45741, "Tokina RF 500mm f/8.0 x2"));
choices.insert(p_t(45741, "Tokina 300mm f/2.8 x2"));
choices.insert(p_t(45741, "Minolta AF 200mm f/2.8 G x2"));
choices.insert(p_t(45751, "1.4x Teleconverter"));
choices.insert(p_t(45851, "Tamron SP AF 300mm f/2.8 LD IF"));
choices.insert(p_t(45861, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"));
choices.insert(p_t(45871, "Tamron AF 70-210mm f/2.8 SP LD"));
choices.insert(p_t(61184, "Metabones Canon EF Adapter"));
choices.insert(p_t(65535, "E-Mount, T-Mount, Other Lens or no lens"));
choices.insert(p_t(65535, "Sony E 16mm f/2.8"));
choices.insert(p_t(65535, "Sony E 18-55mm f/3.5-5.6 OSS"));
choices.insert(p_t(65535, "Sony E 55-210mm f/4.5-6.3 OSS"));
@ -892,24 +981,38 @@ public:
choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS LE"));
choices.insert(p_t(65535, "Sony E 20mm f/2.8"));
choices.insert(p_t(65535, "Sony E 35mm f/1.8 OSS"));
choices.insert(p_t(65535, "Sony E PZ 18-105mm f/4 G OSS"));
choices.insert(p_t(65535, "Sony FE 90mm f/2.8 Macro G OSS"));
choices.insert(p_t(65535, "Sony E 18-50mm f/4-5.6"));
choices.insert(p_t(65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS"));
choices.insert(p_t(65535, "Sony FE 55mm f/1.8 ZA"));
choices.insert(p_t(65535, "Sony FE 28-70mm f/3.5-5.6 OSS"));
choices.insert(p_t(65535, "Sony E PZ 18-105mm f/4 G OSS"));
choices.insert(p_t(65535, "Sony FE 70-200mm f/4 G OSS"));
choices.insert(p_t(65535, "Sony FE 16-35mm f/4 ZA OSS"));
choices.insert(p_t(65535, "Sony FE 28-70mm f/3.5-5.6 OSS"));
choices.insert(p_t(65535, "Sony FE 35mm f/1.4 ZA"));
choices.insert(p_t(65535, "Sony FE 24-240mm f/3.5-6.3 OSS"));
choices.insert(p_t(65535, "Sony FE 28mm f/2"));
choices.insert(p_t(65535, "Sony FE PZ 28-135mm f/4 G OSS"));
choices.insert(p_t(65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"));
choices.insert(p_t(65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"));
choices.insert(p_t(65535, "Sigma 19mm f/2.8 [EX] DN"));
choices.insert(p_t(65535, "Sigma 30mm f/2.8 [EX] DN"));
choices.insert(p_t(65535, "Sigma 60mm f/2.8 DN"));
choices.insert(p_t(65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"));
choices.insert(p_t(65535, "Zeiss Batis 25mm f/2"));
choices.insert(p_t(65535, "Zeiss Batis 85mm f/1.8"));
choices.insert(p_t(65535, "Zeiss Loxia 35mm f/2"));
choices.insert(p_t(65535, "Zeiss Loxia 50mm f/2"));
choices.insert(p_t(65535, "Zeiss Touit 12mm f/2.8"));
choices.insert(p_t(65535, "Zeiss Touit 32mm f/1.8"));
choices.insert(p_t(65535, "Zeiss Touit 50mm f/2.8 Macro"));
choices.insert(p_t(65535, "Arax MC 35mm f/2.8 Tilt+Shift"));
choices.insert(p_t(65535, "Arax MC 80mm f/2.8 Tilt+Shift"));
choices.insert(p_t(65535, "Zenitar MF 16mm f/2.8 Fisheye M42"));
choices.insert(p_t(65535, "Samyang 500mm f/8 Mirror"));
choices.insert(p_t(65535, "Samyang 500mm Mirror f/8.0"));
choices.insert(p_t(65535, "Pentacon Auto 135mm f/2.8"));
choices.insert(p_t(65535, "Pentacon Auto 29mm f/2.8"));
choices.insert(p_t(65535, "Helios 44-2 58mm f/2"));
choices.insert(p_t(65535, "Helios 44-2 58mm f/2.0"));
}
virtual std::string toString (Tag* t)
@ -949,13 +1052,17 @@ SALensIDInterpreter saLensIDInterpreter;
class SALensID2Interpreter : public IntLensInterpreter< int >
{
public:
SALensID2Interpreter () // From EXIFTOOL database 'Sony.pm' V1.94 and 'Minolta' 2.04;
SALensID2Interpreter ()
{
// Please do not remove entries on database synchronization, and avoid transferring "categories' header" types
choices.insert(p_t(00000, "Unknown E-Mount lens or other lens"));
choices.insert(p_t(00001, "Sony LA-EA1 Adapter"));
choices.insert(p_t(00002, "Sony LA-EA2 Adapter"));
choices.insert(p_t(00006, "Sony LA-EA4 Adapter"));
choices.insert(p_t(0, "Unknown E-mount lens or other lens"));
choices.insert(p_t(1, "Sony LA-EA1 Adapter"));
choices.insert(p_t(2, "Sony LA-EA2 Adapter"));
choices.insert(p_t(3, "Sony LA-EA3 Adapter"));
choices.insert(p_t(6, "Sony LA-EA4 Adapter"));
choices.insert(p_t(44, "Metabones Canon EF Smart Adapter"));
choices.insert(p_t(78, "Metabones Canon EF Smart Adapter Mark III or IV"));
choices.insert(p_t(234, "Adapter only - no lens attached"));
choices.insert(p_t(239, "Metabones Canon EF Speed Booster"));
choices.insert(p_t(32784, "Sony E 16mm f/2.8"));
choices.insert(p_t(32785, "Sony E 18-55mm f/3.5-5.6 OSS"));
choices.insert(p_t(32786, "Sony E 55-210mm f/4.5-6.3 OSS"));
@ -971,9 +1078,22 @@ public:
choices.insert(p_t(32797, "Sony E 18-200mm f/3.5-6.3 OSS LE"));
choices.insert(p_t(32798, "Sony E 20mm f/2.8"));
choices.insert(p_t(32799, "Sony E 35mm f/1.8 OSS"));
choices.insert(p_t(32800, "Sony E PZ 18-105mm f/4 G OSS"));
choices.insert(p_t(32802, "Sony FE 90mm f/2.8 Macro G OSS"));
choices.insert(p_t(32803, "Sony E 18-50mm f/4-5.6"));
choices.insert(p_t(32807, "Sony E PZ 18-200mm f/3.5-6.3 OSS"));
choices.insert(p_t(32808, "Sony FE 55mm f/1.8 ZA"));
choices.insert(p_t(32810, "Sony FE 70-200mm f/4 G OSS"));
choices.insert(p_t(32811, "Sony FE 16-35mm f/4 ZA OSS"));
choices.insert(p_t(32813, "Sony FE 28-70mm f/3.5-5.6 OSS"));
choices.insert(p_t(32814, "Sony FE 35mm f/1.4 ZA"));
choices.insert(p_t(32815, "Sony FE 24-240mm f/3.5-6.3 OSS"));
choices.insert(p_t(32816, "Sony FE 28mm f/2"));
choices.insert(p_t(32817, "Sony FE PZ 28-135mm f/4 G OSS"));
choices.insert(p_t(32826, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"));
choices.insert(p_t(32827, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"));
choices.insert(p_t(49216, "Zeiss Batis 25mm f/2"));
choices.insert(p_t(49217, "Zeiss Batis 85mm f/1.8"));
}
virtual std::string toString (Tag* t)

View File

@ -161,7 +161,7 @@ void CoordinateAdjuster::startNumericalAdjustment(const std::vector<Boundaries>
Gtk::SpinButton *currSpinButton = axisAdjusters.at(i)->spinButton;
currSpinButton->set_sensitive(true);
float range = axisAdjusters.at(i)->rangeUpperBound - axisAdjusters.at(i)->rangeLowerBound;
currSpinButton->set_range(newBoundaries.at(i).minVal * range + axisAdjusters.at(i)->rangeLowerBound, newBoundaries.at(i).maxVal * range + axisAdjusters.at(i)->rangeUpperBound);
currSpinButton->set_range(newBoundaries.at(i).minVal * range + axisAdjusters.at(i)->rangeLowerBound, newBoundaries.at(i).maxVal * range + axisAdjusters.at(i)->rangeLowerBound);
}
axisAdjusters.at(0)->spinButton->grab_focus();
@ -190,7 +190,7 @@ void CoordinateAdjuster::switchAdjustedPoint(std::vector<double> &pos, const std
// ...narrow the range to the new interval
float range = axisAdjusters.at(i)->rangeUpperBound - axisAdjusters.at(i)->rangeLowerBound;
currAxis->spinButton->set_range(newBoundaries.at(i).minVal * range + axisAdjusters.at(i)->rangeLowerBound, newBoundaries.at(i).maxVal * range + axisAdjusters.at(i)->rangeUpperBound);
currAxis->spinButton->set_range(newBoundaries.at(i).minVal * range + axisAdjusters.at(i)->rangeLowerBound, newBoundaries.at(i).maxVal * range + axisAdjusters.at(i)->rangeLowerBound);
// enable events
currAxis->spinButtonConn.block(false);

View File

@ -267,6 +267,8 @@ void CropWindow::flawnOver (bool isFlawnOver)
void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
{
bool needRedraw = true; // most common case ; not redrawing are exceptions
iarea->grabFocus (this);
if (button == 1 && type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && (state == SNormal || state == SCropImgMove)) {
@ -355,33 +357,55 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
} else if (iarea->getToolMode () == TMHand) {
EditSubscriber *editSubscriber = iarea->getCurrSubscriber();
if (button == 1 && editSubscriber && cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_OBJECTS && iarea->object > -1) ) {
editSubscriber->button1Pressed(bstate);
state = SEditDrag;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
} else if (onArea (CropObserved, x, y)) {
state = SObservedMove;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
} else if (button == 1 && editSubscriber && cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK)) ) {
editSubscriber->button1Pressed(bstate);
state = SEditDrag;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
} else if(zoomSteps[cropZoom].zoom > cropHandler.getFitZoom()) { // only allow move when image is only partial visible
state = SCropImgMove;
if (editSubscriber && cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_OBJECTS)) {
if (button == 1) {
needRedraw = editSubscriber->button1Pressed(bstate);
if (editSubscriber->isDragging()) {
state = SEditDrag1;
}
} else if (button == 2) {
needRedraw = editSubscriber->button2Pressed(bstate);
if (editSubscriber->isDragging()) {
state = SEditDrag2;
}
} else if (button == 3) {
needRedraw = editSubscriber->button3Pressed(bstate);
if (editSubscriber->isDragging()) {
state = SEditDrag3;
}
}
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
}
if (state != SEditDrag1 && state != SEditDrag2 && state != SEditDrag3) {
if (onArea (CropObserved, x, y)) {
state = SObservedMove;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
} else if (button == 1 && editSubscriber && cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK)) ) {
editSubscriber->button1Pressed(bstate);
state = SEditDrag1;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
} else if(zoomSteps[cropZoom].zoom > cropHandler.getFitZoom()) { // only allow move when image is only partial visible
state = SCropImgMove;
press_x = x;
press_y = y;
action_x = 0;
action_y = 0;
}
}
} else if (onArea (CropObserved, x, y)) {
state = SObservedMove;
press_x = x;
@ -424,7 +448,10 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
}
}
iarea->redraw ();
if (needRedraw) {
iarea->redraw ();
}
updateCursor (x, y);
}
@ -472,8 +499,14 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y)
observedCropWin->remoteMoveReady ();
state = SNormal;
needRedraw = true;
} else if (state == SEditDrag) {
editSubscriber->button1Released();
} else if (state == SEditDrag1 || state == SEditDrag2 || state == SEditDrag3) {
if (state == SEditDrag1) {
needRedraw = editSubscriber->button1Released();
} else if (state == SEditDrag2) {
needRedraw = editSubscriber->button2Released();
} else if (state == SEditDrag3) {
needRedraw = editSubscriber->button3Released();
}
if (editSubscriber) {
rtengine::Crop* crop = static_cast<rtengine::Crop*>(cropHandler.getCrop());
@ -488,7 +521,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y)
Coord cropPos;
screenCoordToCropBuffer(x, y, cropPos.x, cropPos.y);
if (editSubscriber->getEditingType() == ET_PIPETTE) {
if (state == SEditDrag1 && editSubscriber->getEditingType() == ET_PIPETTE) {
iarea->object = onArea (CropImage, x, y) && !onArea (CropObserved, x, y) ? 1 : 0;
//iarea->object = cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) ? 1 : 0;
@ -506,9 +539,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y)
}
}
if (editSubscriber->mouseOver(bstate)) {
iarea->redraw ();
}
needRedraw |= editSubscriber->mouseOver(bstate);
} else {
iarea->object = 0;
}
@ -518,7 +549,6 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y)
iarea->deltaPrevImage.set(0, 0);
iarea->deltaPrevScreen.set(0, 0);
state = SNormal;
needRedraw = true;
}
if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) {
@ -703,7 +733,7 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
if (editSubscriber->mouseOver(bstate)) {
iarea->redraw ();
}
} else if (state == SEditDrag) {
} else if (state == SEditDrag1 || state == SEditDrag2 || state == SEditDrag3) {
Coord currPos;
action_x = x;
action_y = y;
@ -721,8 +751,18 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
iarea->deltaPrevScreen = currPos - oldPosScreen;
//printf(" action_ & xy (%d x %d) -> (%d x %d) = (%d x %d) + (%d x %d) / deltaPrev(%d x %d)\n", action_x, action_y, currPos.x, currPos.y, iarea->posScreen.x, iarea->posScreen.y, iarea->deltaScreen.x, iarea->deltaScreen.y, iarea->deltaPrevScreen.x, iarea->deltaPrevScreen.y);
if (editSubscriber->drag(bstate)) {
iarea->redraw ();
if (state == SEditDrag1) {
if (editSubscriber->drag1(bstate)) {
iarea->redraw ();
}
} else if (state == SEditDrag2) {
if (editSubscriber->drag2(bstate)) {
iarea->redraw ();
}
} else if (state == SEditDrag3) {
if (editSubscriber->drag3(bstate)) {
iarea->redraw ();
}
}
}
}
@ -1465,7 +1505,6 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
if (editSubscriber && crop->bufferCreated()) {
// clip the region
if (this != iarea->mainCropWindow) {
cr->set_line_width (0.);
cr->rectangle (x + imgX, y + imgY, imgW, imgH);

View File

@ -422,7 +422,7 @@ bool CurveEditor::button1Released()
return true;
}
bool CurveEditor::drag(int modifierKey)
bool CurveEditor::drag1(int modifierKey)
{
EditDataProvider* provider = getEditProvider();
subGroup->pipetteDrag(provider, modifierKey);

View File

@ -35,9 +35,8 @@ class CurveEditorSubGroup;
*/
/*
* This class is an interface between RT and the curve editor group ; it handles the methods
* related to a specific curve. It is created by CurveEditorGroup::addCurve
/** @brief This class is an interface between RT and the curve editor group
* It handles the methods related to a specific curve. It is created by CurveEditorGroup::addCurve
*/
class CurveEditor : public EditSubscriber
{
@ -131,7 +130,7 @@ public:
bool mouseOver(int modifierKey);
bool button1Pressed(int modifierKey);
bool button1Released();
bool drag(int modifierKey);
bool drag1(int modifierKey);
CursorShape getCursor(int objectID);

View File

@ -19,32 +19,21 @@
#include "edit.h"
#include "../rtengine/editbuffer.h"
void Coord::setFromPolar(PolarCoord polar)
{
while (polar.angle < 0.f) {
polar.angle += 360.f;
}
while (polar.angle > 360.f) {
polar.angle -= 360.f;
}
x = polar.radius * cos(polar.angle / 180.f * M_PI);
y = polar.radius * sin(polar.angle / 180.f * M_PI);
}
#include "rtimage.h"
RGBColor Geometry::getInnerLineColor ()
{
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
if (state == NORMAL) {
color.setColor (1., 1., 1.); // White
color.setColor (1., 1., 1.); // White
} else if (state == ACTIVE) {
color.setColor (1., 1., 0.); // Yellow
} else if (state == PRELIGHT) {
color.setColor (1., 1., 0.); // Orange
} else if (state == DRAGGED) {
color.setColor (1., 0., 0.); // Red
color.setColor (1., 100. / 255., 0.); // Orange
} else if (state == DRAGGED) {
color.setColor (1., 0., 0.); // Red
}
} else {
color = innerLineColor;
@ -57,7 +46,7 @@ RGBColor Geometry::getOuterLineColor ()
{
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
/*
if (state == NORMAL) { color.setColor (0., 0., 0.); } // Black
else if (state == PRELIGHT) { color.setColor (0., 0., 0.); } // Black
@ -73,10 +62,10 @@ RGBColor Geometry::getOuterLineColor ()
void Circle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
if ((flags & F_VISIBLE) && state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
color = getOuterLineColor();
} else {
color = outerLineColor;
@ -85,7 +74,7 @@ void Circle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Edit
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( getOuterLineWidth() );
Coord center_ = center;
rtengine::Coord center_ = center;
double radius_ = radiusInImageSpace ? coordSystem.scaleValueToScreen(double(radius)) : double(radius);
if (datum == IMAGE) {
@ -93,7 +82,7 @@ void Circle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Edit
} else if (datum == CLICKED_POINT) {
center_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI);
@ -103,19 +92,22 @@ void Circle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Edit
void Circle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
RGBColor color;
if (flags & F_VISIBLE) {
if (state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
if (flags & F_AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
}
cr->set_source_rgb(color.getR(), color.getG(), color.getB());
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( innerLineWidth );
Coord center_ = center;
rtengine::Coord center_ = center;
double radius_ = radiusInImageSpace ? coordSystem.scaleValueToScreen(double(radius)) : double(radius);
if (datum == IMAGE) {
@ -123,10 +115,10 @@ void Circle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Edit
} else if (datum == CLICKED_POINT) {
center_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (filled) {
if (filled && state != INSENSITIVE) {
cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI);
if (innerLineWidth > 0.) {
@ -137,16 +129,29 @@ void Circle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Edit
}
} else if (innerLineWidth > 0.) {
cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI);
cr->stroke();
if (state == INSENSITIVE) {
std::valarray<double> ds(1);
ds[0] = 4;
cr->set_source_rgba(1.0, 1.0, 1.0, 0.618);
cr->stroke_preserve();
cr->set_source_rgba(0.0, 0.0, 0.0, 0.618);
cr->set_dash(ds, 0);
cr->stroke();
ds.resize(0);
cr->set_dash(ds, 0);
} else {
cr->stroke();
}
}
}
}
void Circle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
if (flags & F_HOVERABLE) {
cr->set_line_width( getMouseOverLineWidth() );
Coord center_ = center;
rtengine::Coord center_ = center;
double radius_ = radiusInImageSpace ? coordSystem.scaleValueToScreen(double(radius)) : double(radius);
if (datum == IMAGE) {
@ -154,7 +159,7 @@ void Circle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<C
} else if (datum == CLICKED_POINT) {
center_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
center_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
// drawing the lower byte's value
@ -195,10 +200,10 @@ void Circle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<C
void Line::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
if ((flags & F_VISIBLE) && state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
color = getOuterLineColor();
} else {
color = outerLineColor;
@ -207,8 +212,8 @@ void Line::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBu
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( getOuterLineWidth() );
Coord begin_ = begin;
Coord end_ = end;
rtengine::Coord begin_ = begin;
rtengine::Coord end_ = end;
if (datum == IMAGE) {
coordSystem.imageCoordToScreen(begin.x, begin.y, begin_.x, begin_.y);
@ -217,8 +222,8 @@ void Line::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBu
begin_ += editBuffer->getDataProvider()->posScreen;
end_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
cr->move_to(begin_.x + 0.5, begin_.y + 0.5);
@ -229,20 +234,23 @@ void Line::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBu
void Line::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if ((flags & ACTIVE) && innerLineWidth > 0.) {
RGBColor color;
if ((flags & F_VISIBLE) && innerLineWidth > 0.) {
if (state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
if (flags & F_AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width(innerLineWidth);
Coord begin_ = begin;
Coord end_ = end;
rtengine::Coord begin_ = begin;
rtengine::Coord end_ = end;
if (datum == IMAGE) {
coordSystem.imageCoordToScreen(begin.x, begin.y, begin_.x, begin_.y);
@ -251,22 +259,37 @@ void Line::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBu
begin_ += editBuffer->getDataProvider()->posScreen;
end_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
cr->move_to(begin_.x + 0.5, begin_.y + 0.5);
cr->line_to(end_.x + 0.5, end_.y + 0.5);
cr->stroke();
if (state == INSENSITIVE) {
std::valarray<double> ds(1);
ds[0] = 4;
cr->set_source_rgba(1.0, 1.0, 1.0, 0.618);
cr->stroke_preserve();
cr->set_source_rgba(0.0, 0.0, 0.0, 0.618);
cr->set_dash(ds, 0);
cr->stroke();
ds.resize(0);
cr->set_dash(ds, 0);
} else {
cr->stroke();
}
}
}
void Line::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
void Line::drawToMOChannel(Cairo::RefPtr<Cairo::Context> &cr,
Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id,
rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
if (flags & F_HOVERABLE) {
cr->set_line_width( getMouseOverLineWidth() );
Coord begin_ = begin;
Coord end_ = end;
rtengine::Coord begin_ = begin;
rtengine::Coord end_ = end;
if (datum == IMAGE) {
coordSystem.imageCoordToCropBuffer(begin.x, begin.y, begin_.x, begin_.y);
@ -275,8 +298,8 @@ void Line::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cai
begin_ += editBuffer->getDataProvider()->posScreen;
end_ += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
begin_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
end_ += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
// drawing the lower byte's value
@ -299,10 +322,10 @@ void Line::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cai
void Polyline::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if ((flags & ACTIVE) && points.size() > 1) {
if ((flags & F_VISIBLE) && state != INSENSITIVE && points.size() > 1) {
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
color = getOuterLineColor();
} else {
color = outerLineColor;
@ -311,7 +334,7 @@ void Polyline::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( getOuterLineWidth() );
Coord currPos;
rtengine::Coord currPos;
for (unsigned int i = 0; i < points.size(); ++i) {
currPos = points.at(i);
@ -321,7 +344,7 @@ void Polyline::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
} else if (datum == CLICKED_POINT) {
currPos += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (!i) {
@ -342,20 +365,23 @@ void Polyline::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
void Polyline::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if ((flags & ACTIVE) && points.size() > 1) {
RGBColor color;
if ((flags & F_VISIBLE) && points.size() > 1) {
if (state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
if (flags & F_AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( getOuterLineWidth() );
cr->set_line_width( innerLineWidth );
if (filled) {
Coord currPos;
if (filled && state != INSENSITIVE) {
rtengine::Coord currPos;
for (unsigned int i = 0; i < points.size(); ++i) {
currPos = points.at(i);
@ -365,7 +391,7 @@ void Polyline::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
} else if (datum == CLICKED_POINT) {
currPos += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (!i) {
@ -382,17 +408,17 @@ void Polyline::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
cr->fill();
}
} else if (innerLineWidth > 0.) {
Coord currPos;
rtengine::Coord currPos;
for (unsigned int i = 0; i < points.size(); ++i) {
currPos = points.at(i);
if (datum == IMAGE) {
if (datum == IMAGE) {
coordSystem.imageCoordToScreen(points.at(i).x, points.at(i).y, currPos.x, currPos.y);
} else if (datum == CLICKED_POINT) {
currPos += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (!i) {
@ -402,22 +428,34 @@ void Polyline::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::Ed
}
}
cr->stroke();
if (state == INSENSITIVE) {
std::valarray<double> ds(1);
ds[0] = 4;
cr->set_source_rgba(1.0, 1.0, 1.0, 0.618);
cr->stroke_preserve();
cr->set_source_rgba(0.0, 0.0, 0.0, 0.618);
cr->set_dash(ds, 0);
cr->stroke();
ds.resize(0);
cr->set_dash(ds, 0);
} else {
cr->stroke();
}
}
}
}
void Polyline::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if ((flags & ACTIVE) && points.size() > 1) {
Coord currPos;
if ((flags & F_HOVERABLE) && points.size() > 1) {
rtengine::Coord currPos;
// drawing the lower byte's value
unsigned short a = (id + 1) & 0xFF;
cr->set_source_rgba (0., 0., 0., double(a) / 255.);
for (unsigned int i = 0; i < points.size(); ++i) {
cr->set_line_width( getOuterLineWidth() );
cr->set_line_width( getMouseOverLineWidth() );
currPos = points.at(i);
if (datum == IMAGE) {
@ -425,7 +463,7 @@ void Polyline::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr
} else if (datum == CLICKED_POINT) {
currPos += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (!i) {
@ -452,7 +490,7 @@ void Polyline::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr
cr2->set_source_rgba (0., 0., 0., double(a) / 255.);
for (unsigned int i = 0; i < points.size(); ++i) {
cr2->set_line_width( getOuterLineWidth() );
cr2->set_line_width( getMouseOverLineWidth() );
currPos = points.at(i);
if (datum == IMAGE) {
@ -460,7 +498,7 @@ void Polyline::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr
} else if (datum == CLICKED_POINT) {
currPos += editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
currPos += editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (!i) {
@ -496,24 +534,24 @@ void Rectangle::setXYXY(int left, int top, int right, int bottom)
bottomRight.set(right, bottom);
}
void Rectangle::setXYWH(Coord topLeft, Coord widthHeight)
void Rectangle::setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight)
{
this->topLeft = topLeft;
this->bottomRight = topLeft + widthHeight;
}
void Rectangle::setXYXY(Coord topLeft, Coord bottomRight)
void Rectangle::setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight)
{
this->topLeft = topLeft;
this->bottomRight = bottomRight;
}
void Rectangle::drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
void Rectangle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if ((flags & ACTIVE)) {
if ((flags & F_VISIBLE) && state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
if (flags & F_AUTO_COLOR) {
color = getOuterLineColor();
} else {
color = outerLineColor;
@ -522,14 +560,14 @@ void Rectangle::drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( getOuterLineWidth() );
Coord tl, br;
rtengine::Coord tl, br;
if (datum == IMAGE) {
coordSystem.imageCoordToScreen(topLeft.x, topLeft.y, tl.x, tl.y);
} else if (datum == CLICKED_POINT) {
tl = topLeft + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (datum == IMAGE) {
@ -537,7 +575,7 @@ void Rectangle::drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::
} else if (datum == CLICKED_POINT) {
br = bottomRight + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
cr->rectangle(tl.x + 0.5, tl.y + 0.5, br.x - tl.x, br.y - tl.y);
@ -551,28 +589,31 @@ void Rectangle::drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::
}
}
void Rectangle::drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
void Rectangle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
RGBColor color;
if (flags & F_VISIBLE) {
if (state != INSENSITIVE) {
RGBColor color;
if (flags & AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
if (flags & F_AUTO_COLOR) {
color = getInnerLineColor();
} else {
color = innerLineColor;
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
}
cr->set_source_rgb (color.getR(), color.getG(), color.getB());
cr->set_line_width( innerLineWidth );
Coord tl, br;
rtengine::Coord tl, br;
if (datum == IMAGE) {
coordSystem.imageCoordToScreen(topLeft.x, topLeft.y, tl.x, tl.y);
} else if (datum == CLICKED_POINT) {
tl = topLeft + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (datum == IMAGE) {
@ -580,10 +621,10 @@ void Rectangle::drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::
} else if (datum == CLICKED_POINT) {
br = bottomRight + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (filled) {
if (filled && state != INSENSITIVE) {
cr->rectangle(tl.x + 0.5, tl.y + 0.5, br.x - tl.x, br.y - tl.y);
if (innerLineWidth > 0.) {
@ -594,24 +635,37 @@ void Rectangle::drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::
}
} else if (innerLineWidth > 0.) {
cr->rectangle(tl.x + 0.5, tl.y + 0.5, br.x - tl.x, br.y - tl.y);
cr->stroke();
if (state == INSENSITIVE) {
std::valarray<double> ds(1);
ds[0] = 4;
cr->set_source_rgba(1.0, 1.0, 1.0, 0.618);
cr->stroke_preserve();
cr->set_source_rgba(0.0, 0.0, 0.0, 0.618);
cr->set_dash(ds, 0);
cr->stroke();
ds.resize(0);
cr->set_dash(ds, 0);
} else {
cr->stroke();
}
}
}
}
void Rectangle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
void Rectangle::drawToMOChannel(Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem)
{
if (flags & ACTIVE) {
if (flags & F_HOVERABLE) {
cr->set_line_width( getMouseOverLineWidth() );
Coord tl, br;
rtengine::Coord tl, br;
if (datum == IMAGE) {
coordSystem.imageCoordToCropBuffer(topLeft.x, topLeft.y, tl.x, tl.y);
} else if (datum == CLICKED_POINT) {
tl = topLeft + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
tl = topLeft + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
if (datum == IMAGE) {
@ -619,7 +673,7 @@ void Rectangle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPt
} else if (datum == CLICKED_POINT) {
br = bottomRight + editBuffer->getDataProvider()->posScreen;
} else if (datum == CURSOR) {
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaPrevScreen;
br = bottomRight + editBuffer->getDataProvider()->posScreen + editBuffer->getDataProvider()->deltaScreen;
}
// drawing the lower byte's value
@ -658,7 +712,7 @@ void Rectangle::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPt
}
}
EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(NULL) {}
EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(NULL), dragging(false) {}
void EditSubscriber::setEditProvider(EditDataProvider *provider)
{
@ -717,6 +771,10 @@ BufferType EditSubscriber::getEditBufferType()
return bufferType;
}
bool EditSubscriber::isDragging()
{
return dragging;
}
//--------------------------------------------------------------------------------------------------

View File

@ -24,7 +24,9 @@
#include "editid.h"
#include "cursormanager.h"
#include "../rtengine/rt_math.h"
#include "coord.h"
#include "../rtengine/coord.h"
#include "guiutils.h"
#include "options.h"
class EditDataProvider;
@ -39,30 +41,117 @@ class EditBuffer;
* Subscribers will be tools that need to create some graphics in the preview area, to let the user interact
* with it in a more user friendly way.
*
* Do not confuse with a _local_ editing, which is another topic implemented in another class. The Edit feature
* Subscribers will be tools that need to create some graphics in the preview area, to let the user interact
* with it in a more user friendly way.
*
* Do not confuse with _local_ editing, which is another topic implemented in another class. The Edit feature
* is also not supported in batch editing from the File Browser.
*
* Each Edit tool must have a unique ID, that will identify them, and which let the ImProcCoordinator or other
* mechanism act as appropriated. They are all defined in rtgui/editid.h.
* Edit tool can be of 2 types: pipette editing and object editing.
*
* ## How does it works?
* ## Pipette edition
*
* When a tool is being constructed, unique IDs are affected to the EditSubscribers. Then the EditorPanel class
* will ask all ToolPanel to register the 'after' preview ImageArea object as data provider. The Subscribers
* have now to provide a toggle button to click on to start the Edit listening. When toggling on, the Subscriber
* By using this class, a pipette mechanism can be handled on the preview.
*
* Each pipette Edit tool must have a unique ID, that will identify them, and which let the ImProcCoordinator
* or other mechanism act as appropriated. They are all defined in rtgui/editid.h. A buffer type has to be given
* too, to know which kind of buffer to allocate (see EditSubscriber::BufferType).
*
* Only the first mouse button can be used to manipulate the pipette on the Preview, that's why the developer has
* to implement at least the following 4 methods:
* - mouseOver
* - button1Pressed
* - drag1
* - button1Released
*
* Actually, only curves does use this class, and everything is handled for curve implementor (as much as possible).
* See the curve's class documentation to see how to implement the curve's pipette feature.
*
* ### Event handling
*
* The mouseOver method is called on each mouse movement, excepted when dragging a point. This method can then access
* the pipetteVal array values, which contain the mean of the pixel read in the buffer, or -1 of the cursor is outside
* of the image. In this case, EditDataProvider::object is also set to 0 (and 1 if over the image).
*
* When the user will click on the left mouse button while pressing the CTRL key, the button1Pressed will be called.
* Setting "dragging" to true (or false) is not required for the pipette type editing.
*
* The drag1 method will be called on all subsequent mouse move. The pipetteVal[3] array will already be filled with
* the mean of the read values under the cursor (actually a fixed square of 8px). If the BufferType is BT_SINGLEPLANE_FLOAT,
* only the first array value will be filled.
*
* Then the button1Released will be called to stop the dragging.
*
* ## Object edition
*
* By using this class, object can be drawn and manipulated on the preview.
*
* The developer has to handle the buttonPress, buttonRelease, drag and mouseOver method that he needs. There
* are buttonPress, buttonRelease and drag methods dedicated to each mouse button, for better flexibility
* (e.g.button2Press, button2Release, drag2 will handle event when mouse button 2 is used first). RT actually
* does not handle multiple mouse button event (e.g. button1 + button2), only one at a time. The first button pressed
* set the mechanism, all other combined button press are ignored.
*
* The developer also have to fill 2 display list with object of the Geometry subclass. Each geometrical shape
* _can_ be used in one or the other, or both list at a time.
*
* The first list (visibleGeometry) is used to be displayed on the preview. The developer will have to set their state
* manually (see Geometry::State), but the display shape, line width and color can be handled automatically, or with
* specific values. To be displayed, the F_VISIBLE flag has to be set through the setActive or setVisible methods.
*
* The second list (mouseOverGeometry) is used in a backbuffer, the color used to draw the shape being the id of the
* mouseOverGeometry. As an example, you could use a circle line to represent the line to the user, but use another
* Circle object, filled, to be used as mouseOver detection. The association between both shape (visible and mouseOver)
* is handled by the developer. To be displayed on this backbuffer, the F_HOVERABLE flag has to be set through the
* setActive or setHoverable methods.
*
*
* ### Event handling
*
* RT will draw in the back buffer all mouseOverGeometry set by the developer once the Edit button is pressed, and handle
* the events automatically.
*
* RT will call the mouseOver method on each mouse movement where no mouse button is pressed.
*
* On mouse button press over a mouseOverGeometry, it will call the button press method corresponding to the button
* (e.g. button1Pressed for mouse button 1), with the modifier key as parameter. Any other mouse button pressed at
* the same time will be ignored. It's up to the developer to decide whether it leads to a drag movement or not,
* by setting the "dragging" boolean to true.
*
* In this case, RT will then sent drag1 event (to stay with our button 1 pressed example) on each mouse movement. It's up
* to the developer of the tool to handle the dragging. The EditProvider class will help you in this by handling the actual
* position in various coordinate system and ways.
*
* When the user will release the mouse button, RT will call the button1Release event (in our example). The developer have
* then to set the "dragging" flag to false.
*
* Each of these methods have to returns a boolean value saying that the preview has to be refreshed or not (i.e. the displayed
* geometry).
*
* ## Other general internal implementation notes
*
* When a tool is being constructed, unique IDs are affected to the EditSubscribers of the Pipette type.
* Then the EditorPanel class will ask all ToolPanel to register the 'after' preview ImageArea object as data provider.
* The Subscribers have now to provide a toggle button to click on to start the Edit listening. When toggling on, the Subscriber
* register itself to the DataProvider, then an event is thrown through the standard ToolPanelListener::panelChanged
* method to update the preview with new graphics to be displayed, and eventually buffers to create and populate.
* method to update the preview with new graphics to be displayed. If a previous Edit button was active, it will be deactivated
* (the Edit buttons are mutually exclusive). For the Pipette type, a buffer will be created and has to be populated
* by the developer in rtengine's pipeline. The unique pipette ID will be used to know where to fill the buffer, as each pipette
* will need different data, corresponding to the state of the image right before the tool that needs pipette values. E.g for
* the HSV tool, the Hue and Saturation and Value curves are applied on the current state of the image. That's why the pipette
* of the H, S and V curve will share the same data of this "current state", otherwise the read value would be wrong.
*
* When the Edit process stops, the Subscriber is removed from the DataProvider, so buffer can be freed up.
* When the mouse button 1 is pressed while pressing the CTRL key, the button1Pressed method will be called.
*
* When the Edit process stops, the Subscriber is removed from the DataProvider, so buffers can be freed up.
* A new ToolPanelListener::panelChanged event is also thrown to update the preview again, without the tool's
* graphical objects. The Edit button is also toggled off (by the user or programmatically).
*
* It means that each Edit buttons toggled on will start an update of the preview which might or might not create
* a new History entry, depending on the event.
* a new History entry, depending on the ProcEvent used.
*
*/
/** @brief Coordinate system where the widgets will be drawn
*
* The EditCoordSystem is used to define a screen and an image coordinate system.
@ -133,22 +222,69 @@ public:
}
};
class RGBAColor : public RGBColor
{
double a;
public:
RGBAColor () : RGBColor(0., 0., 0.), a(0.) {}
explicit RGBAColor (double r, double g, double b, double a) : RGBColor(r, g, b), a(a) {}
explicit RGBAColor (char r, char g, char b, char a) : RGBColor(r, g, b), a(double(a) / 255.) {}
void setColor(double r, double g, double b, double a)
{
RGBColor::setColor(r, g, b);
this->a = a;
}
void setColor(char r, char g, char b, char a)
{
RGBColor::setColor(r, g, b);
this->a = double(a) / 255.;
}
double getA()
{
return a;
}
};
/// @brief Displayable and MouseOver geometry base class
class Geometry
{
public:
/// @brief Graphical state of the element
enum State {
NORMAL,
PRELIGHT,
DRAGGED
NORMAL, /// Default state
ACTIVE, /// Focused state
PRELIGHT, /// Hovered state
DRAGGED, /// When being dragged
INSENSITIVE /// Displayed but insensitive
};
/// @brief Coordinate space and origin of the point
enum Datum {
IMAGE,
CLICKED_POINT,
CURSOR
IMAGE, /// Image coordinate system with image's top left corner as origin
CLICKED_POINT, /// Screen coordinate system with clicked point as origin
CURSOR /// Screen coordinate system with actual cursor position as origin
};
enum Flags {
ACTIVE = 1 << 0, // true if the geometry is active and have to be drawn
AUTO_COLOR = 1 << 1, // true if the color depend on the state value, not the color field above
F_VISIBLE = 1 << 0, /// true if the geometry have to be drawn on the visible layer
F_HOVERABLE = 1 << 1, /// true if the geometry have to be drawn on the "mouse over" layer
F_AUTO_COLOR = 1 << 2, /// true if the color depend on the state value, not the color field above
};
/// @brief Key point of the image's rectangle that is used to locate the icon copy to the target point:
enum DrivenPoint {
DP_CENTERCENTER,
DP_TOPLEFT,
DP_TOPCENTER,
DP_TOPRIGHT,
DP_CENTERRIGHT,
DP_BOTTOMRIGHT,
DP_BOTTOMCENTER,
DP_BOTTOMLEFT,
DP_CENTERLEFT
};
protected:
@ -161,29 +297,29 @@ public:
Datum datum;
State state; // set by the Subscriber
Geometry () : innerLineColor(char(255), char(255), char(255)), outerLineColor(char(0), char(0), char(0)), flags(ACTIVE | AUTO_COLOR), innerLineWidth(1.f), datum(IMAGE), state(NORMAL) {}
Geometry () : innerLineColor(char(255), char(255), char(255)), outerLineColor(char(0), char(0), char(0)), flags(F_VISIBLE | F_HOVERABLE | F_AUTO_COLOR), innerLineWidth(1.5f), datum(IMAGE), state(NORMAL) {}
virtual ~Geometry() {}
void setInnerLineColor (double r, double g, double b)
{
innerLineColor.setColor(r, g, b);
flags &= ~AUTO_COLOR;
flags &= ~F_AUTO_COLOR;
}
void setInnerLineColor (char r, char g, char b)
{
innerLineColor.setColor(r, g, b);
flags &= ~AUTO_COLOR;
flags &= ~F_AUTO_COLOR;
}
RGBColor getInnerLineColor ();
void setOuterLineColor (double r, double g, double b)
{
outerLineColor.setColor(r, g, b);
flags &= ~AUTO_COLOR;
flags &= ~F_AUTO_COLOR;
}
void setOuterLineColor (char r, char g, char b)
{
outerLineColor.setColor(r, g, b);
flags &= ~AUTO_COLOR;
flags &= ~F_AUTO_COLOR;
}
RGBColor getOuterLineColor ();
double getOuterLineWidth ()
@ -197,17 +333,43 @@ public:
void setAutoColor (bool aColor)
{
if (aColor) {
flags |= AUTO_COLOR;
flags |= F_AUTO_COLOR;
} else {
flags &= ~AUTO_COLOR;
flags &= ~F_AUTO_COLOR;
}
}
bool isVisible ()
{
return flags & F_VISIBLE;
}
void setVisible (bool visible)
{
if (visible) {
flags |= F_VISIBLE;
} else {
flags &= ~F_VISIBLE;
}
}
bool isHoverable ()
{
return flags & F_HOVERABLE;
}
void setHoverable (bool visible)
{
if (visible) {
flags |= F_HOVERABLE;
} else {
flags &= ~F_HOVERABLE;
}
}
// setActive will enable/disable the visible and hoverable flags in one shot!
void setActive (bool active)
{
if (active) {
flags |= ACTIVE;
flags |= (F_VISIBLE | F_HOVERABLE);
} else {
flags &= ~ACTIVE;
flags &= ~(F_VISIBLE | F_HOVERABLE);
}
}
@ -219,13 +381,13 @@ public:
class Circle : public Geometry
{
public:
Coord center;
rtengine::Coord center;
int radius;
bool filled;
bool radiusInImageSpace; /// If true, the radius depend on the image scale; if false, it is a fixed 'screen' size
Circle () : center(100, 100), radius(10), filled(false), radiusInImageSpace(false) {}
Circle (Coord &center, int radius, bool filled = false, bool radiusInImageSpace = false) : center(center), radius(radius), filled(filled), radiusInImageSpace(radiusInImageSpace) {}
Circle (rtengine::Coord &center, int radius, bool filled = false, bool radiusInImageSpace = false) : center(center), radius(radius), filled(filled), radiusInImageSpace(radiusInImageSpace) {}
Circle (int centerX, int centerY, int radius, bool filled = false, bool radiusInImageSpace = false) : center(centerX, centerY), radius(radius), filled(filled), radiusInImageSpace(radiusInImageSpace) {}
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem);
@ -236,11 +398,11 @@ public:
class Line : public Geometry
{
public:
Coord begin;
Coord end;
rtengine::Coord begin;
rtengine::Coord end;
Line () : begin(10, 10), end(100, 100) {}
Line (Coord &begin, Coord &end) : begin(begin), end(end) {}
Line (rtengine::Coord &begin, rtengine::Coord &end) : begin(begin), end(end) {}
Line (int beginX, int beginY, int endX, int endY) : begin(beginX, beginY), end(endX, endY) {}
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem);
@ -251,7 +413,7 @@ public:
class Polyline : public Geometry
{
public:
std::vector<Coord> points;
std::vector<rtengine::Coord> points;
bool filled;
Polyline() : filled(false) {}
@ -264,16 +426,16 @@ public:
class Rectangle : public Geometry
{
public:
Coord topLeft;
Coord bottomRight;
rtengine::Coord topLeft;
rtengine::Coord bottomRight;
bool filled;
Rectangle() : topLeft(0, 0), bottomRight(10, 10), filled(false) {}
void setXYWH(int left, int top, int width, int height);
void setXYXY(int left, int top, int right, int bottom);
void setXYWH(Coord topLeft, Coord widthHeight);
void setXYXY(Coord topLeft, Coord bottomRight);
void setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight);
void setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight);
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem);
void drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem);
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, Cairo::RefPtr<Cairo::Context> &cr2, unsigned short id, rtengine::EditBuffer *editBuffer, EditCoordSystem &coordSystem);
@ -292,8 +454,9 @@ private:
EditDataProvider *provider;
protected:
std::vector<Geometry*> visibleGeometry;
std::vector<Geometry*> mouseOverGeometry;
std::vector<Geometry*> visibleGeometry; /// displayed geometry
std::vector<Geometry*> mouseOverGeometry; /// mouseOver geometry, drawn in a hidden buffer
bool dragging; /// in object mode, set this to true in buttonPressed events to start dragging and ask for drag event (ignored in pipette mode)
public:
EditSubscriber (EditType editType);
@ -312,6 +475,7 @@ public:
EditUniqueID getEditID();
EditType getEditingType();
BufferType getEditBufferType();
bool isDragging(); /// Returns true if something is being dragged and drag events has to be sent (object mode only)
/** @brief Get the cursor to be displayed when above handles
@param objectID object currently "hovered" */
@ -331,6 +495,7 @@ public:
}
/** @brief Triggered when mouse button 1 is pressed, together with the CTRL modifier key if the subscriber is of type ET_PIPETTE
Once the key is pressed, RT will enter in drag1 mode on subsequent mouse movements
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool button1Pressed(int modifierKey)
@ -345,10 +510,58 @@ public:
return false;
}
/** @brief Triggered when mouse button 2 is pressed (middle button)
Once the key is pressed, RT will enter in drag2 mode on subsequent mouse movements
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool button2Pressed(int modifierKey)
{
return false;
}
/** @brief Triggered when mouse button 2 is released (middle button)
@return true if the preview has to be redrawn, false otherwise */
virtual bool button2Released()
{
return false;
}
/** @brief Triggered when mouse button 3 is pressed (right button)
Once the key is pressed, RT will enter in drag3 mode on subsequent mouse movements
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool button3Pressed(int modifierKey)
{
return false;
}
/** @brief Triggered when mouse button 3 is released (right button)
@return true if the preview has to be redrawn, false otherwise */
virtual bool button3Released()
{
return false;
}
/** @brief Triggered when the user is moving while holding down mouse button 1
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool drag(int modifierKey)
virtual bool drag1(int modifierKey)
{
return false;
}
/** @brief Triggered when the user is moving while holding down mouse button 2
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool drag2(int modifierKey)
{
return false;
}
/** @brief Triggered when the user is moving while holding down mouse button 3
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
@return true if the preview has to be redrawn, false otherwise */
virtual bool drag3(int modifierKey)
{
return false;
}
@ -381,12 +594,12 @@ public:
int object; /// ET_OBJECTS mode: Object detected under the cursor, 0 otherwise; ET_PIPETTE mode: 1 if above the image, 0 otherwise
float pipetteVal[3]; /// Current pipette values; if bufferType==BT_SINGLEPLANE_FLOAT, #2 & #3 will be set to 0
Coord posScreen; /// Location of the mouse button press, in preview image space
Coord posImage; /// Location of the mouse button press, in the full image space
Coord deltaScreen; /// Delta relative to posScreen
Coord deltaImage; /// Delta relative to posImage
Coord deltaPrevScreen; /// Delta relative to the previous mouse location, in preview image space
Coord deltaPrevImage; /// Delta relative to the previous mouse location, in the full image space
rtengine::Coord posScreen; /// Location of the mouse button press, in preview image space
rtengine::Coord posImage; /// Location of the mouse button press, in the full image space
rtengine::Coord deltaScreen; /// Delta relative to posScreen
rtengine::Coord deltaImage; /// Delta relative to posImage
rtengine::Coord deltaPrevScreen; /// Delta relative to the previous mouse location, in preview image space
rtengine::Coord deltaPrevImage; /// Delta relative to the previous mouse location, in the full image space
EditDataProvider();
virtual ~EditDataProvider() {}

View File

@ -20,7 +20,7 @@
#define _EDITENUMS_
enum ImgEditState {SNormal, SCropMove, SHandMove, SResizeW1, SResizeW2, SResizeH1, SResizeH2, SResizeTL, SResizeTR, SResizeBL, SResizeBR,
SCropSelecting, SRotateSelecting, SCropWinMove, SCropFrameMove, SCropImgMove, SCropWinResize, SObservedMove, SEditDrag
SCropSelecting, SRotateSelecting, SCropWinMove, SCropFrameMove, SCropImgMove, SCropWinResize, SObservedMove, SEditDrag1, SEditDrag2, SEditDrag3
};
enum CursorArea {CropWinButtons, CropToolBar, CropImage, CropBorder, CropTop, CropTopLeft, CropTopRight, CropBottom, CropBottomLeft,
CropBottomRight, CropLeft, CropRight, CropInside, CropResize, CropObserved

View File

@ -146,7 +146,7 @@ void Gradient::updateGeometry(int centerX_, int centerY_, double feather_, doubl
dataProvider->getImageSize(imW, imH);
double decay = feather_ * sqrt(double(imW) * double(imW) + double(imH) * double(imH)) / 200.;
Coord origin(imW / 2 + centerX_ * imW / 200.f, imH / 2 + centerY_ * imH / 200.f);
rtengine::Coord origin(imW / 2 + centerX_ * imW / 200.f, imH / 2 + centerY_ * imH / 200.f);
Line *currLine;
Circle *currCircle;
@ -397,10 +397,11 @@ bool Gradient::mouseOver(int modifierKey)
bool Gradient::button1Pressed(int modifierKey)
{
if (!(modifierKey & (GDK_CONTROL_MASK | GDK_CONTROL_MASK))) {
EditDataProvider *provider = getEditProvider();
if (!(modifierKey & GDK_CONTROL_MASK)) {
// button press is valid (no modifier key)
PolarCoord pCoord;
EditDataProvider *provider = getEditProvider();
int imW, imH;
provider->getImageSize(imW, imH);
double halfSizeW = imW / 2.;
@ -408,8 +409,8 @@ bool Gradient::button1Pressed(int modifierKey)
draggedCenter.set(int(halfSizeW + halfSizeW * (centerX->getValue() / 100.)), int(halfSizeH + halfSizeH * (centerY->getValue() / 100.)));
// trick to get the correct angle (clockwise/counter-clockwise)
Coord p1 = draggedCenter;
Coord p2 = provider->posImage;
rtengine::Coord p1 = draggedCenter;
rtengine::Coord p2 = provider->posImage;
int p = p1.y;
p1.y = p2.y;
p2.y = p;
@ -422,9 +423,9 @@ bool Gradient::button1Pressed(int modifierKey)
if (lastObject == 2 || lastObject == 3) {
// Dragging a line to change the angle
PolarCoord draggedPoint;
Coord currPos;
rtengine::Coord currPos;
currPos = provider->posImage;
Coord centerPos = draggedCenter;
rtengine::Coord centerPos = draggedCenter;
double diagonal = sqrt(double(imW) * double(imW) + double(imH) * double(imH));
@ -444,6 +445,7 @@ bool Gradient::button1Pressed(int modifierKey)
draggedFeatherOffset -= (feather->getValue() / 200. * diagonal);
}
EditSubscriber::dragging = true;
return false;
} else {
// this will let this class ignore further drag events
@ -464,10 +466,11 @@ bool Gradient::button1Pressed(int modifierKey)
bool Gradient::button1Released()
{
draggedPointOldAngle = -1000.;
EditSubscriber::dragging = false;
return true;
}
bool Gradient::drag(int modifierKey)
bool Gradient::drag1(int modifierKey)
{
// compute the polar coordinate of the mouse position
EditDataProvider *provider = getEditProvider();
@ -480,9 +483,9 @@ bool Gradient::drag(int modifierKey)
// Dragging a line to change the angle
PolarCoord draggedPoint;
Coord currPos;
rtengine::Coord currPos;
currPos = provider->posImage + provider->deltaImage;
Coord centerPos = draggedCenter;
rtengine::Coord centerPos = draggedCenter;
// trick to get the correct angle (clockwise/counter-clockwise)
int p = centerPos.y;
@ -523,9 +526,9 @@ bool Gradient::drag(int modifierKey)
} else if (lastObject == 2 || lastObject == 3) {
// Dragging the upper or lower feather bar
PolarCoord draggedPoint;
Coord currPos;
rtengine::Coord currPos;
currPos = provider->posImage + provider->deltaImage;
Coord centerPos = draggedCenter;
rtengine::Coord centerPos = draggedCenter;
double diagonal = sqrt(double(imW) * double(imW) + double(imH) * double(imH));
@ -561,7 +564,7 @@ bool Gradient::drag(int modifierKey)
}
} else if (lastObject == 4) {
// Dragging the circle to change the center
Coord currPos;
rtengine::Coord currPos;
draggedCenter += provider->deltaPrevImage;
currPos = draggedCenter;
currPos.clip(imW, imH);

View File

@ -8,6 +8,7 @@
#include "adjuster.h"
#include "toolpanel.h"
#include "edit.h"
#include "guiutils.h"
class Gradient : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public EditSubscriber
{
@ -26,7 +27,7 @@ protected:
double draggedPointOldAngle;
double draggedPointAdjusterAngle;
double draggedFeatherOffset;
Coord draggedCenter;
rtengine::Coord draggedCenter;
sigc::connection editConn;
void editToggled ();
@ -55,7 +56,7 @@ public:
bool mouseOver(int modifierKey);
bool button1Pressed(int modifierKey);
bool button1Released();
bool drag(int modifierKey);
bool drag1(int modifierKey);
void switchOffEditMode ();
};

View File

@ -110,10 +110,10 @@ bool Inspector::on_expose_event (GdkEventExpose* event)
// this will eventually create/update the off-screen pixmap
// compute the displayed area
Coord availableSize;
Coord topLeft;
Coord displayedSize;
Coord dest(0, 0);
rtengine::Coord availableSize;
rtengine::Coord topLeft;
rtengine::Coord displayedSize;
rtengine::Coord dest(0, 0);
win->get_size(availableSize.x, availableSize.y);
int imW = currImage->imgBuffer.getWidth();
int imH = currImage->imgBuffer.getHeight();

View File

@ -21,7 +21,7 @@
#include <gtkmm.h>
#include "guiutils.h"
#include "coord.h"
#include "../rtengine/coord.h"
class InspectorBuffer
{
@ -42,7 +42,7 @@ class Inspector : public Gtk::DrawingArea
{
private:
Coord center;
rtengine::Coord center;
std::vector<InspectorBuffer*> images;
InspectorBuffer* currImage;
double zoom;

View File

@ -4,9 +4,9 @@
#ifndef _VERSION_
#define _VERSION_
#define VERSION "${HG_VERSION}"
#define VERSION "${GIT_VERSION}"
#define VERSION_SUFFIX "${VERSION_SUFFIX}"
#define TAGDISTANCE ${HG_TAGDISTANCE}
#define TAGDISTANCE ${GIT_TAGDISTANCE}
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
#endif

62
tools/generateLensList Executable file
View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
# This Bash4 script generates lens ID lists for rtexif/*.cc files using
# the exiftool version installed on the host system, so make sure you have
# the latest version of exiftool installed before running this script.
# It uses xmlstarlet to parse exiftool's output so make sure you have that.
#
# Run the script from the project root:
# ./tools/generateLensList
#
# Manually replace old code in rtexif/* with new from /tmp/rt-generateLensList/*
#
# Blame DrSlony
# Please report bugs or enhancements to https://github.com/Beep6581/RawTherapee
hash exiftool 2>/dev/null || { echo >&2 "Exiftool not found, install it first."; exit 1; }
hash xmlstarlet 2>/dev/null || { echo >&2 "XMLStarlet not found, install it first."; exit 1; }
unset cam cams
cams=("canon" "nikon" "olympus" "pentax" "sony")
tmpdir="/tmp/rt-generateLensList"
head -n 15 "$0" | tail -n 14
printf '%s\n' "exiftool version: $(exiftool -ver)" "" "XMLStarlet version: $(xmlstarlet --version)" | sed 's/^/# /'
if [[ -d ${tmpdir} ]]; then
printf '%s\n' "" "Removing temp folder: $tmpdir"
rm -rvI "$tmpdir" || exit 1
fi
mkdir -p "$tmpdir" || { printf '%s\n' "Error creating $tmpdir" ""; exit 1; }
echo
for cam in "${cams[@]}"; do
if [[ "$cam" != nikon ]]; then
printf '%s\n' "Saving ${tmpdir}/${cam}"
xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -"$cam":all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; }
sort -fuV "${tmpdir}/cam" > "${tmpdir}/${cam}"
rm -f "${tmpdir}/cam"
fi
case $cam in
canon) sed -r -i -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/canon" ;;
nikon)
# Nikon LensIDs are composite tags
printf '%s\n' "Saving ${tmpdir}/nikon"
xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensID']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -composite:all) > "${tmpdir}/nikon" || { printf '%s\n' "Saving failed: ${tmpdir}/nikon"; exit 1; }
sed -r -i -e '/^... /d' -e 's/^/ lenses["/' -e 's/([A-F0-9]+)[A-F0-9.]*\t/\1"] = "/' -e 's/$/";/' -e 's|(.* ")(.*) F([0-9]+)|\1\2 f/\3|' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/nikon"
;;
olympus) sed -r -i -e '/0 00 00\tNone/d' -e 's/^/ lenses["0/' -e 's/\t/"] = "/' -e 's/$/";/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/olympus" ;;
pentax) sed -r -i -e 's/^/ choices.insert(p_t(256 * /' -e 's/([0-9]+) ([0-9]+)([0-9.]*)/\1 + \2/' -e 's/\t/, "/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|' "${tmpdir}/pentax" ;;
sony)
# Sony has more lenses under the LensType2 tag
printf '%s\n' "Saving ${tmpdir}/sony-lenstype2"
xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -sony:all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; }
sort -fuV "${tmpdir}/cam" > "${tmpdir}/sony-lenstype2"
rm -f "${tmpdir}/cam"
sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony" "${tmpdir}/sony-lenstype2"
;;
esac
done

View File

@ -1,11 +1,12 @@
#!/usr/bin/env bash
hgBranch="`hg branch`"
hgLatesttag="`hg parents --template '{latesttag}'`"
hgLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
hgChangeset="`hg parents --template '{node|short}'`"
gitBranch="`git symbolic-ref --short -q HEAD`"
gitVersion="`git describe --tags --always`"
gitLatesttag="`echo $gitVersion | sed 's/-.*//'`"
gitLatesttagdistance="`echo $gitVersion | sed 's/.*-\(.*\)-g.*/\1/'`"
gitChangeset="`git rev-parse --verify HEAD`"
echo "set(HG_BRANCH $hgBranch)
set(HG_VERSION $hgLatesttag.$hgLatesttagdistance)
set(HG_CHANGESET $hgChangeset)
set(HG_TAGDISTANCE $hgLatesttagdistance)" > ReleaseInfo.cmake
echo "set(GIT_BRANCH $gitBranch)
set(GIT_VERSION $gitLatesttag.$gitLatesttagdistance)
set(GIT_CHANGESET $gitChangeset)
set(GIT_TAGDISTANCE $gitLatesttagdistance)" > ReleaseInfo.cmake

View File

@ -1,11 +0,0 @@
@echo off
for /f "tokens=*" %%a in ('hg branch') do @set hgBranch=%%a
for /f "tokens=*" %%a in ('hg parents --template "{latesttag}"') do @set hgLatesttag=%%a
for /f "tokens=*" %%a in ('hg parents --template "{latesttagdistance}"') do @set hgLatesttagdistance=%%a
for /f "tokens=*" %%a in ('hg parents --template "{node|short}"') do @set hgChangeset=%%a
echo set(HG_BRANCH %hgBranch%) > ReleaseInfo.cmake
echo set(HG_VERSION %hgLatesttag%.%hgLatesttagdistance%) >> ReleaseInfo.cmake
echo set(HG_CHANGESET %hgChangeset%) >> ReleaseInfo.cmake
echo set(HG_TAGDISTANCE %hgLatesttagdistance%) >> ReleaseInfo.cmake